@plurnk/plurnk-contracts 9.0.0 → 10.0.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/.env.defaults +1 -19
- package/README.md +5 -6
- package/SPEC.md +93 -44
- package/dist/schema/DaemonNotificationEnvelope.json +77 -30
- package/dist/schema/FunctionalityCandidate.json +4 -0
- package/dist/schema/FunctionalityDiscoverQuery.json +12 -0
- package/dist/schema/FunctionalityDiscoverResult.json +10 -0
- package/dist/schema/FunctionalityListQuery.json +33 -0
- package/dist/schema/FunctionalityListResult.json +16 -1
- package/dist/schema/ModelCatalogPage.json +9 -0
- package/dist/schema/PlurnkStatement.json +18 -2
- package/dist/schema/ProviderAccounting.json +3 -3
- package/dist/schema/ProviderCost.json +1 -1
- package/dist/schema/ProviderRequestAccounting.json +3 -3
- package/dist/schema/ProviderUsage.json +1 -1
- package/dist/src/ActorIdentity.d.ts +26 -0
- package/dist/src/ActorIdentity.d.ts.map +1 -0
- package/dist/src/ActorIdentity.js +179 -0
- package/dist/src/ActorIdentity.js.map +1 -0
- package/dist/src/Application.d.ts +38 -126
- package/dist/src/Application.d.ts.map +1 -1
- package/dist/src/Application.js +47 -220
- package/dist/src/Application.js.map +1 -1
- package/dist/src/ApplicationNotifications.d.ts +19 -6
- package/dist/src/ApplicationNotifications.d.ts.map +1 -1
- package/dist/src/ApplicationNotifications.js +6 -3
- package/dist/src/ApplicationNotifications.js.map +1 -1
- package/dist/src/ApplicationPort.d.ts +27 -6
- package/dist/src/ApplicationPort.d.ts.map +1 -1
- package/dist/src/ApplicationPort.js +1 -1
- package/dist/src/ApplicationPort.js.map +1 -1
- package/dist/src/ApplicationStream.d.ts +2 -2
- package/dist/src/ApplicationStream.d.ts.map +1 -1
- package/dist/src/ApplicationStream.js.map +1 -1
- package/dist/src/CollectionCommand.d.ts +33 -0
- package/dist/src/CollectionCommand.d.ts.map +1 -0
- package/dist/src/CollectionCommand.js +277 -0
- package/dist/src/CollectionCommand.js.map +1 -0
- package/dist/src/Functionality.d.ts +7 -2
- package/dist/src/Functionality.d.ts.map +1 -1
- package/dist/src/Functionality.js.map +1 -1
- package/dist/src/HttpOrigin.d.ts +79 -10
- package/dist/src/HttpOrigin.d.ts.map +1 -1
- package/dist/src/HttpOrigin.js +286 -44
- package/dist/src/HttpOrigin.js.map +1 -1
- package/dist/src/HttpPort.d.ts +35 -0
- package/dist/src/HttpPort.d.ts.map +1 -0
- package/dist/src/HttpPort.js +106 -0
- package/dist/src/HttpPort.js.map +1 -0
- package/dist/src/InteractiveCommands.d.ts +96 -0
- package/dist/src/InteractiveCommands.d.ts.map +1 -0
- package/dist/src/InteractiveCommands.js +409 -0
- package/dist/src/InteractiveCommands.js.map +1 -0
- package/dist/src/McpWireTool.d.ts +27 -0
- package/dist/src/McpWireTool.d.ts.map +1 -0
- package/dist/src/McpWireTool.js +30 -0
- package/dist/src/McpWireTool.js.map +1 -0
- package/dist/src/OAuthClient.d.ts +64 -0
- package/dist/src/OAuthClient.d.ts.map +1 -0
- package/dist/src/OAuthClient.js +226 -0
- package/dist/src/OAuthClient.js.map +1 -0
- package/dist/src/ScheduleCommand.d.ts +60 -0
- package/dist/src/ScheduleCommand.d.ts.map +1 -0
- package/dist/src/ScheduleCommand.js +677 -0
- package/dist/src/ScheduleCommand.js.map +1 -0
- package/dist/src/SessionProjection.d.ts +91 -0
- package/dist/src/SessionProjection.d.ts.map +1 -0
- package/dist/src/SessionProjection.js +223 -0
- package/dist/src/SessionProjection.js.map +1 -0
- package/dist/src/Validator.d.ts +2 -1
- package/dist/src/Validator.d.ts.map +1 -1
- package/dist/src/Validator.js +19 -1
- package/dist/src/Validator.js.map +1 -1
- package/dist/src/index.d.ts +10 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +7 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/types.generated.d.ts +85 -21
- package/dist/src/types.generated.d.ts.map +1 -1
- package/dist/src/types.generated.js.map +1 -1
- package/package.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationNotifications.js","sourceRoot":"","sources":["../../src/ApplicationNotifications.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AActD;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC,MAAM,CAAC;IACpD,mBAAmB;IACnB,mBAAmB;IACnB,oBAAoB;IACpB,uBAAuB;IACvB,iBAAiB;IACjB,kBAAkB;IAClB,iBAAiB;IACjB,gBAAgB;IAChB,gBAAgB;IAChB,eAAe;IACf,kBAAkB;IAClB,mBAAmB;IACnB,iBAAiB;IACjB,WAAW;IACX,kBAAkB;IAClB,cAAc;CACR,CAAC,CAAC;AAIZ,MAAM,6BAA6B,GAAwB,IAAI,GAAG,CAAC,0BAA0B,CAAC,CAAC;AAE/F,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,KAAc,EAAoC,EAAE,CAC1F,OAAO,KAAK,KAAK,QAAQ,IAAI,6BAA6B,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAE1E;;;GAGG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,MAAM,CAAC,MAAM,CAAC;IAC3D,uBAAuB;IACvB,aAAa;IACb,cAAc;IACd,iBAAiB;IACjB,mBAAmB;CACb,CAAC,CAAC;AAIZ,MAAM,oCAAoC,GAAwB,IAAI,GAAG,CAAC,iCAAiC,CAAC,CAAC;AAE7G,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,KAAc,EAA0C,EAAE,CACtG,OAAO,KAAK,KAAK,QAAQ,IAAI,oCAAoC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAEjF;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,MAAc,EAAW,EAAE;IAChE,IACI,MAAM,CAAC,MAAM,KAAK,kBAAkB;QACpC,MAAM,CAAC,MAAM,KAAK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C,WAAW,EAAE,CAAC;QACtF,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;QACjC,IAAI,YAAY,CAAC,SAAS,KAAK,MAAM,CAAC,SAAS;YAAE,OAAO,IAAI,CAAC;QAC7D,IACI,CAAC,YAAY,CAAC,KAAK,KAAK,kBAAkB,IAAI,YAAY,CAAC,KAAK,KAAK,iBAAiB,CAAC;YACvF,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC;YAC3B,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC;YAC3C,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,EACzD,CAAC;YACC,OAAO,IAAI,CAAC;QAChB,CAAC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC","sourcesContent":["import type {\n ApplicationLoopPacket,\n ApplicationSessionArchiving,\n ApplicationSessionDeletion,\n ApplicationSessionKind,\n ApplicationSessionOrigin,\n ApplicationSessionTitling,\n ApplicationWorkspaceArchiving,\n LogEntryWire,\n ProposalDecision,\n} from \"./Application.ts\";\nimport { isRecord, isSafeInteger } from \"./guards.ts\";\nimport type { LoopLifecycle } from \"./LoopLifecycle.ts\";\nimport type {\n ClientEntryChannel,\n ClientInteractionProjection,\n FunctionalityPreparationActivity,\n JsonSchema,\n ModelRoute,\n Notice,\n OperationResult,\n ProposalProjection,\n} from \"./types.ts\";\nimport type { DaemonNotificationEnvelope, ProviderAccounting } from \"./types.generated.ts\";\n\n/**\n * {§application-session-observation} The closed alphabet of discrete daemon notification events\n * emitted across `ApplicationPort.subscribeToEvents` and `GET /notifications`.\n */\nexport const DAEMON_NOTIFICATION_EVENTS = Object.freeze([\n \"workspace/created\",\n \"workspace/renamed\",\n \"workspace/archived\",\n \"functionality/changed\",\n \"session/created\",\n \"session/archived\",\n \"session/deleted\",\n \"session/titled\",\n \"session/policy\",\n \"loop/proposal\",\n \"loop/interaction\",\n \"loop/gate-settled\",\n \"loop/terminated\",\n \"log/entry\",\n \"stream/concluded\",\n \"notice/event\",\n] as const);\n\nexport type DaemonNotificationEvent = (typeof DAEMON_NOTIFICATION_EVENTS)[number];\n\nconst DAEMON_NOTIFICATION_EVENT_SET: ReadonlySet<string> = new Set(DAEMON_NOTIFICATION_EVENTS);\n\nexport const isDaemonNotificationEvent = (value: unknown): value is DaemonNotificationEvent =>\n typeof value === \"string\" && DAEMON_NOTIFICATION_EVENT_SET.has(value);\n\n/**\n * {§application-session-observation} In-process sub-turn streaming and telemetry callbacks\n * consumed by exterior protocol adapters (`plurnk-acp`, `plurnk-mcp`), never streamed on `GET /notifications`.\n */\nexport const APPLICATION_RUNTIME_STREAM_EVENTS = Object.freeze([\n \"workspace/preparation\",\n \"loop/packet\",\n \"stream/event\",\n \"reasoning/event\",\n \"runtime/telemetry\",\n] as const);\n\nexport type ApplicationRuntimeStreamEvent = (typeof APPLICATION_RUNTIME_STREAM_EVENTS)[number];\n\nconst APPLICATION_RUNTIME_STREAM_EVENT_SET: ReadonlySet<string> = new Set(APPLICATION_RUNTIME_STREAM_EVENTS);\n\nexport const isApplicationRuntimeStreamEvent = (value: unknown): value is ApplicationRuntimeStreamEvent =>\n typeof value === \"string\" && APPLICATION_RUNTIME_STREAM_EVENT_SET.has(value);\n\n/**\n * {§notifications} Classifies internal turn/lifecycle/derivation/progress telemetry notices that belong\n * on `ApplicationPort.subscribeToRuntimeStream` (`runtime/telemetry`) rather than public `notice/event`.\n */\nexport const isRuntimeTelemetryNotice = (notice: Notice): boolean => {\n if (\n notice.source === \"engine:lifecycle\" ||\n notice.source === \"engine:derivation\" ||\n notice.source === \"engine:emission\"\n ) {\n return true;\n }\n if (\n notice.source === \"engine:turn\" &&\n (notice.kind === \"turn_awaiting_model\" ||\n notice.kind === \"turn_generated\" ||\n notice.kind === \"results_pending\")\n ) {\n return true;\n }\n if (notice.source.startsWith(\"exec:\") && typeof (notice as Record<string, unknown>).percent === \"number\") {\n return true;\n }\n return typeof notice.message !== \"string\" || notice.message.trim().length === 0;\n};\n\nexport interface WorkspaceCreatedNotification {\n readonly id: number;\n readonly name: string;\n readonly projectRoot: string | null;\n readonly projectLabel: string | null;\n}\n\nexport interface WorkspaceRenamedNotification {\n readonly id: number;\n readonly name: string;\n}\n\nexport type WorkspaceArchivedNotification = ApplicationWorkspaceArchiving;\n\nexport interface WorkspacePreparationNotification {\n readonly workspaceId: number;\n readonly preparation: readonly FunctionalityPreparationActivity[];\n}\n\nexport interface FunctionalityChangedNotification {\n readonly workspaceId: number;\n readonly sessionId: number | null;\n readonly family: string;\n}\n\nexport interface SessionCreatedNotification {\n readonly id: number;\n readonly workspaceId: number;\n readonly workspaceName: string;\n readonly projectRoot: string | null;\n readonly projectLabel: string | null;\n readonly name: string;\n readonly parentSessionId: number | null;\n readonly origin: ApplicationSessionOrigin;\n readonly kind: ApplicationSessionKind;\n readonly lifecycle: LoopLifecycle;\n readonly persona?: string | null;\n}\n\nexport type SessionArchivedNotification = ApplicationSessionArchiving;\n\nexport type SessionDeletedNotification = ApplicationSessionDeletion;\n\nexport type SessionTitledNotification = ApplicationSessionTitling;\n\nexport interface SessionPolicyNotification {\n readonly sessionId: number;\n readonly model: ModelRoute | null;\n readonly spawnModel: ModelRoute | null;\n readonly persona?: string | null;\n}\n\nexport type LoopPacketNotification = ApplicationLoopPacket;\n\n// {§methods-invocation} The row exactly as core sends it.\nexport interface LogEntryNotification {\n readonly entry: LogEntryWire;\n}\n\nexport type ProposalNotification = ProposalProjection;\n\nexport type LoopInteractionNotification = ClientInteractionProjection;\n\nexport type LoopGateSettledNotification =\n | {\n readonly kind: \"proposal\";\n readonly sessionId: number;\n readonly loopId: number;\n readonly logEntryId: number;\n readonly decision: ProposalDecision;\n readonly outcome: string;\n }\n | {\n readonly kind: \"interaction\";\n readonly sessionId: number;\n readonly loopId: number;\n readonly interactionId: number;\n readonly action: \"accept\" | \"decline\" | \"cancel\";\n };\n\nexport interface StreamEventNotification {\n readonly entryId: number;\n readonly sessionId: number;\n readonly target: string;\n readonly channel: string;\n readonly state: ClientEntryChannel[\"state\"];\n readonly contentLength: number;\n readonly loop_seq?: number;\n readonly turn_seq?: number;\n readonly sequence?: number;\n readonly mimetype?: string;\n}\n\nexport interface StreamConcludedNotification {\n readonly sessionId: number;\n readonly entryId: number;\n readonly target: string;\n readonly subscriptionId: number;\n readonly result: OperationResult;\n readonly scheme: string;\n readonly summary: string;\n readonly wakeAction: string;\n readonly loop_seq?: number;\n readonly turn_seq?: number;\n readonly sequence?: number;\n}\n\nexport type ReasoningEventNotification = {\n readonly sessionId: number;\n readonly loopId: number;\n readonly turnId: number;\n readonly loopSeq: number;\n readonly turnSeq: number;\n readonly modelCallId: number;\n readonly requestSequence: number;\n} & (\n | { readonly phase: \"start\" | \"end\" }\n | { readonly phase: \"content\"; readonly delta: string }\n);\n\nexport interface NoticeEventNotification {\n readonly sessionId: number | null;\n readonly loopId: number;\n readonly notice: Notice;\n}\n\nexport interface TerminatedNotification {\n readonly sessionId: number;\n readonly loopId: number;\n // {§notifications} — the loop's number among its session's loops.\n readonly loopSeq: number;\n readonly result: OperationResult;\n readonly hitMaxTurns: boolean;\n readonly turnIds: number[];\n readonly attributions: string[];\n // {§notifications} — when the loop concluded, Unix milliseconds.\n readonly terminatedAt: number;\n readonly usage: {\n readonly accounting: ProviderAccounting;\n readonly curationWeight: number | null;\n readonly curationBudget: number | null;\n readonly contextTokens: number | null;\n readonly contextCapacity: number | null;\n readonly meta: Record<string, unknown>;\n };\n}\n\nexport interface NotificationsResyncPayload {\n readonly reason: \"restarted\" | \"evicted\" | \"malformed\";\n readonly epoch: string;\n readonly latestId: number;\n}\n\nexport type NotificationReplayResult =\n | {\n readonly status: \"ok\";\n readonly epoch: string;\n readonly events: readonly DaemonNotification[];\n }\n | {\n readonly status: \"resync\";\n readonly resync: NotificationsResyncPayload;\n };\n\nexport interface DaemonNotificationPayloadMap {\n readonly \"workspace/created\": WorkspaceCreatedNotification;\n readonly \"workspace/renamed\": WorkspaceRenamedNotification;\n readonly \"workspace/archived\": WorkspaceArchivedNotification;\n readonly \"functionality/changed\": FunctionalityChangedNotification;\n readonly \"session/created\": SessionCreatedNotification;\n readonly \"session/archived\": SessionArchivedNotification;\n readonly \"session/deleted\": SessionDeletedNotification;\n readonly \"session/titled\": SessionTitledNotification;\n readonly \"session/policy\": SessionPolicyNotification;\n readonly \"loop/proposal\": ProposalNotification;\n readonly \"loop/interaction\": LoopInteractionNotification;\n readonly \"loop/gate-settled\": LoopGateSettledNotification;\n readonly \"loop/terminated\": TerminatedNotification;\n readonly \"log/entry\": LogEntryNotification;\n readonly \"stream/concluded\": StreamConcludedNotification;\n readonly \"notice/event\": NoticeEventNotification;\n}\n\nexport interface ApplicationRuntimeStreamPayloadMap {\n readonly \"workspace/preparation\": WorkspacePreparationNotification;\n readonly \"loop/packet\": LoopPacketNotification;\n readonly \"stream/event\": StreamEventNotification;\n readonly \"reasoning/event\": ReasoningEventNotification;\n readonly \"runtime/telemetry\": NoticeEventNotification;\n}\n\nexport type ApplicationRuntimeStreamHandler = <\n E extends ApplicationRuntimeStreamEvent = ApplicationRuntimeStreamEvent,\n>(\n workspaceId: number,\n method: E,\n params: ApplicationRuntimeStreamPayloadMap[E],\n) => void;\n\nexport type DaemonNotification<E extends DaemonNotificationEvent = DaemonNotificationEvent> = {\n [K in E]: {\n readonly id: number;\n readonly event: K;\n readonly timestamp: number;\n readonly workspaceId: number | null;\n readonly sessionId: number | null;\n readonly data: DaemonNotificationPayloadMap[K];\n };\n}[E];\n\n// Compile-time witness that generated DaemonNotificationEnvelope covers and conforms to DaemonNotification.\ntype _AssertEnvelopeAssignable =\n DaemonNotificationEnvelope extends DaemonNotification\n ? [DaemonNotificationEvent] extends [DaemonNotificationEnvelope[\"event\"]]\n ? true\n : never\n : never;\nconst _envelopeWitness: _AssertEnvelopeAssignable = true;\nvoid _envelopeWitness;\n\nexport interface NotificationFilter {\n readonly events?: readonly DaemonNotificationEvent[];\n readonly workspaceId?: number;\n readonly sessionId?: number;\n}\n\nconst extractSessionId = (event: DaemonNotificationEvent, data: unknown): number | null => {\n if (!isRecord(data)) return null;\n if (isSafeInteger(data.sessionId)) return data.sessionId;\n if (\n (event === \"session/created\" ||\n event === \"session/archived\" ||\n event === \"session/deleted\" ||\n event === \"session/titled\") &&\n isSafeInteger(data.id)\n ) {\n return data.id;\n }\n if (event === \"log/entry\" && isRecord(data.entry) && isSafeInteger(data.entry.session_id)) {\n return data.entry.session_id;\n }\n return null;\n};\n\nconst extractWorkspaceId = (\n workspaceId: number | null,\n event: DaemonNotificationEvent,\n data: unknown,\n): number | null => {\n if (workspaceId !== null) return workspaceId;\n if (event === \"workspace/created\" && isRecord(data) && isSafeInteger(data.id)) {\n return data.id;\n }\n return null;\n};\n\n/**\n * {§application-session-observation} Wraps a raw event emission in the canonical `DaemonNotification`\n * envelope shared by `ApplicationPort.subscribeToEvents` and `GET /notifications`.\n */\nexport const toDaemonNotification = <E extends DaemonNotificationEvent>(\n id: number,\n workspaceId: number | null,\n event: E,\n data: DaemonNotificationPayloadMap[E],\n timestamp: number = Date.now(),\n): DaemonNotification => {\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion -- discriminated envelope constructed for event E\n return {\n id,\n event,\n timestamp,\n workspaceId: extractWorkspaceId(workspaceId, event, data),\n sessionId: extractSessionId(event, data),\n data,\n } as DaemonNotification;\n};\n\n/**\n * {§application-session-observation} Evaluates whether a `DaemonNotification` matches a\n * `NotificationFilter` (event set, workspace scope, and session scope including subtree archive/delete).\n */\nexport const matchesNotificationFilter = (\n notification: DaemonNotification,\n filter?: NotificationFilter,\n): boolean => {\n if (filter === undefined) return true;\n if (filter.events !== undefined && !filter.events.includes(notification.event)) {\n return false;\n }\n if (filter.workspaceId !== undefined && notification.workspaceId !== filter.workspaceId) {\n return false;\n }\n if (filter.sessionId !== undefined) {\n if (notification.sessionId === filter.sessionId) return true;\n if (\n (notification.event === \"session/archived\" || notification.event === \"session/deleted\") &&\n isRecord(notification.data) &&\n Array.isArray(notification.data.sessionIds) &&\n notification.data.sessionIds.includes(filter.sessionId)\n ) {\n return true;\n }\n return false;\n }\n return true;\n};\n\nexport interface ApplicationNotificationContract<T = unknown> {\n readonly payloadSchema: JsonSchema;\n // The payload the schema generates: the type the table declares beside the schema, never a value the contract carries.\n readonly payload?: T;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ApplicationNotifications.js","sourceRoot":"","sources":["../../src/ApplicationNotifications.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AActD;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC,MAAM,CAAC;IACpD,mBAAmB;IACnB,mBAAmB;IACnB,oBAAoB;IACpB,uBAAuB;IACvB,iBAAiB;IACjB,kBAAkB;IAClB,iBAAiB;IACjB,gBAAgB;IAChB,gBAAgB;IAChB,cAAc;IACd,aAAa;IACb,eAAe;IACf,kBAAkB;IAClB,mBAAmB;IACnB,iBAAiB;IACjB,WAAW;IACX,kBAAkB;IAClB,cAAc;CACR,CAAC,CAAC;AAIZ,MAAM,6BAA6B,GAAwB,IAAI,GAAG,CAAC,0BAA0B,CAAC,CAAC;AAE/F,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,KAAc,EAAoC,EAAE,CAC1F,OAAO,KAAK,KAAK,QAAQ,IAAI,6BAA6B,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAE1E;;;GAGG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,MAAM,CAAC,MAAM,CAAC;IAC3D,uBAAuB;IACvB,aAAa;IACb,cAAc;IACd,iBAAiB;IACjB,mBAAmB;CACb,CAAC,CAAC;AAIZ,MAAM,oCAAoC,GAAwB,IAAI,GAAG,CAAC,iCAAiC,CAAC,CAAC;AAE7G,M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,EAChC,MAA2B,EACpB,EAAE;IACT,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACtC,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;QAC7E,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,IAAI,MAAM,CAAC,WAAW,KAAK,SAAS,IAAI,YAAY,CAAC,WAAW,KAAK,MAAM,CAAC,WAAW,EAAE,CAAC;QACtF,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;QACjC,IAAI,YAAY,CAAC,SAAS,KAAK,MAAM,CAAC,SAAS;YAAE,OAAO,IAAI,CAAC;QAC7D,IACI,CAAC,YAAY,CAAC,KAAK,KAAK,kBAAkB,IAAI,YAAY,CAAC,KAAK,KAAK,iBAAiB,CAAC;YACvF,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC;YAC3B,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC;YAC3C,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,EACzD,CAAC;YACC,OAAO,IAAI,CAAC;QAChB,CAAC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC","sourcesContent":["import type {\n ApplicationLoopPacket,\n ApplicationSessionArchiving,\n ApplicationSessionDeletion,\n ApplicationSessionKind,\n ApplicationSessionOrigin,\n ApplicationSessionTitling,\n ApplicationWorkspaceArchiving,\n LogEntryWire,\n ProposalDecision,\n} from \"./Application.ts\";\nimport { isRecord, isSafeInteger } from \"./guards.ts\";\nimport type { LoopLifecycle } from \"./LoopLifecycle.ts\";\nimport type {\n ClientEntryChannel,\n ClientInteractionProjection,\n FunctionalityPreparationActivity,\n JsonSchema,\n ModelRoute,\n Notice,\n OperationResult,\n ProposalProjection,\n} from \"./types.ts\";\nimport type { DaemonNotificationEnvelope, ProviderAccounting } from \"./types.generated.ts\";\n\n/**\n * {§application-session-observation} The closed alphabet of discrete daemon notification events\n * emitted across `ApplicationPort.subscribeToEvents` and `GET /notifications`.\n */\nexport const DAEMON_NOTIFICATION_EVENTS = Object.freeze([\n \"workspace/created\",\n \"workspace/renamed\",\n \"workspace/archived\",\n \"functionality/changed\",\n \"session/created\",\n \"session/archived\",\n \"session/deleted\",\n \"session/titled\",\n \"session/policy\",\n \"loop/started\",\n \"loop/parked\",\n \"loop/proposal\",\n \"loop/interaction\",\n \"loop/gate-settled\",\n \"loop/terminated\",\n \"log/entry\",\n \"stream/concluded\",\n \"notice/event\",\n] as const);\n\nexport type DaemonNotificationEvent = (typeof DAEMON_NOTIFICATION_EVENTS)[number];\n\nconst DAEMON_NOTIFICATION_EVENT_SET: ReadonlySet<string> = new Set(DAEMON_NOTIFICATION_EVENTS);\n\nexport const isDaemonNotificationEvent = (value: unknown): value is DaemonNotificationEvent =>\n typeof value === \"string\" && DAEMON_NOTIFICATION_EVENT_SET.has(value);\n\n/**\n * {§application-session-observation} In-process sub-turn streaming and telemetry callbacks\n * consumed by exterior protocol adapters (`plurnk-acp`, `plurnk-mcp`), never streamed on `GET /notifications`.\n */\nexport const APPLICATION_RUNTIME_STREAM_EVENTS = Object.freeze([\n \"workspace/preparation\",\n \"loop/packet\",\n \"stream/event\",\n \"reasoning/event\",\n \"runtime/telemetry\",\n] as const);\n\nexport type ApplicationRuntimeStreamEvent = (typeof APPLICATION_RUNTIME_STREAM_EVENTS)[number];\n\nconst APPLICATION_RUNTIME_STREAM_EVENT_SET: ReadonlySet<string> = new Set(APPLICATION_RUNTIME_STREAM_EVENTS);\n\nexport const isApplicationRuntimeStreamEvent = (value: unknown): value is ApplicationRuntimeStreamEvent =>\n typeof value === \"string\" && APPLICATION_RUNTIME_STREAM_EVENT_SET.has(value);\n\n/**\n * {§notifications} Classifies internal turn/lifecycle/derivation/progress telemetry notices that belong\n * on `ApplicationPort.subscribeToRuntimeStream` (`runtime/telemetry`) rather than public `notice/event`.\n */\nexport const isRuntimeTelemetryNotice = (notice: Notice): boolean => {\n if (\n notice.source === \"engine:lifecycle\" ||\n notice.source === \"engine:derivation\" ||\n notice.source === \"engine:emission\"\n ) {\n return true;\n }\n if (\n notice.source === \"engine:turn\" &&\n (notice.kind === \"turn_queued\" ||\n notice.kind === \"turn_awaiting_model\" ||\n notice.kind === \"turn_generated\" ||\n notice.kind === \"results_pending\")\n ) {\n return true;\n }\n if (notice.source.startsWith(\"exec:\") && typeof (notice as Record<string, unknown>).percent === \"number\") {\n return true;\n }\n return typeof notice.message !== \"string\" || notice.message.trim().length === 0;\n};\n\nexport interface WorkspaceCreatedNotification {\n readonly id: number;\n readonly name: string;\n readonly projectRoot: string | null;\n readonly projectLabel: string | null;\n}\n\nexport interface WorkspaceRenamedNotification {\n readonly id: number;\n readonly name: string;\n}\n\nexport type WorkspaceArchivedNotification = ApplicationWorkspaceArchiving;\n\nexport interface WorkspacePreparationNotification {\n readonly workspaceId: number;\n readonly preparation: readonly FunctionalityPreparationActivity[];\n}\n\nexport interface FunctionalityChangedNotification {\n readonly workspaceId: number;\n readonly sessionId: number | null;\n readonly family: string;\n}\n\nexport interface SessionCreatedNotification {\n readonly id: number;\n readonly workspaceId: number;\n readonly workspaceName: string;\n readonly projectRoot: string | null;\n readonly projectLabel: string | null;\n readonly name: string;\n readonly parentSessionId: number | null;\n readonly origin: ApplicationSessionOrigin;\n readonly kind: ApplicationSessionKind;\n readonly lifecycle: LoopLifecycle;\n readonly persona?: string | null;\n}\n\nexport type SessionArchivedNotification = ApplicationSessionArchiving;\n\nexport type SessionDeletedNotification = ApplicationSessionDeletion;\n\nexport type SessionTitledNotification = ApplicationSessionTitling;\n\nexport interface SessionPolicyNotification {\n readonly sessionId: number;\n readonly model: ModelRoute | null;\n readonly childModel: ModelRoute | null;\n readonly persona?: string | null;\n}\n\nexport type LoopPacketNotification = ApplicationLoopPacket;\n\n// {§methods-invocation} The row exactly as core sends it.\nexport interface LogEntryNotification {\n readonly entry: LogEntryWire;\n}\n\nexport interface LoopStartedNotification {\n readonly sessionId: number;\n readonly loopId: number;\n readonly loopSeq: number;\n}\n\nexport interface LoopParkedNotification {\n readonly sessionId: number;\n readonly loopId: number;\n readonly loopSeq: number;\n readonly status: 202;\n}\n\nexport type ProposalNotification = ProposalProjection;\n\nexport type LoopInteractionNotification = ClientInteractionProjection;\n\nexport type LoopGateSettledNotification =\n | {\n readonly kind: \"proposal\";\n readonly sessionId: number;\n readonly loopId: number;\n readonly logEntryId: number;\n readonly decision: ProposalDecision;\n readonly outcome: string;\n }\n | {\n readonly kind: \"interaction\";\n readonly sessionId: number;\n readonly loopId: number;\n readonly interactionId: number;\n readonly action: \"accept\" | \"decline\" | \"cancel\";\n };\n\nexport interface StreamEventNotification {\n readonly entryId: number;\n readonly sessionId: number;\n readonly target: string;\n readonly channel: string;\n readonly state: ClientEntryChannel[\"state\"];\n readonly contentLength: number;\n readonly loopSeq?: number;\n readonly turnSeq?: number;\n readonly sequence?: number;\n readonly mimetype?: string;\n}\n\nexport interface StreamConcludedNotification {\n readonly sessionId: number;\n readonly entryId: number;\n readonly target: string;\n readonly subscriptionId: number;\n readonly result: OperationResult;\n readonly scheme: string;\n readonly summary: string;\n readonly wakeAction: string;\n readonly loopSeq?: number;\n readonly turnSeq?: number;\n readonly sequence?: number;\n}\n\nexport type ReasoningEventNotification = {\n readonly sessionId: number;\n readonly loopId: number;\n readonly turnId: number;\n readonly loopSeq: number;\n readonly turnSeq: number;\n readonly modelCallId: number;\n readonly requestSequence: number;\n} & (\n | { readonly phase: \"start\" | \"end\" }\n | { readonly phase: \"content\"; readonly delta: string }\n);\n\nexport interface NoticeEventNotification {\n readonly sessionId: number | null;\n readonly loopId: number;\n readonly notice: Notice;\n}\n\nexport interface TerminatedNotification {\n readonly sessionId: number;\n readonly loopId: number;\n // {§notifications} — the loop's number among its session's loops.\n readonly loopSeq: number;\n readonly result: OperationResult;\n readonly hitMaxTurns: boolean;\n readonly turnIds: number[];\n readonly attributions: string[];\n // {§notifications} — when the loop concluded, Unix milliseconds.\n readonly terminatedAt: number;\n readonly usage: {\n readonly accounting: ProviderAccounting;\n readonly curationWeight: number | null;\n readonly curationBudget: number | null;\n readonly contextTokens: number | null;\n readonly contextCapacity: number | null;\n readonly meta: Record<string, unknown>;\n };\n}\n\nexport interface NotificationsResyncPayload {\n readonly reason: \"restarted\" | \"evicted\" | \"malformed\";\n readonly epoch: string;\n readonly latestId: number;\n}\n\nexport type NotificationReplayResult =\n | {\n readonly status: \"ok\";\n readonly epoch: string;\n readonly events: readonly DaemonNotification[];\n }\n | {\n readonly status: \"resync\";\n readonly resync: NotificationsResyncPayload;\n };\n\nexport interface DaemonNotificationPayloadMap {\n readonly \"workspace/created\": WorkspaceCreatedNotification;\n readonly \"workspace/renamed\": WorkspaceRenamedNotification;\n readonly \"workspace/archived\": WorkspaceArchivedNotification;\n readonly \"functionality/changed\": FunctionalityChangedNotification;\n readonly \"session/created\": SessionCreatedNotification;\n readonly \"session/archived\": SessionArchivedNotification;\n readonly \"session/deleted\": SessionDeletedNotification;\n readonly \"session/titled\": SessionTitledNotification;\n readonly \"session/policy\": SessionPolicyNotification;\n readonly \"loop/started\": LoopStartedNotification;\n readonly \"loop/parked\": LoopParkedNotification;\n readonly \"loop/proposal\": ProposalNotification;\n readonly \"loop/interaction\": LoopInteractionNotification;\n readonly \"loop/gate-settled\": LoopGateSettledNotification;\n readonly \"loop/terminated\": TerminatedNotification;\n readonly \"log/entry\": LogEntryNotification;\n readonly \"stream/concluded\": StreamConcludedNotification;\n readonly \"notice/event\": NoticeEventNotification;\n}\n\nexport interface ApplicationRuntimeStreamPayloadMap {\n readonly \"workspace/preparation\": WorkspacePreparationNotification;\n readonly \"loop/packet\": LoopPacketNotification;\n readonly \"stream/event\": StreamEventNotification;\n readonly \"reasoning/event\": ReasoningEventNotification;\n readonly \"runtime/telemetry\": NoticeEventNotification;\n}\n\nexport type ApplicationRuntimeStreamHandler = <\n E extends ApplicationRuntimeStreamEvent = ApplicationRuntimeStreamEvent,\n>(\n workspaceId: number,\n method: E,\n params: ApplicationRuntimeStreamPayloadMap[E],\n) => void;\n\nexport type DaemonNotification<E extends DaemonNotificationEvent = DaemonNotificationEvent> = {\n [K in E]: {\n readonly id: number;\n readonly event: K;\n readonly timestamp: number;\n readonly workspaceId: number | null;\n readonly sessionId: number | null;\n readonly data: DaemonNotificationPayloadMap[K];\n };\n}[E];\n\n// Compile-time witness that generated DaemonNotificationEnvelope covers and conforms to DaemonNotification.\ntype _AssertEnvelopeAssignable =\n DaemonNotificationEnvelope extends DaemonNotification\n ? [DaemonNotificationEvent] extends [DaemonNotificationEnvelope[\"event\"]]\n ? true\n : never\n : never;\nconst _envelopeWitness: _AssertEnvelopeAssignable = true;\nvoid _envelopeWitness;\n\nexport interface NotificationFilter {\n readonly events?: readonly DaemonNotificationEvent[];\n readonly workspaceId?: number;\n readonly sessionId?: number;\n}\n\nconst extractSessionId = (event: DaemonNotificationEvent, data: unknown): number | null => {\n if (!isRecord(data)) return null;\n if (isSafeInteger(data.sessionId)) return data.sessionId;\n if (\n (event === \"session/created\" ||\n event === \"session/archived\" ||\n event === \"session/deleted\" ||\n event === \"session/titled\") &&\n isSafeInteger(data.id)\n ) {\n return data.id;\n }\n if (event === \"log/entry\" && isRecord(data.entry) && isSafeInteger(data.entry.sessionId)) {\n return data.entry.sessionId;\n }\n return null;\n};\n\nconst extractWorkspaceId = (\n workspaceId: number | null,\n event: DaemonNotificationEvent,\n data: unknown,\n): number | null => {\n if (workspaceId !== null) return workspaceId;\n if (event === \"workspace/created\" && isRecord(data) && isSafeInteger(data.id)) {\n return data.id;\n }\n return null;\n};\n\n/**\n * {§application-session-observation} Wraps a raw event emission in the canonical `DaemonNotification`\n * envelope shared by `ApplicationPort.subscribeToEvents` and `GET /notifications`.\n */\nexport const toDaemonNotification = <E extends DaemonNotificationEvent>(\n id: number,\n workspaceId: number | null,\n event: E,\n data: DaemonNotificationPayloadMap[E],\n timestamp: number = Date.now(),\n): DaemonNotification => {\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion -- discriminated envelope constructed for event E\n return {\n id,\n event,\n timestamp,\n workspaceId: extractWorkspaceId(workspaceId, event, data),\n sessionId: extractSessionId(event, data),\n data,\n } as DaemonNotification;\n};\n\n/**\n * {§application-session-observation} Evaluates whether a `DaemonNotification` matches a\n * `NotificationFilter` (event set, workspace scope, and session scope including subtree archive/delete).\n */\nexport const matchesNotificationFilter = (\n notification: DaemonNotification,\n filter?: NotificationFilter,\n): boolean => {\n if (filter === undefined) return true;\n if (filter.events !== undefined && !filter.events.includes(notification.event)) {\n return false;\n }\n if (filter.workspaceId !== undefined && notification.workspaceId !== filter.workspaceId) {\n return false;\n }\n if (filter.sessionId !== undefined) {\n if (notification.sessionId === filter.sessionId) return true;\n if (\n (notification.event === \"session/archived\" || notification.event === \"session/deleted\") &&\n isRecord(notification.data) &&\n Array.isArray(notification.data.sessionIds) &&\n notification.data.sessionIds.includes(filter.sessionId)\n ) {\n return true;\n }\n return false;\n }\n return true;\n};\n\nexport interface ApplicationNotificationContract<T = unknown> {\n readonly payloadSchema: JsonSchema;\n // The payload the schema generates: the type the table declares beside the schema, never a value the contract carries.\n readonly payload?: T;\n}\n"]}
|
|
@@ -6,6 +6,7 @@ import type { ApplicationStream } from "./ApplicationStream.ts";
|
|
|
6
6
|
import type { ClientDisplayCapabilities, ClientInteractionProjection, ClientInteractionResolution, EntryReadResult, ModelCatalogPage, ModelCatalogQuery, ModelRoute, OperationResult, PlurnkStatement, ProposalPolicy, ProposalProjection, Notice, Effort, SessionOwner } from "./types.ts";
|
|
7
7
|
import type { ApplicationOwnerIdentity, ProposalResolution, ApplicationActionContext, ApplicationActionDescriptor, ClientEnvelope, ApplicationSessionOverview, ApplicationSessionProjection, ApplicationSessionQuery, ApplicationSessionArchiving, ApplicationSessionDeletion, ApplicationSessionTitling, ApplicationWorkspaceArchiving, ApplicationSessionIdentity, ApplicationSessionCreation, ApplicationLoopAdmission, ApplicationLoopProjection, ApplicationGauge, ApplicationProviderAlias, ApplicationPersonaProjection, ApplicationServiceUpdateResult, LogEntryWire, ApplicationEventHandler, CredentialAuthority } from "./Application.ts";
|
|
8
8
|
import type { ApplicationRuntimeStreamHandler, NotificationFilter, NotificationReplayResult } from "./ApplicationNotifications.ts";
|
|
9
|
+
export { InFlightTracker, attachSseKeepAlive, writeHttpProblem, writeUpgradeProblem, type SseKeepAliveOptions, } from "./HttpPort.ts";
|
|
9
10
|
/** {§http-host} One request on the daemon's listener, handed to the adapter that mounted its prefix. */
|
|
10
11
|
export type HttpRouteHandler = (req: IncomingMessage, res: ServerResponse) => void | Promise<void>;
|
|
11
12
|
/** {§http-host} One upgrade request on the daemon's listener, handed to the adapter that mounted its prefix. */
|
|
@@ -28,6 +29,7 @@ export interface HttpHost {
|
|
|
28
29
|
}
|
|
29
30
|
/** {§application-session-observation} The transport-neutral application contract consumed by exterior adapters. */
|
|
30
31
|
export interface ApplicationPort extends HttpHost {
|
|
32
|
+
readonly serviceVersion?: string;
|
|
31
33
|
readonly credentials: CredentialAuthority;
|
|
32
34
|
registerSessionOwner(workspaceId: number, owner: SessionOwner): Promise<void>;
|
|
33
35
|
claimSessionOwner(args: {
|
|
@@ -95,6 +97,7 @@ export interface ApplicationPort extends HttpHost {
|
|
|
95
97
|
readonly openPaths?: string[];
|
|
96
98
|
readonly selector?: string;
|
|
97
99
|
readonly childSelector?: string | null;
|
|
100
|
+
readonly proposalPolicy?: ProposalPolicy | null;
|
|
98
101
|
}): Promise<ApplicationLoopAdmission>;
|
|
99
102
|
cancelDrain(sessionId: number, reason?: string): boolean;
|
|
100
103
|
cancelSession(args: {
|
|
@@ -127,6 +130,9 @@ export interface ApplicationPort extends HttpHost {
|
|
|
127
130
|
readonly beforeId?: number;
|
|
128
131
|
readonly limit?: number;
|
|
129
132
|
readonly loopSeq?: number;
|
|
133
|
+
readonly beforeLoopSeq?: number;
|
|
134
|
+
readonly afterLoopSeq?: number;
|
|
135
|
+
readonly lastLoops?: number;
|
|
130
136
|
readonly turnSeq?: number;
|
|
131
137
|
readonly sequence?: number;
|
|
132
138
|
}): Promise<LogEntryWire[]>;
|
|
@@ -184,12 +190,12 @@ export interface ApplicationPort extends HttpHost {
|
|
|
184
190
|
}): Promise<Array<{
|
|
185
191
|
readonly id: number;
|
|
186
192
|
readonly name: string;
|
|
187
|
-
readonly
|
|
193
|
+
readonly projectRoot: string | null;
|
|
188
194
|
/** {§execution-output-identity} */
|
|
189
|
-
readonly
|
|
190
|
-
readonly
|
|
195
|
+
readonly projectLabel: string | null;
|
|
196
|
+
readonly createdAt: string;
|
|
191
197
|
/** {§machine-processes} When the workspace was archived, or null while it is unarchived. */
|
|
192
|
-
readonly
|
|
198
|
+
readonly archivedAt: string | null;
|
|
193
199
|
}>>;
|
|
194
200
|
listSessions(workspaceId: number, query?: ApplicationSessionQuery): Promise<ApplicationSessionProjection[]>;
|
|
195
201
|
readSession(args: {
|
|
@@ -303,7 +309,7 @@ export interface ApplicationPort extends HttpHost {
|
|
|
303
309
|
readonly sessionId: number;
|
|
304
310
|
}): Promise<{
|
|
305
311
|
readonly model: ModelRoute | null;
|
|
306
|
-
readonly
|
|
312
|
+
readonly childModel: ModelRoute | null;
|
|
307
313
|
}>;
|
|
308
314
|
setSessionModel(args: {
|
|
309
315
|
readonly workspaceId: number;
|
|
@@ -312,7 +318,7 @@ export interface ApplicationPort extends HttpHost {
|
|
|
312
318
|
/** An effort chosen with the model; the daemon validates and persists the pair as one. */
|
|
313
319
|
readonly effort?: unknown;
|
|
314
320
|
}): Promise<ModelRoute>;
|
|
315
|
-
|
|
321
|
+
setSessionChildModel(args: {
|
|
316
322
|
readonly workspaceId: number;
|
|
317
323
|
readonly sessionId: number;
|
|
318
324
|
readonly selector: string | null;
|
|
@@ -347,6 +353,21 @@ export interface ApplicationPort extends HttpHost {
|
|
|
347
353
|
readonly policy: ProposalPolicy | null;
|
|
348
354
|
readonly effective: ProposalPolicy;
|
|
349
355
|
}>;
|
|
356
|
+
readSessionProposalPolicy(args: {
|
|
357
|
+
readonly workspaceId: number;
|
|
358
|
+
readonly sessionId: number;
|
|
359
|
+
}): Promise<{
|
|
360
|
+
readonly policy: ProposalPolicy | null;
|
|
361
|
+
readonly effective: ProposalPolicy;
|
|
362
|
+
}>;
|
|
363
|
+
setSessionProposalPolicy(args: {
|
|
364
|
+
readonly workspaceId: number;
|
|
365
|
+
readonly sessionId: number;
|
|
366
|
+
readonly policy: ProposalPolicy | null;
|
|
367
|
+
}): Promise<{
|
|
368
|
+
readonly policy: ProposalPolicy | null;
|
|
369
|
+
readonly effective: ProposalPolicy;
|
|
370
|
+
}>;
|
|
350
371
|
listPersonas?(args: {
|
|
351
372
|
readonly workspaceId: number;
|
|
352
373
|
}): Promise<readonly ApplicationPersonaProjection[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationPort.d.ts","sourceRoot":"","sources":["../../src/ApplicationPort.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,gCAAgC,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACjH,OAAO,KAAK,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACzG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EACR,yBAAyB,EACzB,2BAA2B,EAC3B,2BAA2B,EAC3B,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,eAAe,EACf,cAAc,EACd,kBAAkB,EACl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O,CAAC;QACR,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;QACvC,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAC;KACtC,CAAC,CAAC;IACH,YAAY,CAAC,CAAC,IAAI,EAAE;QAAE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,SAAS,4BAA4B,EAAE,CAAC,CAAC;IACxG,iBAAiB,CAAC,CAAC,IAAI,EAAE;QACrB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;QAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;KACnC,GAAG,OAAO,CAAC;QAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;CACpD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export { InFlightTracker, attachSseKeepAlive, writeHttpProblem, writeUpgradeProblem, } from "./HttpPort.js";
|
|
2
2
|
//# sourceMappingURL=ApplicationPort.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationPort.js","sourceRoot":"","sources":["../../src/ApplicationPort.ts"],"names":[],"mappings":"","sourcesContent":["import type { IncomingMessage, ServerResponse } from \"node:http\";\nimport type { Duplex } from \"node:stream\";\nimport type { FunctionalityPreparationActivity, ProviderAccounting, RollbackReport } from \"./types.generated.ts\";\nimport type { ApplicationInboxMessage, ApplicationMessage, MessageResource } from \"./MessageResource.ts\";\nimport type { ApplicationStream } from \"./ApplicationStream.ts\";\nimport type {\n ClientDisplayCapabilities,\n ClientInteractionProjection,\n ClientInteractionResolution,\n EntryReadResult,\n ModelCatalogPage,\n ModelCatalogQuery,\n ModelRoute,\n OperationResult,\n PlurnkStatement,\n ProposalPolicy,\n ProposalProjection,\n Notice,\n Effort,\n SessionOwner,\n} from \"./types.ts\";\nimport type {\n ApplicationOwnerIdentity,\n ProposalResolution,\n ApplicationActionContext,\n ApplicationActionDescriptor,\n ClientEnvelope,\n ApplicationSessionOverview,\n ApplicationSessionProjection,\n ApplicationSessionQuery,\n ApplicationSessionArchiving,\n ApplicationSessionDeletion,\n ApplicationSessionTitling,\n ApplicationWorkspaceArchiving,\n ApplicationSessionIdentity,\n ApplicationSessionCreation,\n ApplicationLoopAdmission,\n ApplicationLoopProjection,\n ApplicationGauge,\n ApplicationProviderAlias,\n ApplicationPersonaProjection,\n ApplicationServiceUpdateResult,\n LogEntryWire,\n ApplicationEventHandler,\n CredentialAuthority,\n} from \"./Application.ts\";\nimport type {\n ApplicationRuntimeStreamHandler,\n NotificationFilter,\n NotificationReplayResult,\n} from \"./ApplicationNotifications.ts\";\n\n/** {§http-host} One request on the daemon's listener, handed to the adapter that mounted its prefix. */\nexport type HttpRouteHandler = (req: IncomingMessage, res: ServerResponse) => void | Promise<void>;\n\n/** {§http-host} One upgrade request on the daemon's listener, handed to the adapter that mounted its prefix. */\nexport type HttpUpgradeHandler = (req: IncomingMessage, socket: Duplex, head: Buffer) => void | Promise<void>;\n\n/**\n * {§http-host} The daemon's one HTTP listener, offered to exterior adapters. A daemon is one trust\n * domain on one address: core binds `PLURNK_HOST:PLURNK_PORT` before it admits durable state,\n * answers 503 until admission, then routes to the longest mounted prefix or answers 404.\n * Adapters mount at `start()`; none opens a socket of its own. This is the one place the\n * application port names a transport, by ruling (#641): the standards address by URL, never by\n * port, so every exterior interface shares the address.\n */\nexport interface HttpHost {\n registerHttpRoute(prefix: string, handler: HttpRouteHandler): void;\n registerHttpUpgrade(prefix: string, handler: HttpUpgradeHandler): void;\n httpAddress(): { readonly host: string; readonly port: number };\n}\n\n/** {§application-session-observation} The transport-neutral application contract consumed by exterior adapters. */\nexport interface ApplicationPort extends HttpHost {\n readonly credentials: CredentialAuthority;\n registerSessionOwner(workspaceId: number, owner: SessionOwner): Promise<void>;\n claimSessionOwner(args: { readonly workspaceId: number; readonly sessionId: number; readonly owner: string }): Promise<SessionOwner>;\n configurationNotices(workspaceId?: number): readonly Notice[];\n listClientDisplayCapabilities(): Promise<ClientDisplayCapabilities>;\n listModuleActions(): ApplicationActionDescriptor[];\n invokeModuleAction(\n name: string,\n params: Readonly<Record<string, unknown>>,\n context: ApplicationActionContext,\n ): Promise<unknown>;\n subscribeToEvents(handler: ApplicationEventHandler, filter?: NotificationFilter): () => void;\n subscribeToRuntimeStream?(handler: ApplicationRuntimeStreamHandler): () => void;\n readonly notificationEpoch?: string;\n replayNotifications?(args: {\n readonly lastEventId: string;\n readonly filter?: NotificationFilter;\n }): NotificationReplayResult;\n pendingProposals(workspaceId: number): Promise<ProposalProjection[]>;\n resolveProposal(logEntryId: number, resolution: ProposalResolution, owner: ApplicationOwnerIdentity): Promise<void>;\n pendingClientInteractions(workspaceId: number): Promise<ClientInteractionProjection[]>;\n resolveClientInteraction(\n interactionId: number,\n resolution: ClientInteractionResolution,\n respondent: ApplicationOwnerIdentity,\n message?: { readonly body: string; readonly source: string; readonly envelope: Readonly<Record<string, unknown>> },\n ): Promise<void>;\n readMessages(args: { readonly workspaceId: number; readonly sessionId: number; readonly loopId?: number }): Promise<ApplicationMessage[]>;\n /** {§methods} The accepted messages the session has not yet observed at a turn boundary, in acceptance order, each with the lifecycle of the loop holding it. */\n readInbox(args: { readonly workspaceId: number; readonly sessionId: number }): Promise<ApplicationInboxMessage[]>;\n /** {§methods} The accepted messages the session has not yet completed, in acceptance order, each with the lifecycle of the loop holding it. */\n readOpenMessages(args: { readonly workspaceId: number; readonly sessionId: number }): Promise<ApplicationInboxMessage[]>;\n /** {§methods} The streams the session holds open, in opening order, each with its channels' states. */\n readStreams(args: { readonly workspaceId: number; readonly sessionId: number }): Promise<ApplicationStream[]>;\n /** {§methods} A client message's address is its idempotency key: `new` when nothing is accepted there,\n * `accepted` when the same body is; another body under an accepted address is refused, 422 `message-address-reused`. */\n messageAdmission(args: { readonly workspaceId: number; readonly address: string; readonly body: string }): Promise<\"new\" | \"accepted\">;\n ensureRuntimeSession(workspaceId: number): Promise<number>;\n runLoop(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n readonly loopId?: number;\n readonly prompt: string;\n readonly source?: string;\n readonly messageAddress?: string;\n readonly attachments?: readonly MessageResource[];\n readonly envelope?: Readonly<Record<string, unknown>>;\n readonly maxTurns?: number;\n readonly openPaths?: string[];\n readonly selector?: string;\n readonly childSelector?: string | null;\n }): Promise<ApplicationLoopAdmission>;\n cancelDrain(sessionId: number, reason?: string): boolean;\n cancelSession(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n readonly reason?: string;\n }): Promise<void>;\n // {§connection-lifecycle} — a person's client operation: one loop in the workspace's runtime session,\n // attributed to `actor`, its `log:///` addresses read in `contextSessionId`'s log\n // ({§connection-lifecycle}); `onLoop` hears that loop before any statement runs.\n dispatchClientAction(args: {\n readonly workspaceId: number;\n readonly actor: string;\n readonly contextSessionId?: number;\n readonly statements: PlurnkStatement[];\n readonly onLoop?: (loop: { readonly sessionId: number; readonly loopId: number }) => void;\n }): Promise<OperationResult[]>;\n // {§connection-lifecycle} — cancel exactly one client operation: its dispatch while it runs and every execution its\n // rows started that still runs; false when nothing of it was running.\n cancelLoop(args: { readonly workspaceId: number; readonly loopId: number; readonly reason?: string }): Promise<boolean>;\n // {§expression-boundaries} — the workspace's available names also permit slotless invocation.\n executorTags(workspaceId: number): readonly string[];\n readLog(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n readonly loopId?: number;\n readonly turnId?: number;\n readonly sinceId?: number;\n readonly beforeId?: number;\n readonly limit?: number;\n readonly loopSeq?: number;\n readonly turnSeq?: number;\n readonly sequence?: number;\n }): Promise<LogEntryWire[]>;\n /** {§acp-status-descendants} Each alias is the route a session seeded from it gets, its configured effort included. */\n listProviders(): { readonly aliases: Array<ApplicationProviderAlias> };\n listModels(query: ModelCatalogQuery): ModelCatalogPage;\n /** {§startup-admission} Explicitly refresh the Models.dev catalog cache when `PLURNK_SERVICE_UPDATEABLE=1`. */\n updateService?(): Promise<ApplicationServiceUpdateResult>;\n createWorkspace(args: {\n readonly name?: string;\n readonly projectRoot?: string | null;\n readonly settings?: string | object;\n }): Promise<ClientEnvelope>;\n /** {§methods-workspace-create} Read-only selection; folder defaults are derived by the daemon. */\n attachWorkspace(args:\n | { readonly workspaceId: number; readonly name?: never; readonly projectRoot?: never }\n | { readonly name: string; readonly workspaceId?: never; readonly projectRoot?: never }\n | { readonly projectRoot: string; readonly workspaceId?: never; readonly name?: never }\n ): Promise<ClientEnvelope>;\n /** {§session-external-reference} Opaque, adapter-namespaced identity; reading never allocates. */\n readSessionReference(args: { readonly namespace: string; readonly reference: string }): Promise<{ readonly workspaceId: number; readonly sessionId: number } | null>;\n /** {§session-external-reference} Atomically allocate a folderless workspace and model session when absent. */\n ensureSessionReference(args: { readonly namespace: string; readonly reference: string }): Promise<{ readonly workspaceId: number; readonly sessionId: number }>;\n /** {§session-external-reference} Inspect the adapter's retained references to this session. */\n listSessionReferences(args: { readonly workspaceId: number; readonly sessionId: number; readonly namespace: string }): Promise<string[]>;\n /** {§machine-processes} Omitted `archived` lists every workspace; true only archived ones, false only unarchived ones. */\n listWorkspaces(query?: { readonly archived?: boolean }): Promise<Array<{\n readonly id: number;\n readonly name: string;\n readonly project_root: string | null;\n /** {§execution-output-identity} */\n readonly project_label: string | null;\n readonly created_at: string;\n /** {§machine-processes} When the workspace was archived, or null while it is unarchived. */\n readonly archived_at: string | null;\n }>>;\n listSessions(\n workspaceId: number,\n query?: ApplicationSessionQuery,\n ): Promise<ApplicationSessionProjection[]>;\n readSession(args: {\n readonly workspaceId: number;\n readonly identity: ApplicationSessionIdentity;\n }): Promise<ApplicationSessionProjection | null>;\n listSessionLoops(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n }): Promise<ApplicationLoopProjection[]>;\n // {§methods-workspace-create} — the places of the daemon, or of one workspace, with what waits there.\n readSessionOverview(args: {\n readonly workspaceId?: number;\n readonly limit: number;\n readonly excerptChars: number;\n }): Promise<ApplicationSessionOverview>;\n // {§methods-workspace-create} — the spend of the session and its descendants since it began.\n sessionAccounting(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n }): Promise<ProviderAccounting>;\n // {§methods-workspace-create} — the client gauge the session's latest packet reported.\n sessionGauge(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n }): Promise<ApplicationGauge>;\n // {§methods-workspace-create} — an omitted sessionId lists every model session's client-addressed seeds.\n listPrompts(workspaceId: number, limit?: number, sessionId?: number): Promise<string[]>;\n // {§share} — the workspace's share, from a consistent copy of the daemon's database, into an absolute folder.\n shareWorkspace(args: { readonly workspaceId: number; readonly folder: string }): Promise<{ readonly folder: string }>;\n renameWorkspace(workspaceId: number, name: string): Promise<{ readonly id: number; readonly name: string }>;\n /** {§methods-workspace-create} Archive or unarchive a workspace; an archive is refused while it holds live work. */\n setWorkspaceArchived(args: { readonly workspaceId: number; readonly archived: boolean }): Promise<ApplicationWorkspaceArchiving>;\n /** {§methods-workspace-create} Archive or unarchive a session with every session beneath it; an archive is refused while they hold live work. */\n setSessionArchived(args: { readonly workspaceId: number; readonly sessionId: number; readonly archived: boolean }): Promise<ApplicationSessionArchiving>;\n /** {§methods-workspace-create} Permanently delete a session and its descendant subtree; refused while they hold live work. */\n deleteSession(args: { readonly workspaceId: number; readonly sessionId: number }): Promise<ApplicationSessionDeletion>;\n /** {§methods-workspace-create} Store a normalized human-readable title on a session. */\n setSessionTitle(args: { readonly workspaceId: number; readonly sessionId: number; readonly title: string }): Promise<ApplicationSessionTitling>;\n /** {§methods-workspace-create} Cancel a single live stream subscription owned by a session without cancelling the whole session. */\n cancelStream(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n readonly entryId?: number;\n readonly target?: string;\n readonly coordinate?: string;\n }): Promise<boolean>;\n // {§log-wire-format} — reverse `sessionId`'s settled file mutations after its log coordinate `to`, latest\n // first, as one client operation of `actor` ({§connection-lifecycle}); stops at the first file that no\n // longer holds what its mutation wrote.\n rollback(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n readonly actor: string;\n readonly to: string;\n }): Promise<RollbackReport>;\n /** {§methods-workspace-create} Activate a cold workspace's Functionality without a turn; resolves when it is active. */\n activateWorkspace(args: { readonly workspaceId: number }): Promise<void>;\n workspacePreparationStatus(workspaceId: number): readonly FunctionalityPreparationActivity[];\n workspaceDerivationStatus(workspaceId: number): {\n readonly phase: \"preparing\" | \"indexing\" | \"complete\" | \"failed\";\n readonly completed: number;\n readonly total: number;\n readonly percent: number;\n readonly message: string;\n // {§operation-results}: the producer's level rides unchanged — `warn` when a completed pass carries failed members.\n readonly level: \"info\" | \"warn\" | \"error\";\n } | null;\n readEntry(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n readonly target: string;\n readonly channel?: string;\n readonly offset?: number;\n }): Promise<EntryReadResult>;\n // {§methods} — the channel `target` selects, its fragment's or else its scheme's default, complete.\n readEntryChannel(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n readonly target: string;\n }): Promise<EntryReadResult>;\n forkSession(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n readonly name?: string;\n }): Promise<{\n readonly sessionId: number;\n readonly sessionName: string | null;\n readonly parentSessionId: number;\n }>;\n createSession(args: ApplicationSessionCreation): Promise<{ readonly sessionId: number; readonly sessionName: string }>;\n readSessionModel(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n }): Promise<{ readonly model: ModelRoute | null; readonly spawnModel: ModelRoute | null }>;\n setSessionModel(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n readonly selector: string;\n /** An effort chosen with the model; the daemon validates and persists the pair as one. */\n readonly effort?: unknown;\n }): Promise<ModelRoute>;\n setSessionSpawnModel(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n readonly selector: string | null;\n }): Promise<ModelRoute | null>;\n readSessionEffort(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n }): Promise<{\n readonly effort: Effort | null;\n // {§session-model-selection} — `explicit` only after setSessionEffort.\n readonly source: \"default\" | \"explicit\";\n readonly supportedEfforts: readonly Effort[];\n }>;\n setSessionEffort(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n readonly effort: unknown;\n }): Promise<{\n readonly effort: Effort;\n readonly source: \"explicit\";\n readonly supportedEfforts: readonly Effort[];\n }>;\n readWorkspaceProposalPolicy(args: {\n readonly workspaceId: number;\n }): Promise<{\n readonly policy: ProposalPolicy | null;\n readonly effective: ProposalPolicy;\n }>;\n setWorkspaceProposalPolicy(args: {\n readonly workspaceId: number;\n readonly policy: ProposalPolicy | null;\n }): Promise<{\n readonly policy: ProposalPolicy | null;\n readonly effective: ProposalPolicy;\n }>;\n listPersonas?(args: { readonly workspaceId: number }): Promise<readonly ApplicationPersonaProjection[]>;\n setSessionPersona?(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n readonly persona: string | null;\n }): Promise<{ readonly persona: string | null }>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ApplicationPort.js","sourceRoot":"","sources":["../../src/ApplicationPort.ts"],"names":[],"mappings":"AAoDA,OAAO,EACH,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,GAEtB,MAAM,eAAe,CAAC","sourcesContent":["import type { IncomingMessage, ServerResponse } from \"node:http\";\nimport type { Duplex } from \"node:stream\";\nimport type { FunctionalityPreparationActivity, ProviderAccounting, RollbackReport } from \"./types.generated.ts\";\nimport type { ApplicationInboxMessage, ApplicationMessage, MessageResource } from \"./MessageResource.ts\";\nimport type { ApplicationStream } from \"./ApplicationStream.ts\";\nimport type {\n ClientDisplayCapabilities,\n ClientInteractionProjection,\n ClientInteractionResolution,\n EntryReadResult,\n ModelCatalogPage,\n ModelCatalogQuery,\n ModelRoute,\n OperationResult,\n PlurnkStatement,\n ProposalPolicy,\n ProposalProjection,\n Notice,\n Effort,\n SessionOwner,\n} from \"./types.ts\";\nimport type {\n ApplicationOwnerIdentity,\n ProposalResolution,\n ApplicationActionContext,\n ApplicationActionDescriptor,\n ClientEnvelope,\n ApplicationSessionOverview,\n ApplicationSessionProjection,\n ApplicationSessionQuery,\n ApplicationSessionArchiving,\n ApplicationSessionDeletion,\n ApplicationSessionTitling,\n ApplicationWorkspaceArchiving,\n ApplicationSessionIdentity,\n ApplicationSessionCreation,\n ApplicationLoopAdmission,\n ApplicationLoopProjection,\n ApplicationGauge,\n ApplicationProviderAlias,\n ApplicationPersonaProjection,\n ApplicationServiceUpdateResult,\n LogEntryWire,\n ApplicationEventHandler,\n CredentialAuthority,\n} from \"./Application.ts\";\nimport type {\n ApplicationRuntimeStreamHandler,\n NotificationFilter,\n NotificationReplayResult,\n} from \"./ApplicationNotifications.ts\";\n\nexport {\n InFlightTracker,\n attachSseKeepAlive,\n writeHttpProblem,\n writeUpgradeProblem,\n type SseKeepAliveOptions,\n} from \"./HttpPort.ts\";\n\n/** {§http-host} One request on the daemon's listener, handed to the adapter that mounted its prefix. */\nexport type HttpRouteHandler = (req: IncomingMessage, res: ServerResponse) => void | Promise<void>;\n\n/** {§http-host} One upgrade request on the daemon's listener, handed to the adapter that mounted its prefix. */\nexport type HttpUpgradeHandler = (req: IncomingMessage, socket: Duplex, head: Buffer) => void | Promise<void>;\n\n/**\n * {§http-host} The daemon's one HTTP listener, offered to exterior adapters. A daemon is one trust\n * domain on one address: core binds `PLURNK_HOST:PLURNK_PORT` before it admits durable state,\n * answers 503 until admission, then routes to the longest mounted prefix or answers 404.\n * Adapters mount at `start()`; none opens a socket of its own. This is the one place the\n * application port names a transport, by ruling (#641): the standards address by URL, never by\n * port, so every exterior interface shares the address.\n */\nexport interface HttpHost {\n registerHttpRoute(prefix: string, handler: HttpRouteHandler): void;\n registerHttpUpgrade(prefix: string, handler: HttpUpgradeHandler): void;\n httpAddress(): { readonly host: string; readonly port: number };\n}\n\n/** {§application-session-observation} The transport-neutral application contract consumed by exterior adapters. */\nexport interface ApplicationPort extends HttpHost {\n readonly serviceVersion?: string;\n readonly credentials: CredentialAuthority;\n registerSessionOwner(workspaceId: number, owner: SessionOwner): Promise<void>;\n claimSessionOwner(args: { readonly workspaceId: number; readonly sessionId: number; readonly owner: string }): Promise<SessionOwner>;\n configurationNotices(workspaceId?: number): readonly Notice[];\n listClientDisplayCapabilities(): Promise<ClientDisplayCapabilities>;\n listModuleActions(): ApplicationActionDescriptor[];\n invokeModuleAction(\n name: string,\n params: Readonly<Record<string, unknown>>,\n context: ApplicationActionContext,\n ): Promise<unknown>;\n subscribeToEvents(handler: ApplicationEventHandler, filter?: NotificationFilter): () => void;\n subscribeToRuntimeStream?(handler: ApplicationRuntimeStreamHandler): () => void;\n readonly notificationEpoch?: string;\n replayNotifications?(args: {\n readonly lastEventId: string;\n readonly filter?: NotificationFilter;\n }): NotificationReplayResult;\n pendingProposals(workspaceId: number): Promise<ProposalProjection[]>;\n resolveProposal(logEntryId: number, resolution: ProposalResolution, owner: ApplicationOwnerIdentity): Promise<void>;\n pendingClientInteractions(workspaceId: number): Promise<ClientInteractionProjection[]>;\n resolveClientInteraction(\n interactionId: number,\n resolution: ClientInteractionResolution,\n respondent: ApplicationOwnerIdentity,\n message?: { readonly body: string; readonly source: string; readonly envelope: Readonly<Record<string, unknown>> },\n ): Promise<void>;\n readMessages(args: { readonly workspaceId: number; readonly sessionId: number; readonly loopId?: number }): Promise<ApplicationMessage[]>;\n /** {§methods} The accepted messages the session has not yet observed at a turn boundary, in acceptance order, each with the lifecycle of the loop holding it. */\n readInbox(args: { readonly workspaceId: number; readonly sessionId: number }): Promise<ApplicationInboxMessage[]>;\n /** {§methods} The accepted messages the session has not yet completed, in acceptance order, each with the lifecycle of the loop holding it. */\n readOpenMessages(args: { readonly workspaceId: number; readonly sessionId: number }): Promise<ApplicationInboxMessage[]>;\n /** {§methods} The streams the session holds open, in opening order, each with its channels' states. */\n readStreams(args: { readonly workspaceId: number; readonly sessionId: number }): Promise<ApplicationStream[]>;\n /** {§methods} A client message's address is its idempotency key: `new` when nothing is accepted there,\n * `accepted` when the same body is; another body under an accepted address is refused, 422 `message-address-reused`. */\n messageAdmission(args: { readonly workspaceId: number; readonly address: string; readonly body: string }): Promise<\"new\" | \"accepted\">;\n ensureRuntimeSession(workspaceId: number): Promise<number>;\n runLoop(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n readonly loopId?: number;\n readonly prompt: string;\n readonly source?: string;\n readonly messageAddress?: string;\n readonly attachments?: readonly MessageResource[];\n readonly envelope?: Readonly<Record<string, unknown>>;\n readonly maxTurns?: number;\n readonly openPaths?: string[];\n readonly selector?: string;\n readonly childSelector?: string | null;\n readonly proposalPolicy?: ProposalPolicy | null;\n }): Promise<ApplicationLoopAdmission>;\n cancelDrain(sessionId: number, reason?: string): boolean;\n cancelSession(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n readonly reason?: string;\n }): Promise<void>;\n // {§connection-lifecycle} — a person's client operation: one loop in the workspace's runtime session,\n // attributed to `actor`, its `log:///` addresses read in `contextSessionId`'s log\n // ({§connection-lifecycle}); `onLoop` hears that loop before any statement runs.\n dispatchClientAction(args: {\n readonly workspaceId: number;\n readonly actor: string;\n readonly contextSessionId?: number;\n readonly statements: PlurnkStatement[];\n readonly onLoop?: (loop: { readonly sessionId: number; readonly loopId: number }) => void;\n }): Promise<OperationResult[]>;\n // {§connection-lifecycle} — cancel exactly one client operation: its dispatch while it runs and every execution its\n // rows started that still runs; false when nothing of it was running.\n cancelLoop(args: { readonly workspaceId: number; readonly loopId: number; readonly reason?: string }): Promise<boolean>;\n // {§expression-boundaries} — the workspace's available names also permit slotless invocation.\n executorTags(workspaceId: number): readonly string[];\n readLog(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n readonly loopId?: number;\n readonly turnId?: number;\n readonly sinceId?: number;\n readonly beforeId?: number;\n readonly limit?: number;\n readonly loopSeq?: number;\n readonly beforeLoopSeq?: number;\n readonly afterLoopSeq?: number;\n readonly lastLoops?: number;\n readonly turnSeq?: number;\n readonly sequence?: number;\n }): Promise<LogEntryWire[]>;\n /** {§acp-status-descendants} Each alias is the route a session seeded from it gets, its configured effort included. */\n listProviders(): { readonly aliases: Array<ApplicationProviderAlias> };\n listModels(query: ModelCatalogQuery): ModelCatalogPage;\n /** {§startup-admission} Explicitly refresh the Models.dev catalog cache when `PLURNK_SERVICE_UPDATEABLE=1`. */\n updateService?(): Promise<ApplicationServiceUpdateResult>;\n createWorkspace(args: {\n readonly name?: string;\n readonly projectRoot?: string | null;\n readonly settings?: string | object;\n }): Promise<ClientEnvelope>;\n /** {§methods-workspace-create} Read-only selection; folder defaults are derived by the daemon. */\n attachWorkspace(args:\n | { readonly workspaceId: number; readonly name?: never; readonly projectRoot?: never }\n | { readonly name: string; readonly workspaceId?: never; readonly projectRoot?: never }\n | { readonly projectRoot: string; readonly workspaceId?: never; readonly name?: never }\n ): Promise<ClientEnvelope>;\n /** {§session-external-reference} Opaque, adapter-namespaced identity; reading never allocates. */\n readSessionReference(args: { readonly namespace: string; readonly reference: string }): Promise<{ readonly workspaceId: number; readonly sessionId: number } | null>;\n /** {§session-external-reference} Atomically allocate a folderless workspace and model session when absent. */\n ensureSessionReference(args: { readonly namespace: string; readonly reference: string }): Promise<{ readonly workspaceId: number; readonly sessionId: number }>;\n /** {§session-external-reference} Inspect the adapter's retained references to this session. */\n listSessionReferences(args: { readonly workspaceId: number; readonly sessionId: number; readonly namespace: string }): Promise<string[]>;\n /** {§machine-processes} Omitted `archived` lists every workspace; true only archived ones, false only unarchived ones. */\n listWorkspaces(query?: { readonly archived?: boolean }): Promise<Array<{\n readonly id: number;\n readonly name: string;\n readonly projectRoot: string | null;\n /** {§execution-output-identity} */\n readonly projectLabel: string | null;\n readonly createdAt: string;\n /** {§machine-processes} When the workspace was archived, or null while it is unarchived. */\n readonly archivedAt: string | null;\n }>>;\n listSessions(\n workspaceId: number,\n query?: ApplicationSessionQuery,\n ): Promise<ApplicationSessionProjection[]>;\n readSession(args: {\n readonly workspaceId: number;\n readonly identity: ApplicationSessionIdentity;\n }): Promise<ApplicationSessionProjection | null>;\n listSessionLoops(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n }): Promise<ApplicationLoopProjection[]>;\n // {§methods-workspace-create} — the places of the daemon, or of one workspace, with what waits there.\n readSessionOverview(args: {\n readonly workspaceId?: number;\n readonly limit: number;\n readonly excerptChars: number;\n }): Promise<ApplicationSessionOverview>;\n // {§methods-workspace-create} — the spend of the session and its descendants since it began.\n sessionAccounting(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n }): Promise<ProviderAccounting>;\n // {§methods-workspace-create} — the client gauge the session's latest packet reported.\n sessionGauge(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n }): Promise<ApplicationGauge>;\n // {§methods-workspace-create} — an omitted sessionId lists every model session's client-addressed seeds.\n listPrompts(workspaceId: number, limit?: number, sessionId?: number): Promise<string[]>;\n // {§share} — the workspace's share, from a consistent copy of the daemon's database, into an absolute folder.\n shareWorkspace(args: { readonly workspaceId: number; readonly folder: string }): Promise<{ readonly folder: string }>;\n renameWorkspace(workspaceId: number, name: string): Promise<{ readonly id: number; readonly name: string }>;\n /** {§methods-workspace-create} Archive or unarchive a workspace; an archive is refused while it holds live work. */\n setWorkspaceArchived(args: { readonly workspaceId: number; readonly archived: boolean }): Promise<ApplicationWorkspaceArchiving>;\n /** {§methods-workspace-create} Archive or unarchive a session with every session beneath it; an archive is refused while they hold live work. */\n setSessionArchived(args: { readonly workspaceId: number; readonly sessionId: number; readonly archived: boolean }): Promise<ApplicationSessionArchiving>;\n /** {§methods-workspace-create} Permanently delete a session and its descendant subtree; refused while they hold live work. */\n deleteSession(args: { readonly workspaceId: number; readonly sessionId: number }): Promise<ApplicationSessionDeletion>;\n /** {§methods-workspace-create} Store a normalized human-readable title on a session. */\n setSessionTitle(args: { readonly workspaceId: number; readonly sessionId: number; readonly title: string }): Promise<ApplicationSessionTitling>;\n /** {§methods-workspace-create} Cancel a single live stream subscription owned by a session without cancelling the whole session. */\n cancelStream(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n readonly entryId?: number;\n readonly target?: string;\n readonly coordinate?: string;\n }): Promise<boolean>;\n // {§log-wire-format} — reverse `sessionId`'s settled file mutations after its log coordinate `to`, latest\n // first, as one client operation of `actor` ({§connection-lifecycle}); stops at the first file that no\n // longer holds what its mutation wrote.\n rollback(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n readonly actor: string;\n readonly to: string;\n }): Promise<RollbackReport>;\n /** {§methods-workspace-create} Activate a cold workspace's Functionality without a turn; resolves when it is active. */\n activateWorkspace(args: { readonly workspaceId: number }): Promise<void>;\n workspacePreparationStatus(workspaceId: number): readonly FunctionalityPreparationActivity[];\n workspaceDerivationStatus(workspaceId: number): {\n readonly phase: \"preparing\" | \"indexing\" | \"complete\" | \"failed\";\n readonly completed: number;\n readonly total: number;\n readonly percent: number;\n readonly message: string;\n // {§operation-results}: the producer's level rides unchanged — `warn` when a completed pass carries failed members.\n readonly level: \"info\" | \"warn\" | \"error\";\n } | null;\n readEntry(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n readonly target: string;\n readonly channel?: string;\n readonly offset?: number;\n }): Promise<EntryReadResult>;\n // {§methods} — the channel `target` selects, its fragment's or else its scheme's default, complete.\n readEntryChannel(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n readonly target: string;\n }): Promise<EntryReadResult>;\n forkSession(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n readonly name?: string;\n }): Promise<{\n readonly sessionId: number;\n readonly sessionName: string | null;\n readonly parentSessionId: number;\n }>;\n createSession(args: ApplicationSessionCreation): Promise<{ readonly sessionId: number; readonly sessionName: string }>;\n readSessionModel(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n }): Promise<{ readonly model: ModelRoute | null; readonly childModel: ModelRoute | null }>;\n setSessionModel(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n readonly selector: string;\n /** An effort chosen with the model; the daemon validates and persists the pair as one. */\n readonly effort?: unknown;\n }): Promise<ModelRoute>;\n setSessionChildModel(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n readonly selector: string | null;\n }): Promise<ModelRoute | null>;\n readSessionEffort(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n }): Promise<{\n readonly effort: Effort | null;\n // {§session-model-selection} — `explicit` only after setSessionEffort.\n readonly source: \"default\" | \"explicit\";\n readonly supportedEfforts: readonly Effort[];\n }>;\n setSessionEffort(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n readonly effort: unknown;\n }): Promise<{\n readonly effort: Effort;\n readonly source: \"explicit\";\n readonly supportedEfforts: readonly Effort[];\n }>;\n readWorkspaceProposalPolicy(args: {\n readonly workspaceId: number;\n }): Promise<{\n readonly policy: ProposalPolicy | null;\n readonly effective: ProposalPolicy;\n }>;\n setWorkspaceProposalPolicy(args: {\n readonly workspaceId: number;\n readonly policy: ProposalPolicy | null;\n }): Promise<{\n readonly policy: ProposalPolicy | null;\n readonly effective: ProposalPolicy;\n }>;\n readSessionProposalPolicy(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n }): Promise<{\n readonly policy: ProposalPolicy | null;\n readonly effective: ProposalPolicy;\n }>;\n setSessionProposalPolicy(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n readonly policy: ProposalPolicy | null;\n }): Promise<{\n readonly policy: ProposalPolicy | null;\n readonly effective: ProposalPolicy;\n }>;\n listPersonas?(args: { readonly workspaceId: number }): Promise<readonly ApplicationPersonaProjection[]>;\n setSessionPersona?(args: {\n readonly workspaceId: number;\n readonly sessionId: number;\n readonly persona: string | null;\n }): Promise<{ readonly persona: string | null }>;\n}\n"]}
|
|
@@ -12,8 +12,8 @@ export interface ApplicationStream {
|
|
|
12
12
|
/** The causal log item, when the stream began in a turn. */
|
|
13
13
|
readonly op?: string;
|
|
14
14
|
readonly aside?: string;
|
|
15
|
-
readonly
|
|
16
|
-
readonly
|
|
15
|
+
readonly loopSeq?: number;
|
|
16
|
+
readonly turnSeq?: number;
|
|
17
17
|
readonly sequence?: number;
|
|
18
18
|
/** Every channel of the stream's entry, written or not, by name. */
|
|
19
19
|
readonly channels: readonly ApplicationStreamChannel[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationStream.d.ts","sourceRoot":"","sources":["../../src/ApplicationStream.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D;0GAC0G;AAC1G,MAAM,WAAW,iBAAiB;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,iDAAiD;IACjD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,iEAAiE;IACjE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,8EAA8E;IAC9E,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"ApplicationStream.d.ts","sourceRoot":"","sources":["../../src/ApplicationStream.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D;0GAC0G;AAC1G,MAAM,WAAW,iBAAiB;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,iDAAiD;IACjD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,iEAAiE;IACjE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,8EAA8E;IAC9E,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,oEAAoE;IACpE,QAAQ,CAAC,QAAQ,EAAE,SAAS,wBAAwB,EAAE,CAAC;CAC1D;AAED,MAAM,WAAW,wBAAwB;IACrC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAC5C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationStream.js","sourceRoot":"","sources":["../../src/ApplicationStream.ts"],"names":[],"mappings":"","sourcesContent":["import type { ClientEntryChannel } from \"./types.generated.ts\";\n\n/** {§methods} A stream the session holds open: what it is, the operation that opened it, and\n * the state of each of its channels. Identity and coordinates are named as `stream/event` names them. */\nexport interface ApplicationStream {\n readonly entryId: number;\n /** The initiating Session ({§subscriptions}). */\n readonly sessionId: number;\n /** The canonical resource URI ({§execution-output-identity}). */\n readonly target: string;\n /** ISO-8601 UTC timestamp when the subscription opened ({§subscriptions}). */\n readonly openedAt?: string;\n /** The causal log item, when the stream began in a turn. */\n readonly op?: string;\n readonly aside?: string;\n readonly
|
|
1
|
+
{"version":3,"file":"ApplicationStream.js","sourceRoot":"","sources":["../../src/ApplicationStream.ts"],"names":[],"mappings":"","sourcesContent":["import type { ClientEntryChannel } from \"./types.generated.ts\";\n\n/** {§methods} A stream the session holds open: what it is, the operation that opened it, and\n * the state of each of its channels. Identity and coordinates are named as `stream/event` names them. */\nexport interface ApplicationStream {\n readonly entryId: number;\n /** The initiating Session ({§subscriptions}). */\n readonly sessionId: number;\n /** The canonical resource URI ({§execution-output-identity}). */\n readonly target: string;\n /** ISO-8601 UTC timestamp when the subscription opened ({§subscriptions}). */\n readonly openedAt?: string;\n /** The causal log item, when the stream began in a turn. */\n readonly op?: string;\n readonly aside?: string;\n readonly loopSeq?: number;\n readonly turnSeq?: number;\n readonly sequence?: number;\n /** Every channel of the stream's entry, written or not, by name. */\n readonly channels: readonly ApplicationStreamChannel[];\n}\n\nexport interface ApplicationStreamChannel {\n readonly channel: string;\n readonly state: ClientEntryChannel[\"state\"];\n readonly mimetype: string;\n}\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare const LIST_STATES: readonly ["disabled", "dormant", "active", "unavailable", "authorization-required"];
|
|
2
|
+
export declare const LIST_ORIGINS: readonly ["service", "workspace", "session"];
|
|
3
|
+
export declare const FAMILY_LIST_FLAGS: readonly {
|
|
4
|
+
readonly value: string;
|
|
5
|
+
readonly description: string;
|
|
6
|
+
}[];
|
|
7
|
+
export declare const FAMILY_DISCOVER_FLAGS_BY_FAMILY: Readonly<Record<string, readonly {
|
|
8
|
+
readonly value: string;
|
|
9
|
+
readonly description: string;
|
|
10
|
+
}[]>>;
|
|
11
|
+
export declare const MODELS_LIST_FLAGS: readonly {
|
|
12
|
+
readonly value: string;
|
|
13
|
+
readonly description: string;
|
|
14
|
+
}[];
|
|
15
|
+
/**
|
|
16
|
+
* {§client-collection-browsing} Parses bounded list filters (`[query...]`, `--query`, `--state`, `--origin`,
|
|
17
|
+
* `--offset`, `--limit`) uniformly for every Functionality family.
|
|
18
|
+
*/
|
|
19
|
+
export declare const parseFamilyListArgs: (rest: readonly string[]) => Record<string, unknown>;
|
|
20
|
+
/**
|
|
21
|
+
* {§client-collection-browsing} Parses discovery filters and cursor pagination (`--source`, `--query`, `--rule`,
|
|
22
|
+
* `--cursor`, `--limit`, plus family-specific positional arguments) uniformly across families.
|
|
23
|
+
*/
|
|
24
|
+
export declare const parseFamilyDiscoverArgs: (family: string, rest: readonly string[]) => Record<string, unknown>;
|
|
25
|
+
/**
|
|
26
|
+
* {§client-collection-browsing} Formats a concise pagination footer for sliced/paged `FunctionalityListResult` pages.
|
|
27
|
+
*/
|
|
28
|
+
export declare const formatListPageFooter: (result: Readonly<Record<string, unknown>>) => string | null;
|
|
29
|
+
/**
|
|
30
|
+
* {§client-collection-browsing} Formats a concise pagination footer for sliced/paged `FunctionalityDiscoverResult` pages.
|
|
31
|
+
*/
|
|
32
|
+
export declare const formatDiscoverPageFooter: (result: Readonly<Record<string, unknown>>) => string | null;
|
|
33
|
+
//# sourceMappingURL=CollectionCommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CollectionCommand.d.ts","sourceRoot":"","sources":["../../src/CollectionCommand.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW,qFAMb,CAAC;AAEZ,eAAO,MAAM,YAAY,8CAA8D,CAAC;AAExF,eAAO,MAAM,iBAAiB,EAAE,SAAS;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAAE,EAM/F,CAAC;AAEH,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAClD,MAAM,CAAC,MAAM,EAAE,SAAS;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAAE,EAAE,CAAC,CAkCrF,CAAC;AAEH,eAAO,MAAM,iBAAiB,EAAE,SAAS;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAAE,EAK/F,CAAC;AAgCH;;;GAGG;AACH,eAAO,MAAM,mBAAmB,SAAU,SAAS,MAAM,EAAE,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAsDnF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,WAAY,MAAM,QAAQ,SAAS,MAAM,EAAE,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAwEvG,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,WAAY,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAA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