@automatalabs/workflows 0.6.1 → 0.7.0

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 CHANGED
@@ -283,9 +283,10 @@ await runner.dispose();
283
283
  | event | payload |
284
284
  |-------|---------|
285
285
  | `session_update` | `{ update }` — catch-all for **every** update, regardless of kind |
286
- | `permission_request` | `{ request, outcome }` — a tool permission the runner auto-answered |
286
+ | `permission_pending` | `{ request }` — resolver-only; emitted after the request is parked and before the resolver is invoked |
287
+ | `permission_request` | `{ request, outcome }` — the final permission outcome returned to the agent |
287
288
  | `raw_message` | `{ method, message }` — a vendor extension notification (e.g. Claude `_claude/sdkMessage`) |
288
- | `session_open` / `session_close` | a session opened / was released on a pooled connection |
289
+ | `session_open` / `session_close` | an ACP session opened / was released |
289
290
  | `backend_error` | `{ backendId, error }` — a pooled backend process crashed |
290
291
 
291
292
  **Context envelope.** A pooled runner multiplexes many concurrent runs over one process, so every
@@ -406,8 +407,10 @@ WorkflowManager, // stateful / resumable run manager
406
407
  // ── ACP backend ──
407
408
  createAcpRunner, // () => AcpAgentRunner (the default AgentRunner; has .on(...) events)
408
409
  AcpAgentRunner, // class — implements AgentRunner over ACP
410
+ InteractiveSession, // held-open multi-turn ACP session returned by openSession()
409
411
  selectBackend, // pick Claude vs Codex from a model/tier spec
410
412
  ClaudeBackend, CodexBackend, // the concrete backends
413
+ clientCapabilitiesFor, adaptPromptContent,
411
414
  toJsonSchema, toStrictJsonSchema,
412
415
  TypedEventEmitter, // the tiny typed emitter backing runner.on(...)
413
416
 
@@ -418,9 +421,12 @@ WorkflowError, WorkflowErrorCode, isWorkflowError, isProviderUsageLimit,
418
421
  RunDynamicWorkflowOptions, WorkflowRunOptions, AgentOptions, ExecOptions,
419
422
  WorkflowManagerOptions, CheckpointOptions, WorkflowRunResult, WorkflowSnapshot,
420
423
  AcpPoolOptions, AgentRunner, RunOptions, AgentResult, AgentUsage, JournalEntry,
424
+ InteractiveSessionOptions, InteractiveTurn, PermissionResolver,
425
+ ClientHandlers, FsHandlers, TerminalHandlers, AcpSessionContext, NegotiatedCapabilities,
421
426
  // ACP events: the runner.on(...) surface
422
427
  AcpRunnerEventMap, AcpEventName, AcpEventListener, AcpEventContext,
