sneakoscope 2.0.4 → 2.0.6
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 +18 -11
- 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 +78 -8
- package/dist/cli/install-helpers.js +23 -0
- package/dist/commands/codex-app.js +25 -3
- package/dist/commands/doctor.js +33 -4
- package/dist/commands/mad-sks.js +2 -2
- package/dist/core/agents/agent-orchestrator.js +22 -3
- package/dist/core/agents/agent-proof-evidence.js +59 -2
- package/dist/core/agents/agent-roster.js +35 -6
- package/dist/core/agents/agent-schema.js +1 -1
- package/dist/core/agents/agent-worker-pipeline.js +9 -1
- package/dist/core/agents/native-worker-backend-router.js +50 -10
- package/dist/core/agents/ollama-worker-config.js +164 -15
- package/dist/core/codex/codex-0-137-compat.js +119 -0
- package/dist/core/codex-app.js +124 -2
- package/dist/core/codex-control/codex-control-proof.js +4 -1
- package/dist/core/codex-control/codex-sdk-capability.js +1 -1
- package/dist/core/codex-control/codex-task-runner.js +329 -5
- package/dist/core/codex-control/python-codex-sdk-adapter.js +197 -0
- package/dist/core/codex-control/python-codex-sdk-event-translator.js +14 -0
- package/dist/core/commands/local-model-command.js +65 -19
- package/dist/core/commands/naruto-command.js +124 -8
- package/dist/core/commands/run-command.js +1 -1
- package/dist/core/doctor/doctor-readiness-matrix.js +21 -2
- package/dist/core/fsx.js +1 -1
- package/dist/core/hooks-runtime.js +2 -233
- package/dist/core/init.js +8 -8
- package/dist/core/local-llm/local-llm-backpressure.js +20 -0
- package/dist/core/local-llm/local-llm-capability.js +29 -0
- package/dist/core/local-llm/local-llm-client.js +100 -0
- package/dist/core/local-llm/local-llm-config.js +6 -1
- package/dist/core/local-llm/local-llm-context-cache.js +21 -0
- package/dist/core/local-llm/local-llm-control-adapter.js +101 -0
- package/dist/core/local-llm/local-llm-json-repair.js +52 -0
- package/dist/core/local-llm/local-llm-metrics.js +42 -0
- package/dist/core/local-llm/local-llm-ollama-client.js +67 -0
- package/dist/core/local-llm/local-llm-openai-compatible-client.js +30 -0
- package/dist/core/local-llm/local-llm-prompt-cache.js +12 -0
- package/dist/core/local-llm/local-llm-scheduler.js +29 -0
- package/dist/core/local-llm/local-llm-schema-enforcer.js +15 -0
- package/dist/core/local-llm/local-llm-smoke.js +83 -0
- package/dist/core/local-llm/local-llm-warmup.js +20 -0
- package/dist/core/local-llm/local-worker-eligibility.js +27 -0
- package/dist/core/naruto/hardware-capacity-probe.js +36 -0
- package/dist/core/naruto/naruto-active-pool.js +134 -0
- package/dist/core/naruto/naruto-backpressure.js +13 -0
- package/dist/core/naruto/naruto-concurrency-governor.js +65 -0
- package/dist/core/naruto/naruto-finalizer.js +18 -0
- package/dist/core/naruto/naruto-generation-scheduler.js +18 -0
- package/dist/core/naruto/naruto-gpt-final-pack.js +49 -0
- package/dist/core/naruto/naruto-parallel-patch-apply.js +95 -0
- package/dist/core/naruto/naruto-patch-transaction-batch.js +42 -0
- package/dist/core/naruto/naruto-role-policy.js +107 -0
- package/dist/core/naruto/naruto-verification-dag.js +42 -0
- package/dist/core/naruto/naruto-verification-pool.js +18 -0
- package/dist/core/naruto/naruto-work-graph.js +198 -0
- package/dist/core/naruto/naruto-work-item.js +40 -0
- package/dist/core/naruto/naruto-work-stealing.js +11 -0
- package/dist/core/naruto/resource-pressure-monitor.js +32 -0
- package/dist/core/pipeline/finalize-pipeline-result.js +58 -0
- package/dist/core/pipeline/gpt-final-required.js +12 -0
- package/dist/core/pipeline-internals/runtime-core.js +1 -1
- package/dist/core/ppt.js +31 -8
- package/dist/core/product-design-app-server.js +410 -0
- package/dist/core/product-design-plugin.js +139 -0
- package/dist/core/prompt/prompt-placeholder-guard.js +30 -0
- package/dist/core/router/capability-card.js +13 -0
- package/dist/core/router/route-cache.js +3 -0
- package/dist/core/router/ultra-router.js +2 -1
- package/dist/core/routes.js +12 -12
- package/dist/core/version.js +1 -1
- package/dist/core/zellij/zellij-lane-runtime.js +2 -2
- package/dist/core/zellij/zellij-naruto-dashboard.js +36 -0
- package/dist/core/zellij/zellij-worker-pane-manager.js +4 -4
- package/dist/scripts/blackbox-command-import-smoke.js +10 -1
- package/dist/scripts/check-package-boundary.js +12 -3
- package/dist/scripts/codex-0-137-compat-check.js +27 -0
- package/dist/scripts/codex-environment-scoped-approvals-check.js +10 -0
- package/dist/scripts/codex-plugin-list-json-check.js +8 -0
- package/dist/scripts/codex-thread-runtime-choice-check.js +10 -0
- package/dist/scripts/local-collab-all-pipelines-final-gpt-check.js +21 -0
- package/dist/scripts/local-llm-all-pipelines-check.js +11 -0
- package/dist/scripts/local-llm-cache-performance-check.js +10 -0
- package/dist/scripts/local-llm-capability-check.js +14 -0
- package/dist/scripts/local-llm-smoke-check.js +23 -0
- package/dist/scripts/local-llm-structured-output-check.js +11 -0
- package/dist/scripts/local-llm-throughput-check.js +10 -0
- package/dist/scripts/local-llm-tool-call-repair-check.js +10 -0
- package/dist/scripts/local-llm-warmup-check.js +11 -0
- package/dist/scripts/naruto-active-pool-check.js +39 -0
- package/dist/scripts/naruto-concurrency-governor-check.js +52 -0
- package/dist/scripts/naruto-gpt-final-pack-check.js +34 -0
- package/dist/scripts/naruto-parallel-patch-apply-check.js +41 -0
- package/dist/scripts/naruto-readonly-routing-check.js +116 -0
- package/dist/scripts/naruto-real-local-gpt-final-smoke.js +16 -0
- package/dist/scripts/naruto-role-distribution-check.js +23 -0
- package/dist/scripts/naruto-shadow-clone-swarm-check.js +13 -0
- package/dist/scripts/naruto-verification-pool-check.js +36 -0
- package/dist/scripts/naruto-work-graph-check.js +24 -0
- package/dist/scripts/naruto-zellij-massive-ui-check.js +23 -0
- package/dist/scripts/product-design-auto-install-check.js +119 -0
- package/dist/scripts/product-design-plugin-routing-check.js +101 -0
- package/dist/scripts/prompt-placeholder-guard-check.js +33 -0
- package/dist/scripts/python-codex-sdk-all-pipelines-check.js +47 -0
- package/dist/scripts/python-codex-sdk-capability-check.js +75 -0
- package/dist/scripts/python-codex-sdk-sandbox-policy-check.js +10 -0
- package/dist/scripts/python-codex-sdk-stream-bridge-check.js +12 -0
- package/dist/scripts/release-parallel-check.js +16 -2
- package/dist/scripts/release-provenance-check.js +21 -0
- package/dist/scripts/release-real-check.js +5 -0
- package/dist/scripts/zellij-worker-pane-manager-check.js +1 -1
- package/package.json +36 -4
- package/schemas/local-llm/local-model-config.schema.json +74 -0
- package/schemas/naruto/naruto-concurrency-governor.schema.json +21 -0
- package/schemas/naruto/naruto-work-graph.schema.json +22 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
export const PRODUCT_DESIGN_REQUIRED_SKILLS = Object.freeze([
|
|
2
|
+
'audit',
|
|
3
|
+
'design-qa',
|
|
4
|
+
'get-context',
|
|
5
|
+
'ideate',
|
|
6
|
+
'image-to-code',
|
|
7
|
+
'prototype',
|
|
8
|
+
'research',
|
|
9
|
+
'share',
|
|
10
|
+
'url-to-code',
|
|
11
|
+
'user-context'
|
|
12
|
+
]);
|
|
13
|
+
export const PRODUCT_DESIGN_LEGACY_DESIGN_FALLBACK_SKILLS = Object.freeze([
|
|
14
|
+
'design-artifact-expert',
|
|
15
|
+
'design-ui-editor',
|
|
16
|
+
'design-system-builder',
|
|
17
|
+
'getdesign-reference'
|
|
18
|
+
]);
|
|
19
|
+
export const PRODUCT_DESIGN_PLUGIN = Object.freeze({
|
|
20
|
+
id: 'product-design@openai-curated-remote',
|
|
21
|
+
name: 'product-design',
|
|
22
|
+
marketplace: 'openai-curated-remote',
|
|
23
|
+
marketplace_kind: 'vertical',
|
|
24
|
+
remote_plugin_id: 'Plugin_fa77aec24fc08191bc6e57f377126d76',
|
|
25
|
+
display_name: 'Product Design',
|
|
26
|
+
app_server: {
|
|
27
|
+
read_params: {
|
|
28
|
+
remoteMarketplaceName: 'openai-curated-remote',
|
|
29
|
+
pluginName: 'Plugin_fa77aec24fc08191bc6e57f377126d76'
|
|
30
|
+
},
|
|
31
|
+
install_params: {
|
|
32
|
+
remoteMarketplaceName: 'openai-curated-remote',
|
|
33
|
+
pluginName: 'Plugin_fa77aec24fc08191bc6e57f377126d76'
|
|
34
|
+
},
|
|
35
|
+
name_lookup_params: {
|
|
36
|
+
remoteMarketplaceName: 'openai-curated-remote',
|
|
37
|
+
pluginName: 'product-design'
|
|
38
|
+
},
|
|
39
|
+
list_params: {
|
|
40
|
+
marketplaceKinds: ['vertical']
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
export const PRODUCT_DESIGN_PIPELINE_STAGES = Object.freeze([
|
|
45
|
+
{
|
|
46
|
+
stage: 'context_intake',
|
|
47
|
+
skills: ['get-context', 'user-context'],
|
|
48
|
+
routes: ['Team', 'PPT', 'ImageUXReview'],
|
|
49
|
+
purpose: 'capture product/user/design context before local design.md fallback is hydrated'
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
stage: 'research_and_ideation',
|
|
53
|
+
skills: ['research', 'ideate'],
|
|
54
|
+
routes: ['Team', 'PPT'],
|
|
55
|
+
purpose: 'ground competitive, audience, and concept exploration before visual decisions'
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
stage: 'artifact_generation',
|
|
59
|
+
skills: ['prototype', 'image-to-code', 'url-to-code'],
|
|
60
|
+
routes: ['Team', 'PPT'],
|
|
61
|
+
purpose: 'turn sealed context, screenshots, images, or URLs into prototype/source direction'
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
stage: 'design_review',
|
|
65
|
+
skills: ['audit', 'design-qa'],
|
|
66
|
+
routes: ['Team', 'PPT', 'ImageUXReview', 'QALoop'],
|
|
67
|
+
purpose: 'audit hierarchy, accessibility, responsiveness, polish, and route-specific UX risk'
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
stage: 'delivery',
|
|
71
|
+
skills: ['share'],
|
|
72
|
+
routes: ['PPT', 'Team'],
|
|
73
|
+
purpose: 'package or hand off design artifacts when the Codex App plugin exposes sharing'
|
|
74
|
+
}
|
|
75
|
+
]);
|
|
76
|
+
export function productDesignPluginPolicyText() {
|
|
77
|
+
const stages = PRODUCT_DESIGN_PIPELINE_STAGES
|
|
78
|
+
.map((entry) => `${entry.stage}=${entry.skills.join('+')}`)
|
|
79
|
+
.join('; ');
|
|
80
|
+
return `Product Design plugin policy: design-related routes must prefer the Codex App Product Design plugin (${PRODUCT_DESIGN_PLUGIN.id}) from the remote vertical marketplace ${PRODUCT_DESIGN_PLUGIN.marketplace}. Discovery must not rely only on \`codex plugin list\`, because vertical marketplace plugins can be omitted from the local/default catalog; when Product Design is not ready, first run the app-server Product Design ensure path: plugin/read with remote plugin id params ${JSON.stringify(PRODUCT_DESIGN_PLUGIN.app_server.read_params)}, plugin/list with ${JSON.stringify(PRODUCT_DESIGN_PLUGIN.app_server.list_params)} if the id must be rediscovered, and plugin/install with ${JSON.stringify(PRODUCT_DESIGN_PLUGIN.app_server.install_params)} before falling back to legacy design.md skills. Expected ready evidence is installed=true, enabled=true, displayName/name Product Design, remotePluginId ${PRODUCT_DESIGN_PLUGIN.remote_plugin_id}, and skills ${PRODUCT_DESIGN_REQUIRED_SKILLS.join(', ')}. Pipeline mapping: ${stages}. Legacy local design helpers (${PRODUCT_DESIGN_LEGACY_DESIGN_FALLBACK_SKILLS.join(', ')}) are compatibility fallback only when Product Design auto-install/ensure is unavailable or still fails, or when the route explicitly needs an existing project-local design.md; do not auto-create a heavy design.md as the first design step when Product Design is ready.`;
|
|
81
|
+
}
|
|
82
|
+
export function normalizeProductDesignPluginEvidence(input = {}) {
|
|
83
|
+
const detail = input?.plugin || input?.data?.plugin || input;
|
|
84
|
+
const summary = detail?.summary || detail;
|
|
85
|
+
const skills = Array.isArray(detail?.skills)
|
|
86
|
+
? detail.skills.map((skill) => String(skill?.name || skill || '')).filter(Boolean)
|
|
87
|
+
: [];
|
|
88
|
+
const id = String(summary?.id || detail?.id || '');
|
|
89
|
+
const name = String(summary?.name || detail?.name || '');
|
|
90
|
+
const displayName = String(summary?.displayName || detail?.displayName || summary?.display_name || detail?.display_name || name || '');
|
|
91
|
+
const marketplaceName = String(detail?.marketplaceName || input?.marketplaceName || summary?.marketplaceName || '');
|
|
92
|
+
const remotePluginId = String(summary?.remotePluginId || detail?.remotePluginId || summary?.remote_plugin_id || detail?.remote_plugin_id || '');
|
|
93
|
+
const installed = summary?.installed === true || detail?.installed === true;
|
|
94
|
+
const enabled = summary?.enabled === true || detail?.enabled === true;
|
|
95
|
+
const missingSkills = PRODUCT_DESIGN_REQUIRED_SKILLS.filter((skill) => !skills.includes(skill));
|
|
96
|
+
const identityOk = id === PRODUCT_DESIGN_PLUGIN.id
|
|
97
|
+
|| name === PRODUCT_DESIGN_PLUGIN.name
|
|
98
|
+
|| displayName === PRODUCT_DESIGN_PLUGIN.display_name
|
|
99
|
+
|| remotePluginId === PRODUCT_DESIGN_PLUGIN.remote_plugin_id;
|
|
100
|
+
const marketplaceOk = !marketplaceName || marketplaceName === PRODUCT_DESIGN_PLUGIN.marketplace;
|
|
101
|
+
const ok = Boolean(installed && enabled && identityOk && marketplaceOk && missingSkills.length === 0);
|
|
102
|
+
return {
|
|
103
|
+
schema: 'sks.product-design-plugin-evidence.v1',
|
|
104
|
+
ok,
|
|
105
|
+
id,
|
|
106
|
+
name,
|
|
107
|
+
display_name: displayName,
|
|
108
|
+
marketplace_name: marketplaceName,
|
|
109
|
+
remote_plugin_id: remotePluginId,
|
|
110
|
+
installed,
|
|
111
|
+
enabled,
|
|
112
|
+
skills,
|
|
113
|
+
missing_skills: missingSkills,
|
|
114
|
+
expected: PRODUCT_DESIGN_PLUGIN,
|
|
115
|
+
blockers: ok ? [] : [
|
|
116
|
+
...(!installed ? ['product_design_not_installed'] : []),
|
|
117
|
+
...(!enabled ? ['product_design_not_enabled'] : []),
|
|
118
|
+
...(!identityOk ? ['product_design_identity_unverified'] : []),
|
|
119
|
+
...(!marketplaceOk ? ['product_design_wrong_marketplace'] : []),
|
|
120
|
+
...(missingSkills.length ? ['product_design_skills_missing'] : [])
|
|
121
|
+
]
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
export function productDesignPluginVisibilityFromCodexPluginList(input = {}) {
|
|
125
|
+
const text = JSON.stringify(input || {});
|
|
126
|
+
const listed = text.includes(PRODUCT_DESIGN_PLUGIN.id)
|
|
127
|
+
|| text.includes(PRODUCT_DESIGN_PLUGIN.name)
|
|
128
|
+
|| text.includes(PRODUCT_DESIGN_PLUGIN.remote_plugin_id);
|
|
129
|
+
return {
|
|
130
|
+
schema: 'sks.product-design-plugin-list-visibility.v1',
|
|
131
|
+
listed,
|
|
132
|
+
detector: 'codex plugin list --json',
|
|
133
|
+
requires_remote_vertical_lookup: !listed,
|
|
134
|
+
remote_marketplace: PRODUCT_DESIGN_PLUGIN.marketplace,
|
|
135
|
+
app_server_read_params: PRODUCT_DESIGN_PLUGIN.app_server.read_params,
|
|
136
|
+
app_server_list_params: PRODUCT_DESIGN_PLUGIN.app_server.list_params
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=product-design-plugin.js.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const PLACEHOLDER_PATTERNS = [
|
|
2
|
+
/@filename\b/i,
|
|
3
|
+
/<file>/i,
|
|
4
|
+
/\bTODO_PATH\b/i,
|
|
5
|
+
/\bINSERT_PATH_HERE\b/i,
|
|
6
|
+
/\/path\/to\/file\b/i
|
|
7
|
+
];
|
|
8
|
+
export function checkPromptPlaceholders(input = {}) {
|
|
9
|
+
const prompt = String(input.prompt || '');
|
|
10
|
+
const writeCapable = input.writeCapable === true;
|
|
11
|
+
const placeholders = PLACEHOLDER_PATTERNS
|
|
12
|
+
.filter((pattern) => pattern.test(prompt))
|
|
13
|
+
.map((pattern) => pattern.source);
|
|
14
|
+
const emptyTargetPaths = writeCapable && (!Array.isArray(input.targetPaths) || input.targetPaths.length === 0);
|
|
15
|
+
const blockers = writeCapable ? [
|
|
16
|
+
...placeholders.map((placeholder) => `unresolved_prompt_placeholder:${placeholder}`),
|
|
17
|
+
...(emptyTargetPaths ? ['write_capable_prompt_target_paths_empty'] : [])
|
|
18
|
+
] : [];
|
|
19
|
+
const warnings = writeCapable ? [] : placeholders.map((placeholder) => `readonly_prompt_placeholder_warning:${placeholder}`);
|
|
20
|
+
return {
|
|
21
|
+
schema: 'sks.prompt-placeholder-guard.v1',
|
|
22
|
+
ok: blockers.length === 0,
|
|
23
|
+
write_capable: writeCapable,
|
|
24
|
+
placeholders,
|
|
25
|
+
empty_target_paths: emptyTargetPaths,
|
|
26
|
+
blockers,
|
|
27
|
+
warnings
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=prompt-placeholder-guard.js.map
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
export const DEFAULT_CAPABILITY_CARDS = [
|
|
2
|
+
{
|
|
3
|
+
id: 'local-llm-worker',
|
|
4
|
+
tier: 'worker',
|
|
5
|
+
supports_images: false,
|
|
6
|
+
supports_write: true,
|
|
7
|
+
supports_research: false,
|
|
8
|
+
reliability: 0.78,
|
|
9
|
+
latency_cost: 1,
|
|
10
|
+
token_cost: 0,
|
|
11
|
+
mutation_risk_cost: 2,
|
|
12
|
+
model_price_cost: 0,
|
|
13
|
+
queue_pressure_cost: 2
|
|
14
|
+
},
|
|
2
15
|
{
|
|
3
16
|
id: 'fast-worker',
|
|
4
17
|
tier: 'worker',
|
|
@@ -8,6 +8,9 @@ export function codexRouteCacheKey(input) {
|
|
|
8
8
|
files: input.inputFiles || [],
|
|
9
9
|
images: (input.inputImages || []).length,
|
|
10
10
|
sandbox: input.sandboxPolicy,
|
|
11
|
+
allow_local_llm: input.allowLocalLlm === true,
|
|
12
|
+
backend_preference: input.backendPreference || [],
|
|
13
|
+
local_llm_policy: input.localLlmPolicy || null,
|
|
11
14
|
write_paths: input.requestedScopeContract?.write_paths || [],
|
|
12
15
|
allowed_paths: input.requestedScopeContract?.allowed_paths || []
|
|
13
16
|
}));
|
|
@@ -8,7 +8,8 @@ export function routeCodexTask(input, cards = DEFAULT_CAPABILITY_CARDS) {
|
|
|
8
8
|
return { ...cached, cache_hit: true };
|
|
9
9
|
const classification = classifyCodexTask(input);
|
|
10
10
|
const hardFilters = [];
|
|
11
|
-
const
|
|
11
|
+
const availableCards = input.allowLocalLlm === true ? cards : cards.filter((card) => card.id !== 'local-llm-worker');
|
|
12
|
+
const scored = availableCards.map((card) => {
|
|
12
13
|
const score = scoreCapabilityCard(card, classification);
|
|
13
14
|
if (score === 0)
|
|
14
15
|
hardFilters.push(card.id);
|
package/dist/core/routes.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { PRODUCT_DESIGN_LEGACY_DESIGN_FALLBACK_SKILLS, PRODUCT_DESIGN_PLUGIN, PRODUCT_DESIGN_REQUIRED_SKILLS, productDesignPluginPolicyText } from './product-design-plugin.js';
|
|
2
|
+
export { productDesignPluginPolicyText };
|
|
1
3
|
const REFLECTION_SKILL_NAME = 'reflection';
|
|
2
4
|
export const SOLUTION_SCOUT_SKILL_NAME = 'solution-scout';
|
|
3
5
|
export const SOLUTION_SCOUT_STAGE_ID = 'solution_scout';
|
|
@@ -119,7 +121,7 @@ export const DESIGN_SYSTEM_SSOT = {
|
|
|
119
121
|
id: 'design-system-ssot',
|
|
120
122
|
authority_file: 'design.md',
|
|
121
123
|
builder_prompt: 'docs/Design-Sys-Prompt.md',
|
|
122
|
-
rule:
|
|
124
|
+
rule: `Product Design plugin (${PRODUCT_DESIGN_PLUGIN.id}) is the primary design authority when available. design.md is a project-local cache/compatibility authority only when already present or when Product Design is unavailable; if fallback is needed, synthesize it from the builder prompt plus approved source inputs and fuse external references into design.md or route artifacts instead of keeping parallel authorities.`
|
|
123
125
|
};
|
|
124
126
|
export const AWESOME_DESIGN_MD_REFERENCE = {
|
|
125
127
|
id: 'awesome-design-md',
|
|
@@ -135,6 +137,7 @@ export const PPT_PIPELINE_SKILL_ALLOWLIST = Object.freeze([
|
|
|
135
137
|
REFLECTION_SKILL_NAME,
|
|
136
138
|
'honest-mode'
|
|
137
139
|
]);
|
|
140
|
+
export const PRODUCT_DESIGN_PLUGIN_TOOL_ALLOWLIST = PRODUCT_DESIGN_REQUIRED_SKILLS;
|
|
138
141
|
export const PPT_CONDITIONAL_SKILL_ALLOWLIST = Object.freeze([]);
|
|
139
142
|
export const PPT_PIPELINE_MCP_ALLOWLIST = Object.freeze([
|
|
140
143
|
{
|
|
@@ -146,13 +149,13 @@ export function pptPipelineAllowlistPolicyText() {
|
|
|
146
149
|
const conditionalSkills = PPT_CONDITIONAL_SKILL_ALLOWLIST.length
|
|
147
150
|
? PPT_CONDITIONAL_SKILL_ALLOWLIST.map((entry) => `${entry.skill}=${entry.condition}`).join('; ')
|
|
148
151
|
: 'none';
|
|
149
|
-
return `PPT pipeline allowlist: during $PPT design/render work, ignore installed skills and MCPs that are not explicitly part of the $PPT pipeline. The purpose is to prevent AI-like generic presentation design: decorative gradients, nested cards, vague SaaS visuals, and style choices not grounded in the audience, source material, getdesign reference, or the project design
|
|
152
|
+
return `PPT pipeline allowlist: during $PPT design/render work, ignore installed skills and MCPs that are not explicitly part of the $PPT pipeline. The purpose is to prevent AI-like generic presentation design: decorative gradients, nested cards, vague SaaS visuals, and style choices not grounded in the audience, source material, Product Design plugin evidence, getdesign fallback reference, or the project design cache. Required SKS skills are ${PPT_PIPELINE_SKILL_ALLOWLIST.join(', ')}. Product Design plugin tools are allowed and preferred for design work: ${PRODUCT_DESIGN_PLUGIN_TOOL_ALLOWLIST.join(', ')}. Use ${PRODUCT_DESIGN_PLUGIN.id} first for get-context/user-context intake, research/ideate exploration, prototype/image-to-code/url-to-code artifact direction, audit/design-qa review, and share handoff when available. The imagegen skill is required for $PPT so Codex App can invoke official built-in $imagegen/gpt-image-2 for every generated raster asset or generated visual-review image; do not route PPT imagery through direct API fallback. Do not use generic design skills such as ${PRODUCT_DESIGN_LEGACY_DESIGN_FALLBACK_SKILLS.join(', ')} for $PPT just because they are installed. $PPT design must use Product Design plugin first; if unavailable, use getdesign-reference plus the built-in PPT design implementation pipeline: existing ${DESIGN_SYSTEM_SSOT.authority_file} when present, ${DESIGN_SYSTEM_SSOT.builder_prompt} as fallback builder prompt when missing, and route-local ppt-style-tokens.json as the fused design projection. Conditional skills/MCPs are allowed only when their condition is sealed in the contract: ${conditionalSkills}; ${PPT_PIPELINE_MCP_ALLOWLIST.map((entry) => `${entry.mcp}=${entry.condition}`).join('; ')}. Fact, image, and review evidence are first-class artifacts: gather user-provided context and required web/Context7 evidence into ppt-fact-ledger.json, block unsupported critical claims, plan required image resources through ppt-image-asset-ledger.json, then run a bounded review loop recorded in ppt-review-policy.json, ppt-review-ledger.json, and ppt-iteration-report.json. Required raster asset or generated visual-review evidence must come from Codex App $imagegen/gpt-image-2; direct API fallback, placeholder files, and prose-only substitutes do not satisfy the route gate. The review loop caps full-deck passes at 2, slide retries at 2, requires P0/P1 issue count to be zero, targets score >= 0.88, and stops when improvement delta is below 0.03 or evidence is missing. For Codex App visual critique, invoke $imagegen/gpt-image-2 (${CODEX_APP_IMAGE_GENERATION_DOC_URL}) when required; never simulate missing gpt-image-2 output. If required image-review evidence is unavailable, record the blocker instead of passing the gate. ${productDesignPluginPolicyText()} ${CODEX_IMAGEGEN_REQUIRED_POLICY}`;
|
|
150
153
|
}
|
|
151
154
|
export function getdesignReferencePolicyText() {
|
|
152
|
-
return `Design
|
|
155
|
+
return `Design authority policy: ${PRODUCT_DESIGN_PLUGIN.id} is the first design surface for Codex App design routes. ${DESIGN_SYSTEM_SSOT.authority_file} is a project-local design cache/compatibility authority when already present or when Product Design is unavailable. If fallback creation is needed, create or update it through ${DESIGN_SYSTEM_SSOT.builder_prompt}; getdesign.md (${GETDESIGN_REFERENCE.url}), its official docs, and curated DESIGN.md examples at ${AWESOME_DESIGN_MD_REFERENCE.url} are source inputs to fuse into that fallback SSOT or into route-local style tokens, not parallel authorities. Prefer Product Design plugin tools for design context, ideation, prototype, audit, and QA; use the generated getdesign-reference skill only as fallback/source grounding. Do not claim an official getdesign MCP server is configured unless a current official MCP surface is actually available. ${productDesignPluginPolicyText()}`;
|
|
153
156
|
}
|
|
154
157
|
export function imageUxReviewPipelinePolicyText() {
|
|
155
|
-
return `Image UX review pipeline: the core mechanism is not text-only screenshot critique. Capture or receive source UI screenshots; web/browser/webapp capture must pass the Codex Chrome Extension readiness gate first, while Computer Use is only for native Mac/non-web app surfaces. Then use Codex App imagegen/$imagegen with gpt-image-2 (${CODEX_APP_IMAGE_GENERATION_DOC_URL}) to create new annotated review images from those screenshots as reference inputs. The generated review image must visibly mark numbered callouts, P0/P1/P2/P3 labels, eye-flow, hierarchy, contrast, alignment, density, affordance problems, and a small corrected mini-comp or before/after strip when useful. Then analyze that generated review image with vision/OCR and convert the visible callouts into image-ux-issue-ledger.json rows. Missing generated review images block full Image UX verification, but the route may close as verified_partial/reference-only when source screenshots plus hashes, docs evidence, source Image Voxel anchors, and Honest Mode evidence exist and the gate records that no annotated image, callout extraction, or full UX review evidence exists. Never pass this route from a direct API fallback, hand-written text-only substitute, placeholder asset, or fabricated ledger. ${CODEX_WEB_VERIFICATION_POLICY} ${CODEX_IMAGEGEN_REQUIRED_POLICY}`;
|
|
158
|
+
return `Image UX review pipeline: the core mechanism is not text-only screenshot critique. Capture or receive source UI screenshots; web/browser/webapp capture must pass the Codex Chrome Extension readiness gate first, while Computer Use is only for native Mac/non-web app surfaces. Use Product Design plugin audit/design-qa when available to structure UX issue framing, but still require the imagegen visual evidence route. Then use Codex App imagegen/$imagegen with gpt-image-2 (${CODEX_APP_IMAGE_GENERATION_DOC_URL}) to create new annotated review images from those screenshots as reference inputs. The generated review image must visibly mark numbered callouts, P0/P1/P2/P3 labels, eye-flow, hierarchy, contrast, alignment, density, affordance problems, and a small corrected mini-comp or before/after strip when useful. Then analyze that generated review image with vision/OCR and convert the visible callouts into image-ux-issue-ledger.json rows. Missing generated review images block full Image UX verification, but the route may close as verified_partial/reference-only when source screenshots plus hashes, docs evidence, source Image Voxel anchors, and Honest Mode evidence exist and the gate records that no annotated image, callout extraction, or full UX review evidence exists. Never pass this route from a direct API fallback, hand-written text-only substitute, placeholder asset, or fabricated ledger. ${productDesignPluginPolicyText()} ${CODEX_WEB_VERIFICATION_POLICY} ${CODEX_IMAGEGEN_REQUIRED_POLICY}`;
|
|
156
159
|
}
|
|
157
160
|
export const RECOMMENDED_SKILLS = [
|
|
158
161
|
'reasoning-router',
|
|
@@ -162,9 +165,6 @@ export const RECOMMENDED_SKILLS = [
|
|
|
162
165
|
'seo-geo-optimizer',
|
|
163
166
|
'autoresearch-loop',
|
|
164
167
|
'performance-evaluator',
|
|
165
|
-
'design-artifact-expert',
|
|
166
|
-
'design-system-builder',
|
|
167
|
-
'design-ui-editor',
|
|
168
168
|
'getdesign-reference',
|
|
169
169
|
'imagegen',
|
|
170
170
|
'imagegen-source-scout',
|
|
@@ -371,16 +371,16 @@ export const ROUTES = [
|
|
|
371
371
|
id: 'Naruto',
|
|
372
372
|
command: '$Naruto',
|
|
373
373
|
mode: 'NARUTO',
|
|
374
|
-
route: '
|
|
375
|
-
description: '
|
|
374
|
+
route: 'hardware-safe massive parallel work swarm',
|
|
375
|
+
description: '$Naruto mode launches a hardware-safe massive parallel work swarm. Clones may implement, modify, verify, test, research, document, and resolve conflicts according to role and lease policy; write-capable output is accepted only through patch envelopes, verification DAG, mutation guard, and GPT final arbiter.',
|
|
376
376
|
requiredSkills: ['team', 'pipeline-runner', 'prompt-pipeline', 'honest-mode'],
|
|
377
377
|
dollarAliases: ['$ShadowClone', '$Kagebunshin'],
|
|
378
378
|
appSkillAliases: ['shadow-clone', 'kage-bunshin'],
|
|
379
|
-
lifecycle: ['clone_roster_build', '
|
|
379
|
+
lifecycle: ['clone_roster_build', 'massive_work_graph', 'hardware_safe_governor', 'dynamic_active_pool', 'lease_based_write_swarm', 'parallel_verification_dag', 'gpt_final_arbiter_pack', 'per_clone_proof', 'session_cleanup', 'honest_mode'],
|
|
380
380
|
context7Policy: 'optional',
|
|
381
381
|
reasoningPolicy: 'high',
|
|
382
382
|
stopGate: 'team-gate.json',
|
|
383
|
-
cliEntrypoint: 'sks naruto run "task" [--clones N] [--backend codex-
|
|
383
|
+
cliEntrypoint: 'sks naruto run "task" [--clones N] [--backend codex-sdk|fake|ollama] [--parallel-write] | sks naruto status',
|
|
384
384
|
examples: ['$Naruto run sweep the codebase for TODO comments with 50 clones', '$ShadowClone --clones 100 fan out and draft tests for every module']
|
|
385
385
|
},
|
|
386
386
|
{
|
|
@@ -626,7 +626,7 @@ export const COMMAND_CATALOG = [
|
|
|
626
626
|
{ name: 'update', usage: 'sks update check|now [--version <version>] [--json] [--dry-run]', description: 'Check for SKS updates or install the requested package version through npm global mode.' },
|
|
627
627
|
{ name: 'deps', usage: 'sks deps check [--json] [--yes]', description: 'Check Node/npm, Codex CLI, and Zellij readiness; pass --yes to repair missing Codex CLI/Zellij tooling when supported.' },
|
|
628
628
|
{ name: 'codex', usage: 'sks codex compatibility|version|doctor|schema [--json]', description: 'Check Codex CLI rust-v0.136.0 compatibility, installed version, 0.136 capabilities, inherited 0.135/0.134/0.133 behavior, and vendored hook schema snapshot freshness.' },
|
|
629
|
-
{ name: 'codex-app', usage: 'sks codex-app [check|chrome-extension|pat status|remote-control]', description: 'Check Codex App install, Codex Chrome Extension web verification readiness, PAT-safe status, first-party MCP/plugin readiness, and Codex CLI 0.130.0+ remote-control availability.' },
|
|
629
|
+
{ name: 'codex-app', usage: 'sks codex-app [check|product-design|product-design --check-only|ensure-product-design|chrome-extension|pat status|remote-control]', description: 'Check Codex App install, Product Design plugin auto-install readiness, Codex Chrome Extension web verification readiness, PAT-safe status, first-party MCP/plugin readiness, and Codex CLI 0.130.0+ remote-control availability.' },
|
|
630
630
|
{ name: 'hooks', usage: 'sks hooks explain|status|trust-report|replay|codex-validate|warning-check ... [--json]', description: 'Explain Codex hook events, validate vendored latest 10-event output schemas, replay fixtures, and enforce warning-zero SKS hook policies under the 0.134 compatibility matrix.' },
|
|
631
631
|
{ name: 'codex-lb', usage: 'sks codex-lb status|health|metrics|doctor|circuit|repair|setup ...', description: 'Configure, health-check, repair, and record circuit evidence for codex-lb provider auth without confusing ChatGPT OAuth and proxy keys.' },
|
|
632
632
|
{ name: 'auth', usage: 'sks auth status|health|repair|setup --host <domain> --api-key <key>', description: 'Shortcut for codex-lb provider auth status, health, repair, and setup commands.' },
|
package/dist/core/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const PACKAGE_VERSION = '2.0.
|
|
1
|
+
export const PACKAGE_VERSION = '2.0.6';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
|
@@ -176,10 +176,10 @@ export function extractZellijPaneIdFromOutput(text) {
|
|
|
176
176
|
}
|
|
177
177
|
const lines = raw.split(/\r?\n/).map((line) => line.trim()).filter(Boolean);
|
|
178
178
|
for (const line of lines.slice().reverse()) {
|
|
179
|
-
const direct = line.match(/^(?:pane[_ -]?id[:=]\s*)?([0-9]+)$/i);
|
|
179
|
+
const direct = line.match(/^(?:pane[_ -]?id[:=]\s*)?([0-9]+|terminal_[0-9]+)$/i);
|
|
180
180
|
if (direct?.[1])
|
|
181
181
|
return direct[1];
|
|
182
|
-
const embedded = line.match(/\bpane[_ -]?id[:=]\s*([0-9]+)\b/i);
|
|
182
|
+
const embedded = line.match(/\bpane[_ -]?id[:=]\s*([0-9]+|terminal_[0-9]+)\b/i);
|
|
183
183
|
if (embedded?.[1])
|
|
184
184
|
return embedded[1];
|
|
185
185
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export function planNarutoZellijDashboard(input) {
|
|
2
|
+
const targetActiveWorkers = Math.max(1, Math.floor(Number(input.targetActiveWorkers || 1)));
|
|
3
|
+
const visiblePaneCap = Math.max(1, Math.floor(Number(input.visiblePaneCap || 12)));
|
|
4
|
+
const visibleWorkerPanes = Math.min(targetActiveWorkers, visiblePaneCap);
|
|
5
|
+
const headlessWorkers = Math.max(0, targetActiveWorkers - visibleWorkerPanes);
|
|
6
|
+
const backend = input.backend || 'codex-sdk';
|
|
7
|
+
const roles = input.roles && input.roles.length ? input.roles : ['implementer', 'modifier', 'verifier', 'test_writer'];
|
|
8
|
+
const paneTitles = Array.from({ length: visibleWorkerPanes }, (_, index) => {
|
|
9
|
+
const slot = `slot-${String(index + 1).padStart(3, '0')}`;
|
|
10
|
+
const role = roles[index % roles.length] || 'worker';
|
|
11
|
+
return `${slot}/gen-1 · ${role} · ${backend} · active`;
|
|
12
|
+
});
|
|
13
|
+
const blockers = [
|
|
14
|
+
...(visibleWorkerPanes > visiblePaneCap ? ['naruto_zellij_visible_panes_exceed_cap'] : []),
|
|
15
|
+
...(headlessWorkers < 0 ? ['naruto_zellij_headless_negative'] : [])
|
|
16
|
+
];
|
|
17
|
+
return {
|
|
18
|
+
schema: 'sks.zellij-naruto-dashboard.v1',
|
|
19
|
+
target_active_workers: targetActiveWorkers,
|
|
20
|
+
visible_pane_cap: visiblePaneCap,
|
|
21
|
+
visible_worker_panes: visibleWorkerPanes,
|
|
22
|
+
headless_workers: headlessWorkers,
|
|
23
|
+
dashboard: {
|
|
24
|
+
active: targetActiveWorkers,
|
|
25
|
+
visible: visibleWorkerPanes,
|
|
26
|
+
headless: headlessWorkers,
|
|
27
|
+
completed: Math.max(0, Math.floor(Number(input.completed || 0))),
|
|
28
|
+
failed: Math.max(0, Math.floor(Number(input.failed || 0))),
|
|
29
|
+
backpressure: input.backpressure || 'normal'
|
|
30
|
+
},
|
|
31
|
+
pane_titles: paneTitles,
|
|
32
|
+
ok: blockers.length === 0,
|
|
33
|
+
blockers
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=zellij-naruto-dashboard.js.map
|
|
@@ -9,10 +9,10 @@ export const ZELLIJ_WORKER_PANE_EVENT_SCHEMA = 'sks.zellij-worker-pane-event.v1'
|
|
|
9
9
|
export function buildWorkerPaneName(slotId, generationIndex) {
|
|
10
10
|
return `${slotId}/gen-${Math.max(1, Math.floor(Number(generationIndex) || 1))}`;
|
|
11
11
|
}
|
|
12
|
-
export function buildWorkerPaneTitle(slotId, generationIndex, context, serviceTier) {
|
|
12
|
+
export function buildWorkerPaneTitle(slotId, generationIndex, context, serviceTier, backend, status) {
|
|
13
13
|
const base = buildWorkerPaneName(slotId, generationIndex);
|
|
14
14
|
const normalized = normalizePaneProviderContext(context, serviceTier);
|
|
15
|
-
return `${base} · codex-sdk · ${providerPaneLabel(normalized)}`;
|
|
15
|
+
return `${base} · ${backend || 'codex-sdk'} · ${providerPaneLabel(normalized)} · ${status || 'launching'}`;
|
|
16
16
|
}
|
|
17
17
|
export function isRealZellijWorkerPaneIdSource(value) {
|
|
18
18
|
return value === 'zellij_worker_new_pane_stdout' || value === 'zellij_worker_list_panes';
|
|
@@ -22,7 +22,7 @@ export function buildWorkerPaneArtifact(input) {
|
|
|
22
22
|
const paneIdSource = input.paneIdSource || 'zellij_worker_pane_launch_failed';
|
|
23
23
|
const blockers = input.blockers || [];
|
|
24
24
|
const providerContext = normalizePaneProviderContext(input.providerContext, input.serviceTier);
|
|
25
|
-
const paneTitle = buildWorkerPaneTitle(input.slotId, input.generationIndex, providerContext, input.serviceTier);
|
|
25
|
+
const paneTitle = buildWorkerPaneTitle(input.slotId, input.generationIndex, providerContext, input.serviceTier, input.backend, input.status || input.statusLabel);
|
|
26
26
|
return {
|
|
27
27
|
schema: ZELLIJ_WORKER_PANE_SCHEMA,
|
|
28
28
|
generated_at: now,
|
|
@@ -82,7 +82,7 @@ export async function openWorkerPane(input) {
|
|
|
82
82
|
timeoutMs: 5000,
|
|
83
83
|
optional: false
|
|
84
84
|
});
|
|
85
|
-
const paneName = buildWorkerPaneTitle(input.slotId, input.generationIndex, providerContext, input.serviceTier);
|
|
85
|
+
const paneName = buildWorkerPaneTitle(input.slotId, input.generationIndex, providerContext, input.serviceTier, input.backend, input.statusLabel || 'running');
|
|
86
86
|
let launch = createSession.ok
|
|
87
87
|
? await runZellij(['--session', input.sessionName, 'action', 'new-pane', '--direction', 'right', '--name', paneName, '--', 'sh', '-lc', input.workerCommand], {
|
|
88
88
|
cwd,
|
|
@@ -5,6 +5,7 @@ import os from 'node:os';
|
|
|
5
5
|
import path from 'node:path';
|
|
6
6
|
import { spawnSync } from 'node:child_process';
|
|
7
7
|
import { pathToFileURL } from 'node:url';
|
|
8
|
+
import { currentDistFreshness } from './lib/ensure-dist-fresh.js';
|
|
8
9
|
const root = process.cwd();
|
|
9
10
|
const npmBin = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
|
10
11
|
const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'sks-command-import-smoke-'));
|
|
@@ -16,7 +17,15 @@ const rows = [];
|
|
|
16
17
|
fs.mkdirSync(consumer, { recursive: true });
|
|
17
18
|
fs.writeFileSync(path.join(consumer, 'package.json'), `${JSON.stringify({ name: 'sks-command-smoke-consumer', private: true }, null, 2)}\n`);
|
|
18
19
|
try {
|
|
19
|
-
|
|
20
|
+
if (process.env.SKS_ENSURE_DIST_NO_REBUILD === '1' || process.env.SKS_RELEASE_DIST_FRESHNESS_NO_REBUILD === '1') {
|
|
21
|
+
const freshness = currentDistFreshness();
|
|
22
|
+
rows.push({ label: 'dist_freshness', ok: freshness.ok, status: freshness.ok ? 0 : 1, issues: freshness.issues });
|
|
23
|
+
if (!freshness.ok)
|
|
24
|
+
failures.push(`dist_not_fresh:${freshness.issues.join(',')}`);
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
run('build', npmBin, ['run', 'build'], { cwd: root });
|
|
28
|
+
}
|
|
20
29
|
const pack = run('npm_pack', npmBin, ['pack', '--json', '--ignore-scripts', '--pack-destination', tmp, '--registry', 'https://registry.npmjs.org/'], { cwd: root });
|
|
21
30
|
const info = pack.ok ? JSON.parse(pack.stdout || '[]')[0] : null;
|
|
22
31
|
const tarball = info ? path.join(tmp, info.filename) : null;
|
|
@@ -5,12 +5,21 @@ import os from 'node:os';
|
|
|
5
5
|
import path from 'node:path';
|
|
6
6
|
import { spawnSync } from 'node:child_process';
|
|
7
7
|
import { fileURLToPath } from 'node:url';
|
|
8
|
+
import { currentDistFreshness } from './lib/ensure-dist-fresh.js';
|
|
8
9
|
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', '..');
|
|
9
10
|
const npmBin = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
|
10
11
|
const issues = [];
|
|
11
|
-
const
|
|
12
|
-
if (
|
|
13
|
-
|
|
12
|
+
const noRebuild = process.env.SKS_ENSURE_DIST_NO_REBUILD === '1' || process.env.SKS_RELEASE_DIST_FRESHNESS_NO_REBUILD === '1';
|
|
13
|
+
if (noRebuild) {
|
|
14
|
+
const freshness = currentDistFreshness();
|
|
15
|
+
if (!freshness.ok)
|
|
16
|
+
issues.push(`dist_not_fresh:${freshness.issues.join(',')}`);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
const build = spawnSync(npmBin, ['run', 'build'], { cwd: root, encoding: 'utf8', stdio: 'pipe' });
|
|
20
|
+
if (build.status !== 0)
|
|
21
|
+
issues.push(`build_failed:${tail(build.stderr || build.stdout)}`);
|
|
22
|
+
}
|
|
14
23
|
const pack = spawnSync(npmBin, ['pack', '--dry-run', '--json', '--ignore-scripts'], {
|
|
15
24
|
cwd: root,
|
|
16
25
|
encoding: 'utf8',
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
import fs from 'node:fs/promises';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { pathToFileURL } from 'node:url';
|
|
6
|
+
import { ensureDistFresh, root } from './lib/ensure-dist-fresh.js';
|
|
7
|
+
const freshness = ensureDistFresh({ rebuild: true });
|
|
8
|
+
if (!freshness.ok)
|
|
9
|
+
fail('dist_not_fresh', { freshness });
|
|
10
|
+
const mod = await import(pathToFileURL(path.join(root, 'dist', 'core', 'codex', 'codex-0-137-compat.js')).href);
|
|
11
|
+
const evidence = await mod.collectCodex0137LocalEvidence();
|
|
12
|
+
const matrix = mod.codex0137Matrix({
|
|
13
|
+
version: evidence.versionText,
|
|
14
|
+
available: evidence.available,
|
|
15
|
+
pluginListText: evidence.pluginListText,
|
|
16
|
+
debugModelsText: evidence.debugModelsText,
|
|
17
|
+
doctorText: evidence.doctorText,
|
|
18
|
+
requireReal: process.argv.includes('--require-real') || process.env.SKS_REQUIRE_CODEX_0137 === '1'
|
|
19
|
+
});
|
|
20
|
+
const report = { ...matrix, local_evidence: evidence };
|
|
21
|
+
await fs.mkdir(path.join(root, '.sneakoscope', 'reports'), { recursive: true });
|
|
22
|
+
await fs.writeFile(path.join(root, '.sneakoscope', 'reports', 'codex-0.137-compat.json'), `${JSON.stringify(report, null, 2)}\n`);
|
|
23
|
+
emit(report);
|
|
24
|
+
function emit(report) { console.log(JSON.stringify(report, null, 2)); if (!report.ok)
|
|
25
|
+
process.exitCode = 1; }
|
|
26
|
+
function fail(blocker, detail) { emit({ schema: 'sks.codex-0.137-compat-check.v1', ok: false, blockers: [blocker], detail }); process.exit(1); }
|
|
27
|
+
//# sourceMappingURL=codex-0-137-compat-check.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
import { assertGate, emitGate, readText } from './lib/codex-sdk-gate-lib.js';
|
|
4
|
+
const proof = readText('src/core/codex-control/codex-control-proof.ts');
|
|
5
|
+
const sandbox = readText('src/core/codex-control/codex-sdk-sandbox-policy.ts');
|
|
6
|
+
assertGate(proof.includes('sandbox:'), 'Codex control proof must include sandbox scope');
|
|
7
|
+
assertGate(proof.includes('env:'), 'Codex control proof must include environment proof');
|
|
8
|
+
assertGate(sandbox.includes('mad_sks_authorized') || sandbox.includes('user_confirmed_full_access'), 'Sandbox policy must include scoped authorization signals');
|
|
9
|
+
emitGate('codex:environment-scoped-approvals', { proof: ['sandbox', 'env', 'scoped_authorization'] });
|
|
10
|
+
//# sourceMappingURL=codex-environment-scoped-approvals-check.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
import { assertGate, emitGate, readText } from './lib/codex-sdk-gate-lib.js';
|
|
4
|
+
const source = readText('src/core/codex/codex-0-137-compat.ts');
|
|
5
|
+
assertGate(source.includes("run(['plugin', 'list', '--json'])"), '0.137 evidence must run codex plugin list --json');
|
|
6
|
+
assertGate(source.includes('looksLikeJson'), '0.137 plugin list JSON parser missing');
|
|
7
|
+
emitGate('codex:plugin-list-json', { detector: 'codex plugin list --json' });
|
|
8
|
+
//# sourceMappingURL=codex-plugin-list-json-check.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
import { assertGate, emitGate, readText } from './lib/codex-sdk-gate-lib.js';
|
|
4
|
+
const runner = readText('src/core/codex-control/codex-task-runner.ts');
|
|
5
|
+
const registry = readText('src/core/codex-control/codex-thread-registry.ts');
|
|
6
|
+
assertGate(runner.includes('backendPreference'), 'Codex task runner must carry backend/runtime preference');
|
|
7
|
+
assertGate(runner.includes('backend_family'), 'Codex task runner must persist backend family');
|
|
8
|
+
assertGate(registry.includes('recordCodexThread'), 'Codex thread registry missing');
|
|
9
|
+
emitGate('codex:thread-runtime-choice', { runtime_choice: 'backendPreference/backend_family' });
|
|
10
|
+
//# sourceMappingURL=codex-thread-runtime-choice-check.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
import { assertGate, emitGate, importDist } from './lib/codex-sdk-gate-lib.js';
|
|
4
|
+
const finalizer = await importDist('core/pipeline/finalize-pipeline-result.js');
|
|
5
|
+
const blocked = await finalizer.finalizePipelineResult({
|
|
6
|
+
route: '$Team',
|
|
7
|
+
missionId: 'M-local-final-gpt',
|
|
8
|
+
localParticipated: true,
|
|
9
|
+
candidateResults: [{ backend: 'local-llm', summary: 'draft' }],
|
|
10
|
+
candidatePatchEnvelopes: [],
|
|
11
|
+
verificationResults: [],
|
|
12
|
+
sideEffectReport: {},
|
|
13
|
+
mutationLedger: {},
|
|
14
|
+
rollbackPlan: {},
|
|
15
|
+
applyPatches: true,
|
|
16
|
+
forceGptFinalUnavailable: true
|
|
17
|
+
});
|
|
18
|
+
assertGate(blocked.ok === false, 'local participation without GPT final must block finalization');
|
|
19
|
+
assertGate(blocked.blockers.includes('gpt_final_arbiter_required_not_passed'), 'missing GPT final blocker required');
|
|
20
|
+
emitGate('local-collab:all-pipelines-final-gpt', { final_status: blocked.final_status, blockers: blocked.blockers.length });
|
|
21
|
+
//# sourceMappingURL=local-collab-all-pipelines-final-gpt-check.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
import { assertGate, emitGate, readText } from './lib/codex-sdk-gate-lib.js';
|
|
4
|
+
const router = readText('src/core/agents/native-worker-backend-router.ts');
|
|
5
|
+
const control = readText('src/core/codex-control/codex-task-runner.ts');
|
|
6
|
+
const policy = readText('src/core/local-llm/local-worker-eligibility.ts');
|
|
7
|
+
assertGate(router.includes("backend === 'local-llm'"), 'native worker router must support local-llm backend');
|
|
8
|
+
assertGate(control.includes('runLocalLlmTask'), 'Codex Control Plane must call local LLM task adapter');
|
|
9
|
+
assertGate(policy.includes('requires_gpt_final'), 'local worker eligibility must require GPT final');
|
|
10
|
+
emitGate('local-llm:all-pipelines', { local_backend: 'local-llm', requires_gpt_final: true });
|
|
11
|
+
//# sourceMappingURL=local-llm-all-pipelines-check.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
import { assertGate, emitGate, importDist } from './lib/codex-sdk-gate-lib.js';
|
|
4
|
+
const cache = await importDist('core/local-llm/local-llm-prompt-cache.js');
|
|
5
|
+
const a = cache.buildLocalLlmPromptCacheRecord({ routeSystemEnvelopeHash: 'a', localWorkerPolicyHash: 'b', coreSkillSnapshotHash: 'c', triwikiContextPackHash: 'd', repoSummaryHash: 'e', capabilityCardHash: 'f' });
|
|
6
|
+
const b = cache.buildLocalLlmPromptCacheRecord({ routeSystemEnvelopeHash: 'a', localWorkerPolicyHash: 'b', coreSkillSnapshotHash: 'c', triwikiContextPackHash: 'd2', repoSummaryHash: 'e', capabilityCardHash: 'f' });
|
|
7
|
+
assertGate(a.cacheable === true, 'prompt cache record should be cacheable when hashes exist');
|
|
8
|
+
assertGate(a.cache_key !== b.cache_key, 'source hash change must invalidate cache');
|
|
9
|
+
emitGate('local-llm:cache-performance', { cacheable: a.cacheable, invalidates_on_hash_change: true });
|
|
10
|
+
//# sourceMappingURL=local-llm-cache-performance-check.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
import { assertGate, emitGate, importDist, readText } from './lib/codex-sdk-gate-lib.js';
|
|
4
|
+
const mod = await importDist('core/agents/ollama-worker-config.js');
|
|
5
|
+
const schemaText = readText('schemas/local-llm/local-model-config.schema.json');
|
|
6
|
+
const config = mod.normalizeLocalModelConfig({ enabled: true, status: 'enabled_unverified' });
|
|
7
|
+
const mlx = mod.normalizeLocalModelConfig({ enabled: true, provider: 'mlx-lm', model: 'mlx-community/Qwen3.6-35B-A3B-4bit', base_url: 'http://127.0.0.1:8080' });
|
|
8
|
+
assertGate(config.schema === 'sks.local-model-config.v2', 'local model config must use v2 schema');
|
|
9
|
+
assertGate(config.status === 'enabled_unverified', 'enabled without smoke must be enabled_unverified');
|
|
10
|
+
assertGate(mlx.provider === 'mlx-lm' && mlx.base_url === 'http://127.0.0.1:8080', 'local model config must preserve MLX LM provider settings');
|
|
11
|
+
assertGate(schemaText.includes('verified'), 'local model schema must include verified status');
|
|
12
|
+
assertGate(schemaText.includes('mlx-lm'), 'local model schema must allow MLX LM provider');
|
|
13
|
+
emitGate('local-llm:capability', { status: config.status, schema: config.schema, mlx_provider: mlx.provider });
|
|
14
|
+
//# sourceMappingURL=local-llm-capability-check.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
import { assertGate, emitGate, importDist, root } from './lib/codex-sdk-gate-lib.js';
|
|
4
|
+
const cfg = await importDist('core/agents/ollama-worker-config.js');
|
|
5
|
+
const smokeMod = await importDist('core/local-llm/local-llm-smoke.js');
|
|
6
|
+
const config = cfg.normalizeLocalModelConfig({ enabled: true, status: 'enabled_unverified' });
|
|
7
|
+
if (process.env.SKS_REQUIRE_LOCAL_LLM !== '1' && !process.argv.includes('--require-real')) {
|
|
8
|
+
const skipped = cfg.applyLocalLlmSmokeResult(config, { ok: false, skipped: true, status: 'enabled_unverified', reason: 'release_check_no_real_smoke', schema_valid: false });
|
|
9
|
+
assertGate(skipped.status === 'enabled_unverified', '--skip-smoke or hermetic mode must not verify local LLM');
|
|
10
|
+
emitGate('local-llm:smoke', { status: 'hermetic_skip', config_status: skipped.status });
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
const reportPath = `${root}/.sneakoscope/reports/local-llm-smoke-real.json`;
|
|
14
|
+
const realConfig = await cfg.readLocalModelConfig();
|
|
15
|
+
const first = await smokeMod.runLocalLlmGenerationSmoke(realConfig, { reportPath, timeoutMs: 60_000 });
|
|
16
|
+
const shouldRetry = first.ok !== true && String(first.blockers || []).match(/aborted|timeout|local_llm_generate_failed/i);
|
|
17
|
+
const smoke = shouldRetry
|
|
18
|
+
? await smokeMod.runLocalLlmGenerationSmoke(realConfig, { reportPath, timeoutMs: 90_000 })
|
|
19
|
+
: first;
|
|
20
|
+
assertGate(smoke.ok === true && smoke.schema_valid === true, 'real local LLM smoke failed', { smoke, retry_count: shouldRetry ? 1 : 0, first_failure_blockers: first.blockers || [] });
|
|
21
|
+
emitGate('local-llm:smoke', { status: 'real_verified', latency_ms: smoke.latency_ms, tokens_per_second: smoke.tokens_per_second, retry_count: shouldRetry ? 1 : 0 });
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=local-llm-smoke-check.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
import { assertGate, emitGate, importDist } from './lib/codex-sdk-gate-lib.js';
|
|
4
|
+
const mod = await importDist('core/local-llm/local-llm-schema-enforcer.js');
|
|
5
|
+
const schema = { type: 'object', required: ['status'], properties: { status: { type: 'string' } }, additionalProperties: false };
|
|
6
|
+
const good = mod.enforceLocalLlmJsonSchema('{"status":"ok"}', schema);
|
|
7
|
+
const bad = mod.enforceLocalLlmJsonSchema('plain words', schema);
|
|
8
|
+
assertGate(good.ok === true && good.schema_valid === true, 'valid local JSON should pass');
|
|
9
|
+
assertGate(bad.ok === false, 'natural language local output must not pass');
|
|
10
|
+
emitGate('local-llm:structured-output', { good: good.ok, bad: bad.ok });
|
|
11
|
+
//# sourceMappingURL=local-llm-structured-output-check.js.map
|