@arbiterforge/ca-pi 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +661 -0
- package/README.md +558 -0
- package/package.json +35 -0
- package/plugins/ca-pi/CHANGELOG.md +1030 -0
- package/plugins/ca-pi/COMMANDS.md +90 -0
- package/plugins/ca-pi/ORCHESTRATOR.md +159 -0
- package/plugins/ca-pi/SKILLS.md +47 -0
- package/plugins/ca-pi/SPRINT.md +142 -0
- package/plugins/ca-pi/agents/INDEX.md +31 -0
- package/plugins/ca-pi/agents/architecture-drift-reviewer.md +86 -0
- package/plugins/ca-pi/agents/auth-crypto-reviewer.md +60 -0
- package/plugins/ca-pi/agents/backend-author.md +60 -0
- package/plugins/ca-pi/agents/checkpoint-aggregator.md +111 -0
- package/plugins/ca-pi/agents/coverage-auditor.md +71 -0
- package/plugins/ca-pi/agents/decision-challenger.md +116 -0
- package/plugins/ca-pi/agents/dependency-reviewer.md +79 -0
- package/plugins/ca-pi/agents/design-quality-reviewer.md +80 -0
- package/plugins/ca-pi/agents/finding-triage.md +86 -0
- package/plugins/ca-pi/agents/frontend-author.md +64 -0
- package/plugins/ca-pi/agents/grader.md +173 -0
- package/plugins/ca-pi/agents/infra-author.md +64 -0
- package/plugins/ca-pi/agents/map-deps.md +35 -0
- package/plugins/ca-pi/agents/map-structure.md +37 -0
- package/plugins/ca-pi/agents/migration-reviewer.md +65 -0
- package/plugins/ca-pi/agents/scout.md +127 -0
- package/plugins/ca-pi/agents/security-reviewer.md +72 -0
- package/plugins/ca-pi/agents/tribunal-lens-reviewer.md +65 -0
- package/plugins/ca-pi/extensions/codearbiter-child.js +1885 -0
- package/plugins/ca-pi/extensions/codearbiter.js +9802 -0
- package/plugins/ca-pi/generated/command-catalog.json +197 -0
- package/plugins/ca-pi/generated/roles.json +213 -0
- package/plugins/ca-pi/helpers/windows-supervisor.js +205 -0
- package/plugins/ca-pi/hooks/_activationlib.py +196 -0
- package/plugins/ca-pi/hooks/_arbiterstatelib.py +208 -0
- package/plugins/ca-pi/hooks/_babysitlib.py +76 -0
- package/plugins/ca-pi/hooks/_bashguardlib.py +1667 -0
- package/plugins/ca-pi/hooks/_boxlib.py +131 -0
- package/plugins/ca-pi/hooks/_colorlib.py +304 -0
- package/plugins/ca-pi/hooks/_durabilitylib.py +186 -0
- package/plugins/ca-pi/hooks/_entrylib.py +41 -0
- package/plugins/ca-pi/hooks/_fmtlib.py +161 -0
- package/plugins/ca-pi/hooks/_gitexec.py +45 -0
- package/plugins/ca-pi/hooks/_githooks.py +920 -0
- package/plugins/ca-pi/hooks/_gitlib.py +110 -0
- package/plugins/ca-pi/hooks/_hooklib.py +595 -0
- package/plugins/ca-pi/hooks/_host.py +115 -0
- package/plugins/ca-pi/hooks/_intentlib.py +242 -0
- package/plugins/ca-pi/hooks/_ledgerlib.py +1035 -0
- package/plugins/ca-pi/hooks/_metricslib.py +709 -0
- package/plugins/ca-pi/hooks/_pathnorm.py +74 -0
- package/plugins/ca-pi/hooks/_planfilelib.py +664 -0
- package/plugins/ca-pi/hooks/_previewlib.py +193 -0
- package/plugins/ca-pi/hooks/_protectedlib.py +312 -0
- package/plugins/ca-pi/hooks/_protectedstatelib.py +411 -0
- package/plugins/ca-pi/hooks/_provenancelib.py +971 -0
- package/plugins/ca-pi/hooks/_prunelib.py +1398 -0
- package/plugins/ca-pi/hooks/_prunepolicy.py +235 -0
- package/plugins/ca-pi/hooks/_readinjectlib.py +1080 -0
- package/plugins/ca-pi/hooks/_releaselib.py +2657 -0
- package/plugins/ca-pi/hooks/_scopelib.py +262 -0
- package/plugins/ca-pi/hooks/_segmentslib.py +278 -0
- package/plugins/ca-pi/hooks/_sensitivelib.py +270 -0
- package/plugins/ca-pi/hooks/_sessionlib.py +78 -0
- package/plugins/ca-pi/hooks/_sloplib.py +244 -0
- package/plugins/ca-pi/hooks/_standuplib.py +214 -0
- package/plugins/ca-pi/hooks/_subagentslib.py +219 -0
- package/plugins/ca-pi/hooks/_taskboardlib.py +1088 -0
- package/plugins/ca-pi/hooks/_updatelib.py +278 -0
- package/plugins/ca-pi/hooks/babysit.py +47 -0
- package/plugins/ca-pi/hooks/boardsync.py +129 -0
- package/plugins/ca-pi/hooks/doctor.py +420 -0
- package/plugins/ca-pi/hooks/git-enforce.py +325 -0
- package/plugins/ca-pi/hooks/hostapi.py +460 -0
- package/plugins/ca-pi/hooks/init-codearbiter.py +225 -0
- package/plugins/ca-pi/hooks/metrics.py +62 -0
- package/plugins/ca-pi/hooks/migration-pass.py +129 -0
- package/plugins/ca-pi/hooks/pi-bridge.py +543 -0
- package/plugins/ca-pi/hooks/post-write-edit.py +231 -0
- package/plugins/ca-pi/hooks/pre-bash.py +90 -0
- package/plugins/ca-pi/hooks/pre-edit.py +284 -0
- package/plugins/ca-pi/hooks/pre-read.py +81 -0
- package/plugins/ca-pi/hooks/pre-write.py +217 -0
- package/plugins/ca-pi/hooks/preview.py +69 -0
- package/plugins/ca-pi/hooks/prune-transcript.py +232 -0
- package/plugins/ca-pi/hooks/releasehash.py +216 -0
- package/plugins/ca-pi/hooks/security-pass.py +139 -0
- package/plugins/ca-pi/hooks/session-start.py +1218 -0
- package/plugins/ca-pi/hooks/statusline.py +736 -0
- package/plugins/ca-pi/hooks/taskwrite.py +351 -0
- package/plugins/ca-pi/hooks/update-refresh.py +51 -0
- package/plugins/ca-pi/hooks/wire-statusline.py +435 -0
- package/plugins/ca-pi/includes/anti-slop-design/INDEX.md +55 -0
- package/plugins/ca-pi/includes/anti-slop-design/color.md +43 -0
- package/plugins/ca-pi/includes/anti-slop-design/core.md +244 -0
- package/plugins/ca-pi/includes/anti-slop-design/images.md +32 -0
- package/plugins/ca-pi/includes/anti-slop-design/layout.md +45 -0
- package/plugins/ca-pi/includes/anti-slop-design/medium-cli.md +39 -0
- package/plugins/ca-pi/includes/anti-slop-design/medium-dataviz.md +43 -0
- package/plugins/ca-pi/includes/anti-slop-design/medium-diagram.md +35 -0
- package/plugins/ca-pi/includes/anti-slop-design/medium-documents.md +70 -0
- package/plugins/ca-pi/includes/anti-slop-design/medium-slides.md +30 -0
- package/plugins/ca-pi/includes/anti-slop-design/medium-web.md +39 -0
- package/plugins/ca-pi/includes/anti-slop-design/typography.md +51 -0
- package/plugins/ca-pi/includes/author-tdd-workflow.md +14 -0
- package/plugins/ca-pi/includes/compaction-charter.md +16 -0
- package/plugins/ca-pi/includes/cut-docs.md +16 -0
- package/plugins/ca-pi/includes/dev-mode.md +30 -0
- package/plugins/ca-pi/includes/farm.md +237 -0
- package/plugins/ca-pi/includes/fresh-verification.md +14 -0
- package/plugins/ca-pi/includes/harvest.md +69 -0
- package/plugins/ca-pi/includes/maturity-coverage.md +102 -0
- package/plugins/ca-pi/includes/pi-host-notes.md +69 -0
- package/plugins/ca-pi/includes/redirect.md +69 -0
- package/plugins/ca-pi/includes/reference-map.md +22 -0
- package/plugins/ca-pi/includes/review-matrix.md +14 -0
- package/plugins/ca-pi/includes/reviewer-contract.md +53 -0
- package/plugins/ca-pi/includes/routing-table.md +47 -0
- package/plugins/ca-pi/includes/security-gate-record.md +22 -0
- package/plugins/ca-pi/includes/smarts/core.md +90 -0
- package/plugins/ca-pi/includes/smarts/decision-log-format.md +56 -0
- package/plugins/ca-pi/routines/INDEX.md +32 -0
- package/plugins/ca-pi/routines/brainstorming/SKILL.md +122 -0
- package/plugins/ca-pi/routines/commit-gate/SKILL.md +151 -0
- package/plugins/ca-pi/routines/context-check/SKILL.md +85 -0
- package/plugins/ca-pi/routines/context-creation/SKILL.md +171 -0
- package/plugins/ca-pi/routines/crypto-compliance/SKILL.md +41 -0
- package/plugins/ca-pi/routines/debug/SKILL.md +99 -0
- package/plugins/ca-pi/routines/decision-lifecycle/SKILL.md +104 -0
- package/plugins/ca-pi/routines/decision-lifecycle/references/adr-template.md +74 -0
- package/plugins/ca-pi/routines/decision-variance/SKILL.md +147 -0
- package/plugins/ca-pi/routines/decompose/SKILL.md +168 -0
- package/plugins/ca-pi/routines/dispatching-parallel-agents/SKILL.md +76 -0
- package/plugins/ca-pi/routines/executing-plans/SKILL.md +83 -0
- package/plugins/ca-pi/routines/finishing-a-development-branch/SKILL.md +91 -0
- package/plugins/ca-pi/routines/post-merge-cleanup/SKILL.md +233 -0
- package/plugins/ca-pi/routines/refactor/SKILL.md +91 -0
- package/plugins/ca-pi/routines/release/SKILL.md +315 -0
- package/plugins/ca-pi/routines/secret-handling/SKILL.md +67 -0
- package/plugins/ca-pi/routines/security-architecture/SKILL.md +63 -0
- package/plugins/ca-pi/routines/skill-author/SKILL.md +108 -0
- package/plugins/ca-pi/routines/skill-author/references/skill-template.md +58 -0
- package/plugins/ca-pi/routines/subagent-driven-development/SKILL.md +149 -0
- package/plugins/ca-pi/routines/subagent-driven-development/references/farm-dispatch.md +145 -0
- package/plugins/ca-pi/routines/tdd/SKILL.md +139 -0
- package/plugins/ca-pi/routines/tribunal/SKILL.md +109 -0
- package/plugins/ca-pi/routines/tribunal/references/ai-markers.md +29 -0
- package/plugins/ca-pi/routines/tribunal/references/cost-and-models.md +64 -0
- package/plugins/ca-pi/routines/tribunal/references/finding-record.md +27 -0
- package/plugins/ca-pi/routines/tribunal/references/issue-filing.md +47 -0
- package/plugins/ca-pi/routines/tribunal/references/lenses/appsec.md +22 -0
- package/plugins/ca-pi/routines/tribunal/references/lenses/architecture.md +23 -0
- package/plugins/ca-pi/routines/tribunal/references/lenses/coverage.md +20 -0
- package/plugins/ca-pi/routines/tribunal/references/lenses/infra.md +24 -0
- package/plugins/ca-pi/routines/tribunal/references/lenses/migration.md +22 -0
- package/plugins/ca-pi/routines/tribunal/references/lenses/observability.md +21 -0
- package/plugins/ca-pi/routines/tribunal/references/lenses/performance.md +22 -0
- package/plugins/ca-pi/routines/tribunal/references/lenses/reliability.md +23 -0
- package/plugins/ca-pi/routines/tribunal/references/lenses/secrets-supply.md +22 -0
- package/plugins/ca-pi/routines/tribunal/references/lenses/test-fidelity.md +24 -0
- package/plugins/ca-pi/routines/tribunal/references/lenses/typesafety.md +21 -0
- package/plugins/ca-pi/routines/tribunal/references/report.md +19 -0
- package/plugins/ca-pi/routines/tribunal/references/schemas.md +58 -0
- package/plugins/ca-pi/routines/tribunal/references/telemetry.md +28 -0
- package/plugins/ca-pi/routines/tribunal/references/triage.md +53 -0
- package/plugins/ca-pi/routines/using-git-worktrees/SKILL.md +85 -0
- package/plugins/ca-pi/routines/writing-plans/SKILL.md +129 -0
- package/plugins/ca-pi/routines/writing-plans/references/farm-plan.md +50 -0
- package/plugins/ca-pi/skills/ca-add-dep/SKILL.md +88 -0
- package/plugins/ca-pi/skills/ca-adr/SKILL.md +30 -0
- package/plugins/ca-pi/skills/ca-adr-status/SKILL.md +30 -0
- package/plugins/ca-pi/skills/ca-arbiter/SKILL.md +36 -0
- package/plugins/ca-pi/skills/ca-audit/SKILL.md +51 -0
- package/plugins/ca-pi/skills/ca-btw/SKILL.md +23 -0
- package/plugins/ca-pi/skills/ca-checkpoint/SKILL.md +50 -0
- package/plugins/ca-pi/skills/ca-chore/SKILL.md +58 -0
- package/plugins/ca-pi/skills/ca-cleanup/SKILL.md +55 -0
- package/plugins/ca-pi/skills/ca-commands/SKILL.md +21 -0
- package/plugins/ca-pi/skills/ca-commit/SKILL.md +27 -0
- package/plugins/ca-pi/skills/ca-conflict/SKILL.md +61 -0
- package/plugins/ca-pi/skills/ca-context-check/SKILL.md +32 -0
- package/plugins/ca-pi/skills/ca-create-context/SKILL.md +32 -0
- package/plugins/ca-pi/skills/ca-debug/SKILL.md +42 -0
- package/plugins/ca-pi/skills/ca-decompose/SKILL.md +30 -0
- package/plugins/ca-pi/skills/ca-dev/SKILL.md +42 -0
- package/plugins/ca-pi/skills/ca-doctor/SKILL.md +44 -0
- package/plugins/ca-pi/skills/ca-feature/SKILL.md +105 -0
- package/plugins/ca-pi/skills/ca-fix/SKILL.md +42 -0
- package/plugins/ca-pi/skills/ca-init/SKILL.md +56 -0
- package/plugins/ca-pi/skills/ca-metrics/SKILL.md +80 -0
- package/plugins/ca-pi/skills/ca-new-skill/SKILL.md +34 -0
- package/plugins/ca-pi/skills/ca-override/SKILL.md +72 -0
- package/plugins/ca-pi/skills/ca-pr/SKILL.md +61 -0
- package/plugins/ca-pi/skills/ca-preview/SKILL.md +86 -0
- package/plugins/ca-pi/skills/ca-prune/SKILL.md +100 -0
- package/plugins/ca-pi/skills/ca-reconcile/SKILL.md +43 -0
- package/plugins/ca-pi/skills/ca-refactor/SKILL.md +43 -0
- package/plugins/ca-pi/skills/ca-release/SKILL.md +57 -0
- package/plugins/ca-pi/skills/ca-review/SKILL.md +63 -0
- package/plugins/ca-pi/skills/ca-spike/SKILL.md +41 -0
- package/plugins/ca-pi/skills/ca-sprint/SKILL.md +44 -0
- package/plugins/ca-pi/skills/ca-standup/SKILL.md +112 -0
- package/plugins/ca-pi/skills/ca-status/SKILL.md +56 -0
- package/plugins/ca-pi/skills/ca-task/SKILL.md +61 -0
- package/plugins/ca-pi/skills/ca-threat-model/SKILL.md +45 -0
- package/plugins/ca-pi/skills/ca-tribunal/SKILL.md +44 -0
- package/plugins/ca-pi/skills/ca-watch/SKILL.md +78 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "add-dep",
|
|
4
|
+
"description": "Vet a new or changed third-party dependency for license, provenance, and supply-chain risk before any install runs.",
|
|
5
|
+
"skillPath": "skills/ca-add-dep/SKILL.md"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"name": "adr",
|
|
9
|
+
"description": "Author a numbered, dated, user-attributed Architecture Decision Record under .codearbiter/decisions/.",
|
|
10
|
+
"skillPath": "skills/ca-adr/SKILL.md"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "adr-status",
|
|
14
|
+
"description": "Report the health of Architecture Decision Records — aged, unchallenged, supersession candidates, unresolved CONFIRM-NN. Read-only.",
|
|
15
|
+
"skillPath": "skills/ca-adr-status/SKILL.md"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "arbiter",
|
|
19
|
+
"description": "Exit maintainer dev mode — restore orchestration, remove the dev marker, log the exit.",
|
|
20
|
+
"skillPath": "skills/ca-arbiter/SKILL.md"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "audit",
|
|
24
|
+
"description": "Assemble the governance record for a range — commits, overrides, ADRs, sprint auto-decisions, open questions, checkpoint findings — into one dated audit packet. Read-only.",
|
|
25
|
+
"skillPath": "skills/ca-audit/SKILL.md"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "btw",
|
|
29
|
+
"description": "Lightweight Q&A about the project — answer from context and return, no routing, no state change.",
|
|
30
|
+
"skillPath": "skills/ca-btw/SKILL.md"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "checkpoint",
|
|
34
|
+
"description": "Periodic multi-reviewer sweep of the whole codebase — surfaces a triaged checkpoint report.",
|
|
35
|
+
"skillPath": "skills/ca-checkpoint/SKILL.md"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "chore",
|
|
39
|
+
"description": "Sanctioned lane for non-behavioral work — docs-only edits, dependency bumps, reverts. Type-scaled gates; no TDD demanded of prose.",
|
|
40
|
+
"skillPath": "skills/ca-chore/SKILL.md"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "cleanup",
|
|
44
|
+
"description": "Finish an already-merged branch — classify the leftover artifacts, return to a fast-forwarded default checkout, and delete the merged local branch. Every discard confirmed per item; containment proven, never assumed.",
|
|
45
|
+
"skillPath": "skills/ca-cleanup/SKILL.md"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "commands",
|
|
49
|
+
"description": "Show the codeArbiter command catalog — the public command list and what each routes to.",
|
|
50
|
+
"skillPath": "skills/ca-commands/SKILL.md"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "commit",
|
|
54
|
+
"description": "Run the full commit gate — the only sanctioned path to a git commit.",
|
|
55
|
+
"skillPath": "skills/ca-commit/SKILL.md"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "conflict",
|
|
59
|
+
"description": "Stop everything and surface a rule conflict — persona vs. docs vs. code. Present both sides and the conflict-hierarchy level; the user resolves. No silent reconciliation.",
|
|
60
|
+
"skillPath": "skills/ca-conflict/SKILL.md"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "context-check",
|
|
64
|
+
"description": "Optional manual drift audit — report stale provenance-tracked docs, then per stale doc offer re-scout, re-baseline, or defer. Not the daily loop; commit-gate auto-heal owns routine maintenance.",
|
|
65
|
+
"skillPath": "skills/ca-context-check/SKILL.md"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "create-context",
|
|
69
|
+
"description": "Brownfield back-fill — scout an existing codebase and populate .codearbiter/, then lock it initialized.",
|
|
70
|
+
"skillPath": "skills/ca-create-context/SKILL.md"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "debug",
|
|
74
|
+
"description": "Investigate-then-decide root-cause analysis for a defect whose cause is unknown. No code changes — exits to /ca-fix, /ca-adr, or a no-action close.",
|
|
75
|
+
"skillPath": "skills/ca-debug/SKILL.md"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "decompose",
|
|
79
|
+
"description": "Greenfield decomposition interview — a layered interview that populates .codearbiter/ and locks it initialized.",
|
|
80
|
+
"skillPath": "skills/ca-decompose/SKILL.md"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "dev",
|
|
84
|
+
"description": "Maintainer override — suspend orchestration to edit codeArbiter itself. Env-gated (CODEARBITER_DEV=1), entry/exit logged to overrides.log.",
|
|
85
|
+
"skillPath": "skills/ca-dev/SKILL.md"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "doctor",
|
|
89
|
+
"description": "Verify the active host install, package, command ownership, enforcement, wrapper self-test, and active-dispatch coverage gap. Read-only.",
|
|
90
|
+
"skillPath": "skills/ca-doctor/SKILL.md"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "feature",
|
|
94
|
+
"description": "Start a feature: brainstorm a spec, get it approved, then drive it test-first through the pipeline. The one entry to implementation.",
|
|
95
|
+
"skillPath": "skills/ca-feature/SKILL.md"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"name": "fix",
|
|
99
|
+
"description": "Fix a confirmed bug: a failing regression test first, then a minimal fix, then the rest of the tdd gates.",
|
|
100
|
+
"skillPath": "skills/ca-fix/SKILL.md"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "init",
|
|
104
|
+
"description": "Opt this repo into codeArbiter — scaffold the root-level .codearbiter/ state store.",
|
|
105
|
+
"skillPath": "skills/ca-init/SKILL.md"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "metrics",
|
|
109
|
+
"description": "Read-only 3-metric governance glance — override rate, small-lane rate, sprint low-confidence ratio — each with a trend arrow vs. the prior 20-commit window.",
|
|
110
|
+
"skillPath": "skills/ca-metrics/SKILL.md"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "new-skill",
|
|
114
|
+
"description": "Author a new codeArbiter skill: prove the gap is real, get the spec approved, then write it.",
|
|
115
|
+
"skillPath": "skills/ca-new-skill/SKILL.md"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"name": "override",
|
|
119
|
+
"description": "Sanctioned, logged bypass of a gate or hard rule — one audit line, then proceed.",
|
|
120
|
+
"skillPath": "skills/ca-override/SKILL.md"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"name": "pr",
|
|
124
|
+
"description": "Open a pull request the only sanctioned way — clear every BLOCK-level review finding, then stage the PR. Never a direct write to the default branch.",
|
|
125
|
+
"skillPath": "skills/ca-pr/SKILL.md"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "preview",
|
|
129
|
+
"description": "Zero-onboarding, read-only dry-run of the reviewer fleet against the current uncommitted diff. Predicts reviewers, runs the state-free secret scan, writes nothing.",
|
|
130
|
+
"skillPath": "skills/ca-preview/SKILL.md"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"name": "prune",
|
|
134
|
+
"description": "Trim transcript clutter to extend session lifetime — analyze, prune a copy, or toggle the after-each-turn service. Dry-run by default; gains land at resume/compaction, not the current turn.",
|
|
135
|
+
"skillPath": "skills/ca-prune/SKILL.md"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"name": "reconcile",
|
|
139
|
+
"description": "SMARTS arbitration — reconcile architectural artifacts against the scaffold and prior decisions; every variance resolved by an explicit, user-attributed choice.",
|
|
140
|
+
"skillPath": "skills/ca-reconcile/SKILL.md"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"name": "refactor",
|
|
144
|
+
"description": "Restructure code with behavioral parity proven through unmodified pre-existing tests, then refactor. No behavior change.",
|
|
145
|
+
"skillPath": "skills/ca-refactor/SKILL.md"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"name": "release",
|
|
149
|
+
"description": "Cut a release the only sanctioned way — SemVer bump from the commit log, a CHANGELOG section, an annotated tag. Takes the declared target's name as its only argument, or --dry-run to preview one with no write. The only path to a version tag.",
|
|
150
|
+
"skillPath": "skills/ca-release/SKILL.md"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"name": "review",
|
|
154
|
+
"description": "Review a diff with the reviewer fleet, funneled to one triaged verdict. Targets the current working diff, a path, or an inbound GitHub PR.",
|
|
155
|
+
"skillPath": "skills/ca-review/SKILL.md"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"name": "spike",
|
|
159
|
+
"description": "Exploratory spike on a throwaway branch — answer a named question with disposable code. Never merges; exits to a findings note or /ca-feature.",
|
|
160
|
+
"skillPath": "skills/ca-spike/SKILL.md"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "sprint",
|
|
164
|
+
"description": "Autonomous sprint — one interactive spec gate, then plan-to-PR execution with every auto-decision SMARTS-scored and logged. Hard gates remain true stops.",
|
|
165
|
+
"skillPath": "skills/ca-sprint/SKILL.md"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"name": "standup",
|
|
169
|
+
"description": "Daily repo hygiene — review the day's repo state, then perform the cleanups under per-action confirmation. Fast-forward only, never destructive without a yes.",
|
|
170
|
+
"skillPath": "skills/ca-standup/SKILL.md"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"name": "status",
|
|
174
|
+
"description": "Show the project's current state at a glance — stage, open tasks, open questions, overrides since the last checkpoint, current branch. Read-only.",
|
|
175
|
+
"skillPath": "skills/ca-status/SKILL.md"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"name": "task",
|
|
179
|
+
"description": "The sanctioned task-board mutator — add a queued task, start one (flips to in-progress and stamps the date, minting a dotted ID on pick-up), or mark an in-progress task done. The only blessed write to open-tasks.md.",
|
|
180
|
+
"skillPath": "skills/ca-task/SKILL.md"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"name": "threat-model",
|
|
184
|
+
"description": "Opt-in lightweight STRIDE pass for a sensitive feature before implementation. Not a routine gate — invoke it when a change warrants security thought.",
|
|
185
|
+
"skillPath": "skills/ca-threat-model/SKILL.md"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"name": "tribunal",
|
|
189
|
+
"description": "Deep, rarely-convened whole-codebase audit — eleven specialist lenses, a resumable on-disk audit log, findings filed as GitHub issues on approval. Expensive; estimates cost and STOPs before running. Never a required gate.",
|
|
190
|
+
"skillPath": "skills/ca-tribunal/SKILL.md"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"name": "watch",
|
|
194
|
+
"description": "Watch a PR's CI to completion — diagnose on red, notify and offer the merge on green. Never auto-merges.",
|
|
195
|
+
"skillPath": "skills/ca-watch/SKILL.md"
|
|
196
|
+
}
|
|
197
|
+
]
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "architecture-drift-reviewer",
|
|
4
|
+
"classification": "reviewer",
|
|
5
|
+
"charterPath": "agents/architecture-drift-reviewer.md",
|
|
6
|
+
"skillPaths": [
|
|
7
|
+
"routines/decision-variance/SKILL.md"
|
|
8
|
+
],
|
|
9
|
+
"tools": [
|
|
10
|
+
"read",
|
|
11
|
+
"bash"
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "auth-crypto-reviewer",
|
|
16
|
+
"classification": "reviewer",
|
|
17
|
+
"charterPath": "agents/auth-crypto-reviewer.md",
|
|
18
|
+
"skillPaths": [
|
|
19
|
+
"routines/secret-handling/SKILL.md"
|
|
20
|
+
],
|
|
21
|
+
"tools": [
|
|
22
|
+
"read",
|
|
23
|
+
"bash"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "backend-author",
|
|
28
|
+
"classification": "author",
|
|
29
|
+
"charterPath": "agents/backend-author.md",
|
|
30
|
+
"skillPaths": [
|
|
31
|
+
"routines/tdd/SKILL.md"
|
|
32
|
+
],
|
|
33
|
+
"tools": [
|
|
34
|
+
"read",
|
|
35
|
+
"bash",
|
|
36
|
+
"edit",
|
|
37
|
+
"write"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "checkpoint-aggregator",
|
|
42
|
+
"classification": "reviewer",
|
|
43
|
+
"charterPath": "agents/checkpoint-aggregator.md",
|
|
44
|
+
"skillPaths": [],
|
|
45
|
+
"tools": [
|
|
46
|
+
"read",
|
|
47
|
+
"bash",
|
|
48
|
+
"write"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "coverage-auditor",
|
|
53
|
+
"classification": "reviewer",
|
|
54
|
+
"charterPath": "agents/coverage-auditor.md",
|
|
55
|
+
"skillPaths": [
|
|
56
|
+
"routines/tdd/SKILL.md"
|
|
57
|
+
],
|
|
58
|
+
"tools": [
|
|
59
|
+
"read",
|
|
60
|
+
"bash"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "decision-challenger",
|
|
65
|
+
"classification": "reviewer",
|
|
66
|
+
"charterPath": "agents/decision-challenger.md",
|
|
67
|
+
"skillPaths": [
|
|
68
|
+
"routines/decision-variance/SKILL.md"
|
|
69
|
+
],
|
|
70
|
+
"tools": [
|
|
71
|
+
"read",
|
|
72
|
+
"bash"
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "dependency-reviewer",
|
|
77
|
+
"classification": "reviewer",
|
|
78
|
+
"charterPath": "agents/dependency-reviewer.md",
|
|
79
|
+
"skillPaths": [],
|
|
80
|
+
"tools": [
|
|
81
|
+
"read",
|
|
82
|
+
"bash"
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "design-quality-reviewer",
|
|
87
|
+
"classification": "reviewer",
|
|
88
|
+
"charterPath": "agents/design-quality-reviewer.md",
|
|
89
|
+
"skillPaths": [],
|
|
90
|
+
"tools": [
|
|
91
|
+
"read"
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "finding-triage",
|
|
96
|
+
"classification": "reviewer",
|
|
97
|
+
"charterPath": "agents/finding-triage.md",
|
|
98
|
+
"skillPaths": [],
|
|
99
|
+
"tools": [
|
|
100
|
+
"read"
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"name": "frontend-author",
|
|
105
|
+
"classification": "author",
|
|
106
|
+
"charterPath": "agents/frontend-author.md",
|
|
107
|
+
"skillPaths": [
|
|
108
|
+
"routines/tdd/SKILL.md"
|
|
109
|
+
],
|
|
110
|
+
"tools": [
|
|
111
|
+
"read",
|
|
112
|
+
"bash",
|
|
113
|
+
"edit",
|
|
114
|
+
"write"
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"name": "grader",
|
|
119
|
+
"classification": "reviewer",
|
|
120
|
+
"charterPath": "agents/grader.md",
|
|
121
|
+
"skillPaths": [
|
|
122
|
+
"routines/decision-variance/SKILL.md"
|
|
123
|
+
],
|
|
124
|
+
"tools": [
|
|
125
|
+
"read",
|
|
126
|
+
"bash"
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "infra-author",
|
|
131
|
+
"classification": "author",
|
|
132
|
+
"charterPath": "agents/infra-author.md",
|
|
133
|
+
"skillPaths": [
|
|
134
|
+
"routines/tdd/SKILL.md"
|
|
135
|
+
],
|
|
136
|
+
"tools": [
|
|
137
|
+
"read",
|
|
138
|
+
"bash",
|
|
139
|
+
"edit",
|
|
140
|
+
"write"
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "map-deps",
|
|
145
|
+
"classification": "reviewer",
|
|
146
|
+
"charterPath": "agents/map-deps.md",
|
|
147
|
+
"skillPaths": [
|
|
148
|
+
"routines/tribunal/SKILL.md"
|
|
149
|
+
],
|
|
150
|
+
"tools": [
|
|
151
|
+
"read",
|
|
152
|
+
"bash"
|
|
153
|
+
]
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": "map-structure",
|
|
157
|
+
"classification": "reviewer",
|
|
158
|
+
"charterPath": "agents/map-structure.md",
|
|
159
|
+
"skillPaths": [
|
|
160
|
+
"routines/tribunal/SKILL.md"
|
|
161
|
+
],
|
|
162
|
+
"tools": [
|
|
163
|
+
"read",
|
|
164
|
+
"bash"
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"name": "migration-reviewer",
|
|
169
|
+
"classification": "reviewer",
|
|
170
|
+
"charterPath": "agents/migration-reviewer.md",
|
|
171
|
+
"skillPaths": [],
|
|
172
|
+
"tools": [
|
|
173
|
+
"read",
|
|
174
|
+
"bash"
|
|
175
|
+
]
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"name": "scout",
|
|
179
|
+
"classification": "reviewer",
|
|
180
|
+
"charterPath": "agents/scout.md",
|
|
181
|
+
"skillPaths": [
|
|
182
|
+
"routines/decision-variance/SKILL.md",
|
|
183
|
+
"routines/context-creation/SKILL.md"
|
|
184
|
+
],
|
|
185
|
+
"tools": [
|
|
186
|
+
"read",
|
|
187
|
+
"bash"
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"name": "security-reviewer",
|
|
192
|
+
"classification": "reviewer",
|
|
193
|
+
"charterPath": "agents/security-reviewer.md",
|
|
194
|
+
"skillPaths": [],
|
|
195
|
+
"tools": [
|
|
196
|
+
"read",
|
|
197
|
+
"bash"
|
|
198
|
+
]
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"name": "tribunal-lens-reviewer",
|
|
202
|
+
"classification": "reviewer",
|
|
203
|
+
"charterPath": "agents/tribunal-lens-reviewer.md",
|
|
204
|
+
"skillPaths": [
|
|
205
|
+
"routines/tribunal/SKILL.md"
|
|
206
|
+
],
|
|
207
|
+
"tools": [
|
|
208
|
+
"read",
|
|
209
|
+
"bash",
|
|
210
|
+
"write"
|
|
211
|
+
]
|
|
212
|
+
}
|
|
213
|
+
]
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
// src/windows-supervisor.ts
|
|
2
|
+
import { spawn } from "node:child_process";
|
|
3
|
+
import { isAbsolute } from "node:path";
|
|
4
|
+
import { createReadStream, createWriteStream } from "node:fs";
|
|
5
|
+
import { Socket } from "node:net";
|
|
6
|
+
var MAX_LAUNCH_BYTES = 3145728;
|
|
7
|
+
var MAX_CONTROL_BYTES = 16;
|
|
8
|
+
var MAX_ENV_ENTRIES = 256;
|
|
9
|
+
var MAX_ENV_BYTES = 262144;
|
|
10
|
+
var PROXY_DRAIN_MS = 500;
|
|
11
|
+
var START = "START\n";
|
|
12
|
+
var launchInput = createReadStream("", { fd: 4, autoClose: false });
|
|
13
|
+
var controlInput = createReadStream("", { fd: 5, autoClose: false });
|
|
14
|
+
var statusOutput = createWriteStream("", { fd: 6, autoClose: false });
|
|
15
|
+
var parentLeash = new Socket({ fd: 7, readable: true, writable: false });
|
|
16
|
+
function exactObject(value, keys) {
|
|
17
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) return false;
|
|
18
|
+
const actual = Object.keys(value).sort();
|
|
19
|
+
return actual.length === keys.length && actual.every((key, index) => key === [...keys].sort()[index]);
|
|
20
|
+
}
|
|
21
|
+
function parseLaunch(value) {
|
|
22
|
+
let parsed;
|
|
23
|
+
try {
|
|
24
|
+
parsed = JSON.parse(value);
|
|
25
|
+
} catch {
|
|
26
|
+
throw new Error("invalid launch record");
|
|
27
|
+
}
|
|
28
|
+
if (!exactObject(parsed, ["args", "command", "cwd", "env"])) throw new Error("invalid launch record");
|
|
29
|
+
const { args, command, cwd, env } = parsed;
|
|
30
|
+
if (typeof command !== "string" || !isAbsolute(command) || typeof cwd !== "string" || !isAbsolute(cwd) || !Array.isArray(args) || args.length > 256 || args.some((item) => typeof item !== "string" || Buffer.byteLength(item, "utf8") > 262144) || !Array.isArray(env) || env.length > MAX_ENV_ENTRIES) {
|
|
31
|
+
throw new Error("invalid launch record");
|
|
32
|
+
}
|
|
33
|
+
let environmentBytes = 0;
|
|
34
|
+
const environment = /* @__PURE__ */ Object.create(null);
|
|
35
|
+
for (const entry of env) {
|
|
36
|
+
if (!Array.isArray(entry) || entry.length !== 2) throw new Error("invalid launch record");
|
|
37
|
+
const [key, value2] = entry;
|
|
38
|
+
if (typeof key !== "string" || key.length === 0 || key.length > 256 || key.includes("\0") || Buffer.byteLength(key, "utf8") > 512 || typeof value2 !== "string" || value2.length > 32768 || value2.includes("\0") || Buffer.byteLength(value2, "utf8") > 65536 || Object.hasOwn(environment, key)) throw new Error("invalid launch record");
|
|
39
|
+
environmentBytes += Buffer.byteLength(key, "utf8") + Buffer.byteLength(value2, "utf8");
|
|
40
|
+
if (environmentBytes > MAX_ENV_BYTES) throw new Error("invalid launch record");
|
|
41
|
+
environment[key] = value2;
|
|
42
|
+
}
|
|
43
|
+
return Object.freeze({
|
|
44
|
+
args: Object.freeze([...args]),
|
|
45
|
+
command,
|
|
46
|
+
cwd,
|
|
47
|
+
env: Object.freeze(environment)
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function boundedRead(stream, maximum) {
|
|
51
|
+
return new Promise((resolve, reject) => {
|
|
52
|
+
let bytes = 0;
|
|
53
|
+
let value = "";
|
|
54
|
+
stream.setEncoding?.("utf8");
|
|
55
|
+
stream.on("data", (chunk) => {
|
|
56
|
+
const text = typeof chunk === "string" ? chunk : chunk.toString("utf8");
|
|
57
|
+
bytes += Buffer.byteLength(text, "utf8");
|
|
58
|
+
if (bytes > maximum) reject(new Error("bounded supervisor protocol overflow"));
|
|
59
|
+
else value += text;
|
|
60
|
+
});
|
|
61
|
+
stream.once("end", () => resolve(value));
|
|
62
|
+
stream.once("error", reject);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
var started = false;
|
|
66
|
+
var child;
|
|
67
|
+
var failureReason;
|
|
68
|
+
var failClosed = () => {
|
|
69
|
+
process.exitCode = 70;
|
|
70
|
+
try {
|
|
71
|
+
parentLeash.destroy();
|
|
72
|
+
} catch {
|
|
73
|
+
}
|
|
74
|
+
try {
|
|
75
|
+
launchInput.destroy();
|
|
76
|
+
} catch {
|
|
77
|
+
}
|
|
78
|
+
try {
|
|
79
|
+
controlInput.destroy();
|
|
80
|
+
} catch {
|
|
81
|
+
}
|
|
82
|
+
try {
|
|
83
|
+
statusOutput.destroy();
|
|
84
|
+
} catch {
|
|
85
|
+
}
|
|
86
|
+
setImmediate(() => process.exit(70));
|
|
87
|
+
};
|
|
88
|
+
function waitForReadableDrain(stream) {
|
|
89
|
+
if (stream.readableEnded === true) return Promise.resolve();
|
|
90
|
+
return new Promise((resolveDrain) => {
|
|
91
|
+
let settled = false;
|
|
92
|
+
const finish = () => {
|
|
93
|
+
if (settled) return;
|
|
94
|
+
settled = true;
|
|
95
|
+
clearTimeout(timer);
|
|
96
|
+
resolveDrain();
|
|
97
|
+
};
|
|
98
|
+
const timer = setTimeout(finish, PROXY_DRAIN_MS);
|
|
99
|
+
stream.once("end", finish);
|
|
100
|
+
stream.once("close", finish);
|
|
101
|
+
stream.once("error", finish);
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
function waitForWritableDrain(stream) {
|
|
105
|
+
if (stream.writableNeedDrain !== true) return Promise.resolve();
|
|
106
|
+
return new Promise((resolveDrain) => {
|
|
107
|
+
let settled = false;
|
|
108
|
+
const finish = () => {
|
|
109
|
+
if (settled) return;
|
|
110
|
+
settled = true;
|
|
111
|
+
clearTimeout(timer);
|
|
112
|
+
resolveDrain();
|
|
113
|
+
};
|
|
114
|
+
const timer = setTimeout(finish, PROXY_DRAIN_MS);
|
|
115
|
+
stream.once("drain", finish);
|
|
116
|
+
stream.once("close", finish);
|
|
117
|
+
stream.once("error", finish);
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
parentLeash.once("end", failClosed);
|
|
121
|
+
parentLeash.once("error", failClosed);
|
|
122
|
+
parentLeash.resume();
|
|
123
|
+
process.once("disconnect", failClosed);
|
|
124
|
+
try {
|
|
125
|
+
failureReason = "proto-overflow";
|
|
126
|
+
const [launchText, control] = await Promise.all([
|
|
127
|
+
boundedRead(launchInput, MAX_LAUNCH_BYTES),
|
|
128
|
+
boundedRead(controlInput, MAX_CONTROL_BYTES)
|
|
129
|
+
]);
|
|
130
|
+
failureReason = "launch-malformed";
|
|
131
|
+
if (control !== START || started) throw new Error("invalid supervisor control state");
|
|
132
|
+
started = true;
|
|
133
|
+
const launch = parseLaunch(launchText);
|
|
134
|
+
failureReason = "spawn-error";
|
|
135
|
+
child = spawn(launch.command, [...launch.args], {
|
|
136
|
+
cwd: launch.cwd,
|
|
137
|
+
env: launch.env,
|
|
138
|
+
detached: false,
|
|
139
|
+
shell: false,
|
|
140
|
+
stdio: ["pipe", "pipe", "pipe", "pipe"],
|
|
141
|
+
windowsHide: true
|
|
142
|
+
});
|
|
143
|
+
const capability = child.stdio[3];
|
|
144
|
+
if (child.stdin === null || child.stdout === null || child.stderr === null || capability === null || capability === void 0 || typeof capability.write !== "function") {
|
|
145
|
+
failureReason = "pipe-unavailable";
|
|
146
|
+
throw new Error("Pi proxy pipes unavailable");
|
|
147
|
+
}
|
|
148
|
+
let proxyReady = false;
|
|
149
|
+
let exitFinalized = false;
|
|
150
|
+
let observedExit;
|
|
151
|
+
let capabilityInput;
|
|
152
|
+
const finalizeExit = (code) => {
|
|
153
|
+
observedExit = Object.freeze({ code });
|
|
154
|
+
if (!proxyReady || exitFinalized) return;
|
|
155
|
+
exitFinalized = true;
|
|
156
|
+
process.stdin.unpipe(child.stdin);
|
|
157
|
+
capabilityInput.unpipe(capability);
|
|
158
|
+
capabilityInput.destroy();
|
|
159
|
+
child.stdin.destroy();
|
|
160
|
+
capability.destroy?.();
|
|
161
|
+
void Promise.all([
|
|
162
|
+
waitForReadableDrain(child.stdout),
|
|
163
|
+
waitForReadableDrain(child.stderr)
|
|
164
|
+
]).then(async () => await Promise.all([
|
|
165
|
+
waitForWritableDrain(process.stdout),
|
|
166
|
+
waitForWritableDrain(process.stderr)
|
|
167
|
+
])).finally(() => process.exit(typeof code === "number" ? code : 71));
|
|
168
|
+
};
|
|
169
|
+
child.once("exit", finalizeExit);
|
|
170
|
+
failureReason = "spawn-error";
|
|
171
|
+
await new Promise((resolve, reject) => {
|
|
172
|
+
child.once("spawn", resolve);
|
|
173
|
+
child.once("error", reject);
|
|
174
|
+
});
|
|
175
|
+
failureReason = "pid-invalid";
|
|
176
|
+
if (child.pid === void 0 || !Number.isSafeInteger(child.pid) || child.pid <= 0) {
|
|
177
|
+
throw new Error("Pi pid unavailable");
|
|
178
|
+
}
|
|
179
|
+
if ((child.exitCode !== null || child.signalCode !== null) && observedExit === void 0) {
|
|
180
|
+
observedExit = Object.freeze({ code: child.exitCode });
|
|
181
|
+
}
|
|
182
|
+
process.stdin.pipe(child.stdin);
|
|
183
|
+
child.stdout.pipe(process.stdout);
|
|
184
|
+
child.stderr.pipe(process.stderr);
|
|
185
|
+
capabilityInput = createReadStream("", { fd: 3, autoClose: false });
|
|
186
|
+
capabilityInput.pipe(capability);
|
|
187
|
+
proxyReady = true;
|
|
188
|
+
statusOutput.end(`STARTED ${child.pid}
|
|
189
|
+
`);
|
|
190
|
+
if (observedExit !== void 0) queueMicrotask(() => finalizeExit(observedExit.code));
|
|
191
|
+
} catch {
|
|
192
|
+
try {
|
|
193
|
+
await Promise.race([
|
|
194
|
+
new Promise((resolveFlush) => {
|
|
195
|
+
statusOutput.end(`REFUSED${failureReason === void 0 ? "" : ` ${failureReason}`}
|
|
196
|
+
`, () => resolveFlush());
|
|
197
|
+
}),
|
|
198
|
+
new Promise((resolveTimeout) => {
|
|
199
|
+
setTimeout(resolveTimeout, PROXY_DRAIN_MS).unref?.();
|
|
200
|
+
})
|
|
201
|
+
]);
|
|
202
|
+
} catch {
|
|
203
|
+
}
|
|
204
|
+
failClosed();
|
|
205
|
+
}
|