423
- AcpSessionUpdate, AcpUpdateKind, AcpPermissionEvent, AcpRawMessageEvent, AcpBackendErrorEvent,
428
+ AcpSessionUpdate, AcpUpdateKind, AcpPermissionPendingEvent, AcpPermissionEvent,
429
+ AcpRawMessageEvent, AcpBackendErrorEvent,
424
430
  ```
425
431
 
426
432
  (The DSL globals — `agent`, `parallel`, `pipeline`, … — are **not** exported; they are realm
package/dist/index.d.ts CHANGED
@@ -3,10 +3,10 @@ import type { AgentRunner, WorkflowBackendConfig, WorkflowRunResult } from "@aut
3
3
  export { runWorkflow, parseWorkflowScript, WorkflowManager } from "@automatalabs/workflow-engine";
4
4
  export type { WorkflowRunOptions, AgentOptions, ExecOptions, WorkflowManagerOptions, CheckpointOptions, WorkflowRunResult, WorkflowSnapshot, } from "@automatalabs/workflow-engine";
5
5
  export { WorkflowError, WorkflowErrorCode, isWorkflowError, isProviderUsageLimit, } from "@automatalabs/workflow-engine";
6
- export { createAcpRunner, AcpAgentRunner, selectBackend, ClaudeBackend, CodexBackend, CustomAcpBackend, resolveBackendRegistry, BACKENDS_ENV, toJsonSchema, toStrictJsonSchema, } from "@automatalabs/acp-agents";
7
- export type { AcpPoolOptions, AcpRunnerOptions, BackendRegistry, CustomBackendConfig, RegisteredBackend, } from "@automatalabs/acp-agents";
6
+ export { createAcpRunner, AcpAgentRunner, InteractiveSession, selectBackend, ClaudeBackend, CodexBackend, CustomAcpBackend, clientCapabilitiesFor, adaptPromptContent, resolveBackendRegistry, BACKENDS_ENV, toJsonSchema, toStrictJsonSchema, } from "@automatalabs/acp-agents";
7
+ export type { AcpPoolOptions, AcpRunnerOptions, InteractiveSessionOptions, InteractiveTurn, BackendRegistry, CustomBackendConfig, RegisteredBackend, ClientHandlers, FsHandlers, TerminalHandlers, AcpSessionContext, NegotiatedCapabilities, PermissionResolver, } from "@automatalabs/acp-agents";
8
8
  export { TypedEventEmitter } from "@automatalabs/acp-agents";
9
- export type { AcpRunnerEventMap, AcpEventName, AcpEventListener, AcpEventContext, AcpSessionUpdate, AcpUpdateKind, AcpPermissionEvent, AcpRawMessageEvent, AcpBackendErrorEvent, } from "@automatalabs/acp-agents";
9
+ export type { AcpRunnerEventMap, AcpEventName, AcpEventListener, AcpEventContext, AcpSessionUpdate, AcpUpdateKind, AcpPermissionPendingEvent, AcpPermissionEvent, AcpRawMessageEvent, AcpBackendErrorEvent, } from "@automatalabs/acp-agents";
10
10
  export type { AgentRunner, RunOptions, AgentResult, AgentUsage } from "@automatalabs/shared-types";
11
11
  export type { JournalEntry, WorkflowBackendConfig, WorkflowMeta } from "@automatalabs/shared-types";
12
12
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAIxG,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAClG,YAAY,EACV,kBAAkB,EAClB,YAAY,EACZ,WAAW,EACX,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,oBAAoB,GACrB,MAAM,+BAA+B,CAAC;AAOvC,OAAO,EACL,eAAe,EACf,cAAc,EACd,aAAa,EACb,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACtB,YAAY,EACZ,YAAY,EACZ,kBAAkB,GACnB,MAAM,0BAA0B,CAAC;AAClC,YAA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EAAE,MAAM,CAAA;CAAE,GAAG,qBAAqB,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;AAExF,8CAA8C;AAC9C,MAAM,WAAW,yBAAyB;IACxC;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,+EAA+E;IAC/E,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,kGAAkG;IAClG,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,+FAA+F;IAC/F,mBAAmB,CAAC,EAAE,qBAAqB,CAAC;CAC7C;AAED;;;;;;;;;GASG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,MAAM,EACd,IAAI,GAAE,yBAA8B,GACnC,OAAO,CAAC,iBAAiB,CAAC,CAe5B"}
package/dist/index.js CHANGED
@@ -15,12 +15,13 @@ import { parseWorkflowScript, WorkflowError, WorkflowErrorCode, WorkflowManager
15
15
  // option/result + error types the host composes against. ──
16
16
  export { runWorkflow, parseWorkflowScript, WorkflowManager } from "@automatalabs/workflow-engine";
17
17
  export { WorkflowError, WorkflowErrorCode, isWorkflowError, isProviderUsageLimit, } from "@automatalabs/workflow-engine";
18
- // ── ACP backend: the default AgentRunner implementation, backend selection, the
19
- // concrete backends (built-in + custom registry), the pool/runner options, and the
20
- // JSON-Schema helpers. Custom backends let ANY ACP agent serve agent() calls:
18
+ // ── ACP backend: the default AgentRunner implementation, interactive sessions, backend
19
+ // selection, the concrete backends (built-in + custom registry), the pool/runner options,
20
+ // capability helpers, client handlers, permission resolvers, and JSON-Schema helpers.
21
+ // Custom backends let ANY ACP agent serve agent() calls:
21
22
  // `createAcpRunner({ backends: { browser: { command: "…" } } })` (or the
22
23
  // AGENTPRISM_BACKENDS env var), then route with `agent(p, { model: "browser" })`. ──
23
- export { createAcpRunner, AcpAgentRunner, selectBackend, ClaudeBackend, CodexBackend, CustomAcpBackend, resolveBackendRegistry, BACKENDS_ENV, toJsonSchema, toStrictJsonSchema, } from "@automatalabs/acp-agents";
24
+ export { createAcpRunner, AcpAgentRunner, InteractiveSession, selectBackend, ClaudeBackend, CodexBackend, CustomAcpBackend, clientCapabilitiesFor, adaptPromptContent, resolveBackendRegistry, BACKENDS_ENV, toJsonSchema, toStrictJsonSchema, } from "@automatalabs/acp-agents";
24
25
  // ── Live ACP events: `createAcpRunner().on("tool_call", evt => …)` to listen in on the
25
26
  // stream of a run. The event map keys are ACP `sessionUpdate` discriminants plus a few
26
27
  // cross-cutting events; each payload carries a `{ sessionId, backendId, label?, runId? }`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automatalabs/workflows",
3
- "version": "0.6.1",
3
+ "version": "0.7.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,9 +24,9 @@
24
24
  "access": "public"
25
25
  },
26
26
  "dependencies": {
27
- "@automatalabs/shared-types": "0.6.0",
28
- "@automatalabs/workflow-engine": "0.3.1",
29
- "@automatalabs/acp-agents": "0.7.0"
27
+ "@automatalabs/shared-types": "0.7.0",
28
+ "@automatalabs/workflow-engine": "0.3.2",
29
+ "@automatalabs/acp-agents": "0.9.0"
30
30
  },
31
31
  "scripts": {
32
32
  "build": "tsc -b",