@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
@@ -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
- };
@@ -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
- };
@@ -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 };