@intentic/sandbox-contract 1.233.0 → 1.235.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 (136) hide show
  1. package/README.md +4 -3
  2. package/dist/agent-catalog.d.ts +2 -1
  3. package/dist/agent-catalog.d.ts.map +1 -1
  4. package/dist/agent-catalog.js +19 -13
  5. package/dist/agent-catalog.js.map +1 -1
  6. package/dist/chores/chores.d.ts.map +1 -1
  7. package/dist/chores/chores.js +36 -1
  8. package/dist/chores/chores.js.map +1 -1
  9. package/dist/chores/probes.d.ts.map +1 -1
  10. package/dist/chores/probes.js +70 -0
  11. package/dist/chores/probes.js.map +1 -1
  12. package/dist/command-classes.d.ts +5 -2
  13. package/dist/command-classes.d.ts.map +1 -1
  14. package/dist/command-classes.js +34 -13
  15. package/dist/command-classes.js.map +1 -1
  16. package/dist/contracts/automations.contract.d.ts +30 -0
  17. package/dist/contracts/automations.contract.d.ts.map +1 -1
  18. package/dist/contracts/chores.contract.d.ts +17 -0
  19. package/dist/contracts/chores.contract.d.ts.map +1 -1
  20. package/dist/contracts/extensions.contract.d.ts +2 -0
  21. package/dist/contracts/extensions.contract.d.ts.map +1 -1
  22. package/dist/contracts/extensions.contract.js.map +1 -1
  23. package/dist/contracts/issues.contract.d.ts +89 -0
  24. package/dist/contracts/issues.contract.d.ts.map +1 -0
  25. package/dist/contracts/issues.contract.js +50 -0
  26. package/dist/contracts/issues.contract.js.map +1 -0
  27. package/dist/contracts/runner.contract.d.ts +102 -102
  28. package/dist/contracts/settings.contract.d.ts +12 -0
  29. package/dist/contracts/settings.contract.d.ts.map +1 -1
  30. package/dist/contracts/system.contract.d.ts +12 -0
  31. package/dist/contracts/system.contract.d.ts.map +1 -1
  32. package/dist/contracts/system.contract.js +10 -1
  33. package/dist/contracts/system.contract.js.map +1 -1
  34. package/dist/credential-material.d.ts +2 -0
  35. package/dist/credential-material.d.ts.map +1 -0
  36. package/dist/credential-material.js +36 -0
  37. package/dist/credential-material.js.map +1 -0
  38. package/dist/definition.d.ts +8 -0
  39. package/dist/definition.d.ts.map +1 -1
  40. package/dist/history-state.d.ts.map +1 -1
  41. package/dist/history-state.js +1 -0
  42. package/dist/history-state.js.map +1 -1
  43. package/dist/hostnames.d.ts +2 -0
  44. package/dist/hostnames.d.ts.map +1 -1
  45. package/dist/hostnames.js +3 -1
  46. package/dist/hostnames.js.map +1 -1
  47. package/dist/index.d.ts +280 -116
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +5 -0
  50. package/dist/index.js.map +1 -1
  51. package/dist/ingress-contract.d.ts +23 -0
  52. package/dist/ingress-contract.d.ts.map +1 -0
  53. package/dist/ingress-contract.js +43 -0
  54. package/dist/ingress-contract.js.map +1 -0
  55. package/dist/runtime-state.d.ts +9 -0
  56. package/dist/runtime-state.d.ts.map +1 -1
  57. package/dist/runtime-state.js +3 -0
  58. package/dist/runtime-state.js.map +1 -1
  59. package/dist/schemas/agent.d.ts +6 -0
  60. package/dist/schemas/agent.d.ts.map +1 -1
  61. package/dist/schemas/agent.js +2 -1
  62. package/dist/schemas/agent.js.map +1 -1
  63. package/dist/schemas/automations.d.ts +45 -0
  64. package/dist/schemas/automations.d.ts.map +1 -1
  65. package/dist/schemas/automations.js +6 -1
  66. package/dist/schemas/automations.js.map +1 -1
  67. package/dist/schemas/computers.d.ts +41 -0
  68. package/dist/schemas/computers.d.ts.map +1 -1
  69. package/dist/schemas/computers.js +16 -0
  70. package/dist/schemas/computers.js.map +1 -1
  71. package/dist/schemas/extension-updates.d.ts +2 -0
  72. package/dist/schemas/extension-updates.d.ts.map +1 -1
  73. package/dist/schemas/extension-updates.js +3 -1
  74. package/dist/schemas/extension-updates.js.map +1 -1
  75. package/dist/schemas/issues.d.ts +324 -0
  76. package/dist/schemas/issues.d.ts.map +1 -0
  77. package/dist/schemas/issues.js +107 -0
  78. package/dist/schemas/issues.js.map +1 -0
  79. package/dist/schemas/maintenance.d.ts +62 -1
  80. package/dist/schemas/maintenance.d.ts.map +1 -1
  81. package/dist/schemas/maintenance.js +22 -1
  82. package/dist/schemas/maintenance.js.map +1 -1
  83. package/dist/schemas/settings.d.ts +6 -0
  84. package/dist/schemas/settings.d.ts.map +1 -1
  85. package/dist/schemas/settings.js +4 -0
  86. package/dist/schemas/settings.js.map +1 -1
  87. package/dist/schemas/terminal.d.ts.map +1 -1
  88. package/dist/schemas/terminal.js.map +1 -1
  89. package/dist/schemas/webext.d.ts +24 -0
  90. package/dist/schemas/webext.d.ts.map +1 -1
  91. package/dist/schemas/webext.js +9 -0
  92. package/dist/schemas/webext.js.map +1 -1
  93. package/dist/webext-links.d.ts +1 -0
  94. package/dist/webext-links.d.ts.map +1 -1
  95. package/dist/webext-links.js +1 -0
  96. package/dist/webext-links.js.map +1 -1
  97. package/dist/workspace-state.d.ts +10 -6
  98. package/dist/workspace-state.d.ts.map +1 -1
  99. package/dist/workspace-state.js +13 -8
  100. package/dist/workspace-state.js.map +1 -1
  101. package/package.json +30 -8
  102. package/src/agent-catalog.test.ts +55 -54
  103. package/src/agent-catalog.ts +29 -22
  104. package/src/capability-ledger.test.ts +11 -2
  105. package/src/chores/chores.test.ts +1 -1
  106. package/src/chores/chores.ts +66 -1
  107. package/src/chores/probes.test.ts +65 -0
  108. package/src/chores/probes.ts +133 -1
  109. package/src/chores/verdict.test.ts +29 -19
  110. package/src/command-classes.test.ts +71 -4
  111. package/src/command-classes.ts +112 -22
  112. package/src/contracts/extensions.contract.ts +3 -2
  113. package/src/contracts/issues.contract.ts +60 -0
  114. package/src/contracts/system.contract.ts +22 -1
  115. package/src/credential-material.test.ts +120 -0
  116. package/src/credential-material.ts +100 -0
  117. package/src/history-state.ts +12 -0
  118. package/src/hostnames.ts +18 -2
  119. package/src/index.ts +5 -0
  120. package/src/ingress-contract.test.ts +65 -0
  121. package/src/ingress-contract.ts +155 -0
  122. package/src/routes.test.ts +4 -2
  123. package/src/runtime-state.ts +16 -0
  124. package/src/schemas/agent.ts +15 -2
  125. package/src/schemas/automations.ts +14 -2
  126. package/src/schemas/computers.ts +60 -0
  127. package/src/schemas/extension-updates.ts +3 -1
  128. package/src/schemas/issues.ts +279 -0
  129. package/src/schemas/maintenance.ts +51 -1
  130. package/src/schemas/settings.ts +32 -0
  131. package/src/schemas/terminal.ts +6 -4
  132. package/src/schemas/webext.ts +29 -0
  133. package/src/tunnel-ids.test.ts +3 -1
  134. package/src/webext-links.ts +10 -0
  135. package/src/workspace-state.test.ts +3 -1
  136. package/src/workspace-state.ts +27 -37
