@hachej/boring-agent 0.1.111 → 0.2.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 (156) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +262 -51
  3. package/dist/agents.d.ts +75 -0
  4. package/dist/agents.js +91 -0
  5. package/dist/approval.d.ts +71 -0
  6. package/dist/approval.js +126 -0
  7. package/dist/artifacts.d.ts +53 -0
  8. package/dist/artifacts.js +129 -0
  9. package/dist/ask-user.d.ts +40 -0
  10. package/dist/ask-user.js +134 -0
  11. package/dist/attachment.d.ts +5 -0
  12. package/dist/attachment.js +4 -0
  13. package/dist/browser-task.d.ts +32 -0
  14. package/dist/browser-task.js +119 -0
  15. package/dist/chat-transport.d.ts +80 -0
  16. package/dist/chat-transport.js +306 -0
  17. package/dist/contracts.d.ts +40 -0
  18. package/dist/contracts.js +1 -0
  19. package/dist/conversations.d.ts +136 -0
  20. package/dist/conversations.js +366 -0
  21. package/dist/definitions.d.ts +37 -0
  22. package/dist/definitions.js +99 -0
  23. package/dist/delivery-input.d.ts +35 -0
  24. package/dist/delivery-input.js +56 -0
  25. package/dist/delivery.d.ts +33 -0
  26. package/dist/delivery.js +154 -0
  27. package/dist/durable-wait.d.ts +23 -0
  28. package/dist/durable-wait.js +79 -0
  29. package/dist/file-convert.d.ts +46 -0
  30. package/dist/file-convert.js +159 -0
  31. package/dist/file-guard.d.ts +50 -0
  32. package/dist/file-guard.js +171 -0
  33. package/dist/file-types.d.ts +17 -0
  34. package/dist/file-types.js +95 -0
  35. package/dist/gateway-provider.d.ts +24 -0
  36. package/dist/gateway-provider.js +42 -0
  37. package/dist/git.d.ts +34 -0
  38. package/dist/git.js +79 -0
  39. package/dist/harness-pool.d.ts +38 -0
  40. package/dist/harness-pool.js +134 -0
  41. package/dist/index.d.ts +4 -0
  42. package/dist/index.js +1 -0
  43. package/dist/json-schema-tool.d.ts +25 -0
  44. package/dist/json-schema-tool.js +19 -0
  45. package/dist/memory/optchat-core.d.ts +118 -0
  46. package/dist/memory/optchat-core.js +317 -0
  47. package/dist/memory/optchat.d.ts +156 -0
  48. package/dist/memory/optchat.js +432 -0
  49. package/dist/mentions.d.ts +56 -0
  50. package/dist/mentions.js +140 -0
  51. package/dist/metering.d.ts +183 -0
  52. package/dist/metering.js +443 -0
  53. package/dist/model-gateway.d.ts +86 -0
  54. package/dist/model-gateway.js +241 -0
  55. package/dist/native-version.d.ts +9 -0
  56. package/dist/native-version.js +7 -0
  57. package/dist/native.d.ts +4 -0
  58. package/dist/native.js +1 -0
  59. package/dist/presentation.d.ts +17 -0
  60. package/dist/presentation.js +39 -0
  61. package/dist/projection-format.d.ts +68 -0
  62. package/dist/projection-format.js +118 -0
  63. package/dist/projection-window.d.ts +9 -0
  64. package/dist/projection-window.js +93 -0
  65. package/dist/projection.d.ts +22 -0
  66. package/dist/projection.js +153 -0
  67. package/dist/question-response.d.ts +20 -0
  68. package/dist/question-response.js +75 -0
  69. package/dist/questions.d.ts +74 -0
  70. package/dist/questions.js +199 -0
  71. package/dist/self-evolving.d.ts +55 -0
  72. package/dist/self-evolving.js +239 -0
  73. package/dist/skills.d.ts +15 -0
  74. package/dist/skills.js +51 -0
  75. package/dist/tool-evidence.d.ts +14 -0
  76. package/dist/tool-evidence.js +54 -0
  77. package/dist/validation.d.ts +38 -0
  78. package/dist/validation.js +68 -0
  79. package/dist/workspaces.d.ts +107 -0
  80. package/dist/workspaces.js +212 -0
  81. package/package.json +145 -150
  82. package/dist/DebugDrawer-JNA43SVR.js +0 -8
  83. package/dist/admin-DORVQfLn.d.ts +0 -340
  84. package/dist/chunk-2BGLZZ7T.js +0 -10
  85. package/dist/chunk-42D6KAQV.js +0 -2882
  86. package/dist/chunk-4XOW57KJ.js +0 -343
  87. package/dist/chunk-72KT6VWV.js +0 -1338
  88. package/dist/chunk-7XAOVFSN.js +0 -28
  89. package/dist/chunk-KJIEMSQP.js +0 -198
  90. package/dist/chunk-KN72XWP7.js +0 -394
  91. package/dist/chunk-N6THTH7P.js +0 -110
  92. package/dist/chunk-V3H5A3BR.js +0 -22501
  93. package/dist/chunk-YGRQ4Q5P.js +0 -20
  94. package/dist/chunk-YTUZFKB3.js +0 -78
  95. package/dist/core/index.d.ts +0 -28
  96. package/dist/core/index.js +0 -617
  97. package/dist/createHarness-DOLOHA62.js +0 -18
  98. package/dist/eval/index.d.ts +0 -247
  99. package/dist/eval/index.js +0 -541
  100. package/dist/file-search-BUgMSKZE.d.ts +0 -289
  101. package/dist/front/artifacts.d.ts +0 -34
  102. package/dist/front/artifacts.js +0 -21
  103. package/dist/front/index.d.ts +0 -1082
  104. package/dist/front/index.js +0 -12912
  105. package/dist/front/styles.css +0 -5380
  106. package/dist/harness-qHlMJhZo.d.ts +0 -276
  107. package/dist/middleware-CaAEXpi5.d.ts +0 -115
  108. package/dist/piChatEvent-DpE0lIb9.d.ts +0 -450
  109. package/dist/piChatSessionService-CBct-hmz.d.ts +0 -86
  110. package/dist/sandbox-BMhut3kh.d.ts +0 -317
  111. package/dist/server/agent-host/testing/compositionRouteProof.d.ts +0 -8
  112. package/dist/server/agent-host/testing/compositionRouteProof.js +0 -78
  113. package/dist/server/agent-host/testing/gatewayConformance.d.ts +0 -43
  114. package/dist/server/agent-host/testing/gatewayConformance.js +0 -605
  115. package/dist/server/index.d.ts +0 -2278
  116. package/dist/server/index.js +0 -274
  117. package/dist/server/pi-session-readability.d.ts +0 -12
  118. package/dist/server/pi-session-readability.js +0 -23
  119. package/dist/server/worker/index.d.ts +0 -68
  120. package/dist/server/worker/index.js +0 -377
  121. package/dist/share-entry-CxS6UJ_L.d.ts +0 -330
  122. package/dist/shared/index.d.ts +0 -2111
  123. package/dist/shared/index.js +0 -262
  124. package/dist/types-DcWoQMn8.d.ts +0 -1377
  125. package/docs/ACCESSIBILITY.md +0 -52
  126. package/docs/AGENT_GATEWAY_V0.md +0 -212
  127. package/docs/AGENT_PACKAGES.md +0 -90
  128. package/docs/API.md +0 -123
  129. package/docs/AUTHORING.md +0 -68
  130. package/docs/CSP.md +0 -41
  131. package/docs/ERROR_CODES.md +0 -229
  132. package/docs/KNOWN_LIMITATIONS.md +0 -100
  133. package/docs/MIGRATION.md +0 -50
  134. package/docs/PERFORMANCE.md +0 -68
  135. package/docs/PLUGINS.md +0 -138
  136. package/docs/README.md +0 -98
  137. package/docs/RISKS-MULTI-TAB.md +0 -46
  138. package/docs/SESSION_IDENTITY.md +0 -91
  139. package/docs/STYLING.md +0 -73
  140. package/docs/UI-SHADCN.md +0 -56
  141. package/docs/VERCEL_COSTS.md +0 -103
  142. package/docs/plans/archive/AGENT_EVAL_FRAMEWORK.md +0 -466
  143. package/docs/plans/archive/agent-package-spec.md +0 -1777
  144. package/docs/plans/archive/harness-followup-capabilities.md +0 -440
  145. package/docs/plans/archive/harness-tool-ui-capabilities.md +0 -144
  146. package/docs/plans/archive/pi-followup-history-projection.md +0 -229
  147. package/docs/plans/archive/pi-tools-migration.md +0 -1061
  148. package/docs/plans/archive/reviews/pi-followup-history-codex-review.md +0 -11
  149. package/docs/plans/archive/reviews/pi-followup-history-gpt-review.md +0 -64
  150. package/docs/plans/archive/reviews/pi-followup-history-opus-review.md +0 -43
  151. package/docs/plans/archive/reviews/pi-followup-history-xai-review.md +0 -43
  152. package/docs/plans/archive/vercel-base-snapshot-template-plan.md +0 -527
  153. package/docs/plans/archive/vercel-persistent-sandbox-adapter.md +0 -553
  154. package/docs/runtime-provisioning.md +0 -157
  155. package/docs/runtime.md +0 -296
  156. package/docs/tools.md +0 -102
