@owlmeans/agent-common 0.1.18-rc.16 → 0.1.18-rc.18
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 +1 -1
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/agent-common/SKILL.md +41 -13
- package/build/consts.d.ts +32 -5
- package/build/consts.d.ts.map +1 -1
- package/build/consts.js +31 -4
- package/build/consts.js.map +1 -1
- package/build/errors.d.ts +60 -0
- package/build/errors.d.ts.map +1 -1
- package/build/errors.js +84 -0
- package/build/errors.js.map +1 -1
- package/build/flows.d.ts +2 -3
- package/build/flows.d.ts.map +1 -1
- package/build/flows.js +5 -10
- package/build/flows.js.map +1 -1
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -0
- package/build/index.js.map +1 -1
- package/build/pipeline.d.ts +182 -0
- package/build/pipeline.d.ts.map +1 -0
- package/build/pipeline.js +186 -0
- package/build/pipeline.js.map +1 -0
- package/build/types.d.ts +10 -23
- package/build/types.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/consts.ts +33 -4
- package/src/errors.ts +96 -0
- package/src/flows.ts +5 -10
- package/src/index.ts +1 -0
- package/src/pipeline.ts +351 -0
- package/src/types.ts +10 -24
- package/tests/pipeline.spec.ts +167 -0
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
|
|
|
46
46
|
your project's skill store (`.agents/skills/`):
|
|
47
47
|
|
|
48
48
|
```sh
|
|
49
|
-
npx @owlmeans/agent-skills@^0.1.18-rc.
|
|
49
|
+
npx @owlmeans/agent-skills@^0.1.18-rc.14
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
The embedded files are version-matched to this package release. Do not edit them
|
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/agent-common",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-09-
|
|
4
|
+
"version": "0.1.18-rc.18",
|
|
5
|
+
"generatedAt": "2026-09-10T23:12:07.502Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agent-common
|
|
3
|
-
description: "How to use @owlmeans/agent-common — runtime-free contracts for OwlMeans agents: conversation identity, the run-lifecycle flow,
|
|
3
|
+
description: "How to use @owlmeans/agent-common — runtime-free contracts for OwlMeans agents: conversation identity, the run-lifecycle flow, the PIPELINE declaration (PipelineSpec, PipelineRun, validatePipelineSpec, orderPipelineSteps) and the record shapes an application persists. Auto-invoked when importing agent record types, a pipeline spec or run type, conversationFor, truncateAt, or the agent run flow."
|
|
4
4
|
user-invocable: false
|
|
5
5
|
---
|
|
6
6
|
<!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
|
|
@@ -8,7 +8,7 @@ user-invocable: false
|
|
|
8
8
|
# @owlmeans/agent-common
|
|
9
9
|
|
|
10
10
|
**Layer:** Cross-cutting domain
|
|
11
|
-
**Install:** `"@owlmeans/agent-common": "^0.1.18-rc.
|
|
11
|
+
**Install:** `"@owlmeans/agent-common": "^0.1.18-rc.18"` in `dependencies`
|
|
12
12
|
|
|
13
13
|
Serializable contracts for the agent family. No LangChain, no LangGraph, no storage driver — a
|
|
14
14
|
backend or a browser bundle imports these to read what an agent wrote without pulling the runtime.
|
|
@@ -24,14 +24,18 @@ The runtime is `@owlmeans/agent`.
|
|
|
24
24
|
| `agentRunFlow`, `AgentRunStep`, `AgentRunTransition`, `AGENT_RUN_FLOW` | The `@owlmeans/flow` lifecycle a run is driven through. |
|
|
25
25
|
| `agentFlows` | Every flow this package declares, for a provider to serve. |
|
|
26
26
|
| `ConversationEvent`, `ConversationEventInput` | One finished run, compacted: `summary` + `advice`. |
|
|
27
|
-
| `AgentRunState` | Serialized flow plus the execution snapshot — the data plane of a run. |
|
|
28
27
|
| `MemoryNode`, `MemoryEvent` (+ `MemoryEventInput`) | Agent-authored memory records. |
|
|
29
|
-
| `AgentRunMessage` | What a transport carries
|
|
28
|
+
| `AgentRunMessage` | What a transport carries — a POINTER (`runId`, `conversationId`, optional `pipeline`/`step`), never state. |
|
|
29
|
+
| `PipelineStepSpec`, `PipelineSpec` | The declaration: named steps, `after: string[]` edges, `optional`, `nonIdempotent`, `attempts`, `timeout`. |
|
|
30
|
+
| `PipelineRun`, `PipelineRunStatus`, `PipelineProgress` | The persisted run row — `state` is JSON **text** plus `stateChars`; `completed`/`pending`/`warnings`; `heartbeatAt`. `PipelineRunStatus.Waiting` is a run parked on a question. |
|
|
31
|
+
| `PipelineRunInquiry` · `INQUIRY_ANSWERS_KEY` | What a `Waiting` run is waiting for (`step`, `askedAt`, the `Inquiry`), and the one state key answers live under. |
|
|
32
|
+
| `validatePipelineSpec`, `orderPipelineSteps`, `pipelineDescendants`, `pipelineStep` | Pure spec helpers — no runtime, no graph engine. |
|
|
30
33
|
| `AGENTS_SERVICE` | The service alias — **`agents`**, plural. |
|
|
31
34
|
| `AGENT_*_STORE` | Port names a consumer binds its storage under. |
|
|
32
35
|
| `AgentRunStatus` | `ok` / `failed`, written on a conversation event. |
|
|
33
|
-
| `AgentCommonError`, `AgentRunStateError` | The error family. |
|
|
36
|
+
| `AgentCommonError`, `AgentRunStateError`, `PipelineSpecError`, `PipelineVersionError`, `PipelineUnknownStepError`, `PipelineNotIdempotentError`, `PipelineStateTooLargeError`, `PipelineNotResumableError` | The error family. |
|
|
34
37
|
| `DEFAULT_SUMMARY_CHARS` (1200) · `DEFAULT_ADVICE_CHARS` (400) · `DEFAULT_EVENT_WINDOW` (3) · `DEFAULT_MEMORY_NODE_CHARS` (2000) · `DEFAULT_MEMORY_EVENTS_LIMIT` (50) | The caps the runtime's plugins default to. Override them per plugin; read them here rather than restating a number. |
|
|
38
|
+
| `DEFAULT_MAX_STATE_CHARS` (256_000) · `DEFAULT_STEP_ATTEMPTS` (1) · `DEFAULT_STEP_TIMEOUT` (30 min) | Pipeline defaults. The state cap is a TRIPWIRE, not a budget. |
|
|
35
39
|
|
|
36
40
|
## Rules
|
|
37
41
|
|
|
@@ -43,11 +47,33 @@ at its own adapter boundary — that is the adapter's job, not the contract's.
|
|
|
43
47
|
`agent`: a consuming application very often already has a service of its own called that, and a
|
|
44
48
|
context accessor collision is silent — the second registration simply wins.
|
|
45
49
|
|
|
46
|
-
**Flow steps are lifecycle stages, not conversational turns.** `FlowPayload`
|
|
47
|
-
and a ReAct loop's turn count is unbounded, so the loop lives inside the
|
|
48
|
-
counter travels in the payload. What the steps buy is
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
**Flow steps are lifecycle stages, not conversational turns, and nothing RESUMES one.** `FlowPayload`
|
|
51
|
+
holds flat scalars only and a ReAct loop's turn count is unbounded, so the loop lives inside the
|
|
52
|
+
`Working` step and only its counter travels in the payload. What the steps buy is the ability to say
|
|
53
|
+
how far a run got when it ended, which is what a plugin reads on `onFinish`. Resumable work is a
|
|
54
|
+
PIPELINE — named steps, a state of scalars, side effects guarded per step. A ReAct run is not one:
|
|
55
|
+
its state is an unbounded message list whose tool results are already applied to the world.
|
|
56
|
+
|
|
57
|
+
**A `PipelineSpec` is a DECLARATION and this package holds no engine.** The steps' bodies, the graph,
|
|
58
|
+
the checkpointer and the stores all live in `@owlmeans/agent`; what is here is what a browser bundle,
|
|
59
|
+
a reconciler or an operator console must read to say where a run stands without importing LangGraph.
|
|
60
|
+
That is also why `PipelineRun.state` is JSON **text** with a `stateChars` beside it rather than a
|
|
61
|
+
subdocument: a run row crosses a `$jsonSchema`, and a state whose keys are dotted paths does not.
|
|
62
|
+
|
|
63
|
+
**A `Waiting` run is stopped on purpose and is NOT stale.** It has no process behind it and its
|
|
64
|
+
`heartbeatAt` will not move again until somebody answers `run.inquiry`, so anything that sweeps
|
|
65
|
+
stale runs must exclude it — reading it as a crashed run repairs what is merely waiting. The row
|
|
66
|
+
carries `inquiry` only while it waits, and the runner clears it on every entry: a row still
|
|
67
|
+
advertising an answered question has every reader offer it again. A pipeline with no run store
|
|
68
|
+
cannot wait at all, which is what `PipelineNotResumableError` says. See [[inquiry]].
|
|
69
|
+
|
|
70
|
+
**`validatePipelineSpec` names EVERY fault at once** — unknown `after` targets, cycles, duplicate
|
|
71
|
+
step names, `attempts > 1` on a `nonIdempotent` step. A spec is authored once and fixed once, and
|
|
72
|
+
reporting faults one per build turns a five-minute edit into five builds.
|
|
73
|
+
|
|
74
|
+
**A resume across a `version` change is REFUSED, never adapted.** `completed` names steps by string,
|
|
75
|
+
so a spec that has since renamed, removed or reordered one would let a resumed run skip work it never
|
|
76
|
+
did — silently, because an unknown name in `completed` matches nothing.
|
|
51
77
|
|
|
52
78
|
**Each working step keeps exactly one non-explicit outgoing transition.** That is what lets
|
|
53
79
|
`FlowModel.next()` give a driver an unambiguous answer without knowing the vocabulary. `Fail` is
|
|
@@ -62,8 +88,9 @@ than as prompt text.
|
|
|
62
88
|
silently collapse every run of every subject into one thread.
|
|
63
89
|
|
|
64
90
|
**Port names are exported; ports are not bound here.** An unbound port is not an error — the plugin
|
|
65
|
-
that needs it degrades to a no-op
|
|
66
|
-
|
|
91
|
+
that needs it degrades to a no-op. `AGENT_PIPELINE_RUN_STORE` is the one exception in spirit: a
|
|
92
|
+
pipeline with no run store still runs, but it is not resumable, because the ROW is what a resume
|
|
93
|
+
reads. `AGENT_CHECKPOINT_STORE` may be absent with no loss of correctness at all.
|
|
67
94
|
|
|
68
95
|
## Testing
|
|
69
96
|
|
|
@@ -73,6 +100,7 @@ every other consumer of that package is client-side.
|
|
|
73
100
|
|
|
74
101
|
## Related
|
|
75
102
|
|
|
103
|
+
- [[inquiry]] — the human-in-the-loop primitive `Waiting` and `PipelineRunInquiry` belong to
|
|
76
104
|
- [[agent]] — the runtime that writes these records
|
|
77
|
-
- [[llm-common]] — `LlmPurpose` and `ExecutionState`, which
|
|
105
|
+
- [[llm-common]] — `LlmPurpose` and `ExecutionState`, which a run's execution is built from
|
|
78
106
|
- [[flow]] — the flow model the run lifecycle is declared against
|
package/build/consts.d.ts
CHANGED
|
@@ -15,9 +15,33 @@ export declare const AGENTS_SERVICE = "agents";
|
|
|
15
15
|
* the same way `ExecutionService.checkpoint` does with no plugin registered.
|
|
16
16
|
*/
|
|
17
17
|
export declare const AGENT_CONVERSATION_STORE = "agent-conversation-store";
|
|
18
|
-
export declare const AGENT_RUN_STATE_STORE = "agent-run-state-store";
|
|
19
18
|
export declare const AGENT_MEMORY_GRAPH_STORE = "agent-memory-graph-store";
|
|
20
19
|
export declare const AGENT_MEMORY_EVENTS_STORE = "agent-memory-events-store";
|
|
20
|
+
export declare const AGENT_PIPELINE_RUN_STORE = "agent-pipeline-run-store";
|
|
21
|
+
export declare const AGENT_CHECKPOINT_STORE = "agent-checkpoint-store";
|
|
22
|
+
/**
|
|
23
|
+
* Caps and defaults for a pipeline run.
|
|
24
|
+
*
|
|
25
|
+
* `DEFAULT_MAX_STATE_CHARS` is generous by the standard of what a state may legally hold — scalars
|
|
26
|
+
* and keys — and deliberately so: it is a TRIPWIRE, not a budget. A state approaching it is a state
|
|
27
|
+
* carrying an artifact, and the step fails so that fact is discovered on the first run rather than
|
|
28
|
+
* surviving as a row nobody can read back.
|
|
29
|
+
*
|
|
30
|
+
* `DEFAULT_STEP_ATTEMPTS` is 1 because retry budgets in this family multiply: an outer retry around
|
|
31
|
+
* a model's own inner retry is their product, not their sum.
|
|
32
|
+
*/
|
|
33
|
+
export declare const DEFAULT_MAX_STATE_CHARS = 256000;
|
|
34
|
+
export declare const DEFAULT_STEP_ATTEMPTS = 1;
|
|
35
|
+
export declare const DEFAULT_STEP_TIMEOUT = 1800000;
|
|
36
|
+
/**
|
|
37
|
+
* Where a pipeline's answers live in its state.
|
|
38
|
+
*
|
|
39
|
+
* One key, named here rather than per pipeline, because an answer has to survive every hop it can
|
|
40
|
+
* take: a resume merges answers into it, a composing step forwards it to its child, and a reader
|
|
41
|
+
* looks a question up by id. Scalars and keys, like everything else a state holds — the answer's
|
|
42
|
+
* decision travels here and its prose belongs wherever that pipeline keeps its documents.
|
|
43
|
+
*/
|
|
44
|
+
export declare const INQUIRY_ANSWERS_KEY = "answers";
|
|
21
45
|
/** The lifecycle flow every agent run is driven through. */
|
|
22
46
|
export declare const AGENT_RUN_FLOW = "agent-run";
|
|
23
47
|
/**
|
|
@@ -26,8 +50,12 @@ export declare const AGENT_RUN_FLOW = "agent-run";
|
|
|
26
50
|
* These are recoverable LIFECYCLE stages, not conversational turns. A ReAct loop's turn count is
|
|
27
51
|
* unbounded and its messages are not scalars, while `FlowPayload` holds flat scalars only — so the
|
|
28
52
|
* loop lives inside `Working` and only its counter travels in the payload. What the steps buy is
|
|
29
|
-
* the ability to say
|
|
30
|
-
*
|
|
53
|
+
* the ability to say how far a run got when it ended, which is what a plugin reads on `onFinish`.
|
|
54
|
+
*
|
|
55
|
+
* Nothing RESUMES one of these. A ReAct run is not a resumable unit: its state is an unbounded
|
|
56
|
+
* message list whose tool results are side effects already applied to the world, so re-entering it
|
|
57
|
+
* would re-apply them. Resumable work is a PIPELINE — see `pipeline.ts` — whose steps are named,
|
|
58
|
+
* whose state is scalars, and whose side effects are guarded per step.
|
|
31
59
|
*/
|
|
32
60
|
export declare enum AgentRunStep {
|
|
33
61
|
Received = "received",
|
|
@@ -43,8 +71,7 @@ export declare enum AgentRunTransition {
|
|
|
43
71
|
Work = "work",
|
|
44
72
|
Finalize = "finalize",
|
|
45
73
|
Finish = "finish",
|
|
46
|
-
Fail = "fail"
|
|
47
|
-
Resume = "resume"
|
|
74
|
+
Fail = "fail"
|
|
48
75
|
}
|
|
49
76
|
/** How a run ended. Written on the conversation event so a reader can weigh the advice. */
|
|
50
77
|
export declare enum AgentRunStatus {
|
package/build/consts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,WAAW,CAAA;AAEtC;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,6BAA6B,CAAA;AAClE,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,WAAW,CAAA;AAEtC;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,6BAA6B,CAAA;AAClE,eAAO,MAAM,wBAAwB,6BAA6B,CAAA;AAClE,eAAO,MAAM,yBAAyB,8BAA8B,CAAA;AACpE,eAAO,MAAM,wBAAwB,6BAA6B,CAAA;AAClE,eAAO,MAAM,sBAAsB,2BAA2B,CAAA;AAE9D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,SAAU,CAAA;AAC9C,eAAO,MAAM,qBAAqB,IAAI,CAAA;AACtC,eAAO,MAAM,oBAAoB,UAAY,CAAA;AAE7C;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,YAAY,CAAA;AAE5C,4DAA4D;AAC5D,eAAO,MAAM,cAAc,cAAc,CAAA;AAEzC;;;;;;;;;;;;GAYG;AACH,oBAAY,YAAY;IACtB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,MAAM,WAAW;CAClB;AAED,iDAAiD;AACjD,oBAAY,kBAAkB;IAC5B,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED,2FAA2F;AAC3F,oBAAY,cAAc;IACxB,EAAE,OAAO;IACT,MAAM,WAAW;CAClB;AAED;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,OAAO,CAAA;AACzC,eAAO,MAAM,oBAAoB,MAAM,CAAA;AACvC,eAAO,MAAM,oBAAoB,IAAI,CAAA;AACrC,eAAO,MAAM,yBAAyB,OAAO,CAAA;AAC7C,eAAO,MAAM,2BAA2B,KAAK,CAAA;AAE7C,6EAA6E;AAC7E,eAAO,MAAM,SAAS,MAAM,CAAA"}
|
package/build/consts.js
CHANGED
|
@@ -15,9 +15,33 @@ export const AGENTS_SERVICE = 'agents';
|
|
|
15
15
|
* the same way `ExecutionService.checkpoint` does with no plugin registered.
|
|
16
16
|
*/
|
|
17
17
|
export const AGENT_CONVERSATION_STORE = 'agent-conversation-store';
|
|
18
|
-
export const AGENT_RUN_STATE_STORE = 'agent-run-state-store';
|
|
19
18
|
export const AGENT_MEMORY_GRAPH_STORE = 'agent-memory-graph-store';
|
|
20
19
|
export const AGENT_MEMORY_EVENTS_STORE = 'agent-memory-events-store';
|
|
20
|
+
export const AGENT_PIPELINE_RUN_STORE = 'agent-pipeline-run-store';
|
|
21
|
+
export const AGENT_CHECKPOINT_STORE = 'agent-checkpoint-store';
|
|
22
|
+
/**
|
|
23
|
+
* Caps and defaults for a pipeline run.
|
|
24
|
+
*
|
|
25
|
+
* `DEFAULT_MAX_STATE_CHARS` is generous by the standard of what a state may legally hold — scalars
|
|
26
|
+
* and keys — and deliberately so: it is a TRIPWIRE, not a budget. A state approaching it is a state
|
|
27
|
+
* carrying an artifact, and the step fails so that fact is discovered on the first run rather than
|
|
28
|
+
* surviving as a row nobody can read back.
|
|
29
|
+
*
|
|
30
|
+
* `DEFAULT_STEP_ATTEMPTS` is 1 because retry budgets in this family multiply: an outer retry around
|
|
31
|
+
* a model's own inner retry is their product, not their sum.
|
|
32
|
+
*/
|
|
33
|
+
export const DEFAULT_MAX_STATE_CHARS = 256_000;
|
|
34
|
+
export const DEFAULT_STEP_ATTEMPTS = 1;
|
|
35
|
+
export const DEFAULT_STEP_TIMEOUT = 1_800_000;
|
|
36
|
+
/**
|
|
37
|
+
* Where a pipeline's answers live in its state.
|
|
38
|
+
*
|
|
39
|
+
* One key, named here rather than per pipeline, because an answer has to survive every hop it can
|
|
40
|
+
* take: a resume merges answers into it, a composing step forwards it to its child, and a reader
|
|
41
|
+
* looks a question up by id. Scalars and keys, like everything else a state holds — the answer's
|
|
42
|
+
* decision travels here and its prose belongs wherever that pipeline keeps its documents.
|
|
43
|
+
*/
|
|
44
|
+
export const INQUIRY_ANSWERS_KEY = 'answers';
|
|
21
45
|
/** The lifecycle flow every agent run is driven through. */
|
|
22
46
|
export const AGENT_RUN_FLOW = 'agent-run';
|
|
23
47
|
/**
|
|
@@ -26,8 +50,12 @@ export const AGENT_RUN_FLOW = 'agent-run';
|
|
|
26
50
|
* These are recoverable LIFECYCLE stages, not conversational turns. A ReAct loop's turn count is
|
|
27
51
|
* unbounded and its messages are not scalars, while `FlowPayload` holds flat scalars only — so the
|
|
28
52
|
* loop lives inside `Working` and only its counter travels in the payload. What the steps buy is
|
|
29
|
-
* the ability to say
|
|
30
|
-
*
|
|
53
|
+
* the ability to say how far a run got when it ended, which is what a plugin reads on `onFinish`.
|
|
54
|
+
*
|
|
55
|
+
* Nothing RESUMES one of these. A ReAct run is not a resumable unit: its state is an unbounded
|
|
56
|
+
* message list whose tool results are side effects already applied to the world, so re-entering it
|
|
57
|
+
* would re-apply them. Resumable work is a PIPELINE — see `pipeline.ts` — whose steps are named,
|
|
58
|
+
* whose state is scalars, and whose side effects are guarded per step.
|
|
31
59
|
*/
|
|
32
60
|
export var AgentRunStep;
|
|
33
61
|
(function (AgentRunStep) {
|
|
@@ -46,7 +74,6 @@ export var AgentRunTransition;
|
|
|
46
74
|
AgentRunTransition["Finalize"] = "finalize";
|
|
47
75
|
AgentRunTransition["Finish"] = "finish";
|
|
48
76
|
AgentRunTransition["Fail"] = "fail";
|
|
49
|
-
AgentRunTransition["Resume"] = "resume";
|
|
50
77
|
})(AgentRunTransition || (AgentRunTransition = {}));
|
|
51
78
|
/** How a run ended. Written on the conversation event so a reader can weigh the advice. */
|
|
52
79
|
export var AgentRunStatus;
|
package/build/consts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAA;AAEtC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,0BAA0B,CAAA;AAClE,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAA;AAEtC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,0BAA0B,CAAA;AAClE,MAAM,CAAC,MAAM,wBAAwB,GAAG,0BAA0B,CAAA;AAClE,MAAM,CAAC,MAAM,yBAAyB,GAAG,2BAA2B,CAAA;AACpE,MAAM,CAAC,MAAM,wBAAwB,GAAG,0BAA0B,CAAA;AAClE,MAAM,CAAC,MAAM,sBAAsB,GAAG,wBAAwB,CAAA;AAE9D;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,OAAO,CAAA;AAC9C,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAA;AACtC,MAAM,CAAC,MAAM,oBAAoB,GAAG,SAAS,CAAA;AAE7C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,SAAS,CAAA;AAE5C,4DAA4D;AAC5D,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CAAA;AAEzC;;;;;;;;;;;;GAYG;AACH,MAAM,CAAN,IAAY,YAOX;AAPD,WAAY,YAAY;IACtB,qCAAqB,CAAA;IACrB,qCAAqB,CAAA;IACrB,mCAAmB,CAAA;IACnB,yCAAyB,CAAA;IACzB,qCAAqB,CAAA;IACrB,iCAAiB,CAAA;AACnB,CAAC,EAPW,YAAY,KAAZ,YAAY,QAOvB;AAED,iDAAiD;AACjD,MAAM,CAAN,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,mCAAa,CAAA;IACb,2CAAqB,CAAA;IACrB,uCAAiB,CAAA;IACjB,mCAAa,CAAA;AACf,CAAC,EANW,kBAAkB,KAAlB,kBAAkB,QAM7B;AAED,2FAA2F;AAC3F,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,2BAAS,CAAA;IACT,mCAAiB,CAAA;AACnB,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAA;AACzC,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAA;AACvC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAA;AACrC,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAA;AAC7C,MAAM,CAAC,MAAM,2BAA2B,GAAG,EAAE,CAAA;AAE7C,6EAA6E;AAC7E,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAAA"}
|
package/build/errors.d.ts
CHANGED
|
@@ -8,4 +8,64 @@ export declare class AgentRunStateError extends AgentCommonError {
|
|
|
8
8
|
static typeName: string;
|
|
9
9
|
constructor(message?: string);
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* A pipeline declaration is not runnable.
|
|
13
|
+
*
|
|
14
|
+
* Thrown by {@link import('./pipeline.js').validatePipelineSpec} and by the runner's own build
|
|
15
|
+
* step, and it always names EVERY fault it found rather than the first: a spec is authored once and
|
|
16
|
+
* fixed once, and reporting faults one per build turns a five-minute edit into five builds.
|
|
17
|
+
*/
|
|
18
|
+
export declare class PipelineSpecError extends AgentCommonError {
|
|
19
|
+
static typeName: string;
|
|
20
|
+
constructor(message?: string);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A resume was asked of a run started under a different version of its pipeline.
|
|
24
|
+
*
|
|
25
|
+
* Refused rather than adapted. `completed` names steps by string, so a spec that has since renamed,
|
|
26
|
+
* removed or reordered a step would have a resumed run skip work it never did — silently, because
|
|
27
|
+
* an unknown name in `completed` simply matches nothing.
|
|
28
|
+
*/
|
|
29
|
+
export declare class PipelineVersionError extends AgentCommonError {
|
|
30
|
+
static typeName: string;
|
|
31
|
+
constructor(message?: string);
|
|
32
|
+
}
|
|
33
|
+
/** A resume, a progress report or a skip named a step the spec does not declare. */
|
|
34
|
+
export declare class PipelineUnknownStepError extends AgentCommonError {
|
|
35
|
+
static typeName: string;
|
|
36
|
+
constructor(message?: string);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* A resume was asked to re-enter a completed step whose side effect cannot be repeated.
|
|
40
|
+
*
|
|
41
|
+
* The caller may override with `force`, which is why this is an error and not a silent skip: an
|
|
42
|
+
* operator re-running a wipe, a purge or a hostname claim has to say so.
|
|
43
|
+
*/
|
|
44
|
+
export declare class PipelineNotIdempotentError extends AgentCommonError {
|
|
45
|
+
static typeName: string;
|
|
46
|
+
constructor(message?: string);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* A step produced a state larger than the run row may carry.
|
|
50
|
+
*
|
|
51
|
+
* The step FAILS — the state is never truncated and the write is never skipped. A pipeline state is
|
|
52
|
+
* scalars and keys by contract; anything that overflows it is a large artifact that belongs in a
|
|
53
|
+
* store of its own, and silently dropping it would make a resume replay from a state that never
|
|
54
|
+
* existed.
|
|
55
|
+
*/
|
|
56
|
+
export declare class PipelineStateTooLargeError extends AgentCommonError {
|
|
57
|
+
static typeName: string;
|
|
58
|
+
constructor(message?: string);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* A run was asked to wait for an answer it has no way of being given.
|
|
62
|
+
*
|
|
63
|
+
* Thrown when a step asks a question, nobody is there to answer it, and the pipeline has no run
|
|
64
|
+
* store: parking would leave nothing behind to resume, so the step fails at once rather than
|
|
65
|
+
* stopping a run that could never be started again.
|
|
66
|
+
*/
|
|
67
|
+
export declare class PipelineNotResumableError extends AgentCommonError {
|
|
68
|
+
static typeName: string;
|
|
69
|
+
constructor(message?: string);
|
|
70
|
+
}
|
|
11
71
|
//# sourceMappingURL=errors.d.ts.map
|
package/build/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEhD,qBAAa,gBAAiB,SAAQ,cAAc;IAClD,OAAuB,QAAQ,EAAE,MAAM,CAAoC;IAE3E,YAAY,OAAO,GAAE,MAAgB,EAEpC;CACF;AAED,qFAAqF;AACrF,qBAAa,kBAAmB,SAAQ,gBAAgB;IACtD,OAAuB,QAAQ,EAAE,MAAM,CAAyC;IAEhF,YAAY,OAAO,GAAE,MAAgB,EAGpC;CACF"}
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEhD,qBAAa,gBAAiB,SAAQ,cAAc;IAClD,OAAuB,QAAQ,EAAE,MAAM,CAAoC;IAE3E,YAAY,OAAO,GAAE,MAAgB,EAEpC;CACF;AAED,qFAAqF;AACrF,qBAAa,kBAAmB,SAAQ,gBAAgB;IACtD,OAAuB,QAAQ,EAAE,MAAM,CAAyC;IAEhF,YAAY,OAAO,GAAE,MAAgB,EAGpC;CACF;AAED;;;;;;GAMG;AACH,qBAAa,iBAAkB,SAAQ,gBAAgB;IACrD,OAAuB,QAAQ,EAAE,MAAM,CAA6C;IAEpF,YAAY,OAAO,GAAE,MAAgB,EAGpC;CACF;AAED;;;;;;GAMG;AACH,qBAAa,oBAAqB,SAAQ,gBAAgB;IACxD,OAAuB,QAAQ,EAAE,MAAM,CAAgD;IAEvF,YAAY,OAAO,GAAE,MAAgB,EAGpC;CACF;AAED,oFAAoF;AACpF,qBAAa,wBAAyB,SAAQ,gBAAgB;IAC5D,OAAuB,QAAQ,EAAE,MAAM,CAAoD;IAE3F,YAAY,OAAO,GAAE,MAAgB,EAGpC;CACF;AAED;;;;;GAKG;AACH,qBAAa,0BAA2B,SAAQ,gBAAgB;IAC9D,OAAuB,QAAQ,EAAE,MAAM,CAAsD;IAE7F,YAAY,OAAO,GAAE,MAAgB,EAGpC;CACF;AAED;;;;;;;GAOG;AACH,qBAAa,0BAA2B,SAAQ,gBAAgB;IAC9D,OAAuB,QAAQ,EAAE,MAAM,CAAsD;IAE7F,YAAY,OAAO,GAAE,MAAgB,EAGpC;CACF;AAED;;;;;;GAMG;AACH,qBAAa,yBAA0B,SAAQ,gBAAgB;IAC7D,OAAuB,QAAQ,EAAE,MAAM,CAAqD;IAE5F,YAAY,OAAO,GAAE,MAAgB,EAGpC;CACF"}
|
package/build/errors.js
CHANGED
|
@@ -13,6 +13,90 @@ export class AgentRunStateError extends AgentCommonError {
|
|
|
13
13
|
this.type = AgentRunStateError.typeName;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* A pipeline declaration is not runnable.
|
|
18
|
+
*
|
|
19
|
+
* Thrown by {@link import('./pipeline.js').validatePipelineSpec} and by the runner's own build
|
|
20
|
+
* step, and it always names EVERY fault it found rather than the first: a spec is authored once and
|
|
21
|
+
* fixed once, and reporting faults one per build turns a five-minute edit into five builds.
|
|
22
|
+
*/
|
|
23
|
+
export class PipelineSpecError extends AgentCommonError {
|
|
24
|
+
static typeName = `PipelineSpec${AgentCommonError.typeName}`;
|
|
25
|
+
constructor(message = 'error') {
|
|
26
|
+
super(`pipeline-spec:${message}`);
|
|
27
|
+
this.type = PipelineSpecError.typeName;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A resume was asked of a run started under a different version of its pipeline.
|
|
32
|
+
*
|
|
33
|
+
* Refused rather than adapted. `completed` names steps by string, so a spec that has since renamed,
|
|
34
|
+
* removed or reordered a step would have a resumed run skip work it never did — silently, because
|
|
35
|
+
* an unknown name in `completed` simply matches nothing.
|
|
36
|
+
*/
|
|
37
|
+
export class PipelineVersionError extends AgentCommonError {
|
|
38
|
+
static typeName = `PipelineVersion${AgentCommonError.typeName}`;
|
|
39
|
+
constructor(message = 'error') {
|
|
40
|
+
super(`pipeline-version:${message}`);
|
|
41
|
+
this.type = PipelineVersionError.typeName;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/** A resume, a progress report or a skip named a step the spec does not declare. */
|
|
45
|
+
export class PipelineUnknownStepError extends AgentCommonError {
|
|
46
|
+
static typeName = `PipelineUnknownStep${AgentCommonError.typeName}`;
|
|
47
|
+
constructor(message = 'error') {
|
|
48
|
+
super(`pipeline-step:${message}`);
|
|
49
|
+
this.type = PipelineUnknownStepError.typeName;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* A resume was asked to re-enter a completed step whose side effect cannot be repeated.
|
|
54
|
+
*
|
|
55
|
+
* The caller may override with `force`, which is why this is an error and not a silent skip: an
|
|
56
|
+
* operator re-running a wipe, a purge or a hostname claim has to say so.
|
|
57
|
+
*/
|
|
58
|
+
export class PipelineNotIdempotentError extends AgentCommonError {
|
|
59
|
+
static typeName = `PipelineNotIdempotent${AgentCommonError.typeName}`;
|
|
60
|
+
constructor(message = 'error') {
|
|
61
|
+
super(`pipeline-idempotency:${message}`);
|
|
62
|
+
this.type = PipelineNotIdempotentError.typeName;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* A step produced a state larger than the run row may carry.
|
|
67
|
+
*
|
|
68
|
+
* The step FAILS — the state is never truncated and the write is never skipped. A pipeline state is
|
|
69
|
+
* scalars and keys by contract; anything that overflows it is a large artifact that belongs in a
|
|
70
|
+
* store of its own, and silently dropping it would make a resume replay from a state that never
|
|
71
|
+
* existed.
|
|
72
|
+
*/
|
|
73
|
+
export class PipelineStateTooLargeError extends AgentCommonError {
|
|
74
|
+
static typeName = `PipelineStateTooLarge${AgentCommonError.typeName}`;
|
|
75
|
+
constructor(message = 'error') {
|
|
76
|
+
super(`pipeline-state:${message}`);
|
|
77
|
+
this.type = PipelineStateTooLargeError.typeName;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* A run was asked to wait for an answer it has no way of being given.
|
|
82
|
+
*
|
|
83
|
+
* Thrown when a step asks a question, nobody is there to answer it, and the pipeline has no run
|
|
84
|
+
* store: parking would leave nothing behind to resume, so the step fails at once rather than
|
|
85
|
+
* stopping a run that could never be started again.
|
|
86
|
+
*/
|
|
87
|
+
export class PipelineNotResumableError extends AgentCommonError {
|
|
88
|
+
static typeName = `PipelineNotResumable${AgentCommonError.typeName}`;
|
|
89
|
+
constructor(message = 'error') {
|
|
90
|
+
super(`pipeline-not-resumable:${message}`);
|
|
91
|
+
this.type = PipelineNotResumableError.typeName;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
16
94
|
ResilientError.registerErrorClass(AgentCommonError);
|
|
17
95
|
ResilientError.registerErrorClass(AgentRunStateError);
|
|
96
|
+
ResilientError.registerErrorClass(PipelineSpecError);
|
|
97
|
+
ResilientError.registerErrorClass(PipelineVersionError);
|
|
98
|
+
ResilientError.registerErrorClass(PipelineUnknownStepError);
|
|
99
|
+
ResilientError.registerErrorClass(PipelineNotIdempotentError);
|
|
100
|
+
ResilientError.registerErrorClass(PipelineStateTooLargeError);
|
|
101
|
+
ResilientError.registerErrorClass(PipelineNotResumableError);
|
|
18
102
|
//# sourceMappingURL=errors.js.map
|
package/build/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEhD,MAAM,OAAO,gBAAiB,SAAQ,cAAc;I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AAwB,gBAAgB,CAAC,QAAQ,EAAE,CAAA;IAE7F,YAAY,OAAO,GAAW,OAAO;QACnC,KAAK,CAAC,kBAAkB,OAAO,EAAE,CAAC,CAAA;QAClC,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC,QAAQ,CAAA;IACjD,CAAC;CACF;AAED;;;;;;GAMG;AACH,MAAM,OAAO,yBAA0B,SAAQ,gBAAgB;IACtD,MAAM,CAAU,QAAQ,GAAW,uBAAuB,gBAAgB,CAAC,QAAQ,EAAE,CAAA;IAE5F,YAAY,OAAO,GAAW,OAAO;QACnC,KAAK,CAAC,0BAA0B,OAAO,EAAE,CAAC,CAAA;QAC1C,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC,QAAQ,CAAA;IAChD,CAAC;CACF;AAED,cAAc,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAA;AACnD,cAAc,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,CAAA;AACrD,cAAc,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,CAAA;AACpD,cAAc,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAA;AACvD,cAAc,CAAC,kBAAkB,CAAC,wBAAwB,CAAC,CAAA;AAC3D,cAAc,CAAC,kBAAkB,CAAC,0BAA0B,CAAC,CAAA;AAC7D,cAAc,CAAC,kBAAkB,CAAC,0BAA0B,CAAC,CAAA;AAC7D,cAAc,CAAC,kBAAkB,CAAC,yBAAyB,CAAC,CAAA"}
|
package/build/flows.d.ts
CHANGED
|
@@ -3,9 +3,8 @@ import type { ShallowFlow } from '@owlmeans/flow';
|
|
|
3
3
|
* The lifecycle of one agent run.
|
|
4
4
|
*
|
|
5
5
|
* Read it as "how far did this run get", not "what did it say". Everything conversational happens
|
|
6
|
-
* inside `Working`; the steps exist so
|
|
7
|
-
*
|
|
8
|
-
* checkpoint.
|
|
6
|
+
* inside `Working`; the steps exist so a plugin reading `onFinish` can say where a run ended.
|
|
7
|
+
* `Fail` is reachable from every working step and is TERMINAL — see the note on that step.
|
|
9
8
|
*
|
|
10
9
|
* `service` is left as the flow name on every step. A flow step normally binds to a service or an
|
|
11
10
|
* entrypoint, but an agent run is driven by whoever holds the model — there is no second party to
|
package/build/flows.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flows.d.ts","sourceRoot":"","sources":["../src/flows.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAGjD
|
|
1
|
+
{"version":3,"file":"flows.d.ts","sourceRoot":"","sources":["../src/flows.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAGjD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,YAAY,EAAE,WA0F1B,CAAA;AAED,iEAAiE;AACjE,eAAO,MAAM,UAAU,EAAE,WAAW,EAAmB,CAAA"}
|
package/build/flows.js
CHANGED
|
@@ -3,9 +3,8 @@ import { AGENT_RUN_FLOW, AgentRunStep, AgentRunTransition } from './consts.js';
|
|
|
3
3
|
* The lifecycle of one agent run.
|
|
4
4
|
*
|
|
5
5
|
* Read it as "how far did this run get", not "what did it say". Everything conversational happens
|
|
6
|
-
* inside `Working`; the steps exist so
|
|
7
|
-
*
|
|
8
|
-
* checkpoint.
|
|
6
|
+
* inside `Working`; the steps exist so a plugin reading `onFinish` can say where a run ended.
|
|
7
|
+
* `Fail` is reachable from every working step and is TERMINAL — see the note on that step.
|
|
9
8
|
*
|
|
10
9
|
* `service` is left as the flow name on every step. A flow step normally binds to a service or an
|
|
11
10
|
* entrypoint, but an agent run is driven by whoever holds the model — there is no second party to
|
|
@@ -95,13 +94,9 @@ export const agentRunFlow = {
|
|
|
95
94
|
index: 5,
|
|
96
95
|
step: AgentRunStep.Failed,
|
|
97
96
|
service: AGENT_RUN_FLOW,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
step: AgentRunStep.Working,
|
|
102
|
-
explicit: true,
|
|
103
|
-
},
|
|
104
|
-
},
|
|
97
|
+
// Terminal. Nothing resumes a ReAct run — its tool results are side effects already applied
|
|
98
|
+
// to the world, so re-entering it re-applies them. Resumable work is a pipeline.
|
|
99
|
+
transitions: {},
|
|
105
100
|
},
|
|
106
101
|
},
|
|
107
102
|
};
|
package/build/flows.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flows.js","sourceRoot":"","sources":["../src/flows.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAE9E
|
|
1
|
+
{"version":3,"file":"flows.js","sourceRoot":"","sources":["../src/flows.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAE9E;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,YAAY,GAAgB;IACvC,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,YAAY,CAAC,QAAQ;IAElC,KAAK,EAAE;QACL,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE;YACvB,KAAK,EAAE,CAAC;YACR,IAAI,EAAE,YAAY,CAAC,QAAQ;YAC3B,OAAO,EAAE,cAAc;YACvB,OAAO,EAAE,IAAI;YACb,WAAW,EAAE;gBACX,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE;oBAC5B,UAAU,EAAE,kBAAkB,CAAC,OAAO;oBACtC,IAAI,EAAE,YAAY,CAAC,QAAQ;iBAC5B;gBACD,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE;oBACzB,UAAU,EAAE,kBAAkB,CAAC,IAAI;oBACnC,IAAI,EAAE,YAAY,CAAC,MAAM;oBACzB,QAAQ,EAAE,IAAI;iBACf;aACF;SACF;QAED,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE;YACvB,KAAK,EAAE,CAAC;YACR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;iBACf;aACF;SACF;QAED,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE;YACvB,KAAK,EAAE,CAAC;YACR,IAAI,EAAE,YAAY,CAAC,QAAQ;YAC3B,OAAO,EAAE,cAAc;YACvB,WAAW,EAAE,EAAE;SAChB;QAED,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE;YACrB,KAAK,EAAE,CAAC;YACR,IAAI,EAAE,YAAY,CAAC,MAAM;YACzB,OAAO,EAAE,cAAc;YACvB,4FAA4F;YAC5F,iFAAiF;YACjF,WAAW,EAAE,EAAE;SAChB;KACF;CACF,CAAA;AAED,iEAAiE;AACjE,MAAM,CAAC,MAAM,UAAU,GAAkB,CAAC,YAAY,CAAC,CAAA"}
|
package/build/index.d.ts
CHANGED
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,mBAAmB,YAAY,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,2BAA2B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,mBAAmB,YAAY,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,2BAA2B,CAAA"}
|
package/build/index.js
CHANGED
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAE3B,cAAc,YAAY,CAAA;AAC1B,cAAc,2BAA2B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAE3B,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,2BAA2B,CAAA"}
|