@pellux/goodvibes-sdk 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/contracts/artifacts/operator-contract.json +2878 -264
- package/dist/events/communication.d.ts +1 -1
- package/dist/platform/agents/orchestrator-runner.d.ts +5 -5
- package/dist/platform/agents/orchestrator-runner.js +6 -6
- package/dist/platform/agents/orchestrator.d.ts +4 -4
- package/dist/platform/agents/orchestrator.js +2 -2
- package/dist/platform/agents/wrfc-controller.d.ts +1 -1
- package/dist/platform/agents/wrfc-controller.js +3 -3
- package/dist/platform/calendar/index.d.ts +2 -2
- package/dist/platform/calendar/index.js +3 -3
- package/dist/platform/calendar/oauth-providers.d.ts +1 -1
- package/dist/platform/calendar/oauth-providers.js +1 -1
- package/dist/platform/calendar/oauth-types.d.ts +1 -1
- package/dist/platform/calendar/oauth-types.js +1 -1
- package/dist/platform/companion/companion-chat-branching.d.ts +66 -0
- package/dist/platform/companion/companion-chat-branching.d.ts.map +1 -0
- package/dist/platform/companion/companion-chat-branching.js +142 -0
- package/dist/platform/companion/companion-chat-broker-bridge.d.ts +1 -1
- package/dist/platform/companion/companion-chat-broker-bridge.d.ts.map +1 -1
- package/dist/platform/companion/companion-chat-broker-sync.d.ts +2 -2
- package/dist/platform/companion/companion-chat-broker-sync.d.ts.map +1 -1
- package/dist/platform/companion/companion-chat-broker-sync.js +1 -1
- package/dist/platform/companion/companion-chat-manager.d.ts +26 -5
- package/dist/platform/companion/companion-chat-manager.d.ts.map +1 -1
- package/dist/platform/companion/companion-chat-manager.js +67 -81
- package/dist/platform/companion/companion-chat-routes.d.ts.map +1 -1
- package/dist/platform/companion/companion-chat-routes.js +77 -1
- package/dist/platform/companion/companion-chat-turn-execution.d.ts +61 -0
- package/dist/platform/companion/companion-chat-turn-execution.d.ts.map +1 -0
- package/dist/platform/companion/companion-chat-turn-execution.js +107 -0
- package/dist/platform/companion/companion-chat-types.d.ts +67 -0
- package/dist/platform/companion/companion-chat-types.d.ts.map +1 -1
- package/dist/platform/config/credential-status.d.ts +1 -1
- package/dist/platform/config/credential-status.js +1 -1
- package/dist/platform/config/index.d.ts +1 -1
- package/dist/platform/config/index.js +1 -1
- package/dist/platform/config/manager.d.ts +1 -1
- package/dist/platform/config/manager.js +1 -1
- package/dist/platform/config/migrations.d.ts +2 -2
- package/dist/platform/config/migrations.js +2 -2
- package/dist/platform/config/schema-domain-runtime.d.ts +8 -0
- package/dist/platform/config/schema-domain-runtime.d.ts.map +1 -1
- package/dist/platform/config/schema-domain-runtime.js +32 -0
- package/dist/platform/config/schema-types.d.ts +10 -2
- package/dist/platform/config/schema-types.d.ts.map +1 -1
- package/dist/platform/control-plane/gateway-scope-enforcement.js +2 -2
- package/dist/platform/control-plane/index.d.ts +2 -0
- package/dist/platform/control-plane/index.d.ts.map +1 -1
- package/dist/platform/control-plane/index.js +5 -1
- package/dist/platform/control-plane/invoke-input-validation.d.ts +1 -1
- package/dist/platform/control-plane/invoke-input-validation.js +1 -1
- package/dist/platform/control-plane/method-catalog-calendar.d.ts +2 -2
- package/dist/platform/control-plane/method-catalog-calendar.js +2 -2
- package/dist/platform/control-plane/method-catalog-channels.js +3 -3
- package/dist/platform/control-plane/method-catalog-control-automation.js +4 -4
- package/dist/platform/control-plane/method-catalog-control-companion.d.ts +1 -1
- package/dist/platform/control-plane/method-catalog-control-companion.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-control-companion.js +43 -0
- package/dist/platform/control-plane/method-catalog-control-core.js +3 -3
- package/dist/platform/control-plane/method-catalog-email.d.ts +1 -1
- package/dist/platform/control-plane/method-catalog-email.js +1 -1
- package/dist/platform/control-plane/method-catalog-fleet.d.ts +1 -1
- package/dist/platform/control-plane/method-catalog-push.d.ts +30 -0
- package/dist/platform/control-plane/method-catalog-push.d.ts.map +1 -0
- package/dist/platform/control-plane/method-catalog-push.js +80 -0
- package/dist/platform/control-plane/method-catalog-route-reconcile.d.ts +1 -1
- package/dist/platform/control-plane/method-catalog-runtime.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-runtime.js +177 -1
- package/dist/platform/control-plane/method-catalog.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog.js +2 -0
- package/dist/platform/control-plane/operator-contract-schemas-fleet.js +1 -1
- package/dist/platform/control-plane/operator-contract-schemas-runtime.d.ts +15 -0
- package/dist/platform/control-plane/operator-contract-schemas-runtime.d.ts.map +1 -1
- package/dist/platform/control-plane/operator-contract-schemas-runtime.js +81 -0
- package/dist/platform/control-plane/routes/checkpoints.d.ts +1 -1
- package/dist/platform/control-plane/routes/fleet.d.ts +2 -2
- package/dist/platform/control-plane/routes/fleet.js +1 -1
- package/dist/platform/control-plane/routes/gateway-verb-error.d.ts +1 -1
- package/dist/platform/control-plane/routes/gateway-verb-error.js +1 -1
- package/dist/platform/control-plane/routes/index.js +1 -1
- package/dist/platform/control-plane/routes/invocation-params.d.ts +1 -1
- package/dist/platform/control-plane/routes/push.d.ts +26 -0
- package/dist/platform/control-plane/routes/push.d.ts.map +1 -0
- package/dist/platform/control-plane/routes/push.js +104 -0
- package/dist/platform/control-plane/routes/register-gateway-verb-groups.d.ts +31 -0
- package/dist/platform/control-plane/routes/register-gateway-verb-groups.d.ts.map +1 -0
- package/dist/platform/control-plane/routes/register-gateway-verb-groups.js +16 -0
- package/dist/platform/control-plane/routes/register-w3-s2.d.ts +2 -2
- package/dist/platform/control-plane/routes/session-search.d.ts +4 -4
- package/dist/platform/control-plane/session-broker.d.ts +1 -1
- package/dist/platform/control-plane/session-broker.js +1 -1
- package/dist/platform/control-plane/session-store-importer.d.ts +1 -1
- package/dist/platform/control-plane/session-store-importer.js +1 -1
- package/dist/platform/control-plane/session-types.d.ts +1 -1
- package/dist/platform/core/orchestrator-runtime.d.ts +4 -4
- package/dist/platform/core/orchestrator-tool-runtime.d.ts +1 -1
- package/dist/platform/core/orchestrator-turn-loop.d.ts +6 -6
- package/dist/platform/core/orchestrator-turn-loop.d.ts.map +1 -1
- package/dist/platform/core/orchestrator-turn-loop.js +23 -22
- package/dist/platform/core/orchestrator.d.ts +10 -10
- package/dist/platform/core/orchestrator.d.ts.map +1 -1
- package/dist/platform/core/orchestrator.js +8 -8
- package/dist/platform/daemon/boot.d.ts +6 -0
- package/dist/platform/daemon/boot.d.ts.map +1 -1
- package/dist/platform/daemon/boot.js +1 -0
- package/dist/platform/daemon/control-plane.js +2 -2
- package/dist/platform/daemon/facade.d.ts +4 -7
- package/dist/platform/daemon/facade.d.ts.map +1 -1
- package/dist/platform/daemon/facade.js +5 -7
- package/dist/platform/daemon/http/router-session-broker-adapter.d.ts +1 -1
- package/dist/platform/daemon/http/router.d.ts +1 -0
- package/dist/platform/daemon/http/router.d.ts.map +1 -1
- package/dist/platform/daemon/http/router.js +36 -19
- package/dist/platform/daemon/http/runtime-route-types.d.ts +1 -1
- package/dist/platform/daemon/http/runtime-route-types.d.ts.map +1 -1
- package/dist/platform/daemon/http/webui-serving.d.ts +68 -0
- package/dist/platform/daemon/http/webui-serving.d.ts.map +1 -0
- package/dist/platform/daemon/http/webui-serving.js +230 -0
- package/dist/platform/knowledge/knowledge-api.d.ts +1 -1
- package/dist/platform/orchestration/budget.d.ts +2 -2
- package/dist/platform/orchestration/cancellation.d.ts +2 -2
- package/dist/platform/orchestration/controller-compat.d.ts +2 -3
- package/dist/platform/orchestration/controller-compat.d.ts.map +1 -1
- package/dist/platform/orchestration/dirty-guard.js +1 -1
- package/dist/platform/orchestration/engine.d.ts.map +1 -1
- package/dist/platform/orchestration/engine.js +3 -4
- package/dist/platform/orchestration/persistence.js +2 -2
- package/dist/platform/orchestration/phase-runner.d.ts +4 -4
- package/dist/platform/orchestration/scheduler.d.ts +1 -1
- package/dist/platform/orchestration/types.d.ts +3 -3
- package/dist/platform/presentation/glyphs.d.ts +1 -1
- package/dist/platform/presentation/glyphs.js +1 -1
- package/dist/platform/presentation/index.d.ts +3 -3
- package/dist/platform/presentation/index.js +3 -3
- package/dist/platform/presentation/thinking-phrases.d.ts +1 -1
- package/dist/platform/presentation/thinking-phrases.js +1 -1
- package/dist/platform/presentation/waiting-wording.d.ts +1 -1
- package/dist/platform/presentation/waiting-wording.js +1 -1
- package/dist/platform/push/delivery.d.ts +48 -0
- package/dist/platform/push/delivery.d.ts.map +1 -0
- package/dist/platform/push/delivery.js +117 -0
- package/dist/platform/push/encryption.d.ts +41 -0
- package/dist/platform/push/encryption.d.ts.map +1 -0
- package/dist/platform/push/encryption.js +82 -0
- package/dist/platform/push/index.d.ts +17 -0
- package/dist/platform/push/index.d.ts.map +1 -0
- package/dist/platform/push/index.js +10 -0
- package/dist/platform/push/service.d.ts +75 -0
- package/dist/platform/push/service.d.ts.map +1 -0
- package/dist/platform/push/service.js +95 -0
- package/dist/platform/push/subscription-store.d.ts +50 -0
- package/dist/platform/push/subscription-store.d.ts.map +1 -0
- package/dist/platform/push/subscription-store.js +123 -0
- package/dist/platform/push/types.d.ts +68 -0
- package/dist/platform/push/types.d.ts.map +1 -0
- package/dist/platform/push/types.js +13 -0
- package/dist/platform/push/vapid.d.ts +54 -0
- package/dist/platform/push/vapid.d.ts.map +1 -0
- package/dist/platform/push/vapid.js +113 -0
- package/dist/platform/runtime/feature-flags/flags.js +3 -3
- package/dist/platform/runtime/fleet/adapters/agent.d.ts +2 -2
- package/dist/platform/runtime/fleet/adapters/agent.d.ts.map +1 -1
- package/dist/platform/runtime/fleet/adapters/agent.js +4 -4
- package/dist/platform/runtime/fleet/adapters/automation.d.ts +1 -1
- package/dist/platform/runtime/fleet/adapters/automation.js +1 -1
- package/dist/platform/runtime/fleet/adapters/code-index.d.ts +1 -1
- package/dist/platform/runtime/fleet/adapters/code-index.js +1 -1
- package/dist/platform/runtime/fleet/adapters/orchestration.js +1 -1
- package/dist/platform/runtime/fleet/adapters/schedule.d.ts +4 -4
- package/dist/platform/runtime/fleet/adapters/schedule.js +4 -4
- package/dist/platform/runtime/fleet/adapters/trigger.d.ts +3 -4
- package/dist/platform/runtime/fleet/adapters/trigger.d.ts.map +1 -1
- package/dist/platform/runtime/fleet/adapters/trigger.js +3 -4
- package/dist/platform/runtime/fleet/adapters/wrfc.js +1 -1
- package/dist/platform/runtime/fleet/registry.d.ts +7 -7
- package/dist/platform/runtime/fleet/registry.d.ts.map +1 -1
- package/dist/platform/runtime/fleet/registry.js +3 -3
- package/dist/platform/runtime/fleet/types.d.ts +9 -9
- package/dist/platform/runtime/fleet/types.d.ts.map +1 -1
- package/dist/platform/runtime/memory-spine/client.d.ts +240 -0
- package/dist/platform/runtime/memory-spine/client.d.ts.map +1 -0
- package/dist/platform/runtime/memory-spine/client.js +221 -0
- package/dist/platform/runtime/memory-spine/index.d.ts +17 -0
- package/dist/platform/runtime/memory-spine/index.d.ts.map +1 -0
- package/dist/platform/runtime/memory-spine/index.js +16 -0
- package/dist/platform/runtime/memory-spine/recall-snapshot.d.ts +74 -0
- package/dist/platform/runtime/memory-spine/recall-snapshot.d.ts.map +1 -0
- package/dist/platform/runtime/memory-spine/recall-snapshot.js +74 -0
- package/dist/platform/runtime/operator-client.d.ts +1 -1
- package/dist/platform/runtime/services.d.ts +6 -6
- package/dist/platform/runtime/services.d.ts.map +1 -1
- package/dist/platform/runtime/services.js +9 -9
- package/dist/platform/runtime/session-spine/union-cache.d.ts +1 -1
- package/dist/platform/runtime/session-spine/union-cache.js +1 -1
- package/dist/platform/state/canonical-memory.d.ts +7 -7
- package/dist/platform/state/canonical-memory.js +8 -8
- package/dist/platform/state/code-index-chunking.js +1 -1
- package/dist/platform/state/code-index-db.d.ts +1 -1
- package/dist/platform/state/code-index-store.js +1 -1
- package/dist/platform/state/index.d.ts +2 -2
- package/dist/platform/state/index.d.ts.map +1 -1
- package/dist/platform/state/index.js +1 -1
- package/dist/platform/state/memory-recall-contract.d.ts +59 -4
- package/dist/platform/state/memory-recall-contract.d.ts.map +1 -1
- package/dist/platform/state/memory-recall-contract.js +79 -3
- package/dist/platform/state/memory-registry.d.ts +8 -0
- package/dist/platform/state/memory-registry.d.ts.map +1 -1
- package/dist/platform/state/memory-registry.js +10 -0
- package/dist/platform/state/memory-vector-store.js +1 -1
- package/dist/platform/state/sqlite-vec-loader.d.ts +1 -1
- package/dist/platform/state/sqlite-vec-loader.js +1 -1
- package/dist/platform/state/vibe-projection.d.ts +3 -3
- package/dist/platform/state/vibe-projection.js +3 -3
- package/dist/platform/tools/agent/manager.d.ts +10 -10
- package/dist/platform/tools/agent/manager.js +7 -7
- package/dist/platform/tools/exec/runtime.js +5 -5
- package/dist/platform/tools/exec/schema.d.ts +1 -1
- package/dist/platform/tools/exec/schema.d.ts.map +1 -1
- package/dist/platform/tools/fetch/runtime.d.ts +1 -1
- package/dist/platform/tools/registry.d.ts +1 -1
- package/dist/platform/tools/registry.js +1 -1
- package/dist/platform/types/tools.d.ts +1 -1
- package/dist/platform/utils/request-body.d.ts.map +1 -1
- package/dist/platform/utils/request-body.js +50 -5
- package/dist/platform/version.js +1 -1
- package/dist/platform/voice/index.d.ts +2 -0
- package/dist/platform/voice/index.d.ts.map +1 -1
- package/dist/platform/voice/index.js +3 -0
- package/dist/platform/voice/spoken-turn/audio-sink.d.ts +111 -0
- package/dist/platform/voice/spoken-turn/audio-sink.d.ts.map +1 -0
- package/dist/platform/voice/spoken-turn/audio-sink.js +1 -0
- package/dist/platform/voice/spoken-turn/controller.d.ts +117 -0
- package/dist/platform/voice/spoken-turn/controller.d.ts.map +1 -0
- package/dist/platform/voice/spoken-turn/controller.js +448 -0
- package/dist/platform/voice/spoken-turn/index.d.ts +16 -0
- package/dist/platform/voice/spoken-turn/index.d.ts.map +1 -0
- package/dist/platform/voice/spoken-turn/index.js +12 -0
- package/dist/platform/voice/spoken-turn/text-chunker.d.ts +33 -0
- package/dist/platform/voice/spoken-turn/text-chunker.d.ts.map +1 -0
- package/dist/platform/voice/spoken-turn/text-chunker.js +97 -0
- package/package.json +13 -9
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export type CommunicationKind = 'directive' | 'status' | 'question' | 'finding' | 'review' | 'handoff' | 'escalation' | 'completion'
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Steering (see CHANGELOG 0.38.0): an operator (human)-originated message queued for a
|
|
8
8
|
* live in-process agent via `ProcessRegistry.steer()`. Framed verbatim as
|
|
9
9
|
* a user turn at the drain site (orchestrator-runner.ts), not wrapped in
|
|
10
10
|
* the `[Kind from sender]` inter-agent directive framing.
|
|
@@ -28,7 +28,7 @@ export interface AgentOrchestratorRunContext {
|
|
|
28
28
|
readonly emitOrchestrationCompleted: (record: AgentRecord, output: string) => void;
|
|
29
29
|
readonly emitStreamDelta: (recordId: string, content: string, accumulated: string) => void;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* Conversation-snapshot bridge (Part C6): register the running
|
|
32
32
|
* agent's live snapshot accessor with AgentManager so
|
|
33
33
|
* AgentManager.getConversationSnapshot(agentId) can serve a full-fidelity
|
|
34
34
|
* live transcript to a fleet tab. Optional — contexts that don't wire a
|
|
@@ -42,7 +42,7 @@ export interface AgentOrchestratorRunContext {
|
|
|
42
42
|
*/
|
|
43
43
|
readonly releaseConversationSource?: ((agentId: string) => void) | undefined;
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* Cooperative cancellation bridge: look up the AbortSignal
|
|
46
46
|
* an orchestration-engine work item registered for this agent, if any.
|
|
47
47
|
* Threaded into `toolRegistry.execute` opts so opted-in tools (exec,
|
|
48
48
|
* fetch) can abort an in-flight child process/request the instant
|
|
@@ -57,7 +57,7 @@ export interface AgentOrchestratorRunContext {
|
|
|
57
57
|
readonly knowledgeService?: Pick<KnowledgeService, 'buildPromptPacketSync'> | undefined;
|
|
58
58
|
readonly memoryRegistry?: Pick<import('../state/index.js').MemoryRegistry, 'getAll' | 'searchSemantic' | 'vectorStats'> | undefined;
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
60
|
+
* Stage B — repo code index for per-turn code injection in a spawned agent run.
|
|
61
61
|
* Undefined is a hard no-op. Actual injection additionally requires the
|
|
62
62
|
* `agent-passive-code-injection` flag (DEFAULT OFF) and `isCodeInjectionSettingEnabled`.
|
|
63
63
|
*/
|
|
@@ -65,12 +65,12 @@ export interface AgentOrchestratorRunContext {
|
|
|
65
65
|
/** Live gate for the embedder's storage.codeIndexEnabled setting. Undefined defaults to allowed. */
|
|
66
66
|
readonly isCodeInjectionSettingEnabled?: (() => boolean) | undefined;
|
|
67
67
|
/**
|
|
68
|
-
*
|
|
68
|
+
* Stage B — called once per executed tool (toolName, args, success) so a code-index
|
|
69
69
|
* reindex scheduler can debounce an incremental reindex of touched files. Never awaited.
|
|
70
70
|
*/
|
|
71
71
|
readonly onToolExecuted?: ((toolName: string, args: Record<string, unknown>, success: boolean) => void) | undefined;
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
73
|
+
* Per-turn passive-injection knobs (see CHANGELOG 0.38.0). Both optional —
|
|
74
74
|
* undefined means "use the derived default" (see turn-knowledge-injection.ts:
|
|
75
75
|
* defaultTurnKnowledgeBudgetTokens / DEFAULT_TURN_KNOWLEDGE_RELEVANCE_FLOOR).
|
|
76
76
|
* Setting passiveKnowledgeInjectionBudgetTokens to 0 is the config-level
|
|
@@ -301,7 +301,7 @@ export async function runAgentTask(context, record) {
|
|
|
301
301
|
: 0;
|
|
302
302
|
conversation = new ConversationManager();
|
|
303
303
|
conversation.addUserMessage(record.task);
|
|
304
|
-
//
|
|
304
|
+
// Conversation-snapshot bridge (Part C6): hand AgentManager a live accessor onto THIS
|
|
305
305
|
// ConversationManager instance so a fleet tab can render a full-fidelity
|
|
306
306
|
// transcript while the agent runs. `activeConversation` is a separate
|
|
307
307
|
// const (rather than closing over the outer `let conversation`) so the
|
|
@@ -309,7 +309,7 @@ export async function runAgentTask(context, record) {
|
|
|
309
309
|
const activeConversation = conversation;
|
|
310
310
|
context.registerConversationSource?.(record.id, () => activeConversation.getMessageSnapshot());
|
|
311
311
|
let systemPrompt = buildOrchestratorSystemPrompt(record, undefined, context);
|
|
312
|
-
//
|
|
312
|
+
// Per-turn passive-injection state (see CHANGELOG 0.38.0). `knowledgeIdsAlreadySurfaced`
|
|
313
313
|
// seeds from the spawn-time baseline (record.knowledgeInjections, just populated by the
|
|
314
314
|
// call above) and grows with every id a later turn injects, so no record is ever listed
|
|
315
315
|
// twice across the whole run. `priorTurnKnowledgeBlock` is the last successfully-built
|
|
@@ -368,7 +368,7 @@ export async function runAgentTask(context, record) {
|
|
|
368
368
|
// signal below — deferred until the turn's chat call actually succeeds.
|
|
369
369
|
// See the comment at the emission site for why this can't fire here.
|
|
370
370
|
const drainedSteerMessageIds = [];
|
|
371
|
-
//
|
|
371
|
+
// True when this turn actually added new content to the
|
|
372
372
|
// conversation the model will see — turn 1 (the initial task) or any steer/directive
|
|
373
373
|
// drained just above. Gates per-turn knowledge re-retrieval: no new input means the
|
|
374
374
|
// evolving-conversation query would be identical to last turn's, so the prior turn's
|
|
@@ -409,7 +409,7 @@ export async function runAgentTask(context, record) {
|
|
|
409
409
|
if (contextWindowAwarenessEnabled) {
|
|
410
410
|
systemPrompt = applyContextWindowAwareness(context, record, activeRoute.modelId, contextWindowForTurn, conversation, systemPrompt, toolTokens, turn);
|
|
411
411
|
}
|
|
412
|
-
//
|
|
412
|
+
// Per-turn passive knowledge injection. Gated on the feature
|
|
413
413
|
// flag AND on there being new conversation input this turn; otherwise
|
|
414
414
|
// priorTurnKnowledgeBlock (unchanged) is reused. `priorTurnKnowledgeBlock` and
|
|
415
415
|
// `systemPrompt` are combined into a request-time-only string just below
|
|
@@ -464,7 +464,7 @@ export async function runAgentTask(context, record) {
|
|
|
464
464
|
priorTurnKnowledgeBlock = null;
|
|
465
465
|
}
|
|
466
466
|
}
|
|
467
|
-
//
|
|
467
|
+
// Compose the per-turn knowledge block onto the base
|
|
468
468
|
// systemPrompt fresh at EVERY call site (including each chat-retry iteration below),
|
|
469
469
|
// instead of hoisting a single `const turnSystemPrompt` computed once before the
|
|
470
470
|
// retry loop. This matters because the emergency-compaction retry path inside that
|
|
@@ -696,7 +696,7 @@ export async function runAgentTask(context, record) {
|
|
|
696
696
|
await handleAgentRunFailure(context, record, conversation, session, preAgentProcessIds, err);
|
|
697
697
|
}
|
|
698
698
|
finally {
|
|
699
|
-
//
|
|
699
|
+
// Conversation-snapshot bridge (Part C6): release on EVERY exit path (normal completion,
|
|
700
700
|
// the mid-loop cancellation/MAX_TURNS early returns above, and the catch
|
|
701
701
|
// above) so the live source is never retained past the run and a final
|
|
702
702
|
// snapshot always lands in AgentManager's retention ring. A no-op when
|
|
@@ -12,7 +12,7 @@ import type { FeatureFlagManager } from '../runtime/feature-flags/manager.js';
|
|
|
12
12
|
import type { RuntimeEventBus } from '../runtime/events/index.js';
|
|
13
13
|
export { summarizeToolArgs } from './orchestrator-utils.js';
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Conversation-snapshot bridge (Part C6): where AgentOrchestrator forwards a running agent's
|
|
16
16
|
* live conversation-snapshot accessor. In production this is AgentManager's
|
|
17
17
|
* registerConversationSource/releaseConversationSource, wired post-
|
|
18
18
|
* construction in runtime/services.ts (AgentOrchestrator is constructed
|
|
@@ -24,7 +24,7 @@ export interface AgentConversationSink {
|
|
|
24
24
|
readonly release: (agentId: string) => void;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Cooperative cancellation bridge: where AgentOrchestrator
|
|
28
28
|
* looks up a per-agent AbortSignal registered by an orchestration engine's
|
|
29
29
|
* work-item run. Same shape/wiring precedent as AgentConversationSink — a
|
|
30
30
|
* setter rather than a constructor dependency, wired post-construction in
|
|
@@ -98,14 +98,14 @@ export declare class AgentOrchestrator {
|
|
|
98
98
|
/** Set the FeatureFlagManager for context-window awareness gating. */
|
|
99
99
|
setFeatureFlagManager(manager: FeatureFlagManager): void;
|
|
100
100
|
/**
|
|
101
|
-
* Wire the
|
|
101
|
+
* Wire the conversation-snapshot bridge (Part C6; see
|
|
102
102
|
* AgentConversationSink). Pass null to detach — createRunContext() then
|
|
103
103
|
* omits the register/release callbacks entirely and orchestrator-runner's
|
|
104
104
|
* `?.()` calls become no-ops.
|
|
105
105
|
*/
|
|
106
106
|
setConversationSink(sink: AgentConversationSink | null): void;
|
|
107
107
|
/**
|
|
108
|
-
* Wire the
|
|
108
|
+
* Wire the cancellation bridge (see AgentCancellationSource). Pass
|
|
109
109
|
* null to detach — createRunContext() then omits getCancellationSignal
|
|
110
110
|
* entirely and orchestrator-runner's `?.()` call becomes a no-op, so every
|
|
111
111
|
* tool call runs with `opts` undefined exactly as before this change.
|
|
@@ -51,7 +51,7 @@ export class AgentOrchestrator {
|
|
|
51
51
|
this.featureFlagManager = manager;
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
54
|
-
* Wire the
|
|
54
|
+
* Wire the conversation-snapshot bridge (Part C6; see
|
|
55
55
|
* AgentConversationSink). Pass null to detach — createRunContext() then
|
|
56
56
|
* omits the register/release callbacks entirely and orchestrator-runner's
|
|
57
57
|
* `?.()` calls become no-ops.
|
|
@@ -60,7 +60,7 @@ export class AgentOrchestrator {
|
|
|
60
60
|
this.conversationSink = sink;
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
|
-
* Wire the
|
|
63
|
+
* Wire the cancellation bridge (see AgentCancellationSource). Pass
|
|
64
64
|
* null to detach — createRunContext() then omits getCancellationSignal
|
|
65
65
|
* entirely and orchestrator-runner's `?.()` call becomes a no-op, so every
|
|
66
66
|
* tool call runs with `opts` undefined exactly as before this change.
|
|
@@ -97,7 +97,7 @@ export declare class WrfcController {
|
|
|
97
97
|
*/
|
|
98
98
|
importChain(chain: WrfcChain, force?: boolean): boolean;
|
|
99
99
|
/**
|
|
100
|
-
* Item d5 (
|
|
100
|
+
* Item d5 (see CHANGELOG 0.38.0): resurrection-safe zombie check for a chain about
|
|
101
101
|
* to be imported at rehydrate. A non-terminal chain whose ENTIRE roster
|
|
102
102
|
* (allAgentIds) is absent from THIS process's live AgentManager never
|
|
103
103
|
* survived the restart — no in-process execution is coming back to finish
|
|
@@ -316,7 +316,7 @@ export class WrfcController {
|
|
|
316
316
|
return true;
|
|
317
317
|
}
|
|
318
318
|
/**
|
|
319
|
-
* Item d5 (
|
|
319
|
+
* Item d5 (see CHANGELOG 0.38.0): resurrection-safe zombie check for a chain about
|
|
320
320
|
* to be imported at rehydrate. A non-terminal chain whose ENTIRE roster
|
|
321
321
|
* (allAgentIds) is absent from THIS process's live AgentManager never
|
|
322
322
|
* survived the restart — no in-process execution is coming back to finish
|
|
@@ -2204,8 +2204,8 @@ export class WrfcController {
|
|
|
2204
2204
|
// default forever unless rolled up here from the real numbers its phase
|
|
2205
2205
|
// agents accumulated. This is what makes AgentManager.getStatus()/list()
|
|
2206
2206
|
// — the read path TUI per-agent surfaces actually use — return real data
|
|
2207
|
-
// for the owner instead of the never-updated zeros (
|
|
2208
|
-
// AGENT_COMPLETED.usage forwarding but nothing populated the source).
|
|
2207
|
+
// for the owner instead of the never-updated zeros (a previous fix wired
|
|
2208
|
+
// the AGENT_COMPLETED.usage forwarding but nothing populated the source).
|
|
2209
2209
|
owner.usage = this.aggregateChainUsage(chain);
|
|
2210
2210
|
owner.toolCallCount = this.aggregateChainToolCallCount(chain);
|
|
2211
2211
|
chain.ownerTerminalEmitted = true;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @pellux/goodvibes-sdk/platform/calendar
|
|
3
3
|
*
|
|
4
4
|
* External-calendar READ connectivity — the SDK machinery behind the agent's
|
|
5
|
-
* `/calendar import`, `/calendar subscribe`, and the connect wizard (
|
|
6
|
-
*
|
|
5
|
+
* `/calendar import`, `/calendar subscribe`, and the connect wizard (see
|
|
6
|
+
* CHANGELOG 1.0.0, A9). Two pieces, both honest by construction:
|
|
7
7
|
*
|
|
8
8
|
* - A vendored iCalendar (RFC 5545) reader: `parseIcs` turns .ics text (a file body
|
|
9
9
|
* or a fetched feed) into typed events, and `expandEvent` expands the honest RRULE
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @pellux/goodvibes-sdk/platform/calendar
|
|
3
3
|
*
|
|
4
4
|
* External-calendar READ connectivity — the SDK machinery behind the agent's
|
|
5
|
-
* `/calendar import`, `/calendar subscribe`, and the connect wizard (
|
|
6
|
-
*
|
|
5
|
+
* `/calendar import`, `/calendar subscribe`, and the connect wizard (see
|
|
6
|
+
* CHANGELOG 1.0.0, A9). Two pieces, both honest by construction:
|
|
7
7
|
*
|
|
8
8
|
* - A vendored iCalendar (RFC 5545) reader: `parseIcs` turns .ics text (a file body
|
|
9
9
|
* or a fetched feed) into typed events, and `expandEvent` expands the honest RRULE
|
|
@@ -29,7 +29,7 @@ export { describeRecurrence, expandEvent } from './rrule.js';
|
|
|
29
29
|
export { SubscriptionStore, maskFeedUrl, DEFAULT_REFRESH_INTERVAL_MS, MIN_REFRESH_INTERVAL_MS, MAX_REFRESH_INTERVAL_MS, } from './subscription-store.js';
|
|
30
30
|
// ---------------------------------------------------------------------------
|
|
31
31
|
// Authenticated provider connectivity — Google Calendar API v3 + Microsoft Graph
|
|
32
|
-
// over OAuth 2.0 (
|
|
32
|
+
// over OAuth 2.0 (see CHANGELOG 1.0.0, A10). This half connects to real accounts;
|
|
33
33
|
// A9's half above reads .ics files and feeds. Both normalize into ONE merged event
|
|
34
34
|
// model (see MergedCalendarEvent) that a unified /calendar view renders source-
|
|
35
35
|
// labeled (google-api / microsoft-graph / ics-feed / local).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* oauth-providers.ts — the fixed provider profiles for Google Calendar and
|
|
3
3
|
* Microsoft Outlook (Graph), plus client-config resolution.
|
|
4
4
|
*
|
|
5
|
-
* Design (
|
|
5
|
+
* Design (see CHANGELOG 1.0.0, A10, per Mike's least-friction rule): the DEFAULT
|
|
6
6
|
* experience uses a bundled project-level client id (rclone/gh pattern). A native-
|
|
7
7
|
* app / public-client id is not a secret (RFC 8252), so paired with PKCE no client
|
|
8
8
|
* secret is needed. Power users MAY override with their own client id (+ secret for
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* oauth-providers.ts — the fixed provider profiles for Google Calendar and
|
|
3
3
|
* Microsoft Outlook (Graph), plus client-config resolution.
|
|
4
4
|
*
|
|
5
|
-
* Design (
|
|
5
|
+
* Design (see CHANGELOG 1.0.0, A10, per Mike's least-friction rule): the DEFAULT
|
|
6
6
|
* experience uses a bundled project-level client id (rclone/gh pattern). A native-
|
|
7
7
|
* app / public-client id is not a secret (RFC 8252), so paired with PKCE no client
|
|
8
8
|
* secret is needed. Power users MAY override with their own client id (+ secret for
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* oauth-types.ts — the shared type surface for the calendar OAuth + API connector
|
|
3
|
-
* layer (
|
|
3
|
+
* layer (see CHANGELOG 1.0.0, A10). Sits alongside A9's .ics reader/subscription
|
|
4
4
|
* store in the same module: A9 owns file/feed reading; this half owns authenticated
|
|
5
5
|
* provider connectivity (Google Calendar API v3, Microsoft Graph) over OAuth 2.0.
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* oauth-types.ts — the shared type surface for the calendar OAuth + API connector
|
|
3
|
-
* layer (
|
|
3
|
+
* layer (see CHANGELOG 1.0.0, A10). Sits alongside A9's .ics reader/subscription
|
|
4
4
|
* store in the same module: A9 owns file/feed reading; this half owns authenticated
|
|
5
5
|
* provider connectivity (Google Calendar API v3, Microsoft Graph) over OAuth 2.0.
|
|
6
6
|
*
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* companion-chat-branching.ts
|
|
3
|
+
*
|
|
4
|
+
* The honest-lineage core for the two conversation-forking operations the chat
|
|
5
|
+
* web UI needs: regenerate a response, and edit an earlier message and branch
|
|
6
|
+
* from it. Split out of companion-chat-manager.ts (see CHANGELOG) so the manager
|
|
7
|
+
* stays under the hand-authored file-size cap.
|
|
8
|
+
*
|
|
9
|
+
* THE HONESTY CONTRACT (this is the whole point of the module):
|
|
10
|
+
* neither operation ever deletes or overwrites message history. A regenerate or
|
|
11
|
+
* an edit marks the affected messages as SUPERSEDED — they stay in the message
|
|
12
|
+
* list and on disk, flagged with `supersededAt`/`supersededReason` — and then a
|
|
13
|
+
* fresh turn runs from the fork point. The "active" conversation is the chain of
|
|
14
|
+
* messages WITHOUT a `supersededAt`; everything behind a fork remains
|
|
15
|
+
* retrievable. Nothing is silently lost, mirroring the delete-means-delete
|
|
16
|
+
* discipline: a regenerate is a new turn, an edit is a new branch, and the old
|
|
17
|
+
* branch is kept as visible history rather than thrown away.
|
|
18
|
+
*
|
|
19
|
+
* These functions mutate the passed session's `messages` array in place and
|
|
20
|
+
* return a plan; the caller (the manager) is responsible for rebuilding the
|
|
21
|
+
* LLM-facing conversation from the active chain, persisting, and running the new
|
|
22
|
+
* turn. Errors are thrown with `{ code, status }` so the route layer maps them
|
|
23
|
+
* to honest machine codes.
|
|
24
|
+
*/
|
|
25
|
+
import type { CompanionChatMessage, EditCompanionChatMessageInput } from './companion-chat-types.js';
|
|
26
|
+
import { type CompanionChatArtifactStore } from './companion-chat-attachments.js';
|
|
27
|
+
/** The mutable session shape these helpers operate on (subset of the manager's InternalSession). */
|
|
28
|
+
export interface BranchingSession {
|
|
29
|
+
messages: CompanionChatMessage[];
|
|
30
|
+
lastActivityAt: number;
|
|
31
|
+
}
|
|
32
|
+
/** The active (non-superseded) messages, in order — the live conversation chain. */
|
|
33
|
+
export declare function activeMessages(messages: readonly CompanionChatMessage[]): CompanionChatMessage[];
|
|
34
|
+
export interface RegeneratePlan {
|
|
35
|
+
readonly regeneratedFrom: string;
|
|
36
|
+
readonly supersededMessageIds: readonly string[];
|
|
37
|
+
/** The user message the re-run turn is anchored on. */
|
|
38
|
+
readonly anchorUserMessageId: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Plan a regenerate: pick the target assistant message (an explicit id, or the
|
|
42
|
+
* latest active assistant message), supersede it and everything after it, and
|
|
43
|
+
* return the preceding active user message as the anchor for the new turn.
|
|
44
|
+
*
|
|
45
|
+
* Throws when the session has no assistant message to regenerate, when an
|
|
46
|
+
* explicit id is unknown or is not an active assistant message, or when there is
|
|
47
|
+
* no user message preceding the target to re-run from.
|
|
48
|
+
*/
|
|
49
|
+
export declare function planRegenerate(session: BranchingSession, targetMessageId: string | undefined, now: number): RegeneratePlan;
|
|
50
|
+
export interface EditBranchPlan {
|
|
51
|
+
readonly editedFrom: string;
|
|
52
|
+
readonly newMessageId: string;
|
|
53
|
+
readonly supersededMessageIds: readonly string[];
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Apply an edit-and-branch: the target must be an active user message. It and
|
|
57
|
+
* everything after it are superseded (retained), then a new user message with
|
|
58
|
+
* the edited content — carrying `revisionOf` back to the original — is appended.
|
|
59
|
+
* The caller then rebuilds the conversation from the active chain and runs a
|
|
60
|
+
* turn.
|
|
61
|
+
*
|
|
62
|
+
* Throws when the target id is unknown, is not a user message, is already
|
|
63
|
+
* superseded history, or the edited message has neither content nor attachments.
|
|
64
|
+
*/
|
|
65
|
+
export declare function applyEditBranch(session: BranchingSession, sessionId: string, input: EditCompanionChatMessageInput, artifactStore: CompanionChatArtifactStore | null, now: number): EditBranchPlan;
|
|
66
|
+
//# sourceMappingURL=companion-chat-branching.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"companion-chat-branching.d.ts","sourceRoot":"","sources":["../../../src/platform/companion/companion-chat-branching.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,KAAK,EACV,oBAAoB,EAEpB,6BAA6B,EAC9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,iCAAiC,CAAC;AAEzC,oGAAoG;AACpG,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,oBAAoB,EAAE,CAAC;IACjC,cAAc,EAAE,MAAM,CAAC;CACxB;AAwBD,oFAAoF;AACpF,wBAAgB,cAAc,CAAC,QAAQ,EAAE,SAAS,oBAAoB,EAAE,GAAG,oBAAoB,EAAE,CAEhG;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,oBAAoB,EAAE,SAAS,MAAM,EAAE,CAAC;IACjD,uDAAuD;IACvD,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;CACtC;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,gBAAgB,EACzB,eAAe,EAAE,MAAM,GAAG,SAAS,EACnC,GAAG,EAAE,MAAM,GACV,cAAc,CA4DhB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,oBAAoB,EAAE,SAAS,MAAM,EAAE,CAAC;CAClD;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,gBAAgB,EACzB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,6BAA6B,EACpC,aAAa,EAAE,0BAA0B,GAAG,IAAI,EAChD,GAAG,EAAE,MAAM,GACV,cAAc,CAwChB"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* companion-chat-branching.ts
|
|
3
|
+
*
|
|
4
|
+
* The honest-lineage core for the two conversation-forking operations the chat
|
|
5
|
+
* web UI needs: regenerate a response, and edit an earlier message and branch
|
|
6
|
+
* from it. Split out of companion-chat-manager.ts (see CHANGELOG) so the manager
|
|
7
|
+
* stays under the hand-authored file-size cap.
|
|
8
|
+
*
|
|
9
|
+
* THE HONESTY CONTRACT (this is the whole point of the module):
|
|
10
|
+
* neither operation ever deletes or overwrites message history. A regenerate or
|
|
11
|
+
* an edit marks the affected messages as SUPERSEDED — they stay in the message
|
|
12
|
+
* list and on disk, flagged with `supersededAt`/`supersededReason` — and then a
|
|
13
|
+
* fresh turn runs from the fork point. The "active" conversation is the chain of
|
|
14
|
+
* messages WITHOUT a `supersededAt`; everything behind a fork remains
|
|
15
|
+
* retrievable. Nothing is silently lost, mirroring the delete-means-delete
|
|
16
|
+
* discipline: a regenerate is a new turn, an edit is a new branch, and the old
|
|
17
|
+
* branch is kept as visible history rather than thrown away.
|
|
18
|
+
*
|
|
19
|
+
* These functions mutate the passed session's `messages` array in place and
|
|
20
|
+
* return a plan; the caller (the manager) is responsible for rebuilding the
|
|
21
|
+
* LLM-facing conversation from the active chain, persisting, and running the new
|
|
22
|
+
* turn. Errors are thrown with `{ code, status }` so the route layer maps them
|
|
23
|
+
* to honest machine codes.
|
|
24
|
+
*/
|
|
25
|
+
import { randomUUID } from 'node:crypto';
|
|
26
|
+
import { resolveAttachments, } from './companion-chat-attachments.js';
|
|
27
|
+
/** Build a `{ code, status }`-carrying error the route layer turns into a machine code. */
|
|
28
|
+
function branchError(message, code, status) {
|
|
29
|
+
return Object.assign(new Error(message), { code, status });
|
|
30
|
+
}
|
|
31
|
+
/** Mark messages[fromIndex..] as superseded in place, returning the ids touched. */
|
|
32
|
+
function supersedeFrom(session, fromIndex, reason, now) {
|
|
33
|
+
const superseded = [];
|
|
34
|
+
for (let i = fromIndex; i < session.messages.length; i++) {
|
|
35
|
+
const msg = session.messages[i];
|
|
36
|
+
if (msg.supersededAt !== undefined)
|
|
37
|
+
continue; // already retained history — leave as-is
|
|
38
|
+
session.messages[i] = { ...msg, supersededAt: now, supersededReason: reason };
|
|
39
|
+
superseded.push(msg.id);
|
|
40
|
+
}
|
|
41
|
+
return superseded;
|
|
42
|
+
}
|
|
43
|
+
/** The active (non-superseded) messages, in order — the live conversation chain. */
|
|
44
|
+
export function activeMessages(messages) {
|
|
45
|
+
return messages.filter((m) => m.supersededAt === undefined);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Plan a regenerate: pick the target assistant message (an explicit id, or the
|
|
49
|
+
* latest active assistant message), supersede it and everything after it, and
|
|
50
|
+
* return the preceding active user message as the anchor for the new turn.
|
|
51
|
+
*
|
|
52
|
+
* Throws when the session has no assistant message to regenerate, when an
|
|
53
|
+
* explicit id is unknown or is not an active assistant message, or when there is
|
|
54
|
+
* no user message preceding the target to re-run from.
|
|
55
|
+
*/
|
|
56
|
+
export function planRegenerate(session, targetMessageId, now) {
|
|
57
|
+
const messages = session.messages;
|
|
58
|
+
let targetIndex;
|
|
59
|
+
if (targetMessageId !== undefined) {
|
|
60
|
+
targetIndex = messages.findIndex((m) => m.id === targetMessageId);
|
|
61
|
+
if (targetIndex === -1) {
|
|
62
|
+
throw branchError(`Message not found: ${targetMessageId}`, 'MESSAGE_NOT_FOUND', 404);
|
|
63
|
+
}
|
|
64
|
+
const target = messages[targetIndex];
|
|
65
|
+
if (target.supersededAt !== undefined) {
|
|
66
|
+
throw branchError('That message is already superseded history; regenerate the active response instead.', 'MESSAGE_SUPERSEDED', 409);
|
|
67
|
+
}
|
|
68
|
+
if (target.role !== 'assistant') {
|
|
69
|
+
throw branchError('Only an assistant message can be regenerated; edit a user message to branch instead.', 'NOT_AN_ASSISTANT_MESSAGE', 400);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
targetIndex = -1;
|
|
74
|
+
for (let i = messages.length - 1; i >= 0; i--) {
|
|
75
|
+
const m = messages[i];
|
|
76
|
+
if (m.supersededAt === undefined && m.role === 'assistant') {
|
|
77
|
+
targetIndex = i;
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
if (targetIndex === -1) {
|
|
82
|
+
throw branchError('No assistant response to regenerate.', 'NO_ASSISTANT_MESSAGE', 409);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
const regeneratedFrom = messages[targetIndex].id;
|
|
86
|
+
// The anchor is the nearest active user message before the target assistant.
|
|
87
|
+
let anchorUserMessageId = null;
|
|
88
|
+
for (let i = targetIndex - 1; i >= 0; i--) {
|
|
89
|
+
const m = messages[i];
|
|
90
|
+
if (m.supersededAt === undefined && m.role === 'user') {
|
|
91
|
+
anchorUserMessageId = m.id;
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
if (anchorUserMessageId === null) {
|
|
96
|
+
throw branchError('No user message precedes that response to regenerate from.', 'NO_ANCHOR_MESSAGE', 409);
|
|
97
|
+
}
|
|
98
|
+
const supersededMessageIds = supersedeFrom(session, targetIndex, 'regenerate', now);
|
|
99
|
+
session.lastActivityAt = now;
|
|
100
|
+
return { regeneratedFrom, supersededMessageIds, anchorUserMessageId };
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Apply an edit-and-branch: the target must be an active user message. It and
|
|
104
|
+
* everything after it are superseded (retained), then a new user message with
|
|
105
|
+
* the edited content — carrying `revisionOf` back to the original — is appended.
|
|
106
|
+
* The caller then rebuilds the conversation from the active chain and runs a
|
|
107
|
+
* turn.
|
|
108
|
+
*
|
|
109
|
+
* Throws when the target id is unknown, is not a user message, is already
|
|
110
|
+
* superseded history, or the edited message has neither content nor attachments.
|
|
111
|
+
*/
|
|
112
|
+
export function applyEditBranch(session, sessionId, input, artifactStore, now) {
|
|
113
|
+
const attachments = resolveAttachments(input.attachments ?? [], artifactStore);
|
|
114
|
+
if (!input.content.trim() && attachments.length === 0) {
|
|
115
|
+
throw branchError('content or attachments are required', 'INVALID_INPUT', 400);
|
|
116
|
+
}
|
|
117
|
+
const targetIndex = session.messages.findIndex((m) => m.id === input.messageId);
|
|
118
|
+
if (targetIndex === -1) {
|
|
119
|
+
throw branchError(`Message not found: ${input.messageId}`, 'MESSAGE_NOT_FOUND', 404);
|
|
120
|
+
}
|
|
121
|
+
const target = session.messages[targetIndex];
|
|
122
|
+
if (target.supersededAt !== undefined) {
|
|
123
|
+
throw branchError('That message is already superseded history; edit the active message instead.', 'MESSAGE_SUPERSEDED', 409);
|
|
124
|
+
}
|
|
125
|
+
if (target.role !== 'user') {
|
|
126
|
+
throw branchError('Only a user message can be edited and branched from.', 'NOT_A_USER_MESSAGE', 400);
|
|
127
|
+
}
|
|
128
|
+
const supersededMessageIds = supersedeFrom(session, targetIndex, 'edit', now);
|
|
129
|
+
const replacement = {
|
|
130
|
+
id: randomUUID(),
|
|
131
|
+
sessionId,
|
|
132
|
+
role: 'user',
|
|
133
|
+
content: input.content,
|
|
134
|
+
attachments,
|
|
135
|
+
...(input.metadata !== undefined ? { metadata: input.metadata } : {}),
|
|
136
|
+
createdAt: now,
|
|
137
|
+
revisionOf: input.messageId,
|
|
138
|
+
};
|
|
139
|
+
session.messages.push(replacement);
|
|
140
|
+
session.lastActivityAt = now;
|
|
141
|
+
return { editedFrom: input.messageId, newMessageId: replacement.id, supersededMessageIds };
|
|
142
|
+
}
|
|
@@ -34,7 +34,7 @@ export interface CompanionBrokerRegisterInput {
|
|
|
34
34
|
export interface CompanionSessionBrokerBridge {
|
|
35
35
|
register(input: CompanionBrokerRegisterInput): Promise<unknown>;
|
|
36
36
|
closeSession(sessionId: string): Promise<unknown>;
|
|
37
|
-
/** Hard-remove the mirrored shared-session record (
|
|
37
|
+
/** Hard-remove the mirrored shared-session record (see CHANGELOG 1.0.0: companion delete is a real removal, not a close). */
|
|
38
38
|
deleteSession(sessionId: string): Promise<unknown>;
|
|
39
39
|
}
|
|
40
40
|
//# sourceMappingURL=companion-chat-broker-bridge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companion-chat-broker-bridge.d.ts","sourceRoot":"","sources":["../../../src/platform/companion/companion-chat-broker-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,wEAAwE;AACxE,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,4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;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,KAAK,EAAE,4BAA4B,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAChE,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAClD,6HAA6H;IAC7H,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACpD"}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* companion HTTP routes can await in-flight ops before responding
|
|
9
9
|
* (deterministic for tests).
|
|
10
10
|
*
|
|
11
|
-
* Split out of CompanionChatManager (
|
|
11
|
+
* Split out of CompanionChatManager (see CHANGELOG 1.0.0) to stay under the repo's
|
|
12
12
|
* grandfathered line-cap ceiling (see scripts/check-line-cap.ts) — a pure
|
|
13
13
|
* file-organization move, not a behavior change: same chaining, same
|
|
14
14
|
* best-effort swallow-and-log-on-failure semantics.
|
|
@@ -32,7 +32,7 @@ export declare class CompanionBrokerSync {
|
|
|
32
32
|
track(sessionId: string, run: () => Promise<void>): void;
|
|
33
33
|
registerSession(meta: CompanionChatSession): Promise<void>;
|
|
34
34
|
closeSession(sessionId: string): Promise<void>;
|
|
35
|
-
/** Hard-remove the mirrored shared-session record (
|
|
35
|
+
/** Hard-remove the mirrored shared-session record (see CHANGELOG 1.0.0: companion delete is a real removal). */
|
|
36
36
|
deleteSession(sessionId: string): Promise<void>;
|
|
37
37
|
}
|
|
38
38
|
//# sourceMappingURL=companion-chat-broker-sync.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companion-chat-broker-sync.d.ts","sourceRoot":"","sources":["../../../src/platform/companion/companion-chat-broker-sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC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AAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAYtD"}
|
|
@@ -62,7 +62,7 @@ export class CompanionBrokerSync {
|
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
/** Hard-remove the mirrored shared-session record (
|
|
65
|
+
/** Hard-remove the mirrored shared-session record (see CHANGELOG 1.0.0: companion delete is a real removal). */
|
|
66
66
|
async deleteSession(sessionId) {
|
|
67
67
|
const broker = this.broker;
|
|
68
68
|
if (!broker)
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* - A GC sweep closes sessions that have been idle beyond the TTL.
|
|
21
21
|
*/
|
|
22
22
|
import type { ProviderMessage } from '../providers/interface.js';
|
|
23
|
-
import type { CompanionChatMessageAttachmentInput, CompanionChatMessage, CompanionChatSession, CreateCompanionChatSessionInput, UpdateCompanionChatSessionInput } from './companion-chat-types.js';
|
|
23
|
+
import type { CompanionChatMessageAttachmentInput, CompanionChatMessage, CompanionChatSession, CreateCompanionChatSessionInput, EditCompanionChatMessageInput, EditCompanionChatMessageOutput, RegenerateCompanionChatMessageInput, RegenerateCompanionChatMessageOutput, UpdateCompanionChatSessionInput } from './companion-chat-types.js';
|
|
24
24
|
import { type CompanionChatArtifactStore } from './companion-chat-attachments.js';
|
|
25
25
|
import type { CompanionSessionBrokerBridge } from './companion-chat-broker-bridge.js';
|
|
26
26
|
import type { CompanionChatRateLimiterOptions } from './companion-chat-rate-limiter.js';
|
|
@@ -185,7 +185,7 @@ export declare class CompanionChatManager {
|
|
|
185
185
|
*/
|
|
186
186
|
closeSession(sessionId: string): CompanionChatSession | null;
|
|
187
187
|
/**
|
|
188
|
-
* Permanently delete a session (
|
|
188
|
+
* Permanently delete a session (see CHANGELOG 1.0.0: `delete` is now a genuine removal,
|
|
189
189
|
* distinct from `closeSession` above). Aborts any in-flight turn, removes
|
|
190
190
|
* the on-disk record file, and drops the in-memory entry — reusing
|
|
191
191
|
* {@link _hardRemove}, the SAME primitive the GC 'delete-persistent' sweep
|
|
@@ -225,8 +225,29 @@ export declare class CompanionChatManager {
|
|
|
225
225
|
private _postMessageInternal;
|
|
226
226
|
dispose(): void;
|
|
227
227
|
private _runTurn;
|
|
228
|
-
|
|
229
|
-
|
|
228
|
+
/**
|
|
229
|
+
* Regenerate an assistant response: supersede the target assistant message (an
|
|
230
|
+
* explicit id, or the latest response) and everything after it — retained as
|
|
231
|
+
* history, never deleted — then re-run a fresh turn from the preceding user
|
|
232
|
+
* message. Refuses a closed (409 SESSION_CLOSED) or unknown (404
|
|
233
|
+
* SESSION_NOT_FOUND) session; honest code when there is nothing to regenerate.
|
|
234
|
+
*/
|
|
235
|
+
regenerateMessage(sessionId: string, input?: RegenerateCompanionChatMessageInput): RegenerateCompanionChatMessageOutput;
|
|
236
|
+
/**
|
|
237
|
+
* Edit a user message and branch from it: supersede the target user message and
|
|
238
|
+
* everything after it (retained history), append a new user message carrying
|
|
239
|
+
* `revisionOf` back to the original, and run a fresh turn. Same closed/unknown
|
|
240
|
+
* refusals as {@link regenerateMessage}.
|
|
241
|
+
*/
|
|
242
|
+
editMessage(sessionId: string, input: EditCompanionChatMessageInput): EditCompanionChatMessageOutput;
|
|
243
|
+
/** Look up an active (open) session or throw the closed/not-found machine codes. */
|
|
244
|
+
private _requireOpenSession;
|
|
245
|
+
/**
|
|
246
|
+
* Shared tail of regenerate/edit: rebuild the LLM-facing conversation from the
|
|
247
|
+
* ACTIVE (non-superseded) chain (mirroring init()'s replay so the next turn
|
|
248
|
+
* sees only the live branch), persist, and fire the new turn.
|
|
249
|
+
*/
|
|
250
|
+
private _commitBranchAndRun;
|
|
230
251
|
/**
|
|
231
252
|
* Periodic GC sweep. Deletion authority is SPLIT (charter: closed sessions are
|
|
232
253
|
* HISTORY): close-idle closes an idle active session; evict-memory drops a
|
|
@@ -246,7 +267,7 @@ export declare class CompanionChatManager {
|
|
|
246
267
|
/**
|
|
247
268
|
* Hard-remove a session's persisted file and in-memory record. The ONE
|
|
248
269
|
* removal code path — shared by {@link deleteSession} and the GC
|
|
249
|
-
* 'delete-persistent' action. Never fork this. Order matters
|
|
270
|
+
* 'delete-persistent' action. Never fork this. Order matters:
|
|
250
271
|
* drop the map entry, drain any in-flight {@link _persist} save for this
|
|
251
272
|
* id, THEN unlink — else a save mid-write from {@link closeSession} can
|
|
252
273
|
* resurrect the file post-unlink.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companion-chat-manager.d.ts","sourceRoot":"","sources":["../../../src/platform/companion/companion-chat-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EACV,mCAAmC,EACnC,oBAAoB,EACpB,oBAAoB,EAGpB,+BAA+B,EAC/B,+BAA+B,EAChC,MAAM,2BAA2B,CAAC;AAKnC,OAAO,EAIL,KAAK,0BAA0B,EAChC,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"companion-chat-manager.d.ts","sourceRoot":"","sources":["../../../src/platform/companion/companion-chat-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EACV,mCAAmC,EACnC,oBAAoB,EACpB,oBAAoB,EAGpB,+BAA+B,EAC/B,6BAA6B,EAC7B,8BAA8B,EAC9B,mCAAmC,EACnC,oCAAoC,EACpC,+BAA+B,EAChC,MAAM,2BAA2B,CAAC;AAKnC,OAAO,EAIL,KAAK,0BAA0B,EAChC,MAAM,iCAAiC,CAAC;AAWzC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAGtF,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AACxF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO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