@agent-relay/factory 0.1.60 → 0.1.63
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 +140 -16
- package/dist/cli/exit-codes.d.ts +81 -0
- package/dist/cli/exit-codes.d.ts.map +1 -0
- package/dist/cli/exit-codes.js +122 -0
- package/dist/cli/exit-codes.js.map +1 -0
- package/dist/cli/fleet.d.ts +23 -2
- package/dist/cli/fleet.d.ts.map +1 -1
- package/dist/cli/fleet.js +201 -42
- package/dist/cli/fleet.js.map +1 -1
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/config/schema.d.ts +175 -52
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +24 -5
- package/dist/config/schema.js.map +1 -1
- package/dist/dispatch/templates.d.ts +7 -0
- package/dist/dispatch/templates.d.ts.map +1 -1
- package/dist/dispatch/templates.js +64 -12
- package/dist/dispatch/templates.js.map +1 -1
- package/dist/dispatch/work-unit-identity.d.ts +19 -0
- package/dist/dispatch/work-unit-identity.d.ts.map +1 -0
- package/dist/dispatch/work-unit-identity.js +40 -0
- package/dist/dispatch/work-unit-identity.js.map +1 -0
- package/dist/environments/stack-descriptor.d.ts +3 -3
- package/dist/fleet/control-plane-circuit.d.ts +57 -0
- package/dist/fleet/control-plane-circuit.d.ts.map +1 -0
- package/dist/fleet/control-plane-circuit.js +219 -0
- package/dist/fleet/control-plane-circuit.js.map +1 -0
- package/dist/fleet/internal-fleet-client.d.ts +2 -1
- package/dist/fleet/internal-fleet-client.d.ts.map +1 -1
- package/dist/fleet/internal-fleet-client.js +11 -7
- package/dist/fleet/internal-fleet-client.js.map +1 -1
- package/dist/fleet/relay-fleet-client.d.ts +3 -0
- package/dist/fleet/relay-fleet-client.d.ts.map +1 -1
- package/dist/fleet/relay-fleet-client.js +97 -18
- package/dist/fleet/relay-fleet-client.js.map +1 -1
- package/dist/github/writeback-paths.d.ts +7 -0
- package/dist/github/writeback-paths.d.ts.map +1 -0
- package/dist/github/writeback-paths.js +28 -0
- package/dist/github/writeback-paths.js.map +1 -0
- package/dist/hosted/orchestrator.d.ts.map +1 -1
- package/dist/hosted/orchestrator.js +2 -0
- package/dist/hosted/orchestrator.js.map +1 -1
- package/dist/index.d.ts +10 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/intake/index.d.ts +2 -1
- package/dist/intake/index.d.ts.map +1 -1
- package/dist/intake/index.js +2 -1
- package/dist/intake/index.js.map +1 -1
- package/dist/intake/notion-manifest.d.ts +48 -0
- package/dist/intake/notion-manifest.d.ts.map +1 -0
- package/dist/intake/notion-manifest.js +258 -0
- package/dist/intake/notion-manifest.js.map +1 -0
- package/dist/intake/notion-relay-claim.d.ts +5 -4
- package/dist/intake/notion-relay-claim.d.ts.map +1 -1
- package/dist/intake/notion-relay-claim.js +48 -7
- package/dist/intake/notion-relay-claim.js.map +1 -1
- package/dist/intake/notion.d.ts +6 -3
- package/dist/intake/notion.d.ts.map +1 -1
- package/dist/intake/notion.js +63 -13
- package/dist/intake/notion.js.map +1 -1
- package/dist/issue-key-match.d.ts +6 -0
- package/dist/issue-key-match.d.ts.map +1 -1
- package/dist/issue-key-match.js +6 -1
- package/dist/issue-key-match.js.map +1 -1
- package/dist/mount/local-mount-preflight.d.ts.map +1 -1
- package/dist/mount/local-mount-preflight.js +6 -2
- package/dist/mount/local-mount-preflight.js.map +1 -1
- package/dist/mount/mount-auth-error.d.ts +16 -3
- package/dist/mount/mount-auth-error.d.ts.map +1 -1
- package/dist/mount/mount-auth-error.js +34 -7
- package/dist/mount/mount-auth-error.js.map +1 -1
- package/dist/mount/relayfile-cloud-mount-client.d.ts +14 -1
- package/dist/mount/relayfile-cloud-mount-client.d.ts.map +1 -1
- package/dist/mount/relayfile-cloud-mount-client.js +107 -6
- package/dist/mount/relayfile-cloud-mount-client.js.map +1 -1
- package/dist/mount/relayfile-github-connection-write.d.ts +24 -2
- package/dist/mount/relayfile-github-connection-write.d.ts.map +1 -1
- package/dist/mount/relayfile-github-connection-write.js +90 -1
- package/dist/mount/relayfile-github-connection-write.js.map +1 -1
- package/dist/node/factory-node.d.ts.map +1 -1
- package/dist/node/factory-node.js +18 -4
- package/dist/node/factory-node.js.map +1 -1
- package/dist/observability/events.d.ts +52 -52
- package/dist/orchestrator/batch-tracker.d.ts +30 -0
- package/dist/orchestrator/batch-tracker.d.ts.map +1 -1
- package/dist/orchestrator/batch-tracker.js +50 -2
- package/dist/orchestrator/batch-tracker.js.map +1 -1
- package/dist/orchestrator/factory.d.ts +36 -2
- package/dist/orchestrator/factory.d.ts.map +1 -1
- package/dist/orchestrator/factory.js +863 -98
- package/dist/orchestrator/factory.js.map +1 -1
- package/dist/orchestrator/index.d.ts +2 -2
- package/dist/orchestrator/index.d.ts.map +1 -1
- package/dist/orchestrator/index.js +2 -2
- package/dist/orchestrator/index.js.map +1 -1
- package/dist/orchestrator/reaper.d.ts +16 -2
- package/dist/orchestrator/reaper.d.ts.map +1 -1
- package/dist/orchestrator/reaper.js +79 -5
- package/dist/orchestrator/reaper.js.map +1 -1
- package/dist/ports/fleet.d.ts +6 -0
- package/dist/ports/fleet.d.ts.map +1 -1
- package/dist/ports/index.d.ts +1 -1
- package/dist/ports/index.d.ts.map +1 -1
- package/dist/ports/mount.d.ts +39 -0
- package/dist/ports/mount.d.ts.map +1 -1
- package/dist/ports/state.d.ts +35 -6
- package/dist/ports/state.d.ts.map +1 -1
- package/dist/state/document-store.d.ts +32 -0
- package/dist/state/document-store.d.ts.map +1 -0
- package/dist/state/document-store.js +7 -0
- package/dist/state/document-store.js.map +1 -0
- package/dist/state/file-state-store.d.ts +20 -3
- package/dist/state/file-state-store.d.ts.map +1 -1
- package/dist/state/file-state-store.js +89 -245
- package/dist/state/file-state-store.js.map +1 -1
- package/dist/state/in-memory-state-store.d.ts +2 -1
- package/dist/state/in-memory-state-store.d.ts.map +1 -1
- package/dist/state/in-memory-state-store.js +12 -3
- package/dist/state/in-memory-state-store.js.map +1 -1
- package/dist/state/watch-state-document.d.ts +5 -0
- package/dist/state/watch-state-document.d.ts.map +1 -0
- package/dist/state/watch-state-document.js +444 -0
- package/dist/state/watch-state-document.js.map +1 -0
- package/dist/testing/deadline.d.ts +11 -0
- package/dist/testing/deadline.d.ts.map +1 -0
- package/dist/testing/deadline.js +23 -0
- package/dist/testing/deadline.js.map +1 -0
- package/dist/testing/fakes.d.ts +2 -0
- package/dist/testing/fakes.d.ts.map +1 -1
- package/dist/testing/fakes.js.map +1 -1
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +1 -0
- package/dist/testing/index.js.map +1 -1
- package/dist/triage/heuristic.d.ts +5 -0
- package/dist/triage/heuristic.d.ts.map +1 -1
- package/dist/triage/heuristic.js +42 -3
- package/dist/triage/heuristic.js.map +1 -1
- package/dist/triage/index.d.ts +1 -1
- package/dist/triage/index.d.ts.map +1 -1
- package/dist/triage/index.js +1 -1
- package/dist/triage/index.js.map +1 -1
- package/dist/triage/schema.d.ts +73 -55
- package/dist/triage/schema.d.ts.map +1 -1
- package/dist/triage/schema.js +2 -1
- package/dist/triage/schema.js.map +1 -1
- package/dist/types.d.ts +51 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/writeback/github.d.ts +22 -7
- package/dist/writeback/github.d.ts.map +1 -1
- package/dist/writeback/github.js +86 -16
- package/dist/writeback/github.js.map +1 -1
- package/dist/writeback/index.d.ts +1 -1
- package/dist/writeback/index.d.ts.map +1 -1
- package/dist/writeback/index.js +1 -1
- package/dist/writeback/index.js.map +1 -1
- package/package.json +13 -8
package/README.md
CHANGED
|
@@ -73,8 +73,9 @@ After init, add the `factory` label to an open issue and run a dry run below.
|
|
|
73
73
|
1. **Connect GitHub to your relay workspace** with push access for the target
|
|
74
74
|
repositories. Factory uses that workspace connection to publish branches and
|
|
75
75
|
open pull requests by default. A local `gh` installation and `gh auth login`
|
|
76
|
-
are required
|
|
77
|
-
|
|
76
|
+
are required when `github.identity` is `"user"`, or when the default
|
|
77
|
+
`"auto"` mode uses the compatibility GitHub issue lifecycle path. Exact
|
|
78
|
+
`"app"` mode needs no local GitHub credential. If a required
|
|
78
79
|
connection is missing, an interactive Factory command offers to open the
|
|
79
80
|
Relayfile connection flow and waits for it to finish. Linear-backed operations
|
|
80
81
|
require both Linear and GitHub; GitHub-native operations require GitHub.
|
|
@@ -135,11 +136,12 @@ After init, add the `factory` label to an open issue and run a dry run below.
|
|
|
135
136
|
| `factory run-once` | One discover→triage→dispatch cycle, then exit. Honors `--dry-run`. |
|
|
136
137
|
| `factory loop` | A bounded multi-iteration loop, then exit. |
|
|
137
138
|
| `factory start --mode live` | Long-lived daemon — the production entrypoint. Runs until you stop it. |
|
|
138
|
-
| `factory status` | Print current factory status as JSON. |
|
|
139
|
+
| `factory status` | Print current factory status as JSON, including held agents, lifecycle deadlines, and periodic readiness-reconcile health. |
|
|
139
140
|
| `factory triage <KEY\|path>` | Triage one issue and print the decision. |
|
|
140
141
|
| `factory dispatch <KEY\|path>` | Triage + dispatch one issue. Honors `--dry-run`. |
|
|
141
142
|
| `factory babysit <PR\|PR-URL>` | Spawn a one-shot babysitter for an existing open PR, even when it was not created by Factory. |
|
|
142
143
|
| `factory canary <KEY\|path>` | Assert a known "Ready for Agent" issue is dispatch-ready by the real dry-run triage path. Prints `{ok,issue,status,reason}`; exits non-zero (with the skip reason) if it isn't. |
|
|
144
|
+
| `factory reap-orphans [--include-held]` | Report stale factory processes and held agents. By default held agents are visible but retained; `--include-held` releases held agents whose configured deadline has elapsed. Kubernetes cleanup is reported as not applicable when no environment provider is configured. |
|
|
143
145
|
| `factory featuremap check [--manifest <path>] [--base <ref>]` | Validate the repository feature/test manifest and optionally report advisory drift for unchanged entries whose locations changed. |
|
|
144
146
|
| `factory intake notion <manifest>` | Normalize ready specs from a read-only Notion mount into GitHub lifecycle issues or exact-path fleet work. Honors `--dry-run`. |
|
|
145
147
|
|
|
@@ -148,6 +150,39 @@ names and the provider-claim state (`pending`, `verified`, or `degraded`). This
|
|
|
148
150
|
view is read from Factory's local in-flight registry, so it remains available
|
|
149
151
|
when GitHub lifecycle writeback is the degraded subsystem.
|
|
150
152
|
|
|
153
|
+
It also reports `fleetControlPlane`. Factory bounds its read-only roster probe,
|
|
154
|
+
pauses a live dispatch immediately when that probe fails, and opens a circuit
|
|
155
|
+
after repeated failures. While the circuit is open, new spawn and resume calls
|
|
156
|
+
fail fast. After `fleetHealth.resetTimeoutMs`, one half-open roster probe may
|
|
157
|
+
close the circuit. Configure `fleetHealth.rosterTimeoutMs`,
|
|
158
|
+
`fleetHealth.failureThreshold`, and `fleetHealth.resetTimeoutMs` when the fleet
|
|
159
|
+
has intentionally higher control-plane latency. Mutating calls are never
|
|
160
|
+
abandoned behind a local timeout because an accepted-but-late spawn would be
|
|
161
|
+
ambiguous.
|
|
162
|
+
|
|
163
|
+
A paused `run-once` or `loop` exits non-zero and logs `dispatch paused by the
|
|
164
|
+
circuit`; `factory status` reads the daemon heartbeat and reports the circuit's
|
|
165
|
+
`state`, `lastError`, and `retryAtMs`. If the broker is healthy but slower than
|
|
166
|
+
the configured bound, raise `fleetHealth.rosterTimeoutMs` (maximum 60 seconds)
|
|
167
|
+
to match measured control-plane latency. If the control path is unavailable,
|
|
168
|
+
repair the isolated broker and wait until `retryAtMs`; the next successful
|
|
169
|
+
half-open roster probe closes the circuit automatically. Do not treat an open
|
|
170
|
+
circuit as an empty queue or successful no-work iteration.
|
|
171
|
+
|
|
172
|
+
For production, set `fleetHealth.requireDedicatedBroker` to `true` and point
|
|
173
|
+
`AGENT_RELAY_STATE_DIR` at a state directory that is distinct from the
|
|
174
|
+
project's `.agentworkforce/relay`. Factory then refuses startup if it would
|
|
175
|
+
silently reuse the interactive project broker.
|
|
176
|
+
|
|
177
|
+
Factory now defaults `batchSize` to `1`. Operators may explicitly raise it to
|
|
178
|
+
at most `5` after isolating Factory workers from an interactive broker and
|
|
179
|
+
measuring control-plane latency under the intended recipe mix.
|
|
180
|
+
|
|
181
|
+
For a live daemon, `factory status` also includes `readinessReconcile`. Its
|
|
182
|
+
state advances from `retrying` to `degraded` after three consecutive periodic
|
|
183
|
+
discovery failures and returns to `healthy` after a successful checkpoint.
|
|
184
|
+
The same record includes the last error, attempt duration, and failure count.
|
|
185
|
+
|
|
151
186
|
Dispatch lifecycle writes are claim-critical. Factory applies the
|
|
152
187
|
`factory:in-progress` label/state before the dispatch comment, confirms the
|
|
153
188
|
GitHub label by provider read-back, and retries either write three times. An
|
|
@@ -215,6 +250,31 @@ pages can be admitted only with a bootstrap entry containing the exact
|
|
|
215
250
|
`authorizedPageId`, destination, safe summary, and operator reason. That escape
|
|
216
251
|
hatch is deliberately page-specific; there is no title or content heuristic.
|
|
217
252
|
|
|
253
|
+
Factory can generate that manifest directly from the **Factory Tasks** Notion
|
|
254
|
+
data source. The generator uses `NOTION_API_KEY` for read-only data-source and
|
|
255
|
+
page-markdown requests, selects only rows whose `Status` is `Ready for Agent`,
|
|
256
|
+
and never updates a row or its status. `Labels` and `Route` values are combined
|
|
257
|
+
for repository issue labels. A repository row can supply a separately reviewed
|
|
258
|
+
`Public Summary`; Factory uses that text for a public lifecycle issue and never
|
|
259
|
+
copies the private page body. The output order is stable by page ID, so the same
|
|
260
|
+
database state produces the same manifest on every run.
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
factory intake notion generate \
|
|
264
|
+
--mount-root ../.integrations/notion \
|
|
265
|
+
--worker-mount-root .integrations/notion \
|
|
266
|
+
--worker-mount-transport relay-channel \
|
|
267
|
+
--state-path ../.factory/notion-intake-state.json \
|
|
268
|
+
> ./ops/notion-intake.json
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
`--data-source` can override the built-in Factory Tasks data source ID. Paths in
|
|
272
|
+
the generated manifest retain the existing intake semantics: `mountRoot` and
|
|
273
|
+
`statePath` are resolved relative to the saved manifest, while
|
|
274
|
+
`workerMountRoot` is the path workers receive. Generation fails closed if there
|
|
275
|
+
are no ready rows, a required property is missing, a row sets both (or neither)
|
|
276
|
+
of `Repo` and `Project Path`, or Notion returns a truncated page body.
|
|
277
|
+
|
|
218
278
|
```json
|
|
219
279
|
{
|
|
220
280
|
"version": 1,
|
|
@@ -549,13 +609,21 @@ as local processes.
|
|
|
549
609
|
|
|
550
610
|
The supported topology for the **CLI control plane** is one Factory host per
|
|
551
611
|
workspace, with any number of relay execution nodes. Multiple Factory processes
|
|
552
|
-
|
|
612
|
+
that open the same state file do not mutate it concurrently: `FileStateStore`
|
|
613
|
+
holds a cross-process filesystem lock around the complete read/modify/write,
|
|
614
|
+
so a second process waits, reloads after it acquires the lock, and then publishes
|
|
615
|
+
through fsync plus atomic rename. The in-process operation queue alone is not
|
|
616
|
+
the cross-process fence.
|
|
553
617
|
Active/active CLI control planes on different hosts remain intentionally
|
|
554
618
|
unsupported: separate local state files cannot provide a truthful cross-host
|
|
555
619
|
fence.
|
|
556
620
|
|
|
557
621
|
### Hosting the control plane in Cloud
|
|
558
622
|
|
|
623
|
+
Embedded CLI hosts can inject durable coordination storage through the
|
|
624
|
+
host-neutral [`WatchStateDocumentStore` port](docs/document-state-store.md)
|
|
625
|
+
via `stateStoreFactory`.
|
|
626
|
+
|
|
559
627
|
`@agent-relay/factory/hosted` is the worker-safe control-plane entrypoint. It
|
|
560
628
|
contains no Node filesystem/process dependency and runs the complete sweep:
|
|
561
629
|
|
|
@@ -623,13 +691,61 @@ knobs include issue **routing** (`repos.byLabel` / `byProject` / `keywordRules`
|
|
|
623
691
|
`mergePolicy` (defaults to `never`), per-role **model** overrides, and an optional
|
|
624
692
|
**Slack** channel for status threads.
|
|
625
693
|
|
|
694
|
+
Every successfully placed agent team has a wall-clock release backstop. Configure
|
|
695
|
+
the window with `dispatch.agentHoldTimeoutMs`; it defaults to four hours. The
|
|
696
|
+
clock starts at the first successful agent placement, not while a dispatch waits
|
|
697
|
+
for capacity or while a released team waits for human clarification. If the issue
|
|
698
|
+
has not reached its configured `terminalState` before the deadline, Factory
|
|
699
|
+
releases the team with reason `held-past-deadline` and records the lifecycle as
|
|
700
|
+
abandoned so a restart cannot respawn it:
|
|
701
|
+
|
|
702
|
+
```jsonc
|
|
703
|
+
{
|
|
704
|
+
"dispatch": {
|
|
705
|
+
"agentHoldTimeoutMs": 14400000
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
```
|
|
709
|
+
|
|
710
|
+
### Recover names created before dispatch identity proofs
|
|
711
|
+
|
|
712
|
+
Factory stamps every dispatched agent with a stable broker identity derived from
|
|
713
|
+
the provider-native issue identity and role. For example, the reviewer for
|
|
714
|
+
`AgentWorkforce/factory#244` uses
|
|
715
|
+
`factory:dispatch:v1:github:agentworkforce/factory#244:reviewer`. A retry of that
|
|
716
|
+
work unit can reclaim its deterministic agent name after a crash, while another
|
|
717
|
+
repository's issue 244 cannot.
|
|
718
|
+
|
|
719
|
+
Agent records created before this behavior have no identity stamp and cannot be
|
|
720
|
+
reclaimed automatically. This includes the burned `ar-244-review-factory` seat
|
|
721
|
+
and any `ar-244-impl-factory` / `ar-244-babysit-factory` siblings created by the
|
|
722
|
+
same pre-fix dispatch. After verifying the named process is no longer live, run
|
|
723
|
+
the broker's guarded, one-time legacy recovery for each affected name. The
|
|
724
|
+
workspace key and Relaycast base URL use their normal environment variables;
|
|
725
|
+
the raw proof is supplied only through the environment and is never placed on
|
|
726
|
+
the command line:
|
|
727
|
+
|
|
728
|
+
```bash
|
|
729
|
+
BROKER_BIN="$(node --input-type=module -e \
|
|
730
|
+
"import { getBrokerBinaryPath } from '@agent-relay/harness-driver/broker-path'; const p = getBrokerBinaryPath(); if (!p) process.exit(1); process.stdout.write(p)")"
|
|
731
|
+
|
|
732
|
+
RELAY_AGENT_IDENTITY_KEY='factory:dispatch:v1:github:agentworkforce/factory#244:reviewer' \
|
|
733
|
+
"$BROKER_BIN" reclaim-legacy-identity ar-244-review-factory
|
|
734
|
+
```
|
|
735
|
+
|
|
736
|
+
Use the matching role suffix (`implementer`, `reviewer`, or `babysitter`) for
|
|
737
|
+
each sibling. Recovery refuses a live record, a record that already has an
|
|
738
|
+
identity stamp, or a concurrent competing claim; it does not weaken ordinary
|
|
739
|
+
collision checks. Once stamped, the next Factory retry presents the same proof
|
|
740
|
+
and reclaims normally.
|
|
741
|
+
|
|
626
742
|
The full schema — every field and default — is validated by Zod at load time, so
|
|
627
743
|
an invalid config fails fast with a field-level error. See
|
|
628
744
|
[`src/config/schema.ts`](src/config/schema.ts) for the authoritative reference,
|
|
629
745
|
and [`test/fixtures/factory.config.json`](test/fixtures/factory.config.json) for a
|
|
630
746
|
worked example (including offline fixture mode).
|
|
631
747
|
|
|
632
|
-
Factory
|
|
748
|
+
Factory GitHub write attribution is controlled explicitly with `github.identity`:
|
|
633
749
|
|
|
634
750
|
```jsonc
|
|
635
751
|
{
|
|
@@ -639,19 +755,27 @@ Factory PR authorship is controlled explicitly with `github.identity`:
|
|
|
639
755
|
}
|
|
640
756
|
```
|
|
641
757
|
|
|
642
|
-
- `"app"`
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
758
|
+
- `"app"` publishes pull requests and performs GitHub issue lifecycle writes
|
|
759
|
+
through the connected workspace GitHub App. Status transitions provision the
|
|
760
|
+
target Factory label, add only that label, and remove only the prior Factory
|
|
761
|
+
label, so labels applied by people are never replaced from a stale mount
|
|
762
|
+
projection. If any required write capability is unavailable, Factory fails
|
|
763
|
+
loudly and never falls back to a personal account.
|
|
764
|
+
- `"user"` publishes pull requests and performs issue lifecycle writes with the
|
|
765
|
+
account authenticated by the local `gh` CLI, even when the app path is
|
|
766
|
+
available.
|
|
767
|
+
- `"auto"` is the default and preserves compatibility: pull requests prefer the
|
|
768
|
+
App path and fall back to the local `gh` user, while issue comments, status
|
|
769
|
+
labels, and issue closure retain the local `gh` path.
|
|
649
770
|
|
|
650
771
|
Each successful publication log includes `identity` (`app` or `user`) and the
|
|
651
|
-
confirmed `author`.
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
772
|
+
confirmed `author`. App writes are not reported complete until the connected
|
|
773
|
+
mount acknowledges the provider mutation. Provider-authoritative issue reads
|
|
774
|
+
remain optional on the writeback interface; when unavailable, their existing
|
|
775
|
+
call sites keep their conservative fallback behavior.
|
|
776
|
+
|
|
777
|
+
This identity setting does not change Notion intake's separate GitHub issue
|
|
778
|
+
publisher, which still requires local `gh` authentication when enabled.
|
|
655
779
|
|
|
656
780
|
Authenticated Factory progress reporting is enabled by default for real CLI
|
|
657
781
|
sessions. Factory sends privacy-bounded lifecycle events, worker ownership,
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { TerminalDispatchLifecyclePhase } from '../ports/state.js';
|
|
2
|
+
import type { DispatchResult, IterationReport } from '../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Process exit codes for the `factory` CLI.
|
|
5
|
+
*
|
|
6
|
+
* The contract is deliberately narrow: `OK` means *the requested action was
|
|
7
|
+
* performed*. Every other value means it was not. A supervising loop, cron
|
|
8
|
+
* entry, or CI step that only reads `$?` must be able to tell a refusal from a
|
|
9
|
+
* completed run — printing a good diagnostic to stderr does not help a caller
|
|
10
|
+
* that never reads stderr.
|
|
11
|
+
*
|
|
12
|
+
* `REFUSED` and `RETRYABLE` split the refusals along the one axis a caller can
|
|
13
|
+
* act on: whether repeating the identical command could ever succeed.
|
|
14
|
+
*/
|
|
15
|
+
export declare const FACTORY_EXIT: {
|
|
16
|
+
/** The requested action was performed. */
|
|
17
|
+
readonly OK: 0;
|
|
18
|
+
/** The command failed. The default for a thrown error with no finer classification. */
|
|
19
|
+
readonly FAILED: 1;
|
|
20
|
+
/**
|
|
21
|
+
* Deliberately refused. Repeating the identical command will refuse again
|
|
22
|
+
* until an input, a config value, or a credential changes.
|
|
23
|
+
*/
|
|
24
|
+
readonly REFUSED: 2;
|
|
25
|
+
/**
|
|
26
|
+
* Not performed this time, but the same command may succeed later — a lost
|
|
27
|
+
* writeback race, or a capacity/dependency hold that clears on its own.
|
|
28
|
+
*/
|
|
29
|
+
readonly RETRYABLE: 3;
|
|
30
|
+
};
|
|
31
|
+
export type FactoryExitCode = (typeof FACTORY_EXIT)[keyof typeof FACTORY_EXIT];
|
|
32
|
+
/**
|
|
33
|
+
* Classify a thrown command failure.
|
|
34
|
+
*
|
|
35
|
+
* A mount scope shortfall is terminal until the operator re-authenticates with
|
|
36
|
+
* a session that can mint the filesystem scopes, so it is `REFUSED`. A live
|
|
37
|
+
* dispatch state change means another writer won the race for the same issue;
|
|
38
|
+
* the work unit is still there and the next attempt may win, so it is
|
|
39
|
+
* `RETRYABLE`. Everything else is an unclassified failure.
|
|
40
|
+
*/
|
|
41
|
+
export declare function exitCodeForError(error: unknown): FactoryExitCode;
|
|
42
|
+
/**
|
|
43
|
+
* Classify the outcome of a single-issue `factory dispatch`.
|
|
44
|
+
*
|
|
45
|
+
* A dry run's requested action is the dry run itself, so it is always `OK`. For
|
|
46
|
+
* a real dispatch the only success is at least one spawned agent: a hold, a
|
|
47
|
+
* queue, or an escalation all leave the issue exactly where it was.
|
|
48
|
+
*/
|
|
49
|
+
export declare function exitCodeForDispatchResult(result: DispatchResult): FactoryExitCode;
|
|
50
|
+
/**
|
|
51
|
+
* Classify a relay-backend dispatch, which stays attached from placement
|
|
52
|
+
* through takeover, publication, writeback and release.
|
|
53
|
+
*
|
|
54
|
+
* The pre-wait result cannot classify such a run. A dispatch that hits capacity
|
|
55
|
+
* returns an empty capacity-hold result *and* schedules a durable retry, and
|
|
56
|
+
* the wait then runs on until that retry reaches terminal. Classifying the
|
|
57
|
+
* stale result would report failure for a run that ultimately did dispatch —
|
|
58
|
+
* the same false signal as exiting 0 on a refusal, pointed the other way. The
|
|
59
|
+
* terminal phase is the outcome.
|
|
60
|
+
*/
|
|
61
|
+
export declare function exitCodeForRelayDispatch(result: DispatchResult, terminalPhase: TerminalDispatchLifecyclePhase | undefined): FactoryExitCode;
|
|
62
|
+
/**
|
|
63
|
+
* Classify the outcome of a `factory run-once` / `factory loop` iteration.
|
|
64
|
+
*
|
|
65
|
+
* `skipped` entries are ordinary: a sweep that examines issues and dispatches
|
|
66
|
+
* none of them still did what it was asked. A recorded `error` is a failed
|
|
67
|
+
* cycle, and a deferred discovery means the sweep never ran at all.
|
|
68
|
+
*/
|
|
69
|
+
export declare function exitCodeForIterationReport(report: IterationReport): FactoryExitCode;
|
|
70
|
+
/**
|
|
71
|
+
* Collapse a bounded loop's iteration reports into one exit code.
|
|
72
|
+
*
|
|
73
|
+
* A failed iteration means the loop did not complete cleanly and a caller
|
|
74
|
+
* reading only `$?` has to see that. A *deferred* iteration does not: the loop
|
|
75
|
+
* was asked to run several sweeps, and another owner holding the sweep for one
|
|
76
|
+
* of them is ordinary contention, not a refusal. Escalating that would make a
|
|
77
|
+
* healthy loop exit non-zero — the same defect as exiting 0 on a refusal, just
|
|
78
|
+
* pointed the other way.
|
|
79
|
+
*/
|
|
80
|
+
export declare function exitCodeForLoopReports(reports: readonly IterationReport[]): FactoryExitCode;
|
|
81
|
+
//# sourceMappingURL=exit-codes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exit-codes.d.ts","sourceRoot":"","sources":["../../src/cli/exit-codes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAA;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE/D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY;IACvB,0CAA0C;;IAE1C,uFAAuF;;IAEvF;;;OAGG;;IAEH;;;OAGG;;CAEK,CAAA;AAEV,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAA;AAE9E;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,CAIhE;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,cAAc,GAAG,eAAe,CAOjF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,cAAc,EACtB,aAAa,EAAE,8BAA8B,GAAG,SAAS,GACxD,eAAe,CAOjB;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,eAAe,GAAG,eAAe,CAInF;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,GAAG,eAAe,CAU3F"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { MountAuthScopeError } from '../mount/mount-auth-error.js';
|
|
2
|
+
import { isLiveDispatchStateChangedError } from '../orchestrator/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Process exit codes for the `factory` CLI.
|
|
5
|
+
*
|
|
6
|
+
* The contract is deliberately narrow: `OK` means *the requested action was
|
|
7
|
+
* performed*. Every other value means it was not. A supervising loop, cron
|
|
8
|
+
* entry, or CI step that only reads `$?` must be able to tell a refusal from a
|
|
9
|
+
* completed run — printing a good diagnostic to stderr does not help a caller
|
|
10
|
+
* that never reads stderr.
|
|
11
|
+
*
|
|
12
|
+
* `REFUSED` and `RETRYABLE` split the refusals along the one axis a caller can
|
|
13
|
+
* act on: whether repeating the identical command could ever succeed.
|
|
14
|
+
*/
|
|
15
|
+
export const FACTORY_EXIT = {
|
|
16
|
+
/** The requested action was performed. */
|
|
17
|
+
OK: 0,
|
|
18
|
+
/** The command failed. The default for a thrown error with no finer classification. */
|
|
19
|
+
FAILED: 1,
|
|
20
|
+
/**
|
|
21
|
+
* Deliberately refused. Repeating the identical command will refuse again
|
|
22
|
+
* until an input, a config value, or a credential changes.
|
|
23
|
+
*/
|
|
24
|
+
REFUSED: 2,
|
|
25
|
+
/**
|
|
26
|
+
* Not performed this time, but the same command may succeed later — a lost
|
|
27
|
+
* writeback race, or a capacity/dependency hold that clears on its own.
|
|
28
|
+
*/
|
|
29
|
+
RETRYABLE: 3,
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Classify a thrown command failure.
|
|
33
|
+
*
|
|
34
|
+
* A mount scope shortfall is terminal until the operator re-authenticates with
|
|
35
|
+
* a session that can mint the filesystem scopes, so it is `REFUSED`. A live
|
|
36
|
+
* dispatch state change means another writer won the race for the same issue;
|
|
37
|
+
* the work unit is still there and the next attempt may win, so it is
|
|
38
|
+
* `RETRYABLE`. Everything else is an unclassified failure.
|
|
39
|
+
*/
|
|
40
|
+
export function exitCodeForError(error) {
|
|
41
|
+
if (error instanceof MountAuthScopeError)
|
|
42
|
+
return FACTORY_EXIT.REFUSED;
|
|
43
|
+
if (isLiveDispatchStateChangedError(error))
|
|
44
|
+
return FACTORY_EXIT.RETRYABLE;
|
|
45
|
+
return FACTORY_EXIT.FAILED;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Classify the outcome of a single-issue `factory dispatch`.
|
|
49
|
+
*
|
|
50
|
+
* A dry run's requested action is the dry run itself, so it is always `OK`. For
|
|
51
|
+
* a real dispatch the only success is at least one spawned agent: a hold, a
|
|
52
|
+
* queue, or an escalation all leave the issue exactly where it was.
|
|
53
|
+
*/
|
|
54
|
+
export function exitCodeForDispatchResult(result) {
|
|
55
|
+
if (result.dryRun)
|
|
56
|
+
return FACTORY_EXIT.OK;
|
|
57
|
+
if (result.agents.length > 0)
|
|
58
|
+
return FACTORY_EXIT.OK;
|
|
59
|
+
// A capacity or dependency hold clears without anyone changing the request.
|
|
60
|
+
// A dependency *cycle* does not — it needs a human to break the cycle.
|
|
61
|
+
if (result.hold?.kind === 'capacity' || result.hold?.kind === 'dependency')
|
|
62
|
+
return FACTORY_EXIT.RETRYABLE;
|
|
63
|
+
return FACTORY_EXIT.REFUSED;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Classify a relay-backend dispatch, which stays attached from placement
|
|
67
|
+
* through takeover, publication, writeback and release.
|
|
68
|
+
*
|
|
69
|
+
* The pre-wait result cannot classify such a run. A dispatch that hits capacity
|
|
70
|
+
* returns an empty capacity-hold result *and* schedules a durable retry, and
|
|
71
|
+
* the wait then runs on until that retry reaches terminal. Classifying the
|
|
72
|
+
* stale result would report failure for a run that ultimately did dispatch —
|
|
73
|
+
* the same false signal as exiting 0 on a refusal, pointed the other way. The
|
|
74
|
+
* terminal phase is the outcome.
|
|
75
|
+
*/
|
|
76
|
+
export function exitCodeForRelayDispatch(result, terminalPhase) {
|
|
77
|
+
if (terminalPhase === 'complete')
|
|
78
|
+
return FACTORY_EXIT.OK;
|
|
79
|
+
if (terminalPhase === 'abandoned')
|
|
80
|
+
return FACTORY_EXIT.FAILED;
|
|
81
|
+
// No terminal phase was observed: either this dispatch never created a
|
|
82
|
+
// lifecycle row, or the wait ended because Factory is stopping. Nothing
|
|
83
|
+
// better is known than what the dispatch itself reported.
|
|
84
|
+
return exitCodeForDispatchResult(result);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Classify the outcome of a `factory run-once` / `factory loop` iteration.
|
|
88
|
+
*
|
|
89
|
+
* `skipped` entries are ordinary: a sweep that examines issues and dispatches
|
|
90
|
+
* none of them still did what it was asked. A recorded `error` is a failed
|
|
91
|
+
* cycle, and a deferred discovery means the sweep never ran at all.
|
|
92
|
+
*/
|
|
93
|
+
export function exitCodeForIterationReport(report) {
|
|
94
|
+
if (report.error)
|
|
95
|
+
return FACTORY_EXIT.FAILED;
|
|
96
|
+
if (report.discoveryDeferred)
|
|
97
|
+
return FACTORY_EXIT.RETRYABLE;
|
|
98
|
+
return FACTORY_EXIT.OK;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Collapse a bounded loop's iteration reports into one exit code.
|
|
102
|
+
*
|
|
103
|
+
* A failed iteration means the loop did not complete cleanly and a caller
|
|
104
|
+
* reading only `$?` has to see that. A *deferred* iteration does not: the loop
|
|
105
|
+
* was asked to run several sweeps, and another owner holding the sweep for one
|
|
106
|
+
* of them is ordinary contention, not a refusal. Escalating that would make a
|
|
107
|
+
* healthy loop exit non-zero — the same defect as exiting 0 on a refusal, just
|
|
108
|
+
* pointed the other way.
|
|
109
|
+
*/
|
|
110
|
+
export function exitCodeForLoopReports(reports) {
|
|
111
|
+
if (reports.some((report) => report.error))
|
|
112
|
+
return FACTORY_EXIT.FAILED;
|
|
113
|
+
// Losing ONE sweep to another owner is ordinary contention. Losing EVERY
|
|
114
|
+
// sweep means the loop performed nothing at all — a shared daemon can hold
|
|
115
|
+
// the workspace sweep lease for the loop's whole duration — and reporting
|
|
116
|
+
// that as success is the exact false signal this contract exists to remove.
|
|
117
|
+
if (reports.length > 0 && reports.every((report) => report.discoveryDeferred)) {
|
|
118
|
+
return FACTORY_EXIT.RETRYABLE;
|
|
119
|
+
}
|
|
120
|
+
return FACTORY_EXIT.OK;
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=exit-codes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exit-codes.js","sourceRoot":"","sources":["../../src/cli/exit-codes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAE,+BAA+B,EAAE,MAAM,iBAAiB,CAAA;AAIjE;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,0CAA0C;IAC1C,EAAE,EAAE,CAAC;IACL,uFAAuF;IACvF,MAAM,EAAE,CAAC;IACT;;;OAGG;IACH,OAAO,EAAE,CAAC;IACV;;;OAGG;IACH,SAAS,EAAE,CAAC;CACJ,CAAA;AAIV;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC7C,IAAI,KAAK,YAAY,mBAAmB;QAAE,OAAO,YAAY,CAAC,OAAO,CAAA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AAM,CAAC,KAAK,CAAC;QAAE,OAAO,YAAY,CAAC,MAAM,CAAA;IACtE,yEAAyE;IACzE,2EAA2E;IAC3E,0EAA0E;IAC1E,4EAA4E;IAC5E,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE,CAAC;QAC9E,OAAO,YAAY,CAAC,SAAS,CAAA;IAC/B,CAAC;IACD,OAAO,YAAY,CAAC,EAAE,CAAA;AACxB,CAAC"}
|
package/dist/cli/fleet.d.ts
CHANGED
|
@@ -3,12 +3,22 @@ import { type LocalClonePathOptions } from '../config/local-clone-paths.js';
|
|
|
3
3
|
import { createFactory, createFleet, ensureRelayBroker, reapFactoryEnvironmentsOnce, type Capability, type Factory, type FactoryEventReporter, type FactoryConfig, type FleetBackend, type FleetClient, type GhRunner, type FactoryStateResolution, type Logger, type LocalMountOptions, type MountClient, type ProbeCloser, type RelayfileCloudMountClientConfig, type ResolvedFactoryWorkspace } from '../index.js';
|
|
4
4
|
import { type CheckFeatureMapOptions, type FeatureMapCheckReport } from '../featuremap/index.js';
|
|
5
5
|
import type { FactoryIntegrationProvider } from '../ports/index.js';
|
|
6
|
+
import type { StateStore } from '../ports/state.js';
|
|
6
7
|
import { type FactoryVersionInfo, type FactoryVersionInfoOptions } from '../version-info.js';
|
|
7
|
-
import { type NotionIntakeClaimStore, type NotionContractPublisher } from '../intake/index.js';
|
|
8
|
-
|
|
8
|
+
import { type FactoryTasksNotionClient, type NotionIntakeClaimStore, type NotionContractPublisher } from '../intake/index.js';
|
|
9
|
+
export type CliStateStore = StateStore & {
|
|
10
|
+
/** Host readiness gate. The CLI invokes it before constructing Factory. */
|
|
11
|
+
assertReady(): Promise<void>;
|
|
12
|
+
/** Optional host-defined identifier included in status output. */
|
|
13
|
+
readonly backend?: string;
|
|
14
|
+
};
|
|
15
|
+
export type CliStateStoreFactory = (config: FactoryConfig) => Promise<CliStateStore> | CliStateStore;
|
|
16
|
+
export interface FleetCliDeps {
|
|
9
17
|
fleet?: FleetClient;
|
|
10
18
|
/** Hermetic credential environment for the relay backend (tests). */
|
|
11
19
|
env?: NodeJS.ProcessEnv;
|
|
20
|
+
/** Host-supplied durable state adapter; the file implementation remains the default. */
|
|
21
|
+
stateStoreFactory?: CliStateStoreFactory;
|
|
12
22
|
mount?: MountClient;
|
|
13
23
|
createFactory?: typeof createFactory;
|
|
14
24
|
createFleet?: typeof createFleet;
|
|
@@ -39,6 +49,8 @@ interface FleetCliDeps {
|
|
|
39
49
|
notionContracts?: NotionContractPublisher;
|
|
40
50
|
/** Hermetic workspace-global Notion claim store for tests and alternate runtimes. */
|
|
41
51
|
notionClaims?: NotionIntakeClaimStore;
|
|
52
|
+
/** Hermetic Factory Tasks reader for manifest-generation tests and alternate runtimes. */
|
|
53
|
+
notionFactoryTasks?: FactoryTasksNotionClient;
|
|
42
54
|
/** Hermetic verification-environment sweep for CLI tests and alternate runtimes. */
|
|
43
55
|
reapEnvironments?: typeof reapFactoryEnvironmentsOnce;
|
|
44
56
|
/** Hermetic package/registry metadata for CLI tests and alternate runtimes. */
|
|
@@ -73,6 +85,7 @@ type ParsedCommand = {
|
|
|
73
85
|
} | {
|
|
74
86
|
kind: 'factory';
|
|
75
87
|
action: 'run-once' | 'loop' | 'status' | 'loop-status' | 'kill-loop' | 'reap-orphans';
|
|
88
|
+
includeHeld?: boolean;
|
|
76
89
|
} | {
|
|
77
90
|
kind: 'factory';
|
|
78
91
|
action: 'start';
|
|
@@ -107,6 +120,13 @@ type ParsedCommand = {
|
|
|
107
120
|
} | {
|
|
108
121
|
kind: 'notion-intake';
|
|
109
122
|
manifestPath: string;
|
|
123
|
+
} | {
|
|
124
|
+
kind: 'notion-manifest';
|
|
125
|
+
dataSourceId?: string;
|
|
126
|
+
mountRoot?: string;
|
|
127
|
+
workerMountRoot?: string;
|
|
128
|
+
workerMountTransport?: 'local' | 'relay-channel';
|
|
129
|
+
statePath?: string;
|
|
110
130
|
};
|
|
111
131
|
export declare function runFleetCli(argv: string[], deps?: FleetCliDeps): Promise<number>;
|
|
112
132
|
export declare function parseFleetCommand(args: string[]): ParsedCommand;
|
|
@@ -117,6 +137,7 @@ export declare function parseGlobalOptions(argv: string[]): {
|
|
|
117
137
|
export declare function reportFactoryVersionDrift(provider: FleetCliDeps['versionInfo'], logger: Logger): Promise<void>;
|
|
118
138
|
export declare function formatLogArgs(args: unknown[]): string;
|
|
119
139
|
export declare function resolveBrokerConnectionPath(startCwd?: string, env?: NodeJS.ProcessEnv): string | undefined;
|
|
140
|
+
export declare function resolveFactoryBrokerConnectionPath(startCwd?: string, env?: NodeJS.ProcessEnv, requireDedicatedBroker?: boolean): string | undefined;
|
|
120
141
|
export type GithubIssueSelector = {
|
|
121
142
|
number: number;
|
|
122
143
|
repo?: string;
|
package/dist/cli/fleet.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fleet.d.ts","sourceRoot":"","sources":["../../src/cli/fleet.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAG1E,OAAO,EAA6B,KAAK,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"fleet.d.ts","sourceRoot":"","sources":["../../src/cli/fleet.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAG1E,OAAO,EAA6B,KAAK,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AAUnG,OAAO,EAKL,aAAa,EACb,WAAW,EAEX,iBAAiB,EAmBjB,2BAA2B,EAQ3B,KAAK,UAAU,EACf,KAAK,OAAO,EACZ,KAAK,oBAAoB,EAGzB,KAAK,aAAa,EAElB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KA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