@effect-agent/workflow 0.1.0-beta.50 → 0.1.0-beta.52

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.
@@ -6,14 +6,14 @@ import { BindingUnavailable } from "@effect-agent/thread/AgentRegistration";
6
6
  import { DigestError } from "@effect-agent/thread/Digest";
7
7
  import { DurableRuntimeFailpointError } from "@effect-agent/thread/DurableFailpoint";
8
8
  import { OperationDenied } from "@effect-agent/thread/OperationAuthorizer";
9
- import { AdmissionConflict, LedgerError, SettlementConflict } from "@effect-agent/thread/SubmissionLedger";
9
+ import { AdmissionConflict, AdmissionPolicyError, LedgerError, SettlementConflict } from "@effect-agent/thread/SubmissionLedger";
10
10
  import { AppendConflict, FenceRejected, ThreadNotMaterialized, ThreadStoreError } from "@effect-agent/thread/ThreadStore";
11
11
  import { Effect, Schema } from "effect";
12
12
  declare namespace AgentWorkflow_d_exports {
13
13
  export { Error, execute };
14
14
  }
15
15
  /** Schema for the exact typed failure channel of execute, suitable for Workflow.make({ error }). */
16
- declare const Error: Schema.Union<readonly [typeof AgentInputError, typeof AgentOutputError, typeof AdmissionConflict, typeof AppendConflict, typeof BindingUnavailable, typeof DigestError, typeof DurableRuntimeFailpointError, typeof FenceRejected, typeof LedgerError, typeof OperationDenied, typeof SettlementConflict, typeof ThreadNotMaterialized, typeof ThreadStoreError, typeof WorkflowDispatchError, typeof WorkflowAdmissionClosed, typeof WorkflowExecutionFailure]>;
16
+ declare const Error: Schema.Union<readonly [typeof AgentInputError, typeof AgentOutputError, typeof AdmissionConflict, typeof AdmissionPolicyError, typeof AppendConflict, typeof BindingUnavailable, typeof DigestError, typeof DurableRuntimeFailpointError, typeof FenceRejected, typeof LedgerError, typeof OperationDenied, typeof SettlementConflict, typeof ThreadNotMaterialized, typeof ThreadStoreError, typeof WorkflowDispatchError, typeof WorkflowAdmissionClosed, typeof WorkflowExecutionFailure]>;
17
17
  type Error = typeof Error.Type;
18
18
  /**
19
19
  * Run a registered agent inside a native Workflow.toLayer handler. One stable name identifies
@@ -24,7 +24,7 @@ type Error = typeof Error.Type;
24
24
  * Pass the exact Agent Definition instance used in runtime registration; a same-ID copy fails
25
25
  * with BindingUnavailable before input encoding or admission.
26
26
  */
27
- declare const execute: <Input extends Schema.Top, Output extends Schema.Top>(agent: WorkflowAgent<Input, Output>, input: Input["Type"], options: WorkflowExecuteOptions) => Effect.Effect<Output["Type"], AdmissionConflict | AgentInputError | AgentOutputError | AppendConflict | BindingUnavailable | DigestError | DurableRuntimeFailpointError | FenceRejected | LedgerError | OperationDenied | SettlementConflict | ThreadNotMaterialized | ThreadStoreError | WorkflowAdmissionClosed | WorkflowDispatchError | WorkflowExecutionFailure, WorkflowAgentHost | import("effect/unstable/workflow/WorkflowEngine").WorkflowEngine | import("effect/unstable/workflow/WorkflowEngine").WorkflowInstance | Input["EncodingServices"] | Output["DecodingServices"]>;
27
+ declare const execute: <Input extends Schema.Top, Output extends Schema.Top>(agent: WorkflowAgent<Input, Output>, input: Input["Type"], options: WorkflowExecuteOptions) => Effect.Effect<Output["Type"], AdmissionConflict | AdmissionPolicyError | AgentInputError | AgentOutputError | AppendConflict | BindingUnavailable | DigestError | DurableRuntimeFailpointError | FenceRejected | LedgerError | OperationDenied | SettlementConflict | ThreadNotMaterialized | ThreadStoreError | WorkflowAdmissionClosed | WorkflowDispatchError | WorkflowExecutionFailure, WorkflowAgentHost | import("effect/unstable/workflow/WorkflowEngine").WorkflowEngine | import("effect/unstable/workflow/WorkflowEngine").WorkflowInstance | Input["EncodingServices"] | Output["DecodingServices"]>;
28
28
  //#endregion
