Repository navigation
feat: add the execution-metrics plugin - #14
Conversation
995e478 to
07dd738
Compare
|
No dependency changes detected. Learn more about Socket for GitHub. 👍 No dependency changes detected in pull request |
07dd738 to
099618b
Compare
Greptile SummaryAdds
Confidence Score: 5/5Safe to merge — the plugin is strictly additive and opt-in; no existing paths are altered and the Cloudflare host degrades gracefully to a no-op when the ANALYTICS binding is absent. All three sub-entries are cleanly isolated (no cross-contamination of @executor-js/api or @cloudflare/workers-types into the base entry), the bounded-map correctly handles the previously noted memory-growth risk, the +Inf duplicate-bucket bug was caught and fixed before merging (with a regression test), and the only open item is a minor rendering consistency nit in the Prometheus serializer. No files require special attention; prometheus.ts has one minor formatValue inconsistency for _count lines but it carries no practical impact given Effect's histogram/summary state types. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
EE[Execution Engine] -->|ExecutionEvent stream| CO[composeExecutionObservers]
CO --> EMO{executionMetricsPlugin\nobserver option}
EMO -->|default: long-lived host| EffectObs[createExecutionMetricsObserver\nSDK observer]
EMO -->|Cloudflare + ANALYTICS binding| WAEObs[createWaeMetricsObserver\nWAE observer]
EMO -->|Cloudflare, no binding| Noop[noopExecutionObserver]
EffectObs -->|ExecutionStarted| BM1[rememberStart\nboundedMap 10k cap]
EffectObs -->|ExecutionFinished| MR[Effect Metric Registry\nglobal counters + histogram]
EffectObs -->|ToolCallStarted/Finished| MR
WAEObs -->|ExecutionStarted| BM2[rememberStart\nboundedMap 10k cap]
WAEObs -->|ExecutionFinished| WAE[(Workers\nAnalytics Engine)]
WAEObs -->|ToolCallFinished| WAE
MR -->|Metric.snapshot| Prom[renderPrometheus\ntext/plain]
Prom -->|GET /execution-metrics/metrics\nauth-gated| Scraper[Prometheus Scraper]
Reviews (4): Last reviewed commit: "fix(plugin-execution-metrics): address G..." | Re-trigger Greptile |
915777b to
2484437
Compare
099618b to
6bd65e7
Compare
2484437 to
1e981af
Compare
- Bound the per-execution start-time Maps so an execution killed before its Finished event can't leak its entry forever in a long-lived host. A shared rememberStart helper evicts the oldest entry at capacity; applied to the Effect-metric observer's executionStarts and the WAE observer's executionStarts + toolCallStarts. - Prometheus: render Frequency occurrences through formatValue, matching every other metric branch (bigint / special-float consistency).
6bd65e7 to
832a960
Compare
Adds the **execution-observer foundation** — the seam the history and metrics plugins build on. - New `ExecutionObserver` contract in the SDK: six tagged lifecycle events (`ExecutionStarted`/`Finished`, `ToolCallStarted`/`Finished`, `InteractionStarted`/`Resolved`) + `composeExecutionObservers`, with a `plugin.runtime.executionObserver` hook. - The execution engine emits the events (re-derived onto the current Queue-based pause model), exposes `Executor.owner`, and tags the run span with the execution id + trigger. - `makeExecutionStack` composes plugin observers — one seam covers every HTTP host and the MCP Durable Objects; local's fixed-execution + in-process MCP are wired directly. **Behaviour-neutral / opt-in:** with no plugin observing, every path is a no-op. Gates: `format:check`, `lint`, full-monorepo `typecheck`, and observer unit tests all green. Live app verification still to come. <!-- stack:links:start --> ### [Stack](https://github.com/kitlangton/stack) 1. **#12** 👈 current 2. #13 3. #14 <!-- stack:links:end -->
1e981af to
a06c2d6
Compare
- Bound the per-execution start-time Maps so an execution killed before its Finished event can't leak its entry forever in a long-lived host. A shared rememberStart helper evicts the oldest entry at capacity; applied to the Effect-metric observer's executionStarts and the WAE observer's executionStarts + toolCallStarts. - Prometheus: render Frequency occurrences through formatValue, matching every other metric branch (bigint / special-float consistency).
832a960 to
4e0398a
Compare
Adds **`@executor-js/plugin-execution-history`** — an opt-in execution-history sink built on the observer foundation. - Records every run (plus its tool calls and interactions) into three owner-scoped `pluginStorage` collections via a buffered-batch writer — **no new tables, no migrations**; works on D1/libSQL/sqlite/postgres. - `./api`: a scoped read API (`list`/`get`/`listToolCalls`) over HttpApi (`executionHistoryHttpPlugin`). - `./client`: a Runs page at `/plugins/executionHistory/` (table, status filter, pagination, 4-tab detail drawer) — mounts via the existing plugins catch-all with zero router changes. The base `.` entry never loads the API or React layers. Fully opt-in (not registered in any default config). Stacked on the execution-observer foundation. Gates: `format:check`, `lint`, full-monorepo `typecheck`, unit + handler tests green. Runs-page live render still to verify. <!-- stack:links:start --> ### [Stack](https://github.com/kitlangton/stack) 1. #12 2. **#13** 👈 current 3. #14 <!-- stack:links:end -->
…pe, and WAE sink New opt-in @executor-js/plugin-execution-metrics package, built on the ExecutionObserver foundation. The base SDK plugin drives Effect Metric counters (executions/tool-calls started/completed/failed) and an execution-duration histogram (with a trigger_kind label) from the event stream. ./api adds executionMetricsHttpPlugin: an auth-gated GET /execution-metrics/ metrics that renders the registry as Prometheus text exposition. ./cloudflare adds createWaeMetricsObserver: a Cloudflare-only observer that writes one Workers Analytics Engine data point per finished execution/tool call. Base '.' entry never loads @executor-js/api or @cloudflare/workers-types.
…Engine Wires @executor-js/plugin-execution-metrics into the Cloudflare host with a WAE sink. The plugin is always in the tuple (no tables/API) but its observer is a no-op until the operator binds ANALYTICS — opt-in by uncommenting analytics_engine_datasets in wrangler.jsonc. No /metrics scrape on the Worker; WAE is the sink.
- Bound the per-execution start-time Maps so an execution killed before its Finished event can't leak its entry forever in a long-lived host. A shared rememberStart helper evicts the oldest entry at capacity; applied to the Effect-metric observer's executionStarts and the WAE observer's executionStarts + toolCallStarts. - Prometheus: render Frequency occurrences through formatValue, matching every other metric branch (bigint / special-float consistency).
4e0398a to
9308927
Compare
Adds the **execution-observer foundation** — the seam the history and metrics plugins build on. - New `ExecutionObserver` contract in the SDK: six tagged lifecycle events (`ExecutionStarted`/`Finished`, `ToolCallStarted`/`Finished`, `InteractionStarted`/`Resolved`) + `composeExecutionObservers`, with a `plugin.runtime.executionObserver` hook. - The execution engine emits the events (re-derived onto the current Queue-based pause model), exposes `Executor.owner`, and tags the run span with the execution id + trigger. - `makeExecutionStack` composes plugin observers — one seam covers every HTTP host and the MCP Durable Objects; local's fixed-execution + in-process MCP are wired directly. **Behaviour-neutral / opt-in:** with no plugin observing, every path is a no-op. Gates: `format:check`, `lint`, full-monorepo `typecheck`, and observer unit tests all green. Live app verification still to come. <!-- stack:links:start --> 1. **#12** 👈 current 2. #13 3. #14 <!-- stack:links:end -->
Adds **`@executor-js/plugin-execution-history`** — an opt-in execution-history sink built on the observer foundation. - Records every run (plus its tool calls and interactions) into three owner-scoped `pluginStorage` collections via a buffered-batch writer — **no new tables, no migrations**; works on D1/libSQL/sqlite/postgres. - `./api`: a scoped read API (`list`/`get`/`listToolCalls`) over HttpApi (`executionHistoryHttpPlugin`). - `./client`: a Runs page at `/plugins/executionHistory/` (table, status filter, pagination, 4-tab detail drawer) — mounts via the existing plugins catch-all with zero router changes. The base `.` entry never loads the API or React layers. Fully opt-in (not registered in any default config). Stacked on the execution-observer foundation. Gates: `format:check`, `lint`, full-monorepo `typecheck`, unit + handler tests green. Runs-page live render still to verify. <!-- stack:links:start --> ### [Stack](https://github.com/kitlangton/stack) 1. #12 2. **#13** 👈 current 3. #14 <!-- stack:links:end -->
Adds **`@executor-js/plugin-execution-metrics`** — an opt-in metrics sink built on the observer foundation. - Base plugin drives Effect Metric counters + an execution-duration histogram from the event stream. - `./api`: an auth-gated `GET /execution-metrics/metrics` Prometheus scrape (`executionMetricsHttpPlugin`). - `./cloudflare`: a Workers Analytics Engine sink (`writeDataPoint`) — per-isolate Effect metrics being meaningless on a Worker fleet. Wired opt-in on host-cloudflare, gated on the `ANALYTICS` binding. Base `.` entry free of `@executor-js/api` and `@cloudflare/workers-types`. Stacked on the execution-observer foundation. Gates: `format:check`, `lint`, full-monorepo `typecheck`, and metrics-render tests green (an adversarial-verify pass caught + fixed a Prometheus histogram-bucket bug). <!-- stack:links:start --> 1. #12 2. #13 3. **#14** 👈 current <!-- stack:links:end -->
Adds the **execution-observer foundation** — the seam the history and metrics plugins build on. - New `ExecutionObserver` contract in the SDK: six tagged lifecycle events (`ExecutionStarted`/`Finished`, `ToolCallStarted`/`Finished`, `InteractionStarted`/`Resolved`) + `composeExecutionObservers`, with a `plugin.runtime.executionObserver` hook. - The execution engine emits the events (re-derived onto the current Queue-based pause model), exposes `Executor.owner`, and tags the run span with the execution id + trigger. - `makeExecutionStack` composes plugin observers — one seam covers every HTTP host and the MCP Durable Objects; local's fixed-execution + in-process MCP are wired directly. **Behaviour-neutral / opt-in:** with no plugin observing, every path is a no-op. Gates: `format:check`, `lint`, full-monorepo `typecheck`, and observer unit tests all green. Live app verification still to come. <!-- stack:links:start --> 1. **#12** 👈 current 2. #13 3. #14 <!-- stack:links:end -->
Adds **`@executor-js/plugin-execution-history`** — an opt-in execution-history sink built on the observer foundation. - Records every run (plus its tool calls and interactions) into three owner-scoped `pluginStorage` collections via a buffered-batch writer — **no new tables, no migrations**; works on D1/libSQL/sqlite/postgres. - `./api`: a scoped read API (`list`/`get`/`listToolCalls`) over HttpApi (`executionHistoryHttpPlugin`). - `./client`: a Runs page at `/plugins/executionHistory/` (table, status filter, pagination, 4-tab detail drawer) — mounts via the existing plugins catch-all with zero router changes. The base `.` entry never loads the API or React layers. Fully opt-in (not registered in any default config). Stacked on the execution-observer foundation. Gates: `format:check`, `lint`, full-monorepo `typecheck`, unit + handler tests green. Runs-page live render still to verify. <!-- stack:links:start --> ### [Stack](https://github.com/kitlangton/stack) 1. #12 2. **#13** 👈 current 3. #14 <!-- stack:links:end -->
Adds **`@executor-js/plugin-execution-metrics`** — an opt-in metrics sink built on the observer foundation. - Base plugin drives Effect Metric counters + an execution-duration histogram from the event stream. - `./api`: an auth-gated `GET /execution-metrics/metrics` Prometheus scrape (`executionMetricsHttpPlugin`). - `./cloudflare`: a Workers Analytics Engine sink (`writeDataPoint`) — per-isolate Effect metrics being meaningless on a Worker fleet. Wired opt-in on host-cloudflare, gated on the `ANALYTICS` binding. Base `.` entry free of `@executor-js/api` and `@cloudflare/workers-types`. Stacked on the execution-observer foundation. Gates: `format:check`, `lint`, full-monorepo `typecheck`, and metrics-render tests green (an adversarial-verify pass caught + fixed a Prometheus histogram-bucket bug). <!-- stack:links:start --> 1. #12 2. #13 3. **#14** 👈 current <!-- stack:links:end -->
Adds the **execution-observer foundation** — the seam the history and metrics plugins build on. - New `ExecutionObserver` contract in the SDK: six tagged lifecycle events (`ExecutionStarted`/`Finished`, `ToolCallStarted`/`Finished`, `InteractionStarted`/`Resolved`) + `composeExecutionObservers`, with a `plugin.runtime.executionObserver` hook. - The execution engine emits the events (re-derived onto the current Queue-based pause model), exposes `Executor.owner`, and tags the run span with the execution id + trigger. - `makeExecutionStack` composes plugin observers — one seam covers every HTTP host and the MCP Durable Objects; local's fixed-execution + in-process MCP are wired directly. **Behaviour-neutral / opt-in:** with no plugin observing, every path is a no-op. Gates: `format:check`, `lint`, full-monorepo `typecheck`, and observer unit tests all green. Live app verification still to come. <!-- stack:links:start --> 1. **#12** 👈 current 2. #13 3. #14 <!-- stack:links:end -->
Adds **`@executor-js/plugin-execution-history`** — an opt-in execution-history sink built on the observer foundation. - Records every run (plus its tool calls and interactions) into three owner-scoped `pluginStorage` collections via a buffered-batch writer — **no new tables, no migrations**; works on D1/libSQL/sqlite/postgres. - `./api`: a scoped read API (`list`/`get`/`listToolCalls`) over HttpApi (`executionHistoryHttpPlugin`). - `./client`: a Runs page at `/plugins/executionHistory/` (table, status filter, pagination, 4-tab detail drawer) — mounts via the existing plugins catch-all with zero router changes. The base `.` entry never loads the API or React layers. Fully opt-in (not registered in any default config). Stacked on the execution-observer foundation. Gates: `format:check`, `lint`, full-monorepo `typecheck`, unit + handler tests green. Runs-page live render still to verify. <!-- stack:links:start --> ### [Stack](https://github.com/kitlangton/stack) 1. #12 2. **#13** 👈 current 3. #14 <!-- stack:links:end -->
Adds **`@executor-js/plugin-execution-metrics`** — an opt-in metrics sink built on the observer foundation. - Base plugin drives Effect Metric counters + an execution-duration histogram from the event stream. - `./api`: an auth-gated `GET /execution-metrics/metrics` Prometheus scrape (`executionMetricsHttpPlugin`). - `./cloudflare`: a Workers Analytics Engine sink (`writeDataPoint`) — per-isolate Effect metrics being meaningless on a Worker fleet. Wired opt-in on host-cloudflare, gated on the `ANALYTICS` binding. Base `.` entry free of `@executor-js/api` and `@cloudflare/workers-types`. Stacked on the execution-observer foundation. Gates: `format:check`, `lint`, full-monorepo `typecheck`, and metrics-render tests green (an adversarial-verify pass caught + fixed a Prometheus histogram-bucket bug). <!-- stack:links:start --> 1. #12 2. #13 3. **#14** 👈 current <!-- stack:links:end -->
Adds the **execution-observer foundation** — the seam the history and metrics plugins build on. - New `ExecutionObserver` contract in the SDK: six tagged lifecycle events (`ExecutionStarted`/`Finished`, `ToolCallStarted`/`Finished`, `InteractionStarted`/`Resolved`) + `composeExecutionObservers`, with a `plugin.runtime.executionObserver` hook. - The execution engine emits the events (re-derived onto the current Queue-based pause model), exposes `Executor.owner`, and tags the run span with the execution id + trigger. - `makeExecutionStack` composes plugin observers — one seam covers every HTTP host and the MCP Durable Objects; local's fixed-execution + in-process MCP are wired directly. **Behaviour-neutral / opt-in:** with no plugin observing, every path is a no-op. Gates: `format:check`, `lint`, full-monorepo `typecheck`, and observer unit tests all green. Live app verification still to come. <!-- stack:links:start --> 1. **#12** 👈 current 2. #13 3. #14 <!-- stack:links:end -->
Adds **`@executor-js/plugin-execution-history`** — an opt-in execution-history sink built on the observer foundation. - Records every run (plus its tool calls and interactions) into three owner-scoped `pluginStorage` collections via a buffered-batch writer — **no new tables, no migrations**; works on D1/libSQL/sqlite/postgres. - `./api`: a scoped read API (`list`/`get`/`listToolCalls`) over HttpApi (`executionHistoryHttpPlugin`). - `./client`: a Runs page at `/plugins/executionHistory/` (table, status filter, pagination, 4-tab detail drawer) — mounts via the existing plugins catch-all with zero router changes. The base `.` entry never loads the API or React layers. Fully opt-in (not registered in any default config). Stacked on the execution-observer foundation. Gates: `format:check`, `lint`, full-monorepo `typecheck`, unit + handler tests green. Runs-page live render still to verify. <!-- stack:links:start --> 1. #12 2. **#13** 👈 current 3. #14 <!-- stack:links:end -->
Adds the **execution-observer foundation** — the seam the history and metrics plugins build on. - New `ExecutionObserver` contract in the SDK: six tagged lifecycle events (`ExecutionStarted`/`Finished`, `ToolCallStarted`/`Finished`, `InteractionStarted`/`Resolved`) + `composeExecutionObservers`, with a `plugin.runtime.executionObserver` hook. - The execution engine emits the events (re-derived onto the current Queue-based pause model), exposes `Executor.owner`, and tags the run span with the execution id + trigger. - `makeExecutionStack` composes plugin observers — one seam covers every HTTP host and the MCP Durable Objects; local's fixed-execution + in-process MCP are wired directly. **Behaviour-neutral / opt-in:** with no plugin observing, every path is a no-op. Gates: `format:check`, `lint`, full-monorepo `typecheck`, and observer unit tests all green. Live app verification still to come. <!-- stack:links:start --> 1. **#12** 👈 current 2. #13 3. #14 <!-- stack:links:end -->
Adds **`@executor-js/plugin-execution-history`** — an opt-in execution-history sink built on the observer foundation. - Records every run (plus its tool calls and interactions) into three owner-scoped `pluginStorage` collections via a buffered-batch writer — **no new tables, no migrations**; works on D1/libSQL/sqlite/postgres. - `./api`: a scoped read API (`list`/`get`/`listToolCalls`) over HttpApi (`executionHistoryHttpPlugin`). - `./client`: a Runs page at `/plugins/executionHistory/` (table, status filter, pagination, 4-tab detail drawer) — mounts via the existing plugins catch-all with zero router changes. The base `.` entry never loads the API or React layers. Fully opt-in (not registered in any default config). Stacked on the execution-observer foundation. Gates: `format:check`, `lint`, full-monorepo `typecheck`, unit + handler tests green. Runs-page live render still to verify. <!-- stack:links:start --> 1. #12 2. **#13** 👈 current 3. #14 <!-- stack:links:end -->
Adds the **execution-observer foundation** — the seam the history and metrics plugins build on. - New `ExecutionObserver` contract in the SDK: six tagged lifecycle events (`ExecutionStarted`/`Finished`, `ToolCallStarted`/`Finished`, `InteractionStarted`/`Resolved`) + `composeExecutionObservers`, with a `plugin.runtime.executionObserver` hook. - The execution engine emits the events (re-derived onto the current Queue-based pause model), exposes `Executor.owner`, and tags the run span with the execution id + trigger. - `makeExecutionStack` composes plugin observers — one seam covers every HTTP host and the MCP Durable Objects; local's fixed-execution + in-process MCP are wired directly. **Behaviour-neutral / opt-in:** with no plugin observing, every path is a no-op. Gates: `format:check`, `lint`, full-monorepo `typecheck`, and observer unit tests all green. Live app verification still to come. <!-- stack:links:start --> 1. **#12** 👈 current 2. #13 3. #14 <!-- stack:links:end -->
Adds **`@executor-js/plugin-execution-history`** — an opt-in execution-history sink built on the observer foundation. - Records every run (plus its tool calls and interactions) into three owner-scoped `pluginStorage` collections via a buffered-batch writer — **no new tables, no migrations**; works on D1/libSQL/sqlite/postgres. - `./api`: a scoped read API (`list`/`get`/`listToolCalls`) over HttpApi (`executionHistoryHttpPlugin`). - `./client`: a Runs page at `/plugins/executionHistory/` (table, status filter, pagination, 4-tab detail drawer) — mounts via the existing plugins catch-all with zero router changes. The base `.` entry never loads the API or React layers. Fully opt-in (not registered in any default config). Stacked on the execution-observer foundation. Gates: `format:check`, `lint`, full-monorepo `typecheck`, unit + handler tests green. Runs-page live render still to verify. <!-- stack:links:start --> 1. #12 2. **#13** 👈 current 3. #14 <!-- stack:links:end -->
Adds the **execution-observer foundation** — the seam the history and metrics plugins build on. - New `ExecutionObserver` contract in the SDK: six tagged lifecycle events (`ExecutionStarted`/`Finished`, `ToolCallStarted`/`Finished`, `InteractionStarted`/`Resolved`) + `composeExecutionObservers`, with a `plugin.runtime.executionObserver` hook. - The execution engine emits the events (re-derived onto the current Queue-based pause model), exposes `Executor.owner`, and tags the run span with the execution id + trigger. - `makeExecutionStack` composes plugin observers — one seam covers every HTTP host and the MCP Durable Objects; local's fixed-execution + in-process MCP are wired directly. **Behaviour-neutral / opt-in:** with no plugin observing, every path is a no-op. Gates: `format:check`, `lint`, full-monorepo `typecheck`, and observer unit tests all green. Live app verification still to come. <!-- stack:links:start --> 1. **#12** 👈 current 2. #13 3. #14 <!-- stack:links:end -->
Adds **`@executor-js/plugin-execution-history`** — an opt-in execution-history sink built on the observer foundation. - Records every run (plus its tool calls and interactions) into three owner-scoped `pluginStorage` collections via a buffered-batch writer — **no new tables, no migrations**; works on D1/libSQL/sqlite/postgres. - `./api`: a scoped read API (`list`/`get`/`listToolCalls`) over HttpApi (`executionHistoryHttpPlugin`). - `./client`: a Runs page at `/plugins/executionHistory/` (table, status filter, pagination, 4-tab detail drawer) — mounts via the existing plugins catch-all with zero router changes. The base `.` entry never loads the API or React layers. Fully opt-in (not registered in any default config). Stacked on the execution-observer foundation. Gates: `format:check`, `lint`, full-monorepo `typecheck`, unit + handler tests green. Runs-page live render still to verify. <!-- stack:links:start --> 1. #12 2. **#13** 👈 current 3. #14 <!-- stack:links:end -->
Adds the **execution-observer foundation** — the seam the history and metrics plugins build on. - New `ExecutionObserver` contract in the SDK: six tagged lifecycle events (`ExecutionStarted`/`Finished`, `ToolCallStarted`/`Finished`, `InteractionStarted`/`Resolved`) + `composeExecutionObservers`, with a `plugin.runtime.executionObserver` hook. - The execution engine emits the events (re-derived onto the current Queue-based pause model), exposes `Executor.owner`, and tags the run span with the execution id + trigger. - `makeExecutionStack` composes plugin observers — one seam covers every HTTP host and the MCP Durable Objects; local's fixed-execution + in-process MCP are wired directly. **Behaviour-neutral / opt-in:** with no plugin observing, every path is a no-op. Gates: `format:check`, `lint`, full-monorepo `typecheck`, and observer unit tests all green. Live app verification still to come. <!-- stack:links:start --> 1. **#12** 👈 current 2. #13 3. #14 <!-- stack:links:end -->
Adds **`@executor-js/plugin-execution-history`** — an opt-in execution-history sink built on the observer foundation. - Records every run (plus its tool calls and interactions) into three owner-scoped `pluginStorage` collections via a buffered-batch writer — **no new tables, no migrations**; works on D1/libSQL/sqlite/postgres. - `./api`: a scoped read API (`list`/`get`/`listToolCalls`) over HttpApi (`executionHistoryHttpPlugin`). - `./client`: a Runs page at `/plugins/executionHistory/` (table, status filter, pagination, 4-tab detail drawer) — mounts via the existing plugins catch-all with zero router changes. The base `.` entry never loads the API or React layers. Fully opt-in (not registered in any default config). Stacked on the execution-observer foundation. Gates: `format:check`, `lint`, full-monorepo `typecheck`, unit + handler tests green. Runs-page live render still to verify. <!-- stack:links:start --> 1. #12 2. **#13** 👈 current 3. #14 <!-- stack:links:end -->
Adds the **execution-observer foundation** — the seam the history and metrics plugins build on. - New `ExecutionObserver` contract in the SDK: six tagged lifecycle events (`ExecutionStarted`/`Finished`, `ToolCallStarted`/`Finished`, `InteractionStarted`/`Resolved`) + `composeExecutionObservers`, with a `plugin.runtime.executionObserver` hook. - The execution engine emits the events (re-derived onto the current Queue-based pause model), exposes `Executor.owner`, and tags the run span with the execution id + trigger. - `makeExecutionStack` composes plugin observers — one seam covers every HTTP host and the MCP Durable Objects; local's fixed-execution + in-process MCP are wired directly. **Behaviour-neutral / opt-in:** with no plugin observing, every path is a no-op. Gates: `format:check`, `lint`, full-monorepo `typecheck`, and observer unit tests all green. Live app verification still to come. <!-- stack:links:start --> 1. **#12** 👈 current 2. #13 3. #14 <!-- stack:links:end -->
Adds **`@executor-js/plugin-execution-history`** — an opt-in execution-history sink built on the observer foundation. - Records every run (plus its tool calls and interactions) into three owner-scoped `pluginStorage` collections via a buffered-batch writer — **no new tables, no migrations**; works on D1/libSQL/sqlite/postgres. - `./api`: a scoped read API (`list`/`get`/`listToolCalls`) over HttpApi (`executionHistoryHttpPlugin`). - `./client`: a Runs page at `/plugins/executionHistory/` (table, status filter, pagination, 4-tab detail drawer) — mounts via the existing plugins catch-all with zero router changes. The base `.` entry never loads the API or React layers. Fully opt-in (not registered in any default config). Stacked on the execution-observer foundation. Gates: `format:check`, `lint`, full-monorepo `typecheck`, unit + handler tests green. Runs-page live render still to verify. <!-- stack:links:start --> 1. #12 2. **#13** 👈 current 3. #14 <!-- stack:links:end -->
Adds the **execution-observer foundation** — the seam the history and metrics plugins build on. - New `ExecutionObserver` contract in the SDK: six tagged lifecycle events (`ExecutionStarted`/`Finished`, `ToolCallStarted`/`Finished`, `InteractionStarted`/`Resolved`) + `composeExecutionObservers`, with a `plugin.runtime.executionObserver` hook. - The execution engine emits the events (re-derived onto the current Queue-based pause model), exposes `Executor.owner`, and tags the run span with the execution id + trigger. - `makeExecutionStack` composes plugin observers — one seam covers every HTTP host and the MCP Durable Objects; local's fixed-execution + in-process MCP are wired directly. **Behaviour-neutral / opt-in:** with no plugin observing, every path is a no-op. Gates: `format:check`, `lint`, full-monorepo `typecheck`, and observer unit tests all green. Live app verification still to come. <!-- stack:links:start --> 1. **#12** 👈 current 2. #13 3. #14 <!-- stack:links:end -->
Adds **`@executor-js/plugin-execution-history`** — an opt-in execution-history sink built on the observer foundation. - Records every run (plus its tool calls and interactions) into three owner-scoped `pluginStorage` collections via a buffered-batch writer — **no new tables, no migrations**; works on D1/libSQL/sqlite/postgres. - `./api`: a scoped read API (`list`/`get`/`listToolCalls`) over HttpApi (`executionHistoryHttpPlugin`). - `./client`: a Runs page at `/plugins/executionHistory/` (table, status filter, pagination, 4-tab detail drawer) — mounts via the existing plugins catch-all with zero router changes. The base `.` entry never loads the API or React layers. Fully opt-in (not registered in any default config). Stacked on the execution-observer foundation. Gates: `format:check`, `lint`, full-monorepo `typecheck`, unit + handler tests green. Runs-page live render still to verify. <!-- stack:links:start --> 1. #12 2. **#13** 👈 current 3. #14 <!-- stack:links:end -->
Adds
@executor-js/plugin-execution-metrics— an opt-in metrics sink built on the observer foundation../api: an auth-gatedGET /execution-metrics/metricsPrometheus scrape (executionMetricsHttpPlugin)../cloudflare: a Workers Analytics Engine sink (writeDataPoint) — per-isolate Effect metrics being meaningless on a Worker fleet. Wired opt-in on host-cloudflare, gated on theANALYTICSbinding.Base
.entry free of@executor-js/apiand@cloudflare/workers-types.Stacked on the execution-observer foundation. Gates:
format:check,lint, full-monorepotypecheck, and metrics-render tests green (an adversarial-verify pass caught + fixed a Prometheus histogram-bucket bug).Stack