pi-harness-runtime 1.1.410 → 1.1.411

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 (146) hide show
  1. package/package.json +1 -1
  2. package/packages/a2a-adapter/package.json +1 -1
  3. package/packages/agent-policy/package.json +1 -1
  4. package/packages/architecture-generator/package.json +1 -1
  5. package/packages/auth/package.json +1 -1
  6. package/packages/autonomous-refactor/package.json +1 -1
  7. package/packages/autonomous-runtime/package.json +1 -1
  8. package/packages/autonomous-runtime/test/types.test.ts +59 -32
  9. package/packages/cache-strategy/package.json +1 -1
  10. package/packages/capability-registry/package.json +1 -1
  11. package/packages/checkpoint/package.json +1 -1
  12. package/packages/cli-plugin-sdk/package.json +1 -1
  13. package/packages/clipboard/package.json +1 -1
  14. package/packages/clipboard-plugin/package.json +1 -1
  15. package/packages/code-generation/package.json +1 -1
  16. package/packages/code-review/package.json +1 -1
  17. package/packages/codex-adapter/package.json +1 -1
  18. package/packages/codex-watcher/package.json +1 -1
  19. package/packages/config-capture/package.json +1 -1
  20. package/packages/connection-runtime/package.json +1 -1
  21. package/packages/context-compiler/package.json +1 -1
  22. package/packages/context-discovery/package.json +1 -1
  23. package/packages/context-manager/package.json +1 -1
  24. package/packages/contracts/package.json +1 -1
  25. package/packages/cookie-sanitizer/package.json +1 -1
  26. package/packages/cookie-sanitizer/test/sync.test.ts +7 -1
  27. package/packages/cost-optimizer/package.json +1 -1
  28. package/packages/dependency-analyzer/dist/src/imports.js +3 -3
  29. package/packages/dependency-analyzer/dist/src/imports.js.map +1 -1
  30. package/packages/dependency-analyzer/package.json +1 -1
  31. package/packages/dependency-analyzer/src/imports.ts +3 -3
  32. package/packages/dependency-analyzer/test/analyzer.test.ts +1 -0
  33. package/packages/django-plugin/package.json +1 -1
  34. package/packages/doc-generator/package.json +1 -1
  35. package/packages/durable-review/package.json +1 -1
  36. package/packages/durable-review/test/acceptance.test.ts +24 -2
  37. package/packages/durable-review/test/smoke.test.ts +85 -47
  38. package/packages/e2e-tester/package.json +1 -1
  39. package/packages/evaluation-engine/package.json +1 -1
  40. package/packages/evaluation-runner/package.json +1 -1
  41. package/packages/event-bus/package.json +1 -1
  42. package/packages/event-bus/test/bus.test.ts +16 -4
  43. package/packages/event-sink/package.json +1 -1
  44. package/packages/event-store/package.json +1 -1
  45. package/packages/experience-replay/package.json +1 -1
  46. package/packages/feedback-collector/package.json +1 -1
  47. package/packages/file-copy-helper/package.json +1 -1
  48. package/packages/framework-detector/package.json +1 -1
  49. package/packages/framework-plugin-sdk/package.json +1 -1
  50. package/packages/frappe-plugin/package.json +1 -1
  51. package/packages/generic-web-plugin/package.json +1 -1
  52. package/packages/health-monitor/package.json +1 -1
  53. package/packages/intent-analyzer/package.json +1 -1
  54. package/packages/jev-judge/package.json +1 -1
  55. package/packages/knowledge-graph/package.json +1 -1
  56. package/packages/knowledge-retrieval/package.json +1 -1
  57. package/packages/laravel-plugin/package.json +1 -1
  58. package/packages/learning-engine/package.json +1 -1
  59. package/packages/logging/package.json +1 -1
  60. package/packages/mcp-adapter/package.json +1 -1
  61. package/packages/memory-engine/package.json +1 -1
  62. package/packages/milestone-manager/package.json +1 -1
  63. package/packages/model-registry/package.json +1 -1
  64. package/packages/nextjs-plugin/package.json +1 -1
  65. package/packages/notification/package.json +1 -1
  66. package/packages/observability/package.json +1 -1
  67. package/packages/okf-indexer/package.json +1 -1
  68. package/packages/paperclip-integration/package.json +1 -1
  69. package/packages/performance-optimizer/package.json +1 -1
  70. package/packages/permission-mode/package.json +1 -1
  71. package/packages/privilege-broker/package.json +1 -1
  72. package/packages/project-analyzer/package.json +1 -1
  73. package/packages/project-bootstrap/package.json +1 -1
  74. package/packages/projection-engine/package.json +1 -1
  75. package/packages/prompt-compiler/package.json +1 -1
  76. package/packages/prompt-versioning/package.json +1 -1
  77. package/packages/provider-adapter-sdk/package.json +1 -1
  78. package/packages/provider-router/package.json +1 -1
  79. package/packages/provider-selector/package.json +1 -1
  80. package/packages/providers/package.json +1 -1
  81. package/packages/qdrant-skills/dist/embedder.d.ts +27 -0
  82. package/packages/qdrant-skills/dist/embedder.d.ts.map +1 -1
  83. package/packages/qdrant-skills/dist/embedder.js +54 -0
  84. package/packages/qdrant-skills/dist/embedder.js.map +1 -1
  85. package/packages/qdrant-skills/dist/index.d.ts +1 -1
  86. package/packages/qdrant-skills/dist/index.d.ts.map +1 -1
  87. package/packages/qdrant-skills/dist/index.js +1 -1
  88. package/packages/qdrant-skills/dist/index.js.map +1 -1
  89. package/packages/qdrant-skills/package.json +1 -1
  90. package/packages/qdrant-skills/src/embedder.ts +90 -0
  91. package/packages/qdrant-skills/src/index.ts +3 -0
  92. package/packages/qdrant-skills/test/embedder-batch.test.ts +184 -0
  93. package/packages/quota-manager/package.json +1 -1
  94. package/packages/rate-limiter/package.json +1 -1
  95. package/packages/react-vite-plugin/package.json +1 -1
  96. package/packages/relay/package.json +1 -1
  97. package/packages/release-manager/package.json +1 -1
  98. package/packages/requirement-compiler/package.json +1 -1
  99. package/packages/runtime/package.json +1 -1
  100. package/packages/scheduler/package.json +1 -1
  101. package/packages/scheduler-adapter/package.json +1 -1
  102. package/packages/session/package.json +1 -1
  103. package/packages/session-api/package.json +1 -1
  104. package/packages/session-export/package.json +1 -1
  105. package/packages/shared-context/package.json +1 -1
  106. package/packages/skill-mcp-client/package.json +1 -1
  107. package/packages/skill-registry/package.json +1 -1
  108. package/packages/skills/dist/index.d.ts +5 -0
  109. package/packages/skills/dist/index.d.ts.map +1 -1
  110. package/packages/skills/dist/index.js +4 -1
  111. package/packages/skills/dist/index.js.map +1 -1
  112. package/packages/skills/dist/loader.d.ts +94 -3
  113. package/packages/skills/dist/loader.d.ts.map +1 -1
  114. package/packages/skills/dist/loader.js +192 -25
  115. package/packages/skills/dist/loader.js.map +1 -1
  116. package/packages/skills/package.json +1 -1
  117. package/packages/skills/src/index.ts +12 -3
  118. package/packages/skills/src/loader.ts +243 -27
  119. package/packages/skills/test/init-skills.test.ts +107 -111
  120. package/packages/skills/test/vector-indexing.test.ts +205 -0
  121. package/packages/sprint-planner/package.json +1 -1
  122. package/packages/subscription-engine/package.json +1 -1
  123. package/packages/task-compiler/package.json +1 -1
  124. package/packages/telegram/package.json +1 -1
  125. package/packages/tencentdb-memory/package.json +1 -1
  126. package/packages/tencentdb-sync/package.json +1 -1
  127. package/packages/test-data-generator/package.json +1 -1
  128. package/packages/test-generator/package.json +1 -1
  129. package/packages/todo-bd-sync/package.json +1 -1
  130. package/packages/token-estimation/package.json +1 -1
  131. package/packages/token-optimizer/package.json +1 -1
  132. package/packages/tooling-preference/package.json +1 -1
  133. package/packages/trajectory/package.json +1 -1
  134. package/packages/tui/package.json +1 -1
  135. package/packages/two-phase-review/package.json +1 -1
  136. package/packages/types/package.json +1 -1
  137. package/packages/voice-api/package.json +1 -1
  138. package/packages/webmcp-tester/package.json +1 -1
  139. package/packages/wiki/package.json +1 -1
  140. package/packages/workflow-events/package.json +1 -1
  141. package/packages/workspace-scanner/package.json +1 -1
  142. package/packages/workspace-scanner/test/scanner.test.ts +4 -3
  143. package/packages/worktree/package.json +1 -1
  144. package/packages/write-review/package.json +1 -1
  145. package/packages/autonomous-runtime/test/autonomous-runtime.test.ts +0 -194
  146. package/packages/autonomous-runtime/test/inbox.test.ts +0 -80
