@awak-app/simy-cli 0.5.72 → 0.5.74

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 (51) hide show
  1. package/README.md +97 -0
  2. package/package.json +2 -2
  3. package/src/agent.js +191 -11
  4. package/src/backend-executable.js +21 -1
  5. package/src/cli-contract.js +1 -1
  6. package/src/codex-plugins/simy/hooks/README.md +22 -0
  7. package/src/codex-plugins/simy/hooks/continuation-policy.mjs +27 -0
  8. package/src/codex-plugins/simy/hooks/delivery-loop.mjs +179 -34
  9. package/src/codex-plugins/simy/hooks/outcome-progress.mjs +129 -0
  10. package/src/coding-run-recovery.js +88 -0
  11. package/src/coding-run-store.js +2 -2
  12. package/src/continuation-policy.js +2 -0
  13. package/src/delivery-hooks/command.js +11 -5
  14. package/src/delivery-hooks/desktop.js +12 -3
  15. package/src/delivery-hooks/supervisor.js +14 -10
  16. package/src/desktop-host.js +9 -6
  17. package/src/desktop-sqm-settings.js +24 -7
  18. package/src/device-signing-identity.js +65 -0
  19. package/src/diagnostic-log.js +72 -0
  20. package/src/doctor.js +55 -0
  21. package/src/index.js +7 -0
  22. package/src/local-task.js +68 -3
  23. package/src/orchestrator/budget.js +55 -4
  24. package/src/orchestrator/charter-validation.js +33 -0
  25. package/src/orchestrator/completion-contract.js +1 -1
  26. package/src/orchestrator/contract.js +2 -0
  27. package/src/orchestrator/delivery/references/state-and-receipts.md +21 -3
  28. package/src/orchestrator/independent-audit.js +9 -0
  29. package/src/orchestrator/instruction.js +6 -1
  30. package/src/orchestrator/loop.js +38 -41
  31. package/src/orchestrator/outcome-monitor.js +58 -38
  32. package/src/orchestrator/outcome-progress.js +2 -0
  33. package/src/purpose-local-proof.js +380 -0
  34. package/src/runner.js +224 -36
  35. package/src/session-supervision/analysis-manager.js +45 -0
  36. package/src/session-supervision/codex-app-server.js +3 -2
  37. package/src/session-supervision/continuation-analysis.js +1 -1
  38. package/src/session-supervision/index.js +16 -4
  39. package/src/sqm/bundle-store.js +11 -7
  40. package/src/sqm/claude-plugin.js +2 -0
  41. package/src/sqm/command.js +36 -4
  42. package/src/sqm/diagnostics.js +1 -1
  43. package/src/sqm/evidence-client.js +23 -7
  44. package/src/sqm/history-store.js +9 -0
  45. package/src/sqm/index.js +104 -14
  46. package/src/sqm/proof.js +3 -23
  47. package/src/sqm/provider-diagnostics.js +35 -0
  48. package/src/sqm/request-recovery.js +82 -0
  49. package/src/sqm/review-worker.js +218 -112
  50. package/src/sqm/session.js +33 -3
  51. package/src/startup-preflight.js +44 -0
@@ -0,0 +1,44 @@
1
+ import { createCodingLoopSnapshot } from "./orchestrator/contract.js";
2
+ import { validateCharter } from "./orchestrator/charter-validation.js";
3
+
4
+ // Reuse the execution charter rather than inventing a second approval policy.
5
+ // These checks inspect local metadata only; model access requires real dispatch.
6
+ export function startupRequirementChecks(request = {}) {
7
+ const checks = [{ key: "model_access", status: "unknown", blocking: false,
8
+ summary: "Signing in does not prove access to the requested model. Access is checked on dispatch without a paid preflight request.",
9
+ action: { id: "review_model_access", type: "inspect_provider", label: "Review provider and model settings" } }];
10
+ if (!String(request.requirement || "").trim()) {
11
+ checks.push({ key: "task_requirements", status: "unknown", blocking: false,
12
+ summary: "Environment check only. Supply the task requirement to check acceptance criteria and design approval.",
13
+ action: { id: "provide_requirement", type: "edit_requirements", label: "Provide task requirements" } });
14
+ return checks;
15
+ }
16
+ const { charter } = createCodingLoopSnapshot({ runId: "preflight", request });
17
+ const findings = validateCharter(charter);
18
+ for (const [key, code, passed, actionId, label] of [
19
+ ["acceptance_criteria", "EXPLICIT_ACCEPTANCE_CRITERIA_REQUIRED", "Acceptance criteria satisfy the task risk policy.", "provide_acceptance_criteria", "Provide explicit acceptance criteria"],
20
+ ["design_review", "DESIGN_REVIEW_REQUIRED", "Design approval satisfies the task risk policy.", "approve_design", "Provide design review and approval evidence"],
21
+ ["required_checks", "REQUIRED_CI_CHECKS_MISSING", "Required checks satisfy the task risk policy.", "provide_required_checks", "Provide CI and security check names"],
22
+ ]) {
23
+ const finding = findings.find(item => item.code === code);
24
+ checks.push({ key, status: finding ? "failed" : "passed", blocking: Boolean(finding),
25
+ summary: finding?.explanation || passed,
26
+ ...(finding ? { code, action: { id: actionId, type: "edit_requirements", label } } : {}) });
27
+ }
28
+ checks.push({ key: "assurance_selection", status: "unknown", blocking: false,
29
+ summary: "The executor must verify the five-level comparison and user selection in existing decision evidence before material implementation.",
30
+ action: { id: "review_assurance_selection", type: "review_decision_evidence", label: "Review assurance level and selection evidence" } });
31
+ checks.push({ key: "external_dependencies", status: "unknown", blocking: false,
32
+ summary: "Confirm test accounts, external resources and permissions required by the acceptance criteria. Local readiness does not certify Cloud entitlement.",
33
+ action: { id: "confirm_external_dependencies", type: "edit_requirements", label: "Confirm external inputs and permissions" } });
34
+ return checks;
35
+ }
36
+
37
+ export function summarizeStartupChecks(checks) {
38
+ const blockers = checks.filter(check => check.status === "failed" && check.blocking !== false);
39
+ const unknown = checks.filter(check => check.status === "unknown");
40
+ return { status: blockers.length ? "blocked" : unknown.length ? "needs_confirmation" : "ready",
41
+ blocker_keys: blockers.map(check => check.key), unknown_keys: unknown.map(check => check.key),
42
+ actions: checks.flatMap(check => check.action ? [{ check_key: check.key, ...check.action }]
43
+ : (check.recovery?.actions || []).map(action => ({ check_key: check.key, ...action }))) };
44
+ }