@hachej/boring-agent 0.1.13 → 0.1.16
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 +242 -42
- package/dist/DebugDrawer-MCYZ4AWZ.js +6 -0
- package/dist/chunk-F3CE5CNW.js +38 -0
- package/dist/chunk-MMJA3QON.js +295 -0
- package/dist/front/index.d.ts +48 -76
- package/dist/front/index.js +2396 -1795
- package/dist/front/styles.css +2242 -1267
- package/dist/{sandbox-handle-store-DCNEJJ6b.d.ts → sandbox-handle-store-hK76cTjn.d.ts} +2 -0
- package/dist/server/index.d.ts +22 -2
- package/dist/server/index.js +2015 -1541
- package/dist/shared/index.d.ts +11 -7
- package/dist/shared/index.js +10 -1
- package/dist/{harness-DT3ZzdAN.d.ts → tool-ui-DSmWuqGe.d.ts} +33 -4
- package/package.json +4 -4
package/dist/shared/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { A as AgentHarness, R as RunContext, S as SendMessageInput, a as SessionCtx, b as SessionDetail, c as SessionStore, d as SessionSummary } from '../
|
|
2
|
-
import { W as Workspace, S as Sandbox, F as FileSearch, A as AgentTool } from '../sandbox-handle-store-
|
|
3
|
-
export { E as Entry, a as ExecOptions, b as ExecResult, I as IsolatedCodeInput, c as IsolatedCodeOutput, J as JSONSchema, d as SandboxCapability, e as SandboxHandleRecord, f as SandboxHandleStore, g as Stat, T as ToolExecContext, h as ToolResult } from '../sandbox-handle-store-
|
|
1
|
+
export { A as AgentHarness, R as RunContext, S as SendMessageInput, a as SessionCtx, b as SessionDetail, c as SessionStore, d as SessionSummary, T as ToolUiMetadata, e as extractToolUiMetadata, i as isToolUiMetadata } from '../tool-ui-DSmWuqGe.js';
|
|
2
|
+
import { W as Workspace, S as Sandbox, F as FileSearch, A as AgentTool } from '../sandbox-handle-store-hK76cTjn.js';
|
|
3
|
+
export { E as Entry, a as ExecOptions, b as ExecResult, I as IsolatedCodeInput, c as IsolatedCodeOutput, J as JSONSchema, d as SandboxCapability, e as SandboxHandleRecord, f as SandboxHandleStore, g as Stat, T as ToolExecContext, h as ToolResult } from '../sandbox-handle-store-hK76cTjn.js';
|
|
4
4
|
export { UIMessage, UIMessageChunk } from 'ai';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
|
|
@@ -46,7 +46,6 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
46
46
|
}>;
|
|
47
47
|
type AgentConfig = z.infer<typeof ConfigSchema>;
|
|
48
48
|
declare const EnvSchema: z.ZodObject<{
|
|
49
|
-
ANTHROPIC_API_KEY: z.ZodString;
|
|
50
49
|
BORING_AGENT_MODE: z.ZodOptional<z.ZodEnum<["direct", "local", "vercel-sandbox"]>>;
|
|
51
50
|
BORING_AGENT_WORKSPACE_ROOT: z.ZodOptional<z.ZodString>;
|
|
52
51
|
BORING_AGENT_PORT: z.ZodOptional<z.ZodNumber>;
|
|
@@ -82,7 +81,6 @@ declare const EnvSchema: z.ZodObject<{
|
|
|
82
81
|
VERCEL_PROJECT_ID: z.ZodOptional<z.ZodString>;
|
|
83
82
|
BORING_AGENT_VERCEL_SANDBOX_TIMEOUT_MS: z.ZodOptional<z.ZodNumber>;
|
|
84
83
|
}, "strip", z.ZodTypeAny, {
|
|
85
|
-
ANTHROPIC_API_KEY: string;
|
|
86
84
|
BORING_AGENT_MODE?: "direct" | "local" | "vercel-sandbox" | undefined;
|
|
87
85
|
BORING_AGENT_WORKSPACE_ROOT?: string | undefined;
|
|
88
86
|
BORING_AGENT_PORT?: number | undefined;
|
|
@@ -118,7 +116,6 @@ declare const EnvSchema: z.ZodObject<{
|
|
|
118
116
|
VERCEL_PROJECT_ID?: string | undefined;
|
|
119
117
|
BORING_AGENT_VERCEL_SANDBOX_TIMEOUT_MS?: number | undefined;
|
|
120
118
|
}, {
|
|
121
|
-
ANTHROPIC_API_KEY: string;
|
|
122
119
|
BORING_AGENT_MODE?: "direct" | "local" | "vercel-sandbox" | undefined;
|
|
123
120
|
BORING_AGENT_WORKSPACE_ROOT?: string | undefined;
|
|
124
121
|
BORING_AGENT_PORT?: number | undefined;
|
|
@@ -220,6 +217,13 @@ declare const ErrorLogFieldsSchema: z.ZodObject<{
|
|
|
220
217
|
}, z.ZodUnknown, "strip">>;
|
|
221
218
|
type ErrorLogFields = z.infer<typeof ErrorLogFieldsSchema>;
|
|
222
219
|
|
|
220
|
+
interface AgentRuntimeCapabilities {
|
|
221
|
+
nativeFollowUp: boolean;
|
|
222
|
+
aiSdkOwnsHistory: boolean;
|
|
223
|
+
}
|
|
224
|
+
declare const DEFAULT_AGENT_RUNTIME_CAPABILITIES: AgentRuntimeCapabilities;
|
|
225
|
+
declare const PI_AGENT_RUNTIME_CAPABILITIES: AgentRuntimeCapabilities;
|
|
226
|
+
|
|
223
227
|
declare function validateTool(tool: unknown): AgentTool | null;
|
|
224
228
|
|
|
225
|
-
export { type AgentConfig, type AgentEnv, AgentTool, type ApiErrorPayload, ApiErrorPayloadSchema, type ApiErrorResponse, ApiErrorResponseSchema, type CatalogDeps, ConfigSchema, ERROR_CODES, EnvSchema, ErrorCode, type ErrorLogFields, ErrorLogFieldsSchema, FileSearch, type RuntimeModeId, RuntimeModeSchema, Sandbox, type ToolCatalog, Workspace, validateConfig, validateTool };
|
|
229
|
+
export { type AgentConfig, type AgentEnv, type AgentRuntimeCapabilities, AgentTool, type ApiErrorPayload, ApiErrorPayloadSchema, type ApiErrorResponse, ApiErrorResponseSchema, type CatalogDeps, ConfigSchema, DEFAULT_AGENT_RUNTIME_CAPABILITIES, ERROR_CODES, EnvSchema, ErrorCode, type ErrorLogFields, ErrorLogFieldsSchema, FileSearch, PI_AGENT_RUNTIME_CAPABILITIES, type RuntimeModeId, RuntimeModeSchema, Sandbox, type ToolCatalog, Workspace, validateConfig, validateTool };
|
package/dist/shared/index.js
CHANGED
|
@@ -6,6 +6,12 @@ import {
|
|
|
6
6
|
ErrorLogFieldsSchema,
|
|
7
7
|
validateTool
|
|
8
8
|
} from "../chunk-W73RUHY3.js";
|
|
9
|
+
import {
|
|
10
|
+
DEFAULT_AGENT_RUNTIME_CAPABILITIES,
|
|
11
|
+
PI_AGENT_RUNTIME_CAPABILITIES,
|
|
12
|
+
extractToolUiMetadata,
|
|
13
|
+
isToolUiMetadata
|
|
14
|
+
} from "../chunk-F3CE5CNW.js";
|
|
9
15
|
|
|
10
16
|
// src/shared/config-schema.ts
|
|
11
17
|
import { z } from "zod";
|
|
@@ -22,7 +28,6 @@ var ConfigSchema = z.object({
|
|
|
22
28
|
verbose: z.boolean()
|
|
23
29
|
});
|
|
24
30
|
var EnvSchema = z.object({
|
|
25
|
-
ANTHROPIC_API_KEY: z.string().min(1, "ANTHROPIC_API_KEY is required"),
|
|
26
31
|
BORING_AGENT_MODE: RuntimeModeSchema.optional(),
|
|
27
32
|
BORING_AGENT_WORKSPACE_ROOT: z.string().optional(),
|
|
28
33
|
BORING_AGENT_PORT: z.coerce.number().int().positive().optional(),
|
|
@@ -65,11 +70,15 @@ export {
|
|
|
65
70
|
ApiErrorPayloadSchema,
|
|
66
71
|
ApiErrorResponseSchema,
|
|
67
72
|
ConfigSchema,
|
|
73
|
+
DEFAULT_AGENT_RUNTIME_CAPABILITIES,
|
|
68
74
|
ERROR_CODES,
|
|
69
75
|
EnvSchema,
|
|
70
76
|
ErrorCode,
|
|
71
77
|
ErrorLogFieldsSchema,
|
|
78
|
+
PI_AGENT_RUNTIME_CAPABILITIES,
|
|
72
79
|
RuntimeModeSchema,
|
|
80
|
+
extractToolUiMetadata,
|
|
81
|
+
isToolUiMetadata,
|
|
73
82
|
validateConfig,
|
|
74
83
|
validateTool
|
|
75
84
|
};
|
|
@@ -51,11 +51,17 @@ interface AgentHarness {
|
|
|
51
51
|
* A `data-followup-consumed` chunk is emitted before the follow-up turn so
|
|
52
52
|
* the client can clear its pending-message bubble immediately.
|
|
53
53
|
*/
|
|
54
|
-
followUp?(sessionId: string, text: string, attachments?: MessageAttachment[], displayText?: string): void | Promise<void>;
|
|
54
|
+
followUp?(sessionId: string, text: string, attachments?: MessageAttachment[], displayText?: string, options?: FollowUpOptions): void | Promise<void>;
|
|
55
55
|
/**
|
|
56
|
-
* Discard
|
|
56
|
+
* Discard queued follow-up(s) for this session (called by the Stop button or
|
|
57
|
+
* by a queued-message delete action). When `options` identifies a single
|
|
58
|
+
* client message, implementations should remove only that item if possible.
|
|
57
59
|
*/
|
|
58
|
-
clearFollowUp?(sessionId: string): void;
|
|
60
|
+
clearFollowUp?(sessionId: string, options?: FollowUpOptions): void;
|
|
61
|
+
}
|
|
62
|
+
interface FollowUpOptions {
|
|
63
|
+
clientNonce?: string;
|
|
64
|
+
clientSeq?: number;
|
|
59
65
|
}
|
|
60
66
|
interface MessageAttachment {
|
|
61
67
|
filename?: string;
|
|
@@ -79,4 +85,27 @@ interface RunContext {
|
|
|
79
85
|
userId?: string;
|
|
80
86
|
}
|
|
81
87
|
|
|
82
|
-
|
|
88
|
+
interface ToolUiMetadata {
|
|
89
|
+
/** Renderer key registered by the app shell, e.g. `pi-subagent`. */
|
|
90
|
+
rendererId?: string;
|
|
91
|
+
/** Optional grouping label for future tool timelines/summaries. */
|
|
92
|
+
displayGroup?: string;
|
|
93
|
+
/** Optional icon hint. Frontends decide whether/how to honor it. */
|
|
94
|
+
icon?: string;
|
|
95
|
+
/** Renderer-specific structured data. */
|
|
96
|
+
details?: unknown;
|
|
97
|
+
}
|
|
98
|
+
declare function isToolUiMetadata(value: unknown): value is ToolUiMetadata;
|
|
99
|
+
/**
|
|
100
|
+
* Extract structured UI metadata from a ToolResult-like output.
|
|
101
|
+
*
|
|
102
|
+
* Preferred shape:
|
|
103
|
+
* output.details.ui = { rendererId, displayGroup, icon, details }
|
|
104
|
+
*
|
|
105
|
+
* Compatibility shape for early overlays:
|
|
106
|
+
* output.details.uiKind = 'pi-subagent'
|
|
107
|
+
* output.details = { uiKind, ...rendererDetails }
|
|
108
|
+
*/
|
|
109
|
+
declare function extractToolUiMetadata(output: unknown): ToolUiMetadata | undefined;
|
|
110
|
+
|
|
111
|
+
export { type AgentHarness as A, type RunContext as R, type SendMessageInput as S, type ToolUiMetadata as T, type SessionCtx as a, type SessionDetail as b, type SessionStore as c, type SessionSummary as d, extractToolUiMetadata as e, isToolUiMetadata as i };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hachej/boring-agent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Pane-embeddable coding agent. Ships direct/local/vercel-sandbox execution modes behind one interface.",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"use-stick-to-bottom": "^1.1.3",
|
|
75
75
|
"yaml": "^2.8.3",
|
|
76
76
|
"zod": "^3.25.76",
|
|
77
|
-
"@hachej/boring-ui-kit": "0.1.
|
|
77
|
+
"@hachej/boring-ui-kit": "0.1.16"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@opentelemetry/api": "^1.9.1",
|
|
@@ -114,8 +114,8 @@
|
|
|
114
114
|
"build:dev": "{ [ -d '../ui/dist' ] || pnpm --filter @hachej/boring-ui-kit build; } && tsup --config tsup.dev.config.ts && node ./scripts/build-front-css.mjs",
|
|
115
115
|
"build:assert": "node ./scripts/assert-build-artifacts.mjs",
|
|
116
116
|
"dev": "tsx src/server/dev.ts",
|
|
117
|
-
"test": "vitest run",
|
|
118
|
-
"test:e2e": "playwright test -c e2e/playwright.config.ts",
|
|
117
|
+
"test": "pnpm --filter @hachej/boring-ui-kit build && vitest run",
|
|
118
|
+
"test:e2e": "pnpm --filter @hachej/boring-ui-kit build && playwright test -c e2e/playwright.config.ts",
|
|
119
119
|
"test:regression": "vitest run src/server/__tests__/system-prompt-size.regression.test.ts",
|
|
120
120
|
"test:watch": "vitest",
|
|
121
121
|
"eval": "tsx ./scripts/eval.ts",
|