Skip to content
This repository was archived by the owner on Apr 17, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 0 additions & 57 deletions .changeset/storage-abstraction-postgres.md

This file was deleted.

56 changes: 56 additions & 0 deletions packages/app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
55 changes: 55 additions & 0 deletions packages/capabilities/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/capabilities/package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
7 changes: 7 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
50 changes: 50 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
7 changes: 7 additions & 0 deletions packages/create-agentrail-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/create-agentrail-app/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
8 changes: 8 additions & 0 deletions packages/deep-research/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/deep-research/package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
Loading
Loading