@@ -1,69 +1,107 @@
1
+ /// <reference types="node" />
1
2
  /**
2
3
  * SQLite Smoke Test
3
4
  *
4
5
  * Verifies SQLite storage works correctly with Node's built-in sqlite.
6
+ *
7
+ * The storage needs `node:sqlite`. Node has that module, Bun does not, so
8
+ * the tests are skipped with a reason where the module is missing.
5
9
  */
6
10
 
7
11
  import { describe, it, before, after } from "node:test";
8
12
  import assert from "node:assert";
9
- import { openNodeSqliteStorage } from "@earendil-works/pi-durable/storage/sqlite/node";
10
13
  import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
11
14
  import { join } from "node:path";
12
15
  import { mkdirSync, unlinkSync, existsSync } from "node:fs";
13
16
 
14
17
  const TEST_DB_PATH = join(process.env.HOME || "/tmp", ".pi-harness-runtime", "test", "smoke.sqlite");
15
18
 
19
+ /** Whether this runtime has the SQLite module of Node. */
20
+ const sqliteAvailable = await (async () => {
21
+ try {
22
+ await import("node:sqlite");
23
+ return true;
24
+ } catch {
25
+ return false;
26
+ }
27
+ })();
28
+
29
+ const SKIP_WITHOUT_SQLITE = sqliteAvailable
30
+ ? false
31
+ : "node:sqlite is not available in this runtime";
32
+ const itSqlite = sqliteAvailable ? it : it.skip;
33
+
34
+ /** Open the storage of the test database. */
35
+ async function openStorage(): Promise<{
36
+ close: (ctx: unknown) => Promise<void>;
37
+ }> {
38
+ const { openNodeSqliteStorage } = await import(
39
+ "@earendil-works/pi-durable/storage/sqlite/node"
40
+ );
41
+ return (await openNodeSqliteStorage(TEST_DB_PATH)) as {
42
+ close: (ctx: unknown) => Promise<void>;
43
+ };
44
+ }
45
+
16
46
  describe("SQLite Smoke Test", () => {
17
- before(() => {
18
- // Ensure directory exists
19
- const dir = TEST_DB_PATH.replace(/\/[^/]+$/, "");
20
- mkdirSync(dir, { recursive: true });
21
- // Clean up any existing test db
22
- if (existsSync(TEST_DB_PATH)) {
23
- try {
24
- unlinkSync(TEST_DB_PATH);
25
- } catch {
26
- // ignore
27
- }
28
- }
29
- });
47
+ before(() => {
48
+ // Ensure directory exists
49
+ const dir = TEST_DB_PATH.replace(/\/[^/]+$/, "");
50
+ mkdirSync(dir, { recursive: true });
51
+ // Clean up any existing test db
52
+ if (existsSync(TEST_DB_PATH)) {
53
+ try {
54
+ unlinkSync(TEST_DB_PATH);
55
+ } catch {
56
+ // ignore
57
+ }
58
+ }
59
+ });
30
60
 
31
- after(() => {
32
- // Cleanup
33
- if (existsSync(TEST_DB_PATH)) {
34
- try {
35
- unlinkSync(TEST_DB_PATH);
36
- } catch {
37
- // ignore
38
- }
39
- }
40
- });
61
+ after(() => {
62
+ // Cleanup
63
+ if (existsSync(TEST_DB_PATH)) {
64
+ try {
65
+ unlinkSync(TEST_DB_PATH);
66
+ } catch {
67
+ // ignore
68
+ }
69
+ }
70
+ });
41
71
 
42
- it("opens SQLite storage", async () => {
43
- const storage = await openNodeSqliteStorage(TEST_DB_PATH);
44
- assert.ok(storage, "Storage should be defined");
45
- await storage.close(BACKGROUND_CONTEXT);
46
- });
72
+ itSqlite("opens SQLite storage", { skip: SKIP_WITHOUT_SQLITE }, async () => {
73
+ const storage = await openStorage();
74
+ assert.ok(storage, "Storage should be defined");
75
+ await storage.close(BACKGROUND_CONTEXT);
76
+ });
47
77
 
48
- it("creates and reopens database", async () => {
49
- // First open
50
- const storage1 = await openNodeSqliteStorage(TEST_DB_PATH);
51
- await storage1.close(BACKGROUND_CONTEXT);
78
+ itSqlite(
79
+ "creates and reopens database",
80
+ { skip: SKIP_WITHOUT_SQLITE },
81
+ async () => {
82
+ // First open
83
+ const storage1 = await openStorage();
84
+ await storage1.close(BACKGROUND_CONTEXT);
52
85
 
53
- // Second open - should work
54
- const storage2 = await openNodeSqliteStorage(TEST_DB_PATH);
55
- assert.ok(storage2, "Storage should be reopened");
56
- await storage2.close(BACKGROUND_CONTEXT);
57
- });
86
+ // Second open - should work
87
+ const storage2 = await openStorage();
88
+ assert.ok(storage2, "Storage should be reopened");
89
+ await storage2.close(BACKGROUND_CONTEXT);
90
+ },
91
+ );
58
92
 
59
- it("persists data across reopen", async () => {
60
- // Open and write
61
- const storage1 = await openNodeSqliteStorage(TEST_DB_PATH);
62
- await storage1.close(BACKGROUND_CONTEXT);
93
+ itSqlite(
94
+ "persists data across reopen",
95
+ { skip: SKIP_WITHOUT_SQLITE },
96
+ async () => {
97
+ // Open and write
98
+ const storage1 = await openStorage();
99
+ await storage1.close(BACKGROUND_CONTEXT);
63
100
 
64
- // Reopen and verify
65
- const storage2 = await openNodeSqliteStorage(TEST_DB_PATH);
66
- assert.ok(storage2, "Storage should be reopened with data");
67
- await storage2.close(BACKGROUND_CONTEXT);
68
- });
101
+ // Reopen and verify
102
+ const storage2 = await openStorage();
103
+ assert.ok(storage2, "Storage should be reopened with data");
104
+ await storage2.close(BACKGROUND_CONTEXT);
105
+ },
106
+ );
69
107
  });
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/e2e-tester",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "WebMCP-powered E2E testing for pi-harness - natural language test scenarios",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/evaluation-engine",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "Evaluation engine for pi-harness runtime (RFC-0057)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/evaluation-runner",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "type": "module",
5
5
  "description": "Framework-agnostic evaluation framework for AI outputs (RFC-0020)",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/event-bus",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,8 @@
