Skip to content

feat(sdk): add ExecutionStore backed by DBAdapter#5

Draft
aryasaatvik wants to merge 1 commit intodevfrom
feat/sdk-execution-store-adapter
Draft

feat(sdk): add ExecutionStore backed by DBAdapter#5
aryasaatvik wants to merge 1 commit intodevfrom
feat/sdk-execution-store-adapter

Conversation

@aryasaatvik
Copy link
Copy Markdown
Owner

Stacked review copy of upstream RhysSullivan#396 · merges into dev.

Next in stack: feat/execution-engine-persistence.


See upstream PR #396 for full description.

Adds execution history persistence to the core SDK surface, wiring
three new tables (`execution`, `execution_interaction`,
`execution_tool_call`) into `coreSchema` and exposing an
`ExecutionStore` service on `executor.executions`.

Changes:
- `core-schema.ts`: three new tables with `scope_id` / `execution_id`
  / `tool_path` / `trigger_kind` / `created_at` indexes for the runs
  UI's faceting + timeline queries.
- `ids.ts`: branded `ExecutionId`, `ExecutionInteractionId`,
  `ExecutionToolCallId`.
- `executions.ts`: `Execution`, `ExecutionInteraction`,
  `ExecutionToolCall` Schema classes, status enums,
  create/update/filter/sort/meta input types, and the
  `ExecutionStore` Context.Tag.
- `execution-store.ts`: `makeExecutionStore(core)` — an
  adapter-backed `ExecutionStoreService` implementation. Wraps
  `typedAdapter<CoreSchema>` for CRUD, handles cursor-based
  pagination, filter predicates (status, trigger, tool-path glob,
  time range, code substring, hadElicitation), and builds list meta
  with facets + chart buckets.
- `cursor.ts`: base64url `{ createdAt, id }` pagination cursors.
- `executor.ts`: constructs the store once per executor, exposes via
  `executor.executions`.
- `executions.test.ts`: round-trip + lifecycle coverage against the
  in-memory adapter (no migrations needed).

Follow-up work (future PRs in the stack):
- wire the engine to record runs + tool calls through this store,
- add `/executions` API endpoints, and
- land the runs UI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant