@cassiomc1/forgeloop 1.6.2 → 1.6.4

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 (127) hide show
  1. package/DOCS_INDEX.md +26 -4
  2. package/EXECUTION_STATE.md +7 -0
  3. package/LOOP_ENGINEERING.md +58 -0
  4. package/LOOP_SYSTEM_DESIGN.md +54 -0
  5. package/ORCHESTRATOR_INTEGRATION.md +23 -0
  6. package/PROTOCOL_INTEGRATION.md +36 -0
  7. package/QUALITY_SCORECARD.md +21 -0
  8. package/README.md +57 -2
  9. package/TERMINOLOGY.md +11 -0
  10. package/THREAT_MODEL.md +7 -0
  11. package/completions/_forgeloop +85 -0
  12. package/completions/forgeloop.bash +173 -0
  13. package/completions/forgeloop.fish +544 -0
  14. package/docs/AGENT_PROTOCOL_SUMMARY.md +281 -0
  15. package/docs/ARTIFACT_REFERENCE.md +226 -0
  16. package/docs/CLI_REFERENCE.md +308 -2
  17. package/docs/CODE_ATTESTATION.md +141 -0
  18. package/docs/CROSS_HARNESS_CONTINUITY.md +22 -2
  19. package/docs/DOCUMENTATION_GUIDE.md +13 -11
  20. package/docs/GETTING_STARTED.md +98 -1
  21. package/docs/MCP.md +8 -0
  22. package/docs/PLATFORM_ADAPTERS.md +69 -0
  23. package/docs/RECIPES.md +138 -0
  24. package/docs/RELEASE_CHECKLIST.md +54 -0
  25. package/docs/REVISION_PROVIDERS.md +136 -0
  26. package/docs/SIGNING_PROVIDERS.md +83 -0
  27. package/docs/TROUBLESHOOTING.md +184 -0
  28. package/docs/UNIVERSAL_INTEGRATION.md +11 -0
  29. package/docs/assets/diagrams/forgeloop-code-attestation-flow.html +13841 -0
  30. package/docs/assets/diagrams/forgeloop-code-attestation-flow.receipt.json +37 -0
  31. package/docs/assets/diagrams/forgeloop-code-attestation-flow.svg +5046 -0
  32. package/docs/assets/diagrams/forgeloop-engineering-flow.html +46 -43
  33. package/docs/assets/diagrams/forgeloop-engineering-flow.receipt.json +6 -6
  34. package/docs/assets/diagrams/forgeloop-engineering-flow.svg +41 -41
  35. package/docs/assets/diagrams/forgeloop-verification-trust-flow.html +13783 -0
  36. package/docs/assets/diagrams/forgeloop-verification-trust-flow.receipt.json +37 -0
  37. package/docs/assets/diagrams/forgeloop-verification-trust-flow.svg +4988 -0
  38. package/docs/diagrams/README.md +30 -22
  39. package/docs/diagrams/forgeloop-code-attestation-flow.workflow.json +125 -0
  40. package/docs/diagrams/forgeloop-engineering-flow.workflow.json +11 -8
  41. package/docs/diagrams/forgeloop-verification-trust-flow.workflow.json +116 -0
  42. package/docs/diagrams/manifest.json +42 -0
  43. package/docs/diagrams/reviews/forgeloop-code-attestation-flow.review.json +20 -0
  44. package/docs/diagrams/reviews/forgeloop-engineering-flow.review.json +3 -3
  45. package/docs/diagrams/reviews/forgeloop-verification-trust-flow.review.json +20 -0
  46. package/integrations/generic-ci/verify.sh +14 -0
  47. package/package.json +31 -9
  48. package/schemas/attestation-verification-result.schema.json +34 -0
  49. package/schemas/code-attestation.schema.json +61 -0
  50. package/schemas/code-manifest.schema.json +57 -0
  51. package/schemas/config.schema.json +57 -1
  52. package/schemas/handoff-envelope.schema.json +57 -0
  53. package/schemas/in-toto-statement.schema.json +32 -0
  54. package/schemas/responsibility.schema.json +37 -0
  55. package/schemas/verification-scope.schema.json +26 -0
  56. package/schemas/workspace-binding.schema.json +20 -0
  57. package/scripts/CI_VALIDATORS.md +3 -0
  58. package/scripts/benchmark-cli-startup.mjs +60 -0
  59. package/scripts/check-changelog-freshness.mjs +88 -0
  60. package/scripts/check-critical-coverage.mjs +58 -0
  61. package/scripts/generate-agent-protocol-summary.mjs +141 -0
  62. package/scripts/generate-shell-completions.mjs +132 -0
  63. package/scripts/write-forgeloop-attestation-summary.mjs +93 -0
  64. package/src/cli.js +114 -6
  65. package/src/commands/attestation-create.js +30 -0
  66. package/src/commands/attestation-status.js +12 -0
  67. package/src/commands/attestation-verify-range.js +32 -0
  68. package/src/commands/attestation-verify.js +23 -0
  69. package/src/commands/handoff-create.js +9 -0
  70. package/src/commands/handoff-list.js +12 -0
  71. package/src/commands/handoff-show.js +10 -0
  72. package/src/commands/responsibility-set.js +20 -0
  73. package/src/commands/responsibility-status.js +12 -0
  74. package/src/commands/run-check.js +43 -3
  75. package/src/commands/task-repair-legacy-recovery.js +1 -2
  76. package/src/commands/verify-scope.js +9 -0
  77. package/src/commands/workspace-bind.js +17 -0
  78. package/src/commands/workspace-status.js +19 -0
  79. package/src/core/artifact-registry.js +84 -0
  80. package/src/core/attestation-coverage.js +134 -0
  81. package/src/core/attestation-verifier.js +227 -0
  82. package/src/core/attestation.js +263 -0
  83. package/src/core/audit.js +67 -1
  84. package/src/core/bundles.js +210 -9
  85. package/src/core/cli-command-definitions.js +196 -0
  86. package/src/core/code-manifest.js +293 -0
  87. package/src/core/command-executors.js +79 -0
  88. package/src/core/command-input.js +69 -18
  89. package/src/core/command-runtime.js +2 -1
  90. package/src/core/completion.js +170 -8
  91. package/src/core/config.js +60 -2
  92. package/src/core/continuity-cli-options.js +9 -3
  93. package/src/core/continuity-reconciliation.js +20 -0
  94. package/src/core/diagnostic-projection.js +3 -1
  95. package/src/core/error-codes.js +146 -0
  96. package/src/core/events.js +109 -13
  97. package/src/core/exit-codes.js +22 -0
  98. package/src/core/handoff.js +208 -0
  99. package/src/core/information-gain-projection.js +3 -3
  100. package/src/core/integration-invocation-policy.js +40 -0
  101. package/src/core/integration-resources.js +54 -0
  102. package/src/core/next-action-phases.js +968 -0
  103. package/src/core/next-action.js +32 -951
  104. package/src/core/phase.js +29 -1
  105. package/src/core/protocol-info.js +41 -1
  106. package/src/core/repository.js +256 -11
  107. package/src/core/responsibility.js +265 -0
  108. package/src/core/revision/git.js +207 -0
  109. package/src/core/revision/provider.js +90 -0
  110. package/src/core/revision/registry.js +5 -0
  111. package/src/core/route-artifact.js +1 -1
  112. package/src/core/schema-validation.js +8 -0
  113. package/src/core/signing/none.js +23 -0
  114. package/src/core/signing/provider.js +21 -0
  115. package/src/core/signing/registry.js +7 -0
  116. package/src/core/signing/sigstore.js +158 -0
  117. package/src/core/task-command.js +9 -1
  118. package/src/core/task-paths.js +72 -0
  119. package/src/core/templates.js +8 -0
  120. package/src/core/verification-scope-capability.js +179 -0
  121. package/src/core/verification-scope.js +271 -0
  122. package/src/core/workspace-binding.js +211 -0
  123. package/src/integration.d.ts +91 -0
  124. package/AGENT_COMPATIBILITY.md +0 -11
  125. package/docs/RELEASE_CHECKLIST_1_4.md +0 -38
  126. package/docs/RELEASE_CHECKLIST_1_5_MCP.md +0 -78
  127. package/docs/RELEASE_CHECKLIST_1_6_1.md +0 -121