1
+ /// <reference types="node" />
1
2
  import { describe, it } from "node:test";
2
3
  import { equal, deepEqual } from "node:assert";
3
4
  import { EventBus } from "../src/bus.js";
5
+ import type { EventPayload } from "../src/types.js";
4
6
 
5
7
  describe("EventBus", () => {
6
8
  const bus = new EventBus();
@@ -12,12 +14,22 @@ describe("EventBus", () => {
12
14
  });
13
15
 
14
16
  it("subscriber receives event", () => {
15
- let received: unknown = null;
16
- bus.subscribe("test.1", (p) => {
17
- received = p;
17
+ // The value is held in a box: a variable that is only assigned in a
18
+ // callback would be narrowed to null by the type checker.
19
+ const received: { value: EventPayload<{ data: string }> | null } = {
20
+ value: null,
21
+ };
22
+ bus.subscribe<{ data: string }>("test.1", (p) => {
23
+ received.value = p;
18
24
  });
19
25
  bus.publish("test.1", { data: "hello" });
20
- equal((received as { data: string }).data, "hello");
26
+ // The subscriber receives the envelope of the event, not the raw data.
27
+ equal(received.value?.topic, "test.1");
28
+ equal(received.value?.data.data, "hello");
29
+ equal(typeof received.value?.eventId, "string");
30
+ equal(typeof received.value?.timestamp, "string");
31
+ // A published event comes from the system unless a source is given.
32
+ equal(received.value?.source, "system");
21
33
  });
22
34
 
23
35
  it("multiple subscribers all called", () => {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/event-sink",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "type": "module",
5
5
  "description": "Atomic event sourcing with SQLite transactions for pi-harness",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/event-store",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/experience-replay",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "Experience replay for debugging and reproducibility (RFC-0059)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/feedback-collector",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "type": "module",
5
5
  "description": "Collect and aggregate human/automated feedback (RFC-0021)",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moocoding/file-copy-helper",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "Injects cp/sudo cp rule when user asks to mimic/copy files",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/framework-detector",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "Framework detection system for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/framework-plugin-sdk",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "Framework plugin SDK for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/frappe-plugin",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "Frappe/ERPNext framework analysis — DocTypes, hooks, bench sites, site config",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/generic-web-plugin",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "Generic web framework analysis — REST/GraphQL endpoints, OpenAPI, auth",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/health-monitor",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "type": "module",
5
5
  "description": "Health monitoring and auto-healing",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/intent-analyzer",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/jev-judge",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "Jev Judge - Structured decision model for agent routing, E2E testing, and automated decisions",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/knowledge-graph",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "Knowledge Graph extraction and provenance linking for SKILL.md files",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/knowledge-retrieval",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "Knowledge retrieval via TencentDB-Agent-Memory MCP (RFC-0105)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/laravel-plugin",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "Laravel framework analysis — artisan commands, Eloquent models, Blade",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/learning-engine",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "Learning engine for extracting lessons from runtime execution (RFC-0058)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/logging",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "type": "module",
5
5
  "description": "Centralized structured application logging with buffered Cloudflare R2 and webhook transports",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/mcp-adapter",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "type": "module",
5
5
  "description": "MCP server adapter for pi-harness — exposes harness capabilities as MCP tools/resources/prompts (RFC-0068)",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/memory-engine",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "Memory engine with OKF integration for durable knowledge management (RFC-0060)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/milestone-manager",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "Track milestones and alerts when items are at risk",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/model-registry",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "Model Registry for pi-harness-runtime — centralized model metadata with pricing",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/nextjs-plugin",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "Next.js framework detection and analysis for pi-harness-runtime (RFC-0062)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/notification",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "pi-harness-runtime — notification",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/observability",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "Comprehensive observability system with structured logging, tracing, metrics, and alerting",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/okf-indexer",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "OKF document indexer for SKILL.md files (RFC-0106)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/paperclip-integration",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "Paperclip API integration: poll agent inbox, route tasks to pi.dev, Telegram alerts",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/performance-optimizer",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "Performance optimization analyzer for pi-harness runtime (RFC-0056)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/permission-mode",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "type": "module",
5
5
  "description": "Runtime permission modes for pi-harness - Supervised/Auto/Full-access",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/privilege-broker",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "Privilege Broker — capability registry and command executor for autonomous runtime (RFC-0101 §7)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/project-analyzer",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "Project analysis system for pi-harness-runtime - detects frameworks, rules, and project structure",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/project-bootstrap",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "Project scaffolding from typed ProjectSpec",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/projection-engine",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/prompt-compiler",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "Deterministic prompt compiler for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/prompt-versioning",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "type": "module",
5
5
  "description": "Version control for prompts with rollback support (RFC-0019)",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/provider-adapter-sdk",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "SDK for building, testing, and registering AI provider adapters",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/provider-router",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "Enhanced Provider Router for pi-harness-runtime — intelligent routing with capabilities, costs, and quotas",
5
5
  "type": "module",
6
6
  "main": "./dist/provider-router.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/provider-selector",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "Multi-Provider Selector — route requests by cost, quality, and latency (RFC-0012)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/providers",
3
- "version": "1.1.410",
3
+ "version": "1.1.411",
4
4
  "description": "pi-harness-runtime — providers",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -12,6 +12,14 @@ export interface EmbeddingResult {
12
12
  embedding: number[];
13
13
  tokens: number;
14
14
  }
15
+ /**
16
+ * The result of a batch embedding: one vector per input text, in the order
17
+ * of the input.
18
+ */
19
+ export interface BatchEmbeddingResult {
20
+ embeddings: number[][];
21
+ tokens: number;
22
+ }
15
23
  /**
16
24
  * Get the OpenAI API key for embeddings.
17
25
  *
@@ -24,6 +32,25 @@ export declare function getOpenAIApiKey(): string | null;
24
32
  * Create embedding for text using OpenAI
25
33
  */
26
34
  export declare function createEmbedding(text: string, apiKey?: string): Promise<EmbeddingResult>;
35
+ /**
36
+ * The options of an embeddings request.
37
+ */
38
+ export interface EmbeddingRequestOptions {
39
+ /**
40
+ * The HTTP client of the request. The default is the global `fetch`; a
41
+ * caller (a test) can pass its own, so no global has to be replaced.
42
+ */
43
+ fetchImpl?: typeof fetch;
44
+ }
45
+ /**
46
+ * Create embeddings for many texts with as few requests as possible.
47
+ *
48
+ * One request per text exhausts the sockets of the process when a registry
49
+ * holds hundreds of skills: every request opens its own connection and the
50
+ * process then cannot talk to anything else. The endpoint of OpenAI accepts
51
+ * an array of inputs, so a batch stays one request per chunk.
52
+ */
53
+ export declare function createEmbeddingsBatch(texts: string[], apiKey?: string, options?: EmbeddingRequestOptions): Promise<BatchEmbeddingResult>;
27
54
  /**
28
55
  * Create embedding for a skill document
29
56
  */
@@ -1 +1 @@
1
- {"version":3,"file":"embedder.d.ts","sourceRoot":"","sources":["../src/embedder.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AA4CD;;;;;;GAMG;AACH,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAa/C;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,eAAe,CAAC,CAgC1B;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,UAAU,EACjB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,UAAU,CAAA;CAAE,CAAC,CAWnE;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,UAAU,EAAE,EACpB,MAAM,CAAC,EAAE,MAAM,EACf,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAClD,OAAO,CAAC,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,UAAU,CAAA;CAAE,CAAC,CAAC,CAuB1E"}
1
+ {"version":3,"file":"embedder.d.ts","sourceRoot":"","sources":["../src/embedder.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,EAAE,EAAE,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB;AA4CD;;;;;;GAMG;AACH,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAa/C;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,eAAe,CAAC,CAgC1B;AASD;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,MAAM,EAAE,EACf,MAAM,CAAC,EAAE,MAAM,EACf,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,oBAAoB,CAAC,CAiD/B;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,UAAU,EACjB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,UAAU,CAAA;CAAE,CAAC,CAWnE;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,UAAU,EAAE,EACpB,MAAM,CAAC,EAAE,MAAM,EACf,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAClD,OAAO,CAAC,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,UAAU,CAAA;CAAE,CAAC,CAAC,CAuB1E"}