feat(prompt): Add eventContextHint parameter for event-sourced memory
Some checks are pending
CI / install-check (push) Waiting to run
CI / checks (bunx tsc -p tsconfig.json --noEmit false, bun, build) (push) Waiting to run
CI / checks (pnpm build && pnpm lint, node, lint) (push) Waiting to run
CI / checks (pnpm canvas:a2ui:bundle && bunx vitest run, bun, test) (push) Waiting to run
CI / checks (pnpm canvas:a2ui:bundle && pnpm test, node, test) (push) Waiting to run
CI / checks (pnpm format, node, format) (push) Waiting to run
CI / checks (pnpm protocol:check, node, protocol) (push) Waiting to run
CI / checks (pnpm tsgo, node, tsgo) (push) Waiting to run
CI / secrets (push) Waiting to run
CI / checks-windows (pnpm build && pnpm lint, node, build & lint) (push) Waiting to run
CI / checks-windows (pnpm canvas:a2ui:bundle && pnpm test, node, test) (push) Waiting to run
CI / checks-windows (pnpm protocol:check, node, protocol) (push) Waiting to run
CI / checks-macos (pnpm test, test) (push) Waiting to run
CI / macos-app (set -euo pipefail for attempt in 1 2 3; do if swift build --package-path apps/macos --configuration release; then exit 0 fi echo "swift build failed (attempt $attempt/3). Retrying…" sleep $((attempt * 20)) done exit 1 , build) (push) Waiting to run
CI / macos-app (set -euo pipefail for attempt in 1 2 3; do if swift test --package-path apps/macos --parallel --enable-code-coverage --show-codecov-path; then exit 0 fi echo "swift test failed (attempt $attempt/3). Retrying…" sleep $((attempt … (push) Waiting to run
CI / macos-app (swiftlint --config .swiftlint.yml swiftformat --lint apps/macos/Sources --config .swiftformat , lint) (push) Waiting to run
CI / ios (push) Waiting to run
CI / android (./gradlew --no-daemon :app:assembleDebug, build) (push) Waiting to run
CI / android (./gradlew --no-daemon :app:testDebugUnitTest, test) (push) Waiting to run
Workflow Sanity / no-tabs (push) Waiting to run

System prompt can now include event-based context from NATS JetStream.
Next step: Auto-load context on session start.
This commit is contained in:
Claudia 2026-02-02 10:47:40 +01:00
parent 71bce3fc6d
commit 6597fccd42

View file

@ -166,6 +166,8 @@ export function buildAgentSystemPrompt(params: {
defaultThinkLevel?: ThinkLevel;
reasoningLevel?: ReasoningLevel;
extraSystemPrompt?: string;
/** Event-sourced context from NATS (formatted text block). */
eventContextHint?: string;
ownerNumbers?: string[];
reasoningTagHint?: boolean;
toolNames?: string[];
@ -551,6 +553,11 @@ export function buildAgentSystemPrompt(params: {
}
}
// Event-sourced context (from NATS JetStream)
if (params.eventContextHint) {
lines.push("## Event-Sourced Memory", "", params.eventContextHint, "");
}
// Skip silent replies for subagent/none modes
if (!isMinimal) {
lines.push(