sneakoscope 6.0.2 → 6.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/README.md +5 -3
- package/config/codex-releases/{rust-v0.142.0.json → rust-v0.144.1.json} +6 -6
- package/crates/sks-core/Cargo.lock +1 -1
- package/crates/sks-core/Cargo.toml +1 -1
- package/dist/cli/install-helpers.js +255 -440
- package/dist/cli/router.js +53 -4
- package/dist/commands/codex-app.js +8 -3
- package/dist/commands/codex-lb.js +169 -40
- package/dist/commands/codex.js +6 -5
- package/dist/commands/doctor.js +60 -26
- package/dist/commands/versioning.js +7 -0
- package/dist/config/skills-manifest.json +57 -57
- package/dist/core/agents/agent-central-ledger.js +9 -0
- package/dist/core/agents/agent-cleanup-executor.js +334 -41
- package/dist/core/agents/agent-cleanup.js +20 -1
- package/dist/core/agents/agent-command-surface.js +2 -1
- package/dist/core/agents/agent-effort-policy.js +46 -33
- package/dist/core/agents/agent-janitor.js +9 -10
- package/dist/core/agents/agent-namespace-safety.js +56 -0
- package/dist/core/agents/agent-orchestrator.js +26 -4
- package/dist/core/agents/agent-output-validator.js +1 -1
- package/dist/core/agents/agent-proof-evidence.js +16 -2
- package/dist/core/agents/agent-role-config.js +3 -6
- package/dist/core/agents/agent-roster.js +2 -2
- package/dist/core/agents/agent-runner-codex-exec.js +2 -0
- package/dist/core/agents/agent-runner-process.js +1 -0
- package/dist/core/agents/fast-mode-policy.js +3 -5
- package/dist/core/agents/native-cli-session-swarm.js +18 -1
- package/dist/core/agents/native-worker-backend-router.js +180 -108
- package/dist/core/agents/parallel-write-fixture.js +15 -10
- package/dist/core/agents/runtime-proof-summary.js +21 -3
- package/dist/core/agents/work-partition/repo-inventory.js +68 -7
- package/dist/core/code-structure.js +5 -4
- package/dist/core/codex/codex-config-guard.js +31 -9
- package/dist/core/codex-app/codex-app-fast-ui-repair.js +51 -20
- package/dist/core/codex-app/codex-app-restart.js +38 -8
- package/dist/core/codex-app/codex-app-ui-state-snapshot.js +11 -3
- package/dist/core/codex-app/sks-menubar.js +100 -40
- package/dist/core/codex-app.js +60 -17
- package/dist/core/codex-compat/codex-hook-warning-detector.js +10 -1
- package/dist/core/codex-compat/codex-release-manifest.js +6 -6
- package/dist/core/codex-control/codex-0139-doctor-real-probe.js +7 -1
- package/dist/core/codex-control/codex-0139-image-path-real-probe.js +14 -8
- package/dist/core/codex-control/codex-0139-probe-runner.js +103 -28
- package/dist/core/codex-control/codex-0139-real-probe-summary.js +7 -3
- package/dist/core/codex-control/codex-0139-real-probes.js +21 -6
- package/dist/core/codex-control/codex-0139-sandbox-real-probe.js +39 -13
- package/dist/core/codex-control/codex-0139-web-search-probe.js +11 -8
- package/dist/core/codex-control/{codex-0142-capability.js → codex-0144-capability.js} +22 -22
- package/dist/core/codex-control/codex-0144-collab-agent-real-probe.js +63 -0
- package/dist/core/codex-control/codex-model-metadata.js +8 -4
- package/dist/core/codex-control/codex-multi-agent-event-normalizer.js +5 -1
- package/dist/core/codex-control/codex-reliability-shield.js +4 -1
- package/dist/core/codex-control/codex-sdk-adapter.js +53 -6
- package/dist/core/codex-control/codex-sdk-config-policy.js +2 -1
- package/dist/core/codex-control/codex-sdk-sandbox-policy.js +6 -3
- package/dist/core/codex-lb/codex-lb-env.js +107 -0
- package/dist/core/codex-lb/codex-lb-tool-catalog.js +478 -0
- package/dist/core/codex-native/codex-native-feature-broker.js +22 -22
- package/dist/core/codex-native/codex-native-feature-matrix.js +2 -2
- package/dist/core/codex-native/native-capability-postcheck.js +16 -8
- package/dist/core/codex-native/native-capability-repair-matrix.js +76 -27
- package/dist/core/codex-plugins/codex-plugin-json.js +67 -21
- package/dist/core/codex-plugins/codex-plugin-repair.js +118 -0
- package/dist/core/codex-runtime/codex-desktop-config-policy.js +306 -0
- package/dist/core/commands/agent-command.js +19 -0
- package/dist/core/commands/basic-cli.js +45 -24
- package/dist/core/commands/gc-command.js +27 -4
- package/dist/core/commands/image-ux-review-command.js +55 -24
- package/dist/core/commands/mad-sks-command.js +152 -132
- package/dist/core/commands/naruto-command.js +41 -10
- package/dist/core/commands/pipeline-command.js +1 -0
- package/dist/core/commands/wiki-command.js +179 -83
- package/dist/core/computer-use-live-evidence.js +166 -3
- package/dist/core/computer-use-status.js +5 -2
- package/dist/core/daemon/sksd-hook-daemon-entrypoint.js +2 -2
- package/dist/core/daemon/sksd-hook-daemon.js +171 -28
- package/dist/core/daemon/sksd-hook-dispatch.js +2 -2
- package/dist/core/dfix/verification-selector.js +6 -4
- package/dist/core/doctor/browser-use-repair.js +54 -13
- package/dist/core/doctor/codex-0139-doctor.js +3 -2
- package/dist/core/doctor/computer-use-repair.js +28 -39
- package/dist/core/doctor/doctor-codex-startup-repair.js +19 -9
- package/dist/core/doctor/doctor-context7-repair.js +1 -1
- package/dist/core/doctor/doctor-dirty-planner.js +1 -1
- package/dist/core/doctor/doctor-native-capability-repair.js +74 -3
- package/dist/core/doctor/imagegen-repair.js +47 -12
- package/dist/core/doctor/legacy-global-hook-cleanup.js +179 -0
- package/dist/core/feature-registry.js +25 -31
- package/dist/core/fsx.js +54 -6
- package/dist/core/harness-conflicts.js +1 -1
- package/dist/core/hooks-runtime/code-pack-freshness-preflight.js +5 -4
- package/dist/core/hooks-runtime/hook-invocation-dedupe.js +147 -0
- package/dist/core/hooks-runtime/hook-io.js +6 -0
- package/dist/core/hooks-runtime.js +17 -2
- package/dist/core/image/image-artifact-path-contract.js +8 -6
- package/dist/core/image/image-artifact-registry.js +5 -1
- package/dist/core/image-ux-review/imagegen-adapter.js +5 -2
- package/dist/core/imagegen/imagegen-capability.js +10 -13
- package/dist/core/imagegen/require-imagegen.js +37 -11
- package/dist/core/managed-assets/managed-assets-manifest.js +1 -5
- package/dist/core/naruto/naruto-work-graph.js +70 -4
- package/dist/core/naruto/naruto-write-e2e.js +3 -4
- package/dist/core/ops/reporting.js +3 -0
- package/dist/core/pipeline-internals/runtime-core.js +12 -7
- package/dist/core/pipeline-internals/runtime-gates.js +17 -1
- package/dist/core/ppt/style-tokens.js +1 -1
- package/dist/core/ppt-review/index.js +1 -1
- package/dist/core/ppt-review/slide-exporter.js +23 -17
- package/dist/core/ppt-review/slide-imagegen-review.js +1 -1
- package/dist/core/ppt-review/slide-issue-extraction.js +4 -2
- package/dist/core/product-design-plugin.js +2 -2
- package/dist/core/proof/route-finalizer.js +1 -1
- package/dist/core/proof-field.js +3 -3
- package/dist/core/provider/model-router.js +68 -3
- package/dist/core/release/gate-manifest.js +18 -12
- package/dist/core/release/gate-pack-manifest.js +1 -1
- package/dist/core/release/package-size-budget.js +2 -0
- package/dist/core/release/release-gate-affected-selector.js +1 -1
- package/dist/core/release/release-gate-dag.js +43 -3
- package/dist/core/release/release-gate-hermetic-env.js +28 -17
- package/dist/core/release/release-real-contract.js +416 -0
- package/dist/core/retention/retention-budget.js +25 -6
- package/dist/core/retention.js +980 -101
- package/dist/core/routes/constants.js +1 -1
- package/dist/core/routes/evidence.js +4 -4
- package/dist/core/routes/model-mode-router.js +3 -0
- package/dist/core/routes/ppt-policy.js +1 -1
- package/dist/core/routes.js +11 -12
- package/dist/core/secret-redaction.js +4 -0
- package/dist/core/triwiki/code-pack.js +8 -2
- package/dist/core/triwiki/triwiki-cache-key.js +108 -29
- package/dist/core/triwiki-attention.js +13 -6
- package/dist/core/triwiki-provenance.js +274 -0
- package/dist/core/triwiki-runtime.js +21 -7
- package/dist/core/triwiki-wrongness/wrongness-ledger.js +178 -59
- package/dist/core/triwiki-wrongness/wrongness-retrieval.js +11 -2
- package/dist/core/triwiki-wrongness/wrongness-trust-policy.js +2 -0
- package/dist/core/update/update-migration-state.js +1 -1
- package/dist/core/update/update-notice.js +23 -0
- package/dist/core/update-check.js +69 -25
- package/dist/core/version.js +1 -1
- package/dist/core/wiki-coordinate.js +128 -12
- package/dist/core/work-order-ledger.js +168 -9
- package/dist/core/zellij/zellij-command.js +12 -1
- package/dist/core/zellij/zellij-dashboard-pane.js +3 -3
- package/dist/core/zellij/zellij-launcher.js +15 -14
- package/dist/core/zellij/zellij-pane-proof.js +32 -6
- package/dist/core/zellij/zellij-worker-pane-manager.js +5 -3
- package/dist/scripts/agent-fast-mode-default-check.js +48 -29
- package/dist/scripts/agent-role-config-repair-check.js +25 -4
- package/dist/scripts/agent-wiki-context-proof-check.js +16 -2
- package/dist/scripts/all-feature-deep-completion-check.js +14 -4
- package/dist/scripts/build-dist.js +17 -5
- package/dist/scripts/canonical-test-runner.js +188 -0
- package/dist/scripts/check-command-module-budget.js +38 -16
- package/dist/scripts/check-legacy-free.js +1 -1
- package/dist/scripts/codex-0139-interrupt-agent-check.js +5 -1
- package/dist/scripts/{codex-0142-app-server-v2-check.js → codex-0144-app-server-v2-check.js} +11 -10
- package/dist/scripts/{codex-0142-binary-identity-check.js → codex-0144-binary-identity-check.js} +4 -4
- package/dist/scripts/codex-0144-capability-check.js +21 -0
- package/dist/scripts/{codex-0139-real-probes-check.js → codex-0144-core-real-probes-check.js} +19 -5
- package/dist/scripts/{codex-0142-doctor-wiring-check.js → codex-0144-doctor-wiring-check.js} +6 -6
- package/dist/scripts/{codex-0142-manifest-check.js → codex-0144-manifest-check.js} +11 -3
- package/dist/scripts/{codex-0142-policy-check.js → codex-0144-policy-check.js} +2 -2
- package/dist/scripts/{codex-0142-thread-store-check.js → codex-0144-thread-store-check.js} +3 -3
- package/dist/scripts/codex-app-provider-model-ui-check.js +57 -8
- package/dist/scripts/codex-app-ui-preservation-check.js +35 -4
- package/dist/scripts/codex-control-side-effect-scope-check.js +2 -2
- package/dist/scripts/codex-effort-auto-discovery-check.js +1 -1
- package/dist/scripts/codex-lb-fast-mode-truth-check.js +1 -0
- package/dist/scripts/{codex-lb-gpt55-fast-profile-check.js → codex-lb-gpt56-fast-profile-check.js} +56 -5
- package/dist/scripts/codex-model-metadata-check.js +1 -1
- package/dist/scripts/codex-sdk-sandbox-policy-check.js +5 -1
- package/dist/scripts/codex-sdk-version-compat-check.js +2 -1
- package/dist/scripts/dfix-fixture-check.js +1 -1
- package/dist/scripts/docs-truthfulness-check.js +1 -1
- package/dist/scripts/doctor-codex-startup-repair-check.js +35 -10
- package/dist/scripts/doctor-context7-repair-check.js +2 -1
- package/dist/scripts/doctor-fix-proves-codex-read-check.js +1 -1
- package/dist/scripts/doctor-fixes-codex-app-fast-ui-check.js +34 -7
- package/dist/scripts/doctor-imagegen-repair-check.js +14 -4
- package/dist/scripts/doctor-startup-config-repair-blackbox.js +1 -1
- package/dist/scripts/doctor-startup-config-repair-check.js +1 -1
- package/dist/scripts/gate-policy-audit-check.js +2 -2
- package/dist/scripts/install-update-preserves-config-check.js +1 -1
- package/dist/scripts/legacy-gate-inventory-check.js +7 -5
- package/dist/scripts/legacy-strong-inventory-check.js +7 -5
- package/dist/scripts/legacy-upgrade-matrix-check.js +5 -5
- package/dist/scripts/lib/native-cli-session-swarm-check-lib.js +175 -14
- package/dist/scripts/mad-sks-app-ui-no-mutation-check.js +166 -6
- package/dist/scripts/mutation-callsite-coverage-check.js +0 -11
- package/dist/scripts/naruto-shadow-clone-swarm-check.js +88 -50
- package/dist/scripts/npm-publish-performance-check.js +2 -1
- package/dist/scripts/package-published-contract-check.js +9 -0
- package/dist/scripts/packlist-performance-check.js +5 -2
- package/dist/scripts/postinstall-safe-side-effects-check.js +8 -3
- package/dist/scripts/ppt-no-mock-as-real-check.js +3 -1
- package/dist/scripts/product-design-plugin-routing-check.js +1 -1
- package/dist/scripts/release-check-stamp.js +182 -2
- package/dist/scripts/release-dag-full-coverage-check.js +7 -7
- package/dist/scripts/release-dynamic-presets-check.js +8 -0
- package/dist/scripts/release-gate-dag-runner-check.js +3 -2
- package/dist/scripts/release-gate-dag-runner.js +24 -11
- package/dist/scripts/release-gate-existence-audit.js +8 -9
- package/dist/scripts/release-gate-script-parity-check.js +1 -1
- package/dist/scripts/release-real-check.js +368 -157
- package/dist/scripts/release-runtime-truth-matrix-check.js +22 -0
- package/dist/scripts/route-proof-artifact-structure-check.js +1 -0
- package/dist/scripts/scheduler-batch-dispatch-check.js +1 -1
- package/dist/scripts/search-visibility-gate-lib.js +1 -1
- package/dist/scripts/seo-geo-route-identity-check.js +30 -4
- package/dist/scripts/sizecheck.js +7 -2
- package/dist/scripts/sks-1-11-gate-lib.js +53 -6
- package/dist/scripts/sks-menubar-install-check.js +7 -0
- package/dist/scripts/sks-uninstall-regression-check.js +1 -1
- package/dist/scripts/sksd-daemon-check.js +16 -6
- package/dist/scripts/update-default-command-check.js +4 -2
- package/dist/scripts/write-build-manifest.js +2 -1
- package/dist/scripts/zellij-layout-valid-check.js +31 -6
- package/dist/scripts/zellij-pane-proof-check.js +33 -2
- package/dist/scripts/zellij-real-session-cleanup-check.js +122 -2
- package/dist/scripts/zellij-real-session-launch-check.js +76 -5
- package/dist/scripts/zellij-slot-pane-renderer-check.js +4 -4
- package/package.json +27 -30
- package/schemas/codex/{app-server-0.142 → app-server-0.144}/codex_app_server_protocol.v2.schemas.json +1146 -781
- package/schemas/codex/codex-0139-real-probe-result.schema.json +39 -5
- package/schemas/codex/ppt-slide-issue-ledger.schema.json +2 -1
- package/dist/core/codex-control/codex-0139-multi-agent-real-probe.js +0 -107
- package/dist/scripts/agent-native-release-gate.js +0 -274
- package/dist/scripts/codex-0142-capability-check.js +0 -21
- package/dist/scripts/command-performance-scorecard-check.js +0 -204
- package/dist/scripts/config-managed-merge-callsite-coverage-check.js +0 -212
- package/dist/scripts/dollar-performance-scorecard-check.js +0 -257
- package/dist/scripts/gate-timing-check.js +0 -16
- package/dist/scripts/ops-maturity-scorecard-check.js +0 -12
- package/dist/scripts/performance-baseline-check.js +0 -12
- package/dist/scripts/performance-improvement-report-check.js +0 -58
- package/dist/scripts/release-parallel-check.js +0 -389
- package/dist/scripts/release-runner-efficiency-check.js +0 -15
- package/dist/scripts/retention-long-run-smoke-check.js +0 -299
- package/docs/assets/sneakoscope-architecture-pipeline.jpg +0 -0
|
@@ -1,30 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://sneakoscope.local/schemas/codex/codex-0139-real-probe-result.schema.json",
|
|
4
|
-
"title": "SKS Codex 0.
|
|
4
|
+
"title": "SKS Codex 0.144.1 core real probe result (0.139 contract lineage)",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"required": [
|
|
7
7
|
"schema",
|
|
8
|
+
"target_version",
|
|
9
|
+
"compatibility_origin",
|
|
10
|
+
"compatibility_authority",
|
|
8
11
|
"generated_at",
|
|
9
12
|
"codex_bin",
|
|
10
13
|
"version_text",
|
|
11
14
|
"parsed_version",
|
|
12
15
|
"require_real",
|
|
16
|
+
"release_authorizing",
|
|
13
17
|
"overall_ok",
|
|
14
18
|
"probe_timeout_ms",
|
|
19
|
+
"requested_probes",
|
|
15
20
|
"probes",
|
|
16
21
|
"skipped",
|
|
22
|
+
"warnings",
|
|
23
|
+
"external_integration_status",
|
|
24
|
+
"temp_cleanup",
|
|
17
25
|
"blockers"
|
|
18
26
|
],
|
|
19
27
|
"properties": {
|
|
20
28
|
"schema": { "const": "sks.codex-0139-real-probe-result.v1" },
|
|
29
|
+
"target_version": { "const": "0.144.1" },
|
|
30
|
+
"compatibility_origin": { "const": "codex-0139-real-probe-result-v1" },
|
|
31
|
+
"compatibility_authority": { "const": "deprecated_non_authoritative_lineage_only" },
|
|
21
32
|
"generated_at": { "type": "string" },
|
|
22
33
|
"codex_bin": { "type": ["string", "null"] },
|
|
23
34
|
"version_text": { "type": ["string", "null"] },
|
|
24
35
|
"parsed_version": { "type": ["string", "null"] },
|
|
25
36
|
"require_real": { "type": "boolean" },
|
|
37
|
+
"release_authorizing": { "type": "boolean" },
|
|
26
38
|
"overall_ok": { "type": "boolean" },
|
|
27
39
|
"probe_timeout_ms": { "type": "integer", "minimum": 1 },
|
|
40
|
+
"requested_probes": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
|
|
28
41
|
"probes": {
|
|
29
42
|
"type": "object",
|
|
30
43
|
"additionalProperties": false,
|
|
@@ -35,9 +48,9 @@
|
|
|
35
48
|
"marketplace_source_json",
|
|
36
49
|
"plugin_catalog_cache",
|
|
37
50
|
"sandbox_profile_alias",
|
|
38
|
-
"
|
|
51
|
+
"collab_agent_tool_schema",
|
|
39
52
|
"image_referenced_path",
|
|
40
|
-
"
|
|
53
|
+
"sandbox_proxy_environment"
|
|
41
54
|
],
|
|
42
55
|
"properties": {
|
|
43
56
|
"code_mode_web_search": { "$ref": "#/$defs/singleProbe" },
|
|
@@ -46,12 +59,32 @@
|
|
|
46
59
|
"marketplace_source_json": { "$ref": "#/$defs/singleProbe" },
|
|
47
60
|
"plugin_catalog_cache": { "$ref": "#/$defs/singleProbe" },
|
|
48
61
|
"sandbox_profile_alias": { "$ref": "#/$defs/singleProbe" },
|
|
49
|
-
"
|
|
62
|
+
"collab_agent_tool_schema": { "$ref": "#/$defs/singleProbe" },
|
|
50
63
|
"image_referenced_path": { "$ref": "#/$defs/singleProbe" },
|
|
51
|
-
"
|
|
64
|
+
"sandbox_proxy_environment": { "$ref": "#/$defs/singleProbe" }
|
|
52
65
|
}
|
|
53
66
|
},
|
|
54
67
|
"skipped": { "type": "array", "items": { "type": "string" } },
|
|
68
|
+
"warnings": { "type": "array", "items": { "type": "string" } },
|
|
69
|
+
"external_integration_status": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"required": ["mcp_auth", "release_authorization_scope"],
|
|
72
|
+
"properties": {
|
|
73
|
+
"mcp_auth": { "enum": ["authentication_required", "not_observed"] },
|
|
74
|
+
"release_authorization_scope": { "const": "codex_core_compatibility_only" }
|
|
75
|
+
},
|
|
76
|
+
"additionalProperties": false
|
|
77
|
+
},
|
|
78
|
+
"temp_cleanup": {
|
|
79
|
+
"type": "object",
|
|
80
|
+
"required": ["root", "ok", "remaining_entries"],
|
|
81
|
+
"properties": {
|
|
82
|
+
"root": { "type": "string" },
|
|
83
|
+
"ok": { "type": "boolean" },
|
|
84
|
+
"remaining_entries": { "type": "array", "items": { "type": "string" } }
|
|
85
|
+
},
|
|
86
|
+
"additionalProperties": false
|
|
87
|
+
},
|
|
55
88
|
"blockers": { "type": "array", "items": { "type": "string" } }
|
|
56
89
|
},
|
|
57
90
|
"$defs": {
|
|
@@ -76,6 +109,7 @@
|
|
|
76
109
|
"stderr_tail": { "type": "string" },
|
|
77
110
|
"artifact_paths": { "type": "array", "items": { "type": "string" } },
|
|
78
111
|
"evidence": { "type": "object" },
|
|
112
|
+
"warnings": { "type": "array", "items": { "type": "string" } },
|
|
79
113
|
"blockers": { "type": "array", "items": { "type": "string" } }
|
|
80
114
|
},
|
|
81
115
|
"additionalProperties": false
|
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
"$id": "https://sneakoscope.local/schemas/ppt-slide-issue-ledger.schema.json",
|
|
4
4
|
"title": "SKS PPT Slide Issue Ledger",
|
|
5
5
|
"type": "object",
|
|
6
|
-
"required": ["schema", "schema_version", "created_at", "issues", "issue_count", "blockers", "validation", "passed"],
|
|
6
|
+
"required": ["schema", "schema_version", "created_at", "issues", "issue_count", "blocking_issue_count", "blockers", "validation", "passed"],
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"properties": {
|
|
9
9
|
"schema": { "const": "sks.ppt-slide-issue-ledger.v1" },
|
|
10
10
|
"schema_version": { "const": 1 },
|
|
11
11
|
"created_at": { "type": "string" },
|
|
12
12
|
"issue_count": { "type": "integer", "minimum": 0 },
|
|
13
|
+
"blocking_issue_count": { "type": "integer", "minimum": 0 },
|
|
13
14
|
"blockers": { "type": "array", "items": { "type": "string" } },
|
|
14
15
|
"passed": { "type": "boolean" },
|
|
15
16
|
"extraction_source": { "type": "string" },
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import path from 'node:path';
|
|
2
|
-
import { findCodexBinary } from '../codex-adapter.js';
|
|
3
|
-
import { ensureDir, runProcess, writeJsonAtomic } from '../fsx.js';
|
|
4
|
-
import { codex0139ProbeTail, skippedCodex0139Probe } from './codex-0139-real-probes.js';
|
|
5
|
-
export function normalizeCodex0139InterruptAgentEvent(event) {
|
|
6
|
-
const name = String(event?.tool || event?.item?.tool || event?.type || event?.event || event?.name || '');
|
|
7
|
-
return name === 'interrupt_agent' || name === 'close_agent' ? { ...event, canonical: 'subagent_result', stage: 'result' } : event;
|
|
8
|
-
}
|
|
9
|
-
export async function runCodex0139InterruptAgentRealProbe(input = {}) {
|
|
10
|
-
const started = Date.now();
|
|
11
|
-
if (process.env.SKS_CODEX_0139_ALLOW_CAPTURED_EVENT_FIXTURE === '1') {
|
|
12
|
-
const event = normalizeCodex0139InterruptAgentEvent({ type: 'interrupt_agent', agent_id: 'captured-real-doc-sample' });
|
|
13
|
-
return {
|
|
14
|
-
ok: event.stage === 'result',
|
|
15
|
-
mode: 'captured-real-fixture',
|
|
16
|
-
duration_ms: Date.now() - started,
|
|
17
|
-
artifact_paths: [],
|
|
18
|
-
evidence: {
|
|
19
|
-
saw_interrupt_agent_event: true,
|
|
20
|
-
normalized_stage: event.stage,
|
|
21
|
-
fixture_allowed_by_env: true
|
|
22
|
-
},
|
|
23
|
-
blockers: event.stage === 'result' ? [] : ['codex_interrupt_agent_normalization_failed']
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
const codexBin = input.codexBin || await findCodexBinary();
|
|
27
|
-
if (!codexBin)
|
|
28
|
-
return skippedCodex0139Probe('codex_cli_missing');
|
|
29
|
-
const root = input.root || process.cwd();
|
|
30
|
-
const tempDir = path.join(root, '.sneakoscope', 'tmp', 'codex-0139-real-probes', `interrupt-agent-${Date.now()}`);
|
|
31
|
-
await ensureDir(tempDir);
|
|
32
|
-
const prompt = 'No file edits. Spawn one tiny subagent named interrupt_probe that only says ready. Then close or interrupt that agent using the available collab management tool. Final answer exactly: interrupt probe done.';
|
|
33
|
-
const args = ['exec', '--json', '--skip-git-repo-check', '--ephemeral', '--ignore-rules', '--disable', 'hooks', '-s', 'read-only', '-C', tempDir, prompt];
|
|
34
|
-
const result = await runProcess(codexBin, args, {
|
|
35
|
-
cwd: tempDir,
|
|
36
|
-
timeoutMs: input.timeoutMs || 120000,
|
|
37
|
-
maxOutputBytes: 1024 * 1024
|
|
38
|
-
}).catch((err) => ({ code: 1, stdout: '', stderr: err?.message || String(err) }));
|
|
39
|
-
const events = parseJsonlEvents(`${result.stdout || ''}\n${result.stderr || ''}`);
|
|
40
|
-
const tools = events
|
|
41
|
-
.map((event) => String(event?.item?.tool || event?.tool || ''))
|
|
42
|
-
.filter(Boolean);
|
|
43
|
-
const sawSpawn = tools.includes('spawn_agent');
|
|
44
|
-
const sawInterrupt = tools.includes('interrupt_agent');
|
|
45
|
-
const sawClose = tools.includes('close_agent');
|
|
46
|
-
const closeOrInterruptEvent = events.find((event) => ['interrupt_agent', 'close_agent'].includes(String(event?.item?.tool || event?.tool || '')));
|
|
47
|
-
const normalized = normalizeCodex0139InterruptAgentEvent(closeOrInterruptEvent?.item || closeOrInterruptEvent || {});
|
|
48
|
-
const finalText = events.map((event) => String(event?.item?.text || '')).find((text) => /interrupt probe done/i.test(text)) || '';
|
|
49
|
-
const ok = result.code === 0 && sawSpawn && (sawInterrupt || sawClose) && normalized.stage === 'result';
|
|
50
|
-
const artifact = path.join(root, '.sneakoscope', 'codex-0139-interrupt-agent-real.json');
|
|
51
|
-
await writeJsonAtomic(artifact, {
|
|
52
|
-
schema: 'sks.codex-0139-interrupt-agent-real.v1',
|
|
53
|
-
ok,
|
|
54
|
-
generated_at: new Date().toISOString(),
|
|
55
|
-
command_line: [codexBin, ...args],
|
|
56
|
-
event_count: events.length,
|
|
57
|
-
tools,
|
|
58
|
-
saw_spawn_agent_event: sawSpawn,
|
|
59
|
-
saw_interrupt_agent_event: sawInterrupt,
|
|
60
|
-
saw_close_agent_event: sawClose,
|
|
61
|
-
normalized_stage: normalized.stage || null,
|
|
62
|
-
final_text_seen: Boolean(finalText),
|
|
63
|
-
stdout_tail: codex0139ProbeTail(result.stdout),
|
|
64
|
-
stderr_tail: codex0139ProbeTail(result.stderr)
|
|
65
|
-
});
|
|
66
|
-
return {
|
|
67
|
-
ok,
|
|
68
|
-
mode: 'actual-cli',
|
|
69
|
-
command_line: [codexBin, ...args],
|
|
70
|
-
duration_ms: Date.now() - started,
|
|
71
|
-
stdout_tail: codex0139ProbeTail(result.stdout),
|
|
72
|
-
stderr_tail: codex0139ProbeTail(result.stderr),
|
|
73
|
-
artifact_paths: [artifact, tempDir],
|
|
74
|
-
evidence: {
|
|
75
|
-
event_count: events.length,
|
|
76
|
-
collab_tools_seen: [...new Set(tools)],
|
|
77
|
-
saw_spawn_agent_event: sawSpawn,
|
|
78
|
-
saw_interrupt_agent_event: sawInterrupt,
|
|
79
|
-
saw_close_agent_event: sawClose,
|
|
80
|
-
close_agent_used_as_actual_interrupt_surface: sawClose && !sawInterrupt,
|
|
81
|
-
normalized_stage: normalized.stage || null,
|
|
82
|
-
final_text_seen: Boolean(finalText)
|
|
83
|
-
},
|
|
84
|
-
blockers: ok ? [] : [
|
|
85
|
-
...(result.code === 0 ? [] : ['codex_interrupt_agent_exec_failed']),
|
|
86
|
-
...(sawSpawn ? [] : ['codex_interrupt_agent_spawn_event_missing']),
|
|
87
|
-
...(sawInterrupt || sawClose ? [] : ['codex_interrupt_agent_or_close_event_missing']),
|
|
88
|
-
...(normalized.stage === 'result' ? [] : ['codex_interrupt_agent_normalization_failed'])
|
|
89
|
-
]
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
function parseJsonlEvents(text) {
|
|
93
|
-
return String(text || '')
|
|
94
|
-
.split(/\r?\n/)
|
|
95
|
-
.map((line) => line.trim())
|
|
96
|
-
.filter((line) => line.startsWith('{') && line.endsWith('}'))
|
|
97
|
-
.map((line) => {
|
|
98
|
-
try {
|
|
99
|
-
return JSON.parse(line);
|
|
100
|
-
}
|
|
101
|
-
catch {
|
|
102
|
-
return null;
|
|
103
|
-
}
|
|
104
|
-
})
|
|
105
|
-
.filter(Boolean);
|
|
106
|
-
}
|
|
107
|
-
//# sourceMappingURL=codex-0139-multi-agent-real-probe.js.map
|
|
@@ -1,274 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import fs from 'node:fs';
|
|
4
|
-
import path from 'node:path';
|
|
5
|
-
import { assertGate, emitGate, root, runSksJson } from './sks-1-11-gate-lib.js';
|
|
6
|
-
const gate = process.argv[2] || path.basename(process.argv[1], '.mjs').replace(/-check$/, '');
|
|
7
|
-
const pkg = JSON.parse(fs.readFileSync(path.join(root, 'package.json'), 'utf8'));
|
|
8
|
-
const runtimeFiles = [
|
|
9
|
-
'src/core/commands/team-command.ts',
|
|
10
|
-
'src/core/team-dag.ts',
|
|
11
|
-
'src/core/team-live.ts',
|
|
12
|
-
'src/core/research.ts',
|
|
13
|
-
'src/core/commands/research-command.ts',
|
|
14
|
-
'src/core/commands/qa-loop-command.ts',
|
|
15
|
-
'src/core/pipeline-internals/runtime-core.ts',
|
|
16
|
-
'src/core/pipeline-internals/runtime-gates.ts',
|
|
17
|
-
'src/core/proof/auto-finalize.ts',
|
|
18
|
-
'src/core/proof/route-finalizer.ts',
|
|
19
|
-
'src/core/proof/route-proof-gate.ts'
|
|
20
|
-
];
|
|
21
|
-
const agentFiles = [
|
|
22
|
-
'src/core/agents/agent-schema.ts',
|
|
23
|
-
'src/core/agents/agent-command-surface.ts',
|
|
24
|
-
'src/core/agents/agent-orchestrator.ts',
|
|
25
|
-
'src/core/agents/agent-worker-pipeline.ts',
|
|
26
|
-
'src/core/agents/agent-runner-codex-exec.ts',
|
|
27
|
-
'src/core/agents/agent-runner-process.ts',
|
|
28
|
-
'src/core/agents/agent-runner-fake.ts',
|
|
29
|
-
'src/core/agents/agent-runner-zellij.ts',
|
|
30
|
-
'src/core/agents/zellij-right-lane-cockpit.ts',
|
|
31
|
-
'src/core/agents/zellij-lane-supervisor.ts',
|
|
32
|
-
'src/core/agents/agent-persona.ts',
|
|
33
|
-
'src/core/agents/agent-roster.ts',
|
|
34
|
-
'src/core/agents/agent-effort-policy.ts',
|
|
35
|
-
'src/core/agents/route-collaboration-ledger.ts',
|
|
36
|
-
'src/core/agents/agent-task-slicer.ts',
|
|
37
|
-
'src/core/agents/agent-work-partition.ts',
|
|
38
|
-
'src/core/agents/agent-lease.ts',
|
|
39
|
-
'src/core/agents/agent-conflict-graph.ts',
|
|
40
|
-
'src/core/agents/agent-central-ledger.ts',
|
|
41
|
-
'src/core/agents/agent-ledger-schemas.ts',
|
|
42
|
-
'src/core/agents/agent-message-bus.ts',
|
|
43
|
-
'src/core/agents/agent-lifecycle.ts',
|
|
44
|
-
'src/core/agents/agent-heartbeat.ts',
|
|
45
|
-
'src/core/agents/agent-consensus.ts',
|
|
46
|
-
'src/core/agents/agent-proof-evidence.ts',
|
|
47
|
-
'src/core/agents/agent-recursion-guard.ts',
|
|
48
|
-
'src/core/agents/agent-output-validator.ts',
|
|
49
|
-
'src/core/agents/agent-cleanup.ts',
|
|
50
|
-
'src/core/agents/agent-trust-report.ts',
|
|
51
|
-
'src/core/agents/agent-wrongness.ts',
|
|
52
|
-
'src/core/commands/agent-command.ts'
|
|
53
|
-
];
|
|
54
|
-
const workPartitionFiles = [
|
|
55
|
-
'src/core/agents/work-partition/repo-inventory.ts',
|
|
56
|
-
'src/core/agents/work-partition/dependency-graph.ts',
|
|
57
|
-
'src/core/agents/work-partition/semantic-domain-graph.ts',
|
|
58
|
-
'src/core/agents/work-partition/task-slicer.ts',
|
|
59
|
-
'src/core/agents/work-partition/lease-planner.ts',
|
|
60
|
-
'src/core/agents/work-partition/conflict-detector.ts',
|
|
61
|
-
'src/core/agents/work-partition/no-overlap-proof.ts'
|
|
62
|
-
];
|
|
63
|
-
function text(rel) {
|
|
64
|
-
return fs.readFileSync(path.join(root, rel), 'utf8');
|
|
65
|
-
}
|
|
66
|
-
function exists(rel) {
|
|
67
|
-
return fs.existsSync(path.join(root, rel));
|
|
68
|
-
}
|
|
69
|
-
function assertFiles(files) {
|
|
70
|
-
for (const file of files)
|
|
71
|
-
assertGate(exists(file), `missing required file: ${file}`);
|
|
72
|
-
}
|
|
73
|
-
function assertLegacyMultiagentRemoved() {
|
|
74
|
-
const forbidden = [
|
|
75
|
-
/\brunFiveScoutIntake\b/,
|
|
76
|
-
/\bsks\s+scouts\s+run\b/,
|
|
77
|
-
/\bparallel_analysis_scouting\b/,
|
|
78
|
-
/\banalysis_scout(?:_\d+)?\b/
|
|
79
|
-
];
|
|
80
|
-
for (const file of runtimeFiles) {
|
|
81
|
-
const body = text(file);
|
|
82
|
-
const hits = forbidden.filter((re) => re.test(body)).map(String);
|
|
83
|
-
assertGate(hits.length === 0, `legacy multi-agent runtime reference found in ${file}`, { hits });
|
|
84
|
-
}
|
|
85
|
-
for (const rel of ['src/core/scouts', 'src/core/commands/scouts-command.ts', 'src/commands/scouts.ts', 'schemas/codex/scout-result.schema.json']) {
|
|
86
|
-
assertGate(!exists(rel), `legacy multi-agent surface still present: ${rel}`);
|
|
87
|
-
}
|
|
88
|
-
const registry = text('src/cli/command-registry.ts');
|
|
89
|
-
assertGate(!/\bscouts?\s*:\s*entry\b/.test(registry), 'command registry must not expose legacy multi-agent commands');
|
|
90
|
-
}
|
|
91
|
-
function assertAgentSurface() {
|
|
92
|
-
assertFiles(agentFiles);
|
|
93
|
-
const registry = text('src/cli/command-registry.ts');
|
|
94
|
-
const zellij = text('src/core/agents/agent-runner-zellij.ts');
|
|
95
|
-
assertGate(/\bagent:\s+entry/.test(registry), 'command registry must expose sks agent');
|
|
96
|
-
assertGate(/'--agent': 'agent'/.test(registry), 'CLI parser must route --agent to agent command');
|
|
97
|
-
assertGate(zellij.includes('buildZellijAgentPanePlan') && zellij.includes('persistent_worker_slot') && zellij.includes('agent-zellij-report.json'), 'Zellij agent backend must declare lane plan and report policy');
|
|
98
|
-
}
|
|
99
|
-
function assertNonRecursive() {
|
|
100
|
-
const pipeline = text('src/core/agents/agent-worker-pipeline.ts');
|
|
101
|
-
const guard = text('src/core/agents/agent-recursion-guard.ts');
|
|
102
|
-
const docs = text('docs/agent-non-recursive-pipeline.md');
|
|
103
|
-
const orchestrator = text('src/core/agents/agent-orchestrator.ts');
|
|
104
|
-
const hooks = text('src/core/hooks-runtime.ts');
|
|
105
|
-
assertGate(exists('src/scripts/non-recursive-pipeline-check.ts'), 'missing non-recursive pipeline checker script');
|
|
106
|
-
assertGate(exists('schemas/codex/non-recursive-pipeline-report.schema.json'), 'missing non-recursive pipeline report schema');
|
|
107
|
-
for (const token of ['AGENT_WORKER_PIPELINE', 'SKS_AGENT_WORKER', 'SKS_PIPELINE_MODE', 'SKS_DISABLE_ROUTE_RECURSION', 'SKS_AGENT_SESSION_ID', 'SKS_AGENT_ID']) {
|
|
108
|
-
assertGate(pipeline.includes(token), `agent worker pipeline missing ${token}`);
|
|
109
|
-
}
|
|
110
|
-
for (const token of ['sks team', 'sks --agent', 'sks agent run', 'sks research run', 'sks autoresearch run', 'sks goal', '$Team', '$Research', '$AutoResearch', '$QA-LOOP', '$Goal']) {
|
|
111
|
-
assertGate(guard.includes(token), `agent recursion denylist missing ${token}`);
|
|
112
|
-
}
|
|
113
|
-
assertGate(guard.includes('agent-recursion-guard.json'), 'recursion guard report must be written');
|
|
114
|
-
for (const token of ['NON_RECURSIVE_PIPELINE_REPORT_SCHEMA', 'scanNonRecursivePipelinePolicy', 'wrongness_records', 'trust_report', 'evidence_router', 'next_action', 'local_only', 'secret_redaction_ok', 'performance_budget_ms']) {
|
|
115
|
-
assertGate(guard.includes(token), `non-recursive policy module missing ${token}`);
|
|
116
|
-
}
|
|
117
|
-
for (const token of ['env guard', 'command denylist', 'route denylist', 'worker mission creation block', 'current.json write block', 'stdout transcript scan', 'stderr transcript scan', 'agent result scan', 'wrongness record']) {
|
|
118
|
-
assertGate(guard.includes(token), `non-recursive policy contract missing ${token}`);
|
|
119
|
-
}
|
|
120
|
-
assertGate(docs.includes('Non-Recursive Pipeline Policy Report'), 'non-recursive policy docs section missing');
|
|
121
|
-
assertGate(orchestrator.includes('writeAgentRecursionGuardReport'), 'orchestrator must detect recursion attempts');
|
|
122
|
-
assertGate(hooks.includes('agentWorkerHookRecursionDecision') && hooks.includes('scanAgentTextForRecursion'), 'Codex PreToolUse hook must integrate agent recursion guard');
|
|
123
|
-
}
|
|
124
|
-
function assertCentralLedger() {
|
|
125
|
-
const ledger = text('src/core/agents/agent-central-ledger.ts');
|
|
126
|
-
const schemas = text('src/core/agents/agent-ledger-schemas.ts');
|
|
127
|
-
for (const token of ['agent-events.jsonl', 'agent-sessions.json', 'agent-roster.json', 'agent-task-board.json', 'agent-task-board.md', 'agent-messages.jsonl', 'agent-handoffs.jsonl', 'agent-leases.json', 'agent-conflict-graph.json', 'agent-consensus.json', 'agent-proof-evidence.json', 'current_hash', 'previous_hash']) {
|
|
128
|
-
assertGate(ledger.includes(token), `central ledger missing ${token}`);
|
|
129
|
-
}
|
|
130
|
-
for (const token of ['sks.agent-event.v1', 'sks.agent-message.v1', 'sks.agent-task-board.v1', 'sks.agent-session-record.v1', 'sks.agent-lease-ledger.v1', 'sks.agent-conflict-graph.v1', 'sks.agent-consensus.v1', 'sks.agent-proof-evidence.v1', 'sks.agent-cleanup.v1', 'sks.agent-non-recursive-pipeline.v1', 'additionalProperties: false', 'validateJsonSchemaRecursive']) {
|
|
131
|
-
assertGate(schemas.includes(token), `central ledger schema registry missing ${token}`);
|
|
132
|
-
}
|
|
133
|
-
for (const token of ['validateAgentLedgerWriteScope', 'agent_cannot_modify_other_session_record', 'agent_cannot_modify_orchestrator_only_file']) {
|
|
134
|
-
assertGate(ledger.includes(token), `central ledger write-scope policy missing ${token}`);
|
|
135
|
-
}
|
|
136
|
-
const lifecycle = text('src/core/agents/agent-lifecycle.ts');
|
|
137
|
-
for (const token of ['agent-lifecycle-policy.json', 'agent-lifecycle-aggregate.json', 'agent-timeout-kill-report.json', 'killTimedOutAgentSessions', 'agentHardTimeoutMs', 'SKS_AGENT_HARD_TIMEOUT_MS', 'sks.agent-session-record.v1']) {
|
|
138
|
-
assertGate(lifecycle.includes(token), `agent lifecycle missing ${token}`);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
function assertWorkPartition() {
|
|
142
|
-
assertFiles(workPartitionFiles);
|
|
143
|
-
const partition = text('src/core/agents/agent-work-partition.ts');
|
|
144
|
-
for (const token of ['inventory', 'dependency', 'semantic', 'lease', 'conflict', 'no_overlap_proof']) {
|
|
145
|
-
assertGate(partition.includes(token), `work partition missing ${token}`);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
function assertOutputSchema() {
|
|
149
|
-
const schema = JSON.parse(text('schemas/codex/agent-result.schema.json'));
|
|
150
|
-
assertGate(schema.additionalProperties === false, 'agent result schema must close additionalProperties');
|
|
151
|
-
for (const key of ['mission_id', 'agent_id', 'session_id', 'persona_id', 'task_slice_id', 'status', 'summary', 'findings', 'proposed_changes', 'changed_files', 'lease_compliance', 'recursion_guard', 'verification', 'blockers', 'confidence', 'handoff_notes']) {
|
|
152
|
-
assertGate(schema.required.includes(key), `agent result schema missing required ${key}`);
|
|
153
|
-
}
|
|
154
|
-
const validator = text('src/core/agents/agent-output-validator.ts');
|
|
155
|
-
const worker = text('src/core/agents/agent-worker-pipeline.ts');
|
|
156
|
-
assertGate(validator.includes('validateJsonSchemaRecursive'), 'agent output schema must use recursive validator');
|
|
157
|
-
assertGate(worker.includes('schema_invalid:'), 'agent output invalid result must block proof');
|
|
158
|
-
}
|
|
159
|
-
function assertProofAndTrustArtifacts() {
|
|
160
|
-
const proof = text('src/core/agents/agent-proof-evidence.ts');
|
|
161
|
-
const orchestrator = text('src/core/agents/agent-orchestrator.ts');
|
|
162
|
-
const writers = {
|
|
163
|
-
'agent-cleanup.json': 'writeAgentCleanupReport',
|
|
164
|
-
'agent-trust-report.json': 'writeAgentTrustReport',
|
|
165
|
-
'agent-wrongness-records.json': 'writeAgentWrongnessRecords',
|
|
166
|
-
'agent-output-tails.json': 'writeAgentOutputTailReport',
|
|
167
|
-
'agent-timeout-kill-report.json': 'killTimedOutAgentSessions'
|
|
168
|
-
};
|
|
169
|
-
for (const [token, writer] of Object.entries(writers)) {
|
|
170
|
-
assertGate(proof.includes(token), `agent proof missing ${token}`);
|
|
171
|
-
assertGate(orchestrator.includes(writer), `agent orchestrator does not write ${token}`);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
function assertPersonaAndCaps() {
|
|
175
|
-
const persona = text('src/core/agents/agent-persona.ts');
|
|
176
|
-
const roster = text('src/core/agents/agent-roster.ts');
|
|
177
|
-
const schema = text('src/core/agents/agent-schema.ts');
|
|
178
|
-
for (const role of ['architect', 'implementer', 'verifier', 'safety', 'integrator']) {
|
|
179
|
-
assertGate(persona.includes(role), `default persona missing ${role}`);
|
|
180
|
-
}
|
|
181
|
-
assertGate(schema.includes('DEFAULT_AGENT_COUNT = 5'), 'default agent count must be 5');
|
|
182
|
-
assertGate(schema.includes('MAX_AGENT_COUNT = 20'), 'max agent count must be 20');
|
|
183
|
-
assertGate(roster.includes('validatePersonaUniqueness'), 'persona uniqueness must be validated');
|
|
184
|
-
assertGate(roster.includes('buildAgentEffortPolicy') && text('src/core/agents/agent-effort-policy.ts').includes('escalation_triggers'), 'agent effort policy must be dynamic and recorded');
|
|
185
|
-
assertGate(roster.includes('exceeds max'), 'agent max cap must block overflow');
|
|
186
|
-
}
|
|
187
|
-
function assertReleaseScripts() {
|
|
188
|
-
const required = [
|
|
189
|
-
'agent:non-recursive-pipeline',
|
|
190
|
-
'agent:non-recursive-pipeline-report',
|
|
191
|
-
'agent:legacy-multiagent-removed',
|
|
192
|
-
'agent:central-ledger',
|
|
193
|
-
'agent:work-partition',
|
|
194
|
-
'agent:no-overlap-proof',
|
|
195
|
-
'agent:persona-uniqueness',
|
|
196
|
-
'agent:max-cap',
|
|
197
|
-
'agent:fake-backend-blackbox',
|
|
198
|
-
'agent:lifecycle-close',
|
|
199
|
-
'agent:output-schema',
|
|
200
|
-
'agent:lease-conflicts',
|
|
201
|
-
'agent:proof-graph',
|
|
202
|
-
'team:native-agent-backend',
|
|
203
|
-
'research:native-agent-backend',
|
|
204
|
-
'qa:native-agent-backend'
|
|
205
|
-
];
|
|
206
|
-
for (const name of required) {
|
|
207
|
-
assertGate(Boolean(pkg.scripts?.[name]), `package script missing ${name}`);
|
|
208
|
-
}
|
|
209
|
-
const releaseCheck = String(pkg.scripts?.['release:check'] || '');
|
|
210
|
-
const affectedReleaseCheck = String(pkg.scripts?.['release:check:affected'] || '');
|
|
211
|
-
const delegatesToParallel = releaseCheck.includes('release:check:parallel');
|
|
212
|
-
const delegatesToAffectedDag = releaseCheck.includes('release:check:affected')
|
|
213
|
-
&& affectedReleaseCheck.includes('release-gate-dag-runner')
|
|
214
|
-
&& /--preset\s+affected/.test(affectedReleaseCheck);
|
|
215
|
-
const delegatesDirectlyToDag = releaseCheck.includes('release-gate-dag-runner')
|
|
216
|
-
&& /--preset\s+(?:release|affected)/.test(releaseCheck);
|
|
217
|
-
assertGate(delegatesToParallel || delegatesToAffectedDag || delegatesDirectlyToDag, 'release:check must delegate to the parallel P0 DAG or v2 affected/release DAG', { release_check: releaseCheck, release_check_affected: affectedReleaseCheck });
|
|
218
|
-
}
|
|
219
|
-
function assertRouteNativeBlackbox(routeName) {
|
|
220
|
-
const routeFixtureArgs = ['--agents', '5', '--work-items', '8', '--target-active-slots', '5', '--minimum-work-items', '5', '--max-queue-expansion', '10', '--mock', '--json'];
|
|
221
|
-
if (routeName === 'team') {
|
|
222
|
-
const result = runSksJson(['team', 'native backend fixture', ...routeFixtureArgs, '--no-open-zellij']);
|
|
223
|
-
assertGate(result.mock === true, 'Team mock blackbox did not execute', result);
|
|
224
|
-
assertGate(result.native_agent_run?.proof?.ok === true, 'Team blackbox missing native agent proof', result.native_agent_run?.proof);
|
|
225
|
-
assertGate(!JSON.stringify(result).includes('analysis_scout'), 'Team runtime artifact leaked legacy analysis_scout');
|
|
226
|
-
}
|
|
227
|
-
if (routeName === 'research') {
|
|
228
|
-
const prepared = runSksJson(['research', 'prepare', 'native backend fixture', '--json']);
|
|
229
|
-
const result = runSksJson(['research', 'run', prepared.mission_id, ...routeFixtureArgs, '--native-proof-only']);
|
|
230
|
-
assertGate(result.ok === true, 'Research mock blackbox did not pass', result);
|
|
231
|
-
assertGate(result.gate?.gate?.native_agent_proof === true || result.gate?.native_agent_proof === true || result.proof?.ok === true, 'Research proof missing native agent evidence artifact', result);
|
|
232
|
-
assertGate(!JSON.stringify(result).includes('scout-ledger'), 'Research runtime artifact leaked scout-ledger as SSOT');
|
|
233
|
-
}
|
|
234
|
-
if (routeName === 'qa') {
|
|
235
|
-
const prepared = runSksJson(['qa-loop', 'prepare', 'native backend API fixture', '--json']);
|
|
236
|
-
const result = runSksJson(['qa-loop', 'run', prepared.mission_id, ...routeFixtureArgs, '--native-proof-only']);
|
|
237
|
-
assertGate(result.ok === true, 'QA mock blackbox did not pass', result);
|
|
238
|
-
assertGate(result.gate?.gate?.native_agent_proof === true || result.gate?.native_agent_proof === true || result.proof?.ok === true, 'QA proof missing native agent evidence artifact', result);
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
function assertBlackboxAgent() {
|
|
242
|
-
const result = runSksJson(['agent', 'run', 'fixture', '--mock', '--json']);
|
|
243
|
-
assertGate(result.ok === true, 'fake agent blackbox run failed', result);
|
|
244
|
-
assertGate(result.proof?.fake_backend_disclaimer, 'fake backend disclaimer missing', result.proof);
|
|
245
|
-
assertGate(result.proof?.all_sessions_closed === true, 'agent lifecycle close proof missing', result.proof);
|
|
246
|
-
assertGate(result.proof?.no_overlap_ok === true, 'agent no-overlap proof missing', result.proof);
|
|
247
|
-
assertGate(result.proof?.ledger_hash_chain_ok === true, 'agent ledger hash proof missing', result.proof);
|
|
248
|
-
}
|
|
249
|
-
assertAgentSurface();
|
|
250
|
-
assertReleaseScripts();
|
|
251
|
-
if (gate.includes('legacy-multiagent') || gate === 'team-native-agent-backend' || gate === 'research-native-agent-backend' || gate === 'qa-native-agent-backend')
|
|
252
|
-
assertLegacyMultiagentRemoved();
|
|
253
|
-
if (gate === 'team-native-agent-backend')
|
|
254
|
-
assertRouteNativeBlackbox('team');
|
|
255
|
-
if (gate === 'research-native-agent-backend')
|
|
256
|
-
assertRouteNativeBlackbox('research');
|
|
257
|
-
if (gate === 'qa-native-agent-backend')
|
|
258
|
-
assertRouteNativeBlackbox('qa');
|
|
259
|
-
if (gate.includes('non-recursive'))
|
|
260
|
-
assertNonRecursive();
|
|
261
|
-
if (gate.includes('central-ledger'))
|
|
262
|
-
assertCentralLedger();
|
|
263
|
-
if (gate.includes('work-partition') || gate.includes('no-overlap') || gate.includes('lease-conflicts'))
|
|
264
|
-
assertWorkPartition();
|
|
265
|
-
if (gate.includes('persona') || gate.includes('max-cap'))
|
|
266
|
-
assertPersonaAndCaps();
|
|
267
|
-
if (gate.includes('output-schema'))
|
|
268
|
-
assertOutputSchema();
|
|
269
|
-
if (gate.includes('proof-graph') || gate.includes('lifecycle-close') || gate.includes('lease-conflicts'))
|
|
270
|
-
assertProofAndTrustArtifacts();
|
|
271
|
-
if (gate.includes('fake-backend') || gate.includes('lifecycle-close') || gate.includes('proof-graph') || gate.includes('no-overlap') || gate.includes('lease-conflicts'))
|
|
272
|
-
assertBlackboxAgent();
|
|
273
|
-
emitGate(gate, { version: pkg.version, native_agent_kernel: true });
|
|
274
|
-
//# sourceMappingURL=agent-native-release-gate.js.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { assertGate, emitGate } from './sks-1-18-gate-lib.js';
|
|
3
|
-
import { CODEX_0142_FEATURE_KEYS, detectCodex0142Capability, writeCodex0142CapabilityArtifacts } from '../core/codex-control/codex-0142-capability.js';
|
|
4
|
-
const requireReal = process.argv.includes('--require-real') || process.env.SKS_REQUIRE_CODEX_0142 === '1';
|
|
5
|
-
if (!requireReal)
|
|
6
|
-
process.env.SKS_CODEX_0142_FAKE = '1';
|
|
7
|
-
const cap = await detectCodex0142Capability({ requireReal });
|
|
8
|
-
assertGate(cap.ok === true, 'Codex 0.142 capability probe must pass', cap);
|
|
9
|
-
assertGate(Object.keys(cap.feature_states).length === CODEX_0142_FEATURE_KEYS.length, 'Codex 0.142 feature count mismatch', cap);
|
|
10
|
-
assertGate(Object.values(cap.feature_states).every((state) => String(state.certainty) !== 'assumed_by_version'), 'Codex 0.142 capability must not use assumed_by_version evidence', cap);
|
|
11
|
-
if (requireReal) {
|
|
12
|
-
assertGate(cap.probe_mode === 'real-schema', 'Codex 0.142 require-real must use generated schema evidence', cap);
|
|
13
|
-
assertGate(cap.release_authorizing === true, 'Codex 0.142 require-real must be release-authorizing', cap);
|
|
14
|
-
await writeCodex0142CapabilityArtifacts(process.cwd(), { requireReal: true });
|
|
15
|
-
}
|
|
16
|
-
emitGate('codex:0142-capability', {
|
|
17
|
-
features: CODEX_0142_FEATURE_KEYS.length,
|
|
18
|
-
probe_mode: cap.probe_mode,
|
|
19
|
-
release_authorizing: cap.release_authorizing
|
|
20
|
-
});
|
|
21
|
-
//# sourceMappingURL=codex-0142-capability-check.js.map
|