@leuduan/lagent 0.0.0-stage → 44.0.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/LICENSE +16 -0
- package/README.md +157 -2
- package/dist/chunks/2GCIWSOA.js +5 -0
- package/dist/chunks/2P47AHNK.js +7 -0
- package/dist/chunks/34KW6VNQ.js +1 -0
- package/dist/chunks/3UMZMPWW.js +1 -0
- package/dist/chunks/5IRF47YB.js +1 -0
- package/dist/chunks/6DRCKZ2C.js +1 -0
- package/dist/chunks/6FRNHMCV.js +1 -0
- package/dist/chunks/7LI64H5X.js +17 -0
- package/dist/chunks/7VAPNE3L.js +1 -0
- package/dist/chunks/ASSQZH3F.js +1 -0
- package/dist/chunks/B4FXK5ER.js +77 -0
- package/dist/chunks/BBCW2FZK.js +1 -0
- package/dist/chunks/BPRCULZH.js +1 -0
- package/dist/chunks/CANPZYTH.js +24 -0
- package/dist/chunks/CQEVREBT.js +1 -0
- package/dist/chunks/CUK7CGC7.js +1 -0
- package/dist/chunks/D4PQP5MA.js +3 -0
- package/dist/chunks/DDANMY45.js +3 -0
- package/dist/chunks/DDZ7YF26.js +1 -0
- package/dist/chunks/EMRB4KCN.js +6 -0
- package/dist/chunks/EPYQ5M3B.js +3 -0
- package/dist/chunks/FJLU4UH3.js +1 -0
- package/dist/chunks/G44LG6VL.js +1 -0
- package/dist/chunks/GGSVIIWJ.js +2 -0
- package/dist/chunks/HK6ZSONF.js +1 -0
- package/dist/chunks/IAAEP6VL.js +30 -0
- package/dist/chunks/JCTBX33H.js +36 -0
- package/dist/chunks/JFX2MXBA.js +4 -0
- package/dist/chunks/JFZZXVWD.js +15 -0
- package/dist/chunks/KUZCL2SH.js +1 -0
- package/dist/chunks/MHC6VPB4.js +7 -0
- package/dist/chunks/MMNNZCBO.js +5 -0
- package/dist/chunks/MNJ4SRF7.js +1 -0
- package/dist/chunks/N6IXG2VL.js +1 -0
- package/dist/chunks/OCBPT7KE.js +1 -0
- package/dist/chunks/OL5A6ITQ.js +1 -0
- package/dist/chunks/PUSUPTAT.js +1 -0
- package/dist/chunks/Q75FUN7D.js +2 -0
- package/dist/chunks/Q7S5LFGN.js +1 -0
- package/dist/chunks/RCIHV3KG.js +1 -0
- package/dist/chunks/S34ZA2R6.js +1 -0
- package/dist/chunks/SS3B5W34.js +12 -0
- package/dist/chunks/VYMT4TXD.js +1 -0
- package/dist/chunks/W57RW55W.js +1 -0
- package/dist/compositions/base.d.ts +11 -0
- package/dist/compositions/codex.d.ts +66 -0
- package/dist/compositions/codexPrompts.d.ts +56 -0
- package/dist/context.d.ts +109 -0
- package/dist/index.d.ts +55 -0
- package/dist/index.js +1 -0
- package/dist/journal/catalog.d.ts +112 -0
- package/dist/journal/forkChain.d.ts +16 -0
- package/dist/journal/index.d.ts +15 -0
- package/dist/journal/journal.d.ts +475 -0
- package/dist/journal/projection.d.ts +87 -0
- package/dist/journal/store.d.ts +181 -0
- package/dist/llm/client.d.ts +135 -0
- package/dist/llm/content.d.ts +52 -0
- package/dist/llm/failure.d.ts +82 -0
- package/dist/llm/index.d.ts +22 -0
- package/dist/llm/index.js +1 -0
- package/dist/llm/primitives.d.ts +286 -0
- package/dist/llm/prompt.d.ts +21 -0
- package/dist/llm/provider.d.ts +74 -0
- package/dist/llm/readLedger.d.ts +24 -0
- package/dist/llm/request.d.ts +58 -0
- package/dist/loop/agent.d.ts +18 -0
- package/dist/loop/authorization.d.ts +41 -0
- package/dist/loop/auxiliary.d.ts +58 -0
- package/dist/loop/chunks.d.ts +27 -0
- package/dist/loop/completion.d.ts +17 -0
- package/dist/loop/errors.d.ts +139 -0
- package/dist/loop/hooks.d.ts +274 -0
- package/dist/loop/index.d.ts +16 -0
- package/dist/loop/runner.d.ts +134 -0
- package/dist/loop/runtime.d.ts +76 -0
- package/dist/loop/strategy.d.ts +80 -0
- package/dist/loop/surfacePrepare.d.ts +30 -0
- package/dist/loop/tool.d.ts +106 -0
- package/dist/loop/toolCalls.d.ts +35 -0
- package/dist/plugin.d.ts +50 -0
- package/dist/plugin.js +1 -0
- package/dist/plugins/agentsMd.d.ts +80 -0
- package/dist/plugins/agentsMd.js +1 -0
- package/dist/plugins/ask/index.d.ts +26 -0
- package/dist/plugins/ask/index.js +1 -0
- package/dist/plugins/ask/service.d.ts +125 -0
- package/dist/plugins/ask/tools.d.ts +9 -0
- package/dist/plugins/commands/index.d.ts +43 -0
- package/dist/plugins/commands/index.js +1 -0
- package/dist/plugins/commands/output.d.ts +115 -0
- package/dist/plugins/commands/record.d.ts +558 -0
- package/dist/plugins/commands/service.d.ts +321 -0
- package/dist/plugins/commands/shell.d.ts +25 -0
- package/dist/plugins/commands/tools.d.ts +10 -0
- package/dist/plugins/compaction/checkpoint.d.ts +94 -0
- package/dist/plugins/compaction/config.d.ts +133 -0
- package/dist/plugins/compaction/estimate.d.ts +37 -0
- package/dist/plugins/compaction/index.d.ts +87 -0
- package/dist/plugins/compaction/index.js +7 -0
- package/dist/plugins/compaction/planner.d.ts +207 -0
- package/dist/plugins/compaction/prune.d.ts +9 -0
- package/dist/plugins/compaction/record.d.ts +227 -0
- package/dist/plugins/compaction/segments.d.ts +23 -0
- package/dist/plugins/compaction/state.d.ts +68 -0
- package/dist/plugins/compaction/summarize.d.ts +13 -0
- package/dist/plugins/dateAndBranch.d.ts +47 -0
- package/dist/plugins/dateAndBranch.js +1 -0
- package/dist/plugins/delegations/answers.d.ts +39 -0
- package/dist/plugins/delegations/assignmentKey.d.ts +22 -0
- package/dist/plugins/delegations/cleanup.d.ts +161 -0
- package/dist/plugins/delegations/constraint.d.ts +76 -0
- package/dist/plugins/delegations/index.d.ts +39 -0
- package/dist/plugins/delegations/index.js +1 -0
- package/dist/plugins/delegations/notices.d.ts +261 -0
- package/dist/plugins/delegations/obligations.d.ts +210 -0
- package/dist/plugins/delegations/record.d.ts +633 -0
- package/dist/plugins/delegations/request.d.ts +384 -0
- package/dist/plugins/delegations/role.d.ts +30 -0
- package/dist/plugins/delegations/service.d.ts +563 -0
- package/dist/plugins/delegations/standing.d.ts +19 -0
- package/dist/plugins/delegations/stopCheck.d.ts +21 -0
- package/dist/plugins/delegations/tools.d.ts +71 -0
- package/dist/plugins/delegations/waitContracts.d.ts +118 -0
- package/dist/plugins/delegations/waitResolver.d.ts +116 -0
- package/dist/plugins/diagnostics/digest.d.ts +14 -0
- package/dist/plugins/diagnostics/index.d.ts +68 -0
- package/dist/plugins/diagnostics/index.js +1 -0
- package/dist/plugins/fileTools/config.d.ts +10 -0
- package/dist/plugins/fileTools/editFiles.d.ts +117 -0
- package/dist/plugins/fileTools/fsRead.d.ts +17 -0
- package/dist/plugins/fileTools/gitDiscovery.d.ts +9 -0
- package/dist/plugins/fileTools/index.d.ts +18 -0
- package/dist/plugins/fileTools/index.js +1 -0
- package/dist/plugins/fileTools/ripgrep.d.ts +20 -0
- package/dist/plugins/fileTools/textEdit.d.ts +67 -0
- package/dist/plugins/fileTools/tools.d.ts +6 -0
- package/dist/plugins/historyRecall/history.d.ts +9 -0
- package/dist/plugins/historyRecall/index.d.ts +31 -0
- package/dist/plugins/historyRecall/index.js +1 -0
- package/dist/plugins/historyRecall/render.d.ts +34 -0
- package/dist/plugins/historyRecall/tools.d.ts +4 -0
- package/dist/plugins/mcp/catalog.d.ts +36 -0
- package/dist/plugins/mcp/config.d.ts +63 -0
- package/dist/plugins/mcp/connection.d.ts +53 -0
- package/dist/plugins/mcp/errors.d.ts +32 -0
- package/dist/plugins/mcp/index.d.ts +33 -0
- package/dist/plugins/mcp/index.js +5 -0
- package/dist/plugins/mcp/mount.d.ts +98 -0
- package/dist/plugins/mcp/names.d.ts +25 -0
- package/dist/plugins/mcp/render.d.ts +29 -0
- package/dist/plugins/mcp/slots.d.ts +15 -0
- package/dist/plugins/mcp/stdio.d.ts +49 -0
- package/dist/plugins/mcp/tools.d.ts +41 -0
- package/dist/plugins/mcp/version.d.ts +2 -0
- package/dist/plugins/routeNotice.d.ts +22 -0
- package/dist/plugins/routeNotice.js +1 -0
- package/dist/plugins/sandbox/absent.d.ts +33 -0
- package/dist/plugins/sandbox/client.d.ts +39 -0
- package/dist/plugins/sandbox/files.d.ts +28 -0
- package/dist/plugins/sandbox/index.d.ts +52 -0
- package/dist/plugins/sandbox/index.js +4 -0
- package/dist/plugins/sandbox/mode.d.ts +57 -0
- package/dist/plugins/sandbox/policy.d.ts +163 -0
- package/dist/plugins/sandbox/protocol.d.ts +107 -0
- package/dist/plugins/sandbox/service.d.ts +153 -0
- package/dist/plugins/sandbox/worker.d.ts +12 -0
- package/dist/plugins/sandbox/worker.js +1 -0
- package/dist/plugins/schedules/index.d.ts +21 -0
- package/dist/plugins/schedules/index.js +5 -0
- package/dist/plugins/schedules/record.d.ts +396 -0
- package/dist/plugins/schedules/service.d.ts +120 -0
- package/dist/plugins/schedules/time.d.ts +26 -0
- package/dist/plugins/schedules/tools.d.ts +6 -0
- package/dist/plugins/skills/discovery.d.ts +83 -0
- package/dist/plugins/skills/index.d.ts +31 -0
- package/dist/plugins/skills/index.js +1 -0
- package/dist/plugins/skills/tools.d.ts +11 -0
- package/dist/plugins/subAgents/availableRoutes.d.ts +53 -0
- package/dist/plugins/subAgents/index.d.ts +67 -0
- package/dist/plugins/subAgents/index.js +1 -0
- package/dist/plugins/subAgents/tools.d.ts +67 -0
- package/dist/plugins/threadDirs.d.ts +36 -0
- package/dist/plugins/threadDirs.js +1 -0
- package/dist/plugins/toolPolicy/index.d.ts +61 -0
- package/dist/plugins/toolPolicy/index.js +1 -0
- package/dist/plugins/truncateToolOutput.d.ts +30 -0
- package/dist/plugins/truncateToolOutput.js +6 -0
- package/dist/plugins/usage/index.d.ts +26 -0
- package/dist/plugins/usage/index.js +1 -0
- package/dist/plugins/usage/tracker.d.ts +34 -0
- package/dist/plugins/verify/index.d.ts +27 -0
- package/dist/plugins/verify/index.js +6 -0
- package/dist/plugins/verify/judgement.d.ts +16 -0
- package/dist/plugins/verify/record.d.ts +382 -0
- package/dist/plugins/verify/service.d.ts +93 -0
- package/dist/plugins/verify/state.d.ts +58 -0
- package/dist/plugins/webTools/html.d.ts +23 -0
- package/dist/plugins/webTools/index.d.ts +34 -0
- package/dist/plugins/webTools/index.js +1 -0
- package/dist/plugins/webTools/network.d.ts +23 -0
- package/dist/plugins/webTools/web.d.ts +32 -0
- package/dist/plugins/workflows/assignment.d.ts +20 -0
- package/dist/plugins/workflows/cleanup.d.ts +38 -0
- package/dist/plugins/workflows/definition.d.ts +184 -0
- package/dist/plugins/workflows/entryPlan.d.ts +95 -0
- package/dist/plugins/workflows/hostBindings.d.ts +146 -0
- package/dist/plugins/workflows/index.d.ts +28 -0
- package/dist/plugins/workflows/index.js +11 -0
- package/dist/plugins/workflows/observations.d.ts +81 -0
- package/dist/plugins/workflows/participantModels.d.ts +28 -0
- package/dist/plugins/workflows/participants.d.ts +143 -0
- package/dist/plugins/workflows/policy.d.ts +112 -0
- package/dist/plugins/workflows/record.d.ts +2849 -0
- package/dist/plugins/workflows/routing.d.ts +116 -0
- package/dist/plugins/workflows/schema.d.ts +26 -0
- package/dist/plugins/workflows/service.d.ts +477 -0
- package/dist/plugins/workflows/state.d.ts +373 -0
- package/dist/plugins/workflows/stopCheck.d.ts +13 -0
- package/dist/plugins/workflows/tools.d.ts +13 -0
- package/dist/plugins/workflows/view.d.ts +103 -0
- package/dist/plugins/workflows/workStatus.d.ts +21 -0
- package/dist/plugins/workspaceNotice.d.ts +36 -0
- package/dist/plugins/workspaceNotice.js +1 -0
- package/dist/providers/anthropic.d.ts +178 -0
- package/dist/providers/anthropicMessages.d.ts +66 -0
- package/dist/providers/codex.d.ts +71 -0
- package/dist/providers/codexAuth.d.ts +116 -0
- package/dist/providers/deepseek.d.ts +59 -0
- package/dist/providers/failure.d.ts +23 -0
- package/dist/providers/gateway.d.ts +24 -0
- package/dist/providers/index.d.ts +18 -0
- package/dist/providers/index.js +6 -0
- package/dist/providers/openaiChat.d.ts +73 -0
- package/dist/providers/openaiResponses.d.ts +109 -0
- package/dist/providers/opencodeCopilot.d.ts +23 -0
- package/dist/providers/opencodeGo.d.ts +109 -0
- package/dist/providers/shared.d.ts +112 -0
- package/dist/providers/stream.d.ts +156 -0
- package/dist/records/index.d.ts +13 -0
- package/dist/records/index.js +1 -0
- package/dist/records/journal.d.ts +2968 -0
- package/dist/records/toolResult.d.ts +65 -0
- package/dist/services/agents.d.ts +62 -0
- package/dist/services/catalogContributions.d.ts +73 -0
- package/dist/services/confinement/files.d.ts +118 -0
- package/dist/services/confinement/service.d.ts +219 -0
- package/dist/services/core.d.ts +28 -0
- package/dist/services/extensionEvents.d.ts +181 -0
- package/dist/services/journal.d.ts +26 -0
- package/dist/services/llm.d.ts +82 -0
- package/dist/services/modes.d.ts +65 -0
- package/dist/services/plugins.d.ts +34 -0
- package/dist/services/presets/definition.d.ts +154 -0
- package/dist/services/presets/installations.d.ts +139 -0
- package/dist/services/prompts.d.ts +85 -0
- package/dist/services/threads/activation.d.ts +100 -0
- package/dist/services/threads/admission.d.ts +174 -0
- package/dist/services/threads/birth.d.ts +219 -0
- package/dist/services/threads/index.d.ts +14 -0
- package/dist/services/threads/runEvents.d.ts +79 -0
- package/dist/services/threads/runOwner.d.ts +368 -0
- package/dist/services/threads/service.d.ts +450 -0
- package/dist/services/threads/thread.d.ts +268 -0
- package/dist/services/threads/view.d.ts +93 -0
- package/dist/services/tools.d.ts +118 -0
- package/dist/state/birth.d.ts +62 -0
- package/dist/state/chain.d.ts +46 -0
- package/dist/state/confirmations.d.ts +64 -0
- package/dist/state/continuation.d.ts +167 -0
- package/dist/state/decide.d.ts +72 -0
- package/dist/state/dispatches.d.ts +54 -0
- package/dist/state/errors.d.ts +26 -0
- package/dist/state/forks.d.ts +61 -0
- package/dist/state/holds.d.ts +104 -0
- package/dist/state/inbox.d.ts +188 -0
- package/dist/state/index.d.ts +31 -0
- package/dist/state/inputs.d.ts +58 -0
- package/dist/state/installations.d.ts +28 -0
- package/dist/state/limits.d.ts +14 -0
- package/dist/state/prompt.d.ts +13 -0
- package/dist/state/recovery.d.ts +7 -0
- package/dist/state/replace.d.ts +33 -0
- package/dist/state/requests.d.ts +129 -0
- package/dist/state/route.d.ts +61 -0
- package/dist/state/summary.d.ts +16 -0
- package/dist/state/surface.d.ts +153 -0
- package/dist/state/surfaceRead.d.ts +20 -0
- package/dist/state/thread.d.ts +73 -0
- package/dist/state/turns.d.ts +87 -0
- package/dist/state/waits.d.ts +38 -0
- package/dist/state/wake.d.ts +32 -0
- package/dist/stores/durableObject.d.ts +23 -0
- package/dist/stores/durableObject.js +1 -0
- package/dist/stores/durableObjectConnection.d.ts +27 -0
- package/dist/stores/memory.d.ts +29 -0
- package/dist/stores/sql.d.ts +59 -0
- package/dist/stores/sqlite.d.ts +31 -0
- package/dist/stores/sqlite.js +1 -0
- package/dist/sys/environment.d.ts +42 -0
- package/dist/sys/git.d.ts +47 -0
- package/dist/sys/paths.d.ts +9 -0
- package/dist/sys/spawn.d.ts +186 -0
- package/dist/testing/clock.d.ts +17 -0
- package/dist/testing/fakeLlm.d.ts +76 -0
- package/dist/testing/fedLlm.d.ts +34 -0
- package/dist/testing/helpers.d.ts +362 -0
- package/dist/testing/index.d.ts +13 -0
- package/dist/testing/index.js +1 -0
- package/dist/testing/processes.d.ts +13 -0
- package/dist/testing/settlement.d.ts +6 -0
- package/dist/testing/tmpDirs.d.ts +17 -0
- package/dist/util/async.d.ts +8 -0
- package/dist/util/diff.d.ts +25 -0
- package/dist/util/dispatch.d.ts +8 -0
- package/dist/util/errors.d.ts +28 -0
- package/dist/util/foldState.d.ts +17 -0
- package/dist/util/freeze.d.ts +2 -0
- package/dist/util/ids.d.ts +2 -0
- package/dist/util/json.d.ts +37 -0
- package/dist/util/jsonSchema.d.ts +7 -0
- package/dist/util/log.d.ts +6 -0
- package/dist/util/retries.d.ts +25 -0
- package/dist/util/text.d.ts +21 -0
- package/dist/util/timers.d.ts +43 -0
- package/package.json +183 -3
|
@@ -0,0 +1,2849 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { ToolResult } from '../../records/toolResult.js';
|
|
3
|
+
import { JsonValueSchema, type DeepReadonly } from '../../util/json.js';
|
|
4
|
+
import type { CanonicalDefinition, WorkflowDefinition } from './definition.js';
|
|
5
|
+
/**
|
|
6
|
+
* The constraint owner a workflow's root requires (`requires` in its creation): the root is held
|
|
7
|
+
* until this plugin is mounted and has repaired what a crash left, so nothing runs it without the
|
|
8
|
+
* workflow's authority, and no follow-up a crash missed is skipped.
|
|
9
|
+
*/
|
|
10
|
+
export declare const WORKFLOWS_OWNER = "lagent:workflows";
|
|
11
|
+
/** Whether a thread was created as a workflow's root: what every reader of its instance checks first. */
|
|
12
|
+
export declare const requiresWorkflows: (summary: {
|
|
13
|
+
readonly requires: readonly string[];
|
|
14
|
+
}) => boolean;
|
|
15
|
+
/** The one protocol tool: its result, concluding the turn, is a candidate answer for an assignment. */
|
|
16
|
+
export declare const SUBMIT_TOOL = "submit_workflow_output";
|
|
17
|
+
/**
|
|
18
|
+
* What an input of an attempt was bound to at entry: the instance's input, one accepted result
|
|
19
|
+
* revision (one participant's output in it, or the whole result) with the decision it carried then,
|
|
20
|
+
* or evidence a provider acquired, whose value the entry records beside it. `null` in its place is
|
|
21
|
+
* an optional binding with nothing to bind.
|
|
22
|
+
*/
|
|
23
|
+
declare const CitationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
24
|
+
kind: z.ZodLiteral<"input">;
|
|
25
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
26
|
+
kind: z.ZodLiteral<"evidence">;
|
|
27
|
+
provider: z.ZodString;
|
|
28
|
+
immutable: z.ZodBoolean;
|
|
29
|
+
detail: z.ZodJSONSchema;
|
|
30
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
31
|
+
kind: z.ZodLiteral<"result">;
|
|
32
|
+
result: z.ZodString;
|
|
33
|
+
participant: z.ZodNullable<z.ZodString>;
|
|
34
|
+
decision: z.ZodNullable<z.ZodString>;
|
|
35
|
+
mode: z.ZodEnum<{
|
|
36
|
+
current: "current";
|
|
37
|
+
historical: "historical";
|
|
38
|
+
}>;
|
|
39
|
+
}, z.core.$strict>], "kind">;
|
|
40
|
+
export type Citation = z.output<typeof CitationSchema>;
|
|
41
|
+
/** A citation as a public result hands it out: a copy, since the recorded one is the fold's. */
|
|
42
|
+
export declare const copyCitation: (citation: DeepReadonly<Citation> | null) => Citation | null;
|
|
43
|
+
/**
|
|
44
|
+
* What an instance runs on besides its definition, resolved and pinned at its opening: each
|
|
45
|
+
* participant's configuration, `null` for the conversation participant, which runs on the
|
|
46
|
+
* conversation's own, and complete for an isolated one (agent, route, environment and defining
|
|
47
|
+
* installations, exactly as its conversation is created on them); each check provider's pin, by
|
|
48
|
+
* the participant whose assignments list it; and each evidence provider's pin.
|
|
49
|
+
*/
|
|
50
|
+
declare const PinsSchema: z.ZodObject<{
|
|
51
|
+
participants: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
52
|
+
configuration: z.ZodNullable<z.ZodObject<{
|
|
53
|
+
agent: z.ZodString;
|
|
54
|
+
route: z.ZodObject<{
|
|
55
|
+
provider: z.ZodString;
|
|
56
|
+
model: z.ZodString;
|
|
57
|
+
thinking_effort: z.ZodNullable<z.ZodEnum<{
|
|
58
|
+
low: "low";
|
|
59
|
+
high: "high";
|
|
60
|
+
none: "none";
|
|
61
|
+
medium: "medium";
|
|
62
|
+
max: "max";
|
|
63
|
+
}>>;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
environment: z.ZodObject<{
|
|
66
|
+
cwd: z.ZodString;
|
|
67
|
+
}, z.core.$strip>;
|
|
68
|
+
installations: z.ZodArray<z.ZodObject<{
|
|
69
|
+
installation_id: z.ZodString;
|
|
70
|
+
preset_id: z.ZodString;
|
|
71
|
+
config: z.ZodJSONSchema;
|
|
72
|
+
lifetime: z.ZodEnum<{
|
|
73
|
+
defining: "defining";
|
|
74
|
+
configurable: "configurable";
|
|
75
|
+
}>;
|
|
76
|
+
}, z.core.$strict>>;
|
|
77
|
+
}, z.core.$strict>>;
|
|
78
|
+
checks: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
79
|
+
config: z.ZodJSONSchema;
|
|
80
|
+
}, z.core.$strict>>;
|
|
81
|
+
}, z.core.$strict>>;
|
|
82
|
+
evidence: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
83
|
+
config: z.ZodJSONSchema;
|
|
84
|
+
}, z.core.$strict>>;
|
|
85
|
+
}, z.core.$strict>;
|
|
86
|
+
export type Pins = z.output<typeof PinsSchema>;
|
|
87
|
+
export type ParticipantPin = Pins['participants'][string];
|
|
88
|
+
/**
|
|
89
|
+
* One assignment an entry opens, by where it runs. The conversation participant's runs on the root
|
|
90
|
+
* and is activated by the claim of a root input: the host's first, or its transition's scheduling
|
|
91
|
+
* input. An isolated participant's runs as one delegation task on its child, on the participant
|
|
92
|
+
* generation it was pinned to; its activation is that task's input, whose id is the task's. What
|
|
93
|
+
* the entry records of it (child, lifetime, generation, checks) is its contract while it is open:
|
|
94
|
+
* an edit of the definition to those applies from the next entry.
|
|
95
|
+
*/
|
|
96
|
+
declare const AssignmentEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
97
|
+
context: z.ZodLiteral<"conversation">;
|
|
98
|
+
id: z.ZodString;
|
|
99
|
+
participant: z.ZodString;
|
|
100
|
+
activation: z.ZodString;
|
|
101
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
102
|
+
context: z.ZodLiteral<"isolated">;
|
|
103
|
+
id: z.ZodString;
|
|
104
|
+
participant: z.ZodString;
|
|
105
|
+
thread: z.ZodString;
|
|
106
|
+
task: z.ZodString;
|
|
107
|
+
generation: z.ZodNumber;
|
|
108
|
+
lifetime: z.ZodEnum<{
|
|
109
|
+
instance: "instance";
|
|
110
|
+
attempt: "attempt";
|
|
111
|
+
}>;
|
|
112
|
+
checks: z.ZodArray<z.ZodString>;
|
|
113
|
+
}, z.core.$strict>], "context">;
|
|
114
|
+
export type AssignmentEntry = z.output<typeof AssignmentEntrySchema>;
|
|
115
|
+
/**
|
|
116
|
+
* What an isolated participant's child shows of one task: it `accepted` a submission (the child's
|
|
117
|
+
* `tool/result` row) at a completed ending (its `turn/end` row), carrying the submitted output; or
|
|
118
|
+
* it `ended` without that, as delegations settled the task (failed, stopped, or completed with a
|
|
119
|
+
* reply that submitted nothing), with what delegations says of it, the task's latest submission,
|
|
120
|
+
* and its latest prose as a partial report, both unaccepted; or, beside a sibling that ended, it is
|
|
121
|
+
* still `unfinished`, with its latest submission and prose as of then, unaccepted too. Or the task
|
|
122
|
+
* was never opened: delegations `refused` its start for good, for this child as asked (a
|
|
123
|
+
* conversation it will not continue, say), which ends the assignment as an ending does.
|
|
124
|
+
*/
|
|
125
|
+
declare const ObservedOutcomeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
126
|
+
kind: z.ZodLiteral<"accepted">;
|
|
127
|
+
submission: z.ZodNumber;
|
|
128
|
+
ending: z.ZodNumber;
|
|
129
|
+
output: z.ZodJSONSchema;
|
|
130
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
131
|
+
kind: z.ZodLiteral<"ended">;
|
|
132
|
+
settlement: z.ZodEnum<{
|
|
133
|
+
completed: "completed";
|
|
134
|
+
failed: "failed";
|
|
135
|
+
stopped: "stopped";
|
|
136
|
+
}>;
|
|
137
|
+
detail: z.ZodString;
|
|
138
|
+
candidate: z.ZodNullable<z.ZodObject<{
|
|
139
|
+
submission: z.ZodNumber;
|
|
140
|
+
output: z.ZodJSONSchema;
|
|
141
|
+
}, z.core.$strict>>;
|
|
142
|
+
report: z.ZodNullable<z.ZodString>;
|
|
143
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
144
|
+
kind: z.ZodLiteral<"refused">;
|
|
145
|
+
detail: z.ZodString;
|
|
146
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
147
|
+
kind: z.ZodLiteral<"unfinished">;
|
|
148
|
+
candidate: z.ZodNullable<z.ZodObject<{
|
|
149
|
+
submission: z.ZodNumber;
|
|
150
|
+
output: z.ZodJSONSchema;
|
|
151
|
+
}, z.core.$strict>>;
|
|
152
|
+
report: z.ZodNullable<z.ZodString>;
|
|
153
|
+
}, z.core.$strict>], "kind">;
|
|
154
|
+
export type ObservedOutcome = z.output<typeof ObservedOutcomeSchema>;
|
|
155
|
+
/** One task's facts as an observation carries them: the assignment, and the child, task and generation they are from. */
|
|
156
|
+
declare const ObservationSchema: z.ZodObject<{
|
|
157
|
+
assignment: z.ZodString;
|
|
158
|
+
thread: z.ZodString;
|
|
159
|
+
task: z.ZodString;
|
|
160
|
+
generation: z.ZodNumber;
|
|
161
|
+
outcome: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
162
|
+
kind: z.ZodLiteral<"accepted">;
|
|
163
|
+
submission: z.ZodNumber;
|
|
164
|
+
ending: z.ZodNumber;
|
|
165
|
+
output: z.ZodJSONSchema;
|
|
166
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
167
|
+
kind: z.ZodLiteral<"ended">;
|
|
168
|
+
settlement: z.ZodEnum<{
|
|
169
|
+
completed: "completed";
|
|
170
|
+
failed: "failed";
|
|
171
|
+
stopped: "stopped";
|
|
172
|
+
}>;
|
|
173
|
+
detail: z.ZodString;
|
|
174
|
+
candidate: z.ZodNullable<z.ZodObject<{
|
|
175
|
+
submission: z.ZodNumber;
|
|
176
|
+
output: z.ZodJSONSchema;
|
|
177
|
+
}, z.core.$strict>>;
|
|
178
|
+
report: z.ZodNullable<z.ZodString>;
|
|
179
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
180
|
+
kind: z.ZodLiteral<"refused">;
|
|
181
|
+
detail: z.ZodString;
|
|
182
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
183
|
+
kind: z.ZodLiteral<"unfinished">;
|
|
184
|
+
candidate: z.ZodNullable<z.ZodObject<{
|
|
185
|
+
submission: z.ZodNumber;
|
|
186
|
+
output: z.ZodJSONSchema;
|
|
187
|
+
}, z.core.$strict>>;
|
|
188
|
+
report: z.ZodNullable<z.ZodString>;
|
|
189
|
+
}, z.core.$strict>], "kind">;
|
|
190
|
+
}, z.core.$strict>;
|
|
191
|
+
export type Observation = z.output<typeof ObservationSchema>;
|
|
192
|
+
/** What made a transition: the opening, an accepted result routed automatically, or a host decision. */
|
|
193
|
+
declare const CauseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
194
|
+
kind: z.ZodLiteral<"opening">;
|
|
195
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
196
|
+
kind: z.ZodLiteral<"routed">;
|
|
197
|
+
result: z.ZodString;
|
|
198
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
199
|
+
kind: z.ZodLiteral<"decision">;
|
|
200
|
+
decision: z.ZodString;
|
|
201
|
+
}, z.core.$strict>], "kind">;
|
|
202
|
+
export type TransitionCause = z.output<typeof CauseSchema>;
|
|
203
|
+
/**
|
|
204
|
+
* What the journal keeps of a workflow instance, on its root thread, as `ext` rows of this plugin.
|
|
205
|
+
* Everything else is derived from these and core's rows: activation from the claim of an
|
|
206
|
+
* assignment's activation input, acceptance from the turn ending that accepts its submission,
|
|
207
|
+
* results, staleness, counts, routing and pending decisions from all of them. No row records a
|
|
208
|
+
* pending decision or an acceptance.
|
|
209
|
+
*
|
|
210
|
+
* - `opened` rides in the root's creation write: the definition's id, its readable canonical copy
|
|
211
|
+
* as started, for audit and display only (execution always takes the definition registered under
|
|
212
|
+
* the id now), the instance's input, the host's first input id and the pins of what it runs on.
|
|
213
|
+
* - `entered` opens an attempt, atomically: what it retires, every input bound with its citation,
|
|
214
|
+
* the value of each evidence input, and its assignments, each with where it runs and what
|
|
215
|
+
* activates it. One row, so a failed entry writes nothing.
|
|
216
|
+
* - `observed` brings isolated participants' facts to the root, whose fold cannot read their
|
|
217
|
+
* children's rows: a task accepted a submission at a completed ending, or settled without one,
|
|
218
|
+
* or its start was refused for good, and, beside one that ended, what each unfinished sibling
|
|
219
|
+
* shows then. Evidence carried across,
|
|
220
|
+
* recomputed from the retained children inside the root's write, never an acceptance of its own;
|
|
221
|
+
* one acceptance or ending per task. One row per write, so a recovery opened by it sees all of it.
|
|
222
|
+
* - `stopped` is a person's Stop of the instance's current attempt, written in the root's cancel
|
|
223
|
+
* write beside delegations' stop of its tasks: the attempt and what each open isolated
|
|
224
|
+
* assignment's child showed inside that write, recomputed from the retained child. An acceptance
|
|
225
|
+
* it carries happened before the Stop and stands; any other open isolated assignment is
|
|
226
|
+
* superseded and the attempt recovers (cause `stop`), the root's own assignment with it. Its row is
|
|
227
|
+
* the Stop's boundary: a transition owed by a result ready before it, entering isolated work after
|
|
228
|
+
* it, recovers at its entry.
|
|
229
|
+
* - `completed` ends the instance through a `$complete` edge.
|
|
230
|
+
* - `decided` records a host decision on a pending gate, exhaustion or recovery, with the persistent
|
|
231
|
+
* participants it restarts; it shares its write with the transition it selects.
|
|
232
|
+
* - `cancel-requested` admits a cancellation, closing assignment authority; `cancelled` is its
|
|
233
|
+
* terminal row, written once cleanup is established.
|
|
234
|
+
*/
|
|
235
|
+
declare const InstanceRowSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
236
|
+
op: z.ZodLiteral<"opened">;
|
|
237
|
+
definition: z.ZodString;
|
|
238
|
+
canonical: z.ZodType<CanonicalDefinition>;
|
|
239
|
+
input: z.ZodJSONSchema;
|
|
240
|
+
input_id: z.ZodString;
|
|
241
|
+
pins: z.ZodObject<{
|
|
242
|
+
participants: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
243
|
+
configuration: z.ZodNullable<z.ZodObject<{
|
|
244
|
+
agent: z.ZodString;
|
|
245
|
+
route: z.ZodObject<{
|
|
246
|
+
provider: z.ZodString;
|
|
247
|
+
model: z.ZodString;
|
|
248
|
+
thinking_effort: z.ZodNullable<z.ZodEnum<{
|
|
249
|
+
low: "low";
|
|
250
|
+
high: "high";
|
|
251
|
+
none: "none";
|
|
252
|
+
medium: "medium";
|
|
253
|
+
max: "max";
|
|
254
|
+
}>>;
|
|
255
|
+
}, z.core.$strip>;
|
|
256
|
+
environment: z.ZodObject<{
|
|
257
|
+
cwd: z.ZodString;
|
|
258
|
+
}, z.core.$strip>;
|
|
259
|
+
installations: z.ZodArray<z.ZodObject<{
|
|
260
|
+
installation_id: z.ZodString;
|
|
261
|
+
preset_id: z.ZodString;
|
|
262
|
+
config: z.ZodJSONSchema;
|
|
263
|
+
lifetime: z.ZodEnum<{
|
|
264
|
+
defining: "defining";
|
|
265
|
+
configurable: "configurable";
|
|
266
|
+
}>;
|
|
267
|
+
}, z.core.$strict>>;
|
|
268
|
+
}, z.core.$strict>>;
|
|
269
|
+
checks: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
270
|
+
config: z.ZodJSONSchema;
|
|
271
|
+
}, z.core.$strict>>;
|
|
272
|
+
}, z.core.$strict>>;
|
|
273
|
+
evidence: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
274
|
+
config: z.ZodJSONSchema;
|
|
275
|
+
}, z.core.$strict>>;
|
|
276
|
+
}, z.core.$strict>;
|
|
277
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
278
|
+
op: z.ZodLiteral<"entered">;
|
|
279
|
+
transition: z.ZodString;
|
|
280
|
+
cause: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
281
|
+
kind: z.ZodLiteral<"opening">;
|
|
282
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
283
|
+
kind: z.ZodLiteral<"routed">;
|
|
284
|
+
result: z.ZodString;
|
|
285
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
286
|
+
kind: z.ZodLiteral<"decision">;
|
|
287
|
+
decision: z.ZodString;
|
|
288
|
+
}, z.core.$strict>], "kind">;
|
|
289
|
+
step: z.ZodString;
|
|
290
|
+
attempt: z.ZodString;
|
|
291
|
+
ordinal: z.ZodNumber;
|
|
292
|
+
retires: z.ZodArray<z.ZodString>;
|
|
293
|
+
inputs: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
294
|
+
kind: z.ZodLiteral<"input">;
|
|
295
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
296
|
+
kind: z.ZodLiteral<"evidence">;
|
|
297
|
+
provider: z.ZodString;
|
|
298
|
+
immutable: z.ZodBoolean;
|
|
299
|
+
detail: z.ZodJSONSchema;
|
|
300
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
301
|
+
kind: z.ZodLiteral<"result">;
|
|
302
|
+
result: z.ZodString;
|
|
303
|
+
participant: z.ZodNullable<z.ZodString>;
|
|
304
|
+
decision: z.ZodNullable<z.ZodString>;
|
|
305
|
+
mode: z.ZodEnum<{
|
|
306
|
+
current: "current";
|
|
307
|
+
historical: "historical";
|
|
308
|
+
}>;
|
|
309
|
+
}, z.core.$strict>], "kind">>>;
|
|
310
|
+
evidence: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
311
|
+
assignments: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
312
|
+
context: z.ZodLiteral<"conversation">;
|
|
313
|
+
id: z.ZodString;
|
|
314
|
+
participant: z.ZodString;
|
|
315
|
+
activation: z.ZodString;
|
|
316
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
317
|
+
context: z.ZodLiteral<"isolated">;
|
|
318
|
+
id: z.ZodString;
|
|
319
|
+
participant: z.ZodString;
|
|
320
|
+
thread: z.ZodString;
|
|
321
|
+
task: z.ZodString;
|
|
322
|
+
generation: z.ZodNumber;
|
|
323
|
+
lifetime: z.ZodEnum<{
|
|
324
|
+
instance: "instance";
|
|
325
|
+
attempt: "attempt";
|
|
326
|
+
}>;
|
|
327
|
+
checks: z.ZodArray<z.ZodString>;
|
|
328
|
+
}, z.core.$strict>], "context">>;
|
|
329
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
330
|
+
op: z.ZodLiteral<"observed">;
|
|
331
|
+
observations: z.ZodArray<z.ZodObject<{
|
|
332
|
+
assignment: z.ZodString;
|
|
333
|
+
thread: z.ZodString;
|
|
334
|
+
task: z.ZodString;
|
|
335
|
+
generation: z.ZodNumber;
|
|
336
|
+
outcome: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
337
|
+
kind: z.ZodLiteral<"accepted">;
|
|
338
|
+
submission: z.ZodNumber;
|
|
339
|
+
ending: z.ZodNumber;
|
|
340
|
+
output: z.ZodJSONSchema;
|
|
341
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
342
|
+
kind: z.ZodLiteral<"ended">;
|
|
343
|
+
settlement: z.ZodEnum<{
|
|
344
|
+
completed: "completed";
|
|
345
|
+
failed: "failed";
|
|
346
|
+
stopped: "stopped";
|
|
347
|
+
}>;
|
|
348
|
+
detail: z.ZodString;
|
|
349
|
+
candidate: z.ZodNullable<z.ZodObject<{
|
|
350
|
+
submission: z.ZodNumber;
|
|
351
|
+
output: z.ZodJSONSchema;
|
|
352
|
+
}, z.core.$strict>>;
|
|
353
|
+
report: z.ZodNullable<z.ZodString>;
|
|
354
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
355
|
+
kind: z.ZodLiteral<"refused">;
|
|
356
|
+
detail: z.ZodString;
|
|
357
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
358
|
+
kind: z.ZodLiteral<"unfinished">;
|
|
359
|
+
candidate: z.ZodNullable<z.ZodObject<{
|
|
360
|
+
submission: z.ZodNumber;
|
|
361
|
+
output: z.ZodJSONSchema;
|
|
362
|
+
}, z.core.$strict>>;
|
|
363
|
+
report: z.ZodNullable<z.ZodString>;
|
|
364
|
+
}, z.core.$strict>], "kind">;
|
|
365
|
+
}, z.core.$strict>>;
|
|
366
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
367
|
+
op: z.ZodLiteral<"stopped">;
|
|
368
|
+
attempt: z.ZodString;
|
|
369
|
+
reason: z.ZodString;
|
|
370
|
+
observations: z.ZodArray<z.ZodObject<{
|
|
371
|
+
assignment: z.ZodString;
|
|
372
|
+
thread: z.ZodString;
|
|
373
|
+
task: z.ZodString;
|
|
374
|
+
generation: z.ZodNumber;
|
|
375
|
+
outcome: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
376
|
+
kind: z.ZodLiteral<"accepted">;
|
|
377
|
+
submission: z.ZodNumber;
|
|
378
|
+
ending: z.ZodNumber;
|
|
379
|
+
output: z.ZodJSONSchema;
|
|
380
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
381
|
+
kind: z.ZodLiteral<"ended">;
|
|
382
|
+
settlement: z.ZodEnum<{
|
|
383
|
+
completed: "completed";
|
|
384
|
+
failed: "failed";
|
|
385
|
+
stopped: "stopped";
|
|
386
|
+
}>;
|
|
387
|
+
detail: z.ZodString;
|
|
388
|
+
candidate: z.ZodNullable<z.ZodObject<{
|
|
389
|
+
submission: z.ZodNumber;
|
|
390
|
+
output: z.ZodJSONSchema;
|
|
391
|
+
}, z.core.$strict>>;
|
|
392
|
+
report: z.ZodNullable<z.ZodString>;
|
|
393
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
394
|
+
kind: z.ZodLiteral<"refused">;
|
|
395
|
+
detail: z.ZodString;
|
|
396
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
397
|
+
kind: z.ZodLiteral<"unfinished">;
|
|
398
|
+
candidate: z.ZodNullable<z.ZodObject<{
|
|
399
|
+
submission: z.ZodNumber;
|
|
400
|
+
output: z.ZodJSONSchema;
|
|
401
|
+
}, z.core.$strict>>;
|
|
402
|
+
report: z.ZodNullable<z.ZodString>;
|
|
403
|
+
}, z.core.$strict>], "kind">;
|
|
404
|
+
}, z.core.$strict>>;
|
|
405
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
406
|
+
op: z.ZodLiteral<"completed">;
|
|
407
|
+
transition: z.ZodString;
|
|
408
|
+
cause: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
409
|
+
kind: z.ZodLiteral<"opening">;
|
|
410
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
411
|
+
kind: z.ZodLiteral<"routed">;
|
|
412
|
+
result: z.ZodString;
|
|
413
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
414
|
+
kind: z.ZodLiteral<"decision">;
|
|
415
|
+
decision: z.ZodString;
|
|
416
|
+
}, z.core.$strict>], "kind">;
|
|
417
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
418
|
+
op: z.ZodLiteral<"decided">;
|
|
419
|
+
decision: z.ZodString;
|
|
420
|
+
operation_id: z.ZodString;
|
|
421
|
+
actor: z.ZodString;
|
|
422
|
+
attempt: z.ZodString;
|
|
423
|
+
reason: z.ZodEnum<{
|
|
424
|
+
gate: "gate";
|
|
425
|
+
exhaustion: "exhaustion";
|
|
426
|
+
recovery: "recovery";
|
|
427
|
+
}>;
|
|
428
|
+
result: z.ZodNullable<z.ZodString>;
|
|
429
|
+
verdict: z.ZodEnum<{
|
|
430
|
+
approve: "approve";
|
|
431
|
+
revise: "revise";
|
|
432
|
+
}>;
|
|
433
|
+
option: z.ZodNullable<z.ZodString>;
|
|
434
|
+
feedback: z.ZodNullable<z.ZodString>;
|
|
435
|
+
restart: z.ZodArray<z.ZodString>;
|
|
436
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
437
|
+
op: z.ZodLiteral<"cancel-requested">;
|
|
438
|
+
operation_id: z.ZodString;
|
|
439
|
+
actor: z.ZodString;
|
|
440
|
+
reason: z.ZodString;
|
|
441
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
442
|
+
op: z.ZodLiteral<"cancelled">;
|
|
443
|
+
operation_id: z.ZodString;
|
|
444
|
+
}, z.core.$strict>], "op">;
|
|
445
|
+
export type InstanceRow = z.output<typeof InstanceRowSchema>;
|
|
446
|
+
export type InstanceRowInput = z.input<typeof InstanceRowSchema>;
|
|
447
|
+
export type Opened = Extract<InstanceRow, {
|
|
448
|
+
op: 'opened';
|
|
449
|
+
}>;
|
|
450
|
+
export type Entered = Extract<InstanceRow, {
|
|
451
|
+
op: 'entered';
|
|
452
|
+
}>;
|
|
453
|
+
export type Decided = Extract<InstanceRow, {
|
|
454
|
+
op: 'decided';
|
|
455
|
+
}>;
|
|
456
|
+
/**
|
|
457
|
+
* Declared policy state: entering, observing, stopping, deciding, completing and cancelling change
|
|
458
|
+
* what a thread's workflow authority allows, so one landing while a call is authorized, on the root
|
|
459
|
+
* or on a thread under it, decides that call again.
|
|
460
|
+
*/
|
|
461
|
+
export declare const instanceRow: {
|
|
462
|
+
record: (value: {
|
|
463
|
+
op: "decided";
|
|
464
|
+
decision: string;
|
|
465
|
+
operation_id: string;
|
|
466
|
+
actor: string;
|
|
467
|
+
attempt: string;
|
|
468
|
+
reason: "gate" | "exhaustion" | "recovery";
|
|
469
|
+
result: string | null;
|
|
470
|
+
verdict: "approve" | "revise";
|
|
471
|
+
option: string | null;
|
|
472
|
+
feedback: string | null;
|
|
473
|
+
restart: string[];
|
|
474
|
+
} | {
|
|
475
|
+
op: "opened";
|
|
476
|
+
definition: string;
|
|
477
|
+
canonical: unknown;
|
|
478
|
+
input: z.core.util.JSONType;
|
|
479
|
+
input_id: string;
|
|
480
|
+
pins: {
|
|
481
|
+
participants: Record<string, {
|
|
482
|
+
configuration: {
|
|
483
|
+
agent: string;
|
|
484
|
+
route: {
|
|
485
|
+
provider: string;
|
|
486
|
+
model: string;
|
|
487
|
+
thinking_effort: "low" | "high" | "none" | "medium" | "max" | null;
|
|
488
|
+
};
|
|
489
|
+
environment: {
|
|
490
|
+
cwd: string;
|
|
491
|
+
};
|
|
492
|
+
installations: {
|
|
493
|
+
installation_id: string;
|
|
494
|
+
preset_id: string;
|
|
495
|
+
config: z.core.util.JSONType;
|
|
496
|
+
lifetime: "defining" | "configurable";
|
|
497
|
+
}[];
|
|
498
|
+
} | null;
|
|
499
|
+
checks: Record<string, {
|
|
500
|
+
config: z.core.util.JSONType;
|
|
501
|
+
}>;
|
|
502
|
+
}>;
|
|
503
|
+
evidence: Record<string, {
|
|
504
|
+
config: z.core.util.JSONType;
|
|
505
|
+
}>;
|
|
506
|
+
};
|
|
507
|
+
} | {
|
|
508
|
+
op: "entered";
|
|
509
|
+
transition: string;
|
|
510
|
+
cause: {
|
|
511
|
+
kind: "opening";
|
|
512
|
+
} | {
|
|
513
|
+
kind: "routed";
|
|
514
|
+
result: string;
|
|
515
|
+
} | {
|
|
516
|
+
kind: "decision";
|
|
517
|
+
decision: string;
|
|
518
|
+
};
|
|
519
|
+
step: string;
|
|
520
|
+
attempt: string;
|
|
521
|
+
ordinal: number;
|
|
522
|
+
retires: string[];
|
|
523
|
+
inputs: Record<string, {
|
|
524
|
+
kind: "input";
|
|
525
|
+
} | {
|
|
526
|
+
kind: "evidence";
|
|
527
|
+
provider: string;
|
|
528
|
+
immutable: boolean;
|
|
529
|
+
detail: z.core.util.JSONType;
|
|
530
|
+
} | {
|
|
531
|
+
kind: "result";
|
|
532
|
+
result: string;
|
|
533
|
+
participant: string | null;
|
|
534
|
+
decision: string | null;
|
|
535
|
+
mode: "current" | "historical";
|
|
536
|
+
} | null>;
|
|
537
|
+
evidence: Record<string, z.core.util.JSONType>;
|
|
538
|
+
assignments: ({
|
|
539
|
+
context: "conversation";
|
|
540
|
+
id: string;
|
|
541
|
+
participant: string;
|
|
542
|
+
activation: string;
|
|
543
|
+
} | {
|
|
544
|
+
context: "isolated";
|
|
545
|
+
id: string;
|
|
546
|
+
participant: string;
|
|
547
|
+
thread: string;
|
|
548
|
+
task: string;
|
|
549
|
+
generation: number;
|
|
550
|
+
lifetime: "instance" | "attempt";
|
|
551
|
+
checks: string[];
|
|
552
|
+
})[];
|
|
553
|
+
} | {
|
|
554
|
+
op: "observed";
|
|
555
|
+
observations: {
|
|
556
|
+
assignment: string;
|
|
557
|
+
thread: string;
|
|
558
|
+
task: string;
|
|
559
|
+
generation: number;
|
|
560
|
+
outcome: {
|
|
561
|
+
kind: "accepted";
|
|
562
|
+
submission: number;
|
|
563
|
+
ending: number;
|
|
564
|
+
output: z.core.util.JSONType;
|
|
565
|
+
} | {
|
|
566
|
+
kind: "ended";
|
|
567
|
+
settlement: "completed" | "failed" | "stopped";
|
|
568
|
+
detail: string;
|
|
569
|
+
candidate: {
|
|
570
|
+
submission: number;
|
|
571
|
+
output: z.core.util.JSONType;
|
|
572
|
+
} | null;
|
|
573
|
+
report: string | null;
|
|
574
|
+
} | {
|
|
575
|
+
kind: "refused";
|
|
576
|
+
detail: string;
|
|
577
|
+
} | {
|
|
578
|
+
kind: "unfinished";
|
|
579
|
+
candidate: {
|
|
580
|
+
submission: number;
|
|
581
|
+
output: z.core.util.JSONType;
|
|
582
|
+
} | null;
|
|
583
|
+
report: string | null;
|
|
584
|
+
};
|
|
585
|
+
}[];
|
|
586
|
+
} | {
|
|
587
|
+
op: "stopped";
|
|
588
|
+
attempt: string;
|
|
589
|
+
reason: string;
|
|
590
|
+
observations: {
|
|
591
|
+
assignment: string;
|
|
592
|
+
thread: string;
|
|
593
|
+
task: string;
|
|
594
|
+
generation: number;
|
|
595
|
+
outcome: {
|
|
596
|
+
kind: "accepted";
|
|
597
|
+
submission: number;
|
|
598
|
+
ending: number;
|
|
599
|
+
output: z.core.util.JSONType;
|
|
600
|
+
} | {
|
|
601
|
+
kind: "ended";
|
|
602
|
+
settlement: "completed" | "failed" | "stopped";
|
|
603
|
+
detail: string;
|
|
604
|
+
candidate: {
|
|
605
|
+
submission: number;
|
|
606
|
+
output: z.core.util.JSONType;
|
|
607
|
+
} | null;
|
|
608
|
+
report: string | null;
|
|
609
|
+
} | {
|
|
610
|
+
kind: "refused";
|
|
611
|
+
detail: string;
|
|
612
|
+
} | {
|
|
613
|
+
kind: "unfinished";
|
|
614
|
+
candidate: {
|
|
615
|
+
submission: number;
|
|
616
|
+
output: z.core.util.JSONType;
|
|
617
|
+
} | null;
|
|
618
|
+
report: string | null;
|
|
619
|
+
};
|
|
620
|
+
}[];
|
|
621
|
+
} | {
|
|
622
|
+
op: "completed";
|
|
623
|
+
transition: string;
|
|
624
|
+
cause: {
|
|
625
|
+
kind: "opening";
|
|
626
|
+
} | {
|
|
627
|
+
kind: "routed";
|
|
628
|
+
result: string;
|
|
629
|
+
} | {
|
|
630
|
+
kind: "decision";
|
|
631
|
+
decision: string;
|
|
632
|
+
};
|
|
633
|
+
} | {
|
|
634
|
+
op: "cancel-requested";
|
|
635
|
+
operation_id: string;
|
|
636
|
+
actor: string;
|
|
637
|
+
reason: string;
|
|
638
|
+
} | {
|
|
639
|
+
op: "cancelled";
|
|
640
|
+
operation_id: string;
|
|
641
|
+
}) => import("../../records/journal.js").ExtensionRecord;
|
|
642
|
+
parse: (value: {
|
|
643
|
+
op: "decided";
|
|
644
|
+
decision: string;
|
|
645
|
+
operation_id: string;
|
|
646
|
+
actor: string;
|
|
647
|
+
attempt: string;
|
|
648
|
+
reason: "gate" | "exhaustion" | "recovery";
|
|
649
|
+
result: string | null;
|
|
650
|
+
verdict: "approve" | "revise";
|
|
651
|
+
option: string | null;
|
|
652
|
+
feedback: string | null;
|
|
653
|
+
restart: string[];
|
|
654
|
+
} | {
|
|
655
|
+
op: "opened";
|
|
656
|
+
definition: string;
|
|
657
|
+
canonical: unknown;
|
|
658
|
+
input: z.core.util.JSONType;
|
|
659
|
+
input_id: string;
|
|
660
|
+
pins: {
|
|
661
|
+
participants: Record<string, {
|
|
662
|
+
configuration: {
|
|
663
|
+
agent: string;
|
|
664
|
+
route: {
|
|
665
|
+
provider: string;
|
|
666
|
+
model: string;
|
|
667
|
+
thinking_effort: "low" | "high" | "none" | "medium" | "max" | null;
|
|
668
|
+
};
|
|
669
|
+
environment: {
|
|
670
|
+
cwd: string;
|
|
671
|
+
};
|
|
672
|
+
installations: {
|
|
673
|
+
installation_id: string;
|
|
674
|
+
preset_id: string;
|
|
675
|
+
config: z.core.util.JSONType;
|
|
676
|
+
lifetime: "defining" | "configurable";
|
|
677
|
+
}[];
|
|
678
|
+
} | null;
|
|
679
|
+
checks: Record<string, {
|
|
680
|
+
config: z.core.util.JSONType;
|
|
681
|
+
}>;
|
|
682
|
+
}>;
|
|
683
|
+
evidence: Record<string, {
|
|
684
|
+
config: z.core.util.JSONType;
|
|
685
|
+
}>;
|
|
686
|
+
};
|
|
687
|
+
} | {
|
|
688
|
+
op: "entered";
|
|
689
|
+
transition: string;
|
|
690
|
+
cause: {
|
|
691
|
+
kind: "opening";
|
|
692
|
+
} | {
|
|
693
|
+
kind: "routed";
|
|
694
|
+
result: string;
|
|
695
|
+
} | {
|
|
696
|
+
kind: "decision";
|
|
697
|
+
decision: string;
|
|
698
|
+
};
|
|
699
|
+
step: string;
|
|
700
|
+
attempt: string;
|
|
701
|
+
ordinal: number;
|
|
702
|
+
retires: string[];
|
|
703
|
+
inputs: Record<string, {
|
|
704
|
+
kind: "input";
|
|
705
|
+
} | {
|
|
706
|
+
kind: "evidence";
|
|
707
|
+
provider: string;
|
|
708
|
+
immutable: boolean;
|
|
709
|
+
detail: z.core.util.JSONType;
|
|
710
|
+
} | {
|
|
711
|
+
kind: "result";
|
|
712
|
+
result: string;
|
|
713
|
+
participant: string | null;
|
|
714
|
+
decision: string | null;
|
|
715
|
+
mode: "current" | "historical";
|
|
716
|
+
} | null>;
|
|
717
|
+
evidence: Record<string, z.core.util.JSONType>;
|
|
718
|
+
assignments: ({
|
|
719
|
+
context: "conversation";
|
|
720
|
+
id: string;
|
|
721
|
+
participant: string;
|
|
722
|
+
activation: string;
|
|
723
|
+
} | {
|
|
724
|
+
context: "isolated";
|
|
725
|
+
id: string;
|
|
726
|
+
participant: string;
|
|
727
|
+
thread: string;
|
|
728
|
+
task: string;
|
|
729
|
+
generation: number;
|
|
730
|
+
lifetime: "instance" | "attempt";
|
|
731
|
+
checks: string[];
|
|
732
|
+
})[];
|
|
733
|
+
} | {
|
|
734
|
+
op: "observed";
|
|
735
|
+
observations: {
|
|
736
|
+
assignment: string;
|
|
737
|
+
thread: string;
|
|
738
|
+
task: string;
|
|
739
|
+
generation: number;
|
|
740
|
+
outcome: {
|
|
741
|
+
kind: "accepted";
|
|
742
|
+
submission: number;
|
|
743
|
+
ending: number;
|
|
744
|
+
output: z.core.util.JSONType;
|
|
745
|
+
} | {
|
|
746
|
+
kind: "ended";
|
|
747
|
+
settlement: "completed" | "failed" | "stopped";
|
|
748
|
+
detail: string;
|
|
749
|
+
candidate: {
|
|
750
|
+
submission: number;
|
|
751
|
+
output: z.core.util.JSONType;
|
|
752
|
+
} | null;
|
|
753
|
+
report: string | null;
|
|
754
|
+
} | {
|
|
755
|
+
kind: "refused";
|
|
756
|
+
detail: string;
|
|
757
|
+
} | {
|
|
758
|
+
kind: "unfinished";
|
|
759
|
+
candidate: {
|
|
760
|
+
submission: number;
|
|
761
|
+
output: z.core.util.JSONType;
|
|
762
|
+
} | null;
|
|
763
|
+
report: string | null;
|
|
764
|
+
};
|
|
765
|
+
}[];
|
|
766
|
+
} | {
|
|
767
|
+
op: "stopped";
|
|
768
|
+
attempt: string;
|
|
769
|
+
reason: string;
|
|
770
|
+
observations: {
|
|
771
|
+
assignment: string;
|
|
772
|
+
thread: string;
|
|
773
|
+
task: string;
|
|
774
|
+
generation: number;
|
|
775
|
+
outcome: {
|
|
776
|
+
kind: "accepted";
|
|
777
|
+
submission: number;
|
|
778
|
+
ending: number;
|
|
779
|
+
output: z.core.util.JSONType;
|
|
780
|
+
} | {
|
|
781
|
+
kind: "ended";
|
|
782
|
+
settlement: "completed" | "failed" | "stopped";
|
|
783
|
+
detail: string;
|
|
784
|
+
candidate: {
|
|
785
|
+
submission: number;
|
|
786
|
+
output: z.core.util.JSONType;
|
|
787
|
+
} | null;
|
|
788
|
+
report: string | null;
|
|
789
|
+
} | {
|
|
790
|
+
kind: "refused";
|
|
791
|
+
detail: string;
|
|
792
|
+
} | {
|
|
793
|
+
kind: "unfinished";
|
|
794
|
+
candidate: {
|
|
795
|
+
submission: number;
|
|
796
|
+
output: z.core.util.JSONType;
|
|
797
|
+
} | null;
|
|
798
|
+
report: string | null;
|
|
799
|
+
};
|
|
800
|
+
}[];
|
|
801
|
+
} | {
|
|
802
|
+
op: "completed";
|
|
803
|
+
transition: string;
|
|
804
|
+
cause: {
|
|
805
|
+
kind: "opening";
|
|
806
|
+
} | {
|
|
807
|
+
kind: "routed";
|
|
808
|
+
result: string;
|
|
809
|
+
} | {
|
|
810
|
+
kind: "decision";
|
|
811
|
+
decision: string;
|
|
812
|
+
};
|
|
813
|
+
} | {
|
|
814
|
+
op: "cancel-requested";
|
|
815
|
+
operation_id: string;
|
|
816
|
+
actor: string;
|
|
817
|
+
reason: string;
|
|
818
|
+
} | {
|
|
819
|
+
op: "cancelled";
|
|
820
|
+
operation_id: string;
|
|
821
|
+
}) => {
|
|
822
|
+
op: "decided";
|
|
823
|
+
decision: string;
|
|
824
|
+
operation_id: string;
|
|
825
|
+
actor: string;
|
|
826
|
+
attempt: string;
|
|
827
|
+
reason: "gate" | "exhaustion" | "recovery";
|
|
828
|
+
result: string | null;
|
|
829
|
+
verdict: "approve" | "revise";
|
|
830
|
+
option: string | null;
|
|
831
|
+
feedback: string | null;
|
|
832
|
+
restart: string[];
|
|
833
|
+
} | {
|
|
834
|
+
op: "opened";
|
|
835
|
+
definition: string;
|
|
836
|
+
canonical: CanonicalDefinition;
|
|
837
|
+
input: z.core.util.JSONType;
|
|
838
|
+
input_id: string;
|
|
839
|
+
pins: {
|
|
840
|
+
participants: Record<string, {
|
|
841
|
+
configuration: {
|
|
842
|
+
agent: string;
|
|
843
|
+
route: {
|
|
844
|
+
provider: string;
|
|
845
|
+
model: string;
|
|
846
|
+
thinking_effort: "low" | "high" | "none" | "medium" | "max" | null;
|
|
847
|
+
};
|
|
848
|
+
environment: {
|
|
849
|
+
cwd: string;
|
|
850
|
+
};
|
|
851
|
+
installations: {
|
|
852
|
+
installation_id: string;
|
|
853
|
+
preset_id: string;
|
|
854
|
+
config: z.core.util.JSONType;
|
|
855
|
+
lifetime: "defining" | "configurable";
|
|
856
|
+
}[];
|
|
857
|
+
} | null;
|
|
858
|
+
checks: Record<string, {
|
|
859
|
+
config: z.core.util.JSONType;
|
|
860
|
+
}>;
|
|
861
|
+
}>;
|
|
862
|
+
evidence: Record<string, {
|
|
863
|
+
config: z.core.util.JSONType;
|
|
864
|
+
}>;
|
|
865
|
+
};
|
|
866
|
+
} | {
|
|
867
|
+
op: "entered";
|
|
868
|
+
transition: string;
|
|
869
|
+
cause: {
|
|
870
|
+
kind: "opening";
|
|
871
|
+
} | {
|
|
872
|
+
kind: "routed";
|
|
873
|
+
result: string;
|
|
874
|
+
} | {
|
|
875
|
+
kind: "decision";
|
|
876
|
+
decision: string;
|
|
877
|
+
};
|
|
878
|
+
step: string;
|
|
879
|
+
attempt: string;
|
|
880
|
+
ordinal: number;
|
|
881
|
+
retires: string[];
|
|
882
|
+
inputs: Record<string, {
|
|
883
|
+
kind: "input";
|
|
884
|
+
} | {
|
|
885
|
+
kind: "evidence";
|
|
886
|
+
provider: string;
|
|
887
|
+
immutable: boolean;
|
|
888
|
+
detail: z.core.util.JSONType;
|
|
889
|
+
} | {
|
|
890
|
+
kind: "result";
|
|
891
|
+
result: string;
|
|
892
|
+
participant: string | null;
|
|
893
|
+
decision: string | null;
|
|
894
|
+
mode: "current" | "historical";
|
|
895
|
+
} | null>;
|
|
896
|
+
evidence: Record<string, z.core.util.JSONType>;
|
|
897
|
+
assignments: ({
|
|
898
|
+
context: "conversation";
|
|
899
|
+
id: string;
|
|
900
|
+
participant: string;
|
|
901
|
+
activation: string;
|
|
902
|
+
} | {
|
|
903
|
+
context: "isolated";
|
|
904
|
+
id: string;
|
|
905
|
+
participant: string;
|
|
906
|
+
thread: string;
|
|
907
|
+
task: string;
|
|
908
|
+
generation: number;
|
|
909
|
+
lifetime: "instance" | "attempt";
|
|
910
|
+
checks: string[];
|
|
911
|
+
})[];
|
|
912
|
+
} | {
|
|
913
|
+
op: "observed";
|
|
914
|
+
observations: {
|
|
915
|
+
assignment: string;
|
|
916
|
+
thread: string;
|
|
917
|
+
task: string;
|
|
918
|
+
generation: number;
|
|
919
|
+
outcome: {
|
|
920
|
+
kind: "accepted";
|
|
921
|
+
submission: number;
|
|
922
|
+
ending: number;
|
|
923
|
+
output: z.core.util.JSONType;
|
|
924
|
+
} | {
|
|
925
|
+
kind: "ended";
|
|
926
|
+
settlement: "completed" | "failed" | "stopped";
|
|
927
|
+
detail: string;
|
|
928
|
+
candidate: {
|
|
929
|
+
submission: number;
|
|
930
|
+
output: z.core.util.JSONType;
|
|
931
|
+
} | null;
|
|
932
|
+
report: string | null;
|
|
933
|
+
} | {
|
|
934
|
+
kind: "refused";
|
|
935
|
+
detail: string;
|
|
936
|
+
} | {
|
|
937
|
+
kind: "unfinished";
|
|
938
|
+
candidate: {
|
|
939
|
+
submission: number;
|
|
940
|
+
output: z.core.util.JSONType;
|
|
941
|
+
} | null;
|
|
942
|
+
report: string | null;
|
|
943
|
+
};
|
|
944
|
+
}[];
|
|
945
|
+
} | {
|
|
946
|
+
op: "stopped";
|
|
947
|
+
attempt: string;
|
|
948
|
+
reason: string;
|
|
949
|
+
observations: {
|
|
950
|
+
assignment: string;
|
|
951
|
+
thread: string;
|
|
952
|
+
task: string;
|
|
953
|
+
generation: number;
|
|
954
|
+
outcome: {
|
|
955
|
+
kind: "accepted";
|
|
956
|
+
submission: number;
|
|
957
|
+
ending: number;
|
|
958
|
+
output: z.core.util.JSONType;
|
|
959
|
+
} | {
|
|
960
|
+
kind: "ended";
|
|
961
|
+
settlement: "completed" | "failed" | "stopped";
|
|
962
|
+
detail: string;
|
|
963
|
+
candidate: {
|
|
964
|
+
submission: number;
|
|
965
|
+
output: z.core.util.JSONType;
|
|
966
|
+
} | null;
|
|
967
|
+
report: string | null;
|
|
968
|
+
} | {
|
|
969
|
+
kind: "refused";
|
|
970
|
+
detail: string;
|
|
971
|
+
} | {
|
|
972
|
+
kind: "unfinished";
|
|
973
|
+
candidate: {
|
|
974
|
+
submission: number;
|
|
975
|
+
output: z.core.util.JSONType;
|
|
976
|
+
} | null;
|
|
977
|
+
report: string | null;
|
|
978
|
+
};
|
|
979
|
+
}[];
|
|
980
|
+
} | {
|
|
981
|
+
op: "completed";
|
|
982
|
+
transition: string;
|
|
983
|
+
cause: {
|
|
984
|
+
kind: "opening";
|
|
985
|
+
} | {
|
|
986
|
+
kind: "routed";
|
|
987
|
+
result: string;
|
|
988
|
+
} | {
|
|
989
|
+
kind: "decision";
|
|
990
|
+
decision: string;
|
|
991
|
+
};
|
|
992
|
+
} | {
|
|
993
|
+
op: "cancel-requested";
|
|
994
|
+
operation_id: string;
|
|
995
|
+
actor: string;
|
|
996
|
+
reason: string;
|
|
997
|
+
} | {
|
|
998
|
+
op: "cancelled";
|
|
999
|
+
operation_id: string;
|
|
1000
|
+
};
|
|
1001
|
+
entry: (value: {
|
|
1002
|
+
op: "decided";
|
|
1003
|
+
decision: string;
|
|
1004
|
+
operation_id: string;
|
|
1005
|
+
actor: string;
|
|
1006
|
+
attempt: string;
|
|
1007
|
+
reason: "gate" | "exhaustion" | "recovery";
|
|
1008
|
+
result: string | null;
|
|
1009
|
+
verdict: "approve" | "revise";
|
|
1010
|
+
option: string | null;
|
|
1011
|
+
feedback: string | null;
|
|
1012
|
+
restart: string[];
|
|
1013
|
+
} | {
|
|
1014
|
+
op: "opened";
|
|
1015
|
+
definition: string;
|
|
1016
|
+
canonical: unknown;
|
|
1017
|
+
input: z.core.util.JSONType;
|
|
1018
|
+
input_id: string;
|
|
1019
|
+
pins: {
|
|
1020
|
+
participants: Record<string, {
|
|
1021
|
+
configuration: {
|
|
1022
|
+
agent: string;
|
|
1023
|
+
route: {
|
|
1024
|
+
provider: string;
|
|
1025
|
+
model: string;
|
|
1026
|
+
thinking_effort: "low" | "high" | "none" | "medium" | "max" | null;
|
|
1027
|
+
};
|
|
1028
|
+
environment: {
|
|
1029
|
+
cwd: string;
|
|
1030
|
+
};
|
|
1031
|
+
installations: {
|
|
1032
|
+
installation_id: string;
|
|
1033
|
+
preset_id: string;
|
|
1034
|
+
config: z.core.util.JSONType;
|
|
1035
|
+
lifetime: "defining" | "configurable";
|
|
1036
|
+
}[];
|
|
1037
|
+
} | null;
|
|
1038
|
+
checks: Record<string, {
|
|
1039
|
+
config: z.core.util.JSONType;
|
|
1040
|
+
}>;
|
|
1041
|
+
}>;
|
|
1042
|
+
evidence: Record<string, {
|
|
1043
|
+
config: z.core.util.JSONType;
|
|
1044
|
+
}>;
|
|
1045
|
+
};
|
|
1046
|
+
} | {
|
|
1047
|
+
op: "entered";
|
|
1048
|
+
transition: string;
|
|
1049
|
+
cause: {
|
|
1050
|
+
kind: "opening";
|
|
1051
|
+
} | {
|
|
1052
|
+
kind: "routed";
|
|
1053
|
+
result: string;
|
|
1054
|
+
} | {
|
|
1055
|
+
kind: "decision";
|
|
1056
|
+
decision: string;
|
|
1057
|
+
};
|
|
1058
|
+
step: string;
|
|
1059
|
+
attempt: string;
|
|
1060
|
+
ordinal: number;
|
|
1061
|
+
retires: string[];
|
|
1062
|
+
inputs: Record<string, {
|
|
1063
|
+
kind: "input";
|
|
1064
|
+
} | {
|
|
1065
|
+
kind: "evidence";
|
|
1066
|
+
provider: string;
|
|
1067
|
+
immutable: boolean;
|
|
1068
|
+
detail: z.core.util.JSONType;
|
|
1069
|
+
} | {
|
|
1070
|
+
kind: "result";
|
|
1071
|
+
result: string;
|
|
1072
|
+
participant: string | null;
|
|
1073
|
+
decision: string | null;
|
|
1074
|
+
mode: "current" | "historical";
|
|
1075
|
+
} | null>;
|
|
1076
|
+
evidence: Record<string, z.core.util.JSONType>;
|
|
1077
|
+
assignments: ({
|
|
1078
|
+
context: "conversation";
|
|
1079
|
+
id: string;
|
|
1080
|
+
participant: string;
|
|
1081
|
+
activation: string;
|
|
1082
|
+
} | {
|
|
1083
|
+
context: "isolated";
|
|
1084
|
+
id: string;
|
|
1085
|
+
participant: string;
|
|
1086
|
+
thread: string;
|
|
1087
|
+
task: string;
|
|
1088
|
+
generation: number;
|
|
1089
|
+
lifetime: "instance" | "attempt";
|
|
1090
|
+
checks: string[];
|
|
1091
|
+
})[];
|
|
1092
|
+
} | {
|
|
1093
|
+
op: "observed";
|
|
1094
|
+
observations: {
|
|
1095
|
+
assignment: string;
|
|
1096
|
+
thread: string;
|
|
1097
|
+
task: string;
|
|
1098
|
+
generation: number;
|
|
1099
|
+
outcome: {
|
|
1100
|
+
kind: "accepted";
|
|
1101
|
+
submission: number;
|
|
1102
|
+
ending: number;
|
|
1103
|
+
output: z.core.util.JSONType;
|
|
1104
|
+
} | {
|
|
1105
|
+
kind: "ended";
|
|
1106
|
+
settlement: "completed" | "failed" | "stopped";
|
|
1107
|
+
detail: string;
|
|
1108
|
+
candidate: {
|
|
1109
|
+
submission: number;
|
|
1110
|
+
output: z.core.util.JSONType;
|
|
1111
|
+
} | null;
|
|
1112
|
+
report: string | null;
|
|
1113
|
+
} | {
|
|
1114
|
+
kind: "refused";
|
|
1115
|
+
detail: string;
|
|
1116
|
+
} | {
|
|
1117
|
+
kind: "unfinished";
|
|
1118
|
+
candidate: {
|
|
1119
|
+
submission: number;
|
|
1120
|
+
output: z.core.util.JSONType;
|
|
1121
|
+
} | null;
|
|
1122
|
+
report: string | null;
|
|
1123
|
+
};
|
|
1124
|
+
}[];
|
|
1125
|
+
} | {
|
|
1126
|
+
op: "stopped";
|
|
1127
|
+
attempt: string;
|
|
1128
|
+
reason: string;
|
|
1129
|
+
observations: {
|
|
1130
|
+
assignment: string;
|
|
1131
|
+
thread: string;
|
|
1132
|
+
task: string;
|
|
1133
|
+
generation: number;
|
|
1134
|
+
outcome: {
|
|
1135
|
+
kind: "accepted";
|
|
1136
|
+
submission: number;
|
|
1137
|
+
ending: number;
|
|
1138
|
+
output: z.core.util.JSONType;
|
|
1139
|
+
} | {
|
|
1140
|
+
kind: "ended";
|
|
1141
|
+
settlement: "completed" | "failed" | "stopped";
|
|
1142
|
+
detail: string;
|
|
1143
|
+
candidate: {
|
|
1144
|
+
submission: number;
|
|
1145
|
+
output: z.core.util.JSONType;
|
|
1146
|
+
} | null;
|
|
1147
|
+
report: string | null;
|
|
1148
|
+
} | {
|
|
1149
|
+
kind: "refused";
|
|
1150
|
+
detail: string;
|
|
1151
|
+
} | {
|
|
1152
|
+
kind: "unfinished";
|
|
1153
|
+
candidate: {
|
|
1154
|
+
submission: number;
|
|
1155
|
+
output: z.core.util.JSONType;
|
|
1156
|
+
} | null;
|
|
1157
|
+
report: string | null;
|
|
1158
|
+
};
|
|
1159
|
+
}[];
|
|
1160
|
+
} | {
|
|
1161
|
+
op: "completed";
|
|
1162
|
+
transition: string;
|
|
1163
|
+
cause: {
|
|
1164
|
+
kind: "opening";
|
|
1165
|
+
} | {
|
|
1166
|
+
kind: "routed";
|
|
1167
|
+
result: string;
|
|
1168
|
+
} | {
|
|
1169
|
+
kind: "decision";
|
|
1170
|
+
decision: string;
|
|
1171
|
+
};
|
|
1172
|
+
} | {
|
|
1173
|
+
op: "cancel-requested";
|
|
1174
|
+
operation_id: string;
|
|
1175
|
+
actor: string;
|
|
1176
|
+
reason: string;
|
|
1177
|
+
} | {
|
|
1178
|
+
op: "cancelled";
|
|
1179
|
+
operation_id: string;
|
|
1180
|
+
}, options: import("../../plugin.js").AppendOptions) => {
|
|
1181
|
+
type: "ext";
|
|
1182
|
+
data: {
|
|
1183
|
+
plugin: string;
|
|
1184
|
+
instance_id: string;
|
|
1185
|
+
kind: string;
|
|
1186
|
+
version: number;
|
|
1187
|
+
data: z.core.util.JSONType;
|
|
1188
|
+
};
|
|
1189
|
+
options: import("../../plugin.js").AppendOptions;
|
|
1190
|
+
};
|
|
1191
|
+
append(journal: import("../../plugin.js").PluginJournal, value: {
|
|
1192
|
+
op: "decided";
|
|
1193
|
+
decision: string;
|
|
1194
|
+
operation_id: string;
|
|
1195
|
+
actor: string;
|
|
1196
|
+
attempt: string;
|
|
1197
|
+
reason: "gate" | "exhaustion" | "recovery";
|
|
1198
|
+
result: string | null;
|
|
1199
|
+
verdict: "approve" | "revise";
|
|
1200
|
+
option: string | null;
|
|
1201
|
+
feedback: string | null;
|
|
1202
|
+
restart: string[];
|
|
1203
|
+
} | {
|
|
1204
|
+
op: "opened";
|
|
1205
|
+
definition: string;
|
|
1206
|
+
canonical: unknown;
|
|
1207
|
+
input: z.core.util.JSONType;
|
|
1208
|
+
input_id: string;
|
|
1209
|
+
pins: {
|
|
1210
|
+
participants: Record<string, {
|
|
1211
|
+
configuration: {
|
|
1212
|
+
agent: string;
|
|
1213
|
+
route: {
|
|
1214
|
+
provider: string;
|
|
1215
|
+
model: string;
|
|
1216
|
+
thinking_effort: "low" | "high" | "none" | "medium" | "max" | null;
|
|
1217
|
+
};
|
|
1218
|
+
environment: {
|
|
1219
|
+
cwd: string;
|
|
1220
|
+
};
|
|
1221
|
+
installations: {
|
|
1222
|
+
installation_id: string;
|
|
1223
|
+
preset_id: string;
|
|
1224
|
+
config: z.core.util.JSONType;
|
|
1225
|
+
lifetime: "defining" | "configurable";
|
|
1226
|
+
}[];
|
|
1227
|
+
} | null;
|
|
1228
|
+
checks: Record<string, {
|
|
1229
|
+
config: z.core.util.JSONType;
|
|
1230
|
+
}>;
|
|
1231
|
+
}>;
|
|
1232
|
+
evidence: Record<string, {
|
|
1233
|
+
config: z.core.util.JSONType;
|
|
1234
|
+
}>;
|
|
1235
|
+
};
|
|
1236
|
+
} | {
|
|
1237
|
+
op: "entered";
|
|
1238
|
+
transition: string;
|
|
1239
|
+
cause: {
|
|
1240
|
+
kind: "opening";
|
|
1241
|
+
} | {
|
|
1242
|
+
kind: "routed";
|
|
1243
|
+
result: string;
|
|
1244
|
+
} | {
|
|
1245
|
+
kind: "decision";
|
|
1246
|
+
decision: string;
|
|
1247
|
+
};
|
|
1248
|
+
step: string;
|
|
1249
|
+
attempt: string;
|
|
1250
|
+
ordinal: number;
|
|
1251
|
+
retires: string[];
|
|
1252
|
+
inputs: Record<string, {
|
|
1253
|
+
kind: "input";
|
|
1254
|
+
} | {
|
|
1255
|
+
kind: "evidence";
|
|
1256
|
+
provider: string;
|
|
1257
|
+
immutable: boolean;
|
|
1258
|
+
detail: z.core.util.JSONType;
|
|
1259
|
+
} | {
|
|
1260
|
+
kind: "result";
|
|
1261
|
+
result: string;
|
|
1262
|
+
participant: string | null;
|
|
1263
|
+
decision: string | null;
|
|
1264
|
+
mode: "current" | "historical";
|
|
1265
|
+
} | null>;
|
|
1266
|
+
evidence: Record<string, z.core.util.JSONType>;
|
|
1267
|
+
assignments: ({
|
|
1268
|
+
context: "conversation";
|
|
1269
|
+
id: string;
|
|
1270
|
+
participant: string;
|
|
1271
|
+
activation: string;
|
|
1272
|
+
} | {
|
|
1273
|
+
context: "isolated";
|
|
1274
|
+
id: string;
|
|
1275
|
+
participant: string;
|
|
1276
|
+
thread: string;
|
|
1277
|
+
task: string;
|
|
1278
|
+
generation: number;
|
|
1279
|
+
lifetime: "instance" | "attempt";
|
|
1280
|
+
checks: string[];
|
|
1281
|
+
})[];
|
|
1282
|
+
} | {
|
|
1283
|
+
op: "observed";
|
|
1284
|
+
observations: {
|
|
1285
|
+
assignment: string;
|
|
1286
|
+
thread: string;
|
|
1287
|
+
task: string;
|
|
1288
|
+
generation: number;
|
|
1289
|
+
outcome: {
|
|
1290
|
+
kind: "accepted";
|
|
1291
|
+
submission: number;
|
|
1292
|
+
ending: number;
|
|
1293
|
+
output: z.core.util.JSONType;
|
|
1294
|
+
} | {
|
|
1295
|
+
kind: "ended";
|
|
1296
|
+
settlement: "completed" | "failed" | "stopped";
|
|
1297
|
+
detail: string;
|
|
1298
|
+
candidate: {
|
|
1299
|
+
submission: number;
|
|
1300
|
+
output: z.core.util.JSONType;
|
|
1301
|
+
} | null;
|
|
1302
|
+
report: string | null;
|
|
1303
|
+
} | {
|
|
1304
|
+
kind: "refused";
|
|
1305
|
+
detail: string;
|
|
1306
|
+
} | {
|
|
1307
|
+
kind: "unfinished";
|
|
1308
|
+
candidate: {
|
|
1309
|
+
submission: number;
|
|
1310
|
+
output: z.core.util.JSONType;
|
|
1311
|
+
} | null;
|
|
1312
|
+
report: string | null;
|
|
1313
|
+
};
|
|
1314
|
+
}[];
|
|
1315
|
+
} | {
|
|
1316
|
+
op: "stopped";
|
|
1317
|
+
attempt: string;
|
|
1318
|
+
reason: string;
|
|
1319
|
+
observations: {
|
|
1320
|
+
assignment: string;
|
|
1321
|
+
thread: string;
|
|
1322
|
+
task: string;
|
|
1323
|
+
generation: number;
|
|
1324
|
+
outcome: {
|
|
1325
|
+
kind: "accepted";
|
|
1326
|
+
submission: number;
|
|
1327
|
+
ending: number;
|
|
1328
|
+
output: z.core.util.JSONType;
|
|
1329
|
+
} | {
|
|
1330
|
+
kind: "ended";
|
|
1331
|
+
settlement: "completed" | "failed" | "stopped";
|
|
1332
|
+
detail: string;
|
|
1333
|
+
candidate: {
|
|
1334
|
+
submission: number;
|
|
1335
|
+
output: z.core.util.JSONType;
|
|
1336
|
+
} | null;
|
|
1337
|
+
report: string | null;
|
|
1338
|
+
} | {
|
|
1339
|
+
kind: "refused";
|
|
1340
|
+
detail: string;
|
|
1341
|
+
} | {
|
|
1342
|
+
kind: "unfinished";
|
|
1343
|
+
candidate: {
|
|
1344
|
+
submission: number;
|
|
1345
|
+
output: z.core.util.JSONType;
|
|
1346
|
+
} | null;
|
|
1347
|
+
report: string | null;
|
|
1348
|
+
};
|
|
1349
|
+
}[];
|
|
1350
|
+
} | {
|
|
1351
|
+
op: "completed";
|
|
1352
|
+
transition: string;
|
|
1353
|
+
cause: {
|
|
1354
|
+
kind: "opening";
|
|
1355
|
+
} | {
|
|
1356
|
+
kind: "routed";
|
|
1357
|
+
result: string;
|
|
1358
|
+
} | {
|
|
1359
|
+
kind: "decision";
|
|
1360
|
+
decision: string;
|
|
1361
|
+
};
|
|
1362
|
+
} | {
|
|
1363
|
+
op: "cancel-requested";
|
|
1364
|
+
operation_id: string;
|
|
1365
|
+
actor: string;
|
|
1366
|
+
reason: string;
|
|
1367
|
+
} | {
|
|
1368
|
+
op: "cancelled";
|
|
1369
|
+
operation_id: string;
|
|
1370
|
+
}, options: import("../../plugin.js").AppendOptions): Promise<import("../../records/journal.js").JournalEvent<"ext">>;
|
|
1371
|
+
read(event: import("../../records/journal.js").JournalEvent): {
|
|
1372
|
+
op: "decided";
|
|
1373
|
+
decision: string;
|
|
1374
|
+
operation_id: string;
|
|
1375
|
+
actor: string;
|
|
1376
|
+
attempt: string;
|
|
1377
|
+
reason: "gate" | "exhaustion" | "recovery";
|
|
1378
|
+
result: string | null;
|
|
1379
|
+
verdict: "approve" | "revise";
|
|
1380
|
+
option: string | null;
|
|
1381
|
+
feedback: string | null;
|
|
1382
|
+
restart: string[];
|
|
1383
|
+
} | {
|
|
1384
|
+
op: "opened";
|
|
1385
|
+
definition: string;
|
|
1386
|
+
canonical: CanonicalDefinition;
|
|
1387
|
+
input: z.core.util.JSONType;
|
|
1388
|
+
input_id: string;
|
|
1389
|
+
pins: {
|
|
1390
|
+
participants: Record<string, {
|
|
1391
|
+
configuration: {
|
|
1392
|
+
agent: string;
|
|
1393
|
+
route: {
|
|
1394
|
+
provider: string;
|
|
1395
|
+
model: string;
|
|
1396
|
+
thinking_effort: "low" | "high" | "none" | "medium" | "max" | null;
|
|
1397
|
+
};
|
|
1398
|
+
environment: {
|
|
1399
|
+
cwd: string;
|
|
1400
|
+
};
|
|
1401
|
+
installations: {
|
|
1402
|
+
installation_id: string;
|
|
1403
|
+
preset_id: string;
|
|
1404
|
+
config: z.core.util.JSONType;
|
|
1405
|
+
lifetime: "defining" | "configurable";
|
|
1406
|
+
}[];
|
|
1407
|
+
} | null;
|
|
1408
|
+
checks: Record<string, {
|
|
1409
|
+
config: z.core.util.JSONType;
|
|
1410
|
+
}>;
|
|
1411
|
+
}>;
|
|
1412
|
+
evidence: Record<string, {
|
|
1413
|
+
config: z.core.util.JSONType;
|
|
1414
|
+
}>;
|
|
1415
|
+
};
|
|
1416
|
+
} | {
|
|
1417
|
+
op: "entered";
|
|
1418
|
+
transition: string;
|
|
1419
|
+
cause: {
|
|
1420
|
+
kind: "opening";
|
|
1421
|
+
} | {
|
|
1422
|
+
kind: "routed";
|
|
1423
|
+
result: string;
|
|
1424
|
+
} | {
|
|
1425
|
+
kind: "decision";
|
|
1426
|
+
decision: string;
|
|
1427
|
+
};
|
|
1428
|
+
step: string;
|
|
1429
|
+
attempt: string;
|
|
1430
|
+
ordinal: number;
|
|
1431
|
+
retires: string[];
|
|
1432
|
+
inputs: Record<string, {
|
|
1433
|
+
kind: "input";
|
|
1434
|
+
} | {
|
|
1435
|
+
kind: "evidence";
|
|
1436
|
+
provider: string;
|
|
1437
|
+
immutable: boolean;
|
|
1438
|
+
detail: z.core.util.JSONType;
|
|
1439
|
+
} | {
|
|
1440
|
+
kind: "result";
|
|
1441
|
+
result: string;
|
|
1442
|
+
participant: string | null;
|
|
1443
|
+
decision: string | null;
|
|
1444
|
+
mode: "current" | "historical";
|
|
1445
|
+
} | null>;
|
|
1446
|
+
evidence: Record<string, z.core.util.JSONType>;
|
|
1447
|
+
assignments: ({
|
|
1448
|
+
context: "conversation";
|
|
1449
|
+
id: string;
|
|
1450
|
+
participant: string;
|
|
1451
|
+
activation: string;
|
|
1452
|
+
} | {
|
|
1453
|
+
context: "isolated";
|
|
1454
|
+
id: string;
|
|
1455
|
+
participant: string;
|
|
1456
|
+
thread: string;
|
|
1457
|
+
task: string;
|
|
1458
|
+
generation: number;
|
|
1459
|
+
lifetime: "instance" | "attempt";
|
|
1460
|
+
checks: string[];
|
|
1461
|
+
})[];
|
|
1462
|
+
} | {
|
|
1463
|
+
op: "observed";
|
|
1464
|
+
observations: {
|
|
1465
|
+
assignment: string;
|
|
1466
|
+
thread: string;
|
|
1467
|
+
task: string;
|
|
1468
|
+
generation: number;
|
|
1469
|
+
outcome: {
|
|
1470
|
+
kind: "accepted";
|
|
1471
|
+
submission: number;
|
|
1472
|
+
ending: number;
|
|
1473
|
+
output: z.core.util.JSONType;
|
|
1474
|
+
} | {
|
|
1475
|
+
kind: "ended";
|
|
1476
|
+
settlement: "completed" | "failed" | "stopped";
|
|
1477
|
+
detail: string;
|
|
1478
|
+
candidate: {
|
|
1479
|
+
submission: number;
|
|
1480
|
+
output: z.core.util.JSONType;
|
|
1481
|
+
} | null;
|
|
1482
|
+
report: string | null;
|
|
1483
|
+
} | {
|
|
1484
|
+
kind: "refused";
|
|
1485
|
+
detail: string;
|
|
1486
|
+
} | {
|
|
1487
|
+
kind: "unfinished";
|
|
1488
|
+
candidate: {
|
|
1489
|
+
submission: number;
|
|
1490
|
+
output: z.core.util.JSONType;
|
|
1491
|
+
} | null;
|
|
1492
|
+
report: string | null;
|
|
1493
|
+
};
|
|
1494
|
+
}[];
|
|
1495
|
+
} | {
|
|
1496
|
+
op: "stopped";
|
|
1497
|
+
attempt: string;
|
|
1498
|
+
reason: string;
|
|
1499
|
+
observations: {
|
|
1500
|
+
assignment: string;
|
|
1501
|
+
thread: string;
|
|
1502
|
+
task: string;
|
|
1503
|
+
generation: number;
|
|
1504
|
+
outcome: {
|
|
1505
|
+
kind: "accepted";
|
|
1506
|
+
submission: number;
|
|
1507
|
+
ending: number;
|
|
1508
|
+
output: z.core.util.JSONType;
|
|
1509
|
+
} | {
|
|
1510
|
+
kind: "ended";
|
|
1511
|
+
settlement: "completed" | "failed" | "stopped";
|
|
1512
|
+
detail: string;
|
|
1513
|
+
candidate: {
|
|
1514
|
+
submission: number;
|
|
1515
|
+
output: z.core.util.JSONType;
|
|
1516
|
+
} | null;
|
|
1517
|
+
report: string | null;
|
|
1518
|
+
} | {
|
|
1519
|
+
kind: "refused";
|
|
1520
|
+
detail: string;
|
|
1521
|
+
} | {
|
|
1522
|
+
kind: "unfinished";
|
|
1523
|
+
candidate: {
|
|
1524
|
+
submission: number;
|
|
1525
|
+
output: z.core.util.JSONType;
|
|
1526
|
+
} | null;
|
|
1527
|
+
report: string | null;
|
|
1528
|
+
};
|
|
1529
|
+
}[];
|
|
1530
|
+
} | {
|
|
1531
|
+
op: "completed";
|
|
1532
|
+
transition: string;
|
|
1533
|
+
cause: {
|
|
1534
|
+
kind: "opening";
|
|
1535
|
+
} | {
|
|
1536
|
+
kind: "routed";
|
|
1537
|
+
result: string;
|
|
1538
|
+
} | {
|
|
1539
|
+
kind: "decision";
|
|
1540
|
+
decision: string;
|
|
1541
|
+
};
|
|
1542
|
+
} | {
|
|
1543
|
+
op: "cancel-requested";
|
|
1544
|
+
operation_id: string;
|
|
1545
|
+
actor: string;
|
|
1546
|
+
reason: string;
|
|
1547
|
+
} | {
|
|
1548
|
+
op: "cancelled";
|
|
1549
|
+
operation_id: string;
|
|
1550
|
+
} | undefined;
|
|
1551
|
+
contribution(message: {
|
|
1552
|
+
role?: import("../../records/journal.js").InputRole;
|
|
1553
|
+
content: string | readonly import("../../llm/content.js").ContentPartInput[];
|
|
1554
|
+
}, value: {
|
|
1555
|
+
op: "decided";
|
|
1556
|
+
decision: string;
|
|
1557
|
+
operation_id: string;
|
|
1558
|
+
actor: string;
|
|
1559
|
+
attempt: string;
|
|
1560
|
+
reason: "gate" | "exhaustion" | "recovery";
|
|
1561
|
+
result: string | null;
|
|
1562
|
+
verdict: "approve" | "revise";
|
|
1563
|
+
option: string | null;
|
|
1564
|
+
feedback: string | null;
|
|
1565
|
+
restart: string[];
|
|
1566
|
+
} | {
|
|
1567
|
+
op: "opened";
|
|
1568
|
+
definition: string;
|
|
1569
|
+
canonical: unknown;
|
|
1570
|
+
input: z.core.util.JSONType;
|
|
1571
|
+
input_id: string;
|
|
1572
|
+
pins: {
|
|
1573
|
+
participants: Record<string, {
|
|
1574
|
+
configuration: {
|
|
1575
|
+
agent: string;
|
|
1576
|
+
route: {
|
|
1577
|
+
provider: string;
|
|
1578
|
+
model: string;
|
|
1579
|
+
thinking_effort: "low" | "high" | "none" | "medium" | "max" | null;
|
|
1580
|
+
};
|
|
1581
|
+
environment: {
|
|
1582
|
+
cwd: string;
|
|
1583
|
+
};
|
|
1584
|
+
installations: {
|
|
1585
|
+
installation_id: string;
|
|
1586
|
+
preset_id: string;
|
|
1587
|
+
config: z.core.util.JSONType;
|
|
1588
|
+
lifetime: "defining" | "configurable";
|
|
1589
|
+
}[];
|
|
1590
|
+
} | null;
|
|
1591
|
+
checks: Record<string, {
|
|
1592
|
+
config: z.core.util.JSONType;
|
|
1593
|
+
}>;
|
|
1594
|
+
}>;
|
|
1595
|
+
evidence: Record<string, {
|
|
1596
|
+
config: z.core.util.JSONType;
|
|
1597
|
+
}>;
|
|
1598
|
+
};
|
|
1599
|
+
} | {
|
|
1600
|
+
op: "entered";
|
|
1601
|
+
transition: string;
|
|
1602
|
+
cause: {
|
|
1603
|
+
kind: "opening";
|
|
1604
|
+
} | {
|
|
1605
|
+
kind: "routed";
|
|
1606
|
+
result: string;
|
|
1607
|
+
} | {
|
|
1608
|
+
kind: "decision";
|
|
1609
|
+
decision: string;
|
|
1610
|
+
};
|
|
1611
|
+
step: string;
|
|
1612
|
+
attempt: string;
|
|
1613
|
+
ordinal: number;
|
|
1614
|
+
retires: string[];
|
|
1615
|
+
inputs: Record<string, {
|
|
1616
|
+
kind: "input";
|
|
1617
|
+
} | {
|
|
1618
|
+
kind: "evidence";
|
|
1619
|
+
provider: string;
|
|
1620
|
+
immutable: boolean;
|
|
1621
|
+
detail: z.core.util.JSONType;
|
|
1622
|
+
} | {
|
|
1623
|
+
kind: "result";
|
|
1624
|
+
result: string;
|
|
1625
|
+
participant: string | null;
|
|
1626
|
+
decision: string | null;
|
|
1627
|
+
mode: "current" | "historical";
|
|
1628
|
+
} | null>;
|
|
1629
|
+
evidence: Record<string, z.core.util.JSONType>;
|
|
1630
|
+
assignments: ({
|
|
1631
|
+
context: "conversation";
|
|
1632
|
+
id: string;
|
|
1633
|
+
participant: string;
|
|
1634
|
+
activation: string;
|
|
1635
|
+
} | {
|
|
1636
|
+
context: "isolated";
|
|
1637
|
+
id: string;
|
|
1638
|
+
participant: string;
|
|
1639
|
+
thread: string;
|
|
1640
|
+
task: string;
|
|
1641
|
+
generation: number;
|
|
1642
|
+
lifetime: "instance" | "attempt";
|
|
1643
|
+
checks: string[];
|
|
1644
|
+
})[];
|
|
1645
|
+
} | {
|
|
1646
|
+
op: "observed";
|
|
1647
|
+
observations: {
|
|
1648
|
+
assignment: string;
|
|
1649
|
+
thread: string;
|
|
1650
|
+
task: string;
|
|
1651
|
+
generation: number;
|
|
1652
|
+
outcome: {
|
|
1653
|
+
kind: "accepted";
|
|
1654
|
+
submission: number;
|
|
1655
|
+
ending: number;
|
|
1656
|
+
output: z.core.util.JSONType;
|
|
1657
|
+
} | {
|
|
1658
|
+
kind: "ended";
|
|
1659
|
+
settlement: "completed" | "failed" | "stopped";
|
|
1660
|
+
detail: string;
|
|
1661
|
+
candidate: {
|
|
1662
|
+
submission: number;
|
|
1663
|
+
output: z.core.util.JSONType;
|
|
1664
|
+
} | null;
|
|
1665
|
+
report: string | null;
|
|
1666
|
+
} | {
|
|
1667
|
+
kind: "refused";
|
|
1668
|
+
detail: string;
|
|
1669
|
+
} | {
|
|
1670
|
+
kind: "unfinished";
|
|
1671
|
+
candidate: {
|
|
1672
|
+
submission: number;
|
|
1673
|
+
output: z.core.util.JSONType;
|
|
1674
|
+
} | null;
|
|
1675
|
+
report: string | null;
|
|
1676
|
+
};
|
|
1677
|
+
}[];
|
|
1678
|
+
} | {
|
|
1679
|
+
op: "stopped";
|
|
1680
|
+
attempt: string;
|
|
1681
|
+
reason: string;
|
|
1682
|
+
observations: {
|
|
1683
|
+
assignment: string;
|
|
1684
|
+
thread: string;
|
|
1685
|
+
task: string;
|
|
1686
|
+
generation: number;
|
|
1687
|
+
outcome: {
|
|
1688
|
+
kind: "accepted";
|
|
1689
|
+
submission: number;
|
|
1690
|
+
ending: number;
|
|
1691
|
+
output: z.core.util.JSONType;
|
|
1692
|
+
} | {
|
|
1693
|
+
kind: "ended";
|
|
1694
|
+
settlement: "completed" | "failed" | "stopped";
|
|
1695
|
+
detail: string;
|
|
1696
|
+
candidate: {
|
|
1697
|
+
submission: number;
|
|
1698
|
+
output: z.core.util.JSONType;
|
|
1699
|
+
} | null;
|
|
1700
|
+
report: string | null;
|
|
1701
|
+
} | {
|
|
1702
|
+
kind: "refused";
|
|
1703
|
+
detail: string;
|
|
1704
|
+
} | {
|
|
1705
|
+
kind: "unfinished";
|
|
1706
|
+
candidate: {
|
|
1707
|
+
submission: number;
|
|
1708
|
+
output: z.core.util.JSONType;
|
|
1709
|
+
} | null;
|
|
1710
|
+
report: string | null;
|
|
1711
|
+
};
|
|
1712
|
+
}[];
|
|
1713
|
+
} | {
|
|
1714
|
+
op: "completed";
|
|
1715
|
+
transition: string;
|
|
1716
|
+
cause: {
|
|
1717
|
+
kind: "opening";
|
|
1718
|
+
} | {
|
|
1719
|
+
kind: "routed";
|
|
1720
|
+
result: string;
|
|
1721
|
+
} | {
|
|
1722
|
+
kind: "decision";
|
|
1723
|
+
decision: string;
|
|
1724
|
+
};
|
|
1725
|
+
} | {
|
|
1726
|
+
op: "cancel-requested";
|
|
1727
|
+
operation_id: string;
|
|
1728
|
+
actor: string;
|
|
1729
|
+
reason: string;
|
|
1730
|
+
} | {
|
|
1731
|
+
op: "cancelled";
|
|
1732
|
+
operation_id: string;
|
|
1733
|
+
}, options?: {
|
|
1734
|
+
sourceSeqs?: readonly import("../../records/journal.js").Seq[];
|
|
1735
|
+
}): import("../../records/journal.js").StepContribution;
|
|
1736
|
+
matchesSource(record: DeepReadonly<import("../../records/journal.js").ExtensionRecord>): boolean;
|
|
1737
|
+
rejection(reason: string, value: {
|
|
1738
|
+
op: "decided";
|
|
1739
|
+
decision: string;
|
|
1740
|
+
operation_id: string;
|
|
1741
|
+
actor: string;
|
|
1742
|
+
attempt: string;
|
|
1743
|
+
reason: "gate" | "exhaustion" | "recovery";
|
|
1744
|
+
result: string | null;
|
|
1745
|
+
verdict: "approve" | "revise";
|
|
1746
|
+
option: string | null;
|
|
1747
|
+
feedback: string | null;
|
|
1748
|
+
restart: string[];
|
|
1749
|
+
} | {
|
|
1750
|
+
op: "opened";
|
|
1751
|
+
definition: string;
|
|
1752
|
+
canonical: unknown;
|
|
1753
|
+
input: z.core.util.JSONType;
|
|
1754
|
+
input_id: string;
|
|
1755
|
+
pins: {
|
|
1756
|
+
participants: Record<string, {
|
|
1757
|
+
configuration: {
|
|
1758
|
+
agent: string;
|
|
1759
|
+
route: {
|
|
1760
|
+
provider: string;
|
|
1761
|
+
model: string;
|
|
1762
|
+
thinking_effort: "low" | "high" | "none" | "medium" | "max" | null;
|
|
1763
|
+
};
|
|
1764
|
+
environment: {
|
|
1765
|
+
cwd: string;
|
|
1766
|
+
};
|
|
1767
|
+
installations: {
|
|
1768
|
+
installation_id: string;
|
|
1769
|
+
preset_id: string;
|
|
1770
|
+
config: z.core.util.JSONType;
|
|
1771
|
+
lifetime: "defining" | "configurable";
|
|
1772
|
+
}[];
|
|
1773
|
+
} | null;
|
|
1774
|
+
checks: Record<string, {
|
|
1775
|
+
config: z.core.util.JSONType;
|
|
1776
|
+
}>;
|
|
1777
|
+
}>;
|
|
1778
|
+
evidence: Record<string, {
|
|
1779
|
+
config: z.core.util.JSONType;
|
|
1780
|
+
}>;
|
|
1781
|
+
};
|
|
1782
|
+
} | {
|
|
1783
|
+
op: "entered";
|
|
1784
|
+
transition: string;
|
|
1785
|
+
cause: {
|
|
1786
|
+
kind: "opening";
|
|
1787
|
+
} | {
|
|
1788
|
+
kind: "routed";
|
|
1789
|
+
result: string;
|
|
1790
|
+
} | {
|
|
1791
|
+
kind: "decision";
|
|
1792
|
+
decision: string;
|
|
1793
|
+
};
|
|
1794
|
+
step: string;
|
|
1795
|
+
attempt: string;
|
|
1796
|
+
ordinal: number;
|
|
1797
|
+
retires: string[];
|
|
1798
|
+
inputs: Record<string, {
|
|
1799
|
+
kind: "input";
|
|
1800
|
+
} | {
|
|
1801
|
+
kind: "evidence";
|
|
1802
|
+
provider: string;
|
|
1803
|
+
immutable: boolean;
|
|
1804
|
+
detail: z.core.util.JSONType;
|
|
1805
|
+
} | {
|
|
1806
|
+
kind: "result";
|
|
1807
|
+
result: string;
|
|
1808
|
+
participant: string | null;
|
|
1809
|
+
decision: string | null;
|
|
1810
|
+
mode: "current" | "historical";
|
|
1811
|
+
} | null>;
|
|
1812
|
+
evidence: Record<string, z.core.util.JSONType>;
|
|
1813
|
+
assignments: ({
|
|
1814
|
+
context: "conversation";
|
|
1815
|
+
id: string;
|
|
1816
|
+
participant: string;
|
|
1817
|
+
activation: string;
|
|
1818
|
+
} | {
|
|
1819
|
+
context: "isolated";
|
|
1820
|
+
id: string;
|
|
1821
|
+
participant: string;
|
|
1822
|
+
thread: string;
|
|
1823
|
+
task: string;
|
|
1824
|
+
generation: number;
|
|
1825
|
+
lifetime: "instance" | "attempt";
|
|
1826
|
+
checks: string[];
|
|
1827
|
+
})[];
|
|
1828
|
+
} | {
|
|
1829
|
+
op: "observed";
|
|
1830
|
+
observations: {
|
|
1831
|
+
assignment: string;
|
|
1832
|
+
thread: string;
|
|
1833
|
+
task: string;
|
|
1834
|
+
generation: number;
|
|
1835
|
+
outcome: {
|
|
1836
|
+
kind: "accepted";
|
|
1837
|
+
submission: number;
|
|
1838
|
+
ending: number;
|
|
1839
|
+
output: z.core.util.JSONType;
|
|
1840
|
+
} | {
|
|
1841
|
+
kind: "ended";
|
|
1842
|
+
settlement: "completed" | "failed" | "stopped";
|
|
1843
|
+
detail: string;
|
|
1844
|
+
candidate: {
|
|
1845
|
+
submission: number;
|
|
1846
|
+
output: z.core.util.JSONType;
|
|
1847
|
+
} | null;
|
|
1848
|
+
report: string | null;
|
|
1849
|
+
} | {
|
|
1850
|
+
kind: "refused";
|
|
1851
|
+
detail: string;
|
|
1852
|
+
} | {
|
|
1853
|
+
kind: "unfinished";
|
|
1854
|
+
candidate: {
|
|
1855
|
+
submission: number;
|
|
1856
|
+
output: z.core.util.JSONType;
|
|
1857
|
+
} | null;
|
|
1858
|
+
report: string | null;
|
|
1859
|
+
};
|
|
1860
|
+
}[];
|
|
1861
|
+
} | {
|
|
1862
|
+
op: "stopped";
|
|
1863
|
+
attempt: string;
|
|
1864
|
+
reason: string;
|
|
1865
|
+
observations: {
|
|
1866
|
+
assignment: string;
|
|
1867
|
+
thread: string;
|
|
1868
|
+
task: string;
|
|
1869
|
+
generation: number;
|
|
1870
|
+
outcome: {
|
|
1871
|
+
kind: "accepted";
|
|
1872
|
+
submission: number;
|
|
1873
|
+
ending: number;
|
|
1874
|
+
output: z.core.util.JSONType;
|
|
1875
|
+
} | {
|
|
1876
|
+
kind: "ended";
|
|
1877
|
+
settlement: "completed" | "failed" | "stopped";
|
|
1878
|
+
detail: string;
|
|
1879
|
+
candidate: {
|
|
1880
|
+
submission: number;
|
|
1881
|
+
output: z.core.util.JSONType;
|
|
1882
|
+
} | null;
|
|
1883
|
+
report: string | null;
|
|
1884
|
+
} | {
|
|
1885
|
+
kind: "refused";
|
|
1886
|
+
detail: string;
|
|
1887
|
+
} | {
|
|
1888
|
+
kind: "unfinished";
|
|
1889
|
+
candidate: {
|
|
1890
|
+
submission: number;
|
|
1891
|
+
output: z.core.util.JSONType;
|
|
1892
|
+
} | null;
|
|
1893
|
+
report: string | null;
|
|
1894
|
+
};
|
|
1895
|
+
}[];
|
|
1896
|
+
} | {
|
|
1897
|
+
op: "completed";
|
|
1898
|
+
transition: string;
|
|
1899
|
+
cause: {
|
|
1900
|
+
kind: "opening";
|
|
1901
|
+
} | {
|
|
1902
|
+
kind: "routed";
|
|
1903
|
+
result: string;
|
|
1904
|
+
} | {
|
|
1905
|
+
kind: "decision";
|
|
1906
|
+
decision: string;
|
|
1907
|
+
};
|
|
1908
|
+
} | {
|
|
1909
|
+
op: "cancel-requested";
|
|
1910
|
+
operation_id: string;
|
|
1911
|
+
actor: string;
|
|
1912
|
+
reason: string;
|
|
1913
|
+
} | {
|
|
1914
|
+
op: "cancelled";
|
|
1915
|
+
operation_id: string;
|
|
1916
|
+
}): {
|
|
1917
|
+
decision: "reject";
|
|
1918
|
+
reason: string;
|
|
1919
|
+
source: import("../../records/journal.js").ExtensionRecord;
|
|
1920
|
+
};
|
|
1921
|
+
readContribution: (event: import("../../records/journal.js").JournalEvent) => {
|
|
1922
|
+
op: "decided";
|
|
1923
|
+
decision: string;
|
|
1924
|
+
operation_id: string;
|
|
1925
|
+
actor: string;
|
|
1926
|
+
attempt: string;
|
|
1927
|
+
reason: "gate" | "exhaustion" | "recovery";
|
|
1928
|
+
result: string | null;
|
|
1929
|
+
verdict: "approve" | "revise";
|
|
1930
|
+
option: string | null;
|
|
1931
|
+
feedback: string | null;
|
|
1932
|
+
restart: string[];
|
|
1933
|
+
} | {
|
|
1934
|
+
op: "opened";
|
|
1935
|
+
definition: string;
|
|
1936
|
+
canonical: CanonicalDefinition;
|
|
1937
|
+
input: z.core.util.JSONType;
|
|
1938
|
+
input_id: string;
|
|
1939
|
+
pins: {
|
|
1940
|
+
participants: Record<string, {
|
|
1941
|
+
configuration: {
|
|
1942
|
+
agent: string;
|
|
1943
|
+
route: {
|
|
1944
|
+
provider: string;
|
|
1945
|
+
model: string;
|
|
1946
|
+
thinking_effort: "low" | "high" | "none" | "medium" | "max" | null;
|
|
1947
|
+
};
|
|
1948
|
+
environment: {
|
|
1949
|
+
cwd: string;
|
|
1950
|
+
};
|
|
1951
|
+
installations: {
|
|
1952
|
+
installation_id: string;
|
|
1953
|
+
preset_id: string;
|
|
1954
|
+
config: z.core.util.JSONType;
|
|
1955
|
+
lifetime: "defining" | "configurable";
|
|
1956
|
+
}[];
|
|
1957
|
+
} | null;
|
|
1958
|
+
checks: Record<string, {
|
|
1959
|
+
config: z.core.util.JSONType;
|
|
1960
|
+
}>;
|
|
1961
|
+
}>;
|
|
1962
|
+
evidence: Record<string, {
|
|
1963
|
+
config: z.core.util.JSONType;
|
|
1964
|
+
}>;
|
|
1965
|
+
};
|
|
1966
|
+
} | {
|
|
1967
|
+
op: "entered";
|
|
1968
|
+
transition: string;
|
|
1969
|
+
cause: {
|
|
1970
|
+
kind: "opening";
|
|
1971
|
+
} | {
|
|
1972
|
+
kind: "routed";
|
|
1973
|
+
result: string;
|
|
1974
|
+
} | {
|
|
1975
|
+
kind: "decision";
|
|
1976
|
+
decision: string;
|
|
1977
|
+
};
|
|
1978
|
+
step: string;
|
|
1979
|
+
attempt: string;
|
|
1980
|
+
ordinal: number;
|
|
1981
|
+
retires: string[];
|
|
1982
|
+
inputs: Record<string, {
|
|
1983
|
+
kind: "input";
|
|
1984
|
+
} | {
|
|
1985
|
+
kind: "evidence";
|
|
1986
|
+
provider: string;
|
|
1987
|
+
immutable: boolean;
|
|
1988
|
+
detail: z.core.util.JSONType;
|
|
1989
|
+
} | {
|
|
1990
|
+
kind: "result";
|
|
1991
|
+
result: string;
|
|
1992
|
+
participant: string | null;
|
|
1993
|
+
decision: string | null;
|
|
1994
|
+
mode: "current" | "historical";
|
|
1995
|
+
} | null>;
|
|
1996
|
+
evidence: Record<string, z.core.util.JSONType>;
|
|
1997
|
+
assignments: ({
|
|
1998
|
+
context: "conversation";
|
|
1999
|
+
id: string;
|
|
2000
|
+
participant: string;
|
|
2001
|
+
activation: string;
|
|
2002
|
+
} | {
|
|
2003
|
+
context: "isolated";
|
|
2004
|
+
id: string;
|
|
2005
|
+
participant: string;
|
|
2006
|
+
thread: string;
|
|
2007
|
+
task: string;
|
|
2008
|
+
generation: number;
|
|
2009
|
+
lifetime: "instance" | "attempt";
|
|
2010
|
+
checks: string[];
|
|
2011
|
+
})[];
|
|
2012
|
+
} | {
|
|
2013
|
+
op: "observed";
|
|
2014
|
+
observations: {
|
|
2015
|
+
assignment: string;
|
|
2016
|
+
thread: string;
|
|
2017
|
+
task: string;
|
|
2018
|
+
generation: number;
|
|
2019
|
+
outcome: {
|
|
2020
|
+
kind: "accepted";
|
|
2021
|
+
submission: number;
|
|
2022
|
+
ending: number;
|
|
2023
|
+
output: z.core.util.JSONType;
|
|
2024
|
+
} | {
|
|
2025
|
+
kind: "ended";
|
|
2026
|
+
settlement: "completed" | "failed" | "stopped";
|
|
2027
|
+
detail: string;
|
|
2028
|
+
candidate: {
|
|
2029
|
+
submission: number;
|
|
2030
|
+
output: z.core.util.JSONType;
|
|
2031
|
+
} | null;
|
|
2032
|
+
report: string | null;
|
|
2033
|
+
} | {
|
|
2034
|
+
kind: "refused";
|
|
2035
|
+
detail: string;
|
|
2036
|
+
} | {
|
|
2037
|
+
kind: "unfinished";
|
|
2038
|
+
candidate: {
|
|
2039
|
+
submission: number;
|
|
2040
|
+
output: z.core.util.JSONType;
|
|
2041
|
+
} | null;
|
|
2042
|
+
report: string | null;
|
|
2043
|
+
};
|
|
2044
|
+
}[];
|
|
2045
|
+
} | {
|
|
2046
|
+
op: "stopped";
|
|
2047
|
+
attempt: string;
|
|
2048
|
+
reason: string;
|
|
2049
|
+
observations: {
|
|
2050
|
+
assignment: string;
|
|
2051
|
+
thread: string;
|
|
2052
|
+
task: string;
|
|
2053
|
+
generation: number;
|
|
2054
|
+
outcome: {
|
|
2055
|
+
kind: "accepted";
|
|
2056
|
+
submission: number;
|
|
2057
|
+
ending: number;
|
|
2058
|
+
output: z.core.util.JSONType;
|
|
2059
|
+
} | {
|
|
2060
|
+
kind: "ended";
|
|
2061
|
+
settlement: "completed" | "failed" | "stopped";
|
|
2062
|
+
detail: string;
|
|
2063
|
+
candidate: {
|
|
2064
|
+
submission: number;
|
|
2065
|
+
output: z.core.util.JSONType;
|
|
2066
|
+
} | null;
|
|
2067
|
+
report: string | null;
|
|
2068
|
+
} | {
|
|
2069
|
+
kind: "refused";
|
|
2070
|
+
detail: string;
|
|
2071
|
+
} | {
|
|
2072
|
+
kind: "unfinished";
|
|
2073
|
+
candidate: {
|
|
2074
|
+
submission: number;
|
|
2075
|
+
output: z.core.util.JSONType;
|
|
2076
|
+
} | null;
|
|
2077
|
+
report: string | null;
|
|
2078
|
+
};
|
|
2079
|
+
}[];
|
|
2080
|
+
} | {
|
|
2081
|
+
op: "completed";
|
|
2082
|
+
transition: string;
|
|
2083
|
+
cause: {
|
|
2084
|
+
kind: "opening";
|
|
2085
|
+
} | {
|
|
2086
|
+
kind: "routed";
|
|
2087
|
+
result: string;
|
|
2088
|
+
} | {
|
|
2089
|
+
kind: "decision";
|
|
2090
|
+
decision: string;
|
|
2091
|
+
};
|
|
2092
|
+
} | {
|
|
2093
|
+
op: "cancel-requested";
|
|
2094
|
+
operation_id: string;
|
|
2095
|
+
actor: string;
|
|
2096
|
+
reason: string;
|
|
2097
|
+
} | {
|
|
2098
|
+
op: "cancelled";
|
|
2099
|
+
operation_id: string;
|
|
2100
|
+
} | undefined;
|
|
2101
|
+
readSource: (source: DeepReadonly<import("../../records/journal.js").ExtensionRecord> | null) => {
|
|
2102
|
+
op: "decided";
|
|
2103
|
+
decision: string;
|
|
2104
|
+
operation_id: string;
|
|
2105
|
+
actor: string;
|
|
2106
|
+
attempt: string;
|
|
2107
|
+
reason: "gate" | "exhaustion" | "recovery";
|
|
2108
|
+
result: string | null;
|
|
2109
|
+
verdict: "approve" | "revise";
|
|
2110
|
+
option: string | null;
|
|
2111
|
+
feedback: string | null;
|
|
2112
|
+
restart: string[];
|
|
2113
|
+
} | {
|
|
2114
|
+
op: "opened";
|
|
2115
|
+
definition: string;
|
|
2116
|
+
canonical: CanonicalDefinition;
|
|
2117
|
+
input: z.core.util.JSONType;
|
|
2118
|
+
input_id: string;
|
|
2119
|
+
pins: {
|
|
2120
|
+
participants: Record<string, {
|
|
2121
|
+
configuration: {
|
|
2122
|
+
agent: string;
|
|
2123
|
+
route: {
|
|
2124
|
+
provider: string;
|
|
2125
|
+
model: string;
|
|
2126
|
+
thinking_effort: "low" | "high" | "none" | "medium" | "max" | null;
|
|
2127
|
+
};
|
|
2128
|
+
environment: {
|
|
2129
|
+
cwd: string;
|
|
2130
|
+
};
|
|
2131
|
+
installations: {
|
|
2132
|
+
installation_id: string;
|
|
2133
|
+
preset_id: string;
|
|
2134
|
+
config: z.core.util.JSONType;
|
|
2135
|
+
lifetime: "defining" | "configurable";
|
|
2136
|
+
}[];
|
|
2137
|
+
} | null;
|
|
2138
|
+
checks: Record<string, {
|
|
2139
|
+
config: z.core.util.JSONType;
|
|
2140
|
+
}>;
|
|
2141
|
+
}>;
|
|
2142
|
+
evidence: Record<string, {
|
|
2143
|
+
config: z.core.util.JSONType;
|
|
2144
|
+
}>;
|
|
2145
|
+
};
|
|
2146
|
+
} | {
|
|
2147
|
+
op: "entered";
|
|
2148
|
+
transition: string;
|
|
2149
|
+
cause: {
|
|
2150
|
+
kind: "opening";
|
|
2151
|
+
} | {
|
|
2152
|
+
kind: "routed";
|
|
2153
|
+
result: string;
|
|
2154
|
+
} | {
|
|
2155
|
+
kind: "decision";
|
|
2156
|
+
decision: string;
|
|
2157
|
+
};
|
|
2158
|
+
step: string;
|
|
2159
|
+
attempt: string;
|
|
2160
|
+
ordinal: number;
|
|
2161
|
+
retires: string[];
|
|
2162
|
+
inputs: Record<string, {
|
|
2163
|
+
kind: "input";
|
|
2164
|
+
} | {
|
|
2165
|
+
kind: "evidence";
|
|
2166
|
+
provider: string;
|
|
2167
|
+
immutable: boolean;
|
|
2168
|
+
detail: z.core.util.JSONType;
|
|
2169
|
+
} | {
|
|
2170
|
+
kind: "result";
|
|
2171
|
+
result: string;
|
|
2172
|
+
participant: string | null;
|
|
2173
|
+
decision: string | null;
|
|
2174
|
+
mode: "current" | "historical";
|
|
2175
|
+
} | null>;
|
|
2176
|
+
evidence: Record<string, z.core.util.JSONType>;
|
|
2177
|
+
assignments: ({
|
|
2178
|
+
context: "conversation";
|
|
2179
|
+
id: string;
|
|
2180
|
+
participant: string;
|
|
2181
|
+
activation: string;
|
|
2182
|
+
} | {
|
|
2183
|
+
context: "isolated";
|
|
2184
|
+
id: string;
|
|
2185
|
+
participant: string;
|
|
2186
|
+
thread: string;
|
|
2187
|
+
task: string;
|
|
2188
|
+
generation: number;
|
|
2189
|
+
lifetime: "instance" | "attempt";
|
|
2190
|
+
checks: string[];
|
|
2191
|
+
})[];
|
|
2192
|
+
} | {
|
|
2193
|
+
op: "observed";
|
|
2194
|
+
observations: {
|
|
2195
|
+
assignment: string;
|
|
2196
|
+
thread: string;
|
|
2197
|
+
task: string;
|
|
2198
|
+
generation: number;
|
|
2199
|
+
outcome: {
|
|
2200
|
+
kind: "accepted";
|
|
2201
|
+
submission: number;
|
|
2202
|
+
ending: number;
|
|
2203
|
+
output: z.core.util.JSONType;
|
|
2204
|
+
} | {
|
|
2205
|
+
kind: "ended";
|
|
2206
|
+
settlement: "completed" | "failed" | "stopped";
|
|
2207
|
+
detail: string;
|
|
2208
|
+
candidate: {
|
|
2209
|
+
submission: number;
|
|
2210
|
+
output: z.core.util.JSONType;
|
|
2211
|
+
} | null;
|
|
2212
|
+
report: string | null;
|
|
2213
|
+
} | {
|
|
2214
|
+
kind: "refused";
|
|
2215
|
+
detail: string;
|
|
2216
|
+
} | {
|
|
2217
|
+
kind: "unfinished";
|
|
2218
|
+
candidate: {
|
|
2219
|
+
submission: number;
|
|
2220
|
+
output: z.core.util.JSONType;
|
|
2221
|
+
} | null;
|
|
2222
|
+
report: string | null;
|
|
2223
|
+
};
|
|
2224
|
+
}[];
|
|
2225
|
+
} | {
|
|
2226
|
+
op: "stopped";
|
|
2227
|
+
attempt: string;
|
|
2228
|
+
reason: string;
|
|
2229
|
+
observations: {
|
|
2230
|
+
assignment: string;
|
|
2231
|
+
thread: string;
|
|
2232
|
+
task: string;
|
|
2233
|
+
generation: number;
|
|
2234
|
+
outcome: {
|
|
2235
|
+
kind: "accepted";
|
|
2236
|
+
submission: number;
|
|
2237
|
+
ending: number;
|
|
2238
|
+
output: z.core.util.JSONType;
|
|
2239
|
+
} | {
|
|
2240
|
+
kind: "ended";
|
|
2241
|
+
settlement: "completed" | "failed" | "stopped";
|
|
2242
|
+
detail: string;
|
|
2243
|
+
candidate: {
|
|
2244
|
+
submission: number;
|
|
2245
|
+
output: z.core.util.JSONType;
|
|
2246
|
+
} | null;
|
|
2247
|
+
report: string | null;
|
|
2248
|
+
} | {
|
|
2249
|
+
kind: "refused";
|
|
2250
|
+
detail: string;
|
|
2251
|
+
} | {
|
|
2252
|
+
kind: "unfinished";
|
|
2253
|
+
candidate: {
|
|
2254
|
+
submission: number;
|
|
2255
|
+
output: z.core.util.JSONType;
|
|
2256
|
+
} | null;
|
|
2257
|
+
report: string | null;
|
|
2258
|
+
};
|
|
2259
|
+
}[];
|
|
2260
|
+
} | {
|
|
2261
|
+
op: "completed";
|
|
2262
|
+
transition: string;
|
|
2263
|
+
cause: {
|
|
2264
|
+
kind: "opening";
|
|
2265
|
+
} | {
|
|
2266
|
+
kind: "routed";
|
|
2267
|
+
result: string;
|
|
2268
|
+
} | {
|
|
2269
|
+
kind: "decision";
|
|
2270
|
+
decision: string;
|
|
2271
|
+
};
|
|
2272
|
+
} | {
|
|
2273
|
+
op: "cancel-requested";
|
|
2274
|
+
operation_id: string;
|
|
2275
|
+
actor: string;
|
|
2276
|
+
reason: string;
|
|
2277
|
+
} | {
|
|
2278
|
+
op: "cancelled";
|
|
2279
|
+
operation_id: string;
|
|
2280
|
+
} | undefined;
|
|
2281
|
+
told: import("../../plugin.js").PluginProjection<import("../../services/extensionEvents.js").ToldNotices<{
|
|
2282
|
+
op: "decided";
|
|
2283
|
+
decision: string;
|
|
2284
|
+
operation_id: string;
|
|
2285
|
+
actor: string;
|
|
2286
|
+
attempt: string;
|
|
2287
|
+
reason: "gate" | "exhaustion" | "recovery";
|
|
2288
|
+
result: string | null;
|
|
2289
|
+
verdict: "approve" | "revise";
|
|
2290
|
+
option: string | null;
|
|
2291
|
+
feedback: string | null;
|
|
2292
|
+
restart: string[];
|
|
2293
|
+
} | {
|
|
2294
|
+
op: "opened";
|
|
2295
|
+
definition: string;
|
|
2296
|
+
canonical: CanonicalDefinition;
|
|
2297
|
+
input: z.core.util.JSONType;
|
|
2298
|
+
input_id: string;
|
|
2299
|
+
pins: {
|
|
2300
|
+
participants: Record<string, {
|
|
2301
|
+
configuration: {
|
|
2302
|
+
agent: string;
|
|
2303
|
+
route: {
|
|
2304
|
+
provider: string;
|
|
2305
|
+
model: string;
|
|
2306
|
+
thinking_effort: "low" | "high" | "none" | "medium" | "max" | null;
|
|
2307
|
+
};
|
|
2308
|
+
environment: {
|
|
2309
|
+
cwd: string;
|
|
2310
|
+
};
|
|
2311
|
+
installations: {
|
|
2312
|
+
installation_id: string;
|
|
2313
|
+
preset_id: string;
|
|
2314
|
+
config: z.core.util.JSONType;
|
|
2315
|
+
lifetime: "defining" | "configurable";
|
|
2316
|
+
}[];
|
|
2317
|
+
} | null;
|
|
2318
|
+
checks: Record<string, {
|
|
2319
|
+
config: z.core.util.JSONType;
|
|
2320
|
+
}>;
|
|
2321
|
+
}>;
|
|
2322
|
+
evidence: Record<string, {
|
|
2323
|
+
config: z.core.util.JSONType;
|
|
2324
|
+
}>;
|
|
2325
|
+
};
|
|
2326
|
+
} | {
|
|
2327
|
+
op: "entered";
|
|
2328
|
+
transition: string;
|
|
2329
|
+
cause: {
|
|
2330
|
+
kind: "opening";
|
|
2331
|
+
} | {
|
|
2332
|
+
kind: "routed";
|
|
2333
|
+
result: string;
|
|
2334
|
+
} | {
|
|
2335
|
+
kind: "decision";
|
|
2336
|
+
decision: string;
|
|
2337
|
+
};
|
|
2338
|
+
step: string;
|
|
2339
|
+
attempt: string;
|
|
2340
|
+
ordinal: number;
|
|
2341
|
+
retires: string[];
|
|
2342
|
+
inputs: Record<string, {
|
|
2343
|
+
kind: "input";
|
|
2344
|
+
} | {
|
|
2345
|
+
kind: "evidence";
|
|
2346
|
+
provider: string;
|
|
2347
|
+
immutable: boolean;
|
|
2348
|
+
detail: z.core.util.JSONType;
|
|
2349
|
+
} | {
|
|
2350
|
+
kind: "result";
|
|
2351
|
+
result: string;
|
|
2352
|
+
participant: string | null;
|
|
2353
|
+
decision: string | null;
|
|
2354
|
+
mode: "current" | "historical";
|
|
2355
|
+
} | null>;
|
|
2356
|
+
evidence: Record<string, z.core.util.JSONType>;
|
|
2357
|
+
assignments: ({
|
|
2358
|
+
context: "conversation";
|
|
2359
|
+
id: string;
|
|
2360
|
+
participant: string;
|
|
2361
|
+
activation: string;
|
|
2362
|
+
} | {
|
|
2363
|
+
context: "isolated";
|
|
2364
|
+
id: string;
|
|
2365
|
+
participant: string;
|
|
2366
|
+
thread: string;
|
|
2367
|
+
task: string;
|
|
2368
|
+
generation: number;
|
|
2369
|
+
lifetime: "instance" | "attempt";
|
|
2370
|
+
checks: string[];
|
|
2371
|
+
})[];
|
|
2372
|
+
} | {
|
|
2373
|
+
op: "observed";
|
|
2374
|
+
observations: {
|
|
2375
|
+
assignment: string;
|
|
2376
|
+
thread: string;
|
|
2377
|
+
task: string;
|
|
2378
|
+
generation: number;
|
|
2379
|
+
outcome: {
|
|
2380
|
+
kind: "accepted";
|
|
2381
|
+
submission: number;
|
|
2382
|
+
ending: number;
|
|
2383
|
+
output: z.core.util.JSONType;
|
|
2384
|
+
} | {
|
|
2385
|
+
kind: "ended";
|
|
2386
|
+
settlement: "completed" | "failed" | "stopped";
|
|
2387
|
+
detail: string;
|
|
2388
|
+
candidate: {
|
|
2389
|
+
submission: number;
|
|
2390
|
+
output: z.core.util.JSONType;
|
|
2391
|
+
} | null;
|
|
2392
|
+
report: string | null;
|
|
2393
|
+
} | {
|
|
2394
|
+
kind: "refused";
|
|
2395
|
+
detail: string;
|
|
2396
|
+
} | {
|
|
2397
|
+
kind: "unfinished";
|
|
2398
|
+
candidate: {
|
|
2399
|
+
submission: number;
|
|
2400
|
+
output: z.core.util.JSONType;
|
|
2401
|
+
} | null;
|
|
2402
|
+
report: string | null;
|
|
2403
|
+
};
|
|
2404
|
+
}[];
|
|
2405
|
+
} | {
|
|
2406
|
+
op: "stopped";
|
|
2407
|
+
attempt: string;
|
|
2408
|
+
reason: string;
|
|
2409
|
+
observations: {
|
|
2410
|
+
assignment: string;
|
|
2411
|
+
thread: string;
|
|
2412
|
+
task: string;
|
|
2413
|
+
generation: number;
|
|
2414
|
+
outcome: {
|
|
2415
|
+
kind: "accepted";
|
|
2416
|
+
submission: number;
|
|
2417
|
+
ending: number;
|
|
2418
|
+
output: z.core.util.JSONType;
|
|
2419
|
+
} | {
|
|
2420
|
+
kind: "ended";
|
|
2421
|
+
settlement: "completed" | "failed" | "stopped";
|
|
2422
|
+
detail: string;
|
|
2423
|
+
candidate: {
|
|
2424
|
+
submission: number;
|
|
2425
|
+
output: z.core.util.JSONType;
|
|
2426
|
+
} | null;
|
|
2427
|
+
report: string | null;
|
|
2428
|
+
} | {
|
|
2429
|
+
kind: "refused";
|
|
2430
|
+
detail: string;
|
|
2431
|
+
} | {
|
|
2432
|
+
kind: "unfinished";
|
|
2433
|
+
candidate: {
|
|
2434
|
+
submission: number;
|
|
2435
|
+
output: z.core.util.JSONType;
|
|
2436
|
+
} | null;
|
|
2437
|
+
report: string | null;
|
|
2438
|
+
};
|
|
2439
|
+
}[];
|
|
2440
|
+
} | {
|
|
2441
|
+
op: "completed";
|
|
2442
|
+
transition: string;
|
|
2443
|
+
cause: {
|
|
2444
|
+
kind: "opening";
|
|
2445
|
+
} | {
|
|
2446
|
+
kind: "routed";
|
|
2447
|
+
result: string;
|
|
2448
|
+
} | {
|
|
2449
|
+
kind: "decision";
|
|
2450
|
+
decision: string;
|
|
2451
|
+
};
|
|
2452
|
+
} | {
|
|
2453
|
+
op: "cancel-requested";
|
|
2454
|
+
operation_id: string;
|
|
2455
|
+
actor: string;
|
|
2456
|
+
reason: string;
|
|
2457
|
+
} | {
|
|
2458
|
+
op: "cancelled";
|
|
2459
|
+
operation_id: string;
|
|
2460
|
+
}>>;
|
|
2461
|
+
projection<State>(fold: {
|
|
2462
|
+
key: string;
|
|
2463
|
+
init(): State;
|
|
2464
|
+
apply(state: State, value: {
|
|
2465
|
+
op: "decided";
|
|
2466
|
+
decision: string;
|
|
2467
|
+
operation_id: string;
|
|
2468
|
+
actor: string;
|
|
2469
|
+
attempt: string;
|
|
2470
|
+
reason: "gate" | "exhaustion" | "recovery";
|
|
2471
|
+
result: string | null;
|
|
2472
|
+
verdict: "approve" | "revise";
|
|
2473
|
+
option: string | null;
|
|
2474
|
+
feedback: string | null;
|
|
2475
|
+
restart: string[];
|
|
2476
|
+
} | {
|
|
2477
|
+
op: "opened";
|
|
2478
|
+
definition: string;
|
|
2479
|
+
canonical: CanonicalDefinition;
|
|
2480
|
+
input: z.core.util.JSONType;
|
|
2481
|
+
input_id: string;
|
|
2482
|
+
pins: {
|
|
2483
|
+
participants: Record<string, {
|
|
2484
|
+
configuration: {
|
|
2485
|
+
agent: string;
|
|
2486
|
+
route: {
|
|
2487
|
+
provider: string;
|
|
2488
|
+
model: string;
|
|
2489
|
+
thinking_effort: "low" | "high" | "none" | "medium" | "max" | null;
|
|
2490
|
+
};
|
|
2491
|
+
environment: {
|
|
2492
|
+
cwd: string;
|
|
2493
|
+
};
|
|
2494
|
+
installations: {
|
|
2495
|
+
installation_id: string;
|
|
2496
|
+
preset_id: string;
|
|
2497
|
+
config: z.core.util.JSONType;
|
|
2498
|
+
lifetime: "defining" | "configurable";
|
|
2499
|
+
}[];
|
|
2500
|
+
} | null;
|
|
2501
|
+
checks: Record<string, {
|
|
2502
|
+
config: z.core.util.JSONType;
|
|
2503
|
+
}>;
|
|
2504
|
+
}>;
|
|
2505
|
+
evidence: Record<string, {
|
|
2506
|
+
config: z.core.util.JSONType;
|
|
2507
|
+
}>;
|
|
2508
|
+
};
|
|
2509
|
+
} | {
|
|
2510
|
+
op: "entered";
|
|
2511
|
+
transition: string;
|
|
2512
|
+
cause: {
|
|
2513
|
+
kind: "opening";
|
|
2514
|
+
} | {
|
|
2515
|
+
kind: "routed";
|
|
2516
|
+
result: string;
|
|
2517
|
+
} | {
|
|
2518
|
+
kind: "decision";
|
|
2519
|
+
decision: string;
|
|
2520
|
+
};
|
|
2521
|
+
step: string;
|
|
2522
|
+
attempt: string;
|
|
2523
|
+
ordinal: number;
|
|
2524
|
+
retires: string[];
|
|
2525
|
+
inputs: Record<string, {
|
|
2526
|
+
kind: "input";
|
|
2527
|
+
} | {
|
|
2528
|
+
kind: "evidence";
|
|
2529
|
+
provider: string;
|
|
2530
|
+
immutable: boolean;
|
|
2531
|
+
detail: z.core.util.JSONType;
|
|
2532
|
+
} | {
|
|
2533
|
+
kind: "result";
|
|
2534
|
+
result: string;
|
|
2535
|
+
participant: string | null;
|
|
2536
|
+
decision: string | null;
|
|
2537
|
+
mode: "current" | "historical";
|
|
2538
|
+
} | null>;
|
|
2539
|
+
evidence: Record<string, z.core.util.JSONType>;
|
|
2540
|
+
assignments: ({
|
|
2541
|
+
context: "conversation";
|
|
2542
|
+
id: string;
|
|
2543
|
+
participant: string;
|
|
2544
|
+
activation: string;
|
|
2545
|
+
} | {
|
|
2546
|
+
context: "isolated";
|
|
2547
|
+
id: string;
|
|
2548
|
+
participant: string;
|
|
2549
|
+
thread: string;
|
|
2550
|
+
task: string;
|
|
2551
|
+
generation: number;
|
|
2552
|
+
lifetime: "instance" | "attempt";
|
|
2553
|
+
checks: string[];
|
|
2554
|
+
})[];
|
|
2555
|
+
} | {
|
|
2556
|
+
op: "observed";
|
|
2557
|
+
observations: {
|
|
2558
|
+
assignment: string;
|
|
2559
|
+
thread: string;
|
|
2560
|
+
task: string;
|
|
2561
|
+
generation: number;
|
|
2562
|
+
outcome: {
|
|
2563
|
+
kind: "accepted";
|
|
2564
|
+
submission: number;
|
|
2565
|
+
ending: number;
|
|
2566
|
+
output: z.core.util.JSONType;
|
|
2567
|
+
} | {
|
|
2568
|
+
kind: "ended";
|
|
2569
|
+
settlement: "completed" | "failed" | "stopped";
|
|
2570
|
+
detail: string;
|
|
2571
|
+
candidate: {
|
|
2572
|
+
submission: number;
|
|
2573
|
+
output: z.core.util.JSONType;
|
|
2574
|
+
} | null;
|
|
2575
|
+
report: string | null;
|
|
2576
|
+
} | {
|
|
2577
|
+
kind: "refused";
|
|
2578
|
+
detail: string;
|
|
2579
|
+
} | {
|
|
2580
|
+
kind: "unfinished";
|
|
2581
|
+
candidate: {
|
|
2582
|
+
submission: number;
|
|
2583
|
+
output: z.core.util.JSONType;
|
|
2584
|
+
} | null;
|
|
2585
|
+
report: string | null;
|
|
2586
|
+
};
|
|
2587
|
+
}[];
|
|
2588
|
+
} | {
|
|
2589
|
+
op: "stopped";
|
|
2590
|
+
attempt: string;
|
|
2591
|
+
reason: string;
|
|
2592
|
+
observations: {
|
|
2593
|
+
assignment: string;
|
|
2594
|
+
thread: string;
|
|
2595
|
+
task: string;
|
|
2596
|
+
generation: number;
|
|
2597
|
+
outcome: {
|
|
2598
|
+
kind: "accepted";
|
|
2599
|
+
submission: number;
|
|
2600
|
+
ending: number;
|
|
2601
|
+
output: z.core.util.JSONType;
|
|
2602
|
+
} | {
|
|
2603
|
+
kind: "ended";
|
|
2604
|
+
settlement: "completed" | "failed" | "stopped";
|
|
2605
|
+
detail: string;
|
|
2606
|
+
candidate: {
|
|
2607
|
+
submission: number;
|
|
2608
|
+
output: z.core.util.JSONType;
|
|
2609
|
+
} | null;
|
|
2610
|
+
report: string | null;
|
|
2611
|
+
} | {
|
|
2612
|
+
kind: "refused";
|
|
2613
|
+
detail: string;
|
|
2614
|
+
} | {
|
|
2615
|
+
kind: "unfinished";
|
|
2616
|
+
candidate: {
|
|
2617
|
+
submission: number;
|
|
2618
|
+
output: z.core.util.JSONType;
|
|
2619
|
+
} | null;
|
|
2620
|
+
report: string | null;
|
|
2621
|
+
};
|
|
2622
|
+
}[];
|
|
2623
|
+
} | {
|
|
2624
|
+
op: "completed";
|
|
2625
|
+
transition: string;
|
|
2626
|
+
cause: {
|
|
2627
|
+
kind: "opening";
|
|
2628
|
+
} | {
|
|
2629
|
+
kind: "routed";
|
|
2630
|
+
result: string;
|
|
2631
|
+
} | {
|
|
2632
|
+
kind: "decision";
|
|
2633
|
+
decision: string;
|
|
2634
|
+
};
|
|
2635
|
+
} | {
|
|
2636
|
+
op: "cancel-requested";
|
|
2637
|
+
operation_id: string;
|
|
2638
|
+
actor: string;
|
|
2639
|
+
reason: string;
|
|
2640
|
+
} | {
|
|
2641
|
+
op: "cancelled";
|
|
2642
|
+
operation_id: string;
|
|
2643
|
+
}, event: import("../../records/journal.js").JournalEvent<"ext">): State;
|
|
2644
|
+
onFork?: "inherit" | "reset";
|
|
2645
|
+
}): import("../../plugin.js").PluginProjection<State>;
|
|
2646
|
+
};
|
|
2647
|
+
/** The `opened` row of an instance of `definition`: its id and readable copy, `input`, the host's first input id and its pins. */
|
|
2648
|
+
export declare function openedRow(definition: WorkflowDefinition, input: z.input<typeof JsonValueSchema>, inputId: string, pins: Pins): Opened;
|
|
2649
|
+
/** What a submission's result carries: the assignment it answers and the output, as submitted and validated. */
|
|
2650
|
+
declare const SubmissionSchema: z.ZodObject<{
|
|
2651
|
+
assignment: z.ZodString;
|
|
2652
|
+
output: z.ZodJSONSchema;
|
|
2653
|
+
}, z.core.$strict>;
|
|
2654
|
+
export type Submission = z.output<typeof SubmissionSchema>;
|
|
2655
|
+
/** The metadata a submission's result records, read back by {@link readSubmission}. */
|
|
2656
|
+
export declare const submissionMetadata: (submission: Submission) => Record<string, unknown>;
|
|
2657
|
+
/**
|
|
2658
|
+
* The submission `result` records: a successful result of {@link SUBMIT_TOOL} that concluded its
|
|
2659
|
+
* turn, so core's stop checks judge it as the answer; `undefined` for any other result.
|
|
2660
|
+
*/
|
|
2661
|
+
export declare function readSubmission(result: ToolResult): Submission | undefined;
|
|
2662
|
+
/**
|
|
2663
|
+
* The source of the one submission reminder an assignment gets per epoch: its activation, or the
|
|
2664
|
+
* person's latest input since (`epoch`, that row's seq). The stop check sends a root reply back
|
|
2665
|
+
* with it once per epoch and abstains once it is spent, so prose never advances the workflow.
|
|
2666
|
+
*/
|
|
2667
|
+
export declare const submissionReminder: {
|
|
2668
|
+
record: (value: {
|
|
2669
|
+
assignment: string;
|
|
2670
|
+
epoch: number;
|
|
2671
|
+
}) => import("../../records/journal.js").ExtensionRecord;
|
|
2672
|
+
parse: (value: {
|
|
2673
|
+
assignment: string;
|
|
2674
|
+
epoch: number;
|
|
2675
|
+
}) => {
|
|
2676
|
+
assignment: string;
|
|
2677
|
+
epoch: number;
|
|
2678
|
+
};
|
|
2679
|
+
entry: (value: {
|
|
2680
|
+
assignment: string;
|
|
2681
|
+
epoch: number;
|
|
2682
|
+
}, options: import("../../plugin.js").AppendOptions) => {
|
|
2683
|
+
type: "ext";
|
|
2684
|
+
data: {
|
|
2685
|
+
plugin: string;
|
|
2686
|
+
instance_id: string;
|
|
2687
|
+
kind: string;
|
|
2688
|
+
version: number;
|
|
2689
|
+
data: z.core.util.JSONType;
|
|
2690
|
+
};
|
|
2691
|
+
options: import("../../plugin.js").AppendOptions;
|
|
2692
|
+
};
|
|
2693
|
+
append(journal: import("../../plugin.js").PluginJournal, value: {
|
|
2694
|
+
assignment: string;
|
|
2695
|
+
epoch: number;
|
|
2696
|
+
}, options: import("../../plugin.js").AppendOptions): Promise<import("../../records/journal.js").JournalEvent<"ext">>;
|
|
2697
|
+
read(event: import("../../records/journal.js").JournalEvent): {
|
|
2698
|
+
assignment: string;
|
|
2699
|
+
epoch: number;
|
|
2700
|
+
} | undefined;
|
|
2701
|
+
contribution(message: {
|
|
2702
|
+
role?: import("../../records/journal.js").InputRole;
|
|
2703
|
+
content: string | readonly import("../../llm/content.js").ContentPartInput[];
|
|
2704
|
+
}, value: {
|
|
2705
|
+
assignment: string;
|
|
2706
|
+
epoch: number;
|
|
2707
|
+
}, options?: {
|
|
2708
|
+
sourceSeqs?: readonly import("../../records/journal.js").Seq[];
|
|
2709
|
+
}): import("../../records/journal.js").StepContribution;
|
|
2710
|
+
matchesSource(record: DeepReadonly<import("../../records/journal.js").ExtensionRecord>): boolean;
|
|
2711
|
+
rejection(reason: string, value: {
|
|
2712
|
+
assignment: string;
|
|
2713
|
+
epoch: number;
|
|
2714
|
+
}): {
|
|
2715
|
+
decision: "reject";
|
|
2716
|
+
reason: string;
|
|
2717
|
+
source: import("../../records/journal.js").ExtensionRecord;
|
|
2718
|
+
};
|
|
2719
|
+
readContribution: (event: import("../../records/journal.js").JournalEvent) => {
|
|
2720
|
+
assignment: string;
|
|
2721
|
+
epoch: number;
|
|
2722
|
+
} | undefined;
|
|
2723
|
+
readSource: (source: DeepReadonly<import("../../records/journal.js").ExtensionRecord> | null) => {
|
|
2724
|
+
assignment: string;
|
|
2725
|
+
epoch: number;
|
|
2726
|
+
} | undefined;
|
|
2727
|
+
told: import("../../plugin.js").PluginProjection<import("../../services/extensionEvents.js").ToldNotices<{
|
|
2728
|
+
assignment: string;
|
|
2729
|
+
epoch: number;
|
|
2730
|
+
}>>;
|
|
2731
|
+
projection<State>(fold: {
|
|
2732
|
+
key: string;
|
|
2733
|
+
init(): State;
|
|
2734
|
+
apply(state: State, value: {
|
|
2735
|
+
assignment: string;
|
|
2736
|
+
epoch: number;
|
|
2737
|
+
}, event: import("../../records/journal.js").JournalEvent<"ext">): State;
|
|
2738
|
+
onFork?: "inherit" | "reset";
|
|
2739
|
+
}): import("../../plugin.js").PluginProjection<State>;
|
|
2740
|
+
};
|
|
2741
|
+
/** The attempt that is `step`'s `ordinal`th entry. */
|
|
2742
|
+
export declare const attemptId: (instance: string, step: string, ordinal: number) => string;
|
|
2743
|
+
export declare const assignmentId: (attempt: string, participant: string) => string;
|
|
2744
|
+
/** The conversation generation `participant` runs on: 1, then one more for each restart a decision recorded. */
|
|
2745
|
+
export declare const generationOf: (generations: ReadonlyMap<string, number>, participant: string) => number;
|
|
2746
|
+
/** An attempt's result: an attempt produces at most one. */
|
|
2747
|
+
export declare const resultId: (attempt: string) => string;
|
|
2748
|
+
/** A decision is pending on one attempt for one reason. */
|
|
2749
|
+
export declare const decisionId: (attempt: string, reason: "gate" | "exhaustion" | "recovery") => string;
|
|
2750
|
+
/** The transition a cause makes: each cause makes at most one. */
|
|
2751
|
+
export declare function transitionId(instance: string, cause: TransitionCause): string;
|
|
2752
|
+
/**
|
|
2753
|
+
* The input a transition is written with: the scheduling input of the root assignment it opens,
|
|
2754
|
+
* whose claim activates it, or else the notice telling the root what happened.
|
|
2755
|
+
*/
|
|
2756
|
+
export declare const schedulingInputId: (transition: string) => string;
|
|
2757
|
+
/**
|
|
2758
|
+
* The source of the input a transition is written with: the root assignment it schedules, or `null`
|
|
2759
|
+
* for a notice of a transition that gives the root none; and the host decision that made it, if
|
|
2760
|
+
* one did. An identity apart from the assignment's presentation, so a short scheduling input never
|
|
2761
|
+
* counts as the detailed presentation.
|
|
2762
|
+
*/
|
|
2763
|
+
export declare const transitionNotice: {
|
|
2764
|
+
record: (value: {
|
|
2765
|
+
transition: string;
|
|
2766
|
+
assignment: string | null;
|
|
2767
|
+
decision: string | null;
|
|
2768
|
+
}) => import("../../records/journal.js").ExtensionRecord;
|
|
2769
|
+
parse: (value: {
|
|
2770
|
+
transition: string;
|
|
2771
|
+
assignment: string | null;
|
|
2772
|
+
decision: string | null;
|
|
2773
|
+
}) => {
|
|
2774
|
+
transition: string;
|
|
2775
|
+
assignment: string | null;
|
|
2776
|
+
decision: string | null;
|
|
2777
|
+
};
|
|
2778
|
+
entry: (value: {
|
|
2779
|
+
transition: string;
|
|
2780
|
+
assignment: string | null;
|
|
2781
|
+
decision: string | null;
|
|
2782
|
+
}, options: import("../../plugin.js").AppendOptions) => {
|
|
2783
|
+
type: "ext";
|
|
2784
|
+
data: {
|
|
2785
|
+
plugin: string;
|
|
2786
|
+
instance_id: string;
|
|
2787
|
+
kind: string;
|
|
2788
|
+
version: number;
|
|
2789
|
+
data: z.core.util.JSONType;
|
|
2790
|
+
};
|
|
2791
|
+
options: import("../../plugin.js").AppendOptions;
|
|
2792
|
+
};
|
|
2793
|
+
append(journal: import("../../plugin.js").PluginJournal, value: {
|
|
2794
|
+
transition: string;
|
|
2795
|
+
assignment: string | null;
|
|
2796
|
+
decision: string | null;
|
|
2797
|
+
}, options: import("../../plugin.js").AppendOptions): Promise<import("../../records/journal.js").JournalEvent<"ext">>;
|
|
2798
|
+
read(event: import("../../records/journal.js").JournalEvent): {
|
|
2799
|
+
transition: string;
|
|
2800
|
+
assignment: string | null;
|
|
2801
|
+
decision: string | null;
|
|
2802
|
+
} | undefined;
|
|
2803
|
+
contribution(message: {
|
|
2804
|
+
role?: import("../../records/journal.js").InputRole;
|
|
2805
|
+
content: string | readonly import("../../llm/content.js").ContentPartInput[];
|
|
2806
|
+
}, value: {
|
|
2807
|
+
transition: string;
|
|
2808
|
+
assignment: string | null;
|
|
2809
|
+
decision: string | null;
|
|
2810
|
+
}, options?: {
|
|
2811
|
+
sourceSeqs?: readonly import("../../records/journal.js").Seq[];
|
|
2812
|
+
}): import("../../records/journal.js").StepContribution;
|
|
2813
|
+
matchesSource(record: DeepReadonly<import("../../records/journal.js").ExtensionRecord>): boolean;
|
|
2814
|
+
rejection(reason: string, value: {
|
|
2815
|
+
transition: string;
|
|
2816
|
+
assignment: string | null;
|
|
2817
|
+
decision: string | null;
|
|
2818
|
+
}): {
|
|
2819
|
+
decision: "reject";
|
|
2820
|
+
reason: string;
|
|
2821
|
+
source: import("../../records/journal.js").ExtensionRecord;
|
|
2822
|
+
};
|
|
2823
|
+
readContribution: (event: import("../../records/journal.js").JournalEvent) => {
|
|
2824
|
+
transition: string;
|
|
2825
|
+
assignment: string | null;
|
|
2826
|
+
decision: string | null;
|
|
2827
|
+
} | undefined;
|
|
2828
|
+
readSource: (source: DeepReadonly<import("../../records/journal.js").ExtensionRecord> | null) => {
|
|
2829
|
+
transition: string;
|
|
2830
|
+
assignment: string | null;
|
|
2831
|
+
decision: string | null;
|
|
2832
|
+
} | undefined;
|
|
2833
|
+
told: import("../../plugin.js").PluginProjection<import("../../services/extensionEvents.js").ToldNotices<{
|
|
2834
|
+
transition: string;
|
|
2835
|
+
assignment: string | null;
|
|
2836
|
+
decision: string | null;
|
|
2837
|
+
}>>;
|
|
2838
|
+
projection<State>(fold: {
|
|
2839
|
+
key: string;
|
|
2840
|
+
init(): State;
|
|
2841
|
+
apply(state: State, value: {
|
|
2842
|
+
transition: string;
|
|
2843
|
+
assignment: string | null;
|
|
2844
|
+
decision: string | null;
|
|
2845
|
+
}, event: import("../../records/journal.js").JournalEvent<"ext">): State;
|
|
2846
|
+
onFork?: "inherit" | "reset";
|
|
2847
|
+
}): import("../../plugin.js").PluginProjection<State>;
|
|
2848
|
+
};
|
|
2849
|
+
export {};
|