owlrunkit 0.18.0 → 0.18.1

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.
Files changed (26) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +13 -1
  3. package/docs/architecture/OWLCODA_RUNKIT_USAGE_MODE_SELECTION_PRODUCT_DECISION_20260811.md +142 -0
  4. package/integrations/codex/skills/owlcoda-runkit/SKILL.md +41 -16
  5. package/integrations/codex/skills/owlcoda-runkit/assets/templates/config.json +3 -3
  6. package/package.json +1 -1
  7. package/packages/attest/distribution-manifest-v1.json +6 -1
  8. package/packages/attest/src/quick.mjs +6 -1
  9. package/registry-release-policy-v1.json +5 -5
  10. package/sbom.spdx.json +5 -5
  11. package/scripts/runkit-contract/assurance-router.mjs +28 -20
  12. package/scripts/runkit-contract/core-contract.mjs +5 -1
  13. package/scripts/runkit-contract/inspect-presentation.mjs +38 -5
  14. package/scripts/runkit-contract/install-codex-skill.mjs +60 -1
  15. package/scripts/runkit-contract/onboarding-doctor.mjs +19 -1
  16. package/scripts/runkit-contract/profile-onboarding.mjs +597 -22
  17. package/scripts/runkit-contract/project-cli-resolver.mjs +3 -0
  18. package/scripts/runkit-contract/quick-attest.mjs +1 -0
  19. package/scripts/runkit-contract/quick-metrics.mjs +43 -5
  20. package/scripts/runkit-contract/quick-verify.mjs +15 -4
  21. package/scripts/runkit-contract/runkit-cli.mjs +196 -8
  22. package/scripts/runkit-contract/schemas/profile-reconcile-plan-v1.schema.json +105 -0
  23. package/scripts/runkit-contract/schemas/profile-reconcile-receipt-v1.schema.json +60 -0
  24. package/scripts/runkit-contract/schemas/usage-mode-recommendation-v1.schema.json +136 -0
  25. package/scripts/runkit-contract/templates/assurance-request.json +6 -0
  26. package/scripts/runkit-contract/usage-mode.mjs +229 -0
@@ -16,6 +16,7 @@ import path from "node:path";
16
16
  import { pathToFileURL } from "node:url";
17
17
 
18
18
  import {
19
+ currentCoreIdentity,
19
20
  initializeProjectRunKit,
20
21
  isDirectExecution,
21
22
  validateProjectConfigV2,
@@ -193,6 +194,64 @@ export async function inspectInstalledSkill({ targetRoot } = {}) {
193
194
  };
194
195
  }
195
196
 
197
+ export async function inspectInstalledSkillCompatibility({ targetRoot } = {}) {
198
+ const integrity = await inspectInstalledSkill({ targetRoot });
199
+ if (!integrity.valid) {
200
+ return {
201
+ ...integrity,
202
+ integrityValid: false,
203
+ authorizationGranted: false,
204
+ };
205
+ }
206
+
207
+ const expectedCore = currentCoreIdentity();
208
+ let installedSkillVersion = null;
209
+ let installedConfigCore = null;
210
+ const issues = [];
211
+ try {
212
+ const skillText = await readFile(path.join(targetRoot, "SKILL.md"), "utf8");
213
+ installedSkillVersion = skillText.match(/standalone `owlrunkit@(\d+\.\d+\.\d+)`/u)?.[1] ?? null;
214
+ installedConfigCore = JSON.parse(await readFile(
215
+ path.join(targetRoot, "assets/templates/config.json"),
216
+ "utf8",
217
+ )).core ?? null;
218
+ } catch {
219
+ issues.push("installed_skill_version_declaration_invalid");
220
+ }
221
+
222
+ const installedConfigCoreVersion = installedConfigCore?.coreVersion ?? null;
223
+ if (installedSkillVersion === null || installedConfigCoreVersion === null) {
224
+ issues.push("installed_skill_core_version_declaration_missing");
225
+ } else if (
226
+ installedSkillVersion !== expectedCore.coreVersion
227
+ || installedConfigCoreVersion !== expectedCore.coreVersion
228
+ ) {
229
+ issues.push(
230
+ `installed_skill_core_version_mismatch:expected_${expectedCore.coreVersion}`
231
+ + `:skill_${installedSkillVersion}:config_${installedConfigCoreVersion}`,
232
+ );
233
+ } else if (!sameCoreIdentity(installedConfigCore, expectedCore)) {
234
+ issues.push(
235
+ `installed_skill_core_identity_mismatch:expected_${expectedCore.coreManifestSha256}`
236
+ + `:config_${installedConfigCore?.coreManifestSha256 ?? "missing"}`,
237
+ );
238
+ }
239
+
240
+ return {
241
+ ...integrity,
242
+ status: issues.length === 0 ? "valid" : "version_mismatch",
243
+ valid: issues.length === 0,
244
+ integrityValid: true,
245
+ expectedCoreVersion: expectedCore.coreVersion,
246
+ expectedCore,
247
+ installedSkillVersion,
248
+ installedConfigCoreVersion,
249
+ installedConfigCore,
250
+ issues,
251
+ authorizationGranted: false,
252
+ };
253
+ }
254
+
196
255
  export async function inspectFleetForSkillChange({
197
256
  workspaceRoots = null,
198
257
  fleetManifestPath = null,
@@ -731,7 +790,7 @@ export async function runCli(argv = process.argv.slice(2)) {
731
790
  return { exitCode: 0, ...output };
732
791
  }
733
792
  if (command === "inspect") {
734
- const output = await inspectInstalledSkill({ targetRoot: options.target });
793
+ const output = await inspectInstalledSkillCompatibility({ targetRoot: options.target });
735
794
  return { exitCode: output.valid ? 0 : 2, ...output };
736
795
  }
737
796
  if (command === "restore") {
@@ -583,6 +583,24 @@ function profilesCheck(root) {
583
583
  }
584
584
  }
585
585
 
586
+ async function doctorProfilesCheck(root) {
587
+ const launcherCheck = profilesCheck(root);
588
+ if (launcherCheck.status === "missing") return launcherCheck;
589
+ const { validateProfiles } = await import("./profile-onboarding.mjs");
590
+ const validation = validateProfiles({ workspaceRoot: root });
591
+ const issues = [...new Set([
592
+ ...(launcherCheck.launcherIssues ?? []),
593
+ ...validation.issues,
594
+ ])].sort();
595
+ return {
596
+ ...launcherCheck,
597
+ status: issues.length === 0 ? "ok" : "invalid",
598
+ validationStatus: validation.status,
599
+ validationIssues: validation.issues,
600
+ ...(issues.length > 0 ? { issues } : {}),
601
+ };
602
+ }
603
+
586
604
  export function readProfileLauncherReadiness({ workspaceRoot } = {}) {
587
605
  const profiles = profilesCheck(resolveBoundedWorkspaceRoot(workspaceRoot));
588
606
  const launcherWarnings = profiles.launcherWarnings ?? [];
@@ -646,7 +664,7 @@ export async function runDoctor({
646
664
  });
647
665
  const nodeOk = Number(process.versions.node.split(".")[0]) >= 20;
648
666
  const config = configCheck(root);
649
- const profiles = profilesCheck(root);
667
+ const profiles = await doctorProfilesCheck(root);
650
668
  const adoption = adoptionCheck(root, installed);
651
669
  const runtimeIsolation = runtimeIsolationCheck(root);
652
670
  const checks = {