owlrunkit 0.20.0 → 0.22.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.
Files changed (50) hide show
  1. package/CHANGELOG.md +88 -0
  2. package/README.md +102 -10
  3. package/docs/architecture/OWLCODA_RUNKIT_0201_RELEASE_TRUTH_AND_PROFILE_NORMALIZATION_PATCH_DECISION_20260813.md +95 -0
  4. package/docs/architecture/OWLCODA_RUNKIT_021_TEAM_DELIVERY_PHASE2_PRODUCT_DECISION_20260813.md +249 -0
  5. package/integrations/codex/skills/owlcoda-runkit/SKILL.md +117 -12
  6. package/integrations/codex/skills/owlcoda-runkit/assets/templates/config.json +3 -3
  7. package/package.json +1 -1
  8. package/packages/attest/README.md +7 -1
  9. package/packages/attest/consumer-surface-v3.json +275 -0
  10. package/packages/attest/distribution-manifest-v1.json +24 -0
  11. package/packages/attest/schemas/canonical-candidate-identity-v1.schema.json +112 -0
  12. package/packages/attest/schemas/foreign-workspace-filesystem-identity-v1.schema.json +32 -0
  13. package/packages/attest/schemas/quick-verification-receipt-v4.schema.json +226 -0
  14. package/packages/attest/src/candidate-identity.mjs +454 -0
  15. package/packages/attest/src/index.mjs +11 -0
  16. package/packages/attest/src/quick-receipt-contract.mjs +126 -5
  17. package/packages/attest/src/quick.mjs +53 -8
  18. package/{registry-release-policy-v1.json → registry-release-policy-v2.json} +8 -9
  19. package/sbom.spdx.json +4 -4
  20. package/scripts/runkit-contract/core-contract.mjs +19 -1
  21. package/scripts/runkit-contract/fleet-skill-plan.mjs +223 -0
  22. package/scripts/runkit-contract/formal-workflow.mjs +3 -1
  23. package/scripts/runkit-contract/hook-recovery.mjs +496 -0
  24. package/scripts/runkit-contract/inspect-presentation.mjs +187 -0
  25. package/scripts/runkit-contract/install-codex-skill.mjs +1 -0
  26. package/scripts/runkit-contract/onboarding-bootstrap.mjs +15 -0
  27. package/scripts/runkit-contract/onboarding-doctor.mjs +378 -9
  28. package/scripts/runkit-contract/profile-onboarding.mjs +6 -0
  29. package/scripts/runkit-contract/project-cli-resolver.mjs +17 -1
  30. package/scripts/runkit-contract/quick-metrics.mjs +9 -5
  31. package/scripts/runkit-contract/quick-verify.mjs +108 -24
  32. package/scripts/runkit-contract/registry-adoption-gate.mjs +12 -3
  33. package/scripts/runkit-contract/registry-adoption.mjs +10 -5
  34. package/scripts/runkit-contract/runkit-bootstrap.mjs +1 -0
  35. package/scripts/runkit-contract/runkit-cli.mjs +332 -30
  36. package/scripts/runkit-contract/schemas/delivery-lifecycle-v1.schema.json +91 -0
  37. package/scripts/runkit-contract/schemas/external-gate-v1.schema.json +68 -0
  38. package/scripts/runkit-contract/schemas/fleet-skill-upgrade-plan-v1.schema.json +140 -0
  39. package/scripts/runkit-contract/schemas/hook-recovery-v1.schema.json +592 -0
  40. package/scripts/runkit-contract/schemas/inspect-compact-v1.schema.json +93 -0
  41. package/scripts/runkit-contract/schemas/inspect-compact-v2.schema.json +122 -0
  42. package/scripts/runkit-contract/schemas/team-delivery-status-v2.schema.json +219 -0
  43. package/scripts/runkit-contract/schemas/team-delivery-status-v3.schema.json +113 -0
  44. package/scripts/runkit-contract/schemas/team-project-event-v6.schema.json +82 -0
  45. package/scripts/runkit-contract/schemas/team-project-event-v7.schema.json +80 -0
  46. package/scripts/runkit-contract/schemas/team-project-status-v4.schema.json +208 -0
  47. package/scripts/runkit-contract/schemas/team-recommendation-v2.schema.json +120 -0
  48. package/scripts/runkit-contract/sync-release-identity.mjs +87 -0
  49. package/scripts/runkit-contract/team-delivery.mjs +203 -3
  50. package/scripts/runkit-contract/team-project.mjs +1032 -11