@@ -301,6 +301,24 @@ const STATE_FILES = [
301
301
  why: "Declared by the intentic.automations extension's contributes.files, `automation-approvals` is its query key, not core's.",
302
302
  portability: "carry",
303
303
  },
304
+ /* The bug-report inbox, one file per fingerprint, written by the daemon's issues-store as reports arrive
305
+ * from the owner's own sites and apps, and rendered by the intentic.issues extension. Its invalidation is
306
+ * the extension's own (`issues`), declared in that manifest, the automations shape exactly.
307
+ *
308
+ * `carry` rather than `local`: an issue is a fact about the PRODUCT, not about this container. A workspace
309
+ * exported and restored elsewhere that arrived claiming nothing had ever crashed would have thrown away
310
+ * the one record that says which bug is worth fixing first, and the counts are the whole of that record.
311
+ *
312
+ * NOT `versioned`, and the drafts entry is the contrast worth reading: a draft is authored, reviewable and
313
+ * goes out under the owner's name, so it earns a diff. An issue is machine-recorded telemetry whose count
314
+ * moves on every crash: tracking it would put a commit's worth of churn in `git log` per bad afternoon,
315
+ * and nothing in it is a decision anybody made. */
316
+ {
317
+ path: ".intentic/records/issues/",
318
+ invalidates: [],
319
+ why: "Declared by the intentic.issues extension's contributes.files, `issues` is its query key, not core's.",
320
+ portability: "carry",
321
+ },
304
322
  /* The maintenance ledger and probe evidence, written by the daemon's chores-store and rendered by the
305
323
  * intentic.maintenance extension, the automations shape exactly: the path is the daemon's, the query keys
306
324
  * (`maintenance-report`, `maintenance-runs`) are the extension's own contributes.files. Point-in-time
@@ -359,6 +377,12 @@ const STATE_FILES = [
359
377
  why: "Which origins have loaded a Front Desk's widget, written on a 30s flush timer while a customer's site serves page views. The install panel that renders it fetches on open and polls itself while it is on screen, which is the whole window in which the answer changes for anyone. Pushing instead would bill every connected browser a refetch per flush, for a panel almost nobody has open.",
360
378
  portability: "carry",
361
379
  },
380
+ {
381
+ path: ".intentic/records/issue-installs.json",
382
+ invalidates: [],
383
+ why: "The same probe for the bug reporter's script, on the same flush timer and read by the same kind of panel, so it is outside the push path for the same reason the Front Desk's is.",
384
+ portability: "carry",
385
+ },
362
386
  {
363
387
  path: ".intentic/records/thread-sessions.json",
364
388
  invalidates: [],
@@ -805,34 +829,6 @@ export const REPORTED_MANIFEST_PATHS: readonly string[] = WORKSPACE_STATE_FILES.
805
829
  // them relative at the last moment, and normalizing at each call site is the one that eventually gets forgotten.
806
830
  export const isReportedManifest = (relPath: string): boolean => REPORTED_MANIFEST_PATHS.includes(relPath.replaceAll("\\", "/"));
807
831
 
808
- /* Old directory names are never read or migrated. Keep that finite set in one quarantine record so access,
809
- * export, and search cannot reinterpret abandoned machine state as ordinary workspace content after a rename.
810
- * `artifacts` still carry; the distinction here tells portability only which retired roots are secrets or
811
- * derived, and tells the state janitor which it may DELETE: a retired `derived` root is a rebuildable cache
812
- * by its own classification, so leaving 466 MB of abandoned model where only a manual `rm` reaches it was
813
- * quarantine doing half its job. Secret and artifact roots stay until an owner removes them by hand: deleting
814
- * content is not the janitor's call, only deleting what the class already says is disposable. */
815
- export const RETIRED_WORKSPACE_STATE_DIRS = {
816
- /* The flat spellings, from before the state dir was grouped into its five folders. Every entry in the table
817
- * used to sit directly under `.intentic/`, and a sandbox that predates the move still has those directories
818
- * on disk with real contents in them. They are quarantined rather than migrated, the workspace rule is fresh
819
- * state and no compatibility layers, but quarantine is exactly what they need, because the alternative is
820
- * worse than leaving them: `auth` at the old spelling is a real credential store that the classifier no
821
- * longer recognises, so without these names it would read as ordinary workspace content and be indexed by
822
- * search, carried by an export and copied down by the backup. Being listed here keeps the old copy as
823
- * untouchable as the new one, and lets the janitor delete the rebuildable half. */
824
- secret: ["claude", "codex", "kimi", "opencode", "cliproxy", "auth", "ci.json"],
825
- /* The ownership records at their OLD flat spelling, and a bucket of their own rather than a few more names
826
- * in `secret`, because the two classes differ on exactly the thing that matters for a leftover. A `secret`
827
- * travels when the owner opts in at export; an `identity` never travels at all, since a list of who may
828
- * drive this sandbox arriving in another one is how a source hands itself the target's ownership. Filed under
829
- * `secret` these would have become carryable by ticking a box, which is the one outcome their live entries
830
- * are written to prevent. */
831
- identity: ["owner.json", "members.json", "workspace.json", "control-tokens.json"],
832
- derived: ["iq", "extensions-runtime", "whisper", "browser/output", "browser", "cache", "runtime", "tmp", ".pnpm-store", "extensions", "verify"],
833
- artifacts: ["attachments", "acceptance", "loops", "workflow-runs", "transcripts", "artifacts", "sessions"],
834
- } as const;
835
-
836
832
  /* THE DAEMON'S OWN CONTROL PLANE, the entries directly under the workspace root's `.intentic/` that the file
837
833
  * API refuses to read, write, move or delete for anyone, the owner included (workspace/workspace-files.ts holds
838
834
  * the enforcement and the full reasoning for each name).
@@ -884,15 +880,9 @@ export const isLockedWorkspacePath = (relPath: string): boolean => {
884
880
  if (segments[0] !== STATE_DIR) {
885
881
  return false;
886
882
  }
887
- /* Two shapes, because two layouts exist on disk. A current entry is `<group>/<name>`; a leftover from before
888
- * the regrouping is a bare name directly under the state dir, and the quarantine record is what still knows
889
- * those are credentials. Both are locked, a stale `auth/` full of real tokens is no safer to open than the
890
- * live one, and the whole point of quarantining the old spellings was that nothing downstream reclassifies
891
- * them as ordinary content. */
892
- return (
893
- LOCKED_STATE_ENTRIES.has(segments.slice(1, 3).join("/")) ||
894
- (segments.length >= 2 && RETIRED_WORKSPACE_STATE_DIRS.secret.includes(segments[1] as never))
895
- );
883
+ // Two segments, which covers both spellings in the set above: a grouped entry (`secrets/auth`) matches as
884
+ // written, and a bare root entry (`claude.json`) joins to itself because there is no second segment to add.
885
+ return LOCKED_STATE_ENTRIES.has(segments.slice(1, 3).join("/"));
896
886
  };
897
887
 
898
888
  /* THE LOCKED ENTRIES THE ROOT REPO TRACKS, refused by the file API, and diffable anyway.