sneakoscope 7.6.0 → 8.0.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 +4 -10
- package/config/perf-budgets.v1.json +0 -1
- package/crates/sks-core/Cargo.lock +1 -1
- package/crates/sks-core/Cargo.toml +1 -1
- package/dist/cli/command-manifest-lite.js +8 -15
- package/dist/cli/command-registry.js +8 -16
- package/dist/cli/router.js +0 -3
- package/dist/commands/codex-lb.js +10 -5
- package/dist/config/skills-manifest.json +59 -59
- package/dist/core/agent-bridge/agent-manifest.js +6 -11
- package/dist/core/align/align-route.js +471 -40
- package/dist/core/codex-app/menubar/constants.js +1 -4
- package/dist/core/codex-app/menubar/installer.js +20 -1
- package/dist/core/codex-app/menubar/migration.js +241 -1
- package/dist/core/codex-app/menubar/status.js +19 -1
- package/dist/core/codex-lb/capability-runner.js +15 -4
- package/dist/core/codex-lb/desktop-controller.js +91 -23
- package/dist/core/codex-lb/probes/bridge-probe.js +3 -1
- package/dist/core/codex-lb/probes/catalog-probe.js +21 -10
- package/dist/core/codex-lb/probes/cli-image-tool-probe.js +200 -0
- package/dist/core/codex-lb/probes/image-generation-probe.js +10 -4
- package/dist/core/codex-native/core-skill-manifest.js +35 -10
- package/dist/core/commands/align-command.js +115 -19
- package/dist/core/commands/mad-sks-command.js +30 -28
- package/dist/core/commands/mad-sks-headless.js +44 -0
- package/dist/core/commands/remote-command.js +5 -4
- package/dist/core/db-safety.js +10 -0
- package/dist/core/doctor/retired-managed-residue-private.js +1 -1
- package/dist/core/doctor/retired-managed-residue-state.js +3 -1
- package/dist/core/feature-fixtures.js +5 -8
- package/dist/core/imagegen/imagegen-capability.js +16 -2
- package/dist/core/imagegen/require-imagegen.js +2 -1
- package/dist/core/init/skills.js +21 -17
- package/dist/core/install/installed-package-smoke.js +1 -1
- package/dist/core/locks/file-lock.js +27 -11
- package/dist/core/perf/release-latency-slo.js +1 -60
- package/dist/core/pipeline-internals/runtime-core.js +12 -3
- package/dist/core/release/release-gate-contract.js +1 -0
- package/dist/core/release/release-pack-receipt.js +2 -0
- package/dist/core/release/release-upgrade-baseline.js +3 -3
- package/dist/core/remote/index.js +0 -2
- package/dist/core/remote/owner-proof.js +2 -2
- package/dist/core/remote/protocol.js +2 -2
- package/dist/core/remote/types.js +2 -3
- package/dist/core/remote/worker.js +11 -387
- package/dist/core/routes/dollar-manifest-lite.js +1 -1
- package/dist/core/routes.js +3 -4
- package/dist/core/safety/command-contract/contracts.js +4 -9
- package/dist/core/skill-forge.js +21 -6
- package/dist/core/skills/skill-agent-metadata.js +348 -0
- package/dist/core/stop-gate/stop-gate-resolver.js +47 -2
- package/dist/core/subagents/official-subagent-prompt.js +32 -74
- package/dist/core/triwiki/context-graph/extractors/topology/commands.js +0 -1
- package/dist/core/update/update-migration-state.js +17 -4
- package/dist/core/update-check.js +17 -2
- package/dist/core/version.js +1 -1
- package/dist/core/work-order-ledger.js +7 -1
- package/dist/core/zellij/zellij-official-subagent-activity.js +53 -0
- package/dist/native/sks-menubar/Sources/AppDelegate.swift +0 -9
- package/dist/native/sks-menubar/Sources/ControlCenterWindowController.swift +1 -6
- package/dist/native/sks-menubar/Sources/OverviewSummary.swift +0 -27
- package/dist/native/sks-menubar/Sources/OverviewViewController.swift +9 -16
- package/dist/native/sks-menubar/Sources/ProcessClient.swift +2 -9
- package/dist/native/sks-menubar/Sources/ProvidersViewController.swift +15 -1
- package/dist/native/sks-menubar/Sources/RemoteCodingViewController.swift +49 -0
- package/dist/native/sks-menubar/Sources/SidebarItem.swift +2 -2
- package/dist/native/sks-menubar/Tests/ProcessClientTests.swift +0 -17
- package/dist/scripts/current-command-surface-check.js +4 -2
- package/dist/scripts/docs-truthfulness-check.js +11 -12
- package/dist/scripts/packlist-performance-check.js +2 -0
- package/dist/scripts/release-latency-slo-check.js +7 -3
- package/dist/scripts/skill-surface-modernization-check.js +544 -0
- package/package.json +2 -3
- package/release-gates.v2.json +30 -0
- package/runtime-required-scripts.json +10 -0
- package/dist/cli/root-fast.js +0 -47
- package/dist/commands/aliases.js +0 -2
- package/dist/commands/autoresearch.js +0 -5
- package/dist/commands/bootstrap.js +0 -2
- package/dist/commands/computer-use.js +0 -4
- package/dist/commands/context7.js +0 -5
- package/dist/commands/deps.js +0 -5
- package/dist/commands/dollar-commands.js +0 -2
- package/dist/commands/eval.js +0 -5
- package/dist/commands/fix-path.js +0 -2
- package/dist/commands/gc.js +0 -2
- package/dist/commands/goal.js +0 -5
- package/dist/commands/gx.js +0 -5
- package/dist/commands/postinstall.js +0 -2
- package/dist/commands/quickstart.js +0 -2
- package/dist/commands/reasoning.js +0 -2
- package/dist/commands/run.js +0 -4
- package/dist/commands/selftest.js +0 -2
- package/dist/commands/setup.js +0 -2
- package/dist/commands/skill-dream.js +0 -5
- package/dist/commands/stats.js +0 -2
- package/dist/commands/trust.js +0 -4
- package/dist/commands/usage.js +0 -2
- package/dist/commands/validate-artifacts.js +0 -2
- package/dist/core/agents/agent-heartbeat.js +0 -1
- package/dist/core/codex/app-mentions.js +0 -13
- package/dist/core/codex/codex-resume-inventory.js +0 -28
- package/dist/core/codex-app/codex-app-provider-badge.js +0 -34
- package/dist/core/codex-compat/codex-0-132.js +0 -104
- package/dist/core/codex-control/codex-0140-probe-runner.js +0 -4
- package/dist/core/codex-control/codex-0140-real-probe-summary.js +0 -11
- package/dist/core/codex-control/codex-multi-agent-event-normalizer.js +0 -18
- package/dist/core/codex-native/codex-native-capability-cache.js +0 -20
- package/dist/core/codex-native/native-media-computer-repair.js +0 -4
- package/dist/core/codex-plugins/codex-plugin-cache.js +0 -37
- package/dist/core/codex-plugins/codex-plugin-diff.js +0 -72
- package/dist/core/commands/command-suggestions.js +0 -12
- package/dist/core/commands/telegram-command.js +0 -654
- package/dist/core/doctor/macos-tcc-diagnostic.js +0 -18
- package/dist/core/dogfood-loop.js +0 -37
- package/dist/core/effort-orchestrator.js +0 -111
- package/dist/core/from-chat-img-forensics.js +0 -103
- package/dist/core/git/git-worktree-cache-policy.js +0 -35
- package/dist/core/git/git-worktree-pool.js +0 -26
- package/dist/core/local-llm/local-llm-config.js +0 -19
- package/dist/core/local-llm/local-llm-prompt-cache.js +0 -11
- package/dist/core/local-llm/local-llm-scheduler.js +0 -28
- package/dist/core/local-llm/local-llm-warmup.js +0 -19
- package/dist/core/loops/loop-iteration-runner.js +0 -1
- package/dist/core/remote/codex-public-activity.js +0 -283
- package/dist/core/remote/session-binding.js +0 -153
- package/dist/core/telegram/bot-api.js +0 -174
- package/dist/core/telegram/center-snapshot.js +0 -718
- package/dist/core/telegram/config.js +0 -232
- package/dist/core/telegram/hub.js +0 -502
- package/dist/core/telegram/index.js +0 -12
- package/dist/core/telegram/ingress-spool.js +0 -419
- package/dist/core/telegram/ledgers.js +0 -366
- package/dist/core/telegram/messages.js +0 -318
- package/dist/core/telegram/owner-lock.js +0 -137
- package/dist/core/telegram/runtime-projection.js +0 -126
- package/dist/core/telegram/runtime.js +0 -613
- package/dist/core/telegram/service.js +0 -310
- package/dist/core/telegram/setup.js +0 -438
- package/dist/core/telegram/types.js +0 -1
- package/dist/native/sks-menubar/Sources/RemoteTelegramCenterState.swift +0 -447
- package/dist/native/sks-menubar/Sources/RemoteTelegramRendering.swift +0 -484
- package/dist/native/sks-menubar/Sources/RemoteTelegramViewController.swift +0 -470
- package/dist/native/sks-menubar/Sources/TelegramHubSupervisor.swift +0 -469
- package/dist/native/sks-menubar/Tests/NativeTelegramRegressionRunner.swift +0 -55
- package/dist/native/sks-menubar/Tests/RemoteTelegramCenterStateTests.swift +0 -56
- package/dist/native/sks-menubar/Tests/TelegramHubSupervisorTests.swift +0 -55
|
@@ -1,89 +1,325 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
1
2
|
import path from 'node:path';
|
|
2
|
-
import {
|
|
3
|
+
import { commandManifestNames } from '../../cli/command-manifest-lite.js';
|
|
4
|
+
import { nowIso, readJson, sha256, writeJsonAtomic } from '../fsx.js';
|
|
5
|
+
import { MANAGED_ROUTE_SKILL_NAMES } from '../routes.js';
|
|
3
6
|
export const ALIGN_PLAN_ARTIFACT = 'align-plan.json';
|
|
4
7
|
export const ALIGN_LEDGER_ARTIFACT = 'align-ledger.json';
|
|
5
8
|
export const ALIGN_GATE_ARTIFACT = 'align-gate.json';
|
|
6
|
-
export const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
export const ALIGN_OFFICIAL_SOURCES = Object.freeze([
|
|
10
|
+
Object.freeze({
|
|
11
|
+
source_id: 'gpt_5_6_migration_prompting',
|
|
12
|
+
url: 'https://developers.openai.com/api/docs/guides/latest-model'
|
|
13
|
+
}),
|
|
14
|
+
Object.freeze({
|
|
15
|
+
source_id: 'programmatic_tool_calling',
|
|
16
|
+
url: 'https://developers.openai.com/api/docs/guides/tools-programmatic-tool-calling'
|
|
17
|
+
}),
|
|
18
|
+
Object.freeze({
|
|
19
|
+
source_id: 'agents_guide',
|
|
20
|
+
url: 'https://developers.openai.com/api/docs/guides/agents'
|
|
21
|
+
}),
|
|
22
|
+
Object.freeze({
|
|
23
|
+
source_id: 'codex_skills',
|
|
24
|
+
url: 'https://developers.openai.com/codex/skills'
|
|
25
|
+
}),
|
|
26
|
+
Object.freeze({
|
|
27
|
+
source_id: 'codex_plugins',
|
|
28
|
+
url: 'https://developers.openai.com/codex/plugins'
|
|
29
|
+
}),
|
|
30
|
+
Object.freeze({
|
|
31
|
+
source_id: 'openai_plugins_repository',
|
|
32
|
+
url: 'https://github.com/openai/plugins'
|
|
33
|
+
})
|
|
34
|
+
]);
|
|
35
|
+
export const ALIGN_DEPRECATED_MIGRATION_SOURCES = Object.freeze([
|
|
36
|
+
Object.freeze({
|
|
37
|
+
source_id: 'openai_skills_repository',
|
|
38
|
+
url: 'https://github.com/openai/skills',
|
|
39
|
+
disposition: 'deprecated_migration_evidence'
|
|
40
|
+
})
|
|
11
41
|
]);
|
|
12
42
|
export const ALIGN_WORKSTREAMS = Object.freeze([
|
|
13
43
|
'latest_model_prompt_grammar',
|
|
14
44
|
'programmatic_tool_calling',
|
|
15
45
|
'agents_guidance',
|
|
16
|
-
'
|
|
46
|
+
'plugins_guidance_and_skills_migration',
|
|
17
47
|
'latest_only_cleanup',
|
|
18
48
|
'deduplicate_prompt_config'
|
|
19
49
|
]);
|
|
50
|
+
export const ALIGN_REQUIRED_VERIFICATIONS = Object.freeze([
|
|
51
|
+
'typecheck',
|
|
52
|
+
'build',
|
|
53
|
+
'focused_tests',
|
|
54
|
+
'skill_surface_audit',
|
|
55
|
+
'release_affected'
|
|
56
|
+
]);
|
|
57
|
+
export const ALIGN_PROMPT_EVALUATION_MIN_CASES = 12;
|
|
20
58
|
export function buildAlignPlan(missionId, task) {
|
|
59
|
+
const surfaceInventory = buildAlignSurfaceInventory();
|
|
21
60
|
return {
|
|
22
|
-
schema: 'sks.align-plan.
|
|
23
|
-
schema_version:
|
|
61
|
+
schema: 'sks.align-plan.v2',
|
|
62
|
+
schema_version: 2,
|
|
24
63
|
generated_at: nowIso(),
|
|
25
64
|
mission_id: missionId,
|
|
26
65
|
task: String(task || '').trim() || 'Align SKS prompts, settings, and skills to the latest GPT-5.6 official guides',
|
|
27
|
-
|
|
66
|
+
official_sources: ALIGN_OFFICIAL_SOURCES,
|
|
67
|
+
deprecated_migration_sources: ALIGN_DEPRECATED_MIGRATION_SOURCES,
|
|
28
68
|
workstreams: ALIGN_WORKSTREAMS,
|
|
69
|
+
required_verifications: ALIGN_REQUIRED_VERIFICATIONS,
|
|
70
|
+
prompt_evaluation_min_cases: ALIGN_PROMPT_EVALUATION_MIN_CASES,
|
|
71
|
+
surface_inventory: surfaceInventory,
|
|
29
72
|
policy: {
|
|
30
73
|
latest_only: true,
|
|
31
74
|
no_legacy_compat: true,
|
|
32
75
|
deduplicate: true,
|
|
33
|
-
immutable_core_skills_protected: true
|
|
76
|
+
immutable_core_skills_protected: true,
|
|
77
|
+
exhaustive_command_skill_audit: true,
|
|
78
|
+
evidence_required: true
|
|
34
79
|
},
|
|
35
80
|
next_actions: [
|
|
36
|
-
'
|
|
37
|
-
'
|
|
38
|
-
'
|
|
39
|
-
'
|
|
40
|
-
'
|
|
41
|
-
|
|
81
|
+
'Retrieve every exact official source and record a receipt with evidence',
|
|
82
|
+
'Apply GPT-5.6 prompting, programmatic tool calling, Agents, Codex Skills, and Codex Plugins guidance',
|
|
83
|
+
'Treat openai/skills only as deprecated migration evidence; use openai/plugins as the active repository',
|
|
84
|
+
'Audit the plan-sealed command and skill inventories with exact exhaustive receipts and zero missing surfaces',
|
|
85
|
+
'Record evidence-backed Programmatic Tool Calling and Agents SDK adoption decisions',
|
|
86
|
+
`Run at least ${ALIGN_PROMPT_EVALUATION_MIN_CASES} prompt evaluation cases, immutable core integrity, and verification checks`,
|
|
87
|
+
'Record changed paths; keep latest-version only, delete legacy settings, and record deduplication results or an evidenced none-required review',
|
|
88
|
+
'Pass align-gate.json with mission-consistent evidence and no blockers, then finish with Honest Mode'
|
|
42
89
|
]
|
|
43
90
|
};
|
|
44
91
|
}
|
|
45
92
|
export function buildAlignLedgerSeed(missionId) {
|
|
93
|
+
const surfaceInventory = buildAlignSurfaceInventory();
|
|
94
|
+
const emptyCoverage = (inventory) => ({
|
|
95
|
+
receipt_kind: 'exhaustive_inventory_audit',
|
|
96
|
+
inventory_sha256: inventory.sha256,
|
|
97
|
+
expected_count: inventory.count,
|
|
98
|
+
audited_count: 0,
|
|
99
|
+
audited_surfaces: [],
|
|
100
|
+
missing_surfaces: [...inventory.surfaces],
|
|
101
|
+
evidence: []
|
|
102
|
+
});
|
|
103
|
+
const pendingDecision = () => ({
|
|
104
|
+
decision: 'pending',
|
|
105
|
+
reason: '',
|
|
106
|
+
evidence: []
|
|
107
|
+
});
|
|
46
108
|
return {
|
|
47
|
-
schema: 'sks.align-ledger.
|
|
48
|
-
schema_version:
|
|
109
|
+
schema: 'sks.align-ledger.v2',
|
|
110
|
+
schema_version: 2,
|
|
49
111
|
generated_at: nowIso(),
|
|
50
112
|
mission_id: missionId,
|
|
51
|
-
|
|
113
|
+
workstream_receipts: ALIGN_WORKSTREAMS.map((workstream) => ({
|
|
114
|
+
workstream,
|
|
115
|
+
status: 'pending',
|
|
116
|
+
evidence: []
|
|
117
|
+
})),
|
|
118
|
+
official_source_receipts: [],
|
|
119
|
+
deprecated_source_receipts: [],
|
|
120
|
+
surface_coverage: {
|
|
121
|
+
commands: emptyCoverage(surfaceInventory.commands),
|
|
122
|
+
skills: emptyCoverage(surfaceInventory.skills)
|
|
123
|
+
},
|
|
124
|
+
decisions: {
|
|
125
|
+
programmatic_tool_calling: pendingDecision(),
|
|
126
|
+
agents_sdk: pendingDecision()
|
|
127
|
+
},
|
|
128
|
+
prompt_evaluation: {
|
|
129
|
+
status: 'pending',
|
|
130
|
+
cases_expected: 0,
|
|
131
|
+
cases_passed: 0,
|
|
132
|
+
failures: [],
|
|
133
|
+
evidence: []
|
|
134
|
+
},
|
|
135
|
+
immutable_core_integrity: {
|
|
136
|
+
status: 'pending',
|
|
137
|
+
evidence: []
|
|
138
|
+
},
|
|
139
|
+
verification_receipts: [],
|
|
52
140
|
changed_paths: [],
|
|
141
|
+
change_review: {
|
|
142
|
+
outcome: 'pending',
|
|
143
|
+
evidence: []
|
|
144
|
+
},
|
|
53
145
|
deleted_legacy_settings: [],
|
|
54
146
|
deduplicated_surfaces: [],
|
|
147
|
+
deduplication_review: {
|
|
148
|
+
outcome: 'pending',
|
|
149
|
+
reviewed_surfaces: [],
|
|
150
|
+
evidence: []
|
|
151
|
+
},
|
|
55
152
|
blockers: [],
|
|
56
153
|
notes: []
|
|
57
154
|
};
|
|
58
155
|
}
|
|
59
|
-
export function evaluateAlignGate(plan, ledger, missionId) {
|
|
156
|
+
export function evaluateAlignGate(plan, ledger, missionId, options = {}) {
|
|
60
157
|
const blockers = [];
|
|
61
|
-
const
|
|
62
|
-
const
|
|
158
|
+
const officialSourceReceipts = arrayOrEmpty(ledger?.official_source_receipts);
|
|
159
|
+
const deprecatedSourceReceipts = arrayOrEmpty(ledger?.deprecated_source_receipts);
|
|
160
|
+
const workstreamReceipts = arrayOrEmpty(ledger?.workstream_receipts);
|
|
161
|
+
const verificationReceipts = arrayOrEmpty(ledger?.verification_receipts);
|
|
162
|
+
const currentSurfaceInventory = buildAlignSurfaceInventory();
|
|
163
|
+
const planPresent = Boolean(plan && plan.schema === 'sks.align-plan.v2' && plan.schema_version === 2);
|
|
164
|
+
const ledgerPresent = Boolean(ledger && ledger.schema === 'sks.align-ledger.v2' && ledger.schema_version === 2);
|
|
63
165
|
if (!planPresent)
|
|
64
|
-
blockers.push('
|
|
166
|
+
blockers.push('align_plan_v2_missing');
|
|
65
167
|
if (!ledgerPresent)
|
|
66
|
-
blockers.push('
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
168
|
+
blockers.push('align_ledger_v2_missing');
|
|
169
|
+
const missionIdConsistent = Boolean(planPresent
|
|
170
|
+
&& ledgerPresent
|
|
171
|
+
&& missionId
|
|
172
|
+
&& plan?.mission_id === missionId
|
|
173
|
+
&& ledger?.mission_id === missionId);
|
|
174
|
+
if (planPresent && ledgerPresent && !missionIdConsistent)
|
|
175
|
+
blockers.push('align_mission_id_mismatch');
|
|
176
|
+
const artifactMetadataValid = Boolean(planPresent
|
|
177
|
+
&& ledgerPresent
|
|
178
|
+
&& isIsoTimestamp(plan?.generated_at)
|
|
179
|
+
&& isIsoTimestamp(ledger?.generated_at)
|
|
180
|
+
&& isNonEmptyString(plan?.task));
|
|
181
|
+
if (!artifactMetadataValid)
|
|
182
|
+
blockers.push('align_artifact_metadata_invalid');
|
|
183
|
+
const officialSourcePlanComplete = hasExactSourceSet(plan?.official_sources, ALIGN_OFFICIAL_SOURCES);
|
|
184
|
+
if (!officialSourcePlanComplete)
|
|
185
|
+
blockers.push('align_official_source_plan_incomplete');
|
|
186
|
+
const deprecatedSourcePlanComplete = hasExactDeprecatedSourceSet(plan?.deprecated_migration_sources, ALIGN_DEPRECATED_MIGRATION_SOURCES);
|
|
187
|
+
if (!deprecatedSourcePlanComplete)
|
|
188
|
+
blockers.push('align_deprecated_source_plan_incomplete');
|
|
189
|
+
const workstreamPlanComplete = exactStringSet(plan?.workstreams, ALIGN_WORKSTREAMS);
|
|
190
|
+
if (!workstreamPlanComplete)
|
|
191
|
+
blockers.push('align_workstream_plan_incomplete');
|
|
192
|
+
const surfaceInventoryPlanComplete = inventoryMatches(plan?.surface_inventory?.commands, currentSurfaceInventory.commands) && inventoryMatches(plan?.surface_inventory?.skills, currentSurfaceInventory.skills);
|
|
193
|
+
if (!surfaceInventoryPlanComplete)
|
|
194
|
+
blockers.push('align_surface_inventory_plan_stale_or_incomplete');
|
|
195
|
+
const verificationPlanComplete = exactStringSet(plan?.required_verifications, ALIGN_REQUIRED_VERIFICATIONS);
|
|
196
|
+
if (!verificationPlanComplete)
|
|
197
|
+
blockers.push('align_required_verification_plan_incomplete');
|
|
198
|
+
const promptEvaluationPlanComplete = (plan?.prompt_evaluation_min_cases === ALIGN_PROMPT_EVALUATION_MIN_CASES);
|
|
199
|
+
if (!promptEvaluationPlanComplete)
|
|
200
|
+
blockers.push('align_prompt_evaluation_plan_incomplete');
|
|
201
|
+
const policyContractComplete = Boolean(plan?.policy?.latest_only === true
|
|
202
|
+
&& plan?.policy?.no_legacy_compat === true
|
|
203
|
+
&& plan?.policy?.deduplicate === true
|
|
204
|
+
&& plan?.policy?.immutable_core_skills_protected === true
|
|
205
|
+
&& plan?.policy?.exhaustive_command_skill_audit === true
|
|
206
|
+
&& plan?.policy?.evidence_required === true);
|
|
207
|
+
if (!policyContractComplete)
|
|
208
|
+
blockers.push('align_policy_contract_incomplete');
|
|
209
|
+
const deprecatedUrl = ALIGN_DEPRECATED_MIGRATION_SOURCES[0].url;
|
|
210
|
+
const deprecatedSourceNotActive = !containsUrl(plan?.official_sources, deprecatedUrl)
|
|
211
|
+
&& !containsUrl(officialSourceReceipts, deprecatedUrl);
|
|
212
|
+
if (!deprecatedSourceNotActive)
|
|
213
|
+
blockers.push('deprecated_openai_skills_source_active');
|
|
214
|
+
const officialSourceReceiptsComplete = ALIGN_OFFICIAL_SOURCES.every((required) => {
|
|
215
|
+
const matches = officialSourceReceipts.filter((receipt) => (receipt?.source_id === required.source_id && receipt?.url === required.url));
|
|
216
|
+
return matches.length === 1
|
|
217
|
+
&& matches[0]?.status === 'verified'
|
|
218
|
+
&& isIsoTimestamp(matches[0]?.retrieved_at)
|
|
219
|
+
&& evidenceComplete(matches[0]?.evidence, options);
|
|
220
|
+
}) && officialSourceReceipts.length === ALIGN_OFFICIAL_SOURCES.length;
|
|
221
|
+
if (!officialSourceReceiptsComplete)
|
|
222
|
+
blockers.push('align_official_source_receipts_incomplete');
|
|
223
|
+
const deprecatedSourceMigrationRecorded = ALIGN_DEPRECATED_MIGRATION_SOURCES.every((required) => {
|
|
224
|
+
const matches = deprecatedSourceReceipts.filter((receipt) => (receipt?.source_id === required.source_id && receipt?.url === required.url));
|
|
225
|
+
return matches.length === 1
|
|
226
|
+
&& matches[0]?.disposition === required.disposition
|
|
227
|
+
&& evidenceComplete(matches[0]?.evidence, options);
|
|
228
|
+
}) && deprecatedSourceReceipts.length === ALIGN_DEPRECATED_MIGRATION_SOURCES.length;
|
|
229
|
+
if (!deprecatedSourceMigrationRecorded)
|
|
230
|
+
blockers.push('deprecated_openai_skills_migration_evidence_missing');
|
|
231
|
+
const workstreamsComplete = ALIGN_WORKSTREAMS.every((required) => {
|
|
232
|
+
const matches = workstreamReceipts.filter((receipt) => receipt?.workstream === required);
|
|
233
|
+
return matches.length === 1
|
|
234
|
+
&& matches[0]?.status === 'complete'
|
|
235
|
+
&& evidenceComplete(matches[0]?.evidence, options);
|
|
236
|
+
}) && workstreamReceipts.length === ALIGN_WORKSTREAMS.length;
|
|
237
|
+
if (!workstreamsComplete)
|
|
238
|
+
blockers.push('align_workstream_evidence_incomplete');
|
|
239
|
+
const commandCoverageComplete = coverageComplete(ledger?.surface_coverage?.commands, plan?.surface_inventory?.commands, currentSurfaceInventory.commands, options);
|
|
240
|
+
const skillCoverageComplete = coverageComplete(ledger?.surface_coverage?.skills, plan?.surface_inventory?.skills, currentSurfaceInventory.skills, options);
|
|
241
|
+
if (!commandCoverageComplete)
|
|
242
|
+
blockers.push('align_command_surface_coverage_incomplete');
|
|
243
|
+
if (!skillCoverageComplete)
|
|
244
|
+
blockers.push('align_skill_surface_coverage_incomplete');
|
|
245
|
+
const programmaticToolCallingDecisionRecorded = decisionComplete(ledger?.decisions?.programmatic_tool_calling, options);
|
|
246
|
+
const agentsSdkDecisionRecorded = decisionComplete(ledger?.decisions?.agents_sdk, options);
|
|
247
|
+
if (!programmaticToolCallingDecisionRecorded)
|
|
248
|
+
blockers.push('align_programmatic_tool_calling_decision_missing');
|
|
249
|
+
if (!agentsSdkDecisionRecorded)
|
|
250
|
+
blockers.push('align_agents_sdk_decision_missing');
|
|
251
|
+
const promptEvaluationPassed = Boolean(promptEvaluationPlanComplete
|
|
252
|
+
&& ledger?.prompt_evaluation?.status === 'pass'
|
|
253
|
+
&& Number.isInteger(ledger.prompt_evaluation.cases_expected)
|
|
254
|
+
&& ledger.prompt_evaluation.cases_expected >= ALIGN_PROMPT_EVALUATION_MIN_CASES
|
|
255
|
+
&& ledger.prompt_evaluation.cases_passed === ledger.prompt_evaluation.cases_expected
|
|
256
|
+
&& Array.isArray(ledger.prompt_evaluation.failures)
|
|
257
|
+
&& ledger.prompt_evaluation.failures.length === 0
|
|
258
|
+
&& evidenceComplete(ledger.prompt_evaluation.evidence, options));
|
|
259
|
+
if (!promptEvaluationPassed)
|
|
260
|
+
blockers.push('align_prompt_evaluation_not_passed');
|
|
261
|
+
const immutableCoreIntegrityPassed = Boolean(ledger?.immutable_core_integrity?.status === 'pass'
|
|
262
|
+
&& evidenceComplete(ledger.immutable_core_integrity.evidence, options));
|
|
263
|
+
if (!immutableCoreIntegrityPassed)
|
|
264
|
+
blockers.push('align_immutable_core_integrity_not_passed');
|
|
265
|
+
const verificationReceiptsPassed = verificationPlanComplete
|
|
266
|
+
&& ALIGN_REQUIRED_VERIFICATIONS.every((kind) => {
|
|
267
|
+
const matches = verificationReceipts.filter((receipt) => receipt?.kind === kind);
|
|
268
|
+
return matches.length === 1
|
|
269
|
+
&& matches[0]?.status === 'pass'
|
|
270
|
+
&& matches[0]?.exit_code === 0
|
|
271
|
+
&& verificationCommandMatchesKind(kind, matches[0]?.command)
|
|
272
|
+
&& evidenceComplete(matches[0]?.evidence, options);
|
|
273
|
+
})
|
|
274
|
+
&& verificationReceipts.length === ALIGN_REQUIRED_VERIFICATIONS.length;
|
|
275
|
+
if (!verificationReceiptsPassed)
|
|
276
|
+
blockers.push('align_verification_receipts_not_passed');
|
|
71
277
|
const latestOnly = plan?.policy?.latest_only === true;
|
|
72
278
|
const noLegacyCompat = plan?.policy?.no_legacy_compat === true;
|
|
73
279
|
if (!latestOnly)
|
|
74
280
|
blockers.push('latest_only_policy_missing');
|
|
75
281
|
if (!noLegacyCompat)
|
|
76
282
|
blockers.push('no_legacy_compat_policy_missing');
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
283
|
+
const changedPaths = ledger?.changed_paths;
|
|
284
|
+
const changeReview = ledger?.change_review;
|
|
285
|
+
const changedPathsRecorded = Boolean(evidenceComplete(changeReview?.evidence, options)
|
|
286
|
+
&& (changeReview?.outcome === 'changed'
|
|
287
|
+
? hasUniqueStringList(changedPaths)
|
|
288
|
+
: changeReview?.outcome === 'none_required'
|
|
289
|
+
&& hasUniqueStringList(changedPaths, { allowEmpty: true })
|
|
290
|
+
&& changedPaths.length === 0));
|
|
291
|
+
if (!changedPathsRecorded)
|
|
292
|
+
blockers.push('align_changed_paths_missing');
|
|
293
|
+
const latestOnlyCleanupReviewComplete = Boolean(workstreamReceiptComplete(ledger, 'latest_only_cleanup', options)
|
|
294
|
+
&& hasUniqueStringList(ledger?.deleted_legacy_settings, { allowEmpty: true }));
|
|
295
|
+
if (!latestOnlyCleanupReviewComplete)
|
|
296
|
+
blockers.push('align_latest_only_cleanup_review_incomplete');
|
|
297
|
+
const deduplicatedSurfaces = ledger?.deduplicated_surfaces;
|
|
298
|
+
const deduplicationReview = ledger?.deduplication_review;
|
|
299
|
+
const reviewedSurfaces = deduplicationReview?.reviewed_surfaces;
|
|
300
|
+
const deduplicationReviewComplete = Boolean(workstreamReceiptComplete(ledger, 'deduplicate_prompt_config', options)
|
|
301
|
+
&& hasUniqueStringList(reviewedSurfaces)
|
|
302
|
+
&& evidenceComplete(deduplicationReview?.evidence, options)
|
|
303
|
+
&& (deduplicationReview?.outcome === 'deduplicated'
|
|
304
|
+
? hasUniqueStringList(deduplicatedSurfaces)
|
|
305
|
+
&& deduplicatedSurfaces.every((surface) => reviewedSurfaces?.includes(surface))
|
|
306
|
+
: deduplicationReview?.outcome === 'none_required'
|
|
307
|
+
&& hasUniqueStringList(deduplicatedSurfaces, { allowEmpty: true })
|
|
308
|
+
&& deduplicatedSurfaces.length === 0));
|
|
309
|
+
if (!deduplicationReviewComplete)
|
|
310
|
+
blockers.push('dedupe_evidence_missing');
|
|
311
|
+
const ledgerBlockersClear = Boolean(ledgerPresent
|
|
312
|
+
&& Array.isArray(ledger?.blockers)
|
|
313
|
+
&& ledger.blockers.length === 0);
|
|
314
|
+
if (ledgerPresent && !Array.isArray(ledger?.blockers))
|
|
315
|
+
blockers.push('align_blocker_ledger_missing');
|
|
80
316
|
if (Array.isArray(ledger?.blockers) && ledger.blockers.length > 0) {
|
|
81
317
|
blockers.push(...ledger.blockers.map((item) => `ledger:${item}`));
|
|
82
318
|
}
|
|
83
319
|
const passed = blockers.length === 0;
|
|
84
320
|
return {
|
|
85
|
-
schema: 'sks.align-gate.
|
|
86
|
-
schema_version:
|
|
321
|
+
schema: 'sks.align-gate.v2',
|
|
322
|
+
schema_version: 2,
|
|
87
323
|
generated_at: nowIso(),
|
|
88
324
|
mission_id: missionId,
|
|
89
325
|
passed,
|
|
@@ -91,17 +327,41 @@ export function evaluateAlignGate(plan, ledger, missionId) {
|
|
|
91
327
|
status: passed ? 'pass' : 'blocked',
|
|
92
328
|
plan_present: planPresent,
|
|
93
329
|
ledger_present: ledgerPresent,
|
|
330
|
+
mission_id_consistent: missionIdConsistent,
|
|
331
|
+
artifact_metadata_valid: artifactMetadataValid,
|
|
332
|
+
official_source_plan_complete: officialSourcePlanComplete,
|
|
333
|
+
deprecated_source_plan_complete: deprecatedSourcePlanComplete,
|
|
334
|
+
workstream_plan_complete: workstreamPlanComplete,
|
|
335
|
+
surface_inventory_plan_complete: surfaceInventoryPlanComplete,
|
|
336
|
+
official_source_receipts_complete: officialSourceReceiptsComplete,
|
|
337
|
+
deprecated_source_migration_recorded: deprecatedSourceMigrationRecorded,
|
|
338
|
+
deprecated_source_not_active: deprecatedSourceNotActive,
|
|
94
339
|
workstreams_complete: workstreamsComplete,
|
|
340
|
+
command_coverage_complete: commandCoverageComplete,
|
|
341
|
+
skill_coverage_complete: skillCoverageComplete,
|
|
342
|
+
verification_plan_complete: verificationPlanComplete,
|
|
343
|
+
prompt_evaluation_plan_complete: promptEvaluationPlanComplete,
|
|
344
|
+
policy_contract_complete: policyContractComplete,
|
|
345
|
+
programmatic_tool_calling_decision_recorded: programmaticToolCallingDecisionRecorded,
|
|
346
|
+
agents_sdk_decision_recorded: agentsSdkDecisionRecorded,
|
|
347
|
+
prompt_evaluation_passed: promptEvaluationPassed,
|
|
348
|
+
immutable_core_integrity_passed: immutableCoreIntegrityPassed,
|
|
349
|
+
verification_receipts_passed: verificationReceiptsPassed,
|
|
350
|
+
changed_paths_recorded: changedPathsRecorded,
|
|
351
|
+
latest_only_cleanup_review_complete: latestOnlyCleanupReviewComplete,
|
|
352
|
+
deduplication_review_complete: deduplicationReviewComplete,
|
|
353
|
+
ledger_blockers_clear: ledgerBlockersClear,
|
|
354
|
+
no_blockers: passed,
|
|
95
355
|
latest_only: latestOnly,
|
|
96
356
|
no_legacy_compat: noLegacyCompat,
|
|
97
|
-
dedupe_recorded:
|
|
357
|
+
dedupe_recorded: deduplicationReviewComplete,
|
|
98
358
|
blockers
|
|
99
359
|
};
|
|
100
360
|
}
|
|
101
361
|
export async function writeAlignRouteArtifacts(dir, missionId, task) {
|
|
102
362
|
const plan = buildAlignPlan(missionId, task);
|
|
103
363
|
const ledger = buildAlignLedgerSeed(missionId);
|
|
104
|
-
const gate = evaluateAlignGate(plan, ledger, missionId);
|
|
364
|
+
const gate = evaluateAlignGate(plan, ledger, missionId, { missionDir: dir });
|
|
105
365
|
await writeJsonAtomic(path.join(dir, ALIGN_PLAN_ARTIFACT), plan);
|
|
106
366
|
await writeJsonAtomic(path.join(dir, ALIGN_LEDGER_ARTIFACT), ledger);
|
|
107
367
|
await writeJsonAtomic(path.join(dir, ALIGN_GATE_ARTIFACT), gate);
|
|
@@ -113,15 +373,186 @@ export async function readAlignGate(dir) {
|
|
|
113
373
|
export async function refreshAlignGate(dir, missionId) {
|
|
114
374
|
const plan = await readJson(path.join(dir, ALIGN_PLAN_ARTIFACT), null);
|
|
115
375
|
const ledger = await readJson(path.join(dir, ALIGN_LEDGER_ARTIFACT), null);
|
|
116
|
-
const gate = evaluateAlignGate(plan, ledger, missionId);
|
|
376
|
+
const gate = evaluateAlignGate(plan, ledger, missionId, { missionDir: dir });
|
|
117
377
|
await writeJsonAtomic(path.join(dir, ALIGN_GATE_ARTIFACT), gate);
|
|
118
378
|
return { plan, ledger, gate };
|
|
119
379
|
}
|
|
120
380
|
export function alignNextActionText(missionId) {
|
|
121
381
|
return [
|
|
122
382
|
`Execute the $sks-align modernization mission ${missionId}.`,
|
|
123
|
-
'Read align-plan.json
|
|
124
|
-
'
|
|
125
|
-
'
|
|
383
|
+
'Read align-plan.json and retrieve every exact active GPT-5.6, Programmatic Tool Calling, Agents, Codex Skills, Codex Plugins, and openai/plugins source.',
|
|
384
|
+
'Treat openai/skills only as deprecated migration evidence. Audit every command and skill surface, record PTC and Agents SDK decisions,',
|
|
385
|
+
'run prompt evaluation, immutable-core integrity, and verification checks, then pass the mission-consistent align-gate.json with no blockers.'
|
|
126
386
|
].join(' ');
|
|
127
387
|
}
|
|
388
|
+
function coverageComplete(coverage, planInventory, currentInventory, options) {
|
|
389
|
+
return Boolean(coverage
|
|
390
|
+
&& coverage.receipt_kind === 'exhaustive_inventory_audit'
|
|
391
|
+
&& inventoryMatches(planInventory, currentInventory)
|
|
392
|
+
&& coverage.inventory_sha256 === currentInventory.sha256
|
|
393
|
+
&& coverage.expected_count === currentInventory.count
|
|
394
|
+
&& coverage.audited_count === coverage.expected_count
|
|
395
|
+
&& exactStringSet(coverage.audited_surfaces, currentInventory.surfaces)
|
|
396
|
+
&& Array.isArray(coverage.missing_surfaces)
|
|
397
|
+
&& coverage.missing_surfaces.length === 0
|
|
398
|
+
&& evidenceComplete(coverage.evidence, options));
|
|
399
|
+
}
|
|
400
|
+
function decisionComplete(record, options) {
|
|
401
|
+
return Boolean(record
|
|
402
|
+
&& record.decision !== 'pending'
|
|
403
|
+
&& ['adopt', 'do_not_adopt', 'not_applicable'].includes(record.decision)
|
|
404
|
+
&& isNonEmptyString(record.reason)
|
|
405
|
+
&& evidenceComplete(record.evidence, options));
|
|
406
|
+
}
|
|
407
|
+
function workstreamReceiptComplete(ledger, workstream, options) {
|
|
408
|
+
const matches = arrayOrEmpty(ledger?.workstream_receipts)
|
|
409
|
+
.filter((receipt) => receipt?.workstream === workstream);
|
|
410
|
+
return matches.length === 1
|
|
411
|
+
&& matches[0]?.status === 'complete'
|
|
412
|
+
&& evidenceComplete(matches[0]?.evidence, options);
|
|
413
|
+
}
|
|
414
|
+
function hasExactSourceSet(actual, expected) {
|
|
415
|
+
if (!Array.isArray(actual) || actual.length !== expected.length)
|
|
416
|
+
return false;
|
|
417
|
+
return expected.every((required) => (actual.filter((source) => (source?.source_id === required.source_id && source?.url === required.url)).length === 1));
|
|
418
|
+
}
|
|
419
|
+
function hasExactDeprecatedSourceSet(actual, expected) {
|
|
420
|
+
if (!Array.isArray(actual) || actual.length !== expected.length)
|
|
421
|
+
return false;
|
|
422
|
+
return expected.every((required) => (actual.filter((source) => (source?.source_id === required.source_id
|
|
423
|
+
&& source?.url === required.url
|
|
424
|
+
&& source?.disposition === required.disposition)).length === 1));
|
|
425
|
+
}
|
|
426
|
+
function containsUrl(actual, url) {
|
|
427
|
+
return Array.isArray(actual) && actual.some((source) => source?.url === url);
|
|
428
|
+
}
|
|
429
|
+
function hasStringList(value) {
|
|
430
|
+
return Array.isArray(value) && value.length > 0 && value.every(isNonEmptyString);
|
|
431
|
+
}
|
|
432
|
+
function hasUniqueStringList(value, options = {}) {
|
|
433
|
+
if (!Array.isArray(value))
|
|
434
|
+
return false;
|
|
435
|
+
if (!options.allowEmpty && value.length === 0)
|
|
436
|
+
return false;
|
|
437
|
+
if (!value.every(isNonEmptyString))
|
|
438
|
+
return false;
|
|
439
|
+
if (!value.every((item) => item === item.trim()))
|
|
440
|
+
return false;
|
|
441
|
+
const normalized = value.map((item) => item.trim());
|
|
442
|
+
return new Set(normalized).size === normalized.length;
|
|
443
|
+
}
|
|
444
|
+
function evidenceComplete(value, options) {
|
|
445
|
+
if (!hasStringList(value))
|
|
446
|
+
return false;
|
|
447
|
+
const references = value;
|
|
448
|
+
if (!references.every(isSafeMissionEvidenceReference))
|
|
449
|
+
return false;
|
|
450
|
+
if (new Set(references).size !== references.length)
|
|
451
|
+
return false;
|
|
452
|
+
if (!options.missionDir)
|
|
453
|
+
return true;
|
|
454
|
+
const missionDir = path.resolve(options.missionDir);
|
|
455
|
+
let realMissionDir;
|
|
456
|
+
try {
|
|
457
|
+
realMissionDir = fs.realpathSync(missionDir);
|
|
458
|
+
}
|
|
459
|
+
catch {
|
|
460
|
+
return false;
|
|
461
|
+
}
|
|
462
|
+
return references.every((reference) => {
|
|
463
|
+
const target = path.resolve(missionDir, reference);
|
|
464
|
+
if (!isPathInside(missionDir, target))
|
|
465
|
+
return false;
|
|
466
|
+
try {
|
|
467
|
+
const realTarget = fs.realpathSync(target);
|
|
468
|
+
if (!isPathInside(realMissionDir, realTarget))
|
|
469
|
+
return false;
|
|
470
|
+
const stat = fs.lstatSync(target);
|
|
471
|
+
return stat.isFile() && !stat.isSymbolicLink() && stat.size > 0;
|
|
472
|
+
}
|
|
473
|
+
catch {
|
|
474
|
+
return false;
|
|
475
|
+
}
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
function isSafeMissionEvidenceReference(value) {
|
|
479
|
+
if (!value.startsWith('evidence/') || value.includes('\\') || value.includes('\0'))
|
|
480
|
+
return false;
|
|
481
|
+
if (path.isAbsolute(value))
|
|
482
|
+
return false;
|
|
483
|
+
const segments = value.split('/');
|
|
484
|
+
return segments.length > 1
|
|
485
|
+
&& segments.every((segment) => (segment.length > 0
|
|
486
|
+
&& segment !== '.'
|
|
487
|
+
&& segment !== '..'
|
|
488
|
+
&& /^[a-zA-Z0-9._-]+$/.test(segment)));
|
|
489
|
+
}
|
|
490
|
+
function isPathInside(root, target) {
|
|
491
|
+
const relative = path.relative(root, target);
|
|
492
|
+
return relative.length > 0
|
|
493
|
+
&& relative !== '..'
|
|
494
|
+
&& !relative.startsWith(`..${path.sep}`)
|
|
495
|
+
&& !path.isAbsolute(relative);
|
|
496
|
+
}
|
|
497
|
+
function isNonEmptyString(value) {
|
|
498
|
+
return typeof value === 'string' && value.trim().length > 0;
|
|
499
|
+
}
|
|
500
|
+
function isIsoTimestamp(value) {
|
|
501
|
+
if (!isNonEmptyString(value))
|
|
502
|
+
return false;
|
|
503
|
+
const parsed = Date.parse(value);
|
|
504
|
+
return Number.isFinite(parsed) && new Date(parsed).toISOString() === value;
|
|
505
|
+
}
|
|
506
|
+
function verificationCommandMatchesKind(kind, value) {
|
|
507
|
+
if (!isNonEmptyString(value))
|
|
508
|
+
return false;
|
|
509
|
+
const command = value.trim().replace(/\s+/g, ' ');
|
|
510
|
+
if (/[;&|`$<>]/u.test(command))
|
|
511
|
+
return false;
|
|
512
|
+
switch (kind) {
|
|
513
|
+
case 'typecheck':
|
|
514
|
+
return /^npm run typecheck(?: --silent)?$/.test(command);
|
|
515
|
+
case 'build':
|
|
516
|
+
return /^npm run build(?::(?:clean|incremental))?(?: --silent)?$/.test(command);
|
|
517
|
+
case 'focused_tests':
|
|
518
|
+
return /^(?:bun test(?: .+)?|npm test(?: -- .+)?)$/.test(command);
|
|
519
|
+
case 'skill_surface_audit':
|
|
520
|
+
return command === 'node ./dist/scripts/skill-surface-modernization-check.js';
|
|
521
|
+
case 'release_affected':
|
|
522
|
+
return /^npm run release:check:affected(?: --silent)?$/.test(command);
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
function arrayOrEmpty(value) {
|
|
526
|
+
return Array.isArray(value) ? [...value] : [];
|
|
527
|
+
}
|
|
528
|
+
function buildAlignSurfaceInventory() {
|
|
529
|
+
const commands = uniqueSorted(commandManifestNames());
|
|
530
|
+
const skills = uniqueSorted(MANAGED_ROUTE_SKILL_NAMES);
|
|
531
|
+
return {
|
|
532
|
+
commands: sealedInventory(commands),
|
|
533
|
+
skills: sealedInventory(skills)
|
|
534
|
+
};
|
|
535
|
+
}
|
|
536
|
+
function sealedInventory(surfaces) {
|
|
537
|
+
return {
|
|
538
|
+
count: surfaces.length,
|
|
539
|
+
sha256: sha256(JSON.stringify(surfaces)),
|
|
540
|
+
surfaces
|
|
541
|
+
};
|
|
542
|
+
}
|
|
543
|
+
function inventoryMatches(actual, expected) {
|
|
544
|
+
return Boolean(actual
|
|
545
|
+
&& actual.count === expected.count
|
|
546
|
+
&& actual.sha256 === expected.sha256
|
|
547
|
+
&& exactStringSet(actual.surfaces, expected.surfaces));
|
|
548
|
+
}
|
|
549
|
+
function exactStringSet(actual, expected) {
|
|
550
|
+
const expectedSorted = [...expected].sort();
|
|
551
|
+
return Array.isArray(actual)
|
|
552
|
+
&& actual.length === expected.length
|
|
553
|
+
&& actual.every(isNonEmptyString)
|
|
554
|
+
&& [...actual].sort().every((item, index) => item === expectedSorted[index]);
|
|
555
|
+
}
|
|
556
|
+
function uniqueSorted(values) {
|
|
557
|
+
return [...new Set(values.filter(isNonEmptyString))].sort();
|
|
558
|
+
}
|
|
@@ -25,10 +25,7 @@ export const NATIVE_SOURCE_FILES = [
|
|
|
25
25
|
'ProvidersOpenRouter.swift',
|
|
26
26
|
'ProvidersRoleModels.swift',
|
|
27
27
|
'ProvidersMultiProvider.swift',
|
|
28
|
-
'
|
|
29
|
-
'RemoteTelegramViewController.swift',
|
|
30
|
-
'RemoteTelegramCenterState.swift',
|
|
31
|
-
'RemoteTelegramRendering.swift',
|
|
28
|
+
'RemoteCodingViewController.swift',
|
|
32
29
|
'DiagnosticsViewController.swift',
|
|
33
30
|
'SettingsViewController.swift',
|
|
34
31
|
'OperationCoordinator.swift',
|
|
@@ -9,7 +9,7 @@ import { MENU_ITEMS, SKS_MENUBAR_LABEL } from './constants.js';
|
|
|
9
9
|
import { resolveCodexBundleId, writeDefaultMenuBarConfig } from './config.js';
|
|
10
10
|
import { applyMenuBarGenerationTransaction, commitMenuBarGenerationTransaction, installGenerationPairs, MenuBarGenerationTransactionError, recoverMenuBarGenerationTransaction, rollbackGenerationPairs } from './generation-transaction.js';
|
|
11
11
|
import { launchAgentSource, launchMenuBar, seedMenuBarPreferredPosition } from './launch-agent.js';
|
|
12
|
-
import { cleanupMacLaunchSecretEnvironment } from './migration.js';
|
|
12
|
+
import { cleanupMacLaunchSecretEnvironment, cleanupRetiredRemoteBridgeLaunchAgent, quarantineRetiredRemoteBridgeBindings } from './migration.js';
|
|
13
13
|
import { sksMenuBarPaths } from './paths.js';
|
|
14
14
|
import { infoPlistSource, inspectInstalledResources, loadNativeMenuBarSources, nativeResourceHashes } from './resources.js';
|
|
15
15
|
import { inspectMenuBarArtifactSet, normalizeLegacyMenuBarBuildStamp, rollbackSksMenuBar } from './rollback.js';
|
|
@@ -70,6 +70,25 @@ export async function installSksMenuBar(opts = {}) {
|
|
|
70
70
|
if (recovery.status === 'completed_commit')
|
|
71
71
|
actions.push(`completed committed Menu Bar ${pending.purpose} transaction cleanup`);
|
|
72
72
|
}
|
|
73
|
+
const retiredRemoteBridge = await cleanupRetiredRemoteBridgeLaunchAgent({
|
|
74
|
+
home: paths.home,
|
|
75
|
+
env
|
|
76
|
+
});
|
|
77
|
+
warnings.push(...retiredRemoteBridge.warnings);
|
|
78
|
+
if (!retiredRemoteBridge.ok) {
|
|
79
|
+
return blocked(retiredRemoteBridge.blockers[0] || 'retired_remote_bridge_cleanup_failed', 'The retired SKS remote bridge LaunchAgent could not be stopped safely.');
|
|
80
|
+
}
|
|
81
|
+
if (retiredRemoteBridge.removed) {
|
|
82
|
+
actions.push('stopped and removed the retired SKS remote bridge LaunchAgent');
|
|
83
|
+
}
|
|
84
|
+
const retiredBindings = await quarantineRetiredRemoteBridgeBindings(paths.root);
|
|
85
|
+
warnings.push(...retiredBindings.warnings);
|
|
86
|
+
if (!retiredBindings.ok) {
|
|
87
|
+
return blocked(retiredBindings.blockers[0] || 'retired_remote_bridge_binding_cleanup_failed', 'Retired remote bridge bindings could not be quarantined safely.');
|
|
88
|
+
}
|
|
89
|
+
if (retiredBindings.status === 'quarantined') {
|
|
90
|
+
actions.push(`quarantined ${retiredBindings.retired_binding_count} retired remote bridge binding(s)`);
|
|
91
|
+
}
|
|
73
92
|
cleanup = await cleanupMacLaunchSecretEnvironment({ env });
|
|
74
93
|
if (!cleanup.ok)
|
|
75
94
|
warnings.push('launch_secret_env_cleanup_incomplete');
|