@dynamicagents/plugins 0.12.0 → 0.14.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 (132) hide show
  1. package/README.md +58 -77
  2. package/dist/browser/index.d.ts +0 -2
  3. package/dist/browser/index.js +21 -27
  4. package/dist/claude-code/cards.d.ts +55 -0
  5. package/dist/claude-code/cards.js +283 -0
  6. package/dist/claude-code/config.d.ts +28 -63
  7. package/dist/claude-code/config.js +0 -11
  8. package/dist/claude-code/egress.d.ts +8 -1
  9. package/dist/claude-code/egress.js +42 -4
  10. package/dist/claude-code/events.d.ts +106 -9
  11. package/dist/claude-code/events.js +201 -56
  12. package/dist/claude-code/github.d.ts +39 -0
  13. package/dist/claude-code/github.js +82 -0
  14. package/dist/claude-code/index.d.ts +16 -90
  15. package/dist/claude-code/index.js +14 -276
  16. package/dist/claude-code/model.d.ts +152 -0
  17. package/dist/claude-code/model.js +366 -0
  18. package/dist/claude-code/run.d.ts +230 -116
  19. package/dist/claude-code/run.js +380 -167
  20. package/dist/claude-code/session.d.ts +131 -0
  21. package/dist/claude-code/session.js +288 -0
  22. package/dist/claude-code/spec.d.ts +46 -0
  23. package/dist/claude-code/spec.js +83 -0
  24. package/dist/claude-code/verified.d.ts +15 -0
  25. package/dist/claude-code/verified.js +15 -0
  26. package/dist/computer/context.d.ts +1 -5
  27. package/dist/computer/context.js +7 -10
  28. package/dist/computer/file-lock.js +5 -4
  29. package/dist/computer/gate.d.ts +4 -4
  30. package/dist/computer/gate.js +5 -5
  31. package/dist/computer/index.d.ts +40 -258
  32. package/dist/computer/index.js +71 -324
  33. package/dist/computer/paths.d.ts +36 -16
  34. package/dist/computer/paths.js +42 -29
  35. package/dist/computer/proxy.d.ts +45 -0
  36. package/dist/computer/proxy.js +234 -0
  37. package/dist/computer/render.d.ts +1 -40
  38. package/dist/computer/render.js +2 -68
  39. package/dist/computer/tools-exec.js +12 -13
  40. package/dist/computer/tools-file.d.ts +9 -1
  41. package/dist/computer/tools-file.js +22 -82
  42. package/dist/computer/{tools-find.d.ts → tools-grep.d.ts} +1 -1
  43. package/dist/computer/tools-grep.js +129 -0
  44. package/dist/repo/checkout.d.ts +4 -5
  45. package/dist/repo/checkout.js +31 -8
  46. package/dist/repo/context.d.ts +35 -9
  47. package/dist/repo/context.js +101 -49
  48. package/dist/repo/index.d.ts +73 -28
  49. package/dist/repo/index.js +112 -96
  50. package/dist/repo/tools-checks.d.ts +3 -0
  51. package/dist/repo/tools-checks.js +112 -0
  52. package/dist/repo/tools-clone.js +1 -1
  53. package/dist/repo/tools-pr.d.ts +14 -0
  54. package/dist/repo/{tools-forge.js → tools-pr.js} +53 -36
  55. package/dist/repo/tools-review.d.ts +9 -0
  56. package/dist/repo/tools-review.js +67 -47
  57. package/dist/repo/tools-worktree.js +144 -60
  58. package/dist/repo/tools-worktrees.d.ts +12 -0
  59. package/dist/repo/tools-worktrees.js +48 -0
  60. package/dist/repo/url.d.ts +2 -2
  61. package/dist/repo/url.js +7 -7
  62. package/dist/scratch/index.d.ts +4 -4
  63. package/dist/scratch/index.js +12 -11
  64. package/dist/{computer → workspace}/advisory.d.ts +4 -4
  65. package/dist/{computer → workspace}/advisory.js +2 -2
  66. package/dist/{computer/host → workspace}/ca-trust.d.ts +8 -1
  67. package/dist/{computer/host → workspace}/ca-trust.js +12 -3
  68. package/dist/{computer/host → workspace}/container-deps.d.ts +4 -0
  69. package/dist/{computer/host → workspace}/container-deps.js +26 -1
  70. package/dist/{computer/host → workspace}/container-fault.d.ts +3 -3
  71. package/dist/{computer/host → workspace}/container-fault.js +23 -8
  72. package/dist/workspace/deps-snapshot.d.ts +110 -0
  73. package/dist/workspace/deps-snapshot.js +424 -0
  74. package/dist/workspace/exec.d.ts +94 -0
  75. package/dist/workspace/exec.js +153 -0
  76. package/dist/workspace/format.d.ts +36 -0
  77. package/dist/workspace/format.js +57 -0
  78. package/dist/{computer/host → workspace}/git-host.d.ts +21 -4
  79. package/dist/{computer/host → workspace}/git-host.js +72 -2
  80. package/dist/{computer/host → workspace}/git-identity.d.ts +1 -1
  81. package/dist/{computer/host → workspace}/git-identity.js +1 -1
  82. package/dist/workspace/index.d.ts +44 -47
  83. package/dist/workspace/index.js +52 -112
  84. package/dist/{computer/host → workspace}/install-job.d.ts +53 -4
  85. package/dist/{computer/host → workspace}/install-job.js +346 -178
  86. package/dist/{computer → workspace}/install.d.ts +17 -8
  87. package/dist/{computer → workspace}/install.js +24 -6
  88. package/dist/{computer/host/workspace.d.ts → workspace/object.d.ts} +125 -27
  89. package/dist/{computer/host/workspace.js → workspace/object.js} +341 -58
  90. package/dist/workspace/open.d.ts +95 -0
  91. package/dist/workspace/open.js +63 -0
  92. package/dist/workspace/read.d.ts +16 -0
  93. package/dist/workspace/read.js +22 -0
  94. package/dist/{computer → workspace}/shell.d.ts +5 -5
  95. package/dist/{computer → workspace}/shell.js +6 -6
  96. package/dist/{computer/host → workspace}/wake.d.ts +3 -1
  97. package/package.json +17 -37
  98. package/dist/arc-agi/analysis.d.ts +0 -322
  99. package/dist/arc-agi/analysis.js +0 -802
  100. package/dist/arc-agi/client.d.ts +0 -82
  101. package/dist/arc-agi/client.js +0 -113
  102. package/dist/arc-agi/game-tools.d.ts +0 -24
  103. package/dist/arc-agi/game-tools.js +0 -26
  104. package/dist/arc-agi/index.d.ts +0 -40
  105. package/dist/arc-agi/index.js +0 -175
  106. package/dist/arc-agi/main-agent.d.ts +0 -24
  107. package/dist/arc-agi/main-agent.js +0 -62
  108. package/dist/arc-agi/recipe.d.ts +0 -48
  109. package/dist/arc-agi/recipe.js +0 -97
  110. package/dist/arc-agi/scorecard.d.ts +0 -118
  111. package/dist/arc-agi/scorecard.js +0 -163
  112. package/dist/arc-agi/soul.d.ts +0 -29
  113. package/dist/arc-agi/soul.js +0 -79
  114. package/dist/arc-agi/store.d.ts +0 -153
  115. package/dist/arc-agi/store.js +0 -215
  116. package/dist/arc-agi/tools.d.ts +0 -36
  117. package/dist/arc-agi/tools.js +0 -574
  118. package/dist/arc-agi/types.d.ts +0 -211
  119. package/dist/arc-agi/types.js +0 -19
  120. package/dist/claude-code/recipe.d.ts +0 -53
  121. package/dist/claude-code/recipe.js +0 -100
  122. package/dist/computer/read.d.ts +0 -133
  123. package/dist/computer/read.js +0 -200
  124. package/dist/computer/tools-find.js +0 -216
  125. package/dist/recall/index.d.ts +0 -105
  126. package/dist/recall/index.js +0 -181
  127. package/dist/repo/tools-forge.d.ts +0 -4
  128. package/dist/triage/index.d.ts +0 -360
  129. package/dist/triage/index.js +0 -311
  130. /package/dist/{computer/host → workspace}/sync.d.ts +0 -0
  131. /package/dist/{computer/host → workspace}/sync.js +0 -0
  132. /package/dist/{computer/host → workspace}/wake.js +0 -0
