@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
|
@@ -117,6 +117,49 @@ export const builtinGatewayControlCompanionMethodDescriptors = [
|
|
|
117
117
|
inputSchema: objectSchema({ sessionId: STRING_SCHEMA }, ['sessionId']),
|
|
118
118
|
outputSchema: COMPANION_CHAT_MESSAGES_LIST_SCHEMA,
|
|
119
119
|
}),
|
|
120
|
+
methodDescriptor({
|
|
121
|
+
id: 'companion.chat.messages.retry',
|
|
122
|
+
title: 'Regenerate Companion Chat Response',
|
|
123
|
+
description: 'Regenerate an assistant response. Optional `messageId` targets a specific assistant message; omitted, the latest assistant response is re-run. The prior response (and any turns after it) is SUPERSEDED — kept in the message list and on disk, flagged as retained history — never deleted, then a fresh turn re-runs from the preceding user message. Returns the superseded message ids so the caller can render the honest lineage. Rejected on a closed session (409 SESSION_CLOSED) or unknown session (404 SESSION_NOT_FOUND), and with an honest machine code (409 NO_ASSISTANT_MESSAGE) when there is nothing to regenerate.',
|
|
124
|
+
category: 'companion',
|
|
125
|
+
scopes: ['write:sessions'],
|
|
126
|
+
http: { method: 'POST', path: '/api/companion/chat/sessions/{sessionId}/messages/retry' },
|
|
127
|
+
inputSchema: bodyEnvelopeSchema({
|
|
128
|
+
messageId: STRING_SCHEMA,
|
|
129
|
+
}, []),
|
|
130
|
+
outputSchema: objectSchema({
|
|
131
|
+
sessionId: STRING_SCHEMA,
|
|
132
|
+
regeneratedFrom: STRING_SCHEMA,
|
|
133
|
+
supersededMessageIds: arraySchema(STRING_SCHEMA),
|
|
134
|
+
turnStarted: BOOLEAN_SCHEMA,
|
|
135
|
+
}, ['sessionId', 'regeneratedFrom', 'supersededMessageIds', 'turnStarted']),
|
|
136
|
+
}),
|
|
137
|
+
methodDescriptor({
|
|
138
|
+
id: 'companion.chat.messages.edit',
|
|
139
|
+
title: 'Edit Companion Chat Message And Branch',
|
|
140
|
+
description: 'Edit a user message and branch the conversation from it. `messageId` (required) is the user message to edit; the edited text is passed as `body` or `content` (as message create accepts), with optional `attachments` referencing artifacts. The original message and everything after it are SUPERSEDED — retained as history, never deleted — a new user message carrying `revisionOf` back to the original is appended, and a fresh turn answers it. Returns the new message id and the superseded ids for honest lineage. Same closed/unknown-session refusals as companion.chat.messages.retry.',
|
|
141
|
+
category: 'companion',
|
|
142
|
+
scopes: ['write:sessions'],
|
|
143
|
+
http: { method: 'POST', path: '/api/companion/chat/sessions/{sessionId}/messages/edit' },
|
|
144
|
+
inputSchema: bodyEnvelopeSchema({
|
|
145
|
+
messageId: STRING_SCHEMA,
|
|
146
|
+
body: STRING_SCHEMA,
|
|
147
|
+
content: STRING_SCHEMA,
|
|
148
|
+
attachments: arraySchema(objectSchema({
|
|
149
|
+
artifactId: STRING_SCHEMA,
|
|
150
|
+
label: STRING_SCHEMA,
|
|
151
|
+
metadata: objectSchema({}, []),
|
|
152
|
+
}, ['artifactId'])),
|
|
153
|
+
metadata: objectSchema({}, []),
|
|
154
|
+
}, []),
|
|
155
|
+
outputSchema: objectSchema({
|
|
156
|
+
sessionId: STRING_SCHEMA,
|
|
157
|
+
editedFrom: STRING_SCHEMA,
|
|
158
|
+
messageId: STRING_SCHEMA,
|
|
159
|
+
supersededMessageIds: arraySchema(STRING_SCHEMA),
|
|
160
|
+
turnStarted: BOOLEAN_SCHEMA,
|
|
161
|
+
}, ['sessionId', 'editedFrom', 'messageId', 'supersededMessageIds', 'turnStarted']),
|
|
162
|
+
}),
|
|
120
163
|
methodDescriptor({
|
|
121
164
|
id: 'companion.chat.events.stream',
|
|
122
165
|
title: 'Stream Companion Chat Events',
|
|
@@ -467,9 +467,9 @@ export const builtinGatewayControlCoreMethodDescriptors = [
|
|
|
467
467
|
}, ['sessionId', 'inputId']),
|
|
468
468
|
outputSchema: entityOutputSchema('input', SHARED_SESSION_INPUT_RECORD_SCHEMA),
|
|
469
469
|
}),
|
|
470
|
-
// ──
|
|
470
|
+
// ── sessions.search (see CHANGELOG 1.0.0) ────────────────────────────────
|
|
471
471
|
// Paginated/filtered query over the home-scoped session store, extending
|
|
472
|
-
// the
|
|
472
|
+
// the session-spine list-filter shape (project/kind/includeClosed) with free-text
|
|
473
473
|
// `query`, `surfaceKind`, `status`, and opaque cursor pagination. Handler:
|
|
474
474
|
// routes/session-search.ts (registered directly on the catalog with no
|
|
475
475
|
// `http` REST binding — see the transport note below).
|
|
@@ -561,7 +561,7 @@ export const builtinGatewayControlCoreMethodDescriptors = [
|
|
|
561
561
|
outputSchema: TASK_STATUS_OUTPUT_SCHEMA,
|
|
562
562
|
}),
|
|
563
563
|
// fleet.* + checkpoints.* descriptors moved to method-catalog-fleet.ts
|
|
564
|
-
// (
|
|
564
|
+
// (see CHANGELOG 1.0.0) — this file was already at the 800-line cap; see that file's
|
|
565
565
|
// header comment for the full design rationale, merged in by
|
|
566
566
|
// method-catalog-control.ts alongside method-catalog-control-automation.ts.
|
|
567
567
|
methodDescriptor({
|
|
@@ -5,7 +5,7 @@ import type { GatewayMethodDescriptor } from './method-catalog-shared.js';
|
|
|
5
5
|
* connector actions in addition to the direct-socket path. Daemon-backed; the SDK
|
|
6
6
|
* publishes the typed contract surface (no internal handler).
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* Capability-advertisement honesty: none of these four http paths are
|
|
9
9
|
* currently served by the daemon router — there is no /api/email surface at
|
|
10
10
|
* any prefix (confirmed by reading router.ts and every dispatch chain it
|
|
11
11
|
* delegates to; see method-catalog-route-reconcile.ts). The daemon's own 404
|
|
@@ -29,7 +29,7 @@ const EMAIL_MESSAGE_DETAIL_SCHEMA = objectSchema({
|
|
|
29
29
|
* connector actions in addition to the direct-socket path. Daemon-backed; the SDK
|
|
30
30
|
* publishes the typed contract surface (no internal handler).
|
|
31
31
|
*
|
|
32
|
-
*
|
|
32
|
+
* Capability-advertisement honesty: none of these four http paths are
|
|
33
33
|
* currently served by the daemon router — there is no /api/email surface at
|
|
34
34
|
* any prefix (confirmed by reading router.ts and every dispatch chain it
|
|
35
35
|
* delegates to; see method-catalog-route-reconcile.ts). The daemon's own 404
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* method-catalog-fleet.ts
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* (see CHANGELOG 1.0.0) — fleet.* + checkpoints.* method descriptors. Split out of
|
|
5
5
|
* method-catalog-control-core.ts (which was already at the 800-line
|
|
6
6
|
* source-file cap) rather than grown into it, mirroring how
|
|
7
7
|
* method-catalog-control-automation.ts is a sibling split of the same file
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* method-catalog-push.ts
|
|
3
|
+
*
|
|
4
|
+
* Browser-push (Web Push) verb descriptors: the VAPID public-key read, and the
|
|
5
|
+
* subscription lifecycle (register / list / delete / verify) a PWA uses to
|
|
6
|
+
* receive approvals and completions as notifications.
|
|
7
|
+
*
|
|
8
|
+
* These are pure descriptors so `buildOperatorContract` / the generated catalog
|
|
9
|
+
* / api docs see them; the handlers are attached at RuntimeServices construction
|
|
10
|
+
* time in routes/push.ts (the same `catalog.register(descriptor, handler)`
|
|
11
|
+
* pattern fleet.* uses), reached over HTTP through the generic
|
|
12
|
+
* `/api/control-plane/methods/{id}/invoke` endpoint.
|
|
13
|
+
*
|
|
14
|
+
* Verb tails follow docs/decisions/2026-07-06-core-verb-spec.md: register is
|
|
15
|
+
* `create`, unregister is `delete`, the collection read is `list`, the public
|
|
16
|
+
* key read is `get`. `verify` (send a live test push to prove the round trip)
|
|
17
|
+
* is not a generic CRUD word — it is documented in the `push-delivery` exempt
|
|
18
|
+
* category in packages/contracts/src/core-verbs.ts.
|
|
19
|
+
*
|
|
20
|
+
* Like the other handler-registered verb groups (fleet.*, checkpoints.*,
|
|
21
|
+
* sessions.search) these declare `transport: ['ws']` and carry NO dedicated
|
|
22
|
+
* REST `http` binding: they are served by the registered in-process handler
|
|
23
|
+
* through the generic `/api/control-plane/methods/{id}/invoke` endpoint, not by
|
|
24
|
+
* a path route in the external daemon-sdk package. Advertising an `http` path
|
|
25
|
+
* that no route serves would trip the capability-advertisement honesty gate
|
|
26
|
+
* (method-catalog-route-reconcile.ts), so it is deliberately omitted.
|
|
27
|
+
*/
|
|
28
|
+
import type { GatewayMethodDescriptor } from './method-catalog-shared.js';
|
|
29
|
+
export declare const builtinGatewayPushMethodDescriptors: readonly GatewayMethodDescriptor[];
|
|
30
|
+
//# sourceMappingURL=method-catalog-push.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"method-catalog-push.d.ts","sourceRoot":"","sources":["../../../src/platform/control-plane/method-catalog-push.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAkC1E,eAAO,MAAM,mCAAmC,EAAE,SAAS,uBAAuB,EAyDjF,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { BOOLEAN_SCHEMA, NUMBER_SCHEMA, STRING_SCHEMA, arraySchema, methodDescriptor, objectSchema, } from './method-catalog-shared.js';
|
|
2
|
+
const PUSH_SUBSCRIPTION_KEYS_SCHEMA = objectSchema({
|
|
3
|
+
p256dh: STRING_SCHEMA,
|
|
4
|
+
auth: STRING_SCHEMA,
|
|
5
|
+
}, ['p256dh', 'auth']);
|
|
6
|
+
/** The wire-safe (redacted) subscription view — no capability URL, no key material. */
|
|
7
|
+
const PUBLIC_PUSH_SUBSCRIPTION_SCHEMA = objectSchema({
|
|
8
|
+
id: STRING_SCHEMA,
|
|
9
|
+
principalId: STRING_SCHEMA,
|
|
10
|
+
endpointOrigin: STRING_SCHEMA,
|
|
11
|
+
endpointHash: STRING_SCHEMA,
|
|
12
|
+
createdAt: NUMBER_SCHEMA,
|
|
13
|
+
lastDeliveryAt: NUMBER_SCHEMA,
|
|
14
|
+
lastOutcome: STRING_SCHEMA,
|
|
15
|
+
}, ['id', 'principalId', 'endpointOrigin', 'endpointHash', 'createdAt']);
|
|
16
|
+
const PUSH_DELIVERY_RECEIPT_SCHEMA = objectSchema({
|
|
17
|
+
subscriptionId: STRING_SCHEMA,
|
|
18
|
+
endpointOrigin: STRING_SCHEMA,
|
|
19
|
+
outcome: STRING_SCHEMA,
|
|
20
|
+
httpStatus: NUMBER_SCHEMA,
|
|
21
|
+
detail: STRING_SCHEMA,
|
|
22
|
+
}, ['subscriptionId', 'endpointOrigin', 'outcome']);
|
|
23
|
+
export const builtinGatewayPushMethodDescriptors = [
|
|
24
|
+
methodDescriptor({
|
|
25
|
+
id: 'push.vapid.get',
|
|
26
|
+
title: 'Get Web Push Public Key',
|
|
27
|
+
description: 'Return the daemon\'s public VAPID key (base64url application-server key) that a browser client passes to pushManager.subscribe(). The matching private key never leaves the daemon and is never returned by any verb.',
|
|
28
|
+
category: 'push',
|
|
29
|
+
scopes: ['read:push'],
|
|
30
|
+
transport: ['ws'],
|
|
31
|
+
outputSchema: objectSchema({ publicKey: STRING_SCHEMA }, ['publicKey']),
|
|
32
|
+
}),
|
|
33
|
+
methodDescriptor({
|
|
34
|
+
id: 'push.subscriptions.create',
|
|
35
|
+
title: 'Register Web Push Subscription',
|
|
36
|
+
description: 'Store a browser Push subscription (endpoint capability URL + p256dh/auth keys) for the authenticated operator so the daemon can deliver notifications to that device. Re-registering the same endpoint updates its keys in place rather than duplicating it. The stored endpoint and keys are never returned over the wire; the response is the redacted subscription view.',
|
|
37
|
+
category: 'push',
|
|
38
|
+
scopes: ['write:push'],
|
|
39
|
+
transport: ['ws'],
|
|
40
|
+
inputSchema: objectSchema({
|
|
41
|
+
endpoint: STRING_SCHEMA,
|
|
42
|
+
keys: PUSH_SUBSCRIPTION_KEYS_SCHEMA,
|
|
43
|
+
}, ['endpoint', 'keys']),
|
|
44
|
+
outputSchema: objectSchema({ subscription: PUBLIC_PUSH_SUBSCRIPTION_SCHEMA }, ['subscription']),
|
|
45
|
+
}),
|
|
46
|
+
methodDescriptor({
|
|
47
|
+
id: 'push.subscriptions.list',
|
|
48
|
+
title: 'List Web Push Subscriptions',
|
|
49
|
+
description: 'List the authenticated operator\'s registered push devices as redacted subscription views (id, endpoint origin + hash, timestamps, last delivery outcome). The capability URL and key material are never included.',
|
|
50
|
+
category: 'push',
|
|
51
|
+
scopes: ['read:push'],
|
|
52
|
+
transport: ['ws'],
|
|
53
|
+
outputSchema: objectSchema({
|
|
54
|
+
subscriptions: arraySchema(PUBLIC_PUSH_SUBSCRIPTION_SCHEMA),
|
|
55
|
+
}, ['subscriptions']),
|
|
56
|
+
}),
|
|
57
|
+
methodDescriptor({
|
|
58
|
+
id: 'push.subscriptions.delete',
|
|
59
|
+
title: 'Delete Web Push Subscription',
|
|
60
|
+
description: 'Permanently remove one of the authenticated operator\'s push subscriptions: the stored record (endpoint + keys) is dropped and cannot be listed afterward. An unknown id, or one owned by another principal, is a 404 SUBSCRIPTION_NOT_FOUND, never a 200-noop.',
|
|
61
|
+
category: 'push',
|
|
62
|
+
scopes: ['write:push'],
|
|
63
|
+
transport: ['ws'],
|
|
64
|
+
inputSchema: objectSchema({ subscriptionId: STRING_SCHEMA }, ['subscriptionId']),
|
|
65
|
+
outputSchema: objectSchema({
|
|
66
|
+
subscriptionId: STRING_SCHEMA,
|
|
67
|
+
deleted: BOOLEAN_SCHEMA,
|
|
68
|
+
}, ['subscriptionId', 'deleted']),
|
|
69
|
+
}),
|
|
70
|
+
methodDescriptor({
|
|
71
|
+
id: 'push.subscriptions.verify',
|
|
72
|
+
title: 'Send Test Web Push',
|
|
73
|
+
description: 'Send a live test notification to one of the authenticated operator\'s subscriptions and return an honest delivery receipt (delivered / pruned / failed). A subscription whose endpoint reports 404/410 gone is pruned as part of the attempt and the receipt says so. An unknown id, or one owned by another principal, is a 404 SUBSCRIPTION_NOT_FOUND.',
|
|
74
|
+
category: 'push',
|
|
75
|
+
scopes: ['write:push'],
|
|
76
|
+
transport: ['ws'],
|
|
77
|
+
inputSchema: objectSchema({ subscriptionId: STRING_SCHEMA }, ['subscriptionId']),
|
|
78
|
+
outputSchema: objectSchema({ receipt: PUSH_DELIVERY_RECEIPT_SCHEMA }, ['receipt']),
|
|
79
|
+
}),
|
|
80
|
+
];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GatewayMethodDescriptor } from './method-catalog-shared.js';
|
|
2
2
|
/**
|
|
3
|
-
* method-catalog-route-reconcile.ts
|
|
3
|
+
* method-catalog-route-reconcile.ts
|
|
4
4
|
*
|
|
5
5
|
* Advertisement-vs-route reconciliation. Every method descriptor that
|
|
6
6
|
* carries an `http` binding is a promise to a caller: "this daemon actually
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"method-catalog-runtime.d.ts","sourceRoot":"","sources":["../../../src/platform/control-plane/method-catalog-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"method-catalog-runtime.d.ts","sourceRoot":"","sources":["../../../src/platform/control-plane/method-catalog-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAkJ1E,eAAO,MAAM,sCAAsC,EAAE,SAAS,uBAAuB,EA2hBpF,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EMPTY_OBJECT_SCHEMA, BOOLEAN_SCHEMA, STRING_SCHEMA, NUMBER_SCHEMA, objectSchema, listOutputSchema, entityOutputSchema, bodyEnvelopeSchema, methodDescriptor, runtimeEventId, arraySchema, } from './method-catalog-shared.js';
|
|
2
2
|
import { enumSchema, nullableSchema } from './operator-contract-schemas-shared.js';
|
|
3
|
-
import { CONTINUITY_SNAPSHOT_SCHEMA, DISTRIBUTED_NODE_HOST_CONTRACT_SCHEMA, HEALTH_SNAPSHOT_SCHEMA, INTELLIGENCE_SNAPSHOT_SCHEMA, MEMORY_DOCTOR_REPORT_SCHEMA, MEMORY_VECTOR_STATS_SCHEMA, PROVIDER_ACCOUNT_SNAPSHOT_SCHEMA, PROVIDER_RUNTIME_SNAPSHOT_SCHEMA, PROVIDER_USAGE_SNAPSHOT_SCHEMA, REMOTE_PAIR_APPROVAL_OUTPUT_SCHEMA, REMOTE_PAIR_REQUEST_OUTPUT_SCHEMA, REMOTE_PAIR_REQUESTS_OUTPUT_SCHEMA, REMOTE_PEERS_OUTPUT_SCHEMA, REMOTE_PAIR_REQUEST_ACTION_INPUT_SCHEMA, REMOTE_PEER_DISCONNECT_INPUT_SCHEMA, REMOTE_PEER_INVOKE_INPUT_SCHEMA, REMOTE_PEER_INVOKE_OUTPUT_SCHEMA, REMOTE_PEER_OUTPUT_SCHEMA, REMOTE_PEER_TOKEN_REVOKE_INPUT_SCHEMA, REMOTE_PEER_TOKEN_ROTATE_INPUT_SCHEMA, REMOTE_PEER_TOKEN_ROTATE_OUTPUT_SCHEMA, REMOTE_SNAPSHOT_SCHEMA, REMOTE_WORK_LIST_OUTPUT_SCHEMA, REMOTE_WORK_CANCEL_INPUT_SCHEMA, REMOTE_WORK_OUTPUT_SCHEMA, SECURITY_SETTINGS_REPORT_SCHEMA, SETTINGS_SNAPSHOT_SCHEMA, WORKTREE_SNAPSHOT_SCHEMA, } from './operator-contract-schemas.js';
|
|
3
|
+
import { CONTINUITY_SNAPSHOT_SCHEMA, DISTRIBUTED_NODE_HOST_CONTRACT_SCHEMA, HEALTH_SNAPSHOT_SCHEMA, INTELLIGENCE_SNAPSHOT_SCHEMA, MEMORY_DOCTOR_REPORT_SCHEMA, MEMORY_VECTOR_STATS_SCHEMA, MEMORY_CLASS_SCHEMA, MEMORY_SCOPE_SCHEMA, MEMORY_REVIEW_STATE_SCHEMA, MEMORY_PROVENANCE_KIND_SCHEMA, MEMORY_PROVENANCE_LINK_SCHEMA, MEMORY_RECORD_SCHEMA, MEMORY_RECORD_SEARCH_OUTPUT_SCHEMA, MEMORY_RECORD_DELETE_OUTPUT_SCHEMA, MEMORY_LINK_SCHEMA, MEMORY_BUNDLE_SCHEMA, MEMORY_IMPORT_RESULT_SCHEMA, MEMORY_RECORD_LIST_OUTPUT_SCHEMA, MEMORY_RECORD_SEMANTIC_OUTPUT_SCHEMA, MEMORY_RECORD_LINKS_OUTPUT_SCHEMA, PROVIDER_ACCOUNT_SNAPSHOT_SCHEMA, PROVIDER_RUNTIME_SNAPSHOT_SCHEMA, PROVIDER_USAGE_SNAPSHOT_SCHEMA, REMOTE_PAIR_APPROVAL_OUTPUT_SCHEMA, REMOTE_PAIR_REQUEST_OUTPUT_SCHEMA, REMOTE_PAIR_REQUESTS_OUTPUT_SCHEMA, REMOTE_PEERS_OUTPUT_SCHEMA, REMOTE_PAIR_REQUEST_ACTION_INPUT_SCHEMA, REMOTE_PEER_DISCONNECT_INPUT_SCHEMA, REMOTE_PEER_INVOKE_INPUT_SCHEMA, REMOTE_PEER_INVOKE_OUTPUT_SCHEMA, REMOTE_PEER_OUTPUT_SCHEMA, REMOTE_PEER_TOKEN_REVOKE_INPUT_SCHEMA, REMOTE_PEER_TOKEN_ROTATE_INPUT_SCHEMA, REMOTE_PEER_TOKEN_ROTATE_OUTPUT_SCHEMA, REMOTE_SNAPSHOT_SCHEMA, REMOTE_WORK_LIST_OUTPUT_SCHEMA, REMOTE_WORK_CANCEL_INPUT_SCHEMA, REMOTE_WORK_OUTPUT_SCHEMA, SECURITY_SETTINGS_REPORT_SCHEMA, SETTINGS_SNAPSHOT_SCHEMA, WORKTREE_SNAPSHOT_SCHEMA, } from './operator-contract-schemas.js';
|
|
4
4
|
const MCP_SCOPE_SCHEMA = enumSchema(['project', 'global']);
|
|
5
5
|
const MCP_SERVER_CONFIG_SCHEMA = objectSchema({
|
|
6
6
|
name: STRING_SCHEMA,
|
|
@@ -71,6 +71,20 @@ const MCP_TOOL_SCHEMA = objectSchema({
|
|
|
71
71
|
const MCP_TOOLS_RESPONSE_SCHEMA = objectSchema({
|
|
72
72
|
tools: arraySchema(MCP_TOOL_SCHEMA),
|
|
73
73
|
}, ['tools']);
|
|
74
|
+
/** The shared memory search-filter fields (no `recall` — that is search-only). Reused by list / search-semantic / export. */
|
|
75
|
+
const MEMORY_SEARCH_FILTER_FIELDS = {
|
|
76
|
+
scope: MEMORY_SCOPE_SCHEMA,
|
|
77
|
+
cls: MEMORY_CLASS_SCHEMA,
|
|
78
|
+
tags: arraySchema(STRING_SCHEMA),
|
|
79
|
+
query: STRING_SCHEMA,
|
|
80
|
+
semantic: BOOLEAN_SCHEMA,
|
|
81
|
+
since: NUMBER_SCHEMA,
|
|
82
|
+
reviewState: arraySchema(MEMORY_REVIEW_STATE_SCHEMA),
|
|
83
|
+
minConfidence: NUMBER_SCHEMA,
|
|
84
|
+
provenanceKinds: arraySchema(MEMORY_PROVENANCE_KIND_SCHEMA),
|
|
85
|
+
staleOnly: BOOLEAN_SCHEMA,
|
|
86
|
+
limit: NUMBER_SCHEMA,
|
|
87
|
+
};
|
|
74
88
|
export const builtinGatewayRuntimeMethodDescriptors = [
|
|
75
89
|
methodDescriptor({
|
|
76
90
|
id: 'mcp.config.get',
|
|
@@ -433,6 +447,168 @@ export const builtinGatewayRuntimeMethodDescriptors = [
|
|
|
433
447
|
}),
|
|
434
448
|
outputSchema: objectSchema({ records: arraySchema(objectSchema({}, [], { additionalProperties: true })) }, ['records']),
|
|
435
449
|
}),
|
|
450
|
+
methodDescriptor({
|
|
451
|
+
id: 'memory.records.add',
|
|
452
|
+
title: 'Add Memory Record',
|
|
453
|
+
description: 'Add a memory record to the daemon-owned canonical store. The daemon is the single writer for its store; a client surface routes its writes here instead of opening the store file, so two processes never write the same sql.js file. New records default to confidence 60 (the recall floor) and reviewState fresh unless the review block overrides them.',
|
|
454
|
+
category: 'memory',
|
|
455
|
+
scopes: ['write:memory'],
|
|
456
|
+
http: { method: 'POST', path: '/api/memory/records' },
|
|
457
|
+
inputSchema: bodyEnvelopeSchema({
|
|
458
|
+
cls: MEMORY_CLASS_SCHEMA,
|
|
459
|
+
summary: STRING_SCHEMA,
|
|
460
|
+
scope: MEMORY_SCOPE_SCHEMA,
|
|
461
|
+
detail: STRING_SCHEMA,
|
|
462
|
+
tags: arraySchema(STRING_SCHEMA),
|
|
463
|
+
provenance: arraySchema(MEMORY_PROVENANCE_LINK_SCHEMA),
|
|
464
|
+
review: objectSchema({
|
|
465
|
+
state: MEMORY_REVIEW_STATE_SCHEMA,
|
|
466
|
+
confidence: NUMBER_SCHEMA,
|
|
467
|
+
reviewedBy: STRING_SCHEMA,
|
|
468
|
+
staleReason: STRING_SCHEMA,
|
|
469
|
+
}),
|
|
470
|
+
}, ['cls', 'summary']),
|
|
471
|
+
outputSchema: entityOutputSchema('record', MEMORY_RECORD_SCHEMA),
|
|
472
|
+
}),
|
|
473
|
+
methodDescriptor({
|
|
474
|
+
id: 'memory.records.search',
|
|
475
|
+
title: 'Search Memory Records',
|
|
476
|
+
description: 'Search the canonical store, literal or semantic. When semantic is requested but the semantic index cannot be consulted, the search falls back to a literal scan and states the reason in indexUnavailableReason rather than returning a silent empty result that reads as "nothing was ever stored". With recall=true the cross-surface recall-honesty contract is applied: flagged (stale/contradicted) records are excluded outright and records below the 60% confidence floor are dropped, each exclusion counted honestly.',
|
|
477
|
+
category: 'memory',
|
|
478
|
+
scopes: ['read:memory'],
|
|
479
|
+
http: { method: 'POST', path: '/api/memory/records/search' },
|
|
480
|
+
inputSchema: bodyEnvelopeSchema({
|
|
481
|
+
scope: MEMORY_SCOPE_SCHEMA,
|
|
482
|
+
cls: MEMORY_CLASS_SCHEMA,
|
|
483
|
+
tags: arraySchema(STRING_SCHEMA),
|
|
484
|
+
query: STRING_SCHEMA,
|
|
485
|
+
semantic: BOOLEAN_SCHEMA,
|
|
486
|
+
since: NUMBER_SCHEMA,
|
|
487
|
+
reviewState: arraySchema(MEMORY_REVIEW_STATE_SCHEMA),
|
|
488
|
+
minConfidence: NUMBER_SCHEMA,
|
|
489
|
+
provenanceKinds: arraySchema(MEMORY_PROVENANCE_KIND_SCHEMA),
|
|
490
|
+
staleOnly: BOOLEAN_SCHEMA,
|
|
491
|
+
limit: NUMBER_SCHEMA,
|
|
492
|
+
recall: BOOLEAN_SCHEMA,
|
|
493
|
+
}),
|
|
494
|
+
outputSchema: MEMORY_RECORD_SEARCH_OUTPUT_SCHEMA,
|
|
495
|
+
}),
|
|
496
|
+
methodDescriptor({
|
|
497
|
+
id: 'memory.records.get',
|
|
498
|
+
title: 'Get Memory Record',
|
|
499
|
+
description: 'Return a single memory record by id from the canonical store, or 404 when no record with that id exists.',
|
|
500
|
+
category: 'memory',
|
|
501
|
+
scopes: ['read:memory'],
|
|
502
|
+
http: { method: 'GET', path: '/api/memory/records/{id}' },
|
|
503
|
+
inputSchema: objectSchema({ id: STRING_SCHEMA }, ['id']),
|
|
504
|
+
outputSchema: entityOutputSchema('record', MEMORY_RECORD_SCHEMA),
|
|
505
|
+
}),
|
|
506
|
+
methodDescriptor({
|
|
507
|
+
id: 'memory.records.update-review',
|
|
508
|
+
title: 'Update Memory Record Review',
|
|
509
|
+
description: 'Update a record\'s review signal (reviewState, confidence, reviewer, staleReason) in the canonical store. Marking a record stale or contradicted flags it so the recall-honesty contract will never inject it into a prompt again regardless of confidence. Returns 404 when no record with that id exists.',
|
|
510
|
+
category: 'memory',
|
|
511
|
+
scopes: ['write:memory'],
|
|
512
|
+
http: { method: 'POST', path: '/api/memory/records/{id}/review' },
|
|
513
|
+
inputSchema: bodyEnvelopeSchema({
|
|
514
|
+
id: STRING_SCHEMA,
|
|
515
|
+
state: MEMORY_REVIEW_STATE_SCHEMA,
|
|
516
|
+
confidence: NUMBER_SCHEMA,
|
|
517
|
+
reviewedBy: STRING_SCHEMA,
|
|
518
|
+
staleReason: STRING_SCHEMA,
|
|
519
|
+
}, ['id']),
|
|
520
|
+
outputSchema: entityOutputSchema('record', MEMORY_RECORD_SCHEMA),
|
|
521
|
+
}),
|
|
522
|
+
methodDescriptor({
|
|
523
|
+
id: 'memory.records.delete',
|
|
524
|
+
title: 'Delete Memory Record',
|
|
525
|
+
description: 'Permanently delete a memory record and its links from the canonical store. Delete means delete: the record is removed from the store and the semantic index, not merely flagged. Returns { deleted: false } when no record with that id existed — an honest boolean, never a 200 that pretends a phantom row was removed.',
|
|
526
|
+
category: 'memory',
|
|
527
|
+
scopes: ['write:memory'],
|
|
528
|
+
http: { method: 'DELETE', path: '/api/memory/records/{id}' },
|
|
529
|
+
inputSchema: objectSchema({ id: STRING_SCHEMA }, ['id']),
|
|
530
|
+
outputSchema: MEMORY_RECORD_DELETE_OUTPUT_SCHEMA,
|
|
531
|
+
}),
|
|
532
|
+
methodDescriptor({
|
|
533
|
+
id: 'memory.records.list',
|
|
534
|
+
title: 'List Memory Records',
|
|
535
|
+
description: 'Bulk read from the canonical store: a literal (non-semantic) search returning the matching records as a plain array. An empty filter returns every record (getAll). This is the read a client surface uses instead of opening the store file for its browse/list and knowledge-injection paths.',
|
|
536
|
+
category: 'memory',
|
|
537
|
+
scopes: ['read:memory'],
|
|
538
|
+
http: { method: 'POST', path: '/api/memory/records/list' },
|
|
539
|
+
inputSchema: bodyEnvelopeSchema({ ...MEMORY_SEARCH_FILTER_FIELDS }),
|
|
540
|
+
outputSchema: MEMORY_RECORD_LIST_OUTPUT_SCHEMA,
|
|
541
|
+
}),
|
|
542
|
+
methodDescriptor({
|
|
543
|
+
id: 'memory.records.search-semantic',
|
|
544
|
+
title: 'Semantic Search Memory Records',
|
|
545
|
+
description: 'Rank records by semantic similarity against the query, returning scored results (distance, similarity, score). When the query has no vector match the store falls back to a lexical ranking rather than a silent empty. distance is null for a fallback (non-vector) result. Read-only against the daemon\'s canonical index.',
|
|
546
|
+
category: 'memory',
|
|
547
|
+
scopes: ['read:memory'],
|
|
548
|
+
http: { method: 'POST', path: '/api/memory/records/search-semantic' },
|
|
549
|
+
inputSchema: bodyEnvelopeSchema({ ...MEMORY_SEARCH_FILTER_FIELDS }),
|
|
550
|
+
outputSchema: MEMORY_RECORD_SEMANTIC_OUTPUT_SCHEMA,
|
|
551
|
+
}),
|
|
552
|
+
methodDescriptor({
|
|
553
|
+
id: 'memory.records.export',
|
|
554
|
+
title: 'Export Memory Bundle',
|
|
555
|
+
description: 'Export a no-loss bundle (records + links) for the given filter from the canonical store. The bundle round-trips through import id-keyed, so it is the wire form of the cross-surface fold/reconcile seam. Read-only.',
|
|
556
|
+
category: 'memory',
|
|
557
|
+
scopes: ['read:memory'],
|
|
558
|
+
http: { method: 'POST', path: '/api/memory/records/export' },
|
|
559
|
+
inputSchema: bodyEnvelopeSchema({ ...MEMORY_SEARCH_FILTER_FIELDS }),
|
|
560
|
+
outputSchema: entityOutputSchema('bundle', MEMORY_BUNDLE_SCHEMA),
|
|
561
|
+
}),
|
|
562
|
+
methodDescriptor({
|
|
563
|
+
id: 'memory.records.import',
|
|
564
|
+
title: 'Import Memory Bundle',
|
|
565
|
+
description: 'Import a bundle into the canonical store as an id-keyed union: an id already present is left untouched (counted skipped), a new id is added; a link is added only when both its endpoints exist. Never overwrites, never deletes, idempotent on re-run. The daemon is the single writer, so a client imports here instead of writing the store file.',
|
|
566
|
+
category: 'memory',
|
|
567
|
+
scopes: ['write:memory'],
|
|
568
|
+
http: { method: 'POST', path: '/api/memory/records/import' },
|
|
569
|
+
inputSchema: bodyEnvelopeSchema({ bundle: MEMORY_BUNDLE_SCHEMA }, ['bundle']),
|
|
570
|
+
outputSchema: entityOutputSchema('result', MEMORY_IMPORT_RESULT_SCHEMA),
|
|
571
|
+
}),
|
|
572
|
+
methodDescriptor({
|
|
573
|
+
id: 'memory.records.update',
|
|
574
|
+
title: 'Update Memory Record',
|
|
575
|
+
description: 'Edit a record\'s content fields (scope, summary, detail, tags) in the canonical store. This is distinct from the review update: it changes the record itself — e.g. moving scope project→team promotes a record to the shared surface. Returns 404 when no record with that id exists.',
|
|
576
|
+
category: 'memory',
|
|
577
|
+
scopes: ['write:memory'],
|
|
578
|
+
http: { method: 'POST', path: '/api/memory/records/{id}/update' },
|
|
579
|
+
inputSchema: bodyEnvelopeSchema({
|
|
580
|
+
id: STRING_SCHEMA,
|
|
581
|
+
scope: MEMORY_SCOPE_SCHEMA,
|
|
582
|
+
summary: STRING_SCHEMA,
|
|
583
|
+
detail: STRING_SCHEMA,
|
|
584
|
+
tags: arraySchema(STRING_SCHEMA),
|
|
585
|
+
}, ['id']),
|
|
586
|
+
outputSchema: entityOutputSchema('record', MEMORY_RECORD_SCHEMA),
|
|
587
|
+
}),
|
|
588
|
+
methodDescriptor({
|
|
589
|
+
id: 'memory.records.links.list',
|
|
590
|
+
title: 'List Memory Record Links',
|
|
591
|
+
description: 'Return every link where the record is the source or the target. Returns 404 when no record with that id exists — an honest not-found, distinct from a record that exists but has no links (an empty array).',
|
|
592
|
+
category: 'memory',
|
|
593
|
+
scopes: ['read:memory'],
|
|
594
|
+
http: { method: 'GET', path: '/api/memory/records/{id}/links' },
|
|
595
|
+
inputSchema: objectSchema({ id: STRING_SCHEMA }, ['id']),
|
|
596
|
+
outputSchema: MEMORY_RECORD_LINKS_OUTPUT_SCHEMA,
|
|
597
|
+
}),
|
|
598
|
+
methodDescriptor({
|
|
599
|
+
id: 'memory.records.links.add',
|
|
600
|
+
title: 'Link Memory Records',
|
|
601
|
+
description: 'Create a directed relation (e.g. "supersedes", "caused") from the path record to a target record. Returns 404 when either endpoint does not exist — never a 200 that pretends a link was made between records that do not both exist.',
|
|
602
|
+
category: 'memory',
|
|
603
|
+
scopes: ['write:memory'],
|
|
604
|
+
http: { method: 'POST', path: '/api/memory/records/{id}/links' },
|
|
605
|
+
inputSchema: bodyEnvelopeSchema({
|
|
606
|
+
id: STRING_SCHEMA,
|
|
607
|
+
toId: STRING_SCHEMA,
|
|
608
|
+
relation: STRING_SCHEMA,
|
|
609
|
+
}, ['id', 'toId', 'relation']),
|
|
610
|
+
outputSchema: entityOutputSchema('link', MEMORY_LINK_SCHEMA),
|
|
611
|
+
}),
|
|
436
612
|
methodDescriptor({
|
|
437
613
|
id: 'scheduler.capacity',
|
|
438
614
|
title: 'Scheduler Capacity',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"method-catalog.d.ts","sourceRoot":"","sources":["../../../src/platform/control-plane/method-catalog.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"method-catalog.d.ts","sourceRoot":"","sources":["../../../src/platform/control-plane/method-catalog.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,4BAA4B,CAAC;AAOpC,YAAY,EACV,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,EACvB,8BAA8B,EAC9B,wBAAwB,EACxB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AA8DpC,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA8C;IACtE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA6C;gBAExD,OAAO,GAAE;QAAE,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAA;KAAO;IAWhE,QAAQ,CACN,UAAU,EAAE,uBAAuB,EACnC,OAAO,CAAC,EAAE,oBAAoB,EAC9B,OAAO,GAAE;QAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAO,GAC3C,MAAM,IAAI;IAcb,aAAa,CACX,UAAU,EAAE,sBAAsB,EAClC,OAAO,GAAE;QAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAO,GAC3C,MAAM,IAAI;IAcb,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAI/B,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAIpC,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAa1C,IAAI,CAAC,OAAO,GAAE,wBAA6B,GAAG,uBAAuB,EAAE;IASvE,UAAU,CAAC,OAAO,GAAE,uBAA4B,GAAG,sBAAsB,EAAE;IAU3E,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,uBAAuB,GAAG,IAAI;IAI/C,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,sBAAsB,GAAG,IAAI;IAInD,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAI/B,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,uBAAuB,GAAG,IAAI;IAUnF,YAAY,CAAC,OAAO,GAAE;QAAE,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAA;KAAO,GAAG,MAAM,EAAE;IAiBzE;;;;;;;;OAQG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,uBAAuB,GAAG,OAAO,CAAC,OAAO,CAAC;CA8BhF"}
|
|
@@ -6,6 +6,7 @@ import { builtinGatewayCalendarMethodDescriptors, } from './method-catalog-calen
|
|
|
6
6
|
import { builtinGatewayEventDescriptors, } from './method-catalog-events.js';
|
|
7
7
|
import { builtinGatewayKnowledgeMethodDescriptors, } from './method-catalog-knowledge.js';
|
|
8
8
|
import { builtinGatewayMediaMethodDescriptors, } from './method-catalog-media.js';
|
|
9
|
+
import { builtinGatewayPushMethodDescriptors, } from './method-catalog-push.js';
|
|
9
10
|
import { builtinGatewayRuntimeMethodDescriptors, } from './method-catalog-runtime.js';
|
|
10
11
|
import { GatewayVerbError } from './routes/gateway-verb-error.js';
|
|
11
12
|
import { SDKErrorCodes } from '@pellux/goodvibes-errors';
|
|
@@ -19,6 +20,7 @@ const BUILTIN_GATEWAY_METHODS = [
|
|
|
19
20
|
...builtinGatewayKnowledgeMethodDescriptors,
|
|
20
21
|
...builtinGatewayMediaMethodDescriptors,
|
|
21
22
|
...builtinGatewayAdminMethodDescriptors,
|
|
23
|
+
...builtinGatewayPushMethodDescriptors,
|
|
22
24
|
];
|
|
23
25
|
function normalizeDescriptor(descriptor) {
|
|
24
26
|
const id = descriptor.id.trim();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* operator-contract-schemas-fleet.ts
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* (see CHANGELOG 1.0.0) — contract schemas for fleet.*, checkpoints.*, and sessions.search.
|
|
5
5
|
* Split out of operator-contract-schemas-runtime.ts (which was already at
|
|
6
6
|
* the 800-line source-file cap) rather than grown into it; re-exported
|
|
7
7
|
* through operator-contract-schemas.ts alongside the other schema modules.
|
|
@@ -65,4 +65,19 @@ export declare const HEALTH_SNAPSHOT_SCHEMA: Record<string, unknown>;
|
|
|
65
65
|
export declare const INTELLIGENCE_SNAPSHOT_SCHEMA: Record<string, unknown>;
|
|
66
66
|
export declare const MEMORY_VECTOR_STATS_SCHEMA: Record<string, unknown>;
|
|
67
67
|
export declare const MEMORY_DOCTOR_REPORT_SCHEMA: Record<string, unknown>;
|
|
68
|
+
export declare const MEMORY_SCOPE_SCHEMA: Record<string, unknown>;
|
|
69
|
+
export declare const MEMORY_CLASS_SCHEMA: Record<string, unknown>;
|
|
70
|
+
export declare const MEMORY_REVIEW_STATE_SCHEMA: Record<string, unknown>;
|
|
71
|
+
export declare const MEMORY_PROVENANCE_KIND_SCHEMA: Record<string, unknown>;
|
|
72
|
+
export declare const MEMORY_PROVENANCE_LINK_SCHEMA: Record<string, unknown>;
|
|
73
|
+
export declare const MEMORY_RECORD_SCHEMA: Record<string, unknown>;
|
|
74
|
+
export declare const MEMORY_RECORD_SEARCH_OUTPUT_SCHEMA: Record<string, unknown>;
|
|
75
|
+
export declare const MEMORY_RECORD_DELETE_OUTPUT_SCHEMA: Record<string, unknown>;
|
|
76
|
+
export declare const MEMORY_LINK_SCHEMA: Record<string, unknown>;
|
|
77
|
+
export declare const MEMORY_SEMANTIC_RESULT_SCHEMA: Record<string, unknown>;
|
|
78
|
+
export declare const MEMORY_BUNDLE_SCHEMA: Record<string, unknown>;
|
|
79
|
+
export declare const MEMORY_IMPORT_RESULT_SCHEMA: Record<string, unknown>;
|
|
80
|
+
export declare const MEMORY_RECORD_LIST_OUTPUT_SCHEMA: Record<string, unknown>;
|
|
81
|
+
export declare const MEMORY_RECORD_SEMANTIC_OUTPUT_SCHEMA: Record<string, unknown>;
|
|
82
|
+
export declare const MEMORY_RECORD_LINKS_OUTPUT_SCHEMA: Record<string, unknown>;
|
|
68
83
|
//# sourceMappingURL=operator-contract-schemas-runtime.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operator-contract-schemas-runtime.d.ts","sourceRoot":"","sources":["../../../src/platform/control-plane/operator-contract-schemas-runtime.ts"],"names":[],"mappings":"AAmCA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,+BAA+B,EAAyB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AA6B7F,eAAO,MAAM,iCAAiC,yBAQA,CAAC;AAE/C;;;;;GAKG;AACH,eAAO,MAAM,oCAAoC,yBAOe,CAAC;AAEjE,eAAO,MAAM,6BAA6B,yBAasB,CAAC;AAEjE,eAAO,MAAM,4BAA4B,yBAuBqI,CAAC;AAE/K,eAAO,MAAM,6BAA6B,yBAYsF,CAAC;AAEjI,eAAO,MAAM,6BAA6B,yBAO4B,CAAC;AAEvE,eAAO,MAAM,2CAA2C,yBAG7B,CAAC;AAE5B,eAAO,MAAM,mCAAmC,yBAOtB,CAAC;AAE3B,eAAO,MAAM,mCAAmC,yBAGnB,CAAC;AAE9B,eAAO,MAAM,oCAAoC,yBAkB/C,CAAC;AAEH,eAAO,MAAM,kCAAkC,yBAqB0D,CAAC;AAE1G,eAAO,MAAM,uBAAuB,yBAWoE,CAAC;AAEzG,eAAO,MAAM,8BAA8B,yBAOjB,CAAC;AAE3B,eAAO,MAAM,mCAAmC,yBAGrB,CAAC;AAE5B,eAAO,MAAM,iCAAiC,yBAGrB,CAAC;AAE1B,eAAO,MAAM,mCAAmC,yBAEjC,CAAC;AAEhB;;;;;;GAMG;AACH,eAAO,MAAM,qCAAqC,yBAIvB,CAAC;AAE5B,eAAO,MAAM,+CAA+C,yBAIlB,CAAC;AAE3C,eAAO,MAAM,2CAA2C,yBAMF,CAAC;AAEvD,eAAO,MAAM,0CAA0C;;CAK7C,CAAC;AAUX,eAAO,MAAM,mBAAmB,yBAqByD,CAAC;AAE1F,eAAO,MAAM,oBAAoB,yBAsBsB,CAAC;AAExD,eAAO,MAAM,wBAAwB,yBAgBO,CAAC;AAE7C,eAAO,MAAM,yBAAyB,yBASc,CAAC;AAErD,eAAO,MAAM,kBAAkB,yBAEnB,CAAC;AAEb,eAAO,MAAM,yBAAyB,yBAIM,CAAC;AAE7C,eAAO,MAAM,yBAAyB,yBAUiE,CAAC;AAWxG,eAAO,MAAM,6BAA6B,yBAgB8C,CAAC;AAEzF,eAAO,MAAM,wBAAwB,yBASuG,CAAC;AAE7I,eAAO,MAAM,4BAA4B,yBAIU,CAAC;AAOpD,eAAO,MAAM,6BAA6B,yBAKS,CAAC;AAEpD,eAAO,MAAM,6BAA6B,yBAE1B,CAAC;AA0EjB,eAAO,MAAM,gCAAgC,yBAMkB,CAAC;AAEhE,eAAO,MAAM,8BAA8B,yBAcqD,CAAC;AAqEjG,eAAO,MAAM,gCAAgC,yBAKmB,CAAC;AAEjE,eAAO,MAAM,sBAAsB,yBAcyF,CAAC;AAE7H,eAAO,MAAM,4BAA4B,yBASyG,CAAC;AAqBnJ,eAAO,MAAM,0BAA0B,yBAUyH,CAAC;AAEjK,eAAO,MAAM,2BAA2B,yBAIC,CAAC"}
|
|
1
|
+
{"version":3,"file":"operator-contract-schemas-runtime.d.ts","sourceRoot":"","sources":["../../../src/platform/control-plane/operator-contract-schemas-runtime.ts"],"names":[],"mappings":"AAmCA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,+BAA+B,EAAyB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AA6B7F,eAAO,MAAM,iCAAiC,yBAQA,CAAC;AAE/C;;;;;GAKG;AACH,eAAO,MAAM,oCAAoC,yBAOe,CAAC;AAEjE,eAAO,MAAM,6BAA6B,yBAasB,CAAC;AAEjE,eAAO,MAAM,4BAA4B,yBAuBqI,CAAC;AAE/K,eAAO,MAAM,6BAA6B,yBAYsF,CAAC;AAEjI,eAAO,MAAM,6BAA6B,yBAO4B,CAAC;AAEvE,eAAO,MAAM,2CAA2C,yBAG7B,CAAC;AAE5B,eAAO,MAAM,mCAAmC,yBAOtB,CAAC;AAE3B,eAAO,MAAM,mCAAmC,yBAGnB,CAAC;AAE9B,eAAO,MAAM,oCAAoC,yBAkB/C,CAAC;AAEH,eAAO,MAAM,kCAAkC,yBAqB0D,CAAC;AAE1G,eAAO,MAAM,uBAAuB,yBAWoE,CAAC;AAEzG,eAAO,MAAM,8BAA8B,yBAOjB,CAAC;AAE3B,eAAO,MAAM,mCAAmC,yBAGrB,CAAC;AAE5B,eAAO,MAAM,iCAAiC,yBAGrB,CAAC;AAE1B,eAAO,MAAM,mCAAmC,yBAEjC,CAAC;AAEhB;;;;;;GAMG;AACH,eAAO,MAAM,qCAAqC,yBAIvB,CAAC;AAE5B,eAAO,MAAM,+CAA+C,yBAIlB,CAAC;AAE3C,eAAO,MAAM,2CAA2C,yBAMF,CAAC;AAEvD,eAAO,MAAM,0CAA0C;;CAK7C,CAAC;AAUX,eAAO,MAAM,mBAAmB,yBAqByD,CAAC;AAE1F,eAAO,MAAM,oBAAoB,yBAsBsB,CAAC;AAExD,eAAO,MAAM,wBAAwB,yBAgBO,CAAC;AAE7C,eAAO,MAAM,yBAAyB,yBASc,CAAC;AAErD,eAAO,MAAM,kBAAkB,yBAEnB,CAAC;AAEb,eAAO,MAAM,yBAAyB,yBAIM,CAAC;AAE7C,eAAO,MAAM,yBAAyB,yBAUiE,CAAC;AAWxG,eAAO,MAAM,6BAA6B,yBAgB8C,CAAC;AAEzF,eAAO,MAAM,wBAAwB,yBASuG,CAAC;AAE7I,eAAO,MAAM,4BAA4B,yBAIU,CAAC;AAOpD,eAAO,MAAM,6BAA6B,yBAKS,CAAC;AAEpD,eAAO,MAAM,6BAA6B,yBAE1B,CAAC;AA0EjB,eAAO,MAAM,gCAAgC,yBAMkB,CAAC;AAEhE,eAAO,MAAM,8BAA8B,yBAcqD,CAAC;AAqEjG,eAAO,MAAM,gCAAgC,yBAKmB,CAAC;AAEjE,eAAO,MAAM,sBAAsB,yBAcyF,CAAC;AAE7H,eAAO,MAAM,4BAA4B,yBASyG,CAAC;AAqBnJ,eAAO,MAAM,0BAA0B,yBAUyH,CAAC;AAEjK,eAAO,MAAM,2BAA2B,yBAIC,CAAC;AAG1C,eAAO,MAAM,mBAAmB,yBAA6C,CAAC;AAC9E,eAAO,MAAM,mBAAmB,yBAE9B,CAAC;AACH,eAAO,MAAM,0BAA0B,yBAA6D,CAAC;AACrG,eAAO,MAAM,6BAA6B,yBAA2D,CAAC;AAEtG,eAAO,MAAM,6BAA6B,yBAIvB,CAAC;AAEpB,eAAO,MAAM,oBAAoB,yBAeiH,CAAC;AAEnJ,eAAO,MAAM,kCAAkC,yBAUiI,CAAC;AAEjL,eAAO,MAAM,kCAAkC,yBAG1B,CAAC;AAItB,eAAO,MAAM,kBAAkB,yBAKgB,CAAC;AAIhD,eAAO,MAAM,6BAA6B,yBAKL,CAAC;AAEtC,eAAO,MAAM,oBAAoB,yBAQ2D,CAAC;AAE7F,eAAO,MAAM,2BAA2B,yBAIkB,CAAC;AAE3D,eAAO,MAAM,gCAAgC,yBAE9B,CAAC;AAEhB,eAAO,MAAM,oCAAoC,yBAElC,CAAC;AAEhB,eAAO,MAAM,iCAAiC,yBAEjC,CAAC"}
|
|
@@ -620,3 +620,84 @@ export const MEMORY_DOCTOR_REPORT_SCHEMA = objectSchema({
|
|
|
620
620
|
embeddings: MEMORY_EMBEDDING_DOCTOR_REPORT_SCHEMA,
|
|
621
621
|
checkedAt: NUMBER_SCHEMA,
|
|
622
622
|
}, ['vector', 'embeddings', 'checkedAt']);
|
|
623
|
+
// ── Memory record wire schemas (daemon-owned single-writer store) ──────────────
|
|
624
|
+
export const MEMORY_SCOPE_SCHEMA = enumSchema(['session', 'project', 'team']);
|
|
625
|
+
export const MEMORY_CLASS_SCHEMA = enumSchema([
|
|
626
|
+
'decision', 'constraint', 'incident', 'pattern', 'fact', 'risk', 'runbook', 'architecture', 'ownership',
|
|
627
|
+
]);
|
|
628
|
+
export const MEMORY_REVIEW_STATE_SCHEMA = enumSchema(['fresh', 'reviewed', 'stale', 'contradicted']);
|
|
629
|
+
export const MEMORY_PROVENANCE_KIND_SCHEMA = enumSchema(['session', 'turn', 'task', 'event', 'file']);
|
|
630
|
+
export const MEMORY_PROVENANCE_LINK_SCHEMA = objectSchema({
|
|
631
|
+
kind: MEMORY_PROVENANCE_KIND_SCHEMA,
|
|
632
|
+
ref: STRING_SCHEMA,
|
|
633
|
+
label: STRING_SCHEMA,
|
|
634
|
+
}, ['kind', 'ref']);
|
|
635
|
+
export const MEMORY_RECORD_SCHEMA = objectSchema({
|
|
636
|
+
id: STRING_SCHEMA,
|
|
637
|
+
scope: MEMORY_SCOPE_SCHEMA,
|
|
638
|
+
cls: MEMORY_CLASS_SCHEMA,
|
|
639
|
+
summary: STRING_SCHEMA,
|
|
640
|
+
detail: STRING_SCHEMA,
|
|
641
|
+
tags: STRING_LIST_SCHEMA,
|
|
642
|
+
provenance: arraySchema(MEMORY_PROVENANCE_LINK_SCHEMA),
|
|
643
|
+
reviewState: MEMORY_REVIEW_STATE_SCHEMA,
|
|
644
|
+
confidence: NUMBER_SCHEMA,
|
|
645
|
+
reviewedAt: NUMBER_SCHEMA,
|
|
646
|
+
reviewedBy: STRING_SCHEMA,
|
|
647
|
+
staleReason: STRING_SCHEMA,
|
|
648
|
+
createdAt: NUMBER_SCHEMA,
|
|
649
|
+
updatedAt: NUMBER_SCHEMA,
|
|
650
|
+
}, ['id', 'scope', 'cls', 'summary', 'tags', 'provenance', 'reviewState', 'confidence', 'createdAt', 'updatedAt'], { additionalProperties: true });
|
|
651
|
+
export const MEMORY_RECORD_SEARCH_OUTPUT_SCHEMA = objectSchema({
|
|
652
|
+
records: arraySchema(MEMORY_RECORD_SCHEMA),
|
|
653
|
+
mode: enumSchema(['literal', 'semantic']),
|
|
654
|
+
requestedSemantic: BOOLEAN_SCHEMA,
|
|
655
|
+
indexUnavailableReason: nullableSchema(STRING_SCHEMA),
|
|
656
|
+
caveat: nullableSchema(STRING_SCHEMA),
|
|
657
|
+
recallFiltered: BOOLEAN_SCHEMA,
|
|
658
|
+
excludedFlaggedCount: NUMBER_SCHEMA,
|
|
659
|
+
excludedBelowFloorCount: NUMBER_SCHEMA,
|
|
660
|
+
totalBeforeRecallFilter: NUMBER_SCHEMA,
|
|
661
|
+
}, ['records', 'mode', 'requestedSemantic', 'indexUnavailableReason', 'caveat', 'recallFiltered', 'excludedFlaggedCount', 'excludedBelowFloorCount', 'totalBeforeRecallFilter']);
|
|
662
|
+
export const MEMORY_RECORD_DELETE_OUTPUT_SCHEMA = objectSchema({
|
|
663
|
+
id: STRING_SCHEMA,
|
|
664
|
+
deleted: BOOLEAN_SCHEMA,
|
|
665
|
+
}, ['id', 'deleted']);
|
|
666
|
+
// ── Full-detach catalog wire schemas (1.2.0) ──────────────────────────────────
|
|
667
|
+
export const MEMORY_LINK_SCHEMA = objectSchema({
|
|
668
|
+
fromId: STRING_SCHEMA,
|
|
669
|
+
toId: STRING_SCHEMA,
|
|
670
|
+
relation: STRING_SCHEMA,
|
|
671
|
+
createdAt: NUMBER_SCHEMA,
|
|
672
|
+
}, ['fromId', 'toId', 'relation', 'createdAt']);
|
|
673
|
+
// distance may be Infinity for a no-vector-match fallback; JSON serializes that to
|
|
674
|
+
// null, so the wire field is nullable — honest about the "not ranked by vector" case.
|
|
675
|
+
export const MEMORY_SEMANTIC_RESULT_SCHEMA = objectSchema({
|
|
676
|
+
record: MEMORY_RECORD_SCHEMA,
|
|
677
|
+
distance: nullableSchema(NUMBER_SCHEMA),
|
|
678
|
+
similarity: NUMBER_SCHEMA,
|
|
679
|
+
score: NUMBER_SCHEMA,
|
|
680
|
+
}, ['record', 'similarity', 'score']);
|
|
681
|
+
export const MEMORY_BUNDLE_SCHEMA = objectSchema({
|
|
682
|
+
schemaVersion: enumSchema(['v1']),
|
|
683
|
+
exportedAt: NUMBER_SCHEMA,
|
|
684
|
+
scope: enumSchema(['session', 'project', 'team', 'all']),
|
|
685
|
+
recordCount: NUMBER_SCHEMA,
|
|
686
|
+
linkCount: NUMBER_SCHEMA,
|
|
687
|
+
records: arraySchema(MEMORY_RECORD_SCHEMA),
|
|
688
|
+
links: arraySchema(MEMORY_LINK_SCHEMA),
|
|
689
|
+
}, ['schemaVersion', 'exportedAt', 'scope', 'recordCount', 'linkCount', 'records', 'links']);
|
|
690
|
+
export const MEMORY_IMPORT_RESULT_SCHEMA = objectSchema({
|
|
691
|
+
importedRecords: NUMBER_SCHEMA,
|
|
692
|
+
skippedRecords: NUMBER_SCHEMA,
|
|
693
|
+
importedLinks: NUMBER_SCHEMA,
|
|
694
|
+
}, ['importedRecords', 'skippedRecords', 'importedLinks']);
|
|
695
|
+
export const MEMORY_RECORD_LIST_OUTPUT_SCHEMA = objectSchema({
|
|
696
|
+
records: arraySchema(MEMORY_RECORD_SCHEMA),
|
|
697
|
+
}, ['records']);
|
|
698
|
+
export const MEMORY_RECORD_SEMANTIC_OUTPUT_SCHEMA = objectSchema({
|
|
699
|
+
results: arraySchema(MEMORY_SEMANTIC_RESULT_SCHEMA),
|
|
700
|
+
}, ['results']);
|
|
701
|
+
export const MEMORY_RECORD_LINKS_OUTPUT_SCHEMA = objectSchema({
|
|
702
|
+
links: arraySchema(MEMORY_LINK_SCHEMA),
|
|
703
|
+
}, ['links']);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* routes/checkpoints.ts
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* (see CHANGELOG 1.0.0) — `checkpoints.list` / `checkpoints.create` / `checkpoints.diff` /
|
|
5
5
|
* `checkpoints.restore` gateway-method handlers over the ALREADY
|
|
6
6
|
* daemon-resident `WorkspaceCheckpointManager` (constructed +
|
|
7
7
|
* eagerly-`init()`'d at ../../runtime/services.ts:620, exposed on
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* routes/fleet.ts
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* `fleet.snapshot` / `fleet.list` gateway-method handlers (see CHANGELOG 1.0.0) over the
|
|
5
5
|
* ALREADY daemon-resident `ProcessRegistry` (createProcessRegistry(),
|
|
6
6
|
* ../../runtime/fleet/registry.ts:204, constructed + exposed on
|
|
7
7
|
* RuntimeServices at ../../runtime/services.ts:712/:242). This is thin verb
|
|
@@ -27,7 +27,7 @@ import type { GatewayMethodCatalog } from '../method-catalog.js';
|
|
|
27
27
|
import type { GatewayMethodHandler } from '../method-catalog-shared.js';
|
|
28
28
|
import type { ProcessRegistry } from '../../runtime/fleet/types.js';
|
|
29
29
|
/**
|
|
30
|
-
* `fleet.snapshot` payload cap
|
|
30
|
+
* `fleet.snapshot` payload cap: the registry's
|
|
31
31
|
* `query()` is a cheap O(n) in-memory scan, but the wire response must not
|
|
32
32
|
* grow unbounded with fleet size. Nodes beyond this cap are dropped (newest
|
|
33
33
|
* activity first is NOT guaranteed here — see `truncated`/`totalCount` so a
|
|
@@ -2,7 +2,7 @@ import { paginateItems } from '@pellux/goodvibes-daemon-sdk';
|
|
|
2
2
|
import { GatewayVerbError } from './gateway-verb-error.js';
|
|
3
3
|
import { readInvocationParams } from './invocation-params.js';
|
|
4
4
|
/**
|
|
5
|
-
* `fleet.snapshot` payload cap
|
|
5
|
+
* `fleet.snapshot` payload cap: the registry's
|
|
6
6
|
* `query()` is a cheap O(n) in-memory scan, but the wire response must not
|
|
7
7
|
* grow unbounded with fleet size. Nodes beyond this cap are dropped (newest
|
|
8
8
|
* activity first is NOT guaranteed here — see `truncated`/`totalCount` so a
|