@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.
- package/README.md +58 -77
- package/dist/browser/index.d.ts +0 -2
- package/dist/browser/index.js +21 -27
- package/dist/claude-code/cards.d.ts +55 -0
- package/dist/claude-code/cards.js +283 -0
- package/dist/claude-code/config.d.ts +28 -63
- package/dist/claude-code/config.js +0 -11
- package/dist/claude-code/egress.d.ts +8 -1
- package/dist/claude-code/egress.js +42 -4
- package/dist/claude-code/events.d.ts +106 -9
- package/dist/claude-code/events.js +201 -56
- package/dist/claude-code/github.d.ts +39 -0
- package/dist/claude-code/github.js +82 -0
- package/dist/claude-code/index.d.ts +16 -90
- package/dist/claude-code/index.js +14 -276
- package/dist/claude-code/model.d.ts +152 -0
- package/dist/claude-code/model.js +366 -0
- package/dist/claude-code/run.d.ts +230 -116
- package/dist/claude-code/run.js +380 -167
- package/dist/claude-code/session.d.ts +131 -0
- package/dist/claude-code/session.js +288 -0
- package/dist/claude-code/spec.d.ts +46 -0
- package/dist/claude-code/spec.js +83 -0
- package/dist/claude-code/verified.d.ts +15 -0
- package/dist/claude-code/verified.js +15 -0
- package/dist/computer/context.d.ts +1 -5
- package/dist/computer/context.js +7 -10
- package/dist/computer/file-lock.js +5 -4
- package/dist/computer/gate.d.ts +4 -4
- package/dist/computer/gate.js +5 -5
- package/dist/computer/index.d.ts +40 -258
- package/dist/computer/index.js +71 -324
- package/dist/computer/paths.d.ts +36 -16
- package/dist/computer/paths.js +42 -29
- package/dist/computer/proxy.d.ts +45 -0
- package/dist/computer/proxy.js +234 -0
- package/dist/computer/render.d.ts +1 -40
- package/dist/computer/render.js +2 -68
- package/dist/computer/tools-exec.js +12 -13
- package/dist/computer/tools-file.d.ts +9 -1
- package/dist/computer/tools-file.js +22 -82
- package/dist/computer/{tools-find.d.ts → tools-grep.d.ts} +1 -1
- package/dist/computer/tools-grep.js +129 -0
- package/dist/repo/checkout.d.ts +4 -5
- package/dist/repo/checkout.js +31 -8
- package/dist/repo/context.d.ts +35 -9
- package/dist/repo/context.js +101 -49
- package/dist/repo/index.d.ts +73 -28
- package/dist/repo/index.js +112 -96
- package/dist/repo/tools-checks.d.ts +3 -0
- package/dist/repo/tools-checks.js +112 -0
- package/dist/repo/tools-clone.js +1 -1
- package/dist/repo/tools-pr.d.ts +14 -0
- package/dist/repo/{tools-forge.js → tools-pr.js} +53 -36
- package/dist/repo/tools-review.d.ts +9 -0
- package/dist/repo/tools-review.js +67 -47
- package/dist/repo/tools-worktree.js +144 -60
- package/dist/repo/tools-worktrees.d.ts +12 -0
- package/dist/repo/tools-worktrees.js +48 -0
- package/dist/repo/url.d.ts +2 -2
- package/dist/repo/url.js +7 -7
- package/dist/scratch/index.d.ts +4 -4
- package/dist/scratch/index.js +12 -11
- package/dist/{computer → workspace}/advisory.d.ts +4 -4
- package/dist/{computer → workspace}/advisory.js +2 -2
- package/dist/{computer/host → workspace}/ca-trust.d.ts +8 -1
- package/dist/{computer/host → workspace}/ca-trust.js +12 -3
- package/dist/{computer/host → workspace}/container-deps.d.ts +4 -0
- package/dist/{computer/host → workspace}/container-deps.js +26 -1
- package/dist/{computer/host → workspace}/container-fault.d.ts +3 -3
- package/dist/{computer/host → workspace}/container-fault.js +23 -8
- package/dist/workspace/deps-snapshot.d.ts +110 -0
- package/dist/workspace/deps-snapshot.js +424 -0
- package/dist/workspace/exec.d.ts +94 -0
- package/dist/workspace/exec.js +153 -0
- package/dist/workspace/format.d.ts +36 -0
- package/dist/workspace/format.js +57 -0
- package/dist/{computer/host → workspace}/git-host.d.ts +21 -4
- package/dist/{computer/host → workspace}/git-host.js +72 -2
- package/dist/{computer/host → workspace}/git-identity.d.ts +1 -1
- package/dist/{computer/host → workspace}/git-identity.js +1 -1
- package/dist/workspace/index.d.ts +44 -47
- package/dist/workspace/index.js +52 -112
- package/dist/{computer/host → workspace}/install-job.d.ts +53 -4
- package/dist/{computer/host → workspace}/install-job.js +346 -178
- package/dist/{computer → workspace}/install.d.ts +17 -8
- package/dist/{computer → workspace}/install.js +24 -6
- package/dist/{computer/host/workspace.d.ts → workspace/object.d.ts} +125 -27
- package/dist/{computer/host/workspace.js → workspace/object.js} +341 -58
- package/dist/workspace/open.d.ts +95 -0
- package/dist/workspace/open.js +63 -0
- package/dist/workspace/read.d.ts +16 -0
- package/dist/workspace/read.js +22 -0
- package/dist/{computer → workspace}/shell.d.ts +5 -5
- package/dist/{computer → workspace}/shell.js +6 -6
- package/dist/{computer/host → workspace}/wake.d.ts +3 -1
- package/package.json +17 -37
- package/dist/arc-agi/analysis.d.ts +0 -322
- package/dist/arc-agi/analysis.js +0 -802
- package/dist/arc-agi/client.d.ts +0 -82
- package/dist/arc-agi/client.js +0 -113
- package/dist/arc-agi/game-tools.d.ts +0 -24
- package/dist/arc-agi/game-tools.js +0 -26
- package/dist/arc-agi/index.d.ts +0 -40
- package/dist/arc-agi/index.js +0 -175
- package/dist/arc-agi/main-agent.d.ts +0 -24
- package/dist/arc-agi/main-agent.js +0 -62
- package/dist/arc-agi/recipe.d.ts +0 -48
- package/dist/arc-agi/recipe.js +0 -97
- package/dist/arc-agi/scorecard.d.ts +0 -118
- package/dist/arc-agi/scorecard.js +0 -163
- package/dist/arc-agi/soul.d.ts +0 -29
- package/dist/arc-agi/soul.js +0 -79
- package/dist/arc-agi/store.d.ts +0 -153
- package/dist/arc-agi/store.js +0 -215
- package/dist/arc-agi/tools.d.ts +0 -36
- package/dist/arc-agi/tools.js +0 -574
- package/dist/arc-agi/types.d.ts +0 -211
- package/dist/arc-agi/types.js +0 -19
- package/dist/claude-code/recipe.d.ts +0 -53
- package/dist/claude-code/recipe.js +0 -100
- package/dist/computer/read.d.ts +0 -133
- package/dist/computer/read.js +0 -200
- package/dist/computer/tools-find.js +0 -216
- package/dist/recall/index.d.ts +0 -105
- package/dist/recall/index.js +0 -181
- package/dist/repo/tools-forge.d.ts +0 -4
- package/dist/triage/index.d.ts +0 -360
- package/dist/triage/index.js +0 -311
- /package/dist/{computer/host → workspace}/sync.d.ts +0 -0
- /package/dist/{computer/host → workspace}/sync.js +0 -0
- /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 "
|
|
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
|
|
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
|
|
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
|
-
*
|
|
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>;
|