@@ -1,6 +1,6 @@
1
1
  import { type Workspace } from "@cloudflare/computer";
2
2
  import type { Scheduler } from "@dynamicagents/core/alarm";
3
- import { type InstallPlan, type InstallState } from "../install.js";
3
+ import { type InstallPlan, type InstallState } from "./install.js";
4
4
  import type { WorkspaceWakeHandlers } from "./wake.js";
5
5
  export interface InstallJobDeps {
6
6
  storage: DurableObjectStorage;
@@ -22,9 +22,30 @@ export interface InstallJobDeps {
22
22
  waitUntil: (promise: Promise<unknown>) => void;
23
23
  /** A container was replaced, so nothing believed about it still holds. */
24
24
  containerGone: () => Promise<void>;
25
+ /**
26
+ * Storage entries the host keeps about a tree an install finished, written in
27
+ * the same write as that install's verdict — nothing can read the one without
28
+ * the other.
29
+ */
30
+ installedRecords: (tree: {
31
+ dir: string;
32
+ fingerprint: string;
33
+ at: number;
34
+ }) => Record<string, unknown>;
35
+ /** After that write: an install exited 0, so this container holds the tree. */
36
+ installed: (tree: {
37
+ dir: string;
38
+ fingerprint: string;
39
+ at: number;
40
+ }) => Promise<void>;
25
41
  tag: () => string;
26
42
  id: () => string;
27
43
  }
44
+ /** Where an install goes: the checkout, and the repository for its override. */
45
+ export interface InstallTarget {
46
+ dir: string;
47
+ repo?: string;
48
+ }
28
49
  export declare class InstallJob {
29
50
  #private;
30
51
  private readonly deps;
@@ -48,6 +69,34 @@ export declare class InstallJob {
48
69
  armIfTreeMissing(): Promise<void>;
49
70
  /** Where the last install ran, for the container setup's marker read. */
50
71
  dir(): Promise<string | undefined>;
72
+ /** Where the last install ran, and for which repository's override. */
73
+ target(): Promise<InstallTarget | undefined>;
74
+ /**
75
+ * The fingerprint an install into `target` would write as its marker, from the
76
+ * checkout as it stands — `null` when there is nothing to install there.
77
+ */
78
+ fingerprintFor(target: InstallTarget): Promise<string | null>;
79
+ /** What `dir`'s install inputs hash to — see `rootFingerprint`. */
80
+ rootFingerprint(dir: string): Promise<string | null>;
81
+ /** The tree this container holds, if a finished install says it does. */
82
+ tree(): Promise<{
83
+ dir: string;
84
+ fingerprint: string | null;
85
+ at: number;
86
+ } | undefined>;
87
+ /**
88
+ * Record a tree this container came up holding — restored with a snapshot of
89
+ * the container that installed it — as if this container had installed it.
90
+ *
91
+ * Only for a tree whose marker the setup read and matched against the checkout
92
+ * as it stands; see `./deps-snapshot.ts`. So the last install's context moves
93
+ * to it too: a checkout that moved since that install would otherwise read as
94
+ * missing its tree, and arm an install that finds the tree already there.
95
+ */
96
+ adopt(tree: {
97
+ dir: string;
98
+ fingerprint: string;
99
+ }): Promise<void>;
51
100
  /** The container went away, and its tree with it. */
52
101
  containerGone(): Promise<void>;
53
102
  /**
@@ -71,7 +120,7 @@ export declare class InstallJob {
71
120
  *
72
121
  * Called from `repo_clone` through the repo plugin's `afterCheckout` hook, so
73
122
  * it runs inside a model turn and must not block on the install — 225 seconds
74
- * for slack-gatekeeper, against a chunk step that dies at ten minutes.
123
+ * for slack-gatekeeper, against a turn that is cut at fifteen minutes.
75
124
  *
76
125
  * That caller is a model turn, which lives long enough to hold the drain handed
77
126
  * to `ctx.waitUntil` below. **A short-lived caller cannot**, which is why an
@@ -102,7 +151,7 @@ export declare class InstallJob {
102
151
  /**
103
152
  * When a reinstall was queued, if one is waiting to run.
104
153
  *
105
- * Read by {@link file://../advisory.ts deriveAdvisories}, which is the only
154
+ * Read by {@link file://./advisory.ts deriveAdvisories}, which is the only
106
155
  * caller that needs it: a `failed` record with a repair already queued is a
107
156
  * transient condition wearing a permanent record's clothes.
108
157
  */
@@ -112,7 +161,7 @@ export declare class InstallJob {
112
161
  *
113
162
  * `clearArmed` first and unconditionally: this handler runs for minutes, and
114
163
  * the stamp left in place is what a second arming would recognise as its own.
115
- * `startInstall`'s in-flight guard would catch a double, but the cheaper
164
+ * The reservation in `#beginInstall` would catch a double, but the cheaper
116
165
  * answer is not to schedule one.
117
166
  */
118
167
  onRun(): Promise<void>;