@bud.sh/app 0.5.1 → 0.6.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 +41 -31
- package/dist/client/assets/bud/design.js +1 -1
- package/dist/client/assets/canvas-Bih9EdKJ.js +1 -0
- package/dist/client/assets/difference-worker-Bzg-rizy.js +8 -0
- package/dist/client/assets/dist-CdE5wBkg.js +5 -0
- package/dist/client/assets/files-1dLuoM2f.js +1 -0
- package/dist/client/assets/i18n-CkO6VFI0.js +1 -0
- package/dist/client/assets/index-Cn2mxroU.css +2 -0
- package/dist/client/assets/{index-Dn2pfmXf.js → index-DtISWZp9.js} +2 -2
- package/dist/client/assets/pages-BJ-tNJ4J.js +1 -0
- package/dist/client/assets/{project-branches-CMGRmrqr.js → project-branches-Ce3rXrkc.js} +1 -1
- package/dist/client/assets/project-comments-CPUONfs8.js +1 -0
- package/dist/client/assets/project-thread-links-C-TGkq59.js +1 -0
- package/dist/client/assets/{project-threads-ZbKDh78d.js → project-threads-Bv7IDBgi.js} +105 -105
- package/dist/client/assets/project-work-DAE9-olg.js +1 -0
- package/dist/client/assets/{task-design-BPpc4Gd7.js → task-design-CwySIAOl.js} +3 -3
- package/dist/client/assets/tasks-KWsCLi_h.js +3 -0
- package/dist/client/assets/wasm-inline-DSUyFn1L.js +1 -0
- package/dist/client/assets/workspace-CVdcfaaB.js +2 -0
- package/dist/client/index.html +3 -3
- package/dist/hosted/assets/{canvas-BYTOp1p7.js → canvas-AII16n9i.js} +97 -6
- package/dist/hosted/assets/{comment-data-Cn5y2VxV.js → comment-data-BXfMElfx.js} +1998 -381
- package/dist/hosted/assets/dist-BCSTeNf4.js +4785 -0
- package/dist/hosted/assets/{files-B1P2_24q.js → files-D_1yeAVO.js} +10 -5
- package/dist/hosted/assets/{pages-B0ZlVdci.js → pages-CN_SbKWA.js} +3 -3
- package/dist/hosted/assets/{project-branches-DlCWmfRo.js → project-branches-Bxp0DCwg.js} +1 -1
- package/dist/hosted/assets/{project-thread-links-BZXQ200n.js → project-thread-links-KqQoKBLE.js} +76 -4
- package/dist/{node-host/assets/screen-DapOVrga.js → hosted/assets/screen-DpAcDUKR.js} +25 -1
- package/dist/hosted/assets/tasks-D66LlwxM.js +1423 -0
- package/dist/hosted/assets/wasm-inline-Dl9tqabx.js +4 -0
- package/dist/hosted/hosted.js +7885 -6219
- package/dist/node/assets/Stream-CAm1eJ2n.js +16604 -0
- package/dist/{server/assets/bridge-B_Blt55E.js → node/assets/bridge-DQSBYHmw.js} +124 -290
- package/dist/node/assets/config-9_jWwNBh.js +1067 -0
- package/dist/node/assets/load-config.server-CMVtRVmO.js +261 -0
- package/dist/node/assets/module-3GgtT4Xs.js +308 -0
- package/dist/node/assets/server-DTQFuoX2.js +846 -0
- package/dist/node/assets/src-D-kG1GxB.js +2 -0
- package/dist/node/assets/{src-CerrKjID.js → src-Dwe9APUx.js} +93 -3
- package/dist/node/assets/src-DysjfbM8.js +8592 -0
- package/dist/node/bridge.js +1 -845
- package/dist/node/cli.js +206 -0
- package/dist/node/design.js +811 -8
- package/dist/node/index.js +2 -739
- package/dist/node/plugins.js +5711 -0
- package/dist/node/server.js +1 -6746
- package/dist/node/vite.js +121 -0
- package/dist/{server/assets/canvas-CkMK4hoN.js → node-host/assets/canvas-BeDoufy1.js} +97 -7
- package/dist/node-host/assets/{comment-data-yfWEdDQL.js → comment-data-DE2T9yTj.js} +1974 -355
- package/dist/node-host/assets/dist-BCSTeNf4.js +4785 -0
- package/dist/node-host/assets/{files-anHi-apm.js → files-Dl-PTS09.js} +11 -6
- package/dist/node-host/assets/{pages-CW4aF6dK.js → pages-DL2sk6_U.js} +3 -3
- package/dist/node-host/assets/{project-branches-D7rVCxQX.js → project-branches-DGp5ELct.js} +1 -1
- package/dist/{server/assets/project-thread-links-lLS_rq7c.js → node-host/assets/project-thread-links-CgBV3Jcm.js} +76 -5
- package/dist/{hosted/assets/screen-CfdC3NbR.js → node-host/assets/screen-B55yyVfb.js} +25 -1
- package/dist/node-host/assets/tasks-DZRNkoxe.js +1425 -0
- package/dist/node-host/assets/wasm-inline-Dl9tqabx.js +4 -0
- package/dist/node-host/node-host.js +6127 -4438
- package/dist/server/assets/{branch-previews-ClkoJ0lM.js → branch-previews-DedrpnVR.js} +1555 -673
- package/dist/{node-host/assets/canvas-DxmcFZCh.js → server/assets/canvas-CJWQ-jjv.js} +98 -6
- package/dist/server/assets/{comment-data-NLeHG89b.js → comment-data-Rg42ToTW.js} +1660 -26
- package/dist/server/assets/dist-BCSTeNf4.js +4785 -0
- package/dist/server/assets/{events-iHpLGr3k.js → events-BH_rAu7O.js} +155 -20
- package/dist/server/assets/{files-CRdl489E.js → files-CPJqKeMo.js} +12 -7
- package/dist/server/assets/{listener-BAYn9Q-u.js → listener-D61O6PzF.js} +708 -12
- package/dist/server/assets/{pages-DXVlJlBC.js → pages-KJY_Ba92.js} +4 -4
- package/dist/server/assets/{project-branches-CwTsf6WQ.js → project-branches-qG9ACZvo.js} +2 -2
- package/dist/{node-host/assets/project-thread-links-m-OLpsD9.js → server/assets/project-thread-links-CqK0lqCF.js} +77 -4
- package/dist/{node-host/assets/tasks-request-B0aeNocI.js → server/assets/project-work-DoIwxWMm.js} +87 -2
- package/dist/server/assets/run-BJ8r5jSh.js +572 -0
- package/dist/server/assets/{screen-B1zH_1O3.js → screen-CBrHPFug.js} +26 -2
- package/dist/server/assets/{server-DxK-UB_Z.js → server-Dkbp5stG.js} +1521 -793
- package/dist/server/assets/{services-BRrgXYlT.js → services-BTfig8A8.js} +234 -997
- package/dist/server/assets/tasks-Bgu5Lg9Y.js +1427 -0
- package/dist/server/assets/wasm-inline-Dl9tqabx.js +4 -0
- package/dist/server/capture.js +1 -2
- package/dist/server/migration.js +569 -12
- package/dist/server/runtime.js +7 -5
- package/dist/server/server.js +3 -3
- package/dist/types/assets/{config-DIC2cf_S.d.ts → config-CvcYmE2s.d.ts} +188 -50
- package/dist/types/assets/{contract-CAT-XFNq.d.ts → contract-B7yuuqSn.d.ts} +44 -2
- package/dist/types/assets/{items-CaVkByHk.d.ts → items-BQdaVksf.d.ts} +12 -1
- package/dist/types/assets/memory-state-BBW-FAVA.d.ts +236 -0
- package/dist/types/assets/picker-Be5Gx4WR.d.ts +9 -0
- package/dist/types/assets/{task-design-xJOhRNWh.d.ts → task-design-BDHKFHpp.d.ts} +3 -1
- package/dist/types/bridge.d.ts +1 -1
- package/dist/types/companion.d.ts +3 -3
- package/dist/types/design.d.ts +2 -2
- package/dist/types/hosted.d.ts +3 -3
- package/dist/types/index.d.ts +2 -2
- package/dist/types/node-host.d.ts +2 -2
- package/dist/types/plugins.d.ts +445 -0
- package/dist/types/screen.d.ts +2 -2
- package/dist/types/server.d.ts +2 -228
- package/dist/types/vite.d.ts +16 -0
- package/package.json +19 -3
- package/dist/client/assets/canvas-8GXJIuDK.js +0 -1
- package/dist/client/assets/difference-worker-C99ychYw.js +0 -8
- package/dist/client/assets/files-DkWt1l9H.js +0 -1
- package/dist/client/assets/i18n-hH_Ba5QO.js +0 -1
- package/dist/client/assets/index-tpHYVXma.css +0 -2
- package/dist/client/assets/pages-BVd6MQmu.js +0 -1
- package/dist/client/assets/project-comments-D1IIQwsW.js +0 -1
- package/dist/client/assets/project-thread-links-DKwe_SYb.js +0 -1
- package/dist/client/assets/project-work-D4DZqBCZ.js +0 -1
- package/dist/client/assets/tasks-Cn0VOZ9Z.js +0 -1
- package/dist/client/assets/tasks-request-BLyOzokZ.js +0 -1
- package/dist/client/assets/workspace-DGErsSg6.js +0 -2
- package/dist/hosted/assets/tasks-_yKh2Z6q.js +0 -649
- package/dist/hosted/assets/tasks-request-CFPLvLc7.js +0 -113
- package/dist/node-host/assets/tasks-BBK_CybR.js +0 -651
- package/dist/server/assets/project-work-CSZlCwH-.js +0 -88
- package/dist/server/assets/tasks-CGdz-uox.js +0 -652
- package/dist/server/assets/tasks-request-D2NBjCTl.js +0 -115
- package/dist/types/assets/picker-D1Bw3ndx.d.ts +0 -14
package/dist/types/design.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as TaskDesignContext, c as TaskPageDesignProps, d as TaskSectionsDesignProps, f as defineTaskDesign, g as TaskCard, h as TaskOperations, i as TaskDesign, l as TaskPropertiesDesignProps, m as TaskDetails, n as TaskCardDesignProps, o as TaskDesignProject, p as PropertiesDefault, r as TaskColumnDesignProps, s as TaskDesignSlot, t as TaskActionsDesignProps, u as TaskRenderField } from "./assets/task-design-
|
|
1
|
+
import { C as fieldByRole, S as WorkSchema, a as WorkDetail, h as valueByRole, m as WorkValue, o as WorkItem, v as FieldKind, y as FieldSchema } from "./assets/items-BQdaVksf.js";
|
|
2
|
+
import { a as TaskDesignContext, c as TaskPageDesignProps, d as TaskSectionsDesignProps, f as defineTaskDesign, g as TaskCard, h as TaskOperations, i as TaskDesign, l as TaskPropertiesDesignProps, m as TaskDetails, n as TaskCardDesignProps, o as TaskDesignProject, p as PropertiesDefault, r as TaskColumnDesignProps, s as TaskDesignSlot, t as TaskActionsDesignProps, u as TaskRenderField } from "./assets/task-design-BDHKFHpp.js";
|
|
3
3
|
import { Handle, RemixNode } from "remix/component";
|
|
4
4
|
//#region ../ui/src/lib/tasks/task-design-parts.d.ts
|
|
5
5
|
/**
|
package/dist/types/hosted.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as ResolvedBudConfig } from "./assets/config-
|
|
2
|
-
import { a as HostedAuthor, c as
|
|
1
|
+
import { i as ResolvedBudConfig } from "./assets/config-CvcYmE2s.js";
|
|
2
|
+
import { a as HostedAuthor, c as HostedFactoryTick, d as RemoteBranchState, f as hostedScreenModules, i as HostedAppOptions, l as HostedRequestContext, n as CreateHostedApp, o as HostedDatabase, r as HostedApp, s as HostedFactory, t as BranchRemote, u as HostedStorage } from "./assets/contract-B7yuuqSn.js";
|
|
3
3
|
//#region src/hosted.server.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Creates a hosted Bud: Bud's own routes for the canvas and tasks on the host's stores.
|
|
@@ -8,4 +8,4 @@ import { a as HostedAuthor, c as HostedStorage, i as HostedAppOptions, l as Remo
|
|
|
8
8
|
*/
|
|
9
9
|
export declare const createHostedApp: CreateHostedApp;
|
|
10
10
|
//#endregion
|
|
11
|
-
export { type BranchRemote, type CreateHostedApp, type HostedApp, type HostedAppOptions, type HostedAuthor, type HostedDatabase, type HostedRequestContext, type HostedStorage, type RemoteBranchState, type ResolvedBudConfig, hostedScreenModules };
|
|
11
|
+
export { type BranchRemote, type CreateHostedApp, type HostedApp, type HostedAppOptions, type HostedAuthor, type HostedDatabase, type HostedFactory, type HostedFactoryTick, type HostedRequestContext, type HostedStorage, type RemoteBranchState, type ResolvedBudConfig, hostedScreenModules };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as ElementSource } from "./assets/canvas-anchor-CYU3qBPx.js";
|
|
2
|
-
import { a as defineConfig, c as files,
|
|
2
|
+
import { a as defineConfig, c as taskDesign, d as files, f as pages, l as BudScreen, n as BudRoute, p as tasks, s as picker, t as BudConfig, u as canvas } from "./assets/config-CvcYmE2s.js";
|
|
3
3
|
//#region ../picker/src/lib/types.d.ts
|
|
4
4
|
/** What a framework adds about an element, beyond what the page's DOM shows. */
|
|
5
5
|
interface PickerDescription {
|
|
@@ -21,4 +21,4 @@ interface PickerAdapter {
|
|
|
21
21
|
pick?(signal: AbortSignal): Promise<Element | null>;
|
|
22
22
|
}
|
|
23
23
|
//#endregion
|
|
24
|
-
export { type BudConfig, type BudRoute, type BudScreen, type ElementSource, type PickerAdapter, type PickerDescription, canvas, defineConfig, files, pages, tasks };
|
|
24
|
+
export { type BudConfig, type BudRoute, type BudScreen, type ElementSource, type PickerAdapter, type PickerDescription, canvas, defineConfig, files, pages, picker, taskDesign, tasks };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as HostedAuthor,
|
|
1
|
+
import { m as BudTheme } from "./assets/config-CvcYmE2s.js";
|
|
2
|
+
import { a as HostedAuthor, l as HostedRequestContext } from "./assets/contract-B7yuuqSn.js";
|
|
3
3
|
//#region src/node-host.server.d.ts
|
|
4
4
|
/** Where the project's Bud on Cloudflare is, and the secret its remote API takes. */
|
|
5
5
|
export interface NodeHostOptions {
|
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
import { n as ThreadAdapter, r as WorkAdapter, t as MemoryAdapterOptions } from "./assets/memory-state-BBW-FAVA.js";
|
|
2
|
+
import { c as taskDesign, i as ResolvedBudConfig, o as BudPluginBase, r as ProjectInfo, s as picker } from "./assets/config-CvcYmE2s.js";
|
|
3
|
+
import * as Effect from "effect/Effect";
|
|
4
|
+
import * as Cause from "effect/Cause";
|
|
5
|
+
import * as Layer from "effect/Layer";
|
|
6
|
+
//#region ../factory/src/lib/run.d.ts
|
|
7
|
+
/** Where a run is: setting up, working, waiting for review, being pushed, or over. */
|
|
8
|
+
type RunState = "provisioning" | "working" | "review" | "needs_context" | "changes" | "approved" | "pushing" | "pushed" | "merged" | "failed" | "discarded";
|
|
9
|
+
/** A person, as the server derived them. */
|
|
10
|
+
interface RunPerson {
|
|
11
|
+
name: string;
|
|
12
|
+
email: string;
|
|
13
|
+
}
|
|
14
|
+
/** One line of a run's activity, as the task shows it. */
|
|
15
|
+
interface RunActivity {
|
|
16
|
+
at: string;
|
|
17
|
+
kind: "status" | "message" | "tool" | "error";
|
|
18
|
+
text: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A task's run, kept in its metadata as `budRun`. It never holds secrets or tokens: it syncs into
|
|
22
|
+
* the task store's history.
|
|
23
|
+
*/
|
|
24
|
+
interface RunRecord {
|
|
25
|
+
version: 1;
|
|
26
|
+
id: string;
|
|
27
|
+
state: RunState;
|
|
28
|
+
/** The step that failed, which Retry repeats; null unless failed. */
|
|
29
|
+
failedIn: RunState | null;
|
|
30
|
+
provider: string;
|
|
31
|
+
sandbox: string | null;
|
|
32
|
+
harness: string;
|
|
33
|
+
model: string;
|
|
34
|
+
session: string | null;
|
|
35
|
+
/**
|
|
36
|
+
* The sandbox's ports for the dev server and the agent, once it is set up, and for its terminal
|
|
37
|
+
* bridge and the preview proxy in front of the dev server where it has them.
|
|
38
|
+
*/
|
|
39
|
+
ports: {
|
|
40
|
+
dev: number | null;
|
|
41
|
+
agent: number | null;
|
|
42
|
+
terminal?: number | null;
|
|
43
|
+
preview?: number | null;
|
|
44
|
+
};
|
|
45
|
+
branch: string;
|
|
46
|
+
base: {
|
|
47
|
+
branch: string;
|
|
48
|
+
commit: string | null;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Whether the sandbox is stopped to save cost while nobody needs it, its disk kept; the preview,
|
|
52
|
+
* changes or approval wake it.
|
|
53
|
+
*/
|
|
54
|
+
asleep: boolean;
|
|
55
|
+
/** The agent's last commit. */
|
|
56
|
+
head: string | null;
|
|
57
|
+
/** The commit pushed on approval. */
|
|
58
|
+
pushed: string | null;
|
|
59
|
+
summary: string | null;
|
|
60
|
+
/** What the agent asked when it couldn't go on without a person; null unless it waits. */
|
|
61
|
+
question: string | null;
|
|
62
|
+
activity: RunActivity[];
|
|
63
|
+
error: {
|
|
64
|
+
message: string;
|
|
65
|
+
at: string;
|
|
66
|
+
retryable: boolean;
|
|
67
|
+
} | null;
|
|
68
|
+
startedBy: RunPerson;
|
|
69
|
+
approvedBy: RunPerson | null;
|
|
70
|
+
createdAt: string;
|
|
71
|
+
updatedAt: string;
|
|
72
|
+
/** Earlier runs of the task, newest first. */
|
|
73
|
+
previous: {
|
|
74
|
+
id: string;
|
|
75
|
+
state: RunState;
|
|
76
|
+
endedAt: string;
|
|
77
|
+
}[];
|
|
78
|
+
}
|
|
79
|
+
/** What happened to a run: a person's action, or what the sandbox or agent reported. */
|
|
80
|
+
type RunEvent = {
|
|
81
|
+
type: "ready";
|
|
82
|
+
sandbox: string;
|
|
83
|
+
session: string;
|
|
84
|
+
commit: string | null;
|
|
85
|
+
ports: RunRecord["ports"];
|
|
86
|
+
} | {
|
|
87
|
+
type: "created";
|
|
88
|
+
sandbox: string;
|
|
89
|
+
} | {
|
|
90
|
+
type: "activity";
|
|
91
|
+
entry: Omit<RunActivity, "at">;
|
|
92
|
+
} | {
|
|
93
|
+
type: "idle";
|
|
94
|
+
summary: string;
|
|
95
|
+
head: string | null;
|
|
96
|
+
} | {
|
|
97
|
+
type: "changes";
|
|
98
|
+
message: string;
|
|
99
|
+
by: RunPerson;
|
|
100
|
+
} | {
|
|
101
|
+
type: "answer";
|
|
102
|
+
message: string;
|
|
103
|
+
by: RunPerson;
|
|
104
|
+
} | {
|
|
105
|
+
type: "approve";
|
|
106
|
+
by: RunPerson;
|
|
107
|
+
} | {
|
|
108
|
+
type: "pushed";
|
|
109
|
+
commit: string;
|
|
110
|
+
} | {
|
|
111
|
+
type: "merged";
|
|
112
|
+
} | {
|
|
113
|
+
type: "discard";
|
|
114
|
+
} | {
|
|
115
|
+
type: "fail";
|
|
116
|
+
message: string;
|
|
117
|
+
retryable: boolean;
|
|
118
|
+
} | {
|
|
119
|
+
type: "retry";
|
|
120
|
+
} | {
|
|
121
|
+
type: "sleep";
|
|
122
|
+
} | {
|
|
123
|
+
type: "wake";
|
|
124
|
+
};
|
|
125
|
+
//#endregion
|
|
126
|
+
//#region ../factory/src/server/harness.d.ts
|
|
127
|
+
/** What an agent reports while it works: activity, done, or broken. */
|
|
128
|
+
type RunFollowEvent = Extract<RunEvent, {
|
|
129
|
+
type: "activity" | "idle" | "fail";
|
|
130
|
+
}>;
|
|
131
|
+
/** An image that goes with a prompt, such as the comment's screenshot, as base64. */
|
|
132
|
+
interface HarnessImage {
|
|
133
|
+
mime: string;
|
|
134
|
+
name: string;
|
|
135
|
+
data: string;
|
|
136
|
+
}
|
|
137
|
+
/** Where a run's agent server listens, as Bud reaches it through the sandbox provider. */
|
|
138
|
+
interface HarnessAddress {
|
|
139
|
+
url: string;
|
|
140
|
+
/** Sent with every request, such as the provider's access cookie. */
|
|
141
|
+
headers: Record<string, string>;
|
|
142
|
+
/** The password the server was started with, derived per run. */
|
|
143
|
+
password: string;
|
|
144
|
+
}
|
|
145
|
+
/** One run's agent server: its sessions, prompts and what it does. */
|
|
146
|
+
interface HarnessAgent {
|
|
147
|
+
/** Whether the server answers yet. */
|
|
148
|
+
healthy(): Promise<boolean>;
|
|
149
|
+
/** Starts a session for the task and returns its id. */
|
|
150
|
+
session(title: string): Promise<string>;
|
|
151
|
+
/** Sends a prompt, resolving once the session has it. */
|
|
152
|
+
prompt(session: string, text: string, images?: readonly HarnessImage[]): Promise<void>;
|
|
153
|
+
/**
|
|
154
|
+
* The agent's work from now on: activity while it works, then `idle` with its summary and the
|
|
155
|
+
* checkout's commit, or `fail`. A turn that ended before the follow began ends it at once.
|
|
156
|
+
*/
|
|
157
|
+
follow(session: string, head: () => Promise<string | null>, signal: AbortSignal): AsyncIterable<RunFollowEvent>;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* The coding agent a run works with, such as OpenCode: how its server starts in a sandbox and
|
|
161
|
+
* how Bud talks to it. A plugin's `harness`.
|
|
162
|
+
*/
|
|
163
|
+
interface Harness {
|
|
164
|
+
/** Such as `opencode`, kept on each run. */
|
|
165
|
+
id: string;
|
|
166
|
+
/** The model, as the harness names it, kept on each run. */
|
|
167
|
+
model: string;
|
|
168
|
+
/** Server environment variables the model needs, passed into sandboxes as secrets. */
|
|
169
|
+
keys: readonly string[];
|
|
170
|
+
/** The port the server prefers when the provider doesn't pick one. */
|
|
171
|
+
port: number;
|
|
172
|
+
/**
|
|
173
|
+
* The shell command starting the agent's server in the sandbox's checkout, on 127.0.0.1, and
|
|
174
|
+
* the environment it needs.
|
|
175
|
+
*/
|
|
176
|
+
start(options: {
|
|
177
|
+
port: number;
|
|
178
|
+
password: string;
|
|
179
|
+
/** Bud's read-only task database for the agent, as an MCP server, when it can reach it. */
|
|
180
|
+
tools?: {
|
|
181
|
+
url: string;
|
|
182
|
+
token: string;
|
|
183
|
+
};
|
|
184
|
+
}): {
|
|
185
|
+
command: string;
|
|
186
|
+
env: Record<string, string>;
|
|
187
|
+
};
|
|
188
|
+
/** A client for a run's server. */
|
|
189
|
+
connect(address: HarnessAddress, fetch?: typeof globalThis.fetch): HarnessAgent;
|
|
190
|
+
/**
|
|
191
|
+
* The shell command opening the agent's own interface on a session in a terminal in the
|
|
192
|
+
* sandbox, attached to the running server; none when the harness has no such interface.
|
|
193
|
+
*/
|
|
194
|
+
attach?(options: {
|
|
195
|
+
port: number;
|
|
196
|
+
password: string;
|
|
197
|
+
session: string;
|
|
198
|
+
}): {
|
|
199
|
+
command: string;
|
|
200
|
+
env: Record<string, string>;
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
//#endregion
|
|
204
|
+
//#region ../factory/src/server/errors.d.ts
|
|
205
|
+
interface RunErrorFields {
|
|
206
|
+
readonly message: string;
|
|
207
|
+
readonly retryable: boolean;
|
|
208
|
+
readonly cause?: unknown;
|
|
209
|
+
}
|
|
210
|
+
declare const RunErrorBase: new (fields: RunErrorFields) => Cause.YieldableError & RunErrorFields & {
|
|
211
|
+
readonly _tag: "RunError";
|
|
212
|
+
};
|
|
213
|
+
/** A sandbox or agent failure; `retryable` when trying the same step again may work. */
|
|
214
|
+
export declare class RunError extends RunErrorBase {}
|
|
215
|
+
//#endregion
|
|
216
|
+
//#region ../factory/src/server/sandbox.d.ts
|
|
217
|
+
/** What a new sandbox starts from: the project at a ref, on a new local branch. */
|
|
218
|
+
interface SandboxSpec {
|
|
219
|
+
/** The project's checkout or clone URL, without credentials. */
|
|
220
|
+
repository: string;
|
|
221
|
+
/** The ref to start from, such as `main`. */
|
|
222
|
+
ref: string;
|
|
223
|
+
/** The local branch to create for the run. */
|
|
224
|
+
branch: string;
|
|
225
|
+
/** Run once in the checkout, such as `bun install`; null for none. */
|
|
226
|
+
setup: string | null;
|
|
227
|
+
/** For every command and process in the sandbox; values named in `secrets` are never shown. */
|
|
228
|
+
env: Record<string, string>;
|
|
229
|
+
secrets: readonly string[];
|
|
230
|
+
labels: Record<string, string>;
|
|
231
|
+
}
|
|
232
|
+
/** A command's outcome: its exit code and the end of its output. */
|
|
233
|
+
interface SandboxExec {
|
|
234
|
+
exitCode: number;
|
|
235
|
+
output: string;
|
|
236
|
+
}
|
|
237
|
+
/** A sandbox port from outside: for browsers, and for Bud's own requests. */
|
|
238
|
+
interface SandboxPort {
|
|
239
|
+
url: string;
|
|
240
|
+
server?: {
|
|
241
|
+
url: string;
|
|
242
|
+
headers: Record<string, string>;
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
/** What a provider can do beyond the basics. */
|
|
246
|
+
interface SandboxCapabilities {
|
|
247
|
+
/** Reach a port of the sandbox from outside, for a live preview. */
|
|
248
|
+
expose: boolean;
|
|
249
|
+
/** Stop keeps the disk, so resume finds the work as it was. */
|
|
250
|
+
snapshot: boolean;
|
|
251
|
+
/** Resume restarts the sandbox's processes. */
|
|
252
|
+
resume: boolean;
|
|
253
|
+
/** The sandbox shares this machine's network, so it reaches Bud on 127.0.0.1. */
|
|
254
|
+
localhost?: boolean;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Where agents work: a provider of sandboxes, each a checkout of the project with its own
|
|
258
|
+
* processes. `bud:local` runs them as Git worktrees on this machine; `bud:boat` on boat.dev.
|
|
259
|
+
*/
|
|
260
|
+
interface SandboxAdapter {
|
|
261
|
+
readonly id: string;
|
|
262
|
+
readonly capabilities: SandboxCapabilities;
|
|
263
|
+
/** Creates a sandbox: checkout on the run's branch and setup done. Resolves with its id. */
|
|
264
|
+
create(spec: SandboxSpec): Effect.Effect<string, RunError>;
|
|
265
|
+
status(id: string): Effect.Effect<"ready" | "stopped" | "gone", RunError>;
|
|
266
|
+
/** Runs a shell command in the checkout and waits for it. */
|
|
267
|
+
exec(id: string, command: string, options?: {
|
|
268
|
+
env?: Record<string, string>;
|
|
269
|
+
timeoutMs?: number;
|
|
270
|
+
}): Effect.Effect<SandboxExec, RunError>;
|
|
271
|
+
/**
|
|
272
|
+
* Starts a long-running process in the checkout, such as the dev server or the agent, under a
|
|
273
|
+
* name; starting a name again replaces it. Resume starts the named processes again.
|
|
274
|
+
*/
|
|
275
|
+
spawn(id: string, name: string, command: string, options?: {
|
|
276
|
+
env?: Record<string, string>;
|
|
277
|
+
}): Effect.Effect<void, RunError>;
|
|
278
|
+
/**
|
|
279
|
+
* A free port for a process in the sandbox. Sandboxes on this machine share its ports; a
|
|
280
|
+
* provider without it has a machine of its own, where the configured ports are free.
|
|
281
|
+
*/
|
|
282
|
+
freePort?(id: string): Effect.Effect<number, RunError>;
|
|
283
|
+
/**
|
|
284
|
+
* A URL that reaches a port of the sandbox, for a browser; it may carry a token, so it is never
|
|
285
|
+
* stored. `server` is how Bud itself reaches the port, when that differs, such as a URL without
|
|
286
|
+
* the token and the token as a cookie. `public` asks for a URL a browser can frame without a
|
|
287
|
+
* token or cookie, such as the preview in Agent view, for as long as the sandbox is up.
|
|
288
|
+
*/
|
|
289
|
+
expose(id: string, port: number, options?: {
|
|
290
|
+
public?: boolean;
|
|
291
|
+
}): Effect.Effect<SandboxPort, RunError>;
|
|
292
|
+
/** Takes a port's public URL down again, before the sandbox sleeps; stop does it too. */
|
|
293
|
+
hide?(id: string, port: number): Effect.Effect<void, RunError>;
|
|
294
|
+
/** Where a named process writes its output in the sandbox, for the terminal to follow. */
|
|
295
|
+
logFile?(id: string, name: string): string;
|
|
296
|
+
stop(id: string): Effect.Effect<void, RunError>;
|
|
297
|
+
resume(id: string): Effect.Effect<void, RunError>;
|
|
298
|
+
destroy(id: string): Effect.Effect<void, RunError>;
|
|
299
|
+
}
|
|
300
|
+
//#endregion
|
|
301
|
+
//#region ../plugin/src/plugin.server.d.ts
|
|
302
|
+
/** What Bud hands a plugin's store when it makes it: the project it serves. */
|
|
303
|
+
interface PluginHost {
|
|
304
|
+
project: {
|
|
305
|
+
readonly root: string;
|
|
306
|
+
readonly config: ResolvedBudConfig;
|
|
307
|
+
readonly info: ProjectInfo;
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* A store as a plugin gives it: an Effect layer, or a function making one for the project. Its
|
|
312
|
+
* layer may use the host's services, such as Project, Git, the file system and the Beads queue.
|
|
313
|
+
*/
|
|
314
|
+
type PluginStore<Service> = Layer.Layer<Service, unknown, any> | ((host: PluginHost) => Layer.Layer<Service, unknown, any>);
|
|
315
|
+
/** What Bud hands a plugin's sandbox provider. */
|
|
316
|
+
interface SandboxContext {
|
|
317
|
+
/** The project's checkout. */
|
|
318
|
+
root: string;
|
|
319
|
+
/** The server's environment, for keys such as `BOAT_API_KEY`. */
|
|
320
|
+
env: Readonly<Record<string, string | undefined>>;
|
|
321
|
+
/** The project's push remote as an HTTPS clone URL without credentials, or null. */
|
|
322
|
+
repository: string | null;
|
|
323
|
+
/** Credentials for cloning, when the factory has a push token; only the clone may use them. */
|
|
324
|
+
clone: {
|
|
325
|
+
username: string;
|
|
326
|
+
token: string;
|
|
327
|
+
} | null;
|
|
328
|
+
/** Server environment variables sandboxes must never see, such as the push token. */
|
|
329
|
+
withhold: readonly string[];
|
|
330
|
+
}
|
|
331
|
+
/** A Bud plugin, as in Vite: a name, an optional config hook and what it contributes. */
|
|
332
|
+
interface BudPlugin extends BudPluginBase {
|
|
333
|
+
work?: PluginStore<WorkAdapter>;
|
|
334
|
+
threads?: PluginStore<ThreadAdapter>;
|
|
335
|
+
/** The factory's sandboxes, made for the project when Bud starts. */
|
|
336
|
+
sandbox?: (context: SandboxContext) => SandboxAdapter;
|
|
337
|
+
/** The factory's coding agent: how its server starts in a sandbox, its model and keys. */
|
|
338
|
+
harness?: Harness;
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Keeps a plugin typed without changing it.
|
|
342
|
+
* @param plugin - The plugin.
|
|
343
|
+
* @returns The same plugin.
|
|
344
|
+
*/
|
|
345
|
+
export declare function definePlugin<P extends BudPlugin>(plugin: P): P;
|
|
346
|
+
/**
|
|
347
|
+
* Tasks and discussions in memory, for tests and examples; they're gone when Bud stops.
|
|
348
|
+
* @param options - The schema, the tasks and discussions to start with, and `only` to provide
|
|
349
|
+
* just one of the stores.
|
|
350
|
+
* @returns The plugin.
|
|
351
|
+
*/
|
|
352
|
+
export declare function memory(options?: Partial<MemoryAdapterOptions> & {
|
|
353
|
+
only?: "work" | "threads";
|
|
354
|
+
}): BudPlugin;
|
|
355
|
+
//#endregion
|
|
356
|
+
//#region ../beads/src/plugin.server.d.ts
|
|
357
|
+
/**
|
|
358
|
+
* Tasks and discussions in the project's Beads workspace, through the `bd` CLI and Bud's shared
|
|
359
|
+
* Beads queue: Bud's default stores.
|
|
360
|
+
* @param options - `only` to provide just one of the stores; both by default.
|
|
361
|
+
* @returns The store plugin.
|
|
362
|
+
*/
|
|
363
|
+
export declare function beads(options?: {
|
|
364
|
+
only?: "work" | "threads";
|
|
365
|
+
}): BudPlugin;
|
|
366
|
+
//#endregion
|
|
367
|
+
//#region ../comments/src/plugin.server.d.ts
|
|
368
|
+
/**
|
|
369
|
+
* Discussions on the project's `bud/comments` Git branch, kept for projects that used Bud's
|
|
370
|
+
* earlier Git storage; tasks come from another plugin.
|
|
371
|
+
* @returns The discussion store plugin.
|
|
372
|
+
*/
|
|
373
|
+
export declare function gitComments(): BudPlugin;
|
|
374
|
+
//#endregion
|
|
375
|
+
//#region ../harness-opencode/src/plugin.server.d.ts
|
|
376
|
+
/**
|
|
377
|
+
* `bud:opencode`: the factory's agent is OpenCode, Bud's default.
|
|
378
|
+
* @param options - The model as OpenCode names it, `provider/model` (DeepSeek V4.1 Flash on
|
|
379
|
+
* OpenCode's free tier by default), and the server variables its key is in, such as
|
|
380
|
+
* `DEEPSEEK_API_KEY`, which Bud passes into sandboxes as secrets.
|
|
381
|
+
* @returns The harness plugin.
|
|
382
|
+
*/
|
|
383
|
+
export declare function opencode(options?: {
|
|
384
|
+
model?: string;
|
|
385
|
+
keys?: readonly string[];
|
|
386
|
+
}): BudPlugin;
|
|
387
|
+
//#endregion
|
|
388
|
+
//#region ../picker-react-grab/src/plugin.server.d.ts
|
|
389
|
+
/**
|
|
390
|
+
* Comments find React components and their source through React Grab, for React projects with
|
|
391
|
+
* React Grab installed.
|
|
392
|
+
* @returns The picker plugin.
|
|
393
|
+
*/
|
|
394
|
+
export declare function reactGrab(): BudPlugin;
|
|
395
|
+
/**
|
|
396
|
+
* Comments find React components and their source from React alone, without React Grab.
|
|
397
|
+
* @returns The picker plugin.
|
|
398
|
+
*/
|
|
399
|
+
export declare function react(): BudPlugin;
|
|
400
|
+
//#endregion
|
|
401
|
+
//#region ../sandbox-boat/src/sandbox.server.d.ts
|
|
402
|
+
/** How `bud:boat` reaches boat.dev, and the sandboxes it makes. */
|
|
403
|
+
interface BoatSandboxOptions {
|
|
404
|
+
/** A boat API key (`boat_…`), read on the server. */
|
|
405
|
+
token: string;
|
|
406
|
+
/** Defaults to `https://boat.dev/api/v1`. */
|
|
407
|
+
base?: string;
|
|
408
|
+
/** The sandbox size; `default` is 4 vCPU and 8 GB. */
|
|
409
|
+
type?: "small" | "default" | "large" | "xlarge";
|
|
410
|
+
/** When an idle sandbox stops on its own; 2 hours by default, the trial's limit. */
|
|
411
|
+
ttlSeconds?: number;
|
|
412
|
+
/** Git credentials for cloning; they reach only the clone command, like the push token. */
|
|
413
|
+
clone?: {
|
|
414
|
+
username: string;
|
|
415
|
+
token: string;
|
|
416
|
+
} | null;
|
|
417
|
+
fetch?: typeof fetch;
|
|
418
|
+
/** How long to wait between status reads, for tests. */
|
|
419
|
+
pollMs?: number;
|
|
420
|
+
}
|
|
421
|
+
//#endregion
|
|
422
|
+
//#region ../sandbox-boat/src/plugin.server.d.ts
|
|
423
|
+
/**
|
|
424
|
+
* `bud:boat`: the factory's sandboxes on boat.dev, full machines cloned from the project's remote
|
|
425
|
+
* and billed while they run.
|
|
426
|
+
* @param options - The server variable with the API key (`BOAT_API_KEY` by default), the size
|
|
427
|
+
* and how long an idle sandbox lives.
|
|
428
|
+
* @returns The sandbox plugin.
|
|
429
|
+
*/
|
|
430
|
+
export declare function boat(options?: {
|
|
431
|
+
key?: string;
|
|
432
|
+
} & Pick<BoatSandboxOptions, "type" | "ttlSeconds">): BudPlugin;
|
|
433
|
+
//#endregion
|
|
434
|
+
//#region ../sandbox-local/src/plugin.server.d.ts
|
|
435
|
+
/**
|
|
436
|
+
* `bud:local`: the factory's sandboxes as Git worktrees of the project on this machine, for
|
|
437
|
+
* trying it with tasks you trust; they aren't isolated from your machine.
|
|
438
|
+
* @param options - Where worktrees go; the system's temp folder by default.
|
|
439
|
+
* @returns The sandbox plugin.
|
|
440
|
+
*/
|
|
441
|
+
export declare function local(options?: {
|
|
442
|
+
directory?: string;
|
|
443
|
+
}): BudPlugin;
|
|
444
|
+
//#endregion
|
|
445
|
+
export { type BudPlugin, type Harness, type HarnessAddress, type HarnessAgent, type HarnessImage, type PluginHost, type PluginStore, type RunFollowEvent, type SandboxAdapter, type SandboxCapabilities, type SandboxContext, type SandboxExec, type SandboxPort, type SandboxSpec, picker, taskDesign };
|
package/dist/types/screen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as ProjectInfo } from "./assets/config-
|
|
2
|
-
import { i as TaskDesign } from "./assets/task-design-
|
|
1
|
+
import { r as ProjectInfo } from "./assets/config-CvcYmE2s.js";
|
|
2
|
+
import { i as TaskDesign } from "./assets/task-design-BDHKFHpp.js";
|
|
3
3
|
import { RequestMethod, Route, RouteMap } from "remix/routes";
|
|
4
4
|
import { Handle, Props, RemixNode } from "remix/component";
|
|
5
5
|
import { MatchParams } from "remix/route-pattern/match";
|