@axlsdk/studio 0.17.5 → 0.17.7
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/README.md +7 -2
- package/dist/{chunk-LLJHLJ63.js → chunk-WUCCIBQ6.js} +187 -117
- package/dist/chunk-WUCCIBQ6.js.map +1 -0
- package/dist/cli.cjs +190 -120
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/{connection-manager-DAuqk9lM.d.cts → connection-manager-8TQqoUtk.d.cts} +11 -0
- package/dist/{connection-manager-DAuqk9lM.d.ts → connection-manager-8TQqoUtk.d.ts} +11 -0
- package/dist/middleware.cjs +189 -119
- package/dist/middleware.cjs.map +1 -1
- package/dist/middleware.d.cts +1 -1
- package/dist/middleware.d.ts +1 -1
- package/dist/middleware.js +1 -1
- package/dist/server/index.cjs +186 -116
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +5 -2
- package/dist/server/index.d.ts +5 -2
- package/dist/server/index.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-LLJHLJ63.js.map +0 -1
package/README.md
CHANGED
|
@@ -146,6 +146,9 @@ Studio exposes a REST API that the SPA consumes. You can also call these directl
|
|
|
146
146
|
| `POST /api/tools/:name/test` | Test a tool with `{ input: {...} }` |
|
|
147
147
|
| `GET /api/sessions` | List sessions |
|
|
148
148
|
| `GET /api/executions` | List executions |
|
|
149
|
+
| `GET /api/executions/:id` | Execution detail. `?since={step}` filters `events` to those with `step > since` (polling tail) |
|
|
150
|
+
| `POST /api/executions/:id/abort` | Abort a running execution (signal-driven; wakes paused `ctx.awaitHuman`) |
|
|
151
|
+
| `DELETE /api/executions/:id` | Delete an execution from history (GDPR scrub). Calls `runtime.deleteExecution` AND scrubs the WS replay buffer for `execution:{id}`. Returns `{ id, deleted: true }` or 404. Blocked in readOnly |
|
|
149
152
|
| `GET /api/costs?window=24h\|7d\|30d\|all` | Aggregated cost data for a time window (default `7d`). `?windows=all` returns all four windows at once for debugging |
|
|
150
153
|
| `GET /api/eval-trends?window=` | Per-eval score trends (latest, mean, std), cost totals, recent runs with `model`/`duration` |
|
|
151
154
|
| `GET /api/workflow-stats?window=` | Per-workflow totals, completed/failed counts, p50/p95/avg duration, failure rate |
|
|
@@ -225,7 +228,7 @@ studio.upgradeWebSocket(server);
|
|
|
225
228
|
| `serveClient` | `boolean` | `true` | Serve the pre-built SPA |
|
|
226
229
|
| `verifyUpgrade` | `(req) => boolean \| { allowed: boolean, metadata?: unknown } \| Promise<...>` | — | Auth callback for WebSocket upgrades. The object form attaches `metadata` (tenant/user id / role) to the connection, available to `filterTraceEvent` on every outbound broadcast. Bare boolean still works (back-compat) |
|
|
227
230
|
| `filterTraceEvent` | `(event, metadata) => boolean` | — | Per-connection broadcast filter for multi-tenant deployments. Called on every outbound trace event (and on replay buffer events for late subscribers, so historical cross-tenant events can't leak on reconnect). Predicate errors are fail-closed — event is dropped |
|
|
228
|
-
| `readOnly` | `boolean` | `false` | Disable all mutating endpoints. `POST /api/evals/compare` is allowed (pure computation); `POST /api/evals/import`, `POST /api/evals/:name/run`, `POST /api/evals/:name/rescore`, `POST /api/evals/runs/:evalRunId/cancel`,
|
|
231
|
+
| `readOnly` | `boolean` | `false` | Disable all mutating endpoints. `POST /api/evals/compare` is allowed (pure computation); `POST /api/evals/import`, `POST /api/evals/:name/run`, `POST /api/evals/:name/rescore`, `POST /api/evals/runs/:evalRunId/cancel`, `DELETE /api/evals/history/:id`, and `DELETE /api/executions/:id` are blocked (405 with `error.code: 'READ_ONLY'`) |
|
|
229
232
|
| `evals` | `string \| string[] \| { files, conditions? }` | — | Lazy-load eval files for the Eval Runner panel |
|
|
230
233
|
| `bufferCaps` | `{ maxEventsPerBuffer?, maxBytesPerBuffer?, maxActiveBuffers? }` | `{ 1000, 4 MiB, 256 }` | Override the default WebSocket replay-buffer resource caps for high-churn deployments. Worst-case memory is roughly `maxActiveBuffers × maxBytesPerBuffer` (≈1 GiB at defaults). Terminal `done`/`error` events are always buffered regardless of caps |
|
|
231
234
|
|
|
@@ -450,7 +453,9 @@ const runtime = new AxlRuntime({ trace: { redact: true } });
|
|
|
450
453
|
const studio = createStudioMiddleware({ runtime });
|
|
451
454
|
```
|
|
452
455
|
|
|
453
|
-
Under `redact: true`, the following Studio endpoints scrub user content server-side before responding: `GET /api/executions{,/:id}
|
|
456
|
+
Under `redact: true`, the following Studio endpoints scrub user content server-side before responding: `GET /api/executions{,/:id}` (also scrubs `ExecutionInfo.metadata` to `{ redacted: true }` — caller-supplied `userId`/`tenantId`/correlation ids are PII surfaces), `GET /api/memory/:scope{,/:key}` (keys preserved so Memory Browser stays navigable), `GET /api/sessions/:id`, `GET /api/evals/history`, `POST /api/evals/:name/run` (sync), `POST /api/evals/:name/rescore`, `GET /api/decisions`, `POST /api/tools/:name/test`, `POST /api/workflows/:name/execute` (sync); streaming WS broadcasts on `/workflows/:name/execute` with `stream: true`, `/api/playground/chat`, AND the trace channel firehose (`trace:{executionId}`) all scrub `AxlEvent` content before send.
|
|
457
|
+
|
|
458
|
+
**`DELETE /api/executions/:id` is a second cleanup boundary** alongside redaction. Redaction scrubs *content* on read; the delete endpoint removes the *whole row + indexes + checkpoints + suspended state + streaming buffer + pending decisions* AND scrubs the WebSocket replay buffer for `execution:{id}` so late subscribers can't reconstruct events for a deleted run. Audit via `runtime.on('execution_deleted', ...)`.
|
|
454
459
|
|
|
455
460
|
Studio checks the flag via `runtime.isRedactEnabled(): boolean` — it does **not** reach into the config object directly, because `Readonly<AxlConfig>` is shallow and consumers could mutate the nested `trace.redact` field via sub-object access. `GET /api/health` also reports `readOnly: boolean` so clients can gate mutating UI affordances.
|
|
456
461
|
|