sneakoscope 1.18.0 → 1.18.2
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 +5 -4
- package/crates/sks-core/Cargo.lock +1 -1
- package/crates/sks-core/Cargo.toml +1 -1
- package/crates/sks-core/src/main.rs +1 -1
- package/dist/.sks-build-stamp.json +4 -4
- package/dist/bin/sks.js +1 -1
- package/dist/build-manifest.json +23 -9
- package/dist/commands/image-ux-review.d.ts +69 -1
- package/dist/commands/ppt.d.ts +69 -1
- package/dist/core/agents/agent-central-ledger.d.ts +1 -0
- package/dist/core/agents/agent-central-ledger.js +4 -3
- package/dist/core/agents/agent-codex-cockpit.d.ts +7 -0
- package/dist/core/agents/agent-codex-cockpit.js +31 -1
- package/dist/core/agents/agent-command-surface.d.ts +4 -0
- package/dist/core/agents/agent-command-surface.js +6 -2
- package/dist/core/agents/agent-follow-up-work-items.d.ts +20 -0
- package/dist/core/agents/agent-follow-up-work-items.js +115 -0
- package/dist/core/agents/agent-janitor.d.ts +6 -0
- package/dist/core/agents/agent-janitor.js +39 -1
- package/dist/core/agents/agent-ledger-schemas.d.ts +162 -0
- package/dist/core/agents/agent-ledger-schemas.js +23 -0
- package/dist/core/agents/agent-lifecycle.js +40 -16
- package/dist/core/agents/agent-orchestrator.d.ts +69 -1
- package/dist/core/agents/agent-orchestrator.js +115 -24
- package/dist/core/agents/agent-output-validator.d.ts +67 -0
- package/dist/core/agents/agent-output-validator.js +46 -0
- package/dist/core/agents/agent-proof-evidence.d.ts +24 -0
- package/dist/core/agents/agent-proof-evidence.js +68 -1
- package/dist/core/agents/agent-runner-codex-exec.d.ts +3 -0
- package/dist/core/agents/agent-runner-codex-exec.js +6 -6
- package/dist/core/agents/agent-runner-fake.js +22 -0
- package/dist/core/agents/agent-runner-process.js +25 -4
- package/dist/core/agents/agent-runner-tmux.d.ts +2 -33
- package/dist/core/agents/agent-runner-tmux.js +90 -16
- package/dist/core/agents/agent-scheduler.d.ts +79 -0
- package/dist/core/agents/agent-scheduler.js +313 -0
- package/dist/core/agents/agent-schema.d.ts +18 -0
- package/dist/core/agents/agent-session-generation.d.ts +55 -0
- package/dist/core/agents/agent-session-generation.js +110 -0
- package/dist/core/agents/agent-task-graph.d.ts +52 -0
- package/dist/core/agents/agent-task-graph.js +193 -0
- package/dist/core/agents/agent-terminal-session.d.ts +21 -0
- package/dist/core/agents/agent-terminal-session.js +79 -8
- package/dist/core/agents/agent-trust-report.d.ts +17 -0
- package/dist/core/agents/agent-trust-report.js +30 -1
- package/dist/core/agents/agent-work-partition.d.ts +15 -1
- package/dist/core/agents/agent-work-partition.js +23 -2
- package/dist/core/agents/agent-work-queue.d.ts +53 -0
- package/dist/core/agents/agent-work-queue.js +134 -0
- package/dist/core/agents/agent-worker-pipeline.d.ts +2 -0
- package/dist/core/agents/agent-worker-pipeline.js +11 -1
- package/dist/core/agents/agent-worker-slot.d.ts +35 -0
- package/dist/core/agents/agent-worker-slot.js +90 -0
- package/dist/core/agents/agent-wrongness.d.ts +1 -1
- package/dist/core/agents/agent-wrongness.js +4 -0
- package/dist/core/agents/route-collaboration-ledger.d.ts +69 -1
- package/dist/core/agents/tmux-lane-supervisor.d.ts +51 -0
- package/dist/core/agents/tmux-lane-supervisor.js +197 -0
- package/dist/core/agents/tmux-right-lane-cockpit.d.ts +22 -0
- package/dist/core/agents/tmux-right-lane-cockpit.js +12 -2
- package/dist/core/agents/work-partition/task-slicer.d.ts +4 -0
- package/dist/core/agents/work-partition/task-slicer.js +18 -1
- package/dist/core/commands/agent-command.js +9 -2
- package/dist/core/commands/command-utils.js +2 -1
- package/dist/core/commands/image-ux-review-command.d.ts +69 -1
- package/dist/core/commands/ppt-command.d.ts +69 -1
- package/dist/core/commands/qa-loop-command.js +4 -2
- package/dist/core/commands/research-command.js +3 -1
- package/dist/core/commands/team-command.js +8 -2
- package/dist/core/fsx.d.ts +1 -1
- package/dist/core/fsx.js +1 -1
- package/dist/core/mad-sks/immutable-harness-guard.js +2 -0
- package/dist/core/release-parallel-full-coverage.js +9 -0
- package/dist/core/routes.js +2 -2
- package/dist/core/team-live.js +6 -0
- package/dist/core/version.d.ts +1 -1
- package/dist/core/version.js +1 -1
- package/package.json +21 -2
- package/schemas/codex/agent-result.schema.json +42 -0
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ SKS does not try to clone every other harness. It focuses on one thing: making C
|
|
|
10
10
|
|
|
11
11
|
## Current Release
|
|
12
12
|
|
|
13
|
-
SKS **1.18.
|
|
13
|
+
SKS **1.18.2** completes the Dynamic Worker Pool runtime: `agents=5` means five target active worker slots, while `--work-items N` controls the route work queue. Pending work backfills empty slots immediately, tmux lanes persist as worker-slot UI until scheduler drain, follow-up work items are schema-bound, and Agent/Team/Research/QA route blackboxes prove replenishment with generation, terminal, Source Intelligence, and Goal evidence.
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
sks mad-sks plan --target-root <path> --json
|
|
@@ -19,10 +19,11 @@ sks mad-sks proof --json
|
|
|
19
19
|
sks mad-sks rollback-apply --rollback-plan <path> --yes --json
|
|
20
20
|
sks features complete --json
|
|
21
21
|
sks agent status latest --json
|
|
22
|
-
sks agent run "release review" --agents 8 --concurrency 4 --mock --json
|
|
22
|
+
sks agent run "release review" --agents 8 --work-items 16 --concurrency 4 --mock --json
|
|
23
23
|
npm run source-intelligence:all-modes
|
|
24
24
|
npm run agent:background-terminals
|
|
25
|
-
npm run agent:tmux-
|
|
25
|
+
npm run agent:tmux-lane-no-flicker
|
|
26
|
+
npm run agent:backfill-route-blackbox
|
|
26
27
|
npm run release:readiness
|
|
27
28
|
```
|
|
28
29
|
|
|
@@ -612,7 +613,7 @@ npm run release:check
|
|
|
612
613
|
npm run publish:dry
|
|
613
614
|
```
|
|
614
615
|
|
|
615
|
-
`release:check` runs the 1.18.
|
|
616
|
+
`release:check` runs the 1.18.2 dynamic scheduler closure DAG, writes a source digest stamp under `.sneakoscope/reports/`, then refreshes release readiness so publish commands can verify the same stamp. The DAG preserves the 1.18 baseline gates and adds task graph expansion, schema-bound follow-up work, Agent/Team/Research/QA route backfill blackboxes, scheduler proof hardening, persistent tmux lane persistence, no-flicker lane proof, session generation, terminal generation, dynamic cockpit, Source Intelligence propagation, and Goal mode propagation checks. Broader live or historical gates remain explicit scripts such as `release:real-check`. Generate the human-readable registry with `sks features inventory --write-docs`. Plain `npm publish` uses the `latest` dist-tag. npm's `prepublishOnly` verifies the fresh release stamp instead of rerunning the full gate, and `prepack` only rebuilds `dist`; publish no longer repeats the expensive release suite during packaging. `npm run publish:dry` remains the explicit dry-run helper.
|
|
616
617
|
|
|
617
618
|
Version bumps are manual. Run `sks versioning bump` only when preparing release metadata; SKS will not create `.git/hooks/pre-commit` or auto-bump during ordinary commits.
|
|
618
619
|
|
|
@@ -4,7 +4,7 @@ use std::io::{self, Read, Seek, SeekFrom};
|
|
|
4
4
|
fn main() {
|
|
5
5
|
let mut args = std::env::args().skip(1);
|
|
6
6
|
match args.next().as_deref() {
|
|
7
|
-
Some("--version") => println!("sks-rs 1.18.
|
|
7
|
+
Some("--version") => println!("sks-rs 1.18.2"),
|
|
8
8
|
Some("compact-info") => {
|
|
9
9
|
let mut input = String::new();
|
|
10
10
|
let _ = io::stdin().read_to_string(&mut input);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "sks.dist-build-stamp.v1",
|
|
3
3
|
"package_name": "sneakoscope",
|
|
4
|
-
"package_version": "1.18.
|
|
5
|
-
"source_digest": "
|
|
6
|
-
"source_file_count":
|
|
7
|
-
"built_at_source_time":
|
|
4
|
+
"package_version": "1.18.2",
|
|
5
|
+
"source_digest": "83db107971a9e8bec6aaca8f43bf8b49d936e5fc778ebd62121dea9b7fc228f5",
|
|
6
|
+
"source_file_count": 1349,
|
|
7
|
+
"built_at_source_time": 1779732183819
|
|
8
8
|
}
|
package/dist/bin/sks.js
CHANGED
package/dist/build-manifest.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "sks.dist-build.v2",
|
|
3
|
-
"version": "1.18.
|
|
4
|
-
"package_version": "1.18.
|
|
3
|
+
"version": "1.18.2",
|
|
4
|
+
"package_version": "1.18.2",
|
|
5
5
|
"typescript": true,
|
|
6
6
|
"mjs_runtime_files": 0,
|
|
7
|
-
"compiled_file_count":
|
|
8
|
-
"compiled_js_count":
|
|
9
|
-
"compiled_dts_count":
|
|
10
|
-
"source_digest": "
|
|
11
|
-
"source_file_count":
|
|
12
|
-
"source_files_hash": "
|
|
13
|
-
"source_list_hash": "
|
|
7
|
+
"compiled_file_count": 864,
|
|
8
|
+
"compiled_js_count": 432,
|
|
9
|
+
"compiled_dts_count": 432,
|
|
10
|
+
"source_digest": "83db107971a9e8bec6aaca8f43bf8b49d936e5fc778ebd62121dea9b7fc228f5",
|
|
11
|
+
"source_file_count": 1349,
|
|
12
|
+
"source_files_hash": "fb0fc5d3cacbb13d3231fcf9d0566e1bad998e7bc8aeea7c7e4f10049e433c11",
|
|
13
|
+
"source_list_hash": "fb0fc5d3cacbb13d3231fcf9d0566e1bad998e7bc8aeea7c7e4f10049e433c11",
|
|
14
14
|
"src_mjs_runtime_files": 0,
|
|
15
15
|
"dist_stamp_schema": "sks.dist-build-stamp.v1",
|
|
16
16
|
"files": [
|
|
@@ -198,6 +198,8 @@
|
|
|
198
198
|
"core/agents/agent-consensus.js",
|
|
199
199
|
"core/agents/agent-effort-policy.d.ts",
|
|
200
200
|
"core/agents/agent-effort-policy.js",
|
|
201
|
+
"core/agents/agent-follow-up-work-items.d.ts",
|
|
202
|
+
"core/agents/agent-follow-up-work-items.js",
|
|
201
203
|
"core/agents/agent-gate.d.ts",
|
|
202
204
|
"core/agents/agent-gate.js",
|
|
203
205
|
"core/agents/agent-heartbeat.d.ts",
|
|
@@ -234,10 +236,16 @@
|
|
|
234
236
|
"core/agents/agent-runner-process.js",
|
|
235
237
|
"core/agents/agent-runner-tmux.d.ts",
|
|
236
238
|
"core/agents/agent-runner-tmux.js",
|
|
239
|
+
"core/agents/agent-scheduler.d.ts",
|
|
240
|
+
"core/agents/agent-scheduler.js",
|
|
237
241
|
"core/agents/agent-schema.d.ts",
|
|
238
242
|
"core/agents/agent-schema.js",
|
|
243
|
+
"core/agents/agent-session-generation.d.ts",
|
|
244
|
+
"core/agents/agent-session-generation.js",
|
|
239
245
|
"core/agents/agent-session-rows.d.ts",
|
|
240
246
|
"core/agents/agent-session-rows.js",
|
|
247
|
+
"core/agents/agent-task-graph.d.ts",
|
|
248
|
+
"core/agents/agent-task-graph.js",
|
|
241
249
|
"core/agents/agent-task-slicer.d.ts",
|
|
242
250
|
"core/agents/agent-task-slicer.js",
|
|
243
251
|
"core/agents/agent-terminal-session.d.ts",
|
|
@@ -246,14 +254,20 @@
|
|
|
246
254
|
"core/agents/agent-trust-report.js",
|
|
247
255
|
"core/agents/agent-work-partition.d.ts",
|
|
248
256
|
"core/agents/agent-work-partition.js",
|
|
257
|
+
"core/agents/agent-work-queue.d.ts",
|
|
258
|
+
"core/agents/agent-work-queue.js",
|
|
249
259
|
"core/agents/agent-worker-pipeline.d.ts",
|
|
250
260
|
"core/agents/agent-worker-pipeline.js",
|
|
261
|
+
"core/agents/agent-worker-slot.d.ts",
|
|
262
|
+
"core/agents/agent-worker-slot.js",
|
|
251
263
|
"core/agents/agent-wrongness.d.ts",
|
|
252
264
|
"core/agents/agent-wrongness.js",
|
|
253
265
|
"core/agents/route-collaboration-ledger.d.ts",
|
|
254
266
|
"core/agents/route-collaboration-ledger.js",
|
|
255
267
|
"core/agents/scout-policy.d.ts",
|
|
256
268
|
"core/agents/scout-policy.js",
|
|
269
|
+
"core/agents/tmux-lane-supervisor.d.ts",
|
|
270
|
+
"core/agents/tmux-lane-supervisor.js",
|
|
257
271
|
"core/agents/tmux-right-lane-cockpit.d.ts",
|
|
258
272
|
"core/agents/tmux-right-lane-cockpit.js",
|
|
259
273
|
"core/agents/work-partition/conflict-detector.d.ts",
|
|
@@ -436,6 +436,34 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
436
436
|
lease_count: number;
|
|
437
437
|
blockers: string[];
|
|
438
438
|
};
|
|
439
|
+
task_graph: {
|
|
440
|
+
target_active_slots: number;
|
|
441
|
+
total_work_items: number;
|
|
442
|
+
generated_from_route: string;
|
|
443
|
+
work_items_exceed_active_slots: boolean;
|
|
444
|
+
};
|
|
445
|
+
scheduler: {
|
|
446
|
+
schema: string;
|
|
447
|
+
ok: boolean;
|
|
448
|
+
state: import("../core/agents/agent-scheduler.js").AgentSchedulerState;
|
|
449
|
+
queue: import("../core/agents/agent-work-queue.js").AgentWorkQueue;
|
|
450
|
+
slots: import("../core/agents/agent-worker-slot.js").AgentWorkerSlot[];
|
|
451
|
+
results: any[];
|
|
452
|
+
};
|
|
453
|
+
source_intelligence: {
|
|
454
|
+
artifact: string;
|
|
455
|
+
ok: boolean;
|
|
456
|
+
mode: import("../core/source-intelligence/source-intelligence-policy.js").SourceIntelligenceMode;
|
|
457
|
+
cache_key: string;
|
|
458
|
+
proof_ok: boolean;
|
|
459
|
+
};
|
|
460
|
+
goal_mode: {
|
|
461
|
+
artifact: string;
|
|
462
|
+
ok: boolean;
|
|
463
|
+
mode: "official_goal_default" | "sks_goal_fallback";
|
|
464
|
+
official_goal_available: boolean;
|
|
465
|
+
default_enabled: boolean;
|
|
466
|
+
};
|
|
439
467
|
results: any[];
|
|
440
468
|
consensus: {
|
|
441
469
|
schema: string;
|
|
@@ -526,8 +554,25 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
526
554
|
all_sessions_closed: boolean;
|
|
527
555
|
terminal_sessions_closed: any;
|
|
528
556
|
terminal_close_report: string;
|
|
557
|
+
target_active_slots: any;
|
|
558
|
+
total_work_items: any;
|
|
559
|
+
pending_count: any;
|
|
560
|
+
active_slot_count: any;
|
|
561
|
+
completed_count: any;
|
|
562
|
+
max_observed_active_slots: any;
|
|
563
|
+
backfill_count: any;
|
|
564
|
+
expected_backfill_count: any;
|
|
565
|
+
pending_queue_drained: any;
|
|
566
|
+
generation_count: any;
|
|
529
567
|
tmux_attach_command: string | null;
|
|
530
568
|
tmux_lane_manifest: string;
|
|
569
|
+
tmux_lane_persistence: {
|
|
570
|
+
supervisor: string;
|
|
571
|
+
no_flicker_verified: boolean;
|
|
572
|
+
pane_survival_checked: boolean;
|
|
573
|
+
unexpected_close_count: number;
|
|
574
|
+
lane_count: number;
|
|
575
|
+
};
|
|
531
576
|
output_schema_ok: boolean;
|
|
532
577
|
output_tail_report: string;
|
|
533
578
|
output_tail_records: number;
|
|
@@ -542,7 +587,7 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
542
587
|
generated_at: string;
|
|
543
588
|
records: {
|
|
544
589
|
schema: string;
|
|
545
|
-
kind: "xai_available_not_used" | "context7_missing" | "codex_web_search_missing" | "recursion_attempt" | "lease_conflict" | "session_not_closed" | "terminal_missing" | "terminal_not_closed" | "schema_invalid_output" | "stale_heartbeat" | "legacy_multiagent_runtime_usage_attempt";
|
|
590
|
+
kind: "xai_available_not_used" | "context7_missing" | "codex_web_search_missing" | "recursion_attempt" | "lease_conflict" | "session_not_closed" | "terminal_missing" | "terminal_not_closed" | "scheduler_starvation" | "tmux_lane_flicker" | "missing_follow_up_schema" | "session_generation_missing" | "schema_invalid_output" | "stale_heartbeat" | "legacy_multiagent_runtime_usage_attempt";
|
|
546
591
|
blocker: string;
|
|
547
592
|
created_at: string;
|
|
548
593
|
status: string;
|
|
@@ -564,9 +609,32 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
564
609
|
closed_session_count: number;
|
|
565
610
|
terminal_sessions_closed: boolean;
|
|
566
611
|
terminal_session_count: number;
|
|
612
|
+
terminal_generation_count: number;
|
|
613
|
+
terminal_close_report_count: number;
|
|
567
614
|
terminal_close_report: string;
|
|
615
|
+
session_generation_count: number;
|
|
616
|
+
all_generations_closed: boolean;
|
|
617
|
+
scheduler_state: string;
|
|
618
|
+
target_active_slots: any;
|
|
619
|
+
max_observed_active_slots: any;
|
|
620
|
+
pending_queue_drained: boolean;
|
|
621
|
+
backfill_count: any;
|
|
622
|
+
expected_backfill_count: any;
|
|
623
|
+
slot_count: any;
|
|
624
|
+
generation_count: number;
|
|
625
|
+
all_slots_closed_after_drain: boolean;
|
|
626
|
+
generated_work_item_count: any;
|
|
627
|
+
source_intelligence_generation_refs_ok: boolean;
|
|
628
|
+
goal_mode_generation_refs_ok: boolean;
|
|
568
629
|
tmux_lane_manifest: string;
|
|
569
630
|
tmux_lane_manifest_ok: boolean;
|
|
631
|
+
tmux_lane_supervisor: string;
|
|
632
|
+
tmux_lane_no_flicker_verified: boolean;
|
|
633
|
+
tmux_lane_survival_checked: boolean;
|
|
634
|
+
tmux_lane_unexpected_close_count: number;
|
|
635
|
+
tmux_lane_auto_reopen_count: number;
|
|
636
|
+
tmux_pane_launch_ledger: string;
|
|
637
|
+
tmux_pane_launch_count: number;
|
|
570
638
|
ledger_hash_chain_ok: boolean;
|
|
571
639
|
no_overlap_ok: boolean;
|
|
572
640
|
consensus_ok: boolean;
|
package/dist/commands/ppt.d.ts
CHANGED
|
@@ -288,6 +288,34 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
288
288
|
lease_count: number;
|
|
289
289
|
blockers: string[];
|
|
290
290
|
};
|
|
291
|
+
task_graph: {
|
|
292
|
+
target_active_slots: number;
|
|
293
|
+
total_work_items: number;
|
|
294
|
+
generated_from_route: string;
|
|
295
|
+
work_items_exceed_active_slots: boolean;
|
|
296
|
+
};
|
|
297
|
+
scheduler: {
|
|
298
|
+
schema: string;
|
|
299
|
+
ok: boolean;
|
|
300
|
+
state: import("../core/agents/agent-scheduler.js").AgentSchedulerState;
|
|
301
|
+
queue: import("../core/agents/agent-work-queue.js").AgentWorkQueue;
|
|
302
|
+
slots: import("../core/agents/agent-worker-slot.js").AgentWorkerSlot[];
|
|
303
|
+
results: any[];
|
|
304
|
+
};
|
|
305
|
+
source_intelligence: {
|
|
306
|
+
artifact: string;
|
|
307
|
+
ok: boolean;
|
|
308
|
+
mode: import("../core/source-intelligence/source-intelligence-policy.js").SourceIntelligenceMode;
|
|
309
|
+
cache_key: string;
|
|
310
|
+
proof_ok: boolean;
|
|
311
|
+
};
|
|
312
|
+
goal_mode: {
|
|
313
|
+
artifact: string;
|
|
314
|
+
ok: boolean;
|
|
315
|
+
mode: "official_goal_default" | "sks_goal_fallback";
|
|
316
|
+
official_goal_available: boolean;
|
|
317
|
+
default_enabled: boolean;
|
|
318
|
+
};
|
|
291
319
|
results: any[];
|
|
292
320
|
consensus: {
|
|
293
321
|
schema: string;
|
|
@@ -378,8 +406,25 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
378
406
|
all_sessions_closed: boolean;
|
|
379
407
|
terminal_sessions_closed: any;
|
|
380
408
|
terminal_close_report: string;
|
|
409
|
+
target_active_slots: any;
|
|
410
|
+
total_work_items: any;
|
|
411
|
+
pending_count: any;
|
|
412
|
+
active_slot_count: any;
|
|
413
|
+
completed_count: any;
|
|
414
|
+
max_observed_active_slots: any;
|
|
415
|
+
backfill_count: any;
|
|
416
|
+
expected_backfill_count: any;
|
|
417
|
+
pending_queue_drained: any;
|
|
418
|
+
generation_count: any;
|
|
381
419
|
tmux_attach_command: string | null;
|
|
382
420
|
tmux_lane_manifest: string;
|
|
421
|
+
tmux_lane_persistence: {
|
|
422
|
+
supervisor: string;
|
|
423
|
+
no_flicker_verified: boolean;
|
|
424
|
+
pane_survival_checked: boolean;
|
|
425
|
+
unexpected_close_count: number;
|
|
426
|
+
lane_count: number;
|
|
427
|
+
};
|
|
383
428
|
output_schema_ok: boolean;
|
|
384
429
|
output_tail_report: string;
|
|
385
430
|
output_tail_records: number;
|
|
@@ -394,7 +439,7 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
394
439
|
generated_at: string;
|
|
395
440
|
records: {
|
|
396
441
|
schema: string;
|
|
397
|
-
kind: "xai_available_not_used" | "context7_missing" | "codex_web_search_missing" | "recursion_attempt" | "lease_conflict" | "session_not_closed" | "terminal_missing" | "terminal_not_closed" | "schema_invalid_output" | "stale_heartbeat" | "legacy_multiagent_runtime_usage_attempt";
|
|
442
|
+
kind: "xai_available_not_used" | "context7_missing" | "codex_web_search_missing" | "recursion_attempt" | "lease_conflict" | "session_not_closed" | "terminal_missing" | "terminal_not_closed" | "scheduler_starvation" | "tmux_lane_flicker" | "missing_follow_up_schema" | "session_generation_missing" | "schema_invalid_output" | "stale_heartbeat" | "legacy_multiagent_runtime_usage_attempt";
|
|
398
443
|
blocker: string;
|
|
399
444
|
created_at: string;
|
|
400
445
|
status: string;
|
|
@@ -416,9 +461,32 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
416
461
|
closed_session_count: number;
|
|
417
462
|
terminal_sessions_closed: boolean;
|
|
418
463
|
terminal_session_count: number;
|
|
464
|
+
terminal_generation_count: number;
|
|
465
|
+
terminal_close_report_count: number;
|
|
419
466
|
terminal_close_report: string;
|
|
467
|
+
session_generation_count: number;
|
|
468
|
+
all_generations_closed: boolean;
|
|
469
|
+
scheduler_state: string;
|
|
470
|
+
target_active_slots: any;
|
|
471
|
+
max_observed_active_slots: any;
|
|
472
|
+
pending_queue_drained: boolean;
|
|
473
|
+
backfill_count: any;
|
|
474
|
+
expected_backfill_count: any;
|
|
475
|
+
slot_count: any;
|
|
476
|
+
generation_count: number;
|
|
477
|
+
all_slots_closed_after_drain: boolean;
|
|
478
|
+
generated_work_item_count: any;
|
|
479
|
+
source_intelligence_generation_refs_ok: boolean;
|
|
480
|
+
goal_mode_generation_refs_ok: boolean;
|
|
420
481
|
tmux_lane_manifest: string;
|
|
421
482
|
tmux_lane_manifest_ok: boolean;
|
|
483
|
+
tmux_lane_supervisor: string;
|
|
484
|
+
tmux_lane_no_flicker_verified: boolean;
|
|
485
|
+
tmux_lane_survival_checked: boolean;
|
|
486
|
+
tmux_lane_unexpected_close_count: number;
|
|
487
|
+
tmux_lane_auto_reopen_count: number;
|
|
488
|
+
tmux_pane_launch_ledger: string;
|
|
489
|
+
tmux_pane_launch_count: number;
|
|
422
490
|
ledger_hash_chain_ok: boolean;
|
|
423
491
|
no_overlap_ok: boolean;
|
|
424
492
|
consensus_ok: boolean;
|
|
@@ -17,6 +17,7 @@ export declare function initializeAgentCentralLedger(missionDir: string, input:
|
|
|
17
17
|
partition?: any;
|
|
18
18
|
route?: string;
|
|
19
19
|
prompt?: string;
|
|
20
|
+
dynamicScheduler?: boolean;
|
|
20
21
|
}): Promise<string>;
|
|
21
22
|
export declare function appendAgentLedgerEvent(root: string, event: {
|
|
22
23
|
agent_id: string;
|
|
@@ -47,10 +47,11 @@ export function validateAgentLedgerWriteScope(input) {
|
|
|
47
47
|
const mode = input.mode || 'write';
|
|
48
48
|
const orchestrator = actor === 'orchestrator' || actor === 'parent_orchestrator';
|
|
49
49
|
const sessionMatch = target.match(/^sessions\/([^/]+)\.json$/);
|
|
50
|
+
const generationSessionMatch = target.match(/^sessions\/([^/]+)\/gen-\d+\/agent-session-record\.json$/);
|
|
50
51
|
const messageAppend = target === 'agent-messages.jsonl' && mode === 'append';
|
|
51
52
|
const eventAppend = target === 'agent-events.jsonl' && mode === 'append';
|
|
52
53
|
const handoffAppend = target === 'agent-handoffs.jsonl' && mode === 'append';
|
|
53
|
-
const ownSessionWrite = Boolean(sessionMatch && sessionMatch[1] === actor);
|
|
54
|
+
const ownSessionWrite = Boolean((sessionMatch && sessionMatch[1] === actor) || (generationSessionMatch && generationSessionMatch[1] === actor));
|
|
54
55
|
const orchestratorOnly = AGENT_ORCHESTRATOR_ONLY_FILES.includes(target) || target === 'agent-sessions.json';
|
|
55
56
|
if (orchestrator)
|
|
56
57
|
return { ok: true, reason: 'orchestrator_write_allowed', actor_agent_id: actor, target_path: target, mode };
|
|
@@ -58,7 +59,7 @@ export function validateAgentLedgerWriteScope(input) {
|
|
|
58
59
|
return { ok: true, reason: 'own_session_record_allowed', actor_agent_id: actor, target_path: target, mode };
|
|
59
60
|
if (messageAppend || eventAppend || handoffAppend)
|
|
60
61
|
return { ok: true, reason: 'central_append_allowed', actor_agent_id: actor, target_path: target, mode };
|
|
61
|
-
if (sessionMatch && sessionMatch[1] !== actor)
|
|
62
|
+
if ((sessionMatch && sessionMatch[1] !== actor) || (generationSessionMatch && generationSessionMatch[1] !== actor))
|
|
62
63
|
return { ok: false, reason: 'agent_cannot_modify_other_session_record', actor_agent_id: actor, target_path: target, mode };
|
|
63
64
|
if (orchestratorOnly)
|
|
64
65
|
return { ok: false, reason: 'agent_cannot_modify_orchestrator_only_file', actor_agent_id: actor, target_path: target, mode };
|
|
@@ -71,7 +72,7 @@ export async function initializeAgentCentralLedger(missionDir, input) {
|
|
|
71
72
|
await writeTextAtomic(path.join(root, 'agent-events.jsonl'), '');
|
|
72
73
|
await writeTextAtomic(path.join(root, 'agent-messages.jsonl'), '');
|
|
73
74
|
await writeTextAtomic(path.join(root, 'agent-handoffs.jsonl'), '');
|
|
74
|
-
const sessions = Object.fromEntries((input.roster.roster || []).map((agent) => [agent.id, {
|
|
75
|
+
const sessions = input.dynamicScheduler ? {} : Object.fromEntries((input.roster.roster || []).map((agent) => [agent.id, {
|
|
75
76
|
agent_id: agent.id,
|
|
76
77
|
session_id: agent.session_id,
|
|
77
78
|
status: 'pending',
|
|
@@ -35,6 +35,13 @@ export interface AgentCodexCockpitState {
|
|
|
35
35
|
goal_mode_status: string | null;
|
|
36
36
|
terminal_session_status: string | null;
|
|
37
37
|
tmux_attach_command: string | null;
|
|
38
|
+
target_active_slots: number | null;
|
|
39
|
+
active_slot_count: number | null;
|
|
40
|
+
pending_queue_count: number | null;
|
|
41
|
+
backfill_count: number | null;
|
|
42
|
+
scheduler_status: string | null;
|
|
43
|
+
worker_slots: Array<Record<string, unknown>>;
|
|
44
|
+
session_generations: Array<Record<string, unknown>>;
|
|
38
45
|
blockers: string[];
|
|
39
46
|
agents: Array<Record<string, unknown>>;
|
|
40
47
|
recent_events: string[];
|
|
@@ -37,6 +37,9 @@ export async function buildAgentCodexCockpitState(missionDir, opts = {}) {
|
|
|
37
37
|
const sourceIntelligence = await readJson(path.join(missionDir, 'source-intelligence-evidence.json'), null);
|
|
38
38
|
const goalMode = await readJson(path.join(missionDir, 'goal-mode-applied.json'), null);
|
|
39
39
|
const tmuxLayout = await readJson(path.join(root, 'agent-tmux-layout.json'), null);
|
|
40
|
+
const scheduler = await readJson(path.join(root, 'agent-scheduler-state.json'), null);
|
|
41
|
+
const workerSlots = await readJson(path.join(root, 'agent-worker-slots.json'), null);
|
|
42
|
+
const generations = await readJson(path.join(root, 'agent-session-generations.json'), null);
|
|
40
43
|
const terminalClosed = proof?.terminal_sessions_closed === true;
|
|
41
44
|
const eventsTail = await readTailLines(path.join(root, 'agent-events.jsonl'), 8);
|
|
42
45
|
const cockpitEventsTail = await readTailLines(path.join(root, AGENT_CODEX_COCKPIT_EVENTS), 8);
|
|
@@ -68,6 +71,13 @@ export async function buildAgentCodexCockpitState(missionDir, opts = {}) {
|
|
|
68
71
|
goal_mode_status: goalMode?.mode || null,
|
|
69
72
|
terminal_session_status: terminalClosed ? 'closed' : proof ? 'blocked_or_unverified' : null,
|
|
70
73
|
tmux_attach_command: tmuxLayout?.attach_command || null,
|
|
74
|
+
target_active_slots: scheduler?.target_active_slots ?? null,
|
|
75
|
+
active_slot_count: scheduler?.active_slot_count ?? null,
|
|
76
|
+
pending_queue_count: scheduler?.pending_count ?? null,
|
|
77
|
+
backfill_count: scheduler?.backfill_count ?? null,
|
|
78
|
+
scheduler_status: scheduler?.status || null,
|
|
79
|
+
worker_slots: Array.isArray(workerSlots?.slots) ? workerSlots.slots : [],
|
|
80
|
+
session_generations: generations?.generations ? Object.values(generations.generations) : [],
|
|
71
81
|
blockers,
|
|
72
82
|
agents,
|
|
73
83
|
recent_events: [...eventsTail, ...cockpitEventsTail, ...teamTail].slice(-12),
|
|
@@ -98,6 +108,11 @@ export function renderAgentCodexDashboard(state) {
|
|
|
98
108
|
`- Terminal sessions: ${state.terminal_session_status || 'unknown'}`,
|
|
99
109
|
`- tmux attach: ${state.tmux_attach_command || 'unknown'}`,
|
|
100
110
|
`- All sessions closed: ${state.all_sessions_closed ?? 'unknown'}`,
|
|
111
|
+
`- Scheduler: ${state.scheduler_status || 'unknown'}`,
|
|
112
|
+
`- Target active slots: ${state.target_active_slots ?? 'unknown'}`,
|
|
113
|
+
`- Active slots: ${state.active_slot_count ?? 'unknown'}`,
|
|
114
|
+
`- Pending queue: ${state.pending_queue_count ?? 'unknown'}`,
|
|
115
|
+
`- Backfill events: ${state.backfill_count ?? 'unknown'}`,
|
|
101
116
|
'',
|
|
102
117
|
'| Agent | Persona | Task | State | Heartbeat age | Lease | Blockers | Artifact |',
|
|
103
118
|
'| --- | --- | --- | --- | --- | --- | --- | --- |',
|
|
@@ -116,6 +131,14 @@ export function renderAgentCodexDashboard(state) {
|
|
|
116
131
|
return `${[...header, ...rows].join('\n')}\n`;
|
|
117
132
|
}
|
|
118
133
|
export function renderAgentSessionCards(state) {
|
|
134
|
+
const slotBlocks = state.worker_slots.map((slot) => [
|
|
135
|
+
`## ${cell(slot.slot_id)}`,
|
|
136
|
+
'',
|
|
137
|
+
`- Status: ${cell(slot.status)}`,
|
|
138
|
+
`- Current generation: ${cell(slot.current_generation_index)}`,
|
|
139
|
+
`- Current session: ${cell(slot.current_session_id)}`,
|
|
140
|
+
`- Generation count: ${cell(slot.generation_count)}`,
|
|
141
|
+
].join('\n'));
|
|
119
142
|
const blocks = state.agents.map((agent) => [
|
|
120
143
|
`## ${cell(agent.id)}`,
|
|
121
144
|
'',
|
|
@@ -125,7 +148,7 @@ export function renderAgentSessionCards(state) {
|
|
|
125
148
|
`- Lease: ${cell(agent.lease || agent.lease_id || agent.write_policy)}`,
|
|
126
149
|
`- Artifact: ${cell(agent.output_artifact || agent.artifact || '')}`,
|
|
127
150
|
].join('\n'));
|
|
128
|
-
return `# Agent Session Cards\n\n${blocks.join('\n\n')}\n`;
|
|
151
|
+
return `# Agent Session Cards\n\n${[...slotBlocks, ...blocks].join('\n\n')}\n`;
|
|
129
152
|
}
|
|
130
153
|
export function renderAgentProgressTimeline(state) {
|
|
131
154
|
return `# Agent Progress Timeline\n\n${state.recent_events.map((line) => `- ${line}`).join('\n')}\n`;
|
|
@@ -140,6 +163,13 @@ function summarizeLiveState(state) {
|
|
|
140
163
|
agent_count: state.agent_count,
|
|
141
164
|
concurrency: state.concurrency,
|
|
142
165
|
active_agents: state.agents.filter((agent) => !['closed', 'done', 'completed'].includes(String(agent.status || ''))).length,
|
|
166
|
+
target_active_slots: state.target_active_slots,
|
|
167
|
+
active_slot_count: state.active_slot_count,
|
|
168
|
+
pending_queue_count: state.pending_queue_count,
|
|
169
|
+
backfill_count: state.backfill_count,
|
|
170
|
+
scheduler_status: state.scheduler_status,
|
|
171
|
+
worker_slot_count: state.worker_slots.length,
|
|
172
|
+
session_generation_count: state.session_generations.length,
|
|
143
173
|
proof_status: state.proof_status,
|
|
144
174
|
source_intelligence_status: state.source_intelligence_status,
|
|
145
175
|
xai_status: state.xai_status,
|
|
@@ -4,6 +4,10 @@ export declare function parseAgentCommandArgs(command: string, args?: string[]):
|
|
|
4
4
|
prompt: string;
|
|
5
5
|
route: string;
|
|
6
6
|
agents: number;
|
|
7
|
+
targetActiveSlots: number;
|
|
8
|
+
desiredWorkItemCount: number;
|
|
9
|
+
minimumWorkItems: number;
|
|
10
|
+
maxQueueExpansion: number;
|
|
7
11
|
concurrency: number;
|
|
8
12
|
backend: string;
|
|
9
13
|
mock: boolean;
|
|
@@ -6,6 +6,10 @@ export function parseAgentCommandArgs(command, args = []) {
|
|
|
6
6
|
const rest = action === first ? args.slice(1) : args;
|
|
7
7
|
const json = hasFlag(args, '--json');
|
|
8
8
|
const agents = Number(readOption(args, '--agents', DEFAULT_AGENT_COUNT));
|
|
9
|
+
const targetActiveSlots = Number(readOption(args, '--target-active-slots', agents));
|
|
10
|
+
const desiredWorkItemCount = Number(readOption(args, '--work-items', targetActiveSlots));
|
|
11
|
+
const minimumWorkItems = Number(readOption(args, '--minimum-work-items', targetActiveSlots));
|
|
12
|
+
const maxQueueExpansion = Number(readOption(args, '--max-queue-expansion', 10));
|
|
9
13
|
const concurrency = Number(readOption(args, '--concurrency', Math.min(agents, 5)));
|
|
10
14
|
const backend = String(readOption(args, '--backend', hasFlag(args, '--mock') ? 'fake' : 'codex-exec'));
|
|
11
15
|
const route = String(readOption(args, '--route', '$Agent'));
|
|
@@ -13,14 +17,14 @@ export function parseAgentCommandArgs(command, args = []) {
|
|
|
13
17
|
const real = hasFlag(args, '--real');
|
|
14
18
|
const readonly = hasFlag(args, '--readonly') || hasFlag(args, '--read-only');
|
|
15
19
|
const codexApp = hasFlag(args, '--codex-app');
|
|
16
|
-
const positionals = positionalArgs(rest, new Set(['--agents', '--concurrency', '--backend', '--route', '--mission', '--mission-id', '--agent', '--lane']));
|
|
20
|
+
const positionals = positionalArgs(rest, new Set(['--agents', '--target-active-slots', '--work-items', '--minimum-work-items', '--max-queue-expansion', '--concurrency', '--backend', '--route', '--mission', '--mission-id', '--agent', '--lane']));
|
|
17
21
|
const missionDefault = action === 'run' || action === 'spawn' || action === 'plan' ? '' : 'latest';
|
|
18
22
|
const positionalMission = action === 'run' || action === 'spawn' || action === 'plan' ? '' : (positionals[0] || '');
|
|
19
23
|
const missionId = String(readOption(args, '--mission', readOption(args, '--mission-id', positionalMission || missionDefault)));
|
|
20
24
|
const lane = String(readOption(args, '--agent', readOption(args, '--lane', '')));
|
|
21
25
|
const promptPositionals = positionalMission ? positionals.slice(1) : positionals;
|
|
22
26
|
const prompt = promptPositionals.join(' ').trim() || 'Native agent run';
|
|
23
|
-
return { command, action, prompt, route, agents, concurrency, backend, mock, real, readonly, json, missionId, lane, codexApp };
|
|
27
|
+
return { command, action, prompt, route, agents, targetActiveSlots, desiredWorkItemCount, minimumWorkItems, maxQueueExpansion, concurrency, backend, mock, real, readonly, json, missionId, lane, codexApp };
|
|
24
28
|
}
|
|
25
29
|
function hasFlag(args, flag) {
|
|
26
30
|
return args.includes(flag);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface AgentFollowUpWorkItem {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
required_persona_category: string;
|
|
6
|
+
priority: number;
|
|
7
|
+
dependencies: string[];
|
|
8
|
+
lease_requirements: unknown[];
|
|
9
|
+
max_attempts: number;
|
|
10
|
+
reason: string;
|
|
11
|
+
source_agent_session_id?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface AgentFollowUpValidationResult {
|
|
14
|
+
accepted: AgentFollowUpWorkItem[];
|
|
15
|
+
blockers: string[];
|
|
16
|
+
}
|
|
17
|
+
export declare function normalizeAgentFollowUpWorkItems(rawItems: unknown, input?: {
|
|
18
|
+
originSessionId?: string | null;
|
|
19
|
+
}): AgentFollowUpValidationResult;
|
|
20
|
+
//# sourceMappingURL=agent-follow-up-work-items.d.ts.map
|