@hachej/boring-agent 0.1.111 → 0.2.1
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/LICENSE +1 -1
- package/README.md +262 -51
- package/dist/agents.d.ts +75 -0
- package/dist/agents.js +91 -0
- package/dist/approval.d.ts +71 -0
- package/dist/approval.js +126 -0
- package/dist/artifacts.d.ts +53 -0
- package/dist/artifacts.js +129 -0
- package/dist/ask-user.d.ts +40 -0
- package/dist/ask-user.js +134 -0
- package/dist/attachment.d.ts +5 -0
- package/dist/attachment.js +4 -0
- package/dist/browser-task.d.ts +32 -0
- package/dist/browser-task.js +119 -0
- package/dist/chat-transport.d.ts +80 -0
- package/dist/chat-transport.js +306 -0
- package/dist/contracts.d.ts +40 -0
- package/dist/contracts.js +1 -0
- package/dist/conversations.d.ts +136 -0
- package/dist/conversations.js +366 -0
- package/dist/definitions.d.ts +37 -0
- package/dist/definitions.js +99 -0
- package/dist/delivery-input.d.ts +35 -0
- package/dist/delivery-input.js +56 -0
- package/dist/delivery.d.ts +33 -0
- package/dist/delivery.js +154 -0
- package/dist/durable-wait.d.ts +23 -0
- package/dist/durable-wait.js +79 -0
- package/dist/file-convert.d.ts +46 -0
- package/dist/file-convert.js +159 -0
- package/dist/file-guard.d.ts +50 -0
- package/dist/file-guard.js +177 -0
- package/dist/file-types.d.ts +17 -0
- package/dist/file-types.js +95 -0
- package/dist/gateway-provider.d.ts +24 -0
- package/dist/gateway-provider.js +42 -0
- package/dist/git.d.ts +34 -0
- package/dist/git.js +79 -0
- package/dist/harness-pool.d.ts +38 -0
- package/dist/harness-pool.js +134 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -0
- package/dist/json-schema-tool.d.ts +25 -0
- package/dist/json-schema-tool.js +19 -0
- package/dist/memory/optchat-core.d.ts +118 -0
- package/dist/memory/optchat-core.js +317 -0
- package/dist/memory/optchat.d.ts +156 -0
- package/dist/memory/optchat.js +432 -0
- package/dist/mentions.d.ts +56 -0
- package/dist/mentions.js +140 -0
- package/dist/metering.d.ts +183 -0
- package/dist/metering.js +443 -0
- package/dist/model-gateway.d.ts +86 -0
- package/dist/model-gateway.js +241 -0
- package/dist/native-version.d.ts +9 -0
- package/dist/native-version.js +7 -0
- package/dist/native.d.ts +4 -0
- package/dist/native.js +1 -0
- package/dist/presentation.d.ts +17 -0
- package/dist/presentation.js +39 -0
- package/dist/projection-format.d.ts +68 -0
- package/dist/projection-format.js +118 -0
- package/dist/projection-window.d.ts +9 -0
- package/dist/projection-window.js +93 -0
- package/dist/projection.d.ts +22 -0
- package/dist/projection.js +153 -0
- package/dist/question-response.d.ts +20 -0
- package/dist/question-response.js +75 -0
- package/dist/questions.d.ts +74 -0
- package/dist/questions.js +199 -0
- package/dist/self-evolving.d.ts +55 -0
- package/dist/self-evolving.js +239 -0
- package/dist/skills.d.ts +15 -0
- package/dist/skills.js +51 -0
- package/dist/tool-evidence.d.ts +14 -0
- package/dist/tool-evidence.js +54 -0
- package/dist/validation.d.ts +38 -0
- package/dist/validation.js +68 -0
- package/dist/workspaces.d.ts +107 -0
- package/dist/workspaces.js +212 -0
- package/package.json +145 -150
- package/dist/DebugDrawer-JNA43SVR.js +0 -8
- package/dist/admin-DORVQfLn.d.ts +0 -340
- package/dist/chunk-2BGLZZ7T.js +0 -10
- package/dist/chunk-42D6KAQV.js +0 -2882
- package/dist/chunk-4XOW57KJ.js +0 -343
- package/dist/chunk-72KT6VWV.js +0 -1338
- package/dist/chunk-7XAOVFSN.js +0 -28
- package/dist/chunk-KJIEMSQP.js +0 -198
- package/dist/chunk-KN72XWP7.js +0 -394
- package/dist/chunk-N6THTH7P.js +0 -110
- package/dist/chunk-V3H5A3BR.js +0 -22501
- package/dist/chunk-YGRQ4Q5P.js +0 -20
- package/dist/chunk-YTUZFKB3.js +0 -78
- package/dist/core/index.d.ts +0 -28
- package/dist/core/index.js +0 -617
- package/dist/createHarness-DOLOHA62.js +0 -18
- package/dist/eval/index.d.ts +0 -247
- package/dist/eval/index.js +0 -541
- package/dist/file-search-BUgMSKZE.d.ts +0 -289
- package/dist/front/artifacts.d.ts +0 -34
- package/dist/front/artifacts.js +0 -21
- package/dist/front/index.d.ts +0 -1082
- package/dist/front/index.js +0 -12912
- package/dist/front/styles.css +0 -5380
- package/dist/harness-qHlMJhZo.d.ts +0 -276
- package/dist/middleware-CaAEXpi5.d.ts +0 -115
- package/dist/piChatEvent-DpE0lIb9.d.ts +0 -450
- package/dist/piChatSessionService-CBct-hmz.d.ts +0 -86
- package/dist/sandbox-BMhut3kh.d.ts +0 -317
- package/dist/server/agent-host/testing/compositionRouteProof.d.ts +0 -8
- package/dist/server/agent-host/testing/compositionRouteProof.js +0 -78
- package/dist/server/agent-host/testing/gatewayConformance.d.ts +0 -43
- package/dist/server/agent-host/testing/gatewayConformance.js +0 -605
- package/dist/server/index.d.ts +0 -2278
- package/dist/server/index.js +0 -274
- package/dist/server/pi-session-readability.d.ts +0 -12
- package/dist/server/pi-session-readability.js +0 -23
- package/dist/server/worker/index.d.ts +0 -68
- package/dist/server/worker/index.js +0 -377
- package/dist/share-entry-CxS6UJ_L.d.ts +0 -330
- package/dist/shared/index.d.ts +0 -2111
- package/dist/shared/index.js +0 -262
- package/dist/types-DcWoQMn8.d.ts +0 -1377
- package/docs/ACCESSIBILITY.md +0 -52
- package/docs/AGENT_GATEWAY_V0.md +0 -212
- package/docs/AGENT_PACKAGES.md +0 -90
- package/docs/API.md +0 -123
- package/docs/AUTHORING.md +0 -68
- package/docs/CSP.md +0 -41
- package/docs/ERROR_CODES.md +0 -229
- package/docs/KNOWN_LIMITATIONS.md +0 -100
- package/docs/MIGRATION.md +0 -50
- package/docs/PERFORMANCE.md +0 -68
- package/docs/PLUGINS.md +0 -138
- package/docs/README.md +0 -98
- package/docs/RISKS-MULTI-TAB.md +0 -46
- package/docs/SESSION_IDENTITY.md +0 -91
- package/docs/STYLING.md +0 -73
- package/docs/UI-SHADCN.md +0 -56
- package/docs/VERCEL_COSTS.md +0 -103
- package/docs/plans/archive/AGENT_EVAL_FRAMEWORK.md +0 -466
- package/docs/plans/archive/agent-package-spec.md +0 -1777
- package/docs/plans/archive/harness-followup-capabilities.md +0 -440
- package/docs/plans/archive/harness-tool-ui-capabilities.md +0 -144
- package/docs/plans/archive/pi-followup-history-projection.md +0 -229
- package/docs/plans/archive/pi-tools-migration.md +0 -1061
- package/docs/plans/archive/reviews/pi-followup-history-codex-review.md +0 -11
- package/docs/plans/archive/reviews/pi-followup-history-gpt-review.md +0 -64
- package/docs/plans/archive/reviews/pi-followup-history-opus-review.md +0 -43
- package/docs/plans/archive/reviews/pi-followup-history-xai-review.md +0 -43
- package/docs/plans/archive/vercel-base-snapshot-template-plan.md +0 -527
- package/docs/plans/archive/vercel-persistent-sandbox-adapter.md +0 -553
- package/docs/runtime-provisioning.md +0 -157
- package/docs/runtime.md +0 -296
- package/docs/tools.md +0 -102
package/dist/chunk-YGRQ4Q5P.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// src/shared/random-id.ts
|
|
2
|
-
function safeRandomUUID() {
|
|
3
|
-
const cryptoObj = globalThis.crypto;
|
|
4
|
-
if (cryptoObj?.randomUUID) return cryptoObj.randomUUID();
|
|
5
|
-
if (cryptoObj?.getRandomValues) {
|
|
6
|
-
const bytes = cryptoObj.getRandomValues(new Uint8Array(16));
|
|
7
|
-
bytes[6] = bytes[6] & 15 | 64;
|
|
8
|
-
bytes[8] = bytes[8] & 63 | 128;
|
|
9
|
-
let hex = "";
|
|
10
|
-
for (let i = 0; i < bytes.length; i += 1) {
|
|
11
|
-
hex += bytes[i].toString(16).padStart(2, "0");
|
|
12
|
-
}
|
|
13
|
-
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
|
|
14
|
-
}
|
|
15
|
-
throw new Error("Secure random UUID generation requires crypto.getRandomValues()");
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export {
|
|
19
|
-
safeRandomUUID
|
|
20
|
-
};
|
package/dist/chunk-YTUZFKB3.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
// src/shared/events.ts
|
|
2
|
-
var AGENT_NOT_IMPLEMENTED_UNTIL_T1 = "ERR_NOT_IMPLEMENTED_UNTIL_T1";
|
|
3
|
-
var SESSION_STREAM_PREFIX = "sessions/";
|
|
4
|
-
var V1_QUARANTINE_STREAM_PREFIX = "quarantine/v1/";
|
|
5
|
-
function sessionStreamPath(identity) {
|
|
6
|
-
assertIdentitySegment("workspaceScopeId", identity?.workspaceScopeId);
|
|
7
|
-
assertIdentitySegment("sessionId", identity?.sessionId);
|
|
8
|
-
return `${SESSION_STREAM_PREFIX}${encodeIdentitySegment(identity.workspaceScopeId)}/${encodeIdentitySegment(identity.sessionId)}`;
|
|
9
|
-
}
|
|
10
|
-
function parseSessionStreamPath(path) {
|
|
11
|
-
if (typeof path !== "string" || !path.startsWith(SESSION_STREAM_PREFIX)) return null;
|
|
12
|
-
const segments = path.slice(SESSION_STREAM_PREFIX.length).split("/");
|
|
13
|
-
if (segments.length !== 2) return null;
|
|
14
|
-
const workspaceScopeId = decodeIdentitySegment(segments[0] ?? "");
|
|
15
|
-
const sessionId = decodeIdentitySegment(segments[1] ?? "");
|
|
16
|
-
if (workspaceScopeId === null || sessionId === null) return null;
|
|
17
|
-
return { workspaceScopeId, sessionId };
|
|
18
|
-
}
|
|
19
|
-
function quarantineV1EventStreamPath(oldPath) {
|
|
20
|
-
return `${V1_QUARANTINE_STREAM_PREFIX}${encodeIdentitySegment(oldPath)}`;
|
|
21
|
-
}
|
|
22
|
-
function quarantineV1EventStreamRowidPath(rowid) {
|
|
23
|
-
if (!Number.isSafeInteger(rowid) || rowid <= 0) {
|
|
24
|
-
throw new TypeError("Legacy event stream rowid must be a positive safe integer.");
|
|
25
|
-
}
|
|
26
|
-
return `${V1_QUARANTINE_STREAM_PREFIX}rowid-${rowid}`;
|
|
27
|
-
}
|
|
28
|
-
function assertIdentitySegment(name, value) {
|
|
29
|
-
if (typeof value !== "string" || value.length === 0) {
|
|
30
|
-
throw new TypeError(`Session stream ${name} must be a non-empty string.`);
|
|
31
|
-
}
|
|
32
|
-
if (!isWellFormedUnicode(value)) {
|
|
33
|
-
throw new TypeError(`Session stream ${name} must contain well-formed Unicode.`);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
function isWellFormedUnicode(value) {
|
|
37
|
-
for (let index = 0; index < value.length; index += 1) {
|
|
38
|
-
const code = value.charCodeAt(index);
|
|
39
|
-
if (code >= 55296 && code <= 56319) {
|
|
40
|
-
const next = value.charCodeAt(index + 1);
|
|
41
|
-
if (!(next >= 56320 && next <= 57343)) return false;
|
|
42
|
-
index += 1;
|
|
43
|
-
} else if (code >= 56320 && code <= 57343) {
|
|
44
|
-
return false;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return true;
|
|
48
|
-
}
|
|
49
|
-
function encodeIdentitySegment(value) {
|
|
50
|
-
return encodeURIComponent(value).replace(/[!'()*~]/g, (character) => `%${character.charCodeAt(0).toString(16).toUpperCase()}`);
|
|
51
|
-
}
|
|
52
|
-
function decodeIdentitySegment(value) {
|
|
53
|
-
if (value.length === 0) return null;
|
|
54
|
-
try {
|
|
55
|
-
const decoded = decodeURIComponent(value);
|
|
56
|
-
if (decoded.length === 0 || encodeIdentitySegment(decoded) !== value) return null;
|
|
57
|
-
return decoded;
|
|
58
|
-
} catch {
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
var AgentNotImplementedError = class extends Error {
|
|
63
|
-
code = AGENT_NOT_IMPLEMENTED_UNTIL_T1;
|
|
64
|
-
constructor(message = "This agent capability is not implemented until T1.") {
|
|
65
|
-
super(message);
|
|
66
|
-
this.name = "AgentNotImplementedError";
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
export {
|
|
71
|
-
AGENT_NOT_IMPLEMENTED_UNTIL_T1,
|
|
72
|
-
SESSION_STREAM_PREFIX,
|
|
73
|
-
sessionStreamPath,
|
|
74
|
-
parseSessionStreamPath,
|
|
75
|
-
quarantineV1EventStreamPath,
|
|
76
|
-
quarantineV1EventStreamRowidPath,
|
|
77
|
-
AgentNotImplementedError
|
|
78
|
-
};
|
package/dist/core/index.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { A as AgentHarness, a as AgentReadiness, b as Agent } from '../harness-qHlMJhZo.js';
|
|
2
|
-
export { c as AGENT_NOT_IMPLEMENTED_UNTIL_T1, d as AgentActor, e as AgentCoreHarness, f as AgentCoreHarnessFactory, g as AgentCorePromptInput, h as AgentCoreSessionAdapter, i as AgentCoreSessionSnapshot, j as AgentEvent, k as AgentMessageContent, l as AgentMessagePart, m as AgentNotImplementedError, n as AgentReadinessStatus, o as AgentResolveInputResponse, p as AgentSendInput, q as AgentStartReceipt, r as AgentStreamOptions } from '../harness-qHlMJhZo.js';
|
|
3
|
-
import { S as SessionStore } from '../piChatEvent-DpE0lIb9.js';
|
|
4
|
-
import { A as AgentCoreSessionService, a as AgentEffectAdmission } from '../piChatSessionService-CBct-hmz.js';
|
|
5
|
-
export { b as AGENT_EFFECT_METHODS, c as AgentEffectAdmissionError, P as PiChatEventStreamResult, d as PiChatEventStreamSubscription, e as PiChatEventSubscriber, f as PiChatReplayRangeError, g as PiChatSessionService, h as PiSessionCreateInit, i as PiSessionRequestContext, w as withAgentEffectAdmission } from '../piChatSessionService-CBct-hmz.js';
|
|
6
|
-
import '@mariozechner/pi-coding-agent';
|
|
7
|
-
import 'zod';
|
|
8
|
-
|
|
9
|
-
interface AgentCoreRuntime {
|
|
10
|
-
harness: AgentHarness;
|
|
11
|
-
sessionStore: SessionStore;
|
|
12
|
-
service: AgentCoreSessionService;
|
|
13
|
-
}
|
|
14
|
-
type AgentCoreRuntimeFactory = () => AgentCoreRuntime | Promise<AgentCoreRuntime>;
|
|
15
|
-
interface AgentCoreConfig {
|
|
16
|
-
runtimeFactory: AgentCoreRuntimeFactory;
|
|
17
|
-
admitEffect?: AgentEffectAdmission;
|
|
18
|
-
readiness?: AgentReadiness;
|
|
19
|
-
readinessRequirements?: string[];
|
|
20
|
-
}
|
|
21
|
-
interface AgentCoreRuntimeView {
|
|
22
|
-
harness: AgentHarness;
|
|
23
|
-
sessionStore: SessionStore;
|
|
24
|
-
service: unknown;
|
|
25
|
-
}
|
|
26
|
-
declare function createAgent(config: AgentCoreConfig): Agent;
|
|
27
|
-
|
|
28
|
-
export { Agent, type AgentCoreConfig, type AgentCoreRuntime, type AgentCoreRuntimeFactory, type AgentCoreRuntimeView, AgentCoreSessionService, AgentEffectAdmission, AgentReadiness, createAgent };
|