agentxchain 0.8.7 → 2.1.1
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 +123 -154
- package/bin/agentxchain.js +240 -8
- package/dashboard/app.js +305 -0
- package/dashboard/components/blocked.js +145 -0
- package/dashboard/components/cross-repo.js +126 -0
- package/dashboard/components/gate.js +311 -0
- package/dashboard/components/hooks.js +177 -0
- package/dashboard/components/initiative.js +147 -0
- package/dashboard/components/ledger.js +165 -0
- package/dashboard/components/timeline.js +222 -0
- package/dashboard/index.html +352 -0
- package/package.json +16 -7
- package/scripts/agentxchain-autonudge.applescript +32 -5
- package/scripts/live-api-proxy-preflight-smoke.sh +531 -0
- package/scripts/publish-from-tag.sh +88 -0
- package/scripts/release-postflight.sh +231 -0
- package/scripts/release-preflight.sh +167 -0
- package/scripts/run-autonudge.sh +1 -1
- package/src/adapters/claude-code.js +7 -14
- package/src/adapters/cursor-local.js +17 -16
- package/src/commands/accept-turn.js +160 -0
- package/src/commands/approve-completion.js +80 -0
- package/src/commands/approve-transition.js +85 -0
- package/src/commands/branch.js +2 -2
- package/src/commands/claim.js +84 -9
- package/src/commands/config.js +16 -0
- package/src/commands/dashboard.js +70 -0
- package/src/commands/doctor.js +9 -1
- package/src/commands/init.js +540 -5
- package/src/commands/migrate.js +348 -0
- package/src/commands/multi.js +549 -0
- package/src/commands/plugin.js +157 -0
- package/src/commands/reject-turn.js +204 -0
- package/src/commands/resume.js +389 -0
- package/src/commands/status.js +196 -3
- package/src/commands/step.js +947 -0
- package/src/commands/stop.js +65 -33
- package/src/commands/template-list.js +33 -0
- package/src/commands/template-set.js +279 -0
- package/src/commands/update.js +24 -3
- package/src/commands/validate.js +20 -11
- package/src/commands/verify.js +71 -0
- package/src/commands/watch.js +112 -25
- package/src/lib/adapters/api-proxy-adapter.js +1076 -0
- package/src/lib/adapters/local-cli-adapter.js +337 -0
- package/src/lib/adapters/manual-adapter.js +169 -0
- package/src/lib/blocked-state.js +94 -0
- package/src/lib/config.js +143 -12
- package/src/lib/context-compressor.js +121 -0
- package/src/lib/context-section-parser.js +220 -0
- package/src/lib/coordinator-acceptance.js +428 -0
- package/src/lib/coordinator-config.js +461 -0
- package/src/lib/coordinator-dispatch.js +276 -0
- package/src/lib/coordinator-gates.js +487 -0
- package/src/lib/coordinator-hooks.js +239 -0
- package/src/lib/coordinator-recovery.js +523 -0
- package/src/lib/coordinator-state.js +365 -0
- package/src/lib/cross-repo-context.js +247 -0
- package/src/lib/dashboard/bridge-server.js +284 -0
- package/src/lib/dashboard/file-watcher.js +93 -0
- package/src/lib/dashboard/state-reader.js +96 -0
- package/src/lib/dispatch-bundle.js +568 -0
- package/src/lib/dispatch-manifest.js +252 -0
- package/src/lib/filter-agents.js +12 -0
- package/src/lib/gate-evaluator.js +285 -0
- package/src/lib/generate-vscode.js +158 -68
- package/src/lib/governed-state.js +2139 -0
- package/src/lib/governed-templates.js +145 -0
- package/src/lib/hook-runner.js +788 -0
- package/src/lib/next-owner.js +61 -6
- package/src/lib/normalized-config.js +539 -0
- package/src/lib/notify.js +14 -12
- package/src/lib/plugin-config-schema.js +192 -0
- package/src/lib/plugins.js +692 -0
- package/src/lib/prompt-core.js +108 -0
- package/src/lib/protocol-conformance.js +291 -0
- package/src/lib/reference-conformance-adapter.js +717 -0
- package/src/lib/repo-observer.js +597 -0
- package/src/lib/repo.js +0 -31
- package/src/lib/safe-write.js +44 -0
- package/src/lib/schema.js +189 -0
- package/src/lib/schemas/turn-result.schema.json +205 -0
- package/src/lib/seed-prompt-polling.js +15 -73
- package/src/lib/seed-prompt.js +17 -63
- package/src/lib/token-budget.js +206 -0
- package/src/lib/token-counter.js +27 -0
- package/src/lib/turn-paths.js +67 -0
- package/src/lib/turn-result-validator.js +496 -0
- package/src/lib/validation.js +167 -19
- package/src/lib/verify-command.js +72 -0
- package/src/templates/governed/api-service.json +31 -0
- package/src/templates/governed/cli-tool.json +30 -0
- package/src/templates/governed/generic.json +10 -0
- package/src/templates/governed/web-app.json +30 -0
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>AgentXchain Dashboard</title>
|
|
7
|
+
<style>
|
|
8
|
+
:root {
|
|
9
|
+
--bg: #0a0a0f;
|
|
10
|
+
--surface: #12121a;
|
|
11
|
+
--border: #1e1e2e;
|
|
12
|
+
--text: #e0e0e6;
|
|
13
|
+
--text-dim: #8888a0;
|
|
14
|
+
--accent: #6366f1;
|
|
15
|
+
--green: #22c55e;
|
|
16
|
+
--yellow: #eab308;
|
|
17
|
+
--red: #ef4444;
|
|
18
|
+
}
|
|
19
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
20
|
+
body {
|
|
21
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
|
|
22
|
+
background: var(--bg);
|
|
23
|
+
color: var(--text);
|
|
24
|
+
min-height: 100vh;
|
|
25
|
+
}
|
|
26
|
+
header {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
justify-content: space-between;
|
|
30
|
+
padding: 12px 24px;
|
|
31
|
+
border-bottom: 1px solid var(--border);
|
|
32
|
+
background: var(--surface);
|
|
33
|
+
}
|
|
34
|
+
header h1 {
|
|
35
|
+
font-size: 16px;
|
|
36
|
+
font-weight: 600;
|
|
37
|
+
letter-spacing: -0.02em;
|
|
38
|
+
}
|
|
39
|
+
header h1 span { color: var(--accent); }
|
|
40
|
+
.status-indicator {
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
gap: 6px;
|
|
44
|
+
font-size: 12px;
|
|
45
|
+
color: var(--text-dim);
|
|
46
|
+
}
|
|
47
|
+
.status-dot {
|
|
48
|
+
width: 8px;
|
|
49
|
+
height: 8px;
|
|
50
|
+
border-radius: 50%;
|
|
51
|
+
background: var(--green);
|
|
52
|
+
}
|
|
53
|
+
.status-dot.disconnected { background: var(--red); }
|
|
54
|
+
nav {
|
|
55
|
+
display: flex;
|
|
56
|
+
gap: 0;
|
|
57
|
+
padding: 0 24px;
|
|
58
|
+
border-bottom: 1px solid var(--border);
|
|
59
|
+
background: var(--surface);
|
|
60
|
+
}
|
|
61
|
+
nav a {
|
|
62
|
+
padding: 10px 16px;
|
|
63
|
+
font-size: 13px;
|
|
64
|
+
color: var(--text-dim);
|
|
65
|
+
text-decoration: none;
|
|
66
|
+
border-bottom: 2px solid transparent;
|
|
67
|
+
transition: color 0.15s, border-color 0.15s;
|
|
68
|
+
}
|
|
69
|
+
nav a:hover { color: var(--text); }
|
|
70
|
+
nav a.active {
|
|
71
|
+
color: var(--accent);
|
|
72
|
+
border-bottom-color: var(--accent);
|
|
73
|
+
}
|
|
74
|
+
main {
|
|
75
|
+
padding: 24px;
|
|
76
|
+
max-width: 1200px;
|
|
77
|
+
margin: 0 auto;
|
|
78
|
+
}
|
|
79
|
+
.mono { font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; }
|
|
80
|
+
|
|
81
|
+
/* Placeholder */
|
|
82
|
+
.placeholder {
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
align-items: center;
|
|
86
|
+
justify-content: center;
|
|
87
|
+
min-height: 400px;
|
|
88
|
+
color: var(--text-dim);
|
|
89
|
+
text-align: center;
|
|
90
|
+
}
|
|
91
|
+
.placeholder h2 { font-size: 18px; margin-bottom: 8px; font-weight: 500; }
|
|
92
|
+
.placeholder p { font-size: 14px; max-width: 400px; line-height: 1.5; }
|
|
93
|
+
.placeholder code { background: var(--surface); padding: 2px 6px; border-radius: 3px; }
|
|
94
|
+
.placeholder.compact { min-height: 120px; }
|
|
95
|
+
|
|
96
|
+
/* Badge */
|
|
97
|
+
.badge {
|
|
98
|
+
display: inline-block;
|
|
99
|
+
padding: 2px 8px;
|
|
100
|
+
border: 1px solid;
|
|
101
|
+
border-radius: 4px;
|
|
102
|
+
font-size: 11px;
|
|
103
|
+
font-weight: 600;
|
|
104
|
+
text-transform: uppercase;
|
|
105
|
+
letter-spacing: 0.04em;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* Run header */
|
|
109
|
+
.run-header {
|
|
110
|
+
padding: 16px 0;
|
|
111
|
+
border-bottom: 1px solid var(--border);
|
|
112
|
+
margin-bottom: 20px;
|
|
113
|
+
}
|
|
114
|
+
.run-meta {
|
|
115
|
+
display: flex;
|
|
116
|
+
align-items: center;
|
|
117
|
+
gap: 12px;
|
|
118
|
+
flex-wrap: wrap;
|
|
119
|
+
}
|
|
120
|
+
.run-id { font-size: 13px; color: var(--text-dim); }
|
|
121
|
+
.phase-label { font-size: 13px; color: var(--text-dim); }
|
|
122
|
+
.phase-label strong { color: var(--text); }
|
|
123
|
+
.turn-count { font-size: 13px; color: var(--text-dim); }
|
|
124
|
+
|
|
125
|
+
/* Sections */
|
|
126
|
+
.section { margin-bottom: 24px; }
|
|
127
|
+
.section h3 { font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
|
|
128
|
+
.section-subtitle { font-size: 12px; color: var(--text-dim); margin-bottom: 12px; }
|
|
129
|
+
|
|
130
|
+
/* Turn cards */
|
|
131
|
+
.turn-list { display: flex; flex-direction: column; gap: 8px; }
|
|
132
|
+
.turn-card {
|
|
133
|
+
background: var(--surface);
|
|
134
|
+
border: 1px solid var(--border);
|
|
135
|
+
border-radius: 6px;
|
|
136
|
+
padding: 12px 16px;
|
|
137
|
+
}
|
|
138
|
+
.turn-card.active { border-left: 3px solid var(--green); }
|
|
139
|
+
.turn-header {
|
|
140
|
+
display: flex;
|
|
141
|
+
align-items: center;
|
|
142
|
+
gap: 8px;
|
|
143
|
+
margin-bottom: 4px;
|
|
144
|
+
}
|
|
145
|
+
.turn-status { font-size: 12px; color: var(--text-dim); }
|
|
146
|
+
.turn-summary { font-size: 13px; color: var(--text); margin: 6px 0; line-height: 1.4; }
|
|
147
|
+
.turn-detail { font-size: 12px; color: var(--text-dim); margin: 4px 0; }
|
|
148
|
+
.turn-detail .detail-label { font-weight: 600; color: var(--text); }
|
|
149
|
+
.turn-detail ul { margin: 4px 0 4px 20px; }
|
|
150
|
+
.turn-detail li { margin: 2px 0; }
|
|
151
|
+
.turn-detail.objections { color: var(--yellow); }
|
|
152
|
+
.turn-detail.risks { color: var(--red); }
|
|
153
|
+
|
|
154
|
+
/* Data tables */
|
|
155
|
+
.data-table {
|
|
156
|
+
width: 100%;
|
|
157
|
+
border-collapse: collapse;
|
|
158
|
+
font-size: 13px;
|
|
159
|
+
}
|
|
160
|
+
.data-table th {
|
|
161
|
+
text-align: left;
|
|
162
|
+
padding: 8px 12px;
|
|
163
|
+
border-bottom: 1px solid var(--border);
|
|
164
|
+
color: var(--text-dim);
|
|
165
|
+
font-size: 11px;
|
|
166
|
+
text-transform: uppercase;
|
|
167
|
+
letter-spacing: 0.05em;
|
|
168
|
+
}
|
|
169
|
+
.data-table td {
|
|
170
|
+
padding: 8px 12px;
|
|
171
|
+
border-bottom: 1px solid var(--border);
|
|
172
|
+
}
|
|
173
|
+
.data-table tr:hover { background: rgba(99, 102, 241, 0.05); }
|
|
174
|
+
|
|
175
|
+
/* Filters */
|
|
176
|
+
.filter-bar {
|
|
177
|
+
display: flex;
|
|
178
|
+
gap: 12px;
|
|
179
|
+
flex-wrap: wrap;
|
|
180
|
+
margin-bottom: 14px;
|
|
181
|
+
}
|
|
182
|
+
.filter-control {
|
|
183
|
+
display: flex;
|
|
184
|
+
flex-direction: column;
|
|
185
|
+
gap: 6px;
|
|
186
|
+
min-width: 220px;
|
|
187
|
+
font-size: 12px;
|
|
188
|
+
color: var(--text-dim);
|
|
189
|
+
}
|
|
190
|
+
.filter-control select,
|
|
191
|
+
.filter-control input {
|
|
192
|
+
background: var(--surface);
|
|
193
|
+
color: var(--text);
|
|
194
|
+
border: 1px solid var(--border);
|
|
195
|
+
border-radius: 4px;
|
|
196
|
+
padding: 8px 10px;
|
|
197
|
+
font: inherit;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/* Annotation cards */
|
|
201
|
+
.annotation-list { display: flex; flex-direction: column; gap: 6px; }
|
|
202
|
+
.annotation-card {
|
|
203
|
+
background: var(--surface);
|
|
204
|
+
border: 1px solid var(--border);
|
|
205
|
+
border-radius: 4px;
|
|
206
|
+
padding: 8px 12px;
|
|
207
|
+
display: flex;
|
|
208
|
+
gap: 12px;
|
|
209
|
+
font-size: 13px;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/* Blocked state */
|
|
213
|
+
.blocked-banner {
|
|
214
|
+
background: rgba(239, 68, 68, 0.1);
|
|
215
|
+
border: 1px solid var(--red);
|
|
216
|
+
border-radius: 6px;
|
|
217
|
+
padding: 20px;
|
|
218
|
+
text-align: center;
|
|
219
|
+
margin-bottom: 20px;
|
|
220
|
+
}
|
|
221
|
+
.blocked-icon {
|
|
222
|
+
font-size: 14px;
|
|
223
|
+
font-weight: 700;
|
|
224
|
+
color: var(--red);
|
|
225
|
+
letter-spacing: 0.1em;
|
|
226
|
+
margin-bottom: 8px;
|
|
227
|
+
}
|
|
228
|
+
.blocked-reason { font-size: 14px; color: var(--text); }
|
|
229
|
+
|
|
230
|
+
/* Detail list */
|
|
231
|
+
.detail-list { font-size: 13px; }
|
|
232
|
+
.detail-list dt {
|
|
233
|
+
font-weight: 600;
|
|
234
|
+
color: var(--text-dim);
|
|
235
|
+
display: inline;
|
|
236
|
+
}
|
|
237
|
+
.detail-list dt::after { content: ': '; }
|
|
238
|
+
.detail-list dd {
|
|
239
|
+
display: inline;
|
|
240
|
+
margin: 0;
|
|
241
|
+
color: var(--text);
|
|
242
|
+
}
|
|
243
|
+
.detail-list dd::after { content: '\A'; white-space: pre; }
|
|
244
|
+
|
|
245
|
+
/* Gate cards */
|
|
246
|
+
.gate-card {
|
|
247
|
+
background: var(--surface);
|
|
248
|
+
border: 1px solid var(--border);
|
|
249
|
+
border-radius: 6px;
|
|
250
|
+
padding: 16px;
|
|
251
|
+
margin-bottom: 16px;
|
|
252
|
+
}
|
|
253
|
+
.gate-card h3 { font-size: 14px; margin-bottom: 12px; }
|
|
254
|
+
.gate-action { margin-top: 12px; }
|
|
255
|
+
.gate-action p { font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
|
|
256
|
+
.initiative-grid {
|
|
257
|
+
display: grid;
|
|
258
|
+
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
|
259
|
+
gap: 16px;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/* Recovery command */
|
|
263
|
+
.recovery-hint { font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
|
|
264
|
+
.recovery-command {
|
|
265
|
+
background: var(--surface);
|
|
266
|
+
border: 1px solid var(--border);
|
|
267
|
+
border-radius: 4px;
|
|
268
|
+
padding: 10px 14px;
|
|
269
|
+
font-size: 13px;
|
|
270
|
+
color: var(--green);
|
|
271
|
+
cursor: pointer;
|
|
272
|
+
user-select: all;
|
|
273
|
+
position: relative;
|
|
274
|
+
transition: border-color 0.15s;
|
|
275
|
+
}
|
|
276
|
+
.recovery-command:hover {
|
|
277
|
+
border-color: var(--green);
|
|
278
|
+
}
|
|
279
|
+
.recovery-command.copied::after {
|
|
280
|
+
content: attr(data-copied);
|
|
281
|
+
position: absolute;
|
|
282
|
+
right: 10px;
|
|
283
|
+
top: 50%;
|
|
284
|
+
transform: translateY(-50%);
|
|
285
|
+
font-size: 11px;
|
|
286
|
+
color: var(--green);
|
|
287
|
+
opacity: 0.9;
|
|
288
|
+
}
|
|
289
|
+
.gate-evidence { margin: 8px 0; }
|
|
290
|
+
.gate-evidence h4 { font-size: 13px; color: var(--text-dim); margin-bottom: 4px; }
|
|
291
|
+
.gate-evidence ul { list-style: none; padding: 0; }
|
|
292
|
+
.gate-evidence li { padding: 4px 0; font-size: 13px; border-bottom: 1px solid var(--border); }
|
|
293
|
+
|
|
294
|
+
/* Turn detail drill-down panel */
|
|
295
|
+
.turn-card[data-turn-expand] { cursor: pointer; }
|
|
296
|
+
.turn-detail-panel {
|
|
297
|
+
display: none;
|
|
298
|
+
margin-top: 8px;
|
|
299
|
+
padding: 10px 12px;
|
|
300
|
+
border-top: 1px solid var(--border);
|
|
301
|
+
font-size: 12px;
|
|
302
|
+
color: var(--text-dim);
|
|
303
|
+
}
|
|
304
|
+
.turn-card[data-expanded] .turn-detail-panel {
|
|
305
|
+
display: block;
|
|
306
|
+
}
|
|
307
|
+
.turn-card[data-expanded] {
|
|
308
|
+
border-color: var(--accent);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/* Objection badge */
|
|
312
|
+
.objection-badge {
|
|
313
|
+
display: inline-block;
|
|
314
|
+
padding: 1px 6px;
|
|
315
|
+
margin-left: 6px;
|
|
316
|
+
border: 1px solid var(--red);
|
|
317
|
+
border-radius: 3px;
|
|
318
|
+
font-size: 10px;
|
|
319
|
+
font-weight: 600;
|
|
320
|
+
color: var(--red);
|
|
321
|
+
text-transform: uppercase;
|
|
322
|
+
letter-spacing: 0.04em;
|
|
323
|
+
vertical-align: middle;
|
|
324
|
+
}
|
|
325
|
+
</style>
|
|
326
|
+
</head>
|
|
327
|
+
<body>
|
|
328
|
+
<header>
|
|
329
|
+
<h1><span>AgentXchain</span> Dashboard</h1>
|
|
330
|
+
<div class="status-indicator">
|
|
331
|
+
<div class="status-dot disconnected" id="ws-status"></div>
|
|
332
|
+
<span id="ws-label">Connecting...</span>
|
|
333
|
+
</div>
|
|
334
|
+
</header>
|
|
335
|
+
<nav>
|
|
336
|
+
<a href="#initiative">Initiative</a>
|
|
337
|
+
<a href="#cross-repo">Cross-Repo</a>
|
|
338
|
+
<a href="#timeline" class="active">Timeline</a>
|
|
339
|
+
<a href="#ledger">Decisions</a>
|
|
340
|
+
<a href="#hooks">Hooks</a>
|
|
341
|
+
<a href="#blocked">Blocked</a>
|
|
342
|
+
<a href="#gate">Gates</a>
|
|
343
|
+
</nav>
|
|
344
|
+
<main id="view-container">
|
|
345
|
+
<div class="placeholder">
|
|
346
|
+
<h2>Loading...</h2>
|
|
347
|
+
<p>Connecting to bridge server...</p>
|
|
348
|
+
</div>
|
|
349
|
+
</main>
|
|
350
|
+
<script type="module" src="/app.js"></script>
|
|
351
|
+
</body>
|
|
352
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentxchain",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "CLI for AgentXchain — multi-agent
|
|
3
|
+
"version": "2.1.1",
|
|
4
|
+
"description": "CLI for AgentXchain — governed multi-agent software delivery",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"agentxchain": "./bin/agentxchain.js"
|
|
@@ -9,11 +9,15 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
"bin/",
|
|
11
11
|
"src/",
|
|
12
|
+
"dashboard/",
|
|
12
13
|
"scripts/",
|
|
13
14
|
"README.md"
|
|
14
15
|
],
|
|
15
16
|
"scripts": {
|
|
16
17
|
"dev": "node bin/agentxchain.js",
|
|
18
|
+
"test": "node --test test/*.test.js",
|
|
19
|
+
"preflight:release": "bash scripts/release-preflight.sh",
|
|
20
|
+
"preflight:release:strict": "bash scripts/release-preflight.sh --strict",
|
|
17
21
|
"build:macos": "bun build bin/agentxchain.js --compile --target=bun-darwin-arm64 --outfile=dist/agentxchain-macos-arm64",
|
|
18
22
|
"build:linux": "bun build bin/agentxchain.js --compile --target=bun-linux-x64 --outfile=dist/agentxchain-linux-x64",
|
|
19
23
|
"publish:npm": "bash scripts/publish-npm.sh"
|
|
@@ -22,10 +26,14 @@
|
|
|
22
26
|
"ai",
|
|
23
27
|
"agents",
|
|
24
28
|
"multi-agent",
|
|
25
|
-
"coordination",
|
|
26
29
|
"sdlc",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
30
|
+
"governance",
|
|
31
|
+
"audit-trail",
|
|
32
|
+
"code-review",
|
|
33
|
+
"developer-tools",
|
|
34
|
+
"adversarial-collaboration",
|
|
35
|
+
"orchestrator",
|
|
36
|
+
"protocol",
|
|
29
37
|
"claude-code",
|
|
30
38
|
"agentxchain"
|
|
31
39
|
],
|
|
@@ -37,12 +45,13 @@
|
|
|
37
45
|
},
|
|
38
46
|
"homepage": "https://agentxchain.dev",
|
|
39
47
|
"dependencies": {
|
|
40
|
-
"
|
|
48
|
+
"@anthropic-ai/tokenizer": "0.0.4",
|
|
41
49
|
"chalk": "^5.4.0",
|
|
50
|
+
"commander": "^13.0.0",
|
|
42
51
|
"inquirer": "^12.0.0",
|
|
43
52
|
"ora": "^8.0.0"
|
|
44
53
|
},
|
|
45
54
|
"engines": {
|
|
46
|
-
"node": ">=18"
|
|
55
|
+
"node": ">=18.17.0 || >=20.5.0"
|
|
47
56
|
}
|
|
48
57
|
}
|
|
@@ -59,8 +59,31 @@ on nudgeAgent(agentId, turnNum, dispatchKey)
|
|
|
59
59
|
set nudgeText to "Hey " & agentId & ", it is your turn now (turn " & turnNum & "). Read lock.json, claim the lock, check state.md + history.jsonl + planning docs, do your work, and release lock."
|
|
60
60
|
set the clipboard to nudgeText
|
|
61
61
|
|
|
62
|
+
tell application "System Events"
|
|
63
|
+
if not (exists process "Cursor") then
|
|
64
|
+
if lastFailedDispatch is not dispatchKey then
|
|
65
|
+
do shell script "osascript -e " & quoted form of ("display notification \"Cursor is not running.\" with title \"AgentXchain\"")
|
|
66
|
+
set lastFailedDispatch to dispatchKey
|
|
67
|
+
end if
|
|
68
|
+
return false
|
|
69
|
+
end if
|
|
70
|
+
end tell
|
|
71
|
+
|
|
62
72
|
tell application "Cursor" to activate
|
|
63
|
-
delay 0.
|
|
73
|
+
delay 0.6
|
|
74
|
+
|
|
75
|
+
-- Verify Cursor is actually frontmost before sending keystrokes
|
|
76
|
+
tell application "System Events"
|
|
77
|
+
set frontApp to name of first application process whose frontmost is true
|
|
78
|
+
if frontApp is not "Cursor" then
|
|
79
|
+
if lastFailedDispatch is not dispatchKey then
|
|
80
|
+
do shell script "osascript -e " & quoted form of ("display notification \"Cursor lost focus, skipping nudge for " & agentId & ".\" with title \"AgentXchain\"")
|
|
81
|
+
set lastFailedDispatch to dispatchKey
|
|
82
|
+
end if
|
|
83
|
+
return false
|
|
84
|
+
end if
|
|
85
|
+
end tell
|
|
86
|
+
|
|
64
87
|
set focusedOk to my focusAgentWindow(agentId)
|
|
65
88
|
if focusedOk is false then
|
|
66
89
|
if lastFailedDispatch is not dispatchKey then
|
|
@@ -69,18 +92,22 @@ on nudgeAgent(agentId, turnNum, dispatchKey)
|
|
|
69
92
|
end if
|
|
70
93
|
return false
|
|
71
94
|
end if
|
|
72
|
-
delay 0.
|
|
95
|
+
delay 0.3
|
|
73
96
|
|
|
97
|
+
-- Re-verify focus before keystrokes
|
|
74
98
|
tell application "System Events"
|
|
75
|
-
|
|
99
|
+
set frontApp to name of first application process whose frontmost is true
|
|
100
|
+
if frontApp is not "Cursor" then
|
|
101
|
+
return false
|
|
102
|
+
end if
|
|
76
103
|
|
|
77
104
|
tell process "Cursor"
|
|
78
105
|
set frontmost to true
|
|
79
106
|
keystroke "l" using {command down}
|
|
80
|
-
delay 0.
|
|
107
|
+
delay 0.3
|
|
81
108
|
keystroke "v" using {command down}
|
|
82
109
|
if autoSend then
|
|
83
|
-
delay 0.
|
|
110
|
+
delay 0.2
|
|
84
111
|
key code 36
|
|
85
112
|
end if
|
|
86
113
|
end tell
|