Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion console/web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ src/
backend/ # ← the seam. ChatBackend interface + impls
types.ts # StreamEvent, ChatBackend, ChatStreamOptions
harness-send.ts # harness::send / stop / status wire helpers
system-prompt.ts # per-mode + identity system prompt
turn-events-live.ts # harness::turn-completed subscription
approval-events-live.ts # approval::pending-* subscription + list-pending
translate.ts # trigger payloads → StreamEvent
Expand Down
4 changes: 4 additions & 0 deletions console/web/src/lib/backend/harness-send.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,13 @@ export type HarnessOutputContract =
| { type: 'text' }
| { type: 'json'; schema?: unknown }

/** Operating mode — the harness prepends a short paragraph before the identity prompt. */
export type HarnessSendMode = 'plan' | 'ask' | 'agent'

/** Per-send options frozen onto the turn record. */
export interface HarnessSendOptions {
system_prompt?: string
mode?: HarnessSendMode
max_turns?: number
thinking_level?: HarnessThinkingLevel
output?: HarnessOutputContract
Expand Down
7 changes: 4 additions & 3 deletions console/web/src/lib/backend/real.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/**
* iii-browser-sdk + harness turn kickoff. Deployment permission rules live in
* the `approval-gate` configuration entry; the console derives the harness
* structural floor from those rules on each send.
* structural floor from those rules on each send. Operating mode is passed to
* the harness, which assembles the provider-specific identity prompt when
* `system_prompt` is omitted.
*
* Transcript content (tokens, message snapshots, function-call cards, results)
* renders from session-manager events reconciled by the conversations layer
Expand Down Expand Up @@ -30,7 +32,6 @@ import {
sendTurn,
stopTurn,
} from './harness-send'
import { buildModeSystemPrompt } from './system-prompt'
import {
isTerminalSource,
type TurnSourceEvent,
Expand Down Expand Up @@ -176,7 +177,7 @@ async function* realStream(
idempotency_key: messageId,
session: { metadata: { surface: 'console' } },
options: {
system_prompt: buildModeSystemPrompt(mode, provider),
mode,
functions: functionPolicy,
...(thinkingLevel ? { thinking_level: thinkingLevel } : {}),
metadata: { session_id: sessionId, message_id: messageId },
Expand Down
260 changes: 0 additions & 260 deletions console/web/src/lib/backend/system-prompt.ts

This file was deleted.

Loading
Loading