iriai-build 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/iriai-build.js +78 -0
- package/bridge-v3.js +98 -0
- package/cli/bootstrap.js +83 -0
- package/cli/commands/implementation.js +64 -0
- package/cli/commands/index.js +46 -0
- package/cli/commands/launch.js +153 -0
- package/cli/commands/plan.js +117 -0
- package/cli/commands/setup.js +80 -0
- package/cli/commands/slack.js +97 -0
- package/cli/commands/transfer.js +111 -0
- package/cli/config.js +92 -0
- package/cli/display.js +121 -0
- package/cli/terminal-input.js +666 -0
- package/cli/wait.js +82 -0
- package/index.js +1488 -0
- package/lib/agent-process.js +170 -0
- package/lib/bridge-state.js +126 -0
- package/lib/constants.js +137 -0
- package/lib/health-monitor.js +113 -0
- package/lib/prompt-builder.js +565 -0
- package/lib/signal-watcher.js +215 -0
- package/lib/slack-helpers.js +224 -0
- package/lib/state-machines/feature-lead.js +408 -0
- package/lib/state-machines/operator-agent.js +173 -0
- package/lib/state-machines/planning-role.js +161 -0
- package/lib/state-machines/role-agent.js +186 -0
- package/lib/state-machines/team-orchestrator.js +160 -0
- package/package.json +31 -0
- package/v3/.handover-html-evidence.md +35 -0
- package/v3/KICKOFF-HTML-EVIDENCE.md +98 -0
- package/v3/PLAN-HTML-EVIDENCE-HARDENING.md +603 -0
- package/v3/adapters/desktop-adapter.js +78 -0
- package/v3/adapters/interface.js +146 -0
- package/v3/adapters/slack-adapter.js +608 -0
- package/v3/adapters/slack-helpers.js +179 -0
- package/v3/adapters/terminal-adapter.js +249 -0
- package/v3/agent-supervisor.js +320 -0
- package/v3/artifact-portal.js +1184 -0
- package/v3/bridge.db +0 -0
- package/v3/constants.js +170 -0
- package/v3/db.js +76 -0
- package/v3/file-io.js +216 -0
- package/v3/helpers.js +174 -0
- package/v3/operator.js +364 -0
- package/v3/orchestrator.js +2886 -0
- package/v3/plan-compiler.js +440 -0
- package/v3/prompt-builder.js +849 -0
- package/v3/queries.js +461 -0
- package/v3/recovery.js +508 -0
- package/v3/review-sessions.js +360 -0
- package/v3/roles/accessibility-auditor/CLAUDE.md +50 -0
- package/v3/roles/analytics-engineer/CLAUDE.md +40 -0
- package/v3/roles/architect/CLAUDE.md +809 -0
- package/v3/roles/backend-implementer/CLAUDE.md +97 -0
- package/v3/roles/code-reviewer/CLAUDE.md +89 -0
- package/v3/roles/database-implementer/CLAUDE.md +97 -0
- package/v3/roles/deployer/CLAUDE.md +42 -0
- package/v3/roles/designer/CLAUDE.md +386 -0
- package/v3/roles/documentation/CLAUDE.md +40 -0
- package/v3/roles/feature-lead/CLAUDE.md +233 -0
- package/v3/roles/frontend-implementer/CLAUDE.md +97 -0
- package/v3/roles/implementer/CLAUDE.md +97 -0
- package/v3/roles/integration-tester/CLAUDE.md +174 -0
- package/v3/roles/observability-engineer/CLAUDE.md +40 -0
- package/v3/roles/operator/CLAUDE.md +322 -0
- package/v3/roles/orchestrator/CLAUDE.md +288 -0
- package/v3/roles/package-implementer/CLAUDE.md +47 -0
- package/v3/roles/performance-analyst/CLAUDE.md +49 -0
- package/v3/roles/plan-compiler/CLAUDE.md +163 -0
- package/v3/roles/planning-lead/CLAUDE.md +41 -0
- package/v3/roles/pm/CLAUDE.md +806 -0
- package/v3/roles/regression-tester/CLAUDE.md +135 -0
- package/v3/roles/release-manager/CLAUDE.md +43 -0
- package/v3/roles/security-auditor/CLAUDE.md +90 -0
- package/v3/roles/smoke-tester/CLAUDE.md +97 -0
- package/v3/roles/test-author/CLAUDE.md +42 -0
- package/v3/roles/verifier/CLAUDE.md +90 -0
- package/v3/schema.sql +134 -0
- package/v3/slack-adapter.js +510 -0
- package/v3/slack-helpers.js +346 -0
package/cli/wait.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// wait.js — Shared wait-for-phase helpers for CLI commands.
|
|
2
|
+
// Uses adapter events + fallback polling with proper cleanup.
|
|
3
|
+
|
|
4
|
+
import * as queries from "../v3/queries.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Wait for the plan-approval decision to be made (approved or rejected).
|
|
8
|
+
* Uses adapter events to avoid racing with inline prompts.
|
|
9
|
+
*/
|
|
10
|
+
export function waitForPlanDecision(featureId, adapter) {
|
|
11
|
+
return new Promise((resolve) => {
|
|
12
|
+
const feature = queries.getFeatureById(featureId);
|
|
13
|
+
if (feature?.phase === "plan-approval" || feature?.phase === "impl" ||
|
|
14
|
+
feature?.phase === "complete" || feature?.phase === "failed") {
|
|
15
|
+
resolve();
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const onApproved = (fId) => {
|
|
20
|
+
if (fId !== featureId) return;
|
|
21
|
+
cleanup();
|
|
22
|
+
resolve();
|
|
23
|
+
};
|
|
24
|
+
const onRejected = (fId) => {
|
|
25
|
+
if (fId !== featureId) return;
|
|
26
|
+
cleanup();
|
|
27
|
+
resolve();
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const interval = setInterval(() => {
|
|
31
|
+
const f = queries.getFeatureById(featureId);
|
|
32
|
+
if (f?.phase === "failed" || f?.phase === "plan-approval" ||
|
|
33
|
+
f?.phase === "impl" || f?.phase === "complete") {
|
|
34
|
+
cleanup();
|
|
35
|
+
resolve();
|
|
36
|
+
}
|
|
37
|
+
}, 5000);
|
|
38
|
+
|
|
39
|
+
function cleanup() {
|
|
40
|
+
clearInterval(interval);
|
|
41
|
+
adapter.removeListener("plan-approved", onApproved);
|
|
42
|
+
adapter.removeListener("plan-rejected", onRejected);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
adapter.on("plan-approved", onApproved);
|
|
46
|
+
adapter.on("plan-rejected", onRejected);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Wait for feature to reach "complete" or "failed" phase.
|
|
52
|
+
*/
|
|
53
|
+
export function waitForCompletion(featureId, adapter) {
|
|
54
|
+
return new Promise((resolve) => {
|
|
55
|
+
const feature = queries.getFeatureById(featureId);
|
|
56
|
+
if (feature?.phase === "complete" || feature?.phase === "failed") {
|
|
57
|
+
resolve();
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const onComplete = (fId) => {
|
|
62
|
+
if (fId !== featureId) return;
|
|
63
|
+
cleanup();
|
|
64
|
+
resolve();
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const interval = setInterval(() => {
|
|
68
|
+
const f = queries.getFeatureById(featureId);
|
|
69
|
+
if (f?.phase === "complete" || f?.phase === "failed") {
|
|
70
|
+
cleanup();
|
|
71
|
+
resolve();
|
|
72
|
+
}
|
|
73
|
+
}, 5000);
|
|
74
|
+
|
|
75
|
+
function cleanup() {
|
|
76
|
+
clearInterval(interval);
|
|
77
|
+
adapter.removeListener("feature-complete", onComplete);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
adapter.on("feature-complete", onComplete);
|
|
81
|
+
});
|
|
82
|
+
}
|