forgeos 0.1.0-alpha.63 → 0.1.0-alpha.64
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/AGENTS.md +1 -1
- package/CHANGELOG.md +19 -0
- package/docs/agent-fabric.md +252 -0
- package/package.json +7 -4
- package/schemas/agent-fabric/v0.1/control-event.schema.json +281 -0
- package/scripts/field-test-forgeos.mjs +11 -2
- package/src/forge/_generated/releaseManifest.json +1 -1
- package/src/forge/_generated/releaseManifest.ts +3 -3
- package/src/forge/agent-adapters/index.ts +18 -14
- package/src/forge/agent-adapters/types.ts +1 -1
- package/src/forge/agent-fabric/adapter.ts +131 -0
- package/src/forge/agent-fabric/authority.ts +298 -0
- package/src/forge/agent-fabric/canonical.ts +135 -0
- package/src/forge/agent-fabric/conductor.ts +754 -0
- package/src/forge/agent-fabric/dictionary.ts +12 -0
- package/src/forge/agent-fabric/errors.ts +32 -0
- package/src/forge/agent-fabric/hardened-conductor.ts +485 -0
- package/src/forge/agent-fabric/hardened-reducer.ts +211 -0
- package/src/forge/agent-fabric/index.ts +18 -0
- package/src/forge/agent-fabric/journal.ts +116 -0
- package/src/forge/agent-fabric/local-approval-window.ts +169 -0
- package/src/forge/agent-fabric/local-coding-worker.ts +190 -0
- package/src/forge/agent-fabric/local-control-store.ts +239 -0
- package/src/forge/agent-fabric/local-paths.ts +18 -0
- package/src/forge/agent-fabric/local-task-contract.ts +142 -0
- package/src/forge/agent-fabric/local-task-inbox.ts +199 -0
- package/src/forge/agent-fabric/local-task-server.ts +207 -0
- package/src/forge/agent-fabric/local-task-service.ts +494 -0
- package/src/forge/agent-fabric/p0a.ts +104 -0
- package/src/forge/agent-fabric/p0b-model-adapter.ts +404 -0
- package/src/forge/agent-fabric/planning.ts +155 -0
- package/src/forge/agent-fabric/reducer.ts +863 -0
- package/src/forge/agent-fabric/resource-ledger.ts +266 -0
- package/src/forge/agent-fabric/serialized-local-adapter.ts +60 -0
- package/src/forge/agent-fabric/types.ts +424 -0
- package/src/forge/agent-fabric/validation.ts +500 -0
- package/src/forge/agent-memory/bridge.ts +82 -52
- package/src/forge/agent-memory/mcp.ts +59 -9
- package/src/forge/agent-memory/sources/codex-hook-runner.mjs +12 -113
- package/src/forge/cli/commands.ts +4 -0
- package/src/forge/cli/fabric.ts +83 -0
- package/src/forge/cli/main.ts +7 -0
- package/src/forge/cli/new.ts +16 -4
- package/src/forge/cli/parse.ts +21 -0
- package/src/forge/cli/verify.ts +4 -1
- package/src/forge/compiler/app-graph/tsconfig-hash.ts +41 -4
- package/src/forge/compiler/package-graph/dts-extractor.ts +14 -1
- package/src/forge/impact/index.ts +18 -21
- package/src/forge/runtime/ai/providers.ts +19 -4
- package/src/forge/version.ts +1 -1
- package/templates/agent-workroom/package.json +1 -0
- package/templates/agent-workroom/pnpm-workspace.yaml +2 -0
- package/templates/b2b-support-web/package.json +1 -0
- package/templates/b2b-support-web/pnpm-workspace.yaml +2 -0
- package/templates/b2b-support-web/web/package.json +1 -1
- package/templates/minimal-web/package.json +1 -0
- package/templates/minimal-web/pnpm-workspace.yaml +2 -0
- package/templates/nuxt-web/.yarnrc.yml +1 -0
- package/templates/nuxt-web/package.json +1 -0
- package/templates/nuxt-web/pnpm-workspace.yaml +2 -0
- package/templates/nuxt-web/web/package.json +1 -0
- package/templates/vendor-access/package.json +1 -0
- package/templates/vendor-access/pnpm-workspace.yaml +2 -0
package/AGENTS.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @forge-generated generator=0.1.0-alpha.
|
|
1
|
+
// @forge-generated generator=0.1.0-alpha.64 input=5bea3de626e4a7db3a5bbe226a820619b19a6e1347922b0a4f97fedf6654c489 content=721818a6f9a664aa898092d4aa5cd68cbbd8ad6e150c7d3ad3ef785a2e3fcf53
|
|
2
2
|
# AGENTS.md
|
|
3
3
|
|
|
4
4
|
<!-- forge-generated:start -->
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# forgeos
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.64
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#9](https://github.com/Stahldavid/forge/pull/9) [`ea0e5b6`](https://github.com/Stahldavid/forge/commit/ea0e5b6067e520d40cca23b461ca53d057ef0aca) Thanks [@Stahldavid](https://github.com/Stahldavid)! - Add the experimental Forge Agent Fabric P0a protocol kernel with replay-prevalidated authoritative transitions, exact GoalContract/authorization binding, attenuated grants, journal-coupled resource accounting, globally unique attempt identities, fenced attempt-bound permits, non-terminal uncertainty observations, content-bound outcome provenance, deterministic replay, and adversarial conformance tests.
|
|
8
|
+
|
|
9
|
+
- [#54](https://github.com/Stahldavid/forge/pull/54) [`8721bb5`](https://github.com/Stahldavid/forge/commit/8721bb5466b337ccac75d7212c6a6e597bc338ac) Thanks [@Stahldavid](https://github.com/Stahldavid)! - Add the experimental Agent Fabric P0b-A bounded model adapter behind the P0a authorization, permit, and result boundary. Model invocation binds the provider target, context, and materialization to one attempt; enforces finite request, response, token, and time limits; blocks hidden retries and redirects; and treats ambiguous execution as uncertainty. A fixed loopback Ollama path supports keyless local inference. Model output remains non-authoritative; tools, delegation, persistent recovery, and production readiness are outside this release.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#57](https://github.com/Stahldavid/forge/pull/57) [`98c3211`](https://github.com/Stahldavid/forge/commit/98c321103d7771a38dc27a5720b336ff8c817f83) Thanks [@Stahldavid](https://github.com/Stahldavid)! - Add an experimental local `forge fabric` coding task flow with durable proposal and
|
|
14
|
+
control records, visible owner review, a bounded Ollama attempt, isolated Git diff
|
|
15
|
+
materialization, and a separate result decision. Keep MCP task mutation disabled
|
|
16
|
+
and correct Codex hook trust reporting for synthetic smoke events.
|
|
17
|
+
|
|
18
|
+
- [#58](https://github.com/Stahldavid/forge/pull/58) [`a4da2d0`](https://github.com/Stahldavid/forge/commit/a4da2d0eb5b84737bf56ae7ad5924ba16cee6669) Thanks [@Stahldavid](https://github.com/Stahldavid)! - Add a single local Agent Fabric owner process so CLI and MCP clients share the
|
|
19
|
+
same PGlite-backed task service. MCP can submit untrusted proposals and read
|
|
20
|
+
status while owner approval, execution, and diff acceptance remain outside MCP.
|
|
21
|
+
|
|
3
22
|
## 0.1.0-alpha.63
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
# Forge Agent Fabric
|
|
2
|
+
|
|
3
|
+
Forge Agent Fabric is an experimental protocol-oriented execution layer for dynamically materialized agents and workflows. It extends Forge's existing compiler, outbox, actions, workflows, policy, and agent runtime rather than replacing them.
|
|
4
|
+
|
|
5
|
+
## Implementation status
|
|
6
|
+
|
|
7
|
+
The deterministic P0a protocol kernel and the bounded P0b-A model adapter are implemented.
|
|
8
|
+
P0b-A invokes one real model through the existing P0a permit and result boundary. Its
|
|
9
|
+
accepted scope and exact adoption evidence are recorded in
|
|
10
|
+
[`P0B_A_ADOPTION_RECORD.md`](./architecture/agent-fabric/P0B_A_ADOPTION_RECORD.md).
|
|
11
|
+
|
|
12
|
+
The local coding pilot has bounded proposal validation, a single-process PGlite
|
|
13
|
+
control journal, browser-based owner review, an isolated Ollama coding worker,
|
|
14
|
+
and MCP proposal/status tools backed by a local owner process. It does not make
|
|
15
|
+
a production persistence or security claim. Its scope and remaining gates are
|
|
16
|
+
in [`P0B_B_LOCAL_CODING_SCOPE.md`](./architecture/agent-fabric/P0B_B_LOCAL_CODING_SCOPE.md).
|
|
17
|
+
|
|
18
|
+
The following remain explicitly deferred and must not be inferred from architecture notes, historical handoffs, or local experiments:
|
|
19
|
+
|
|
20
|
+
- model-selected tools, plugins or child delegation beyond P0b-A;
|
|
21
|
+
- PGlite-backed production persistence/outbox integration for Agent Fabric;
|
|
22
|
+
- consequential-effect brokers and reconciliation against real systems;
|
|
23
|
+
- recovery epochs and integrity-unknown recovery;
|
|
24
|
+
- adaptive model routing/harness compilation beyond the P0a contracts;
|
|
25
|
+
- plugin promotion, persistent memory, and governed self-evolution;
|
|
26
|
+
- production deployment or production security claims.
|
|
27
|
+
|
|
28
|
+
## P0a scope
|
|
29
|
+
|
|
30
|
+
The first vertical implements a deterministic control kernel with:
|
|
31
|
+
|
|
32
|
+
- explicit `OwnerAuthorization`, `GoalContract`, `RunPlanRevision`, `PlanDelta`, `AgentSpec`, `HarnessSpec`, `ExecutionProfile`, and `EffectiveRunSpec` contracts;
|
|
33
|
+
- an immutable-by-copy control journal with sequence, predecessor, digest chain, and deterministic reducer;
|
|
34
|
+
- owner authorization ingress through an injected verifier, with content-bound verification evidence recorded in the journal and revalidated during replay;
|
|
35
|
+
- root grants bound to an explicit verified owner authorization;
|
|
36
|
+
- exact binding between a permit's grant/root authorization and the `GoalContract.authorityInvocationId` of its active plan;
|
|
37
|
+
- child grants with monotonic attenuation and transitive revocation;
|
|
38
|
+
- resource reservation plus child-grant registration as one in-memory transactional operation;
|
|
39
|
+
- a Conductor-owned internal `ResourceLedger`, seeded from constructor definitions and hydrated from authoritative replay on resume;
|
|
40
|
+
- replay-side reconstruction of consumable, capacity, and counter accounting from trusted resource definitions and journaled reservation transitions;
|
|
41
|
+
- globally unique attempt identities, one claim lineage per attempt, and at most one execution permit per attempt;
|
|
42
|
+
- durable dispatch intent, non-authoritative offers, atomic claims, leases, fencing, and attempt-bound permits;
|
|
43
|
+
- deterministic adapter protocol behavior;
|
|
44
|
+
- worker result reports bound to permit, intent, plan revision, `EffectiveRunSpec`, and fencing generation;
|
|
45
|
+
- replay-side recomputation of the canonical `WorkerResultReport` digest from the persisted outcome fields;
|
|
46
|
+
- authoritative `succeeded | failed` outcome commit that preserves result-report provenance and rejects stale or revoked ancestry;
|
|
47
|
+
- late `AttemptUncertaintyObservation` evidence that does **not** become a terminal authoritative outcome and therefore does not by itself block retry;
|
|
48
|
+
- plan revisions that preserve `GoalContract` and workflow program identity and are exactly derivable from a registered `PlanDelta`;
|
|
49
|
+
- runtime event validation and a closed JSON Schema envelope/payload model;
|
|
50
|
+
- crash/replay reconstruction without re-running a planner.
|
|
51
|
+
|
|
52
|
+
P0a intentionally does not implement external effects, persistent memory, model routing, plugin promotion, or production deployment.
|
|
53
|
+
|
|
54
|
+
## Live transition rule: replay-valid before append
|
|
55
|
+
|
|
56
|
+
The public P0a `ForgeAgentConductor` wraps the underlying journal with replay prevalidation. Before a new authoritative event is appended, the candidate prefix is reconstructed with the same sequence/predecessor/digest rules and must be accepted by the hardened replay semantics.
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
current trusted journal prefix
|
|
60
|
+
+ candidate event
|
|
61
|
+
↓
|
|
62
|
+
hardened replay validation
|
|
63
|
+
↓
|
|
64
|
+
accept → append with journal CAS
|
|
65
|
+
reject → no append
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
This closes the class of bugs where a public Conductor method returns success but leaves an append-only journal that the same P0a implementation cannot replay.
|
|
69
|
+
|
|
70
|
+
The Conductor also pins its clock once per synchronous state transition so payload timestamps and the enclosing authoritative event timestamp are derived from the same clock observation when equality is part of the protocol invariant.
|
|
71
|
+
|
|
72
|
+
## Authority model
|
|
73
|
+
|
|
74
|
+
A workflow may choose how to work, but it may not create authority. The reference Conductor requires an `OwnerAuthorizationVerifier` before it can admit an `OwnerAuthorization`. The verification result is content-bound to the authorization digest and the replay path requires a trust-bound verifier to validate the recorded evidence again.
|
|
75
|
+
|
|
76
|
+
Root grants must remain within that authorization. Child grants must be strict subsets of their parent and remain invalid if:
|
|
77
|
+
|
|
78
|
+
- any ancestor is revoked or expired;
|
|
79
|
+
- the root authorization is revoked or expired;
|
|
80
|
+
- the child reservation is missing or has been released.
|
|
81
|
+
|
|
82
|
+
A grant is not sufficient merely because its capabilities/sources/targets fit an intent. Before permit issuance and during replay, P0a resolves:
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
permit
|
|
86
|
+
→ dispatch intent
|
|
87
|
+
→ active RunPlanRevision
|
|
88
|
+
→ GoalContract
|
|
89
|
+
→ GoalContract.authorityInvocationId
|
|
90
|
+
→ exact OwnerAuthorization
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
The grant's `rootAuthorizationId` must equal that goal authority invocation, the authorization must include the goal, and authorization/plan/intent must belong to the same root execution.
|
|
94
|
+
|
|
95
|
+
```text
|
|
96
|
+
authenticated owner authorization
|
|
97
|
+
-> trusted ingress verification
|
|
98
|
+
-> root execution grant
|
|
99
|
+
-> derived child grant + resource reservation
|
|
100
|
+
-> dispatch intent
|
|
101
|
+
-> dispatch offer (not authority)
|
|
102
|
+
-> scheduling claim + lease + fencing
|
|
103
|
+
-> attempt execution permit
|
|
104
|
+
-> executor startup report
|
|
105
|
+
-> worker result report
|
|
106
|
+
-> conditional authoritative succeeded|failed outcome commit
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
The concrete production identity provider, signature/trust-root mechanism, and credential lifecycle are deliberately outside P0a; the kernel only requires a verifier contract with deterministic/offline verification of recorded admission evidence.
|
|
110
|
+
|
|
111
|
+
## Attempt identity and result binding
|
|
112
|
+
|
|
113
|
+
`attemptId` is a stream-global identity, not merely a caller convenience. A second claim may not reuse an existing attempt ID, even for another intent, and an attempt may receive only one execution permit. Hardened replay independently checks the one-per-attempt permit invariant so a fabricated journal cannot bypass the live Conductor check.
|
|
114
|
+
|
|
115
|
+
A `WorkerResultReport` is explicitly bound to:
|
|
116
|
+
|
|
117
|
+
- `attemptId`;
|
|
118
|
+
- `permitId`;
|
|
119
|
+
- `intentId`;
|
|
120
|
+
- `planRevisionId`;
|
|
121
|
+
- `effectiveRunSpecDigest`;
|
|
122
|
+
- `fencingToken`.
|
|
123
|
+
|
|
124
|
+
The report digest covers those fields as well as status, result digest, evidence digests and report time. `commitOutcome()` runtime-validates the report and compares it against the persisted permit/claim/intent lineage before it can become authoritative. Hardened replay reconstructs the report representation from the persisted outcome fields and recomputes the digest; a journal cannot claim an unrelated `reportDigest` while keeping different report fields.
|
|
125
|
+
|
|
126
|
+
## Resource atomicity and replay
|
|
127
|
+
|
|
128
|
+
P0a uses `ResourceLedger.transaction()` to make reservation and child-grant journal registration atomic within the in-memory reference implementation. If journal registration fails, the ledger snapshot is restored, including consumable, capacity, and counter state.
|
|
129
|
+
|
|
130
|
+
The public Conductor does **not** retain caller-owned mutable ledger state as authority. When resource definitions are supplied at construction, it clones those definitions into a Conductor-owned internal ledger. On resume from an existing journal, the internal ledger is hydrated from the authoritative replay projection before new resource transitions are allowed. An empty constructor seed therefore cannot erase prior usage, and later out-of-band mutations of the caller's seed cannot change authority state. A conflicting non-empty seed fails closed.
|
|
131
|
+
|
|
132
|
+
The replay path does not accept a reservation merely because its shape matches a child grant. Resource definitions and limits are supplied through the replay trust context; reservation transitions are reapplied to reconstructed global/owner accounting. Duplicate resources, unknown resources, invalid transitions, or aggregate global overcommit fail closed.
|
|
133
|
+
|
|
134
|
+
Reservation `consume` and `release` operations have journaled transitions when performed through the Conductor. Releasing the reservation backing a derived grant makes that grant lineage non-current for future permits/startups/outcomes.
|
|
135
|
+
|
|
136
|
+
This remains an in-memory protocol proof. A later persistence slice must implement the same atomicity and journal coupling with a real transactional store/outbox.
|
|
137
|
+
|
|
138
|
+
## Uncertainty is not an authoritative outcome
|
|
139
|
+
|
|
140
|
+
P0a deliberately separates:
|
|
141
|
+
|
|
142
|
+
```text
|
|
143
|
+
AttemptUncertaintyObservation
|
|
144
|
+
!=
|
|
145
|
+
AuthoritativeOutcomeCommit
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
A late worker/adapter observation may say that startup or completion is uncertain even after a lease, permit, plan or grant has become stale. The observation is retained as evidence, but it does not make the intent terminal and cannot by itself block a later scheduling claim.
|
|
149
|
+
|
|
150
|
+
`executeP0aActivity()` preserves uncertainty not only when an adapter throws or explicitly returns `unknown`, but also when a positive startup/result report arrives too late or otherwise fails authoritative admission. The stale positive report does not regain authority; the control plane stores only a non-terminal uncertainty observation describing the rejected report path.
|
|
151
|
+
|
|
152
|
+
Only a currently authorized control path may commit a terminal P0a outcome, and P0a terminal outcomes are limited to `succeeded | failed`.
|
|
153
|
+
|
|
154
|
+
## Replay model and trust boundary
|
|
155
|
+
|
|
156
|
+
`MemoryControlJournal` stores cloned/frozen events and returns clones to callers. Every committed envelope carries:
|
|
157
|
+
|
|
158
|
+
- monotonic sequence;
|
|
159
|
+
- predecessor event ID;
|
|
160
|
+
- predecessor event digest;
|
|
161
|
+
- event digest;
|
|
162
|
+
- monotonic authoritative timestamp.
|
|
163
|
+
|
|
164
|
+
The public `replayControlState()` adds hardened protocol checks over the deterministic reducer and revalidates:
|
|
165
|
+
|
|
166
|
+
- a single `rootExecutionId` for the control stream;
|
|
167
|
+
- the digest chain and event shape;
|
|
168
|
+
- trusted owner-authorization evidence;
|
|
169
|
+
- exact GoalContract ↔ grant/root-authorization binding for execution permits;
|
|
170
|
+
- grant ancestry, reservation currentness and revocation;
|
|
171
|
+
- resource accounting against trust-bound definitions;
|
|
172
|
+
- global attempt/resource budgets;
|
|
173
|
+
- stream-unique event/idempotency/result identities;
|
|
174
|
+
- globally unique attempt identity;
|
|
175
|
+
- at most one permit per attempt;
|
|
176
|
+
- exact plan-delta lineage;
|
|
177
|
+
- claims, permits, startup and authoritative outcome bindings;
|
|
178
|
+
- canonical `WorkerResultReport` digest consistency.
|
|
179
|
+
|
|
180
|
+
Malformed replay input is normalized to `AgentFabricError(AF_INVALID_EVENT)` rather than leaking implementation-level exceptions such as `TypeError`.
|
|
181
|
+
|
|
182
|
+
The event hash chain is an **integrity mechanism, not a signature or proof of storage origin**. P0a assumes the journal prefix supplied for authoritative replay comes from the trusted journal/storage boundary. The reducer determines whether that prefix is semantically admissible; production durable storage/authentication of journal bytes is intentionally deferred to the persistence slice.
|
|
183
|
+
|
|
184
|
+
This distinction is important: arbitrary attacker-created bytes do not become authoritative merely because they form a self-consistent hash chain.
|
|
185
|
+
|
|
186
|
+
## Canonicalization scope
|
|
187
|
+
|
|
188
|
+
P0a currently uses `forge-canonical-json/v0.1`, a deterministic TypeScript/JavaScript reference profile with SHA-256. Canonicalization is defined over the JSON data model, not arbitrary JavaScript object behavior: objects must be plain or null-prototype data objects with own enumerable data properties, arrays must be dense and cannot carry extra/symbol properties, accessors are rejected, and an own property named `__proto__` is preserved as ordinary data and therefore participates in the canonical bytes and digest. This prevents different admitted in-memory values from collapsing to the same canonical representation through JavaScript prototype semantics.
|
|
189
|
+
|
|
190
|
+
The profile is **not** claimed to be the final cross-language canonicalization standard. A future protocol revision must adopt a cross-language profile (for example RFC 8785/JCS or an equivalently specified profile) with shared test vectors before Java/Python/Rust implementations are expected to produce identical digests.
|
|
191
|
+
|
|
192
|
+
## Public API
|
|
193
|
+
|
|
194
|
+
The experimental package API is exported only through:
|
|
195
|
+
|
|
196
|
+
```ts
|
|
197
|
+
import {
|
|
198
|
+
ForgeAgentConductor,
|
|
199
|
+
MemoryControlJournal,
|
|
200
|
+
ResourceLedger,
|
|
201
|
+
DeterministicTestAdapter,
|
|
202
|
+
replayControlState,
|
|
203
|
+
} from "forgeos/agent-fabric";
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
That public entry point exposes the hardened Conductor and hardened replay functions. The lower-level implementation modules remain internal implementation detail of the experimental P0a package surface.
|
|
207
|
+
|
|
208
|
+
## Local coding pilot (experimental)
|
|
209
|
+
|
|
210
|
+
The framework checkout also exposes a bounded single-owner CLI path. Run these commands
|
|
211
|
+
from the root of a trusted Git repository with Ollama running and `qwen3:0.6b`
|
|
212
|
+
installed. This pilot uses no hosted API key or Codex model turn.
|
|
213
|
+
|
|
214
|
+
```text
|
|
215
|
+
node bin/forge.mjs fabric capabilities --json
|
|
216
|
+
node bin/forge.mjs fabric propose --file task.json --json
|
|
217
|
+
node bin/forge.mjs fabric status <task-id> --json
|
|
218
|
+
node bin/forge.mjs fabric review <task-id> --json
|
|
219
|
+
node bin/forge.mjs fabric run <task-id> --json
|
|
220
|
+
node bin/forge.mjs fabric review-result <task-id> --json
|
|
221
|
+
node bin/forge.mjs fabric serve --json
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
`task.json` is an untrusted proposal. Its required fields are `schemaVersion: 1`,
|
|
225
|
+
`repositoryId`, the full `baseCommit`, `goal`, `acceptanceCriteria`, `nonObjectives`,
|
|
226
|
+
`sourcePaths`, `writablePaths`, `requestedModelTargetId: "target:ollama:local"`, and
|
|
227
|
+
`limits` with `maximumAttempts`, `maximumWallClockMs`, `maximumOutputTokens`,
|
|
228
|
+
`maximumContextBytes`, `maximumPatchBytes`, and a Unix millisecond `expiresAt`.
|
|
229
|
+
`review` opens a local browser window showing the exact proposal and digest; `run`
|
|
230
|
+
consumes one approved model attempt and writes a diff in an isolated Git worktree.
|
|
231
|
+
`review-result` shows the recorded diff for a separate owner decision. Acceptance
|
|
232
|
+
records a decision only; it does not alter the original checkout or merge code.
|
|
233
|
+
|
|
234
|
+
The local store lives under `.forge/local/agent-fabric` and has one PGlite process
|
|
235
|
+
owner. Start `forge fabric serve` to keep that owner running while separate CLI
|
|
236
|
+
and MCP clients connect through a loopback endpoint. The endpoint token stays in
|
|
237
|
+
the local repository store and is not printed. The MCP tools `fabric_propose` and
|
|
238
|
+
`fabric_status` use that same owner; they cannot approve, run, or accept a task.
|
|
239
|
+
Without a running owner, CLI commands open the store for a single operation and
|
|
240
|
+
MCP task tools report that the owner is unavailable. A crashed model attempt with
|
|
241
|
+
a committed permit and no outcome remains
|
|
242
|
+
uncertain; a repeated `run` does not spend another attempt. A committed model result
|
|
243
|
+
can be materialized after restart. The existing MCP server reports the boundary
|
|
244
|
+
through `fabric_capabilities`. The popup is
|
|
245
|
+
a cooperative same-account interaction, so it is not a security boundary against
|
|
246
|
+
an agent with unrestricted shell or UI control. The model receives only approved
|
|
247
|
+
source files and cannot run shell commands. The Git worktree confines patch
|
|
248
|
+
materialization, but it is not a container or VM sandbox.
|
|
249
|
+
|
|
250
|
+
Maintainers can run `bun scripts/agent-fabric-local-smoke.ts` for an opt-in real
|
|
251
|
+
Ollama fixture. That script injects a synthetic test approval and confirms a diff;
|
|
252
|
+
it does not prove the human popup flow or coding quality on real projects.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "forgeos",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.64",
|
|
4
4
|
"description": "Agent-native application framework and compiler for building Forge apps without a mandatory dashboard.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"scripts/field-test-forgeos.mjs",
|
|
14
14
|
"docs/cair-protocol.md",
|
|
15
15
|
"docs/forge-protocol.md",
|
|
16
|
+
"docs/agent-fabric.md",
|
|
16
17
|
"examples/go-billing/",
|
|
17
18
|
"examples/java-billing/",
|
|
18
19
|
"!examples/**/target/**",
|
|
@@ -48,7 +49,8 @@
|
|
|
48
49
|
"./react": "./src/forge/react/index.ts",
|
|
49
50
|
"./vue": "./src/forge/vue/index.ts",
|
|
50
51
|
"./server": "./src/forge/server.ts",
|
|
51
|
-
"./policy": "./src/forge/policy.ts"
|
|
52
|
+
"./policy": "./src/forge/policy.ts",
|
|
53
|
+
"./agent-fabric": "./src/forge/agent-fabric/index.ts"
|
|
52
54
|
},
|
|
53
55
|
"scripts": {
|
|
54
56
|
"test": "node ./bin/forge-bun.mjs test --timeout 120000",
|
|
@@ -103,6 +105,7 @@
|
|
|
103
105
|
"@ai-sdk/anthropic": "^3.0.84",
|
|
104
106
|
"@ai-sdk/openai": "^3.0.71",
|
|
105
107
|
"@electric-sql/pglite": "^0.2.17",
|
|
108
|
+
"@types/react": "^19.2.17",
|
|
106
109
|
"ai": "^6.0.205",
|
|
107
110
|
"jose": "^6.2.3",
|
|
108
111
|
"postgres": "^3.4.5",
|
|
@@ -119,12 +122,12 @@
|
|
|
119
122
|
"@changesets/cli": "^2.31.0",
|
|
120
123
|
"@types/bun": "1.3.14",
|
|
121
124
|
"@types/node": "^24.0.0",
|
|
122
|
-
"@types/react": "^19.2.17",
|
|
123
125
|
"@types/react-test-renderer": "^19.1.0",
|
|
126
|
+
"ajv": "8.20.0",
|
|
124
127
|
"fast-check": "^3.23.2",
|
|
125
128
|
"react-test-renderer": "^19.2.7"
|
|
126
129
|
},
|
|
127
130
|
"overrides": {
|
|
128
131
|
"read-yaml-file": "^3.0.0"
|
|
129
132
|
}
|
|
130
|
-
}
|
|
133
|
+
}
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:forgeos:agent-fabric:control-event:v0.1",
|
|
4
|
+
"title": "Forge Agent Fabric P0a Control Event",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"eventId": { "type": "string", "minLength": 1 },
|
|
8
|
+
"rootExecutionId": { "type": "string", "minLength": 1 },
|
|
9
|
+
"occurredAt": { "type": "number", "minimum": 0 },
|
|
10
|
+
"idempotencyKey": { "type": "string", "minLength": 1 },
|
|
11
|
+
"payload": {
|
|
12
|
+
"oneOf": [
|
|
13
|
+
{ "type": "object", "properties": { "type": { "const": "owner_authorization_registered" }, "authorization": { "$ref": "#/$defs/ownerAuthorization" }, "verification": { "$ref": "#/$defs/ownerAuthorizationVerification" } }, "required": ["type", "authorization", "verification"], "additionalProperties": false },
|
|
14
|
+
{ "type": "object", "properties": { "type": { "const": "owner_authorization_revoked" }, "authorizationId": { "type": "string", "minLength": 1 }, "reason": { "type": "string", "minLength": 1 } }, "required": ["type", "authorizationId", "reason"], "additionalProperties": false },
|
|
15
|
+
{ "type": "object", "properties": { "type": { "const": "resource_ledger_initialized" }, "definitions": { "type": "array", "items": { "$ref": "#/$defs/resourceDefinition" } } }, "required": ["type", "definitions"], "additionalProperties": false },
|
|
16
|
+
{ "type": "object", "properties": { "type": { "const": "resource_reservation_consumed" }, "reservationId": { "type": "string", "minLength": 1 } }, "required": ["type", "reservationId"], "additionalProperties": false },
|
|
17
|
+
{ "type": "object", "properties": { "type": { "const": "resource_reservation_released" }, "reservationId": { "type": "string", "minLength": 1 } }, "required": ["type", "reservationId"], "additionalProperties": false },
|
|
18
|
+
{ "type": "object", "properties": { "type": { "const": "goal_registered" }, "goal": { "$ref": "#/$defs/goal" } }, "required": ["type", "goal"], "additionalProperties": false },
|
|
19
|
+
{ "type": "object", "properties": { "type": { "const": "grant_registered" }, "grant": { "$ref": "#/$defs/grant" }, "reservation": { "oneOf": [{ "$ref": "#/$defs/resourceReservation" }, { "type": "null" }] } }, "required": ["type", "grant", "reservation"], "additionalProperties": false },
|
|
20
|
+
{ "type": "object", "properties": { "type": { "const": "grant_revoked" }, "grantId": { "type": "string", "minLength": 1 }, "reason": { "type": "string", "minLength": 1 } }, "required": ["type", "grantId", "reason"], "additionalProperties": false },
|
|
21
|
+
{ "type": "object", "properties": { "type": { "const": "plan_delta_registered" }, "delta": { "$ref": "#/$defs/planDelta" } }, "required": ["type", "delta"], "additionalProperties": false },
|
|
22
|
+
{ "type": "object", "properties": { "type": { "const": "plan_revision_activated" }, "revision": { "$ref": "#/$defs/runPlanRevision" } }, "required": ["type", "revision"], "additionalProperties": false },
|
|
23
|
+
{ "type": "object", "properties": { "type": { "const": "dispatch_intent_committed" }, "intent": { "$ref": "#/$defs/dispatchIntent" } }, "required": ["type", "intent"], "additionalProperties": false },
|
|
24
|
+
{ "type": "object", "properties": { "type": { "const": "scheduling_claim_committed" }, "claim": { "$ref": "#/$defs/schedulingClaim" } }, "required": ["type", "claim"], "additionalProperties": false },
|
|
25
|
+
{ "type": "object", "properties": { "type": { "const": "attempt_execution_permit_issued" }, "permit": { "$ref": "#/$defs/attemptExecutionPermit" } }, "required": ["type", "permit"], "additionalProperties": false },
|
|
26
|
+
{ "type": "object", "properties": { "type": { "const": "attempt_started" }, "attemptId": { "type": "string", "minLength": 1 }, "permitId": { "type": "string", "minLength": 1 }, "startupReportId": { "type": "string", "minLength": 1 }, "startedAt": { "type": "number", "minimum": 0 } }, "required": ["type", "attemptId", "permitId", "startupReportId", "startedAt"], "additionalProperties": false },
|
|
27
|
+
{ "type": "object", "properties": { "type": { "const": "attempt_uncertainty_observed" }, "observation": { "$ref": "#/$defs/attemptUncertaintyObservation" } }, "required": ["type", "observation"], "additionalProperties": false },
|
|
28
|
+
{ "type": "object", "properties": { "type": { "const": "attempt_outcome_committed" }, "outcome": { "$ref": "#/$defs/authoritativeOutcomeCommit" } }, "required": ["type", "outcome"], "additionalProperties": false }
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"sequence": { "type": "integer", "minimum": 1 },
|
|
32
|
+
"predecessorEventId": { "oneOf": [{ "type": "string", "minLength": 1 }, { "type": "null" }] },
|
|
33
|
+
"predecessorEventDigest": { "oneOf": [{ "$ref": "#/$defs/digest" }, { "type": "null" }] },
|
|
34
|
+
"eventDigest": { "$ref": "#/$defs/digest" }
|
|
35
|
+
},
|
|
36
|
+
"required": ["eventId", "rootExecutionId", "occurredAt", "payload", "sequence", "predecessorEventId", "predecessorEventDigest", "eventDigest"],
|
|
37
|
+
"additionalProperties": false,
|
|
38
|
+
"$defs": {
|
|
39
|
+
"digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
|
|
40
|
+
"effectClass": { "type": "string", "enum": ["read", "internal_write", "bounded_external_inference", "consequential"] },
|
|
41
|
+
"resourceDefinition": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"properties": {
|
|
44
|
+
"resource": { "type": "string", "minLength": 1 },
|
|
45
|
+
"semantics": { "type": "string", "enum": ["consumable", "capacity", "counter"] },
|
|
46
|
+
"limit": { "type": "number", "minimum": 0 }
|
|
47
|
+
},
|
|
48
|
+
"required": ["resource", "semantics", "limit"],
|
|
49
|
+
"additionalProperties": false
|
|
50
|
+
},
|
|
51
|
+
"workflowNode": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"properties": {
|
|
54
|
+
"nodeId": { "type": "string", "minLength": 1 },
|
|
55
|
+
"kind": { "type": "string", "enum": ["activity", "verification", "join"] },
|
|
56
|
+
"dependsOn": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
57
|
+
"agentSpecId": { "type": "string", "minLength": 1 },
|
|
58
|
+
"harnessSpecId": { "type": "string", "minLength": 1 },
|
|
59
|
+
"executionProfileId": { "type": "string", "minLength": 1 },
|
|
60
|
+
"outputContractId": { "type": "string", "minLength": 1 }
|
|
61
|
+
},
|
|
62
|
+
"required": ["nodeId", "kind", "dependsOn"],
|
|
63
|
+
"additionalProperties": false
|
|
64
|
+
},
|
|
65
|
+
"ownerAuthorization": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"properties": {
|
|
68
|
+
"authorizationId": { "type": "string", "minLength": 1 },
|
|
69
|
+
"principalId": { "type": "string", "minLength": 1 },
|
|
70
|
+
"rootExecutionId": { "type": "string", "minLength": 1 },
|
|
71
|
+
"goalIds": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
72
|
+
"subjectIds": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
73
|
+
"capabilities": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
74
|
+
"sourceIds": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
75
|
+
"targetIds": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
76
|
+
"effectClasses": { "type": "array", "items": { "$ref": "#/$defs/effectClass" } },
|
|
77
|
+
"notBefore": { "type": "number", "minimum": 0 },
|
|
78
|
+
"expiresAt": { "type": "number", "minimum": 0 },
|
|
79
|
+
"maximumAttempts": { "type": "integer", "minimum": 1 },
|
|
80
|
+
"maximumDelegationDepth": { "type": "integer", "minimum": 0 },
|
|
81
|
+
"resourceCeilings": { "type": "object", "additionalProperties": { "type": "number", "exclusiveMinimum": 0 } }
|
|
82
|
+
},
|
|
83
|
+
"required": ["authorizationId", "principalId", "rootExecutionId", "goalIds", "subjectIds", "capabilities", "sourceIds", "targetIds", "effectClasses", "notBefore", "expiresAt", "maximumAttempts", "maximumDelegationDepth", "resourceCeilings"],
|
|
84
|
+
"additionalProperties": false
|
|
85
|
+
},
|
|
86
|
+
"ownerAuthorizationVerification": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"properties": {
|
|
89
|
+
"verifierId": { "type": "string", "minLength": 1 },
|
|
90
|
+
"authorizationDigest": { "$ref": "#/$defs/digest" },
|
|
91
|
+
"evidenceDigest": { "$ref": "#/$defs/digest" }
|
|
92
|
+
},
|
|
93
|
+
"required": ["verifierId", "authorizationDigest", "evidenceDigest"],
|
|
94
|
+
"additionalProperties": false
|
|
95
|
+
},
|
|
96
|
+
"goal": {
|
|
97
|
+
"type": "object",
|
|
98
|
+
"properties": {
|
|
99
|
+
"goalId": { "type": "string", "minLength": 1 },
|
|
100
|
+
"revision": { "type": "integer", "minimum": 1 },
|
|
101
|
+
"authorityInvocationId": { "type": "string", "minLength": 1 },
|
|
102
|
+
"objectives": { "type": "array", "items": { "type": "string" } },
|
|
103
|
+
"nonObjectives": { "type": "array", "items": { "type": "string" } },
|
|
104
|
+
"acceptanceCriteria": { "type": "array", "items": { "type": "string" } },
|
|
105
|
+
"allowedEffectClasses": { "type": "array", "items": { "$ref": "#/$defs/effectClass" } },
|
|
106
|
+
"prohibitedEffectClasses": { "type": "array", "items": { "$ref": "#/$defs/effectClass" } },
|
|
107
|
+
"sourceBoundary": { "type": "object", "properties": { "sourceIds": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "allowExpansion": { "type": "boolean" } }, "required": ["sourceIds", "allowExpansion"], "additionalProperties": false }
|
|
108
|
+
},
|
|
109
|
+
"required": ["goalId", "revision", "authorityInvocationId", "objectives", "nonObjectives", "acceptanceCriteria", "allowedEffectClasses", "prohibitedEffectClasses", "sourceBoundary"],
|
|
110
|
+
"additionalProperties": false
|
|
111
|
+
},
|
|
112
|
+
"grant": {
|
|
113
|
+
"type": "object",
|
|
114
|
+
"properties": {
|
|
115
|
+
"grantId": { "type": "string", "minLength": 1 },
|
|
116
|
+
"rootAuthorizationId": { "type": "string", "minLength": 1 },
|
|
117
|
+
"subjectId": { "type": "string", "minLength": 1 },
|
|
118
|
+
"parentGrantId": { "oneOf": [{ "type": "string", "minLength": 1 }, { "type": "null" }] },
|
|
119
|
+
"capabilities": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
120
|
+
"sourceIds": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
121
|
+
"targetIds": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
122
|
+
"effectClasses": { "type": "array", "items": { "$ref": "#/$defs/effectClass" } },
|
|
123
|
+
"notBefore": { "type": "number", "minimum": 0 },
|
|
124
|
+
"expiresAt": { "type": "number", "minimum": 0 },
|
|
125
|
+
"maximumAttempts": { "type": "integer", "minimum": 1 },
|
|
126
|
+
"delegationDepthRemaining": { "type": "integer", "minimum": 0 },
|
|
127
|
+
"resourceCeilings": { "type": "object", "additionalProperties": { "type": "number", "exclusiveMinimum": 0 } },
|
|
128
|
+
"reservationId": { "type": "string", "minLength": 1 }
|
|
129
|
+
},
|
|
130
|
+
"required": ["grantId", "rootAuthorizationId", "subjectId", "parentGrantId", "capabilities", "sourceIds", "targetIds", "effectClasses", "notBefore", "expiresAt", "maximumAttempts", "delegationDepthRemaining", "resourceCeilings"],
|
|
131
|
+
"additionalProperties": false
|
|
132
|
+
},
|
|
133
|
+
"resourceReservation": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"properties": {
|
|
136
|
+
"reservationId": { "type": "string", "minLength": 1 },
|
|
137
|
+
"ownerId": { "type": "string", "minLength": 1 },
|
|
138
|
+
"requests": { "type": "array", "items": { "type": "object", "properties": { "resource": { "type": "string", "minLength": 1 }, "amount": { "type": "number", "exclusiveMinimum": 0 } }, "required": ["resource", "amount"], "additionalProperties": false } },
|
|
139
|
+
"status": { "type": "string", "enum": ["active", "consumed", "released"] }
|
|
140
|
+
},
|
|
141
|
+
"required": ["reservationId", "ownerId", "requests", "status"],
|
|
142
|
+
"additionalProperties": false
|
|
143
|
+
},
|
|
144
|
+
"planDeltaOperation": {
|
|
145
|
+
"oneOf": [
|
|
146
|
+
{ "type": "object", "properties": { "kind": { "const": "add_node" }, "node": { "$ref": "#/$defs/workflowNode" } }, "required": ["kind", "node"], "additionalProperties": false },
|
|
147
|
+
{ "type": "object", "properties": { "kind": { "const": "replace_node" }, "node": { "$ref": "#/$defs/workflowNode" } }, "required": ["kind", "node"], "additionalProperties": false },
|
|
148
|
+
{ "type": "object", "properties": { "kind": { "const": "remove_node" }, "nodeId": { "type": "string", "minLength": 1 } }, "required": ["kind", "nodeId"], "additionalProperties": false }
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
"planDelta": {
|
|
152
|
+
"type": "object",
|
|
153
|
+
"properties": {
|
|
154
|
+
"deltaId": { "type": "string", "minLength": 1 },
|
|
155
|
+
"rootExecutionId": { "type": "string", "minLength": 1 },
|
|
156
|
+
"baseRevisionId": { "type": "string", "minLength": 1 },
|
|
157
|
+
"nextRevisionId": { "type": "string", "minLength": 1 },
|
|
158
|
+
"operations": { "type": "array", "items": { "$ref": "#/$defs/planDeltaOperation" } }
|
|
159
|
+
},
|
|
160
|
+
"required": ["deltaId", "rootExecutionId", "baseRevisionId", "nextRevisionId", "operations"],
|
|
161
|
+
"additionalProperties": false
|
|
162
|
+
},
|
|
163
|
+
"runPlanRevision": {
|
|
164
|
+
"type": "object",
|
|
165
|
+
"properties": {
|
|
166
|
+
"revisionId": { "type": "string", "minLength": 1 },
|
|
167
|
+
"rootExecutionId": { "type": "string", "minLength": 1 },
|
|
168
|
+
"goalId": { "type": "string", "minLength": 1 },
|
|
169
|
+
"programVersionId": { "type": "string", "minLength": 1 },
|
|
170
|
+
"revisionNumber": { "type": "integer", "minimum": 1 },
|
|
171
|
+
"parentRevisionId": { "oneOf": [{ "type": "string", "minLength": 1 }, { "type": "null" }] },
|
|
172
|
+
"sourcePlanDeltaId": { "oneOf": [{ "type": "string", "minLength": 1 }, { "type": "null" }] },
|
|
173
|
+
"nodes": { "type": "array", "items": { "$ref": "#/$defs/workflowNode" } },
|
|
174
|
+
"contentDigest": { "$ref": "#/$defs/digest" }
|
|
175
|
+
},
|
|
176
|
+
"required": ["revisionId", "rootExecutionId", "goalId", "programVersionId", "revisionNumber", "parentRevisionId", "sourcePlanDeltaId", "nodes", "contentDigest"],
|
|
177
|
+
"additionalProperties": false
|
|
178
|
+
},
|
|
179
|
+
"dispatchIntent": {
|
|
180
|
+
"type": "object",
|
|
181
|
+
"properties": {
|
|
182
|
+
"intentId": { "type": "string", "minLength": 1 },
|
|
183
|
+
"rootExecutionId": { "type": "string", "minLength": 1 },
|
|
184
|
+
"planRevisionId": { "type": "string", "minLength": 1 },
|
|
185
|
+
"taskNodeId": { "type": "string", "minLength": 1 },
|
|
186
|
+
"effectiveRunSpecDigest": { "$ref": "#/$defs/digest" },
|
|
187
|
+
"sourceIds": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
188
|
+
"targetId": { "type": "string", "minLength": 1 },
|
|
189
|
+
"requiredCapability": { "type": "string", "minLength": 1 },
|
|
190
|
+
"effectClass": { "$ref": "#/$defs/effectClass" },
|
|
191
|
+
"createdAt": { "type": "number", "minimum": 0 }
|
|
192
|
+
},
|
|
193
|
+
"required": ["intentId", "rootExecutionId", "planRevisionId", "taskNodeId", "effectiveRunSpecDigest", "sourceIds", "targetId", "requiredCapability", "effectClass", "createdAt"],
|
|
194
|
+
"additionalProperties": false
|
|
195
|
+
},
|
|
196
|
+
"schedulingClaim": {
|
|
197
|
+
"type": "object",
|
|
198
|
+
"properties": {
|
|
199
|
+
"claimId": { "type": "string", "minLength": 1 },
|
|
200
|
+
"intentId": { "type": "string", "minLength": 1 },
|
|
201
|
+
"workerId": { "type": "string", "minLength": 1 },
|
|
202
|
+
"attemptId": { "type": "string", "minLength": 1 },
|
|
203
|
+
"leaseExpiresAt": { "type": "number", "minimum": 0 },
|
|
204
|
+
"fencingToken": { "type": "integer", "minimum": 1 },
|
|
205
|
+
"committedAt": { "type": "number", "minimum": 0 }
|
|
206
|
+
},
|
|
207
|
+
"required": ["claimId", "intentId", "workerId", "attemptId", "leaseExpiresAt", "fencingToken", "committedAt"],
|
|
208
|
+
"additionalProperties": false
|
|
209
|
+
},
|
|
210
|
+
"attemptExecutionPermit": {
|
|
211
|
+
"type": "object",
|
|
212
|
+
"properties": {
|
|
213
|
+
"permitId": { "type": "string", "minLength": 1 },
|
|
214
|
+
"intentId": { "type": "string", "minLength": 1 },
|
|
215
|
+
"claimId": { "type": "string", "minLength": 1 },
|
|
216
|
+
"attemptId": { "type": "string", "minLength": 1 },
|
|
217
|
+
"workerId": { "type": "string", "minLength": 1 },
|
|
218
|
+
"planRevisionId": { "type": "string", "minLength": 1 },
|
|
219
|
+
"effectiveRunSpecDigest": { "$ref": "#/$defs/digest" },
|
|
220
|
+
"grantId": { "type": "string", "minLength": 1 },
|
|
221
|
+
"fencingToken": { "type": "integer", "minimum": 1 },
|
|
222
|
+
"notBefore": { "type": "number", "minimum": 0 },
|
|
223
|
+
"expiresAt": { "type": "number", "minimum": 0 }
|
|
224
|
+
},
|
|
225
|
+
"required": ["permitId", "intentId", "claimId", "attemptId", "workerId", "planRevisionId", "effectiveRunSpecDigest", "grantId", "fencingToken", "notBefore", "expiresAt"],
|
|
226
|
+
"additionalProperties": false
|
|
227
|
+
},
|
|
228
|
+
"attemptUncertaintyObservation": {
|
|
229
|
+
"type": "object",
|
|
230
|
+
"properties": {
|
|
231
|
+
"observationId": { "type": "string", "minLength": 1 },
|
|
232
|
+
"attemptId": { "type": "string", "minLength": 1 },
|
|
233
|
+
"permitId": { "type": "string", "minLength": 1 },
|
|
234
|
+
"phase": { "type": "string", "enum": ["startup", "outcome"] },
|
|
235
|
+
"reason": { "type": "string", "minLength": 1 },
|
|
236
|
+
"observedAt": { "type": "number", "minimum": 0 }
|
|
237
|
+
},
|
|
238
|
+
"required": ["observationId", "attemptId", "permitId", "phase", "reason", "observedAt"],
|
|
239
|
+
"additionalProperties": false
|
|
240
|
+
},
|
|
241
|
+
"workerResultReport": {
|
|
242
|
+
"type": "object",
|
|
243
|
+
"properties": {
|
|
244
|
+
"reportId": { "type": "string", "minLength": 1 },
|
|
245
|
+
"attemptId": { "type": "string", "minLength": 1 },
|
|
246
|
+
"permitId": { "type": "string", "minLength": 1 },
|
|
247
|
+
"intentId": { "type": "string", "minLength": 1 },
|
|
248
|
+
"planRevisionId": { "type": "string", "minLength": 1 },
|
|
249
|
+
"effectiveRunSpecDigest": { "$ref": "#/$defs/digest" },
|
|
250
|
+
"fencingToken": { "type": "integer", "minimum": 1 },
|
|
251
|
+
"status": { "type": "string", "enum": ["succeeded", "failed"] },
|
|
252
|
+
"resultDigest": { "$ref": "#/$defs/digest" },
|
|
253
|
+
"evidenceDigests": { "type": "array", "items": { "$ref": "#/$defs/digest" } },
|
|
254
|
+
"reportedAt": { "type": "number", "minimum": 0 }
|
|
255
|
+
},
|
|
256
|
+
"required": ["reportId", "attemptId", "permitId", "intentId", "planRevisionId", "effectiveRunSpecDigest", "fencingToken", "status", "resultDigest", "evidenceDigests", "reportedAt"],
|
|
257
|
+
"additionalProperties": false
|
|
258
|
+
},
|
|
259
|
+
"authoritativeOutcomeCommit": {
|
|
260
|
+
"type": "object",
|
|
261
|
+
"properties": {
|
|
262
|
+
"outcomeId": { "type": "string", "minLength": 1 },
|
|
263
|
+
"attemptId": { "type": "string", "minLength": 1 },
|
|
264
|
+
"permitId": { "type": "string", "minLength": 1 },
|
|
265
|
+
"intentId": { "type": "string", "minLength": 1 },
|
|
266
|
+
"planRevisionId": { "type": "string", "minLength": 1 },
|
|
267
|
+
"effectiveRunSpecDigest": { "$ref": "#/$defs/digest" },
|
|
268
|
+
"fencingToken": { "type": "integer", "minimum": 1 },
|
|
269
|
+
"status": { "type": "string", "enum": ["succeeded", "failed"] },
|
|
270
|
+
"resultDigest": { "$ref": "#/$defs/digest" },
|
|
271
|
+
"reportId": { "type": "string", "minLength": 1 },
|
|
272
|
+
"reportDigest": { "$ref": "#/$defs/digest" },
|
|
273
|
+
"evidenceDigests": { "type": "array", "items": { "$ref": "#/$defs/digest" } },
|
|
274
|
+
"reportedAt": { "type": "number", "minimum": 0 },
|
|
275
|
+
"committedAt": { "type": "number", "minimum": 0 }
|
|
276
|
+
},
|
|
277
|
+
"required": ["outcomeId", "attemptId", "permitId", "intentId", "planRevisionId", "effectiveRunSpecDigest", "fencingToken", "status", "resultDigest", "reportId", "reportDigest", "evidenceDigests", "reportedAt", "committedAt"],
|
|
278
|
+
"additionalProperties": false
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|