sneakoscope 5.6.1 → 5.7.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 +1 -1
- 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/bin/sks.js +1 -1
- package/dist/cli/command-registry.js +1 -1
- package/dist/cli/install-helpers.js +21 -15
- package/dist/commands/doctor.js +44 -22
- package/dist/config/skills-manifest.json +58 -58
- package/dist/core/codex/agent-config-file-repair.js +2 -1
- package/dist/core/codex/codex-config-guard.js +10 -0
- package/dist/core/codex-app/sks-menubar.js +66 -19
- package/dist/core/commands/run-command.js +5 -1
- package/dist/core/fsx.js +1 -1
- package/dist/core/update/update-migration-state.js +178 -33
- package/dist/core/version.js +1 -1
- package/dist/scripts/codex-lb-gpt55-fast-profile-check.js +3 -2
- package/dist/scripts/packlist-performance-check.js +4 -2
- package/dist/scripts/release-metadata-1-19-check.js +12 -1
- package/dist/scripts/sks-menubar-install-check.js +83 -0
- package/package.json +14 -5
|
@@ -27,6 +27,46 @@ const secondResult = await installSksMenuBar({
|
|
|
27
27
|
sksEntry: localEntry,
|
|
28
28
|
env: launchGuardEnv
|
|
29
29
|
});
|
|
30
|
+
if (secondResult.action_script_path)
|
|
31
|
+
await fs.rm(secondResult.action_script_path, { force: true });
|
|
32
|
+
const restoredScriptResult = await installSksMenuBar({
|
|
33
|
+
apply: true,
|
|
34
|
+
launch: true,
|
|
35
|
+
home: temp,
|
|
36
|
+
root: fakeRoot,
|
|
37
|
+
sksEntry: localEntry,
|
|
38
|
+
env: launchGuardEnv
|
|
39
|
+
});
|
|
40
|
+
if (restoredScriptResult.action_script_path) {
|
|
41
|
+
await fs.writeFile(restoredScriptResult.action_script_path, '#!/bin/zsh\necho stale-sks-menubar-action\n', 'utf8');
|
|
42
|
+
}
|
|
43
|
+
const staleScriptMissingEntryResult = await installSksMenuBar({
|
|
44
|
+
apply: true,
|
|
45
|
+
launch: true,
|
|
46
|
+
home: temp,
|
|
47
|
+
root: fakeRoot,
|
|
48
|
+
sksEntry: path.join(fakeRoot, 'dist', 'bin', 'missing-sks.js'),
|
|
49
|
+
env: launchGuardEnv
|
|
50
|
+
});
|
|
51
|
+
const recoveredStaleScriptResult = await installSksMenuBar({
|
|
52
|
+
apply: true,
|
|
53
|
+
launch: true,
|
|
54
|
+
home: temp,
|
|
55
|
+
root: fakeRoot,
|
|
56
|
+
sksEntry: localEntry,
|
|
57
|
+
env: launchGuardEnv
|
|
58
|
+
});
|
|
59
|
+
if (recoveredStaleScriptResult.action_script_path) {
|
|
60
|
+
await fs.chmod(recoveredStaleScriptResult.action_script_path, 0o644);
|
|
61
|
+
}
|
|
62
|
+
const restoredExecutableBitResult = await installSksMenuBar({
|
|
63
|
+
apply: true,
|
|
64
|
+
launch: true,
|
|
65
|
+
home: temp,
|
|
66
|
+
root: fakeRoot,
|
|
67
|
+
sksEntry: localEntry,
|
|
68
|
+
env: launchGuardEnv
|
|
69
|
+
});
|
|
30
70
|
const envHomeResult = await installSksMenuBar({
|
|
31
71
|
apply: true,
|
|
32
72
|
launch: true,
|
|
@@ -55,6 +95,9 @@ const hasVisibleStatusSource = generatedSource.includes('NSStatusItem.variableLe
|
|
|
55
95
|
&& generatedSource.includes('SKS ⋯')
|
|
56
96
|
&& generatedSource.includes('Timer.scheduledTimer(withTimeInterval: 30.0');
|
|
57
97
|
const hasBackgroundReadonlyActions = generatedSource.includes('runSksBackground(["codex-lb", "fast-check"]')
|
|
98
|
+
&& generatedSource.includes('runSksBackground(["fast-mode", "on", "--json"]')
|
|
99
|
+
&& generatedSource.includes('runSksBackground(["fast-mode", "off", "--json"]')
|
|
100
|
+
&& generatedSource.includes('runSksSilent(["fast-mode", "status", "--json"]')
|
|
58
101
|
&& generatedSource.includes('runSksBackground(["update", "check"]')
|
|
59
102
|
&& generatedSource.includes('display notification')
|
|
60
103
|
&& !generatedSource.includes('runSksInTerminal')
|
|
@@ -89,6 +132,21 @@ const hasBuildStamp = buildStampExists
|
|
|
89
132
|
&& result.build_stamp?.codesign_identifier === 'com.sneakoscope.sks-menubar';
|
|
90
133
|
const isIdempotent = secondResult.actions.includes('menubar_up_to_date')
|
|
91
134
|
&& secondResult.build_stamp?.action_script_sha256 === result.build_stamp?.action_script_sha256;
|
|
135
|
+
const restoresMissingActionScript = restoredScriptResult.actions.includes(`wrote ${secondResult.action_script_path}`)
|
|
136
|
+
&& actionScriptExists
|
|
137
|
+
&& restoredScriptResult.build_stamp?.action_script_sha256 === result.build_stamp?.action_script_sha256;
|
|
138
|
+
const blocksStaleActionScriptReuse = staleScriptMissingEntryResult.ok === false
|
|
139
|
+
&& staleScriptMissingEntryResult.blockers.includes('sks_entry_unresolved')
|
|
140
|
+
&& staleScriptMissingEntryResult.warnings.includes('sks_entry_unresolved_stale_action_script_not_reused')
|
|
141
|
+
&& staleScriptMissingEntryResult.target_check?.used_previous_script === false;
|
|
142
|
+
const recoversStaleActionScriptWhenEntryExists = recoveredStaleScriptResult.ok === true
|
|
143
|
+
&& recoveredStaleScriptResult.actions.includes(`wrote ${restoredScriptResult.action_script_path}`)
|
|
144
|
+
&& recoveredStaleScriptResult.build_stamp?.action_script_sha256 === result.build_stamp?.action_script_sha256;
|
|
145
|
+
const restoresExecutableBit = restoredExecutableBitResult.ok === true
|
|
146
|
+
&& restoredExecutableBitResult.actions.includes('menubar_up_to_date')
|
|
147
|
+
&& restoredExecutableBitResult.actions.includes('restored action script executable bit')
|
|
148
|
+
&& actionScriptExists
|
|
149
|
+
&& await isExecutable(result.action_script_path);
|
|
92
150
|
const hasCommandRegistry = commandRegistry.includes('menubar:')
|
|
93
151
|
&& commandRegistry.includes('menubarCommand')
|
|
94
152
|
&& commandRegistry.includes('dist/core/commands/menubar-command.js');
|
|
@@ -102,6 +160,8 @@ const expectedMenuItems = [
|
|
|
102
160
|
'Use ChatGPT OAuth',
|
|
103
161
|
'Set codex-lb Domain and Key',
|
|
104
162
|
'Set OpenRouter Key and GLM Profiles',
|
|
163
|
+
'Fast Mode On',
|
|
164
|
+
'Fast Mode Off',
|
|
105
165
|
'Fast Check',
|
|
106
166
|
'SKS Version Check',
|
|
107
167
|
'Update SKS Now',
|
|
@@ -147,6 +207,10 @@ const darwinOk = cltMissing
|
|
|
147
207
|
&& hasBuildStamp
|
|
148
208
|
&& swiftParse.ok === true
|
|
149
209
|
&& isIdempotent
|
|
210
|
+
&& restoresMissingActionScript
|
|
211
|
+
&& blocksStaleActionScriptReuse
|
|
212
|
+
&& recoversStaleActionScriptWhenEntryExists
|
|
213
|
+
&& restoresExecutableBit
|
|
150
214
|
&& hasCommandRegistry
|
|
151
215
|
&& noLaunchctlSecretSetenv
|
|
152
216
|
&& hasLaunchctlUnsetenv
|
|
@@ -164,6 +228,10 @@ const report = {
|
|
|
164
228
|
env_home_temp: envHomeTemp,
|
|
165
229
|
result,
|
|
166
230
|
second_result: secondResult,
|
|
231
|
+
restored_script_result: restoredScriptResult,
|
|
232
|
+
stale_script_missing_entry_result: staleScriptMissingEntryResult,
|
|
233
|
+
recovered_stale_script_result: recoveredStaleScriptResult,
|
|
234
|
+
restored_executable_bit_result: restoredExecutableBitResult,
|
|
167
235
|
env_home_result: envHomeResult,
|
|
168
236
|
executable_exists: executableExists,
|
|
169
237
|
launch_agent_exists: launchAgentExists,
|
|
@@ -185,6 +253,10 @@ const report = {
|
|
|
185
253
|
has_build_stamp: hasBuildStamp,
|
|
186
254
|
swift_parse: swiftParse,
|
|
187
255
|
is_idempotent: isIdempotent,
|
|
256
|
+
restores_missing_action_script: restoresMissingActionScript,
|
|
257
|
+
blocks_stale_action_script_reuse: blocksStaleActionScriptReuse,
|
|
258
|
+
recovers_stale_action_script_when_entry_exists: recoversStaleActionScriptWhenEntryExists,
|
|
259
|
+
restores_executable_bit: restoresExecutableBit,
|
|
188
260
|
has_command_registry: hasCommandRegistry,
|
|
189
261
|
no_launchctl_secret_setenv: noLaunchctlSecretSetenv,
|
|
190
262
|
has_launchctl_unsetenv: hasLaunchctlUnsetenv,
|
|
@@ -209,6 +281,17 @@ async function exists(file) {
|
|
|
209
281
|
return false;
|
|
210
282
|
}
|
|
211
283
|
}
|
|
284
|
+
async function isExecutable(file) {
|
|
285
|
+
if (!file)
|
|
286
|
+
return false;
|
|
287
|
+
try {
|
|
288
|
+
await fs.access(file, fs.constants.X_OK);
|
|
289
|
+
return true;
|
|
290
|
+
}
|
|
291
|
+
catch {
|
|
292
|
+
return false;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
212
295
|
async function swiftParseSmoke(sourcePath) {
|
|
213
296
|
if (process.platform !== 'darwin')
|
|
214
297
|
return { ok: true, status: 'skipped', reason: 'not_macos' };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sneakoscope",
|
|
3
3
|
"displayName": "ㅅㅋㅅ",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.7.0",
|
|
5
5
|
"description": "Sneakoscope Codex: fast proof-first Codex trust layer with image-based Voxel TriWiki.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"homepage": "https://github.com/mandarange/Sneakoscope-Codex#readme",
|
|
@@ -61,19 +61,23 @@
|
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
63
|
"build": "npm run build:clean",
|
|
64
|
+
"prepack": "npm run build",
|
|
64
65
|
"build:clean": "node -e \"const fs=require('fs'); fs.rmSync('dist',{recursive:true,force:true}); fs.rmSync('.sneakoscope/cache/tsbuildinfo',{recursive:true,force:true})\" && tsc -p tsconfig.json && node ./dist/scripts/ensure-bin-executable.js && node ./dist/scripts/build-dist.js",
|
|
65
66
|
"build:incremental": "tsc -p tsconfig.json && node ./dist/scripts/ensure-bin-executable.js && node ./dist/scripts/build-dist.js",
|
|
66
67
|
"test": "node --test --test-concurrency=1 dist/core/__tests__/*.test.js dist/core/proof/__tests__/*.test.js dist/core/stop-gate/__tests__/*.test.js dist/core/commands/__tests__/*.test.js dist/core/dfix/__tests__/*.test.js dist/core/ppt/__tests__/*.test.js dist/core/mad-sks/__tests__/*.test.js dist/core/codex-app/__tests__/*.test.js dist/core/doctor/__tests__/*.test.js dist/cli/__tests__/*.test.js dist/core/triwiki/__tests__/*.test.js dist/core/naruto/__tests__/*.test.js dist/core/agent-bridge/__tests__/*.test.js",
|
|
67
68
|
"selftest:real": "node ./dist/bin/sks.js selftest --real --json",
|
|
68
|
-
"check": "npm run release:check:
|
|
69
|
+
"check": "npm run release:check:confidence",
|
|
69
70
|
"dev:sks": "npm run build:incremental --silent && node ./dist/bin/sks.js",
|
|
70
|
-
"prepublishOnly": "
|
|
71
|
+
"prepublishOnly": "node ./dist/scripts/prepublish-release-check-or-fast.js && node ./dist/scripts/release-check-stamp.js verify && node ./dist/scripts/package-published-contract-check.js && node ./dist/scripts/release-registry-check.js --require-unpublished --require-publish-auth",
|
|
71
72
|
"runtime:no-src-mjs": "node ./dist/scripts/runtime-no-src-mjs-check.js",
|
|
72
73
|
"runtime:ts-source-of-truth": "node ./dist/scripts/runtime-ts-source-of-truth-check.js",
|
|
73
74
|
"architecture:guard": "node ./dist/scripts/architecture-guard-check.js",
|
|
74
75
|
"runtime:dist-parity": "node ./dist/scripts/runtime-dist-parity-check.js",
|
|
75
|
-
"release:check": "npm run release:check:affected
|
|
76
|
+
"release:check": "npm run release:check:affected",
|
|
76
77
|
"release:metadata": "node ./dist/scripts/release-metadata-check.js",
|
|
78
|
+
"release:version-truth": "node ./dist/scripts/release-version-truth-check.js",
|
|
79
|
+
"release:dist-freshness": "node ./dist/scripts/release-dist-freshness-check.js",
|
|
80
|
+
"release:provenance": "node ./dist/scripts/release-provenance-check.js",
|
|
77
81
|
"release:gate-script-parity": "node ./dist/scripts/release-gate-script-parity-check.js",
|
|
78
82
|
"ppt:real-imagegen-wiring": "node ./dist/scripts/ppt-real-imagegen-wiring-check.js",
|
|
79
83
|
"ux-review:run-wires-imagegen": "node ./dist/scripts/ux-review-run-wires-imagegen-check.js",
|
|
@@ -111,6 +115,7 @@
|
|
|
111
115
|
"zellij:layout-valid": "node ./dist/scripts/zellij-layout-valid-check.js",
|
|
112
116
|
"zellij:doctor-readiness": "node ./dist/scripts/zellij-doctor-readiness-check.js",
|
|
113
117
|
"codex:project-config-policy-splitter": "node ./dist/scripts/codex-project-config-policy-splitter-check.js",
|
|
118
|
+
"legacy:upgrade-zero-break": "node ./dist/scripts/legacy-upgrade-matrix-check.js",
|
|
114
119
|
"packcheck": "for d in bin test; do [ -d \"$d\" ] && find \"$d\" -name '*.mjs' -print0; done | xargs -0 -n1 node --check && npm run runtime:no-src-mjs",
|
|
115
120
|
"changelog:check": "node ./dist/scripts/changelog-check.js",
|
|
116
121
|
"cli-entrypoint:check": "node ./dist/scripts/check-cli-entrypoint.js",
|
|
@@ -133,8 +138,12 @@
|
|
|
133
138
|
"release:check:fast": "npm run build:incremental --silent && node ./dist/scripts/release-gate-dag-runner.js --preset fast --changed-since auto --sla 5m && node ./dist/scripts/release-check-stamp.js write",
|
|
134
139
|
"release:check:confidence": "npm run build:incremental --silent && node ./dist/scripts/release-gate-dag-runner.js --preset confidence --changed-since auto --sla 5m && node ./dist/scripts/release-check-stamp.js write",
|
|
135
140
|
"release:check:full": "npm run build:clean --silent && node ./dist/scripts/release-gate-dag-runner.js --preset release --full && node ./dist/scripts/release-gate-dag-runner.js --preset bench --full && node ./dist/scripts/release-check-stamp.js write",
|
|
136
|
-
"publish:
|
|
141
|
+
"publish:packlist-performance": "node ./dist/scripts/packlist-performance-check.js",
|
|
142
|
+
"publish:dry": "npm run publish:prep-ignore-scripts && npm publish --dry-run --ignore-scripts --json",
|
|
143
|
+
"publish:prep-ignore-scripts": "npm run build:incremental --silent && npm run release:version-truth --silent && npm run publish:packlist-performance --silent && node ./dist/scripts/package-published-contract-check.js && node ./dist/scripts/release-registry-check.js --require-unpublished --require-publish-auth && npm run publish-tag:check --silent",
|
|
137
144
|
"publish:ignore-scripts": "npm run publish:prep-ignore-scripts && npm publish --ignore-scripts",
|
|
145
|
+
"publish:npm": "npm run publish:ignore-scripts",
|
|
146
|
+
"release:publish": "npm run publish:ignore-scripts",
|
|
138
147
|
"gates:run": "node ./dist/scripts/release-gate-dag-runner.js",
|
|
139
148
|
"policy:gate-audit": "node ./dist/scripts/gate-policy-audit-check.js"
|
|
140
149
|
},
|