@@ -0,0 +1,212 @@
1
+ /** The single-workspace case: every call uses `binding`. */
2
+ export function constantWorkspace(binding) {
3
+ checked(binding);
4
+ const frozen = Object.freeze({ ...binding });
5
+ return () => frozen;
6
+ }
7
+ /** A resolver as given, or a binding wrapped as a constant resolver; nothing: the workspace of the call's env (`withWorkspace`). */
8
+ export function asWorkspaceResolver(workspace) {
9
+ return workspace === undefined || typeof workspace === 'function' ? workspace : constantWorkspace(workspace);
10
+ }
11
+ const decorations = new WeakMap();
12
+ /** Mark `view` as a decoration of `env` (the same workspace, for example `confinedEnv`'s): the workspace of `view` is that of `env`. Returns `view`. */
13
+ export function decorate(env, view) { decorations.set(view, env); return view; }
14
+ /** The env `env` decorates, or `env` itself: the env a workspace is attached to. */
15
+ const undecorated = (env) => decorations.get(env) ?? env;
16
+ const attached = new WeakMap();
17
+ /**
18
+ * Attach `binding` to `env`: the workspace that comes with that env. The host's `HarnessOptions.env(target, context)` returns such an
19
+ * env, and every tool without its own `workspace` option uses its binding, so one host function resolves both. Returns `env`.
20
+ */
21
+ export function withWorkspace(env, binding) {
22
+ checked(binding);
23
+ if (binding.env !== undefined && binding.env !== env)
24
+ throw new TypeError('A workspace binding names another env');
25
+ attached.set(env, Object.freeze({ ...binding, env }));
26
+ return env;
27
+ }
28
+ /** The workspace attached to `env` (`withWorkspace`, or the env of a `createWorkspaceCache` entry), if any. */
29
+ export const workspaceOfEnv = (env) => env === undefined ? undefined : attached.get(env);
30
+ function checked(binding) {
31
+ if (!binding || typeof binding !== 'object' || !binding.files || typeof binding.files.providerId !== 'string')
32
+ throw new TypeError('A workspace binding needs its provider');
33
+ if (typeof binding.root !== 'string' || !binding.root.startsWith('/'))
34
+ throw new TypeError('A workspace binding needs the absolute workspace root');
35
+ return binding;
36
+ }
37
+ /** The target Pi would pass to `HarnessOptions.env` for this call: its conversation, the agent's `cwd`, committed reads. */
38
+ export async function callTarget(api, context) {
39
+ const cwd = (await api.agent(context)).cwd;
40
+ return { conversationId: api.conversationId, ...(cwd === undefined ? {} : { cwd }), read: api };
41
+ }
42
+ /**
43
+ * Resolve the workspace of a tool call, or the reason it has none: through `resolver` (or one binding), or without either from the env
44
+ * Pi handed the call (`withWorkspace`).
45
+ */
46
+ export async function workspaceFor(resolver, api, context) {
47
+ // The env itself first: a binding attached to a decorated env (`withWorkspace(confinedEnv(raw), binding)`) is its own; otherwise the decoration's source.
48
+ const own = api.env, base = own === undefined ? undefined : undecorated(own);
49
+ const binding = resolver === undefined ? workspaceOfEnv(own) ?? workspaceOfEnv(base) : typeof resolver === 'function' ? await resolver(await callTarget(api, context), context) : resolver;
50
+ if (binding === undefined)
51
+ return { refused: 'This conversation has no workspace.' };
52
+ checked(binding);
53
+ if (binding.env !== undefined && binding.env !== own && binding.env !== base)
54
+ return { refused: 'The workspace of this conversation was reopened during the call. Try again.' };
55
+ return { binding };
56
+ }
57
+ /**
58
+ * The conversation whose workspace a conversation uses: itself, or for a conversation a task owns (a subagent's child), the
59
+ * conversation of that task, transitively. Read-only; the mapping never changes, so a host may memoise it.
60
+ */
61
+ export async function rootConversation(session, id, context) {
62
+ return session.commit(async (tx) => {
63
+ let current = id;
64
+ for (let depth = 0; depth < 64; depth++) {
65
+ const record = await tx.conversation(current);
66
+ if (record?.owner === undefined)
67
+ return current;
68
+ current = record.owner.conversationId;
69
+ }
70
+ return current;
71
+ }, context);
72
+ }
73
+ /**
74
+ * One open workspace per key, opened on first use and closed when idle. The cache owns what `open` returns: a lease or a call
75
+ * borrows it, and only the cache closes it (idle, or `close()`), never a viewer that stops looking.
76
+ */
77
+ export function createWorkspaceCache(options) {
78
+ const idleMs = options.idleMs ?? 10 * 60_000;
79
+ if (!(idleMs > 0))
80
+ throw new TypeError('idleMs must be positive');
81
+ const entries = new Map();
82
+ let closed = false;
83
+ function arm(key, entry) {
84
+ if (entry.timer !== undefined)
85
+ clearTimeout(entry.timer);
86
+ if (!Number.isFinite(idleMs))
87
+ return;
88
+ entry.timer = setTimeout(() => { void sweep(key, entry); }, Math.max(0, entry.lastUsed + idleMs - Date.now()));
89
+ entry.timer.unref?.();
90
+ }
91
+ async function sweep(key, entry) {
92
+ entry.timer = undefined;
93
+ if (entries.get(key) !== entry || entry.leases > 0)
94
+ return;
95
+ if (Date.now() - entry.lastUsed < idleMs)
96
+ return arm(key, entry);
97
+ let busy = false;
98
+ try {
99
+ busy = (await options.busy?.(key)) === true;
100
+ }
101
+ catch {
102
+ busy = true;
103
+ }
104
+ if (entries.get(key) !== entry || entry.leases > 0)
105
+ return;
106
+ if (Date.now() - entry.lastUsed < idleMs)
107
+ return arm(key, entry);
108
+ if (busy) {
109
+ entry.lastUsed = Date.now();
110
+ return arm(key, entry);
111
+ }
112
+ await dispose(key, entry);
113
+ }
114
+ function dispose(key, entry) {
115
+ if (entries.get(key) === entry)
116
+ entries.delete(key);
117
+ if (entry.timer !== undefined)
118
+ clearTimeout(entry.timer);
119
+ entry.closing ??= entry.opening.then(async (workspace) => {
120
+ await Promise.allSettled(entry.views.values());
121
+ await workspace.close?.();
122
+ }, () => undefined).catch(error => { options.onError?.(error, key); });
123
+ return entry.closing;
124
+ }
125
+ async function use(key, context, lease) {
126
+ if (closed)
127
+ throw new Error('The workspace cache is closed');
128
+ let entry = entries.get(key);
129
+ if (entry === undefined) {
130
+ const opening = Promise.resolve().then(() => options.open(key, context)).then(workspace => {
131
+ checked(workspace);
132
+ if (!workspace.env)
133
+ throw new TypeError(`Workspace ${key} has no env`);
134
+ withWorkspace(workspace.env, workspace);
135
+ return workspace;
136
+ });
137
+ entry = { opening, views: new Map(), leases: 0, lastUsed: Date.now() };
138
+ entries.set(key, entry);
139
+ const created = entry;
140
+ opening.catch(() => { if (entries.get(key) === created)
141
+ entries.delete(key); });
142
+ }
143
+ if (lease)
144
+ entry.leases++;
145
+ entry.lastUsed = Date.now();
146
+ try {
147
+ const workspace = await entry.opening;
148
+ if (closed || entries.get(key) !== entry)
149
+ throw new Error('The workspace was closed during acquisition');
150
+ if (!lease)
151
+ arm(key, entry);
152
+ return { workspace, entry };
153
+ }
154
+ catch (error) {
155
+ if (lease)
156
+ entry.leases--;
157
+ throw error;
158
+ }
159
+ }
160
+ const forTarget = async (target, context) => {
161
+ const key = await options.key(target, context);
162
+ if (key === undefined)
163
+ return undefined;
164
+ const { workspace, entry } = await use(key, context, false);
165
+ if (closed || entries.get(key) !== entry)
166
+ throw new Error('The workspace was closed during acquisition');
167
+ const cwd = target.cwd;
168
+ if (cwd === undefined || cwd === workspace.env.cwd)
169
+ return workspace;
170
+ const atCwd = options.atCwd;
171
+ if (atCwd === undefined)
172
+ throw new Error(`Workspace ${key} cannot provide working directory ${cwd}`);
173
+ let selected = entry.views.get(cwd);
174
+ if (selected === undefined) {
175
+ selected = Promise.resolve().then(() => atCwd(workspace, cwd, context)).then(env => {
176
+ if (env === workspace.env || env.id !== workspace.env.id || env.cwd !== cwd)
177
+ throw new Error('A cwd view must be independent and use the same namespace and requested working directory');
178
+ const binding = { ...workspace, env };
179
+ withWorkspace(env, binding);
180
+ return binding;
181
+ });
182
+ entry.views.set(cwd, selected);
183
+ void selected.catch(() => { entry.views.delete(cwd); });
184
+ }
185
+ const view = await selected;
186
+ if (closed || entries.get(key) !== entry)
187
+ throw new Error('The workspace was closed during cwd acquisition');
188
+ return view;
189
+ };
190
+ return {
191
+ env: async (target, context) => (await forTarget(target, context))?.env,
192
+ workspace: forTarget,
193
+ acquire: async (key, context) => {
194
+ const { workspace, entry } = await use(key, context, true);
195
+ let released = false;
196
+ return { workspace, release: () => {
197
+ if (released)
198
+ return;
199
+ released = true;
200
+ entry.leases--;
201
+ entry.lastUsed = Date.now();
202
+ if (entry.leases === 0 && entries.get(key) === entry)
203
+ arm(key, entry);
204
+ } };
205
+ },
206
+ keys: () => [...entries.keys()],
207
+ close: async () => {
208
+ closed = true;
209
+ await Promise.all([...entries].map(([key, entry]) => dispose(key, entry)));
210
+ },
211
+ };
212
+ }
package/package.json CHANGED
@@ -1,166 +1,161 @@
1
1
  {
2
2
  "name": "@hachej/boring-agent",
3
- "version": "0.1.111",
4
- "type": "module",
3
+ "version": "0.2.0",
5
4
  "license": "MIT",
6
- "description": "Pane-embeddable coding agent. Ships direct/local/vercel-sandbox execution modes behind one interface.",
7
- "repository": {
8
- "type": "git",
9
- "url": "https://github.com/hachej/boring-ui"
10
- },
11
- "homepage": "https://github.com/hachej/boring-ui",
5
+ "private": false,
6
+ "type": "module",
7
+ "description": "Native Pi attachment, the read/write/edit guard, durable questions, conditional document delivery and metering.",
8
+ "sideEffects": false,
9
+ "files": [
10
+ "dist/**/*.js",
11
+ "dist/**/*.d.ts",
12
+ "README.md",
13
+ "LICENSE"
14
+ ],
15
+ "types": "./dist/index.d.ts",
12
16
  "exports": {
13
17
  ".": {
14
- "types": "./dist/front/index.d.ts",
15
- "import": "./dist/front/index.js"
16
- },
17
- "./shared": {
18
- "types": "./dist/shared/index.d.ts",
19
- "import": "./dist/shared/index.js"
20
- },
21
- "./core": {
22
- "types": "./dist/core/index.d.ts",
23
- "import": "./dist/core/index.js"
24
- },
25
- "./server": {
26
- "types": "./dist/server/index.d.ts",
27
- "import": "./dist/server/index.js",
28
- "default": "./dist/server/index.js"
29
- },
30
- "./server/pi-session-readability": {
31
- "types": "./dist/server/pi-session-readability.d.ts",
32
- "import": "./dist/server/pi-session-readability.js",
33
- "default": "./dist/server/pi-session-readability.js"
34
- },
35
- "./server/agent-host/testing/gatewayConformance": {
36
- "types": "./dist/server/agent-host/testing/gatewayConformance.d.ts",
37
- "import": "./dist/server/agent-host/testing/gatewayConformance.js",
38
- "default": "./dist/server/agent-host/testing/gatewayConformance.js"
39
- },
40
- "./server/agent-host/testing/compositionRouteProof": {
41
- "types": "./dist/server/agent-host/testing/compositionRouteProof.d.ts",
42
- "import": "./dist/server/agent-host/testing/compositionRouteProof.js",
43
- "default": "./dist/server/agent-host/testing/compositionRouteProof.js"
44
- },
45
- "./server/worker": {
46
- "types": "./dist/server/worker/index.d.ts",
47
- "import": "./dist/server/worker/index.js",
48
- "default": "./dist/server/worker/index.js"
49
- },
50
- "./front": {
51
- "types": "./dist/front/index.d.ts",
52
- "import": "./dist/front/index.js"
53
- },
54
- "./front/styles.css": "./dist/front/styles.css",
55
- "./front/artifacts": {
56
- "types": "./dist/front/artifacts.d.ts",
57
- "import": "./dist/front/artifacts.js"
58
- },
59
- "./eval": {
60
- "types": "./dist/eval/index.d.ts",
61
- "import": "./dist/eval/index.js"
18
+ "types": "./dist/index.d.ts",
19
+ "import": "./dist/index.js"
20
+ },
21
+ "./presentation": {
22
+ "types": "./dist/presentation.d.ts",
23
+ "import": "./dist/presentation.js"
24
+ },
25
+ "./native": {
26
+ "types": "./dist/native.d.ts",
27
+ "import": "./dist/native.js"
28
+ },
29
+ "./contracts": {
30
+ "types": "./dist/contracts.d.ts",
31
+ "import": "./dist/contracts.js"
32
+ },
33
+ "./definitions": {
34
+ "types": "./dist/definitions.d.ts",
35
+ "import": "./dist/definitions.js"
36
+ },
37
+ "./file-guard": {
38
+ "types": "./dist/file-guard.d.ts",
39
+ "import": "./dist/file-guard.js"
40
+ },
41
+ "./workspaces": {
42
+ "types": "./dist/workspaces.d.ts",
43
+ "import": "./dist/workspaces.js"
44
+ },
45
+ "./harness-pool": {
46
+ "types": "./dist/harness-pool.d.ts",
47
+ "import": "./dist/harness-pool.js"
48
+ },
49
+ "./artifacts": {
50
+ "types": "./dist/artifacts.d.ts",
51
+ "import": "./dist/artifacts.js"
52
+ },
53
+ "./file-convert": {
54
+ "types": "./dist/file-convert.d.ts",
55
+ "import": "./dist/file-convert.js"
56
+ },
57
+ "./file-types": {
58
+ "types": "./dist/file-types.d.ts",
59
+ "import": "./dist/file-types.js"
60
+ },
61
+ "./ask-user": {
62
+ "types": "./dist/ask-user.d.ts",
63
+ "import": "./dist/ask-user.js"
64
+ },
65
+ "./browser-task": {
66
+ "types": "./dist/browser-task.d.ts",
67
+ "import": "./dist/browser-task.js"
68
+ },
69
+ "./questions": {
70
+ "types": "./dist/questions.d.ts",
71
+ "import": "./dist/questions.js"
72
+ },
73
+ "./delivery": {
74
+ "types": "./dist/delivery.d.ts",
75
+ "import": "./dist/delivery.js"
76
+ },
77
+ "./question-response": {
78
+ "types": "./dist/question-response.d.ts",
79
+ "import": "./dist/question-response.js"
80
+ },
81
+ "./projection": {
82
+ "types": "./dist/projection.d.ts",
83
+ "import": "./dist/projection.js"
84
+ },
85
+ "./agents": {
86
+ "types": "./dist/agents.d.ts",
87
+ "import": "./dist/agents.js"
88
+ },
89
+ "./chat-transport": {
90
+ "types": "./dist/chat-transport.d.ts",
91
+ "import": "./dist/chat-transport.js"
92
+ },
93
+ "./conversations": {
94
+ "types": "./dist/conversations.d.ts",
95
+ "import": "./dist/conversations.js"
96
+ },
97
+ "./mentions": {
98
+ "types": "./dist/mentions.d.ts",
99
+ "import": "./dist/mentions.js"
100
+ },
101
+ "./validation": {
102
+ "types": "./dist/validation.d.ts",
103
+ "import": "./dist/validation.js"
104
+ },
105
+ "./git": {
106
+ "types": "./dist/git.d.ts",
107
+ "import": "./dist/git.js"
108
+ },
109
+ "./approval": {
110
+ "types": "./dist/approval.d.ts",
111
+ "import": "./dist/approval.js"
112
+ },
113
+ "./memory/optchat": {
114
+ "types": "./dist/memory/optchat.d.ts",
115
+ "import": "./dist/memory/optchat.js"
116
+ },
117
+ "./model-gateway": {
118
+ "types": "./dist/model-gateway.d.ts",
119
+ "import": "./dist/model-gateway.js"
120
+ },
121
+ "./gateway-provider": {
122
+ "types": "./dist/gateway-provider.d.ts",
123
+ "import": "./dist/gateway-provider.js"
124
+ },
125
+ "./metering": {
126
+ "types": "./dist/metering.d.ts",
127
+ "import": "./dist/metering.js"
62
128
  }
63
129
  },
64
- "sideEffects": [
65
- "**/*.css"
66
- ],
67
- "files": [
68
- "dist",
69
- "docs"
70
- ],
71
- "dependencies": {
72
- "@mariozechner/pi-coding-agent": "npm:@earendil-works/pi-coding-agent@0.84.3",
73
- "@modelcontextprotocol/sdk": "1.30.0",
74
- "@radix-ui/react-use-controllable-state": "^1.2.6",
75
- "@streamdown/cjk": "^1.0.3",
76
- "@streamdown/code": "^1.1.1",
77
- "@streamdown/math": "^1.0.2",
78
- "@streamdown/mermaid": "^1.0.2",
79
- "ai": "^7.0.68",
80
- "clsx": "^2.1.1",
81
- "diff": "^9.0.0",
82
- "fastify": "^5.12.1",
83
- "lucide-react": "^1.31.0",
84
- "motion": "^13.1.0",
85
- "nanoid": "^6.0.0",
86
- "postgres": "^3.4.9",
87
- "proper-lockfile": "^4.1.2",
88
- "shiki": "^4.4.2",
89
- "streamdown": "^2.5.0",
90
- "tailwind-merge": "^3.5.0",
91
- "use-stick-to-bottom": "^1.1.6",
92
- "yaml": "^2.9.0",
93
- "zod": "^3.25.76",
94
- "@hachej/boring-sandbox": "0.1.111",
95
- "@hachej/boring-ui-kit": "0.1.111",
96
- "@hachej/boring-bash": "0.1.111"
97
- },
98
- "devDependencies": {
99
- "@vercel/sandbox": "3.0.0",
100
- "@antithesishq/bombadil": "0.7.2",
101
- "@opentelemetry/api": "^1.9.1",
102
- "@tailwindcss/postcss": "^4.3.3",
103
- "@types/node": "^22.20.0",
104
- "@types/proper-lockfile": "^4.1.4",
105
- "@types/react": "^19.2.18",
106
- "@types/react-dom": "^19.2.5",
107
- "@vitejs/plugin-react": "^4.7.0",
108
- "ajv": "^8.20.0",
109
- "esbuild": "^0.28.2",
110
- "postcss": "^8.5.25",
111
- "react": "^19.2.8",
112
- "react-dom": "^19.2.8",
113
- "tsup": "^8.4.0",
114
- "tsx": "^4.23.13",
115
- "typescript": "^6.0.3",
116
- "vite": "^8.2.1",
117
- "@earendil-works/pi-ai": "0.84.3",
118
- "vitest": "^4.1.11"
119
- },
120
130
  "peerDependencies": {
121
- "react": "^18.0.0 || ^19.0.0",
122
- "react-dom": "^18.0.0 || ^19.0.0",
123
- "tailwindcss": ">=3.4.0 || >=4.0.0",
124
- "vitest": "^4.1.11"
131
+ "@earendil-works/pi-durable": "1.1.0",
132
+ "@earendil-works/pi-ai": "1.1.0",
133
+ "@earendil-works/chord": "1.1.0",
134
+ "@hachej/boring-files": "0.2.0",
135
+ "@hachej/boring-ui-kit": "0.2.0"
125
136
  },
126
137
  "peerDependenciesMeta": {
127
- "react": {
128
- "optional": true
129
- },
130
- "react-dom": {
131
- "optional": true
132
- },
133
- "tailwindcss": {
138
+ "@hachej/boring-files": {
134
139
  "optional": true
135
140
  },
136
- "vitest": {
141
+ "@hachej/boring-ui-kit": {
137
142
  "optional": true
138
143
  }
139
144
  },
140
- "scripts": {
141
- "build": "tsup && pnpm run build:assert",
142
- "build:dev": "{ [ -d '../ui/dist' ] || pnpm --filter @hachej/boring-ui-kit build; } && tsup --config tsup.dev.config.ts && node ./scripts/build-front-css.mjs",
143
- "build:assert": "node ./scripts/assert-build-artifacts.mjs",
144
- "dev": "tsx src/server/dev.ts",
145
- "test": "vitest run",
146
- "test:e2e": "playwright test -c e2e/playwright.config.ts",
147
- "test:chat-baseline": "node ./scripts/run-chat-baseline.mjs",
148
- "test:bombadil:chat": "node ./scripts/run-bombadil-chat.mjs",
149
- "test:bombadil:chat:nightly": "BOMBADIL_TIME_LIMIT=5m node ./scripts/run-bombadil-chat.mjs",
150
- "test:regression": "vitest run src/server/__tests__/system-prompt-size.regression.test.ts",
151
- "test:watch": "vitest",
152
- "eval": "tsx ./scripts/eval.ts",
153
- "eval:provisioning": "tsx ./scripts/eval-provisioning-sdk.mts",
154
- "eval:provisioning:agent": "tsx ./scripts/eval-provisioning-agent.mts",
155
- "eval:provisioning:agent:vercel": "tsx ./scripts/eval-provisioning-agent-vercel.mts",
156
- "check:isolation": "tsx ./scripts/check-agent-isolation.ts",
157
- "pi-sdk:canary": "./scripts/pi-sdk-canary.sh",
158
- "typecheck": "tsc --noEmit",
159
- "lint": "pnpm run typecheck && pnpm run lint:invariants",
160
- "lint:invariants": "bash ../../scripts/check-invariants.sh .",
161
- "clean": "rm -rf dist .tsbuildinfo",
162
- "smoke:vercel-sandbox": "tsx ./scripts/smoke-vercel-sandbox.mts",
163
- "smoke:capability-readiness": "tsx ./scripts/smoke-capability-readiness.mts",
164
- "smoke:capability-readiness:vercel": "tsx ./scripts/smoke-capability-readiness-vercel.mts"
145
+ "engines": {
146
+ "node": ">=22.19.0"
147
+ },
148
+ "repository": {
149
+ "type": "git",
150
+ "url": "git+https://github.com/hachej/boring-ui.git",
151
+ "directory": "packages/agent"
152
+ },
153
+ "homepage": "https://github.com/hachej/boring-ui#readme",
154
+ "bugs": {
155
+ "url": "https://github.com/hachej/boring-ui/issues"
156
+ },
157
+ "publishConfig": {
158
+ "access": "public",
159
+ "registry": "https://registry.npmjs.org/"
165
160
  }
166
- }
161
+ }
@@ -1,8 +0,0 @@
1
- import {
2
- DebugDrawer
3
- } from "./chunk-4XOW57KJ.js";
4
- import "./chunk-2BGLZZ7T.js";
5
- import "./chunk-YGRQ4Q5P.js";
6
- export {
7
- DebugDrawer
8
- };