From 6d3155e2bff580845713948c32035a082e875372 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 13 Apr 2026 10:17:10 +0000 Subject: [PATCH] chore: release packages Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changeset/storage-abstraction-postgres.md | 57 --------------------- packages/app/CHANGELOG.md | 56 +++++++++++++++++++++ packages/app/package.json | 2 +- packages/capabilities/CHANGELOG.md | 55 ++++++++++++++++++++ packages/capabilities/package.json | 2 +- packages/cli/CHANGELOG.md | 7 +++ packages/cli/package.json | 2 +- packages/core/CHANGELOG.md | 50 +++++++++++++++++++ packages/core/package.json | 2 +- packages/create-agentrail-app/CHANGELOG.md | 7 +++ packages/create-agentrail-app/package.json | 2 +- packages/deep-research/CHANGELOG.md | 8 +++ packages/deep-research/package.json | 2 +- packages/storage-postgres/CHANGELOG.md | 58 ++++++++++++++++++++++ packages/storage-postgres/package.json | 2 +- packages/testing/CHANGELOG.md | 7 +++ packages/testing/package.json | 2 +- 17 files changed, 256 insertions(+), 65 deletions(-) delete mode 100644 .changeset/storage-abstraction-postgres.md create mode 100644 packages/storage-postgres/CHANGELOG.md diff --git a/.changeset/storage-abstraction-postgres.md b/.changeset/storage-abstraction-postgres.md deleted file mode 100644 index 0dc34fd..0000000 --- a/.changeset/storage-abstraction-postgres.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -"@agentrail/core": minor -"@agentrail/capabilities": minor -"@agentrail/app": minor -"@agentrail/storage-postgres": minor ---- - -**Storage Abstraction + Memo FS + PostgreSQL reference implementation (#69)** - -This release completes the Pre-GA storage contract consolidation and ships the `@agentrail/storage-postgres` reference package. - -### `@agentrail/core` — breaking shape changes + new optional methods - -- `MemoryIndex` no longer contains `sessionDir` or `userDir` host-absolute paths. The `entries[].path` field now stores the canonical `/workspace/memo/…` path directly. -- `AgentrailSessionStore` gains five new **optional** methods for memo-document and tool-result-artifact persistence: - - `readMemoryDocument(tenantId, ownerId, scope, name)` - - `writeMemoryDocument(tenantId, ownerId, scope, name, content)` - - `appendMemoryDocument(tenantId, ownerId, scope, name, content)` - - `readToolResultArtifact(sessionRef, toolCallId)` - - `writeToolResultArtifact(sessionRef, toolCallId, content)` -- New types exported: `MemoDocumentScope`, `MemoDocumentName` - -### `@agentrail/capabilities` — new exports + breaking signature - -- `OrchestrationPersistence` gains two new required methods: `loadAgentHistory(agentId)` and `writeAgentHistory(agentId, history)`. -- `DefaultCapabilityContextOptions.compactMessages` signature updated: `sessionDir` replaced by `writeToolResultArtifact` callback injection. -- New public exports: `OrchestrationMailboxEvent`, `OrchestrationSnapshot`, `recoverOrchestrationState`. -- `WorkerInitMessage` gains an optional `storageConfig` field for sub-agent worker initialization. - -### `@agentrail/app` — breaking API surface changes - -- `CreateAgentAppOptions` gains: `traceStoreFactory`, `createOrchestrationPersistence`, `createWorkerStorageConfig`, and `inspector` (now accepts `true | InspectorDataSource`). -- `createInspectorRoute` now accepts `InspectorDataSource | string` (string is deprecated backward-compat path; direct `dataDir` strings will be removed in a future release). -- `UserMemoryConsolidationService` constructor signature changed from `(sessionManager, dataDir, config)` to `(store: AgentrailSessionStore, sessionLister: UserSessionLister, dataDir, config)`. -- New `UserSessionLister` interface exported. -- New `InspectorDataSource`, `InspectorSessionItem`, `SessionTraceStore` types exported. -- New `createFilesystemInspectorDataSource(dataDir)` function exported. -- `compactToolResults` now prefers `writeToolResultArtifact` from the session store when available. -- Pure compaction helpers exported: `computeCompactionSplit`, `buildCompactionMessage`, `buildCompactionNotesEntry`. - -### `@agentrail/storage-postgres` — new package - -PostgreSQL reference implementation for all Agentrail storage contracts: - -- `PostgresSessionStore` — full `AgentrailSessionStore` including memo documents and tool-result artifacts. -- `PostgresSessionTraceStore` + `createPostgresSessionTraceStore` factory. -- `PostgresOrchestrationPersistence` + `createPostgresOrchestrationPersistence` factory (includes agent history). -- `PostgresInspectorDataSource` — reads session list, messages, trace envelopes, and orchestration state from PostgreSQL without any filesystem dependency. -- `buildSchemaDDL(schema?)` — returns idempotent DDL to create all required tables. -- `createSqlClient(options)` — creates a `postgres` (postgres.js) connection pool. - -**Upgrade notes:** - -1. If you implement `AgentrailSessionStore`, the new optional methods do not need to be implemented immediately; the runtime falls back gracefully. However, implementing them is required to use the postgres backend. -2. If you implement `OrchestrationPersistence`, you must add `loadAgentHistory` and `writeAgentHistory`. -3. Replace `createInspectorRoute(dataDir)` with `createInspectorRoute(createFilesystemInspectorDataSource(dataDir))` when providing a custom `InspectorDataSource`. -4. `UserMemoryConsolidationService` callers must provide a `UserSessionLister` (the default `SessionManager` now implements this interface). diff --git a/packages/app/CHANGELOG.md b/packages/app/CHANGELOG.md index 89584fa..fe7d2ac 100644 --- a/packages/app/CHANGELOG.md +++ b/packages/app/CHANGELOG.md @@ -1,5 +1,61 @@ # @agentrail/app +## 0.7.0 + +### Minor Changes + +- [#143](https://github.com/yai-dev/agentrail/pull/143) [`f5a4d2e`](https://github.com/yai-dev/agentrail/commit/f5a4d2e24586425f054d35071c76b47078e3cd32) Thanks [@yai-dev](https://github.com/yai-dev)! - **Storage Abstraction + Memo FS + PostgreSQL reference implementation ([#69](https://github.com/yai-dev/agentrail/issues/69))** + + This release completes the Pre-GA storage contract consolidation and ships the `@agentrail/storage-postgres` reference package. + + ### `@agentrail/core` — breaking shape changes + new optional methods + - `MemoryIndex` no longer contains `sessionDir` or `userDir` host-absolute paths. The `entries[].path` field now stores the canonical `/workspace/memo/…` path directly. + - `AgentrailSessionStore` gains five new **optional** methods for memo-document and tool-result-artifact persistence: + - `readMemoryDocument(tenantId, ownerId, scope, name)` + - `writeMemoryDocument(tenantId, ownerId, scope, name, content)` + - `appendMemoryDocument(tenantId, ownerId, scope, name, content)` + - `readToolResultArtifact(sessionRef, toolCallId)` + - `writeToolResultArtifact(sessionRef, toolCallId, content)` + - New types exported: `MemoDocumentScope`, `MemoDocumentName` + + ### `@agentrail/capabilities` — new exports + breaking signature + - `OrchestrationPersistence` gains two new required methods: `loadAgentHistory(agentId)` and `writeAgentHistory(agentId, history)`. + - `DefaultCapabilityContextOptions.compactMessages` signature updated: `sessionDir` replaced by `writeToolResultArtifact` callback injection. + - New public exports: `OrchestrationMailboxEvent`, `OrchestrationSnapshot`, `recoverOrchestrationState`. + - `WorkerInitMessage` gains an optional `storageConfig` field for sub-agent worker initialization. + + ### `@agentrail/app` — breaking API surface changes + - `CreateAgentAppOptions` gains: `traceStoreFactory`, `createOrchestrationPersistence`, `createWorkerStorageConfig`, and `inspector` (now accepts `true | InspectorDataSource`). + - `createInspectorRoute` now accepts `InspectorDataSource | string` (string is deprecated backward-compat path; direct `dataDir` strings will be removed in a future release). + - `UserMemoryConsolidationService` constructor signature changed from `(sessionManager, dataDir, config)` to `(store: AgentrailSessionStore, sessionLister: UserSessionLister, dataDir, config)`. + - New `UserSessionLister` interface exported. + - New `InspectorDataSource`, `InspectorSessionItem`, `SessionTraceStore` types exported. + - New `createFilesystemInspectorDataSource(dataDir)` function exported. + - `compactToolResults` now prefers `writeToolResultArtifact` from the session store when available. + - Pure compaction helpers exported: `computeCompactionSplit`, `buildCompactionMessage`, `buildCompactionNotesEntry`. + + ### `@agentrail/storage-postgres` — new package + + PostgreSQL reference implementation for all Agentrail storage contracts: + - `PostgresSessionStore` — full `AgentrailSessionStore` including memo documents and tool-result artifacts. + - `PostgresSessionTraceStore` + `createPostgresSessionTraceStore` factory. + - `PostgresOrchestrationPersistence` + `createPostgresOrchestrationPersistence` factory (includes agent history). + - `PostgresInspectorDataSource` — reads session list, messages, trace envelopes, and orchestration state from PostgreSQL without any filesystem dependency. + - `buildSchemaDDL(schema?)` — returns idempotent DDL to create all required tables. + - `createSqlClient(options)` — creates a `postgres` (postgres.js) connection pool. + + **Upgrade notes:** + 1. If you implement `AgentrailSessionStore`, the new optional methods do not need to be implemented immediately; the runtime falls back gracefully. However, implementing them is required to use the postgres backend. + 2. If you implement `OrchestrationPersistence`, you must add `loadAgentHistory` and `writeAgentHistory`. + 3. Replace `createInspectorRoute(dataDir)` with `createInspectorRoute(createFilesystemInspectorDataSource(dataDir))` when providing a custom `InspectorDataSource`. + 4. `UserMemoryConsolidationService` callers must provide a `UserSessionLister` (the default `SessionManager` now implements this interface). + +### Patch Changes + +- Updated dependencies [[`f5a4d2e`](https://github.com/yai-dev/agentrail/commit/f5a4d2e24586425f054d35071c76b47078e3cd32)]: + - @agentrail/core@0.7.0 + - @agentrail/capabilities@0.4.0 + ## 0.6.0 ### Minor Changes diff --git a/packages/app/package.json b/packages/app/package.json index a1bf4e9..1f4cd2f 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -1,6 +1,6 @@ { "name": "@agentrail/app", - "version": "0.6.0", + "version": "0.7.0", "description": "App-layer hosting, profiles, session management, and createAgentApp for Agentrail.", "type": "module", "files": [ diff --git a/packages/capabilities/CHANGELOG.md b/packages/capabilities/CHANGELOG.md index f4210b0..82fb92a 100644 --- a/packages/capabilities/CHANGELOG.md +++ b/packages/capabilities/CHANGELOG.md @@ -1,5 +1,60 @@ # @agentrail/capabilities +## 0.4.0 + +### Minor Changes + +- [#143](https://github.com/yai-dev/agentrail/pull/143) [`f5a4d2e`](https://github.com/yai-dev/agentrail/commit/f5a4d2e24586425f054d35071c76b47078e3cd32) Thanks [@yai-dev](https://github.com/yai-dev)! - **Storage Abstraction + Memo FS + PostgreSQL reference implementation ([#69](https://github.com/yai-dev/agentrail/issues/69))** + + This release completes the Pre-GA storage contract consolidation and ships the `@agentrail/storage-postgres` reference package. + + ### `@agentrail/core` — breaking shape changes + new optional methods + - `MemoryIndex` no longer contains `sessionDir` or `userDir` host-absolute paths. The `entries[].path` field now stores the canonical `/workspace/memo/…` path directly. + - `AgentrailSessionStore` gains five new **optional** methods for memo-document and tool-result-artifact persistence: + - `readMemoryDocument(tenantId, ownerId, scope, name)` + - `writeMemoryDocument(tenantId, ownerId, scope, name, content)` + - `appendMemoryDocument(tenantId, ownerId, scope, name, content)` + - `readToolResultArtifact(sessionRef, toolCallId)` + - `writeToolResultArtifact(sessionRef, toolCallId, content)` + - New types exported: `MemoDocumentScope`, `MemoDocumentName` + + ### `@agentrail/capabilities` — new exports + breaking signature + - `OrchestrationPersistence` gains two new required methods: `loadAgentHistory(agentId)` and `writeAgentHistory(agentId, history)`. + - `DefaultCapabilityContextOptions.compactMessages` signature updated: `sessionDir` replaced by `writeToolResultArtifact` callback injection. + - New public exports: `OrchestrationMailboxEvent`, `OrchestrationSnapshot`, `recoverOrchestrationState`. + - `WorkerInitMessage` gains an optional `storageConfig` field for sub-agent worker initialization. + + ### `@agentrail/app` — breaking API surface changes + - `CreateAgentAppOptions` gains: `traceStoreFactory`, `createOrchestrationPersistence`, `createWorkerStorageConfig`, and `inspector` (now accepts `true | InspectorDataSource`). + - `createInspectorRoute` now accepts `InspectorDataSource | string` (string is deprecated backward-compat path; direct `dataDir` strings will be removed in a future release). + - `UserMemoryConsolidationService` constructor signature changed from `(sessionManager, dataDir, config)` to `(store: AgentrailSessionStore, sessionLister: UserSessionLister, dataDir, config)`. + - New `UserSessionLister` interface exported. + - New `InspectorDataSource`, `InspectorSessionItem`, `SessionTraceStore` types exported. + - New `createFilesystemInspectorDataSource(dataDir)` function exported. + - `compactToolResults` now prefers `writeToolResultArtifact` from the session store when available. + - Pure compaction helpers exported: `computeCompactionSplit`, `buildCompactionMessage`, `buildCompactionNotesEntry`. + + ### `@agentrail/storage-postgres` — new package + + PostgreSQL reference implementation for all Agentrail storage contracts: + - `PostgresSessionStore` — full `AgentrailSessionStore` including memo documents and tool-result artifacts. + - `PostgresSessionTraceStore` + `createPostgresSessionTraceStore` factory. + - `PostgresOrchestrationPersistence` + `createPostgresOrchestrationPersistence` factory (includes agent history). + - `PostgresInspectorDataSource` — reads session list, messages, trace envelopes, and orchestration state from PostgreSQL without any filesystem dependency. + - `buildSchemaDDL(schema?)` — returns idempotent DDL to create all required tables. + - `createSqlClient(options)` — creates a `postgres` (postgres.js) connection pool. + + **Upgrade notes:** + 1. If you implement `AgentrailSessionStore`, the new optional methods do not need to be implemented immediately; the runtime falls back gracefully. However, implementing them is required to use the postgres backend. + 2. If you implement `OrchestrationPersistence`, you must add `loadAgentHistory` and `writeAgentHistory`. + 3. Replace `createInspectorRoute(dataDir)` with `createInspectorRoute(createFilesystemInspectorDataSource(dataDir))` when providing a custom `InspectorDataSource`. + 4. `UserMemoryConsolidationService` callers must provide a `UserSessionLister` (the default `SessionManager` now implements this interface). + +### Patch Changes + +- Updated dependencies [[`f5a4d2e`](https://github.com/yai-dev/agentrail/commit/f5a4d2e24586425f054d35071c76b47078e3cd32)]: + - @agentrail/core@0.7.0 + ## 0.3.0 ### Minor Changes diff --git a/packages/capabilities/package.json b/packages/capabilities/package.json index 2f087db..d1a5c8a 100644 --- a/packages/capabilities/package.json +++ b/packages/capabilities/package.json @@ -1,6 +1,6 @@ { "name": "@agentrail/capabilities", - "version": "0.3.0", + "version": "0.4.0", "description": "App-layer capability descriptors: filesystem, browser, knowledge, skills, orchestration, and memory for Agentrail.", "type": "module", "files": [ diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index d3717ad..e78b0d5 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,12 @@ # @agentrail/cli +## 0.2.6 + +### Patch Changes + +- Updated dependencies [[`f5a4d2e`](https://github.com/yai-dev/agentrail/commit/f5a4d2e24586425f054d35071c76b47078e3cd32)]: + - @agentrail/app@0.7.0 + ## 0.2.5 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index 1d24edd..d8cefbe 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@agentrail/cli", - "version": "0.2.5", + "version": "0.2.6", "description": "Official CLI for Agentrail — scaffold, diagnose, and validate your agent applications", "type": "module", "main": "./dist/index.js", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index d970928..c349d4c 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,55 @@ # @agentrail/core +## 0.7.0 + +### Minor Changes + +- [#143](https://github.com/yai-dev/agentrail/pull/143) [`f5a4d2e`](https://github.com/yai-dev/agentrail/commit/f5a4d2e24586425f054d35071c76b47078e3cd32) Thanks [@yai-dev](https://github.com/yai-dev)! - **Storage Abstraction + Memo FS + PostgreSQL reference implementation ([#69](https://github.com/yai-dev/agentrail/issues/69))** + + This release completes the Pre-GA storage contract consolidation and ships the `@agentrail/storage-postgres` reference package. + + ### `@agentrail/core` — breaking shape changes + new optional methods + - `MemoryIndex` no longer contains `sessionDir` or `userDir` host-absolute paths. The `entries[].path` field now stores the canonical `/workspace/memo/…` path directly. + - `AgentrailSessionStore` gains five new **optional** methods for memo-document and tool-result-artifact persistence: + - `readMemoryDocument(tenantId, ownerId, scope, name)` + - `writeMemoryDocument(tenantId, ownerId, scope, name, content)` + - `appendMemoryDocument(tenantId, ownerId, scope, name, content)` + - `readToolResultArtifact(sessionRef, toolCallId)` + - `writeToolResultArtifact(sessionRef, toolCallId, content)` + - New types exported: `MemoDocumentScope`, `MemoDocumentName` + + ### `@agentrail/capabilities` — new exports + breaking signature + - `OrchestrationPersistence` gains two new required methods: `loadAgentHistory(agentId)` and `writeAgentHistory(agentId, history)`. + - `DefaultCapabilityContextOptions.compactMessages` signature updated: `sessionDir` replaced by `writeToolResultArtifact` callback injection. + - New public exports: `OrchestrationMailboxEvent`, `OrchestrationSnapshot`, `recoverOrchestrationState`. + - `WorkerInitMessage` gains an optional `storageConfig` field for sub-agent worker initialization. + + ### `@agentrail/app` — breaking API surface changes + - `CreateAgentAppOptions` gains: `traceStoreFactory`, `createOrchestrationPersistence`, `createWorkerStorageConfig`, and `inspector` (now accepts `true | InspectorDataSource`). + - `createInspectorRoute` now accepts `InspectorDataSource | string` (string is deprecated backward-compat path; direct `dataDir` strings will be removed in a future release). + - `UserMemoryConsolidationService` constructor signature changed from `(sessionManager, dataDir, config)` to `(store: AgentrailSessionStore, sessionLister: UserSessionLister, dataDir, config)`. + - New `UserSessionLister` interface exported. + - New `InspectorDataSource`, `InspectorSessionItem`, `SessionTraceStore` types exported. + - New `createFilesystemInspectorDataSource(dataDir)` function exported. + - `compactToolResults` now prefers `writeToolResultArtifact` from the session store when available. + - Pure compaction helpers exported: `computeCompactionSplit`, `buildCompactionMessage`, `buildCompactionNotesEntry`. + + ### `@agentrail/storage-postgres` — new package + + PostgreSQL reference implementation for all Agentrail storage contracts: + - `PostgresSessionStore` — full `AgentrailSessionStore` including memo documents and tool-result artifacts. + - `PostgresSessionTraceStore` + `createPostgresSessionTraceStore` factory. + - `PostgresOrchestrationPersistence` + `createPostgresOrchestrationPersistence` factory (includes agent history). + - `PostgresInspectorDataSource` — reads session list, messages, trace envelopes, and orchestration state from PostgreSQL without any filesystem dependency. + - `buildSchemaDDL(schema?)` — returns idempotent DDL to create all required tables. + - `createSqlClient(options)` — creates a `postgres` (postgres.js) connection pool. + + **Upgrade notes:** + 1. If you implement `AgentrailSessionStore`, the new optional methods do not need to be implemented immediately; the runtime falls back gracefully. However, implementing them is required to use the postgres backend. + 2. If you implement `OrchestrationPersistence`, you must add `loadAgentHistory` and `writeAgentHistory`. + 3. Replace `createInspectorRoute(dataDir)` with `createInspectorRoute(createFilesystemInspectorDataSource(dataDir))` when providing a custom `InspectorDataSource`. + 4. `UserMemoryConsolidationService` callers must provide a `UserSessionLister` (the default `SessionManager` now implements this interface). + ## 0.6.0 ### Minor Changes diff --git a/packages/core/package.json b/packages/core/package.json index b1d355d..2f3730f 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@agentrail/core", - "version": "0.6.0", + "version": "0.7.0", "description": "Core runtime primitives, agent loop, and session contracts for Agentrail.", "type": "module", "files": [ diff --git a/packages/create-agentrail-app/CHANGELOG.md b/packages/create-agentrail-app/CHANGELOG.md index 5952b1e..5c1864b 100644 --- a/packages/create-agentrail-app/CHANGELOG.md +++ b/packages/create-agentrail-app/CHANGELOG.md @@ -1,5 +1,12 @@ # @agentrail/create-agentrail-app +## 0.2.6 + +### Patch Changes + +- Updated dependencies []: + - @agentrail/cli@0.2.6 + ## 0.2.5 ### Patch Changes diff --git a/packages/create-agentrail-app/package.json b/packages/create-agentrail-app/package.json index bdd0d81..29261e7 100644 --- a/packages/create-agentrail-app/package.json +++ b/packages/create-agentrail-app/package.json @@ -1,6 +1,6 @@ { "name": "@agentrail/create-agentrail-app", - "version": "0.2.5", + "version": "0.2.6", "description": "Create a new Agentrail application from a template (delegates to @agentrail/cli)", "type": "module", "bin": { diff --git a/packages/deep-research/CHANGELOG.md b/packages/deep-research/CHANGELOG.md index 8927903..d6b0b69 100644 --- a/packages/deep-research/CHANGELOG.md +++ b/packages/deep-research/CHANGELOG.md @@ -1,5 +1,13 @@ # @agentrail/deep-research +## 0.0.14 + +### Patch Changes + +- Updated dependencies [[`f5a4d2e`](https://github.com/yai-dev/agentrail/commit/f5a4d2e24586425f054d35071c76b47078e3cd32)]: + - @agentrail/core@0.7.0 + - @agentrail/capabilities@0.4.0 + ## 0.0.13 ### Patch Changes diff --git a/packages/deep-research/package.json b/packages/deep-research/package.json index 6c90963..2842a3f 100644 --- a/packages/deep-research/package.json +++ b/packages/deep-research/package.json @@ -1,6 +1,6 @@ { "name": "@agentrail/deep-research", - "version": "0.0.13", + "version": "0.0.14", "description": "Reusable Deep Research workflow package for Agentrail examples.", "type": "module", "files": [ diff --git a/packages/storage-postgres/CHANGELOG.md b/packages/storage-postgres/CHANGELOG.md new file mode 100644 index 0000000..5295ad0 --- /dev/null +++ b/packages/storage-postgres/CHANGELOG.md @@ -0,0 +1,58 @@ +# @agentrail/storage-postgres + +## 0.2.0 + +### Minor Changes + +- [#143](https://github.com/yai-dev/agentrail/pull/143) [`f5a4d2e`](https://github.com/yai-dev/agentrail/commit/f5a4d2e24586425f054d35071c76b47078e3cd32) Thanks [@yai-dev](https://github.com/yai-dev)! - **Storage Abstraction + Memo FS + PostgreSQL reference implementation ([#69](https://github.com/yai-dev/agentrail/issues/69))** + + This release completes the Pre-GA storage contract consolidation and ships the `@agentrail/storage-postgres` reference package. + + ### `@agentrail/core` — breaking shape changes + new optional methods + - `MemoryIndex` no longer contains `sessionDir` or `userDir` host-absolute paths. The `entries[].path` field now stores the canonical `/workspace/memo/…` path directly. + - `AgentrailSessionStore` gains five new **optional** methods for memo-document and tool-result-artifact persistence: + - `readMemoryDocument(tenantId, ownerId, scope, name)` + - `writeMemoryDocument(tenantId, ownerId, scope, name, content)` + - `appendMemoryDocument(tenantId, ownerId, scope, name, content)` + - `readToolResultArtifact(sessionRef, toolCallId)` + - `writeToolResultArtifact(sessionRef, toolCallId, content)` + - New types exported: `MemoDocumentScope`, `MemoDocumentName` + + ### `@agentrail/capabilities` — new exports + breaking signature + - `OrchestrationPersistence` gains two new required methods: `loadAgentHistory(agentId)` and `writeAgentHistory(agentId, history)`. + - `DefaultCapabilityContextOptions.compactMessages` signature updated: `sessionDir` replaced by `writeToolResultArtifact` callback injection. + - New public exports: `OrchestrationMailboxEvent`, `OrchestrationSnapshot`, `recoverOrchestrationState`. + - `WorkerInitMessage` gains an optional `storageConfig` field for sub-agent worker initialization. + + ### `@agentrail/app` — breaking API surface changes + - `CreateAgentAppOptions` gains: `traceStoreFactory`, `createOrchestrationPersistence`, `createWorkerStorageConfig`, and `inspector` (now accepts `true | InspectorDataSource`). + - `createInspectorRoute` now accepts `InspectorDataSource | string` (string is deprecated backward-compat path; direct `dataDir` strings will be removed in a future release). + - `UserMemoryConsolidationService` constructor signature changed from `(sessionManager, dataDir, config)` to `(store: AgentrailSessionStore, sessionLister: UserSessionLister, dataDir, config)`. + - New `UserSessionLister` interface exported. + - New `InspectorDataSource`, `InspectorSessionItem`, `SessionTraceStore` types exported. + - New `createFilesystemInspectorDataSource(dataDir)` function exported. + - `compactToolResults` now prefers `writeToolResultArtifact` from the session store when available. + - Pure compaction helpers exported: `computeCompactionSplit`, `buildCompactionMessage`, `buildCompactionNotesEntry`. + + ### `@agentrail/storage-postgres` — new package + + PostgreSQL reference implementation for all Agentrail storage contracts: + - `PostgresSessionStore` — full `AgentrailSessionStore` including memo documents and tool-result artifacts. + - `PostgresSessionTraceStore` + `createPostgresSessionTraceStore` factory. + - `PostgresOrchestrationPersistence` + `createPostgresOrchestrationPersistence` factory (includes agent history). + - `PostgresInspectorDataSource` — reads session list, messages, trace envelopes, and orchestration state from PostgreSQL without any filesystem dependency. + - `buildSchemaDDL(schema?)` — returns idempotent DDL to create all required tables. + - `createSqlClient(options)` — creates a `postgres` (postgres.js) connection pool. + + **Upgrade notes:** + 1. If you implement `AgentrailSessionStore`, the new optional methods do not need to be implemented immediately; the runtime falls back gracefully. However, implementing them is required to use the postgres backend. + 2. If you implement `OrchestrationPersistence`, you must add `loadAgentHistory` and `writeAgentHistory`. + 3. Replace `createInspectorRoute(dataDir)` with `createInspectorRoute(createFilesystemInspectorDataSource(dataDir))` when providing a custom `InspectorDataSource`. + 4. `UserMemoryConsolidationService` callers must provide a `UserSessionLister` (the default `SessionManager` now implements this interface). + +### Patch Changes + +- Updated dependencies [[`f5a4d2e`](https://github.com/yai-dev/agentrail/commit/f5a4d2e24586425f054d35071c76b47078e3cd32)]: + - @agentrail/core@0.7.0 + - @agentrail/capabilities@0.4.0 + - @agentrail/app@0.7.0 diff --git a/packages/storage-postgres/package.json b/packages/storage-postgres/package.json index a2e8e32..c76960b 100644 --- a/packages/storage-postgres/package.json +++ b/packages/storage-postgres/package.json @@ -1,6 +1,6 @@ { "name": "@agentrail/storage-postgres", - "version": "0.1.0", + "version": "0.2.0", "description": "PostgreSQL storage backend for Agentrail session, trace, orchestration, and inspector data.", "type": "module", "files": [ diff --git a/packages/testing/CHANGELOG.md b/packages/testing/CHANGELOG.md index 380bb1f..2f5e8d6 100644 --- a/packages/testing/CHANGELOG.md +++ b/packages/testing/CHANGELOG.md @@ -1,5 +1,12 @@ # @agentrail/testing +## 0.0.10 + +### Patch Changes + +- Updated dependencies [[`f5a4d2e`](https://github.com/yai-dev/agentrail/commit/f5a4d2e24586425f054d35071c76b47078e3cd32)]: + - @agentrail/core@0.7.0 + ## 0.0.9 ### Patch Changes diff --git a/packages/testing/package.json b/packages/testing/package.json index 7db64ef..33b816b 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -1,6 +1,6 @@ { "name": "@agentrail/testing", - "version": "0.0.9", + "version": "0.0.10", "description": "Testing utilities and mocks for Agentrail.", "type": "module", "files": [