@defrex/autobuild 1.13.0 → 1.15.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/README.md +1 -1
- package/SPEC.md +61 -11
- package/docs/answering-blocked-builds.md +5 -3
- package/docs/architecture.md +29 -0
- package/docs/configuration.md +16 -8
- package/docs/dispatcher-hosting.md +10 -0
- package/docs/operating.md +8 -0
- package/docs/operator-api.md +1 -1
- package/docs/operator-surfaces.md +1 -1
- package/docs/remote-store-protocol.md +1 -1
- package/docs/troubleshooting.md +35 -1
- package/package.json +3 -3
- package/packages/core/src/cli/dispatch.ts +105 -5
- package/packages/core/src/cli/repository-status.ts +15 -0
- package/packages/core/src/config/schema.ts +2 -2
- package/packages/core/src/events/policy.ts +2 -0
- package/packages/core/src/events/repository.ts +102 -0
- package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +4 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/be211f0e31a65006.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/23d33121de6d3325.json +107 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/312cc4090820a612.json +1078 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/a2780567b4989fb6.json +105 -0
- package/packages/core/src/kernel/done-escalations.ts +8 -4
- package/packages/core/src/kernel/reducer-revisions.ts +6 -0
- package/packages/core/src/kernel/reducer.ts +15 -1
- package/packages/core/src/kernel/repository-read-facts.ts +18 -0
- package/packages/core/src/ports/workspace/build-execution.ts +9 -1
- package/packages/core/src/ports/workspace/vercel-sandbox.ts +99 -12
- package/packages/core/src/processes/dispatcher.ts +957 -185
- package/packages/core/src/processes/execution-settlement.ts +24 -3
- package/packages/core/src/processes/pass-stages.ts +294 -0
- package/packages/core/src/processes/tick-publication.ts +1 -0
- package/packages/core/src/store/contract.ts +7 -0
- package/packages/core/src/store/reducer-value-shapes.json +5733 -5345
- package/packages/core/src/store/reducer-value-validation.ts +7 -0
- package/packages/core/src/store/remote/released-clients.json +22 -0
- package/packages/core/src/store/remote/released-reducer-values/1.14.0.json +36076 -0
- package/packages/core/src/store/remote/released-reducer-values/1.15.0.json +36354 -0
- package/packages/core/src/store/remote/released-reducer-values/index.ts +20 -16
- package/packages/core/src/store/repo-state-events.ts +2 -0
- package/packages/core/src/testing/dispatch-read-budget.ts +12 -2
- package/packages/core/src/testing/reduced-read-budget.ts +405 -1
- package/skills/guide/SKILL.md +29 -9
- package/skills/guide/references/operator-api.md +1 -1
- package/skills/guide/references/remote-store-protocol.md +1 -1
- package/skills/operate/SKILL.md +64 -5
- package/templates/hosted-service/package.json +2 -2
package/skills/operate/SKILL.md
CHANGED
|
@@ -282,7 +282,8 @@ that appear after you arm. Finishing the initially queued set is no reason to st
|
|
|
282
282
|
3. Handle each attention record using the shared rules. Repository records have
|
|
283
283
|
no build slug: inspect repository status. Re-arm from the standing watch's
|
|
284
284
|
latest cursor, including its trailing cursor after a timeout or count exit.
|
|
285
|
-
4. Report each merged, closed or aborted outcome
|
|
285
|
+
4. Report each merged, closed or aborted outcome, ending each report as *Keep
|
|
286
|
+
what waits on the human in view* requires, and file or move tickets when
|
|
286
287
|
warranted. An escalation requires action. Keep the standing watch
|
|
287
288
|
alive and keep discovering work until the human ends or hands off the role.
|
|
288
289
|
|
|
@@ -364,7 +365,10 @@ Read events with a cursor or a small `--events` count; logs are long.
|
|
|
364
365
|
longer conforms to the spec standard falls back to triage, and the comment
|
|
365
366
|
lists what is missing. `--reason` is quoted in the hand-back comment.
|
|
366
367
|
Cleanup is asynchronous: act on the `ticket.handed-back` repository event,
|
|
367
|
-
not on `build.aborted` or the build leaving `ab builds`.
|
|
368
|
+
not on `build.aborted` or the build leaving `ab builds`. Abort closes the
|
|
369
|
+
build's open escalations; do not acknowledge them afterwards. Only an
|
|
370
|
+
escalation raised after the abort (a cleanup failure) needs an answer.
|
|
371
|
+
Aborting an
|
|
368
372
|
optimization attempt is different: it settles `aborted` and its node moves the
|
|
369
373
|
ticket to the rejected role, so no hand-back is reported and `--to` has no
|
|
370
374
|
effect.
|
|
@@ -563,13 +567,14 @@ external harness belongs to that harness. Protocol session approval answers are
|
|
|
563
567
|
### Each round
|
|
564
568
|
|
|
565
569
|
Begin every operator round with `repository.attention`. One call returns
|
|
566
|
-
everything waiting on
|
|
570
|
+
everything waiting on the operator: blocked builds with their open escalation questions
|
|
567
571
|
(including done builds with an open escalation, which `builds.answer`
|
|
568
572
|
acknowledges while the build stays done),
|
|
569
573
|
merges awaiting consent or held, repository attention events after your cursor,
|
|
570
574
|
builds paused, stalled or failing verification, and dispatcher attention. Each
|
|
571
575
|
item's `resolve` names the tool call that acts on it, primary first; `by:
|
|
572
|
-
"human"` marks a condition you report rather than fix
|
|
576
|
+
"human"` marks a condition you report rather than fix; carry it in the Waiting
|
|
577
|
+
on you section (see *Shared rules*). Act on each item, then
|
|
573
578
|
pass back `events.cursor` next round. Omit the cursor on the first call to get
|
|
574
579
|
a baseline; on `code: "cursor-too-old"`, call again without one.
|
|
575
580
|
|
|
@@ -801,7 +806,9 @@ or a human decision is required.
|
|
|
801
806
|
|
|
802
807
|
### When to escalate instead of act
|
|
803
808
|
|
|
804
|
-
|
|
809
|
+
Don't act; ask the human — in plain streamed text — and keep operating
|
|
810
|
+
everything else. Carry the question in the Waiting on you section (below)
|
|
811
|
+
until it is answered. Ask whenever:
|
|
805
812
|
|
|
806
813
|
- The action is destructive and not clearly instructed (`abort`, `discard`,
|
|
807
814
|
a bulk control, a repository-wide setting).
|
|
@@ -818,6 +825,44 @@ Filing a ticket is acting — do it when the request is concrete. Default to
|
|
|
818
825
|
resolving attention yourself within these boundaries; ask the human only
|
|
819
826
|
for the exceptions above.
|
|
820
827
|
|
|
828
|
+
### Keep what waits on the human in view
|
|
829
|
+
|
|
830
|
+
This rule applies only to the agent that currently holds the operator role:
|
|
831
|
+
one that has taken the role and runs the standing operator watch, or, as a
|
|
832
|
+
connected agent, operates `repository.attention` rounds. It does not apply to
|
|
833
|
+
an agent that reads this skill to answer a one-off question, or to any other
|
|
834
|
+
role or session.
|
|
835
|
+
|
|
836
|
+
You keep working while the human is away, and each later message pushes an
|
|
837
|
+
earlier request out of view. So while anything waits on a human, every message
|
|
838
|
+
you send that reports status ends with a **Waiting on you** section: round
|
|
839
|
+
summaries, outcome reports (merged, closed, aborted) and replies to the human
|
|
840
|
+
alike. This holds the same way on the local CLI and as a connected agent.
|
|
841
|
+
|
|
842
|
+
What belongs in it:
|
|
843
|
+
|
|
844
|
+
- An escalation or decision only the human can make, including every case
|
|
845
|
+
under *When to escalate instead of act*.
|
|
846
|
+
- A merge waiting for the human's consent under the repository's merge policy
|
|
847
|
+
(`ab merges` locally, `merges.list` over MCP).
|
|
848
|
+
- A question you have put to the human.
|
|
849
|
+
- Attention you must report rather than fix: items marked `by: "human"` in
|
|
850
|
+
`repository.attention`, a merge only the human can perform on the forge, a
|
|
851
|
+
missing credential, or a dispatcher restart only a maintainer may perform.
|
|
852
|
+
|
|
853
|
+
Restate each item in full, so the human can act on the latest message alone:
|
|
854
|
+
the ticket and build, what is needed, the options, and your recommendation.
|
|
855
|
+
"See above" or any other pointer to an earlier message does not count.
|
|
856
|
+
|
|
857
|
+
Before you restate an item, confirm it is still open against current state:
|
|
858
|
+
the build's status (`ab build status <slug> --json`, `builds.get` over MCP),
|
|
859
|
+
pending merges (`ab merges`, `merges.list`), and the escalation itself. Never
|
|
860
|
+
repeat an item from memory.
|
|
861
|
+
|
|
862
|
+
Drop an item once it is resolved or no longer needs the human. When nothing
|
|
863
|
+
waits, end the message with one line saying so, such as
|
|
864
|
+
`Waiting on you: nothing.`
|
|
865
|
+
|
|
821
866
|
### Boundaries
|
|
822
867
|
|
|
823
868
|
- Automatic generation handoff is product behavior, not agent process authority.
|
|
@@ -1085,6 +1130,20 @@ slow cold resume of a stopped sandbox: retry, or suggest raising
|
|
|
1085
1130
|
`recoveryTimeoutMs` within the hosted invocation budget. `at step fence` or
|
|
1086
1131
|
`at step cleanup` points at sandbox or provider state worth checking before a
|
|
1087
1132
|
retry; `at step preserve` at the checkout, forge credentials or branch.
|
|
1133
|
+
A dispatch log line `build X: resume deferred by the invocation budget` (or
|
|
1134
|
+
`provision deferred`), counted as `recoveryDeferred` or `provisioningDeferred`,
|
|
1135
|
+
is normal: nothing is charged and the next invocation runs that build first.
|
|
1136
|
+
The same build deferring across several invocations means the hosted budget
|
|
1137
|
+
cannot fit that work: report it, and do not retry it.
|
|
1138
|
+
Each hosted invocation logs `stages:` with time and items per stage, and `ab
|
|
1139
|
+
repository status` shows the latest as `last pass stages:`. `(share)` on a
|
|
1140
|
+
stage is normal under load. Settlement, janitor, hand-back, recovery, resume
|
|
1141
|
+
and lease-sweep loops continue next invocation after the last item they
|
|
1142
|
+
started; priority-ordered admission and intake loops keep their order.
|
|
1143
|
+
`tick: work deadline reached during <stage>` names the stage and part the
|
|
1144
|
+
deadline stopped. The same stage or part stopping at the deadline on
|
|
1145
|
+
invocation after invocation means one visit there outlasts the window: report
|
|
1146
|
+
it with those lines.
|
|
1088
1147
|
|
|
1089
1148
|
Leaf restack and reconcile publication retry classified transient forge or transport
|
|
1090
1149
|
failures six times after the initial attempt, waiting 30, 60, 120, 240, 300 and
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"build": "ab-hosted-service-build"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@defrex/autobuild-hosted-store-service": "1.
|
|
8
|
-
"@defrex/autobuild": "1.
|
|
7
|
+
"@defrex/autobuild-hosted-store-service": "1.15.0",
|
|
8
|
+
"@defrex/autobuild": "1.15.0",
|
|
9
9
|
"next": "16.1.6",
|
|
10
10
|
"react": "19.2.4",
|
|
11
11
|
"react-dom": "19.2.4"
|