@@ -9,6 +9,7 @@ import { parseJsonStrict } from "./quick-canonical.mjs";
9
9
  import {
10
10
  normalizeTeamProjectDefinitionV1,
11
11
  readTeamProjectStatusV3,
12
+ readTeamProjectStatusV4,
12
13
  teamProjectDefinitionBindingV1,
13
14
  } from "./team-project.mjs";
14
15
 
@@ -45,6 +46,10 @@ const TRANSFER_LIFECYCLES = new Set([
45
46
  "handoff_ack",
46
47
  "old_writer_release",
47
48
  ]);
49
+
50
+ function compareCodeUnits(left, right) {
51
+ return left < right ? -1 : left > right ? 1 : 0;
52
+ }
48
53
  const TRANSFER_VERIFICATION_STATUSES = new Set([
49
54
  "source_candidate_unverified",
50
55
  "source_candidate_verified",
@@ -470,6 +475,11 @@ function currentProjectStatus(workspaceRoot) {
470
475
  return readTeamProjectStatusV3({ workspaceRoot });
471
476
  }
472
477
 
478
+ function currentProjectStatusV2(workspaceRoot) {
479
+ if (!existsSync(projectDefinitionPath(workspaceRoot))) return null;
480
+ return readTeamProjectStatusV4({ workspaceRoot });
481
+ }
482
+
473
483
  function readProjectDefinition(workspaceRoot) {
474
484
  const { bytes } = readFileBytesBounded(projectDefinitionPath(workspaceRoot));
475
485
  return normalizeTeamProjectDefinitionV1(parseJsonStrict(decodeUtf8Strict(bytes)));
@@ -548,6 +558,32 @@ function uniqueSorted(values) {
548
558
  return [...new Set(values)].sort();
549
559
  }
550
560
 
561
+ function explicitCandidateInventory(project) {
562
+ if (project === null) return [];
563
+ return [
564
+ ...project.dataCandidates.map(candidate => ({
565
+ laneId: `data-candidate:${candidate.candidateId}`,
566
+ kind: "data_candidate",
567
+ artifactId: candidate.candidateId,
568
+ status: candidate.admissionStatus,
569
+ sourceRef: candidate.sourceRef,
570
+ actionable: candidate.admissionStatus !== "eligible_candidate",
571
+ modeledWorkItemId: null,
572
+ truthRefs: [...candidate.truthRefs],
573
+ })),
574
+ ...project.externalGates.map(gate => ({
575
+ laneId: `external-gate:${gate.gateId}`,
576
+ kind: "external_gate",
577
+ artifactId: gate.gateId,
578
+ status: gate.gateStatus,
579
+ sourceRef: gate.source.ref,
580
+ actionable: gate.blocking,
581
+ modeledWorkItemId: null,
582
+ truthRefs: [...gate.truthRefs],
583
+ })),
584
+ ].sort((left, right) => compareCodeUnits(left.laneId, right.laneId));
585
+ }
586
+
551
587
  function shellQuote(value) {
552
588
  return `'${String(value).replaceAll("'", `'"'"'`)}'`;
553
589
  }
@@ -642,9 +678,17 @@ export function recommendTeamDeliveryV1({ workspaceRoot } = {}) {
642
678
  return recommendationFromProject(currentProjectStatus(workspaceRoot), workspaceRoot);
643
679
  }
644
680
 
645
- export function readTeamDeliveryStatusV1({ workspaceRoot } = {}) {
646
- if (!nonEmptyString(workspaceRoot)) throw new Error("workspaceRoot is required.");
647
- const project = currentProjectStatus(workspaceRoot);
681
+ export function recommendTeamDeliveryV2(input = {}) {
682
+ const legacy = recommendTeamDeliveryV1(input);
683
+ const { recommendedMode, ...rest } = legacy;
684
+ return {
685
+ ...rest,
686
+ schemaVersion: "OwlCodaRunKitTeamRecommendationV2",
687
+ teamCoordinationMode: recommendedMode,
688
+ };
689
+ }
690
+
691
+ function teamDeliveryStatusFromProject(project, workspaceRoot) {
648
692
  const recommendation = recommendationFromProject(project, workspaceRoot);
649
693
  return {
650
694
  schemaVersion: "OwlCodaRunKitTeamDeliveryStatusV1",
@@ -671,6 +715,94 @@ export function readTeamDeliveryStatusV1({ workspaceRoot } = {}) {
671
715
  };
672
716
  }
673
717
 
718
+ export function readTeamDeliveryStatusV1({ workspaceRoot } = {}) {
719
+ if (!nonEmptyString(workspaceRoot)) throw new Error("workspaceRoot is required.");
720
+ return teamDeliveryStatusFromProject(currentProjectStatus(workspaceRoot), workspaceRoot);
721
+ }
722
+
723
+ function enrichedProjectWarnings(project) {
724
+ return (project?.warnings ?? []).map((warning) => {
725
+ const workItem = project.workItems.find(row => row.workItemId === warning.workItemId);
726
+ const completed = workItem?.status === "completed";
727
+ return {
728
+ ...warning,
729
+ severity: "warning",
730
+ blocking: false,
731
+ requiredAtGate: false,
732
+ recommendedAction: completed
733
+ ? "no_retroactive_action_required"
734
+ : "bind_quick_or_formal_receipt_if_reusable_evidence_is_required",
735
+ };
736
+ });
737
+ }
738
+
739
+ function aggregateWarningSummary(warnings) {
740
+ const groups = new Map();
741
+ for (const warning of warnings) {
742
+ const current = groups.get(warning.code) ?? {
743
+ code: warning.code,
744
+ severity: warning.severity,
745
+ blocking: warning.blocking,
746
+ count: 0,
747
+ workItemIds: [],
748
+ requiredAtGate: warning.requiredAtGate,
749
+ recommendedAction: warning.recommendedAction,
750
+ };
751
+ current.count += 1;
752
+ current.workItemIds.push(warning.workItemId);
753
+ if (current.recommendedAction !== warning.recommendedAction) {
754
+ current.recommendedAction = "review_individual_warning_actions";
755
+ }
756
+ groups.set(warning.code, current);
757
+ }
758
+ return {
759
+ count: warnings.length,
760
+ groups: [...groups.values()]
761
+ .map(group => ({ ...group, workItemIds: uniqueSorted(group.workItemIds) }))
762
+ .sort((left, right) => compareCodeUnits(left.code, right.code)),
763
+ };
764
+ }
765
+
766
+ export function readTeamDeliveryStatusV2({ workspaceRoot } = {}) {
767
+ if (!nonEmptyString(workspaceRoot)) throw new Error("workspaceRoot is required.");
768
+ const project = currentProjectStatusV2(workspaceRoot);
769
+ const legacy = teamDeliveryStatusFromProject(project, workspaceRoot);
770
+ const warnings = enrichedProjectWarnings(project);
771
+ return {
772
+ ...legacy,
773
+ schemaVersion: "OwlCodaRunKitTeamDeliveryStatusV2",
774
+ externalGates: project?.externalGates ?? [],
775
+ deliveryLifecycle: project?.deliveryLifecycle ?? null,
776
+ unmodeledCandidateLanes: explicitCandidateInventory(project),
777
+ nextAction: project?.nextAction ?? legacy.nextAction,
778
+ warnings,
779
+ warningSummary: aggregateWarningSummary(warnings),
780
+ };
781
+ }
782
+
783
+ export function readTeamDeliveryStatusV3({ workspaceRoot } = {}) {
784
+ const legacy = readTeamDeliveryStatusV2({ workspaceRoot });
785
+ const warnings = legacy.warnings.map(warning => (
786
+ warning.code === "no_bound_verification_receipt"
787
+ ? { ...warning, severity: "advisory" }
788
+ : warning
789
+ ));
790
+ const actionableWarnings = warnings.filter(warning => warning.severity !== "advisory");
791
+ const advisories = warnings.filter(warning => warning.severity === "advisory");
792
+ return {
793
+ ...legacy,
794
+ schemaVersion: "OwlCodaRunKitTeamDeliveryStatusV3",
795
+ recommendation: {
796
+ teamCoordinationMode: legacy.recommendation.recommendedMode,
797
+ coordination: legacy.recommendation.coordination,
798
+ reasonCodes: [...legacy.recommendation.reasonCodes],
799
+ },
800
+ warnings,
801
+ warningSummary: aggregateWarningSummary(actionableWarnings),
802
+ advisorySummary: aggregateWarningSummary(advisories),
803
+ };
804
+ }
805
+
674
806
  function bindPacketToProject(packet, project, definition, issueCodes) {
675
807
  if (!projectBindingValid(packet.projectBinding)) return;
676
808
  if (project === null) {
@@ -876,6 +1008,22 @@ export function formatTeamDeliveryRecommendationHumanV1(result) {
876
1008
  ].join("\n");
877
1009
  }
878
1010
 
1011
+ export function formatTeamDeliveryRecommendationHumanV2(result) {
1012
+ return [
1013
+ `Team coordination: ${result.teamCoordinationMode}`,
1014
+ `Continuity: ${result.continuity}`,
1015
+ `Coordination: ${result.coordination}`,
1016
+ `Why: ${result.reasonCodes.join(", ") || "none"}`,
1017
+ `Lanes: ${result.lanes.length}`,
1018
+ `Path conflicts: ${result.pathConflicts.length}`,
1019
+ `Acceptance gaps: ${result.acceptanceGaps.length}`,
1020
+ `Next: ${result.nextCommand ?? "none"}`,
1021
+ "Agent dispatch: not permitted.",
1022
+ "Authority: no Git, release, deployment, production, business, automation, or money authorization granted.",
1023
+ "",
1024
+ ].join("\n");
1025
+ }
1026
+
879
1027
  export function formatTeamDeliveryStatusHumanV1(result) {
880
1028
  return [
881
1029
  `Team Delivery: ${result.recommendation.recommendedMode}`,
@@ -886,6 +1034,58 @@ export function formatTeamDeliveryStatusHumanV1(result) {
886
1034
  `Lanes: ${result.lanes.length}`,
887
1035
  `Path conflicts: ${result.pathConflicts.length}`,
888
1036
  `Acceptance gaps: ${result.acceptanceGaps.length}`,
1037
+ ...(result.warningSummary?.count > 0
1038
+ ? [`Warnings: ${result.warningSummary.count} non-blocking (${result.warningSummary.groups.map(group => `${group.code}:${group.count}`).join(", ")})`]
1039
+ : []),
1040
+ `Next: ${result.nextAction ?? "none"}`,
1041
+ "Agent dispatch: not permitted.",
1042
+ "Authority: not granted.",
1043
+ "",
1044
+ ].join("\n");
1045
+ }
1046
+
1047
+ export function formatTeamDeliveryStatusHumanV2(result) {
1048
+ return [
1049
+ `Team Delivery: ${result.recommendation.recommendedMode}`,
1050
+ `Project: ${result.projectId ?? "not initialized"}`,
1051
+ `Project state: ${result.projectOverall}`,
1052
+ `Graph source: ${result.graphSource}`,
1053
+ `Persisted team graph: ${result.persistedTeamGraph ? "yes" : "no"}`,
1054
+ `Lanes: ${result.lanes.length}`,
1055
+ `Path conflicts: ${result.pathConflicts.length}`,
1056
+ `Acceptance gaps: ${result.acceptanceGaps.length}`,
1057
+ `External Gates: ${result.externalGates.length}`,
1058
+ `Unmodeled candidate lanes: ${result.unmodeledCandidateLanes.length}`,
1059
+ `Delivery: ${result.deliveryLifecycle?.currentStage ?? "not initialized"}`,
1060
+ ...(result.warningSummary?.count > 0
1061
+ ? [`Warnings: ${result.warningSummary.count} non-blocking (${result.warningSummary.groups.map(group => `${group.code}:${group.count}`).join(", ")})`]
1062
+ : []),
1063
+ `Next: ${result.nextAction ?? "none"}`,
1064
+ "Agent dispatch: not permitted.",
1065
+ "Authority: not granted.",
1066
+ "",
1067
+ ].join("\n");
1068
+ }
1069
+
1070
+ export function formatTeamDeliveryStatusHumanV3(result) {
1071
+ return [
1072
+ `Team coordination: ${result.recommendation.teamCoordinationMode}`,
1073
+ `Project: ${result.projectId ?? "not initialized"}`,
1074
+ `Project state: ${result.projectOverall}`,
1075
+ `Graph source: ${result.graphSource}`,
1076
+ `Persisted team graph: ${result.persistedTeamGraph ? "yes" : "no"}`,
1077
+ `Lanes: ${result.lanes.length}`,
1078
+ `Path conflicts: ${result.pathConflicts.length}`,
1079
+ `Acceptance gaps: ${result.acceptanceGaps.length}`,
1080
+ `External Gates: ${result.externalGates.length}`,
1081
+ `Unmodeled candidate lanes: ${result.unmodeledCandidateLanes.length}`,
1082
+ `Delivery: ${result.deliveryLifecycle?.currentStage ?? "not initialized"}`,
1083
+ ...(result.warningSummary.count > 0
1084
+ ? [`Warnings: ${result.warningSummary.count} (${result.warningSummary.groups.map(group => `${group.code}:${group.count}`).join(", ")})`]
1085
+ : []),
1086
+ ...(result.advisorySummary.count > 0
1087
+ ? [`Advisories: ${result.advisorySummary.count} (${result.advisorySummary.groups.map(group => `${group.code}:${group.count}`).join(", ")})`]
1088
+ : []),
889
1089
  `Next: ${result.nextAction ?? "none"}`,
890
1090
  "Agent dispatch: not permitted.",
891
1091
  "Authority: not granted.",