@ai-agent-forge/plugin-sdk 0.88.12 → 0.88.14

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/durable.d.ts CHANGED
@@ -89,6 +89,15 @@ export interface DurableServiceV1 {
89
89
  loadArtifact(input: {
90
90
  readonly artifactId: string;
91
91
  }): DurableArtifactRecordV1 | undefined;
92
+ /**
93
+ * Records for one session, ordered by artifactId for stable output. Optional:
94
+ * backends without enumeration answer nothing here, and consumers surface an
95
+ * explicit "not implemented" instead of an empty list (App artifact panel is
96
+ * the first consumer). Read-only; never gated by the writer lease.
97
+ */
98
+ listArtifacts?(input: {
99
+ readonly sessionId: string;
100
+ }): readonly DurableArtifactRecordV1[];
92
101
  /** All session records, ordered by sessionId for stable output. */
93
102
  listSessions(): readonly DurableSessionRecordV1[];
94
103
  claimWriter(writerId: string): DurableWriterClaimV1;
@@ -1 +1 @@
1
- {"version":3,"file":"durable.d.ts","sourceRoot":"","sources":["../src/durable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,sBAAsB;IACtC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,wBAAwB;IACxC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,uBAAuB;IACvC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,WAAW,EA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AkB,CAAC;IAChC,WAAW,IAAI,iBAAiB,CAAC;IACjC,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;IACrC;;;OAGG;IACH,iBAAiB,IAAI,0BAA0B,CAAC;CAChD","sourcesContent":["/**\n * Durable service contract types (7.4b) — the plugin-facing persistence\n * surface of the host's durable store.\n *\n * Authority: `@agent-forge/plugin-sdk` (D-075 S4 third batch, type-only\n * migration from the host's `src/durable/durable-service.ts`). The host keeps\n * the implementation (`createDurableService`, writer lease, backends) and its\n * historical module exports; these pure type definitions are the contract a\n * capability plugin programs against (e.g. the first-party subagent-delegate\n * plugin's scheduler persists terminal records through `results.store`).\n * No runtime behavior lives here — importing this module never pulls in\n * `node:fs`.\n */\n\nexport interface DurableSessionRecordV1 {\n\treadonly sessionId: string;\n\treadonly data: unknown;\n\treadonly persistedAt: number;\n}\n\nexport interface DurableOperationRecordV1 {\n\treadonly operationId: string;\n\treadonly sessionId: string;\n\treadonly data: unknown;\n\treadonly persistedAt: number;\n}\n\nexport interface DurableArtifactRecordV1 {\n\treadonly artifactId: string;\n\treadonly sessionId: string;\n\treadonly data: unknown;\n\treadonly persistedAt: number;\n}\n\nexport interface DurableSnapshotV1 {\n\treadonly version: 1;\n\treadonly exportedAt: number;\n\treadonly sessions: readonly DurableSessionRecordV1[];\n\treadonly operations: readonly DurableOperationRecordV1[];\n\treadonly artifacts: readonly DurableArtifactRecordV1[];\n\treadonly writer: { readonly holder: string | null; readonly crashPending: string | null };\n}\n\nexport type DurableWriterClaimV1 = { readonly status: \"claimed\" } | { readonly status: \"held\"; readonly by: string };\n\nexport type DurableWriterRecoveryV1 =\n\t| { readonly status: \"recovered\"; readonly previousWriter?: string }\n\t| { readonly status: \"held\" };\n\nexport interface DurableReadinessV1 {\n\treadonly ready: boolean;\n\treadonly reason?: string;\n}\n\n/** Diagnostics from the startup log replay of a backend-backed service. */\nexport interface DurableReplayDiagnosticsV1 {\n\t/** Malformed log lines skipped while replaying. */\n\treadonly corruptedLines: number;\n\t/** True when the log existed but could not be read. */\n\treadonly unreadable: boolean;\n}\n\nexport interface DurableServiceV1 {\n\tpersistSession(input: {\n\t\treadonly writerId: string;\n\t\treadonly sessionId: string;\n\t\treadonly data: unknown;\n\t}): DurableSessionRecordV1;\n\tloadSession(input: { readonly sessionId: string }): DurableSessionRecordV1 | undefined;\n\tpersistOperation(input: {\n\t\treadonly writerId: string;\n\t\treadonly operationId: string;\n\t\treadonly sessionId: string;\n\t\treadonly data: unknown;\n\t}): DurableOperationRecordV1;\n\tloadOperation(input: { readonly operationId: string }): DurableOperationRecordV1 | undefined;\n\tpersistArtifact(input: {\n\t\treadonly writerId: string;\n\t\treadonly artifactId: string;\n\t\treadonly sessionId: string;\n\t\treadonly data: unknown;\n\t}): DurableArtifactRecordV1;\n\tloadArtifact(input: { readonly artifactId: string }): DurableArtifactRecordV1 | undefined;\n\t/** All session records, ordered by sessionId for stable output. */\n\tlistSessions(): readonly DurableSessionRecordV1[];\n\tclaimWriter(writerId: string): DurableWriterClaimV1;\n\treleaseWriter(writerId: string): { readonly status: \"released\" };\n\trecoverWriter(writerId: string): DurableWriterRecoveryV1;\n\treadiness(): DurableReadinessV1;\n\texportState(): DurableSnapshotV1;\n\timportState(snapshot: unknown): void;\n\t/**\n\t * Diagnostics from the startup log replay of the backend (zeros/false\n\t * without a backend). Corrupted lines were skipped, not fatal.\n\t */\n\treplayDiagnostics(): DurableReplayDiagnosticsV1;\n}\n"]}
1
+ {"version":3,"file":"durable.d.ts","sourceRoot":"","sources":["../src/durable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,sBAAsB;IACtC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,wBAAwB;IACxC,QAAQ,CAAC,WAAW,EAAE,MAAM,C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,GAAG,uBAAuB,GAAG,SAAS,CAAC;IAC1F;;;;;OAKG;IACH,aAAa,CAAC,CAAC,KAAK,EAAE;QAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,uBAAuB,EAAE,CAAC;IAC1F,mEAAmE;IACnE,YAAY,IAAI,SAAS,sBAAsB,EAAE,CAAC;IAClD,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,oBAAoB,CAAC;IACpD,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG;QAAE,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAA;KAAE,CAAC;IACjE,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,uBAAuB,CAAC;IACzD,SAAS,IAAI,kBAAkB,CAAC;IAChC,WAAW,IAAI,iBAAiB,CAAC;IACjC,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;IACrC;;;OAGG;IACH,iBAAiB,IAAI,0BAA0B,CAAC;CAChD","sourcesContent":["/**\n * Durable service contract types (7.4b) — the plugin-facing persistence\n * surface of the host's durable store.\n *\n * Authority: `@agent-forge/plugin-sdk` (D-075 S4 third batch, type-only\n * migration from the host's `src/durable/durable-service.ts`). The host keeps\n * the implementation (`createDurableService`, writer lease, backends) and its\n * historical module exports; these pure type definitions are the contract a\n * capability plugin programs against (e.g. the first-party subagent-delegate\n * plugin's scheduler persists terminal records through `results.store`).\n * No runtime behavior lives here — importing this module never pulls in\n * `node:fs`.\n */\n\nexport interface DurableSessionRecordV1 {\n\treadonly sessionId: string;\n\treadonly data: unknown;\n\treadonly persistedAt: number;\n}\n\nexport interface DurableOperationRecordV1 {\n\treadonly operationId: string;\n\treadonly sessionId: string;\n\treadonly data: unknown;\n\treadonly persistedAt: number;\n}\n\nexport interface DurableArtifactRecordV1 {\n\treadonly artifactId: string;\n\treadonly sessionId: string;\n\treadonly data: unknown;\n\treadonly persistedAt: number;\n}\n\nexport interface DurableSnapshotV1 {\n\treadonly version: 1;\n\treadonly exportedAt: number;\n\treadonly sessions: readonly DurableSessionRecordV1[];\n\treadonly operations: readonly DurableOperationRecordV1[];\n\treadonly artifacts: readonly DurableArtifactRecordV1[];\n\treadonly writer: { readonly holder: string | null; readonly crashPending: string | null };\n}\n\nexport type DurableWriterClaimV1 = { readonly status: \"claimed\" } | { readonly status: \"held\"; readonly by: string };\n\nexport type DurableWriterRecoveryV1 =\n\t| { readonly status: \"recovered\"; readonly previousWriter?: string }\n\t| { readonly status: \"held\" };\n\nexport interface DurableReadinessV1 {\n\treadonly ready: boolean;\n\treadonly reason?: string;\n}\n\n/** Diagnostics from the startup log replay of a backend-backed service. */\nexport interface DurableReplayDiagnosticsV1 {\n\t/** Malformed log lines skipped while replaying. */\n\treadonly corruptedLines: number;\n\t/** True when the log existed but could not be read. */\n\treadonly unreadable: boolean;\n}\n\nexport interface DurableServiceV1 {\n\tpersistSession(input: {\n\t\treadonly writerId: string;\n\t\treadonly sessionId: string;\n\t\treadonly data: unknown;\n\t}): DurableSessionRecordV1;\n\tloadSession(input: { readonly sessionId: string }): DurableSessionRecordV1 | undefined;\n\tpersistOperation(input: {\n\t\treadonly writerId: string;\n\t\treadonly operationId: string;\n\t\treadonly sessionId: string;\n\t\treadonly data: unknown;\n\t}): DurableOperationRecordV1;\n\tloadOperation(input: { readonly operationId: string }): DurableOperationRecordV1 | undefined;\n\tpersistArtifact(input: {\n\t\treadonly writerId: string;\n\t\treadonly artifactId: string;\n\t\treadonly sessionId: string;\n\t\treadonly data: unknown;\n\t}): DurableArtifactRecordV1;\n\tloadArtifact(input: { readonly artifactId: string }): DurableArtifactRecordV1 | undefined;\n\t/**\n\t * Records for one session, ordered by artifactId for stable output. Optional:\n\t * backends without enumeration answer nothing here, and consumers surface an\n\t * explicit \"not implemented\" instead of an empty list (App artifact panel is\n\t * the first consumer). Read-only; never gated by the writer lease.\n\t */\n\tlistArtifacts?(input: { readonly sessionId: string }): readonly DurableArtifactRecordV1[];\n\t/** All session records, ordered by sessionId for stable output. */\n\tlistSessions(): readonly DurableSessionRecordV1[];\n\tclaimWriter(writerId: string): DurableWriterClaimV1;\n\treleaseWriter(writerId: string): { readonly status: \"released\" };\n\trecoverWriter(writerId: string): DurableWriterRecoveryV1;\n\treadiness(): DurableReadinessV1;\n\texportState(): DurableSnapshotV1;\n\timportState(snapshot: unknown): void;\n\t/**\n\t * Diagnostics from the startup log replay of the backend (zeros/false\n\t * without a backend). Corrupted lines were skipped, not fatal.\n\t */\n\treplayDiagnostics(): DurableReplayDiagnosticsV1;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"durable.js","sourceRoot":"","sources":["../src/durable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG","sourcesContent":["/**\n * Durable service contract types (7.4b) — the plugin-facing persistence\n * surface of the host's durable store.\n *\n * Authority: `@agent-forge/plugin-sdk` (D-075 S4 third batch, type-only\n * migration from the host's `src/durable/durable-service.ts`). The host keeps\n * the implementation (`createDurableService`, writer lease, backends) and its\n * historical module exports; these pure type definitions are the contract a\n * capability plugin programs against (e.g. the first-party subagent-delegate\n * plugin's scheduler persists terminal records through `results.store`).\n * No runtime behavior lives here — importing this module never pulls in\n * `node:fs`.\n */\n\nexport interface DurableSessionRecordV1 {\n\treadonly sessionId: string;\n\treadonly data: unknown;\n\treadonly persistedAt: number;\n}\n\nexport interface DurableOperationRecordV1 {\n\treadonly operationId: string;\n\treadonly sessionId: string;\n\treadonly data: unknown;\n\treadonly persistedAt: number;\n}\n\nexport interface DurableArtifactRecordV1 {\n\treadonly artifactId: string;\n\treadonly sessionId: string;\n\treadonly data: unknown;\n\treadonly persistedAt: number;\n}\n\nexport interface DurableSnapshotV1 {\n\treadonly version: 1;\n\treadonly exportedAt: number;\n\treadonly sessions: readonly DurableSessionRecordV1[];\n\treadonly operations: readonly DurableOperationRecordV1[];\n\treadonly artifacts: readonly DurableArtifactRecordV1[];\n\treadonly writer: { readonly holder: string | null; readonly crashPending: string | null };\n}\n\nexport type DurableWriterClaimV1 = { readonly status: \"claimed\" } | { readonly status: \"held\"; readonly by: string };\n\nexport type DurableWriterRecoveryV1 =\n\t| { readonly status: \"recovered\"; readonly previousWriter?: string }\n\t| { readonly status: \"held\" };\n\nexport interface DurableReadinessV1 {\n\treadonly ready: boolean;\n\treadonly reason?: string;\n}\n\n/** Diagnostics from the startup log replay of a backend-backed service. */\nexport interface DurableReplayDiagnosticsV1 {\n\t/** Malformed log lines skipped while replaying. */\n\treadonly corruptedLines: number;\n\t/** True when the log existed but could not be read. */\n\treadonly unreadable: boolean;\n}\n\nexport interface DurableServiceV1 {\n\tpersistSession(input: {\n\t\treadonly writerId: string;\n\t\treadonly sessionId: string;\n\t\treadonly data: unknown;\n\t}): DurableSessionRecordV1;\n\tloadSession(input: { readonly sessionId: string }): DurableSessionRecordV1 | undefined;\n\tpersistOperation(input: {\n\t\treadonly writerId: string;\n\t\treadonly operationId: string;\n\t\treadonly sessionId: string;\n\t\treadonly data: unknown;\n\t}): DurableOperationRecordV1;\n\tloadOperation(input: { readonly operationId: string }): DurableOperationRecordV1 | undefined;\n\tpersistArtifact(input: {\n\t\treadonly writerId: string;\n\t\treadonly artifactId: string;\n\t\treadonly sessionId: string;\n\t\treadonly data: unknown;\n\t}): DurableArtifactRecordV1;\n\tloadArtifact(input: { readonly artifactId: string }): DurableArtifactRecordV1 | undefined;\n\t/** All session records, ordered by sessionId for stable output. */\n\tlistSessions(): readonly DurableSessionRecordV1[];\n\tclaimWriter(writerId: string): DurableWriterClaimV1;\n\treleaseWriter(writerId: string): { readonly status: \"released\" };\n\trecoverWriter(writerId: string): DurableWriterRecoveryV1;\n\treadiness(): DurableReadinessV1;\n\texportState(): DurableSnapshotV1;\n\timportState(snapshot: unknown): void;\n\t/**\n\t * Diagnostics from the startup log replay of the backend (zeros/false\n\t * without a backend). Corrupted lines were skipped, not fatal.\n\t */\n\treplayDiagnostics(): DurableReplayDiagnosticsV1;\n}\n"]}
1
+ {"version":3,"file":"durable.js","sourceRoot":"","sources":["../src/durable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG","sourcesContent":["/**\n * Durable service contract types (7.4b) — the plugin-facing persistence\n * surface of the host's durable store.\n *\n * Authority: `@agent-forge/plugin-sdk` (D-075 S4 third batch, type-only\n * migration from the host's `src/durable/durable-service.ts`). The host keeps\n * the implementation (`createDurableService`, writer lease, backends) and its\n * historical module exports; these pure type definitions are the contract a\n * capability plugin programs against (e.g. the first-party subagent-delegate\n * plugin's scheduler persists terminal records through `results.store`).\n * No runtime behavior lives here — importing this module never pulls in\n * `node:fs`.\n */\n\nexport interface DurableSessionRecordV1 {\n\treadonly sessionId: string;\n\treadonly data: unknown;\n\treadonly persistedAt: number;\n}\n\nexport interface DurableOperationRecordV1 {\n\treadonly operationId: string;\n\treadonly sessionId: string;\n\treadonly data: unknown;\n\treadonly persistedAt: number;\n}\n\nexport interface DurableArtifactRecordV1 {\n\treadonly artifactId: string;\n\treadonly sessionId: string;\n\treadonly data: unknown;\n\treadonly persistedAt: number;\n}\n\nexport interface DurableSnapshotV1 {\n\treadonly version: 1;\n\treadonly exportedAt: number;\n\treadonly sessions: readonly DurableSessionRecordV1[];\n\treadonly operations: readonly DurableOperationRecordV1[];\n\treadonly artifacts: readonly DurableArtifactRecordV1[];\n\treadonly writer: { readonly holder: string | null; readonly crashPending: string | null };\n}\n\nexport type DurableWriterClaimV1 = { readonly status: \"claimed\" } | { readonly status: \"held\"; readonly by: string };\n\nexport type DurableWriterRecoveryV1 =\n\t| { readonly status: \"recovered\"; readonly previousWriter?: string }\n\t| { readonly status: \"held\" };\n\nexport interface DurableReadinessV1 {\n\treadonly ready: boolean;\n\treadonly reason?: string;\n}\n\n/** Diagnostics from the startup log replay of a backend-backed service. */\nexport interface DurableReplayDiagnosticsV1 {\n\t/** Malformed log lines skipped while replaying. */\n\treadonly corruptedLines: number;\n\t/** True when the log existed but could not be read. */\n\treadonly unreadable: boolean;\n}\n\nexport interface DurableServiceV1 {\n\tpersistSession(input: {\n\t\treadonly writerId: string;\n\t\treadonly sessionId: string;\n\t\treadonly data: unknown;\n\t}): DurableSessionRecordV1;\n\tloadSession(input: { readonly sessionId: string }): DurableSessionRecordV1 | undefined;\n\tpersistOperation(input: {\n\t\treadonly writerId: string;\n\t\treadonly operationId: string;\n\t\treadonly sessionId: string;\n\t\treadonly data: unknown;\n\t}): DurableOperationRecordV1;\n\tloadOperation(input: { readonly operationId: string }): DurableOperationRecordV1 | undefined;\n\tpersistArtifact(input: {\n\t\treadonly writerId: string;\n\t\treadonly artifactId: string;\n\t\treadonly sessionId: string;\n\t\treadonly data: unknown;\n\t}): DurableArtifactRecordV1;\n\tloadArtifact(input: { readonly artifactId: string }): DurableArtifactRecordV1 | undefined;\n\t/**\n\t * Records for one session, ordered by artifactId for stable output. Optional:\n\t * backends without enumeration answer nothing here, and consumers surface an\n\t * explicit \"not implemented\" instead of an empty list (App artifact panel is\n\t * the first consumer). Read-only; never gated by the writer lease.\n\t */\n\tlistArtifacts?(input: { readonly sessionId: string }): readonly DurableArtifactRecordV1[];\n\t/** All session records, ordered by sessionId for stable output. */\n\tlistSessions(): readonly DurableSessionRecordV1[];\n\tclaimWriter(writerId: string): DurableWriterClaimV1;\n\treleaseWriter(writerId: string): { readonly status: \"released\" };\n\trecoverWriter(writerId: string): DurableWriterRecoveryV1;\n\treadiness(): DurableReadinessV1;\n\texportState(): DurableSnapshotV1;\n\timportState(snapshot: unknown): void;\n\t/**\n\t * Diagnostics from the startup log replay of the backend (zeros/false\n\t * without a backend). Corrupted lines were skipped, not fatal.\n\t */\n\treplayDiagnostics(): DurableReplayDiagnosticsV1;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-agent-forge/plugin-sdk",
3
- "version": "0.88.12",
3
+ "version": "0.88.14",
4
4
  "description": "Shared plugin development contracts (artifact, operation, diff, render, context budget DTOs) for Agent Forge plugins",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",