@@ -12,6 +12,11 @@ import { loadCapabilityPolicy } from "./capability-policy.js";
12
12
  import { readdir } from "node:fs/promises";
13
13
  import { readJsonArtifact } from "./artifacts.js";
14
14
  import { taskDirectory } from "./task-paths.js";
15
+ import { resolveWorkspaceBindingStatus } from "./workspace-binding.js";
16
+ import { listCanonicalHandoffs } from "./handoff.js";
17
+ import { resolveResponsibilityStatus } from "./responsibility.js";
18
+ import { readVerificationScope } from "./verification-scope.js";
19
+ import { resolveAttestationStatus } from "./attestation.js";
15
20
 
16
21
  /**
17
22
  * Canonical integration resource allowlist.
@@ -51,6 +56,26 @@ export const INTEGRATION_RESOURCE_DEFINITIONS = Object.freeze({
51
56
  scope: "TASK",
52
57
  description: "Cross-harness continuity state for one task.",
53
58
  }),
59
+ "task/workspace-binding": Object.freeze({
60
+ scope: "TASK",
61
+ description: "Optional task workspace binding status for the current Git worktree.",
62
+ }),
63
+ "task/handoffs": Object.freeze({
64
+ scope: "TASK",
65
+ description: "Immutable protocol-derived handoff snapshots for one task.",
66
+ }),
67
+ "task/responsibility": Object.freeze({
68
+ scope: "TASK",
69
+ description: "Current responsibility constraints and their validation status.",
70
+ }),
71
+ "task/verification-scope": Object.freeze({
72
+ scope: "TASK",
73
+ description: "The current deterministic verification-scope artifact.",
74
+ }),
75
+ "task/attestation": Object.freeze({
76
+ scope: "TASK",
77
+ description: "Local code-attestation status and trust level for one task.",
78
+ }),
54
79
  "task/actions": Object.freeze({ scope: "TASK", description: "Canonical durable action summaries for one task." }),
55
80
  "task/action": Object.freeze({ scope: "TASK", description: "One canonical durable action artifact." }),
56
81
  "task/approvals": Object.freeze({ scope: "TASK", description: "Durable approval artifacts for one task." }),
@@ -117,6 +142,18 @@ export async function readForgeLoopIntegrationResource(uri, {
117
142
  }
118
143
  break;
119
144
  }
145
+ case "task/workspace-binding":
146
+ case "task/handoffs":
147
+ case "task/responsibility":
148
+ case "task/verification-scope":
149
+ case "task/attestation": {
150
+ if (typeof taskId !== "string" || !taskId) {
151
+ const error = new Error(`Resource ${uri} requires a taskId`);
152
+ error.code = "E_TASK_REQUIRED";
153
+ throw error;
154
+ }
155
+ break;
156
+ }
120
157
  case "task/actions":
121
158
  case "task/action":
122
159
  case "task/approvals":
@@ -133,6 +170,23 @@ export async function readForgeLoopIntegrationResource(uri, {
133
170
  const projection = await resolveTaskClaimState(projectPath, { taskId, packageRoot });
134
171
  return { uri, taskId, data: ownershipProjection(projection) };
135
172
  }
173
+ if (uri === "task/workspace-binding") {
174
+ return { uri, taskId, data: await resolveWorkspaceBindingStatus(projectPath, { packageRoot, taskId }) };
175
+ }
176
+ if (uri === "task/handoffs") {
177
+ const handoffs = await listCanonicalHandoffs(projectPath, { packageRoot, taskId });
178
+ return { uri, taskId, data: { taskId, count: handoffs.length, handoffs } };
179
+ }
180
+ if (uri === "task/responsibility") {
181
+ return { uri, taskId, data: await resolveResponsibilityStatus(projectPath, { packageRoot, taskId }) };
182
+ }
183
+ if (uri === "task/verification-scope") {
184
+ const scope = await readVerificationScope(projectPath, { packageRoot, taskId });
185
+ return { uri, taskId, data: { taskId, path: scope.path, fingerprint: scope.fingerprint, scope: scope.value } };
186
+ }
187
+ if (uri === "task/attestation") {
188
+ return { uri, taskId, data: await resolveAttestationStatus({ target: projectPath, packageRoot, taskId }) };
189
+ }
136
190
  if (uri === "task/actions") {
137
191
  const actions = await listActions(projectPath, { packageRoot, taskId });
138
192
  return { uri, taskId, data: { actions } };