29
29
  export { Error, execute, AgentWorkflow_d_exports as t };
30
30
  //# sourceMappingURL=AgentWorkflow.d.mts.map
@@ -7,7 +7,7 @@ import { BindingUnavailable } from "@effect-agent/thread/AgentRegistration";
7
7
  import { DigestError } from "@effect-agent/thread/Digest";
8
8
  import { DurableRuntimeFailpointError } from "@effect-agent/thread/DurableFailpoint";
9
9
  import { OperationDenied } from "@effect-agent/thread/OperationAuthorizer";
10
- import { AdmissionConflict, LedgerError, SettlementConflict } from "@effect-agent/thread/SubmissionLedger";
10
+ import { AdmissionConflict, AdmissionPolicyError, LedgerError, SettlementConflict } from "@effect-agent/thread/SubmissionLedger";
11
11
  import { AppendConflict, FenceRejected, ThreadNotMaterialized, ThreadStoreError } from "@effect-agent/thread/ThreadStore";
12
12
  import { Effect, Schema } from "effect";
13
13
  //#region src/AgentWorkflow.ts
@@ -20,6 +20,7 @@ const Error = Schema.Union([
20
20
  AgentInputError,
21
21
  AgentOutputError,
22
22
  AdmissionConflict,
23
+ AdmissionPolicyError,
23
24
  AppendConflict,
24
25
  BindingUnavailable,
25
26
  DigestError,
@@ -1 +1 @@
1
- {"version":3,"file":"AgentWorkflow.mjs","names":[],"sources":["../src/AgentWorkflow.ts"],"sourcesContent":["import { AgentInputError, AgentOutputError } from \"@effect-agent/core/AgentError\";\nimport { BindingUnavailable } from \"@effect-agent/thread/AgentRegistration\";\nimport { DigestError } from \"@effect-agent/thread/Digest\";\nimport { DurableRuntimeFailpointError } from \"@effect-agent/thread/DurableFailpoint\";\nimport { OperationDenied } from \"@effect-agent/thread/OperationAuthorizer\";\nimport {\n AdmissionConflict,\n LedgerError,\n SettlementConflict,\n} from \"@effect-agent/thread/SubmissionLedger\";\nimport {\n AppendConflict,\n FenceRejected,\n ThreadNotMaterialized,\n ThreadStoreError,\n} from \"@effect-agent/thread/ThreadStore\";\nimport { Effect, Schema } from \"effect\";\n\nimport { WorkflowAdmissionClosed, WorkflowAgentHost } from \"./WorkflowAgentHost.ts\";\nimport { WorkflowDispatchError } from \"./WorkflowDispatch.ts\";\nimport {\n WorkflowExecutionFailure,\n type WorkflowAgent,\n type WorkflowExecuteOptions,\n} from \"./WorkflowExecution.ts\";\n\n/** Schema for the exact typed failure channel of execute, suitable for Workflow.make({ error }). */\nexport const Error = Schema.Union([\n AgentInputError,\n AgentOutputError,\n AdmissionConflict,\n AppendConflict,\n BindingUnavailable,\n DigestError,\n DurableRuntimeFailpointError,\n FenceRejected,\n LedgerError,\n OperationDenied,\n SettlementConflict,\n ThreadNotMaterialized,\n ThreadStoreError,\n WorkflowDispatchError,\n WorkflowAdmissionClosed,\n WorkflowExecutionFailure,\n]);\n\nexport type Error = typeof Error.Type;\n\n/**\n * Run a registered agent inside a native Workflow.toLayer handler. One stable name identifies\n * one submission in that parent execution. Replays verify admission identity and decode the\n * canonical output again. Pending work suspends through Effect DurableDeferred; neither\n * suspension nor parent interruption aborts accepted agent work. Use the host's authorized abort.\n * Provide WorkflowAgentHost at the application boundary, sharing the parent's WorkflowEngine.\n * Pass the exact Agent Definition instance used in runtime registration; a same-ID copy fails\n * with BindingUnavailable before input encoding or admission.\n */\nexport const execute = Effect.fn(\"AgentWorkflow.execute\")(function* <\n Input extends Schema.Top,\n Output extends Schema.Top,\n>(agent: WorkflowAgent<Input, Output>, input: Input[\"Type\"], options: WorkflowExecuteOptions) {\n const host = yield* WorkflowAgentHost;\n\n return yield* host.execute(agent, input, options);\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;AA2BA,MAAa,QAAQ,OAAO,MAAM;CAChC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;;;;;;;;;AAaD,MAAa,UAAU,OAAO,GAAG,uBAAuB,CAAC,CAAC,WAGxD,OAAqC,OAAsB,SAAiC;CAG5F,OAAO,QAAO,OAFM,kBAAA,CAED,QAAQ,OAAO,OAAO,OAAO;AAClD,CAAC"}
1
+ {"version":3,"file":"AgentWorkflow.mjs","names":[],"sources":["../src/AgentWorkflow.ts"],"sourcesContent":["import { AgentInputError, AgentOutputError } from \"@effect-agent/core/AgentError\";\nimport { BindingUnavailable } from \"@effect-agent/thread/AgentRegistration\";\nimport { DigestError } from \"@effect-agent/thread/Digest\";\nimport { DurableRuntimeFailpointError } from \"@effect-agent/thread/DurableFailpoint\";\nimport { OperationDenied } from \"@effect-agent/thread/OperationAuthorizer\";\nimport {\n AdmissionConflict,\n AdmissionPolicyError,\n LedgerError,\n SettlementConflict,\n} from \"@effect-agent/thread/SubmissionLedger\";\nimport {\n AppendConflict,\n FenceRejected,\n ThreadNotMaterialized,\n ThreadStoreError,\n} from \"@effect-agent/thread/ThreadStore\";\nimport { Effect, Schema } from \"effect\";\n\nimport { WorkflowAdmissionClosed, WorkflowAgentHost } from \"./WorkflowAgentHost.ts\";\nimport { WorkflowDispatchError } from \"./WorkflowDispatch.ts\";\nimport {\n WorkflowExecutionFailure,\n type WorkflowAgent,\n type WorkflowExecuteOptions,\n} from \"./WorkflowExecution.ts\";\n\n/** Schema for the exact typed failure channel of execute, suitable for Workflow.make({ error }). */\nexport const Error = Schema.Union([\n AgentInputError,\n AgentOutputError,\n AdmissionConflict,\n AdmissionPolicyError,\n AppendConflict,\n BindingUnavailable,\n DigestError,\n DurableRuntimeFailpointError,\n FenceRejected,\n LedgerError,\n OperationDenied,\n SettlementConflict,\n ThreadNotMaterialized,\n ThreadStoreError,\n WorkflowDispatchError,\n WorkflowAdmissionClosed,\n WorkflowExecutionFailure,\n]);\n\nexport type Error = typeof Error.Type;\n\n/**\n * Run a registered agent inside a native Workflow.toLayer handler. One stable name identifies\n * one submission in that parent execution. Replays verify admission identity and decode the\n * canonical output again. Pending work suspends through Effect DurableDeferred; neither\n * suspension nor parent interruption aborts accepted agent work. Use the host's authorized abort.\n * Provide WorkflowAgentHost at the application boundary, sharing the parent's WorkflowEngine.\n * Pass the exact Agent Definition instance used in runtime registration; a same-ID copy fails\n * with BindingUnavailable before input encoding or admission.\n */\nexport const execute = Effect.fn(\"AgentWorkflow.execute\")(function* <\n Input extends Schema.Top,\n Output extends Schema.Top,\n>(agent: WorkflowAgent<Input, Output>, input: Input[\"Type\"], options: WorkflowExecuteOptions) {\n const host = yield* WorkflowAgentHost;\n\n return yield* host.execute(agent, input, options);\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;AA4BA,MAAa,QAAQ,OAAO,MAAM;CAChC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;;;;;;;;;AAaD,MAAa,UAAU,OAAO,GAAG,uBAAuB,CAAC,CAAC,WAGxD,OAAqC,OAAsB,SAAiC;CAG5F,OAAO,QAAO,OAFM,kBAAA,CAED,QAAQ,OAAO,OAAO,OAAO;AAClD,CAAC"}
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@effect-agent/workflow","version":"0.1.0-beta.50","dependencies":{"@effect-agent/core":"0.1.0-beta.50","@effect-agent/thread":"0.1.0-beta.50"},"devDependencies":{"@effect-agent/engine":"0.1.0-beta.50","@effect-agent/storage-memory":"0.1.0-beta.50","@effect/platform-node":"4.0.0-rc.112","@effect/vitest":"4.0.0-rc.112","effect":"4.0.0-rc.112","typescript":"7.0.2","vite-plus":"0.3.0"},"peerDependencies":{"effect":"^4.0.0-rc.112"},"exports":{".":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"./AgentWorkflow":{"types":"./dist/AgentWorkflow.d.mts","default":"./dist/AgentWorkflow.mjs"},"./WorkflowAgentHost":{"types":"./dist/WorkflowAgentHost.d.mts","default":"./dist/WorkflowAgentHost.mjs"},"./WorkflowDispatch":{"types":"./dist/WorkflowDispatch.d.mts","default":"./dist/WorkflowDispatch.mjs"},"./WorkflowExecution":{"types":"./dist/WorkflowExecution.d.mts","default":"./dist/WorkflowExecution.mjs"}},"description":"Effect Workflow execution for the existing durable Agent runtime.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/danieljvdm/effect-agent.git","directory":"packages/workflow"},"files":["dist","src"],"type":"module","sideEffects":[],"publishConfig":{"access":"public"},"scripts":{"build":"vp pack","check":"tsc --noEmit -p tsconfig.json","test":"vp test --passWithNoTests"}}
1
+ {"name":"@effect-agent/workflow","version":"0.1.0-beta.52","dependencies":{"@effect-agent/core":"0.1.0-beta.52","@effect-agent/thread":"0.1.0-beta.52"},"devDependencies":{"@effect-agent/engine":"0.1.0-beta.52","@effect-agent/storage-memory":"0.1.0-beta.52","@effect/platform-node":"4.0.0-rc.112","@effect/vitest":"4.0.0-rc.112","effect":"4.0.0-rc.112","typescript":"7.0.2","vite-plus":"0.3.0"},"peerDependencies":{"effect":"^4.0.0-rc.112"},"exports":{".":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"./AgentWorkflow":{"types":"./dist/AgentWorkflow.d.mts","default":"./dist/AgentWorkflow.mjs"},"./WorkflowAgentHost":{"types":"./dist/WorkflowAgentHost.d.mts","default":"./dist/WorkflowAgentHost.mjs"},"./WorkflowDispatch":{"types":"./dist/WorkflowDispatch.d.mts","default":"./dist/WorkflowDispatch.mjs"},"./WorkflowExecution":{"types":"./dist/WorkflowExecution.d.mts","default":"./dist/WorkflowExecution.mjs"}},"description":"Effect Workflow execution for the existing durable Agent runtime.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/danieljvdm/effect-agent.git","directory":"packages/workflow"},"files":["dist","src"],"type":"module","sideEffects":[],"publishConfig":{"access":"public"},"scripts":{"build":"vp pack","check":"tsc --noEmit -p tsconfig.json","test":"vp test --passWithNoTests"}}
@@ -5,6 +5,7 @@ import { DurableRuntimeFailpointError } from "@effect-agent/thread/DurableFailpo
5
5
  import { OperationDenied } from "@effect-agent/thread/OperationAuthorizer";
6
6
  import {
7
7
  AdmissionConflict,
8
+ AdmissionPolicyError,
8
9
  LedgerError,
9
10
  SettlementConflict,
10
11
  } from "@effect-agent/thread/SubmissionLedger";
@@ -29,6 +30,7 @@ export const Error = Schema.Union([
29
30
  AgentInputError,
30
31
  AgentOutputError,
31
32
  AdmissionConflict,
33
+ AdmissionPolicyError,
32
34
  AppendConflict,
33
35
  BindingUnavailable,
34
36
  DigestError,