@fungi.computer/oyster 0.0.0-stage → 0.1.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 +21 -0
- package/README.md +1134 -2
- package/dist/agents.d.ts +114 -0
- package/dist/agents.js +322 -0
- package/dist/app-builds.d.ts +210 -0
- package/dist/app-builds.js +499 -0
- package/dist/app-sandbox.d.ts +2 -0
- package/dist/app-sandbox.js +2 -0
- package/dist/app-sources.d.ts +31 -0
- package/dist/app-sources.js +370 -0
- package/dist/app-storage.d.ts +141 -0
- package/dist/app-storage.js +281 -0
- package/dist/apps/gate.d.ts +105 -0
- package/dist/apps/gate.js +273 -0
- package/dist/apps/index.d.ts +5 -0
- package/dist/apps/index.js +5 -0
- package/dist/apps/installation.d.ts +248 -0
- package/dist/apps/installation.js +307 -0
- package/dist/apps/operations.d.ts +8 -0
- package/dist/apps/operations.js +98 -0
- package/dist/apps/tools.d.ts +33 -0
- package/dist/apps/tools.js +17 -0
- package/dist/auth.d.ts +11 -0
- package/dist/auth.js +93 -0
- package/dist/backend-request.d.ts +3 -0
- package/dist/backend-request.js +53 -0
- package/dist/build/artifact-writer.d.ts +40 -0
- package/dist/build/artifact-writer.js +181 -0
- package/dist/build/build-jobs.d.ts +128 -0
- package/dist/build/build-jobs.js +203 -0
- package/dist/build/build-policy.d.ts +10 -0
- package/dist/build/build-policy.js +10 -0
- package/dist/build/build-step.d.ts +37 -0
- package/dist/build/build-step.js +28 -0
- package/dist/build/bundled-html.d.ts +7 -0
- package/dist/build/bundled-html.js +64 -0
- package/dist/build/candidate-builder.d.ts +68 -0
- package/dist/build/candidate-builder.js +91 -0
- package/dist/build/candidate-cli.d.ts +1 -0
- package/dist/build/candidate-cli.js +119 -0
- package/dist/build/candidate-cli.mjs +28170 -0
- package/dist/build/content-objects.d.ts +37 -0
- package/dist/build/content-objects.js +53 -0
- package/dist/build/definition-emission.d.ts +34 -0
- package/dist/build/definition-emission.js +201 -0
- package/dist/build/effect.d.ts +249 -0
- package/dist/build/effect.js +436 -0
- package/dist/build/git-environment.d.ts +9 -0
- package/dist/build/git-environment.js +60 -0
- package/dist/build/html-recipe.d.ts +20 -0
- package/dist/build/html-recipe.js +51 -0
- package/dist/build/local-build.d.ts +67 -0
- package/dist/build/local-build.js +1128 -0
- package/dist/build/snapshot-package-store.d.ts +12 -0
- package/dist/build/snapshot-package-store.js +36 -0
- package/dist/build/snapshot-program-scripts.d.ts +6 -0
- package/dist/build/snapshot-program-scripts.js +2 -0
- package/dist/build/snapshot-programs/snapshot-path.d.ts +2 -0
- package/dist/build/snapshot-programs/snapshot-path.js +6 -0
- package/dist/build/submission-contract.d.ts +828 -0
- package/dist/build/submission-contract.js +180 -0
- package/dist/build/workspace-build.d.ts +55 -0
- package/dist/build/workspace-build.js +200 -0
- package/dist/build-contract.d.ts +7 -0
- package/dist/build-contract.js +7 -0
- package/dist/build-egress.d.ts +62 -0
- package/dist/build-egress.js +148 -0
- package/dist/build-jobs.d.ts +2 -0
- package/dist/build-jobs.js +2 -0
- package/dist/build.d.ts +12 -0
- package/dist/build.js +14 -0
- package/dist/capability-descriptor.d.ts +46 -0
- package/dist/capability-descriptor.js +51 -0
- package/dist/catalog-frame.d.ts +39 -0
- package/dist/catalog-frame.js +72 -0
- package/dist/cause-class.d.ts +19 -0
- package/dist/cause-class.js +54 -0
- package/dist/cloudflare.d.ts +123 -0
- package/dist/cloudflare.js +391 -0
- package/dist/computer-terminal.d.ts +38 -0
- package/dist/computer-terminal.js +410 -0
- package/dist/computer.d.ts +60 -0
- package/dist/computer.js +33 -0
- package/dist/event-recipients.d.ts +57 -0
- package/dist/event-recipients.js +144 -0
- package/dist/facet-invocation.d.ts +4 -0
- package/dist/facet-invocation.js +45 -0
- package/dist/files.d.ts +42 -0
- package/dist/files.js +123 -0
- package/dist/frame-binding-wire-script.d.ts +2 -0
- package/dist/frame-binding-wire-script.js +1 -0
- package/dist/frame-binding-wire.d.ts +28 -0
- package/dist/frame-binding-wire.js +54 -0
- package/dist/git-admission.d.ts +52 -0
- package/dist/git-admission.js +188 -0
- package/dist/git-auth.d.ts +11 -0
- package/dist/git-auth.js +27 -0
- package/dist/git-door.d.ts +35 -0
- package/dist/git-door.js +108 -0
- package/dist/git-journal.d.ts +31 -0
- package/dist/git-journal.js +188 -0
- package/dist/git.d.ts +31 -0
- package/dist/git.js +64 -0
- package/dist/guest-policy.d.ts +9 -0
- package/dist/guest-policy.js +13 -0
- package/dist/host.d.ts +244 -0
- package/dist/host.js +1043 -0
- package/dist/index.d.ts +166 -0
- package/dist/index.js +320 -0
- package/dist/installation-consent.d.ts +79 -0
- package/dist/installation-consent.js +82 -0
- package/dist/internal/background-origins.d.ts +3 -0
- package/dist/internal/background-origins.js +8 -0
- package/dist/internal/delivery.d.ts +12 -0
- package/dist/internal/delivery.js +167 -0
- package/dist/internal/host-gate.d.ts +14 -0
- package/dist/internal/host-gate.js +62 -0
- package/dist/internal/registry-installations.d.ts +6 -0
- package/dist/internal/registry-installations.js +12 -0
- package/dist/invocation.d.ts +251 -0
- package/dist/invocation.js +377 -0
- package/dist/keys.d.ts +48 -0
- package/dist/keys.js +52 -0
- package/dist/mcp-owner.d.ts +27 -0
- package/dist/mcp-owner.js +155 -0
- package/dist/mcp.d.ts +89 -0
- package/dist/mcp.js +429 -0
- package/dist/media.d.ts +23 -0
- package/dist/media.js +12 -0
- package/dist/pack.d.ts +79 -0
- package/dist/pack.js +151 -0
- package/dist/page/capabilities.d.ts +23 -0
- package/dist/page/capabilities.js +256 -0
- package/dist/page/computer-handles.d.ts +79 -0
- package/dist/page/computer-handles.js +44 -0
- package/dist/page/gill-observation.d.ts +4 -0
- package/dist/page/gill-observation.js +31 -0
- package/dist/page/lifetime.d.ts +6 -0
- package/dist/page/lifetime.js +19 -0
- package/dist/page/mount.d.ts +163 -0
- package/dist/page/mount.js +390 -0
- package/dist/page/storage.d.ts +3 -0
- package/dist/page/storage.js +82 -0
- package/dist/page/terminal.d.ts +5 -0
- package/dist/page/terminal.js +7 -0
- package/dist/page/window-launch.d.ts +18 -0
- package/dist/page/window-launch.js +11 -0
- package/dist/page-script.d.ts +14 -0
- package/dist/page-script.js +5 -0
- package/dist/r2-files.d.ts +3 -0
- package/dist/r2-files.js +79 -0
- package/dist/release.d.ts +83 -0
- package/dist/release.js +167 -0
- package/dist/root-data.d.ts +86 -0
- package/dist/root-data.js +69 -0
- package/dist/shell/app-directory.d.ts +542 -0
- package/dist/shell/app-directory.js +199 -0
- package/dist/shell/browser-actions.d.ts +7 -0
- package/dist/shell/browser-actions.js +56 -0
- package/dist/shell/command-host.d.ts +112 -0
- package/dist/shell/command-host.js +502 -0
- package/dist/shell/commands.d.ts +25 -0
- package/dist/shell/commands.js +78 -0
- package/dist/shell/index.d.ts +8 -0
- package/dist/shell/index.js +8 -0
- package/dist/shell/keys.d.ts +41 -0
- package/dist/shell/keys.js +134 -0
- package/dist/shell/shell-module.d.ts +55 -0
- package/dist/shell/shell-module.js +86 -0
- package/dist/shell/window-manager.d.ts +124 -0
- package/dist/shell/window-manager.js +711 -0
- package/dist/shell/workbench-contract.d.ts +68 -0
- package/dist/shell/workbench-contract.js +1 -0
- package/dist/shell/workbench-directory.d.ts +332 -0
- package/dist/shell/workbench-directory.js +35 -0
- package/dist/shell/workbench-host-types.d.ts +96 -0
- package/dist/shell/workbench-host-types.js +1 -0
- package/dist/shell/workbench-host.d.ts +34 -0
- package/dist/shell/workbench-host.js +347 -0
- package/dist/shell/workbench-model.d.ts +192 -0
- package/dist/shell/workbench-model.js +53 -0
- package/dist/shell/workbench.d.ts +4 -0
- package/dist/shell/workbench.js +2 -0
- package/dist/source/fork.d.ts +27 -0
- package/dist/source/fork.js +46 -0
- package/dist/source/index.d.ts +10 -0
- package/dist/source/index.js +10 -0
- package/dist/source/seed-receipt.d.ts +53 -0
- package/dist/source/seed-receipt.js +18 -0
- package/dist/source/team-source.d.ts +32 -0
- package/dist/source/team-source.js +42 -0
- package/dist/source/template-push.d.ts +33 -0
- package/dist/source/template-push.js +223 -0
- package/dist/source/template-repository.d.ts +4 -0
- package/dist/source/template-repository.js +21 -0
- package/dist/source/template-seed.d.ts +68 -0
- package/dist/source/template-seed.js +80 -0
- package/dist/standalone/agent-directory.d.ts +4 -0
- package/dist/standalone/agent-directory.js +4 -0
- package/dist/standalone/agents.d.ts +220 -0
- package/dist/standalone/agents.js +795 -0
- package/dist/standalone/app-builds-binding.d.ts +36 -0
- package/dist/standalone/app-builds-binding.js +119 -0
- package/dist/standalone/app-set.d.ts +91 -0
- package/dist/standalone/app-set.js +395 -0
- package/dist/standalone/app-source.d.ts +41 -0
- package/dist/standalone/app-source.js +59 -0
- package/dist/standalone/builds.d.ts +18 -0
- package/dist/standalone/builds.js +101 -0
- package/dist/standalone/computer-egress.d.ts +37 -0
- package/dist/standalone/computer-egress.js +111 -0
- package/dist/standalone/computer.d.ts +122 -0
- package/dist/standalone/computer.js +714 -0
- package/dist/standalone/install-apps-cli.d.ts +2 -0
- package/dist/standalone/install-apps-cli.js +126 -0
- package/dist/standalone/instance.d.ts +35 -0
- package/dist/standalone/instance.js +74 -0
- package/dist/standalone/media.d.ts +76 -0
- package/dist/standalone/media.js +227 -0
- package/dist/standalone/preview.d.ts +51 -0
- package/dist/standalone/preview.js +167 -0
- package/dist/standalone/registry.d.ts +102 -0
- package/dist/standalone/registry.js +193 -0
- package/dist/standalone/tenancy.d.ts +42 -0
- package/dist/standalone/tenancy.js +241 -0
- package/dist/standalone/worker.d.ts +55 -0
- package/dist/standalone/worker.js +147 -0
- package/dist/standalone/workflow-authority-readers.d.ts +16 -0
- package/dist/standalone/workflow-authority-readers.js +35 -0
- package/dist/standalone/workflow-binding.d.ts +216 -0
- package/dist/standalone/workflow-binding.js +217 -0
- package/dist/standalone/workflow-events.d.ts +46 -0
- package/dist/standalone/workflow-events.js +39 -0
- package/dist/standalone/workflow-git-capture.d.ts +7 -0
- package/dist/standalone/workflow-git-capture.js +62 -0
- package/dist/standalone/workflow-host.d.ts +931 -0
- package/dist/standalone/workflow-host.js +751 -0
- package/dist/standalone/workflow-node-capture.d.ts +13 -0
- package/dist/standalone/workflow-node-capture.js +72 -0
- package/dist/standalone/workflow-root-authority.d.ts +27 -0
- package/dist/standalone/workflow-root-authority.js +87 -0
- package/dist/standalone/workflow-schedules.d.ts +52 -0
- package/dist/standalone/workflow-schedules.js +40 -0
- package/dist/standalone/workflow-trigger-host.d.ts +1694 -0
- package/dist/standalone/workflow-trigger-host.js +52 -0
- package/dist/standalone/workflows.d.ts +657 -0
- package/dist/standalone/workflows.js +554 -0
- package/dist/storage-frame.d.ts +64 -0
- package/dist/storage-frame.js +28 -0
- package/dist/tenancy/auth0.d.ts +64 -0
- package/dist/tenancy/auth0.js +198 -0
- package/dist/tenancy/cloudflare/rate-limit.d.ts +8 -0
- package/dist/tenancy/cloudflare/rate-limit.js +19 -0
- package/dist/tenancy/cloudflare/registry.d.ts +50 -0
- package/dist/tenancy/cloudflare/registry.js +301 -0
- package/dist/tenancy/cloudflare.d.ts +2 -0
- package/dist/tenancy/cloudflare.js +2 -0
- package/dist/tenancy/cold-directory.d.ts +13 -0
- package/dist/tenancy/cold-directory.js +43 -0
- package/dist/tenancy/contracts.d.ts +195 -0
- package/dist/tenancy/contracts.js +1 -0
- package/dist/tenancy/index.d.ts +19 -0
- package/dist/tenancy/index.js +156 -0
- package/dist/tenancy/owner-key.d.ts +26 -0
- package/dist/tenancy/owner-key.js +63 -0
- package/dist/tenancy/oyster.d.ts +4 -0
- package/dist/tenancy/oyster.js +25 -0
- package/dist/tenancy/registry-record.d.ts +7 -0
- package/dist/tenancy/registry-record.js +44 -0
- package/dist/tenancy/registry.d.ts +27 -0
- package/dist/tenancy/registry.js +138 -0
- package/dist/tenancy/resolve.d.ts +7 -0
- package/dist/tenancy/resolve.js +64 -0
- package/dist/tenant.d.ts +81 -0
- package/dist/tenant.js +71 -0
- package/dist/testing/capabilities.d.ts +29 -0
- package/dist/testing/capabilities.js +130 -0
- package/dist/testing/catalog.d.ts +3 -0
- package/dist/testing/catalog.js +53 -0
- package/dist/testing/index.d.ts +10 -0
- package/dist/testing/index.js +10 -0
- package/dist/testing/installation.d.ts +11 -0
- package/dist/testing/installation.js +25 -0
- package/dist/testing/native-worker.d.ts +21 -0
- package/dist/testing/native-worker.js +106 -0
- package/dist/testing/worker.d.ts +18 -0
- package/dist/testing/worker.js +67 -0
- package/dist/testing/workers-runtime.d.ts +24 -0
- package/dist/testing/workers-runtime.js +33 -0
- package/dist/webhook-delivery.d.ts +14 -0
- package/dist/webhook-delivery.js +17 -0
- package/dist/workers-git.d.ts +285 -0
- package/dist/workers-git.js +1174 -0
- package/dist/workers.d.ts +352 -0
- package/dist/workers.js +868 -0
- package/docs/api/README.md +82 -0
- package/docs/api/agents.md +332 -0
- package/docs/api/app-storage.md +209 -0
- package/docs/api/apps.md +1375 -0
- package/docs/api/auth.md +63 -0
- package/docs/api/build-contract.md +1304 -0
- package/docs/api/build.md +1712 -0
- package/docs/api/cloudflare.md +421 -0
- package/docs/api/computer.md +203 -0
- package/docs/api/files.md +117 -0
- package/docs/api/git.md +470 -0
- package/docs/api/host.md +1328 -0
- package/docs/api/index.md +430 -0
- package/docs/api/invocation.md +738 -0
- package/docs/api/keys.md +175 -0
- package/docs/api/mcp.md +301 -0
- package/docs/api/media.md +40 -0
- package/docs/api/modules.md +50 -0
- package/docs/api/pack.md +141 -0
- package/docs/api/page/mount.md +298 -0
- package/docs/api/root-data.md +111 -0
- package/docs/api/shell/app-directory.md +599 -0
- package/docs/api/shell/command-host.md +224 -0
- package/docs/api/shell/commands.md +197 -0
- package/docs/api/shell/keys.md +183 -0
- package/docs/api/shell/shell-module.md +204 -0
- package/docs/api/shell/window-manager.md +267 -0
- package/docs/api/shell/workbench-directory.md +119 -0
- package/docs/api/shell/workbench.md +205 -0
- package/docs/api/shell.md +1915 -0
- package/docs/api/tenancy/auth0.md +110 -0
- package/docs/api/tenancy/cloudflare.md +221 -0
- package/docs/api/tenancy/cold-directory.md +46 -0
- package/docs/api/tenancy/owner-key.md +63 -0
- package/docs/api/tenancy/registry.md +77 -0
- package/docs/api/tenancy/resolve.md +69 -0
- package/docs/api/tenancy.md +430 -0
- package/docs/api/tenant.md +194 -0
- package/docs/api/workers-git.md +1646 -0
- package/docs/api/workers.md +1691 -0
- package/docs/site/agent-quickstart.mdx +346 -0
- package/examples/standalone/worker.ts +7 -0
- package/examples/standalone/wrangler.jsonc +82 -0
- package/package.json +300 -3
|
@@ -0,0 +1,657 @@
|
|
|
1
|
+
import type { GraphStartRequest } from "@fungi.computer/braid/runtime";
|
|
2
|
+
import { DurableObject } from "cloudflare:workers";
|
|
3
|
+
import * as S from "effect/Schema";
|
|
4
|
+
import { GraphWorkflow, type GraphRunEnding, type GraphWorkflowBindings } from "@fungi.computer/braid/cloudflare";
|
|
5
|
+
import { type GraphReview, type GraphParams, type NodeCall, type NodeEvent, type NodeDispatcher } from "@fungi.computer/braid";
|
|
6
|
+
import { type StandaloneTenancyEnv } from "./tenancy.js";
|
|
7
|
+
import type { AppEventFact } from "@fungi.computer/puffball/app-event-facts";
|
|
8
|
+
import type { InvocationFacts } from "../invocation.js";
|
|
9
|
+
import type { OysterGitWorkerEnv, OysterGitWorkerHost } from "../workers-git.js";
|
|
10
|
+
import { type TenantScope } from "../tenant.js";
|
|
11
|
+
import type { GitWriter, RepositoryRef } from "@fungi.computer/agar/git";
|
|
12
|
+
import type { WorkflowGitPassResult } from "@fungi.computer/agar/computer-contracts";
|
|
13
|
+
import { reviewKey, type EventDisarmInput, type WorkflowGitPassRequest, type TriggerArmTarget, type ScheduleDisarmInput } from "./workflow-binding.js";
|
|
14
|
+
import type { StandaloneComputerEnv } from "./computer.js";
|
|
15
|
+
import type { StandaloneAgentsEnv } from "./agents.js";
|
|
16
|
+
import type { OysterMediaEnv } from "./media.js";
|
|
17
|
+
export type StandaloneWorkflowEnv = OysterGitWorkerEnv & StandaloneComputerEnv & StandaloneAgentsEnv & OysterMediaEnv & StandaloneTenancyEnv & GraphWorkflowBindings & {
|
|
18
|
+
WORKFLOW_RUNS: DurableObjectNamespace<StandaloneWorkflowRunsBase>;
|
|
19
|
+
};
|
|
20
|
+
/** Schedule time and the native alarm instant that delivers a due time. */
|
|
21
|
+
export type StandaloneScheduleClock = Readonly<{
|
|
22
|
+
now(): number;
|
|
23
|
+
alarmAt(due: number): number;
|
|
24
|
+
}>;
|
|
25
|
+
/** SQLite and the native Workflow binding belong to this standalone host; its root supplies `hostFor`. */
|
|
26
|
+
export declare abstract class StandaloneWorkflowRunsBase<Env extends StandaloneWorkflowEnv = StandaloneWorkflowEnv> extends DurableObject<Env> {
|
|
27
|
+
private readonly composed;
|
|
28
|
+
/** Schedule time and its native alarm instant; production is the wall clock. */
|
|
29
|
+
protected readonly scheduleClock: StandaloneScheduleClock;
|
|
30
|
+
private readonly owner;
|
|
31
|
+
/** The deployable root's host for one tenant; Workflow runs use the default tenant. */
|
|
32
|
+
protected abstract hostFor(scope: TenantScope): OysterGitWorkerHost;
|
|
33
|
+
constructor(ctx: DurableObjectState, env: Env);
|
|
34
|
+
/** Record the library this object serves; another name is a revocation. */
|
|
35
|
+
private nameLibrary;
|
|
36
|
+
/**
|
|
37
|
+
* Mint (or renew) the Git pass for the Git step a node frame is executing.
|
|
38
|
+
* Null when this library dispatched no such step; a step that does not match
|
|
39
|
+
* the frame's attested Workflow, member and Computer is a revocation.
|
|
40
|
+
*/
|
|
41
|
+
openWorkflowGitPass(raw: WorkflowGitPassRequest): Promise<WorkflowGitPassResult | null>;
|
|
42
|
+
/** The tenant Git door's per-request admission of a presented pass. */
|
|
43
|
+
admitWorkflowGitPass(passId: string, repository: RepositoryRef, scope: "read" | "write"): Promise<Extract<GitWriter, {
|
|
44
|
+
kind: "actor";
|
|
45
|
+
}> | null>;
|
|
46
|
+
/** A finished run's passes and recorded Git steps end with it. */
|
|
47
|
+
private endRunGit;
|
|
48
|
+
private libraryId;
|
|
49
|
+
/** Trigger controls open the library named by the admitted frame. */
|
|
50
|
+
private library;
|
|
51
|
+
/** Idempotently ensure a recorded run has its engine instance. */
|
|
52
|
+
private launch;
|
|
53
|
+
armSchedule(facts: InvocationFacts, input: TriggerArmTarget): Promise<{
|
|
54
|
+
kind: "armed";
|
|
55
|
+
scheduleId: string;
|
|
56
|
+
} | {
|
|
57
|
+
error: string;
|
|
58
|
+
kind?: undefined;
|
|
59
|
+
reason?: undefined;
|
|
60
|
+
} | {
|
|
61
|
+
kind: "refused";
|
|
62
|
+
reason: string;
|
|
63
|
+
readonly error?: undefined;
|
|
64
|
+
}>;
|
|
65
|
+
disarmSchedule(facts: InvocationFacts, input: ScheduleDisarmInput): Promise<{
|
|
66
|
+
kind: "not_found";
|
|
67
|
+
} | {
|
|
68
|
+
kind: "disarmed";
|
|
69
|
+
} | {
|
|
70
|
+
error: string;
|
|
71
|
+
}>;
|
|
72
|
+
schedules(facts: InvocationFacts): Promise<{
|
|
73
|
+
error: string;
|
|
74
|
+
schedules?: undefined;
|
|
75
|
+
} | {
|
|
76
|
+
schedules: {
|
|
77
|
+
scheduleId: string;
|
|
78
|
+
workflowId: string;
|
|
79
|
+
triggerId: string;
|
|
80
|
+
nextDueAt: number;
|
|
81
|
+
state: "active" | "finished" | "paused" | "cancelled";
|
|
82
|
+
lastError: string | null;
|
|
83
|
+
}[];
|
|
84
|
+
readonly error?: undefined;
|
|
85
|
+
}>;
|
|
86
|
+
armEventTrigger(facts: InvocationFacts, input: TriggerArmTarget): Promise<{
|
|
87
|
+
kind: "armed";
|
|
88
|
+
eventTriggerId: string;
|
|
89
|
+
} | {
|
|
90
|
+
error: string;
|
|
91
|
+
kind?: undefined;
|
|
92
|
+
reason?: undefined;
|
|
93
|
+
} | {
|
|
94
|
+
kind: "refused";
|
|
95
|
+
reason: string;
|
|
96
|
+
readonly error?: undefined;
|
|
97
|
+
}>;
|
|
98
|
+
disarmEventTrigger(facts: InvocationFacts, input: EventDisarmInput): Promise<{
|
|
99
|
+
kind: "disarmed";
|
|
100
|
+
} | {
|
|
101
|
+
kind: "not_found";
|
|
102
|
+
} | {
|
|
103
|
+
error: string;
|
|
104
|
+
}>;
|
|
105
|
+
eventTriggers(facts: InvocationFacts): Promise<{
|
|
106
|
+
error: string;
|
|
107
|
+
eventTriggers?: undefined;
|
|
108
|
+
} | {
|
|
109
|
+
eventTriggers: {
|
|
110
|
+
eventTriggerId: string;
|
|
111
|
+
workflowId: string;
|
|
112
|
+
triggerId: string;
|
|
113
|
+
emitterInstallationId: string;
|
|
114
|
+
event: string;
|
|
115
|
+
state: "active" | "paused";
|
|
116
|
+
lastError: string | null;
|
|
117
|
+
}[];
|
|
118
|
+
readonly error?: undefined;
|
|
119
|
+
}>;
|
|
120
|
+
/** Up to 50 runs of this library, newest first; this host has no per-member rule. */
|
|
121
|
+
runs(facts: InvocationFacts, input: {
|
|
122
|
+
workflowId?: string;
|
|
123
|
+
}): Promise<{
|
|
124
|
+
runs: ({
|
|
125
|
+
runId: string;
|
|
126
|
+
workflowId: string | undefined;
|
|
127
|
+
commit: string | undefined;
|
|
128
|
+
source: "manual" | "agent" | "key" | "event" | "schedule";
|
|
129
|
+
initiatedBy: Readonly<{
|
|
130
|
+
kind: "member";
|
|
131
|
+
memberId: string;
|
|
132
|
+
}> | Readonly<{
|
|
133
|
+
kind: "agent";
|
|
134
|
+
agentId: string;
|
|
135
|
+
grantorMemberId: string;
|
|
136
|
+
}> | Readonly<{
|
|
137
|
+
kind: "key";
|
|
138
|
+
keyId: string;
|
|
139
|
+
grantorMemberId: string;
|
|
140
|
+
}>;
|
|
141
|
+
startedAt: number;
|
|
142
|
+
} | {
|
|
143
|
+
triggerId: string;
|
|
144
|
+
runId: string;
|
|
145
|
+
workflowId: string | undefined;
|
|
146
|
+
commit: string | undefined;
|
|
147
|
+
source: "manual" | "agent" | "key" | "event" | "schedule";
|
|
148
|
+
initiatedBy: Readonly<{
|
|
149
|
+
kind: "member";
|
|
150
|
+
memberId: string;
|
|
151
|
+
}> | Readonly<{
|
|
152
|
+
kind: "agent";
|
|
153
|
+
agentId: string;
|
|
154
|
+
grantorMemberId: string;
|
|
155
|
+
}> | Readonly<{
|
|
156
|
+
kind: "key";
|
|
157
|
+
keyId: string;
|
|
158
|
+
grantorMemberId: string;
|
|
159
|
+
}>;
|
|
160
|
+
startedAt: number;
|
|
161
|
+
})[];
|
|
162
|
+
}>;
|
|
163
|
+
/** Native alarm delivery: fire every due schedule of this library. */
|
|
164
|
+
alarm(): Promise<void>;
|
|
165
|
+
/**
|
|
166
|
+
* The emitting App's Instance delivers each accepted event here. The
|
|
167
|
+
* emitter's live Release must declare the event and its payload schema
|
|
168
|
+
* must accept it before any armed trigger of this library fires.
|
|
169
|
+
*/
|
|
170
|
+
deliverEvent(fact: AppEventFact): Promise<"accepted">;
|
|
171
|
+
catalog(facts: InvocationFacts, input?: Readonly<{
|
|
172
|
+
installationId?: string;
|
|
173
|
+
}>): Promise<Readonly<{
|
|
174
|
+
error: "too_large";
|
|
175
|
+
}> | Readonly<{
|
|
176
|
+
apps: readonly Readonly<{
|
|
177
|
+
installationId: string;
|
|
178
|
+
appId: string;
|
|
179
|
+
displayName: string;
|
|
180
|
+
icon?: string;
|
|
181
|
+
capabilities?: import("@fungi.computer/braid/runtime").WorkflowCatalogEntry["capabilities"];
|
|
182
|
+
workflowPublishGranted: boolean;
|
|
183
|
+
workflowRunGranted: boolean;
|
|
184
|
+
methods: Readonly<Record<string, Readonly<{
|
|
185
|
+
pending?: true;
|
|
186
|
+
description: string;
|
|
187
|
+
effect: import("@fungi.computer/braid").Catalog[string]["methods"][string]["effect"];
|
|
188
|
+
approval: import("@fungi.computer/braid").Catalog[string]["methods"][string]["approval"];
|
|
189
|
+
requires: import("@fungi.computer/braid").Catalog[string]["methods"][string]["requires"];
|
|
190
|
+
digest: string;
|
|
191
|
+
}>>>;
|
|
192
|
+
events?: Readonly<Record<string, Readonly<{
|
|
193
|
+
description: string;
|
|
194
|
+
digest: string;
|
|
195
|
+
}>>>;
|
|
196
|
+
}>[];
|
|
197
|
+
}> | {
|
|
198
|
+
app: Readonly<{
|
|
199
|
+
installationId: string;
|
|
200
|
+
appId: string;
|
|
201
|
+
displayName: string;
|
|
202
|
+
icon?: string;
|
|
203
|
+
capabilities?: import("@fungi.computer/braid/runtime").RunCeiling["nodes"][number]["capabilities"];
|
|
204
|
+
workflowPublishGranted?: boolean;
|
|
205
|
+
workflowRunGranted?: boolean;
|
|
206
|
+
methods: import("@fungi.computer/braid").Catalog[string]["methods"];
|
|
207
|
+
events?: NonNullable<import("@fungi.computer/braid").Catalog[string]["events"]>;
|
|
208
|
+
}>;
|
|
209
|
+
} | {
|
|
210
|
+
error: "not_found";
|
|
211
|
+
}>;
|
|
212
|
+
start(facts: InvocationFacts, input: GraphStartRequest): Promise<(Readonly<{
|
|
213
|
+
apps: readonly import("@fungi.computer/braid/runtime").WorkflowCatalogEntry[];
|
|
214
|
+
}> & Record<"error", unknown>) | Readonly<{
|
|
215
|
+
kind: "invalid";
|
|
216
|
+
issues: readonly import("@fungi.computer/braid").Issue[];
|
|
217
|
+
}> | {
|
|
218
|
+
error: "not_granted";
|
|
219
|
+
kind?: undefined;
|
|
220
|
+
runId?: undefined;
|
|
221
|
+
planDigest?: undefined;
|
|
222
|
+
} | {
|
|
223
|
+
error: "invalid_publication";
|
|
224
|
+
kind?: undefined;
|
|
225
|
+
runId?: undefined;
|
|
226
|
+
planDigest?: undefined;
|
|
227
|
+
} | {
|
|
228
|
+
error: "invalid_input";
|
|
229
|
+
kind?: undefined;
|
|
230
|
+
runId?: undefined;
|
|
231
|
+
planDigest?: undefined;
|
|
232
|
+
} | {
|
|
233
|
+
kind: "conflict" | "replay" | "started";
|
|
234
|
+
runId: string;
|
|
235
|
+
planDigest: string;
|
|
236
|
+
readonly error?: undefined;
|
|
237
|
+
}>;
|
|
238
|
+
loadRun(installationId: string, runId: string): Promise<{
|
|
239
|
+
plan: {
|
|
240
|
+
readonly planDigest: string;
|
|
241
|
+
readonly definition: {
|
|
242
|
+
readonly format: "fungi.workflow/v1";
|
|
243
|
+
readonly output: {
|
|
244
|
+
readonly [x: string]: {
|
|
245
|
+
readonly node: string;
|
|
246
|
+
readonly port: string;
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
readonly input: {
|
|
250
|
+
readonly [x: string]: S.Json;
|
|
251
|
+
};
|
|
252
|
+
readonly title: string;
|
|
253
|
+
readonly apps: {
|
|
254
|
+
readonly [x: string]: {
|
|
255
|
+
readonly appId: string;
|
|
256
|
+
readonly role?: string | undefined;
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
readonly nodes: readonly ({
|
|
260
|
+
readonly id: string;
|
|
261
|
+
readonly kind: "code";
|
|
262
|
+
readonly source: string;
|
|
263
|
+
readonly input: {
|
|
264
|
+
readonly [x: string]: S.Json;
|
|
265
|
+
};
|
|
266
|
+
readonly output: {
|
|
267
|
+
readonly [x: string]: S.Json;
|
|
268
|
+
};
|
|
269
|
+
readonly values: {
|
|
270
|
+
readonly [x: string]: import("@fungi.computer/braid").Mapping;
|
|
271
|
+
};
|
|
272
|
+
} | {
|
|
273
|
+
readonly values: {
|
|
274
|
+
readonly [x: string]: import("@fungi.computer/braid").Mapping;
|
|
275
|
+
};
|
|
276
|
+
readonly method: string;
|
|
277
|
+
readonly kind: "app";
|
|
278
|
+
readonly id: string;
|
|
279
|
+
readonly app: string;
|
|
280
|
+
readonly methodDigest: string;
|
|
281
|
+
readonly retry?: {
|
|
282
|
+
readonly attempts: number;
|
|
283
|
+
} | undefined;
|
|
284
|
+
readonly gitAccess?: {
|
|
285
|
+
binding: string;
|
|
286
|
+
repository: string;
|
|
287
|
+
branches: string[];
|
|
288
|
+
} | {
|
|
289
|
+
binding: string;
|
|
290
|
+
repository: string;
|
|
291
|
+
access: "read";
|
|
292
|
+
} | undefined;
|
|
293
|
+
} | {
|
|
294
|
+
readonly kind: "review";
|
|
295
|
+
readonly id: string;
|
|
296
|
+
readonly title: string;
|
|
297
|
+
readonly reviewers: "runner" | "owners";
|
|
298
|
+
readonly show: readonly {
|
|
299
|
+
readonly node: string;
|
|
300
|
+
readonly port: string;
|
|
301
|
+
}[];
|
|
302
|
+
readonly timeout: number;
|
|
303
|
+
readonly choices?: readonly {
|
|
304
|
+
readonly id: string;
|
|
305
|
+
readonly label: string;
|
|
306
|
+
}[] | undefined;
|
|
307
|
+
} | {
|
|
308
|
+
readonly id: string;
|
|
309
|
+
readonly kind: "condition";
|
|
310
|
+
readonly test: import("@fungi.computer/braid").Predicate;
|
|
311
|
+
} | {
|
|
312
|
+
readonly id: string;
|
|
313
|
+
readonly kind: "map";
|
|
314
|
+
readonly over: {
|
|
315
|
+
readonly node: string;
|
|
316
|
+
readonly port: string;
|
|
317
|
+
};
|
|
318
|
+
readonly body: string;
|
|
319
|
+
readonly concurrency: number;
|
|
320
|
+
readonly maxItems: number;
|
|
321
|
+
} | {
|
|
322
|
+
readonly id: string;
|
|
323
|
+
readonly kind: "repeat";
|
|
324
|
+
readonly body: string;
|
|
325
|
+
readonly maxRounds: number;
|
|
326
|
+
readonly until: import("@fungi.computer/braid").Predicate;
|
|
327
|
+
} | {
|
|
328
|
+
readonly id: string;
|
|
329
|
+
readonly kind: "wait";
|
|
330
|
+
readonly for: number;
|
|
331
|
+
} | {
|
|
332
|
+
readonly id: string;
|
|
333
|
+
readonly kind: "transform";
|
|
334
|
+
readonly fields: {
|
|
335
|
+
readonly [x: string]: import("@fungi.computer/braid").Mapping;
|
|
336
|
+
};
|
|
337
|
+
})[];
|
|
338
|
+
readonly edges: readonly {
|
|
339
|
+
readonly from: {
|
|
340
|
+
readonly node: string;
|
|
341
|
+
readonly port: string;
|
|
342
|
+
};
|
|
343
|
+
readonly to: {
|
|
344
|
+
readonly node: string;
|
|
345
|
+
readonly port: string;
|
|
346
|
+
};
|
|
347
|
+
}[];
|
|
348
|
+
readonly description?: string | undefined;
|
|
349
|
+
readonly subgraphs?: {
|
|
350
|
+
readonly [x: string]: {
|
|
351
|
+
readonly input: {
|
|
352
|
+
readonly [x: string]: S.Json;
|
|
353
|
+
};
|
|
354
|
+
readonly nodes: readonly ({
|
|
355
|
+
readonly id: string;
|
|
356
|
+
readonly kind: "code";
|
|
357
|
+
readonly source: string;
|
|
358
|
+
readonly input: {
|
|
359
|
+
readonly [x: string]: S.Json;
|
|
360
|
+
};
|
|
361
|
+
readonly output: {
|
|
362
|
+
readonly [x: string]: S.Json;
|
|
363
|
+
};
|
|
364
|
+
readonly values: {
|
|
365
|
+
readonly [x: string]: import("@fungi.computer/braid").Mapping;
|
|
366
|
+
};
|
|
367
|
+
} | {
|
|
368
|
+
readonly values: {
|
|
369
|
+
readonly [x: string]: import("@fungi.computer/braid").Mapping;
|
|
370
|
+
};
|
|
371
|
+
readonly method: string;
|
|
372
|
+
readonly kind: "app";
|
|
373
|
+
readonly id: string;
|
|
374
|
+
readonly app: string;
|
|
375
|
+
readonly methodDigest: string;
|
|
376
|
+
readonly retry?: {
|
|
377
|
+
readonly attempts: number;
|
|
378
|
+
} | undefined;
|
|
379
|
+
readonly gitAccess?: {
|
|
380
|
+
binding: string;
|
|
381
|
+
repository: string;
|
|
382
|
+
branches: string[];
|
|
383
|
+
} | {
|
|
384
|
+
binding: string;
|
|
385
|
+
repository: string;
|
|
386
|
+
access: "read";
|
|
387
|
+
} | undefined;
|
|
388
|
+
} | {
|
|
389
|
+
readonly kind: "review";
|
|
390
|
+
readonly id: string;
|
|
391
|
+
readonly title: string;
|
|
392
|
+
readonly reviewers: "runner" | "owners";
|
|
393
|
+
readonly show: readonly {
|
|
394
|
+
readonly node: string;
|
|
395
|
+
readonly port: string;
|
|
396
|
+
}[];
|
|
397
|
+
readonly timeout: number;
|
|
398
|
+
readonly choices?: readonly {
|
|
399
|
+
readonly id: string;
|
|
400
|
+
readonly label: string;
|
|
401
|
+
}[] | undefined;
|
|
402
|
+
} | {
|
|
403
|
+
readonly id: string;
|
|
404
|
+
readonly kind: "condition";
|
|
405
|
+
readonly test: import("@fungi.computer/braid").Predicate;
|
|
406
|
+
} | {
|
|
407
|
+
readonly id: string;
|
|
408
|
+
readonly kind: "map";
|
|
409
|
+
readonly over: {
|
|
410
|
+
readonly node: string;
|
|
411
|
+
readonly port: string;
|
|
412
|
+
};
|
|
413
|
+
readonly body: string;
|
|
414
|
+
readonly concurrency: number;
|
|
415
|
+
readonly maxItems: number;
|
|
416
|
+
} | {
|
|
417
|
+
readonly id: string;
|
|
418
|
+
readonly kind: "repeat";
|
|
419
|
+
readonly body: string;
|
|
420
|
+
readonly maxRounds: number;
|
|
421
|
+
readonly until: import("@fungi.computer/braid").Predicate;
|
|
422
|
+
} | {
|
|
423
|
+
readonly id: string;
|
|
424
|
+
readonly kind: "wait";
|
|
425
|
+
readonly for: number;
|
|
426
|
+
} | {
|
|
427
|
+
readonly id: string;
|
|
428
|
+
readonly kind: "transform";
|
|
429
|
+
readonly fields: {
|
|
430
|
+
readonly [x: string]: import("@fungi.computer/braid").Mapping;
|
|
431
|
+
};
|
|
432
|
+
})[];
|
|
433
|
+
readonly edges: readonly {
|
|
434
|
+
readonly from: {
|
|
435
|
+
readonly node: string;
|
|
436
|
+
readonly port: string;
|
|
437
|
+
};
|
|
438
|
+
readonly to: {
|
|
439
|
+
readonly node: string;
|
|
440
|
+
readonly port: string;
|
|
441
|
+
};
|
|
442
|
+
}[];
|
|
443
|
+
readonly output: {
|
|
444
|
+
readonly [x: string]: {
|
|
445
|
+
readonly node: string;
|
|
446
|
+
readonly port: string;
|
|
447
|
+
};
|
|
448
|
+
};
|
|
449
|
+
};
|
|
450
|
+
} | undefined;
|
|
451
|
+
readonly triggers?: readonly ({
|
|
452
|
+
readonly id: string;
|
|
453
|
+
readonly on: "webhook";
|
|
454
|
+
readonly when?: import("@fungi.computer/braid").Predicate | undefined;
|
|
455
|
+
readonly input?: {
|
|
456
|
+
readonly [x: string]: import("@fungi.computer/braid").Mapping;
|
|
457
|
+
} | undefined;
|
|
458
|
+
readonly title?: string | undefined;
|
|
459
|
+
} | {
|
|
460
|
+
readonly id: string;
|
|
461
|
+
readonly on: "schedule";
|
|
462
|
+
readonly cron: {
|
|
463
|
+
readonly expression: string;
|
|
464
|
+
readonly timeZone: string;
|
|
465
|
+
};
|
|
466
|
+
readonly input?: {
|
|
467
|
+
readonly [x: string]: import("@fungi.computer/braid").Mapping;
|
|
468
|
+
} | undefined;
|
|
469
|
+
readonly title?: string | undefined;
|
|
470
|
+
} | {
|
|
471
|
+
readonly id: string;
|
|
472
|
+
readonly event: string;
|
|
473
|
+
readonly on: "event";
|
|
474
|
+
readonly app: string;
|
|
475
|
+
readonly eventDigest: string;
|
|
476
|
+
readonly repository?: import("@fungi.computer/braid").Mapping | undefined;
|
|
477
|
+
readonly when?: import("@fungi.computer/braid").Predicate | undefined;
|
|
478
|
+
readonly input?: {
|
|
479
|
+
readonly [x: string]: import("@fungi.computer/braid").Mapping;
|
|
480
|
+
} | undefined;
|
|
481
|
+
readonly title?: string | undefined;
|
|
482
|
+
})[] | undefined;
|
|
483
|
+
};
|
|
484
|
+
readonly catalog: {
|
|
485
|
+
readonly [x: string]: {
|
|
486
|
+
readonly methods: {
|
|
487
|
+
readonly [x: string]: {
|
|
488
|
+
readonly digest: string;
|
|
489
|
+
readonly output: {
|
|
490
|
+
readonly [x: string]: S.Json;
|
|
491
|
+
};
|
|
492
|
+
readonly input: {
|
|
493
|
+
readonly [x: string]: S.Json;
|
|
494
|
+
};
|
|
495
|
+
readonly approval: "none" | "queue" | "simulate";
|
|
496
|
+
readonly description: string;
|
|
497
|
+
readonly effect: "read" | "write" | "external";
|
|
498
|
+
readonly requires: readonly string[];
|
|
499
|
+
readonly pending?: true | undefined;
|
|
500
|
+
};
|
|
501
|
+
};
|
|
502
|
+
readonly events?: {
|
|
503
|
+
readonly [x: string]: {
|
|
504
|
+
readonly digest: string;
|
|
505
|
+
readonly description: string;
|
|
506
|
+
readonly payload: {
|
|
507
|
+
readonly [x: string]: S.Json;
|
|
508
|
+
};
|
|
509
|
+
};
|
|
510
|
+
} | undefined;
|
|
511
|
+
};
|
|
512
|
+
};
|
|
513
|
+
readonly bindings: {
|
|
514
|
+
readonly [x: string]: {
|
|
515
|
+
kind: "team-source";
|
|
516
|
+
} | {
|
|
517
|
+
appId: string;
|
|
518
|
+
installationId: string;
|
|
519
|
+
};
|
|
520
|
+
};
|
|
521
|
+
readonly estimatedSteps: number;
|
|
522
|
+
readonly requiredBindings: readonly {
|
|
523
|
+
readonly method: string;
|
|
524
|
+
readonly installationId: string;
|
|
525
|
+
readonly output: {
|
|
526
|
+
readonly [x: string]: S.Json;
|
|
527
|
+
};
|
|
528
|
+
readonly input: {
|
|
529
|
+
readonly [x: string]: S.Json;
|
|
530
|
+
};
|
|
531
|
+
readonly approval: "none" | "queue" | "simulate";
|
|
532
|
+
readonly description: string;
|
|
533
|
+
readonly effect: "read" | "write" | "external";
|
|
534
|
+
readonly requires: readonly string[];
|
|
535
|
+
readonly app: string;
|
|
536
|
+
readonly pending?: true | undefined;
|
|
537
|
+
}[];
|
|
538
|
+
};
|
|
539
|
+
input: {
|
|
540
|
+
readonly [x: string]: S.Json;
|
|
541
|
+
};
|
|
542
|
+
}>;
|
|
543
|
+
beforeNode(event: NodeEvent): Promise<{
|
|
544
|
+
readonly kind: "admitted";
|
|
545
|
+
} | {
|
|
546
|
+
readonly kind: "refused";
|
|
547
|
+
readonly code: "invalid_input" | "revoked" | "not_granted" | "invalid_output" | "member_revoked" | "workflow_run_revoked" | "computer_revoked" | "budget_exhausted" | "unknown_method";
|
|
548
|
+
}>;
|
|
549
|
+
dispatch(call: NodeCall): Promise<{
|
|
550
|
+
readonly kind: "complete";
|
|
551
|
+
readonly output: S.Json;
|
|
552
|
+
readonly costMilliunits: number;
|
|
553
|
+
} | {
|
|
554
|
+
readonly kind: "refused";
|
|
555
|
+
readonly code: "invalid_input" | "revoked" | "not_granted" | "invalid_output" | "member_revoked" | "workflow_run_revoked" | "computer_revoked" | "budget_exhausted" | "unknown_method";
|
|
556
|
+
} | {
|
|
557
|
+
readonly kind: "pending_approval";
|
|
558
|
+
readonly actionId: string;
|
|
559
|
+
} | {
|
|
560
|
+
readonly kind: "pending";
|
|
561
|
+
readonly retryAfterMs: number;
|
|
562
|
+
}>;
|
|
563
|
+
recordEvent(event: NodeEvent): Promise<void>;
|
|
564
|
+
openReview(review: GraphReview): Promise<number>;
|
|
565
|
+
answerReview(facts: InvocationFacts, raw: typeof reviewKey.Type): Promise<{
|
|
566
|
+
result: string;
|
|
567
|
+
}>;
|
|
568
|
+
/** Record the engine's ending, then report it to the run's declared delivery. */
|
|
569
|
+
terminal(runId: string, ending: GraphRunEnding): Promise<void>;
|
|
570
|
+
/**
|
|
571
|
+
* One idempotent follow-up into the run's declared delivery Session, however
|
|
572
|
+
* the run started, through the same Session send that the AGENTS binding
|
|
573
|
+
* uses. Delivery never changes the run's recorded outcome.
|
|
574
|
+
*/
|
|
575
|
+
private report;
|
|
576
|
+
status(facts: InvocationFacts, raw: {
|
|
577
|
+
runId: string;
|
|
578
|
+
}): Promise<{
|
|
579
|
+
error: string;
|
|
580
|
+
runId?: undefined;
|
|
581
|
+
planDigest?: undefined;
|
|
582
|
+
title?: undefined;
|
|
583
|
+
outcome?: undefined;
|
|
584
|
+
events?: undefined;
|
|
585
|
+
reviews?: undefined;
|
|
586
|
+
status?: undefined;
|
|
587
|
+
output?: undefined;
|
|
588
|
+
} | {
|
|
589
|
+
runId: string;
|
|
590
|
+
planDigest: string;
|
|
591
|
+
title: string;
|
|
592
|
+
outcome: "terminal" | "cancelled" | "active" | null;
|
|
593
|
+
events: readonly {
|
|
594
|
+
readonly state: "running" | "queued" | "failed" | "complete" | "waiting" | "skipped";
|
|
595
|
+
readonly runId: string;
|
|
596
|
+
readonly nodeId: string;
|
|
597
|
+
readonly iteration: string;
|
|
598
|
+
readonly attempt: number;
|
|
599
|
+
readonly output?: {
|
|
600
|
+
readonly [x: string]: S.Json;
|
|
601
|
+
} | undefined;
|
|
602
|
+
readonly costMilliunits?: number | undefined;
|
|
603
|
+
readonly graphId?: string | undefined;
|
|
604
|
+
readonly poll?: number | undefined;
|
|
605
|
+
readonly recordedAt?: number | undefined;
|
|
606
|
+
readonly durationMs?: number | undefined;
|
|
607
|
+
readonly outputDigest?: string | undefined;
|
|
608
|
+
readonly errorMessage?: string | undefined;
|
|
609
|
+
readonly refusal?: string | undefined;
|
|
610
|
+
}[];
|
|
611
|
+
reviews: {
|
|
612
|
+
review: {
|
|
613
|
+
readonly show: readonly S.Json[];
|
|
614
|
+
readonly title: string;
|
|
615
|
+
readonly timeout: number;
|
|
616
|
+
readonly runId: string;
|
|
617
|
+
readonly nodeId: string;
|
|
618
|
+
readonly reviewers: "runner" | "owners";
|
|
619
|
+
readonly iteration: string;
|
|
620
|
+
readonly instanceId: string;
|
|
621
|
+
readonly eventType: string;
|
|
622
|
+
readonly choices?: readonly string[];
|
|
623
|
+
};
|
|
624
|
+
status: "closed" | "pending" | "answered" | "delivered" | "timed_out";
|
|
625
|
+
openedAt: number;
|
|
626
|
+
expiresAt: number;
|
|
627
|
+
}[];
|
|
628
|
+
status: "unknown" | "running" | "queued" | "errored" | "complete" | "waiting" | "paused" | "terminated" | "waitingForPause";
|
|
629
|
+
output: {} | null;
|
|
630
|
+
error: {
|
|
631
|
+
name: string;
|
|
632
|
+
message: string;
|
|
633
|
+
} | null;
|
|
634
|
+
}>;
|
|
635
|
+
cancel(facts: InvocationFacts, raw: {
|
|
636
|
+
runId: string;
|
|
637
|
+
}): Promise<{
|
|
638
|
+
kind: string;
|
|
639
|
+
reason: string;
|
|
640
|
+
} | {
|
|
641
|
+
kind: string;
|
|
642
|
+
reason?: undefined;
|
|
643
|
+
}>;
|
|
644
|
+
}
|
|
645
|
+
/** The SAME extracted interpreter as Hub, with this host's owned ports. */
|
|
646
|
+
export declare class StandaloneGraphWorkflow extends GraphWorkflow<StandaloneWorkflowEnv> {
|
|
647
|
+
protected codeExecution(): {
|
|
648
|
+
sandbox: Readonly<{
|
|
649
|
+
adapter?: string;
|
|
650
|
+
buildSha?: string;
|
|
651
|
+
execute: (request: import("@fungi.computer/mycelium").SandboxRequest, signal: AbortSignal) => Promise<import("@fungi.computer/mycelium").SandboxValue>;
|
|
652
|
+
}>;
|
|
653
|
+
timeoutMs: number;
|
|
654
|
+
};
|
|
655
|
+
protected dispatcher(params: GraphParams): NodeDispatcher;
|
|
656
|
+
protected terminalTriggerRun(params: GraphParams, ending: GraphRunEnding): Promise<void>;
|
|
657
|
+
}
|