hiveagents-runtime 0.0.0-stage → 0.1.0-beta.3

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 (115) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +89 -2
  3. package/dist/adapter-kit.d.ts +37 -0
  4. package/dist/adapter-kit.js +34 -0
  5. package/dist/adapter-kit.js.map +1 -0
  6. package/dist/agent-Bj5YPrO7.d.ts +169 -0
  7. package/dist/agent-D6OXR7UF.js +24 -0
  8. package/dist/agent-D6OXR7UF.js.map +1 -0
  9. package/dist/agent-readiness-KSGNKTGK.js +19 -0
  10. package/dist/agent-readiness-KSGNKTGK.js.map +1 -0
  11. package/dist/capture-runtime-GP6NZ2ee.d.ts +54 -0
  12. package/dist/chunk-2RK74GCA.js +2397 -0
  13. package/dist/chunk-2RK74GCA.js.map +1 -0
  14. package/dist/chunk-3TIYA3K5.js +55 -0
  15. package/dist/chunk-3TIYA3K5.js.map +1 -0
  16. package/dist/chunk-6FIXXWNM.js +1 -0
  17. package/dist/chunk-6FIXXWNM.js.map +1 -0
  18. package/dist/chunk-6XIJW65Q.js +52 -0
  19. package/dist/chunk-6XIJW65Q.js.map +1 -0
  20. package/dist/chunk-7LDQKJKI.js +248 -0
  21. package/dist/chunk-7LDQKJKI.js.map +1 -0
  22. package/dist/chunk-CPN4DOXH.js +115 -0
  23. package/dist/chunk-CPN4DOXH.js.map +1 -0
  24. package/dist/chunk-DAXPAV2L.js +810 -0
  25. package/dist/chunk-DAXPAV2L.js.map +1 -0
  26. package/dist/chunk-DQEMIGKC.js +291 -0
  27. package/dist/chunk-DQEMIGKC.js.map +1 -0
  28. package/dist/chunk-DZFFGUIA.js +81 -0
  29. package/dist/chunk-DZFFGUIA.js.map +1 -0
  30. package/dist/chunk-EEUYQFCP.js +106 -0
  31. package/dist/chunk-EEUYQFCP.js.map +1 -0
  32. package/dist/chunk-G6JV7WV6.js +521 -0
  33. package/dist/chunk-G6JV7WV6.js.map +1 -0
  34. package/dist/chunk-GFVYNPLS.js +118 -0
  35. package/dist/chunk-GFVYNPLS.js.map +1 -0
  36. package/dist/chunk-GS5U3KUN.js +201 -0
  37. package/dist/chunk-GS5U3KUN.js.map +1 -0
  38. package/dist/chunk-HB7FBSH2.js +960 -0
  39. package/dist/chunk-HB7FBSH2.js.map +1 -0
  40. package/dist/chunk-HZFZX5A3.js +21 -0
  41. package/dist/chunk-HZFZX5A3.js.map +1 -0
  42. package/dist/chunk-J7VAYJKM.js +595 -0
  43. package/dist/chunk-J7VAYJKM.js.map +1 -0
  44. package/dist/chunk-NCNSHOF7.js +52 -0
  45. package/dist/chunk-NCNSHOF7.js.map +1 -0
  46. package/dist/chunk-RH5A5U7G.js +202 -0
  47. package/dist/chunk-RH5A5U7G.js.map +1 -0
  48. package/dist/chunk-RX3XZENU.js +385 -0
  49. package/dist/chunk-RX3XZENU.js.map +1 -0
  50. package/dist/chunk-RXU2Q2HF.js +49 -0
  51. package/dist/chunk-RXU2Q2HF.js.map +1 -0
  52. package/dist/chunk-TG7NTMTR.js +208 -0
  53. package/dist/chunk-TG7NTMTR.js.map +1 -0
  54. package/dist/chunk-TWGEYWMO.js +1217 -0
  55. package/dist/chunk-TWGEYWMO.js.map +1 -0
  56. package/dist/chunk-UZPDDQVJ.js +2910 -0
  57. package/dist/chunk-UZPDDQVJ.js.map +1 -0
  58. package/dist/chunk-WMKO5XOE.js +601 -0
  59. package/dist/chunk-WMKO5XOE.js.map +1 -0
  60. package/dist/chunk-WOQBVJH5.js +175 -0
  61. package/dist/chunk-WOQBVJH5.js.map +1 -0
  62. package/dist/chunk-WVT5SEKC.js +581 -0
  63. package/dist/chunk-WVT5SEKC.js.map +1 -0
  64. package/dist/cli.d.ts +1 -0
  65. package/dist/cli.js +26 -0
  66. package/dist/cli.js.map +1 -0
  67. package/dist/errors-BNHvvjn9.d.ts +98 -0
  68. package/dist/execution-halt-B8G0fOKS.d.ts +12 -0
  69. package/dist/execution-types-ClYYqPQP.d.ts +239 -0
  70. package/dist/host-ledger-VPRWVVOS.js +25 -0
  71. package/dist/host-ledger-VPRWVVOS.js.map +1 -0
  72. package/dist/hosted-runtime.d.ts +168 -0
  73. package/dist/hosted-runtime.js +858 -0
  74. package/dist/hosted-runtime.js.map +1 -0
  75. package/dist/index-B86C6VAD.d.ts +41 -0
  76. package/dist/index.d.ts +344 -0
  77. package/dist/index.js +8825 -0
  78. package/dist/index.js.map +1 -0
  79. package/dist/memory-items-BSTC0_R0.d.ts +28 -0
  80. package/dist/memory-tools.d.ts +222 -0
  81. package/dist/memory-tools.js +923 -0
  82. package/dist/memory-tools.js.map +1 -0
  83. package/dist/orchestration/dynamic.d.ts +854 -0
  84. package/dist/orchestration/dynamic.js +3150 -0
  85. package/dist/orchestration/dynamic.js.map +1 -0
  86. package/dist/orchestration/graph.d.ts +11 -0
  87. package/dist/orchestration/graph.js +9 -0
  88. package/dist/orchestration/graph.js.map +1 -0
  89. package/dist/orchestration/index.d.ts +2385 -0
  90. package/dist/orchestration/index.js +6409 -0
  91. package/dist/orchestration/index.js.map +1 -0
  92. package/dist/orchestration/log.d.ts +301 -0
  93. package/dist/orchestration/log.js +3058 -0
  94. package/dist/orchestration/log.js.map +1 -0
  95. package/dist/orchestration/memory.d.ts +711 -0
  96. package/dist/orchestration/memory.js +27 -0
  97. package/dist/orchestration/memory.js.map +1 -0
  98. package/dist/provider-DX5Mf0uq.d.ts +151 -0
  99. package/dist/routing/index.d.ts +29 -0
  100. package/dist/routing/index.js +386 -0
  101. package/dist/routing/index.js.map +1 -0
  102. package/dist/routing/learning/index.d.ts +433 -0
  103. package/dist/routing/learning/index.js +2502 -0
  104. package/dist/routing/learning/index.js.map +1 -0
  105. package/dist/runtime-BSjrnxeF.d.ts +283 -0
  106. package/dist/runtime-OISPXS4I.js +19 -0
  107. package/dist/runtime-OISPXS4I.js.map +1 -0
  108. package/dist/store-types-2YdceOMy.d.ts +78 -0
  109. package/dist/types-BB7KqceP.d.ts +52 -0
  110. package/dist/types-CIqkKXix.d.ts +86 -0
  111. package/dist/types-DTFc1qO6.d.ts +1065 -0
  112. package/dist/types-DYex3p7_.d.ts +88 -0
  113. package/docs/licenses/ruflo-memory-MIT.txt +21 -0
  114. package/docs/releases/0.1.0-beta.3.md +13 -0
  115. package/package.json +114 -4
@@ -0,0 +1,88 @@
1
+ /** Values whose meaning survives a JSON checkpoint. undefined and class instances are rejected. */
2
+ type JsonValue = null | boolean | number | string | JsonValue[] | {
3
+ [key: string]: JsonValue;
4
+ };
5
+ interface WorkflowStepContext {
6
+ runId: string;
7
+ stepId: string;
8
+ /** One-based, durably consumed before invoking execute. */
9
+ attempt: number;
10
+ /** Stable across retries and process restarts; pass to an idempotent external API. */
11
+ idempotencyKey: string;
12
+ dependencyOutputs: Readonly<Record<string, JsonValue>>;
13
+ /** Cancellation is cooperative. The runner drains callbacks before releasing ownership. */
14
+ signal: AbortSignal;
15
+ }
16
+ interface WorkflowStep {
17
+ id: string;
18
+ dependencies?: readonly string[];
19
+ /** Includes the initial call; defaults to one. Explicit retries can repeat side effects. */
20
+ maxAttempts?: number;
21
+ /** Explicit promise that repeating an ambiguous interrupted call is safe. Defaults to false. */
22
+ replaySafe?: boolean;
23
+ execute(context: WorkflowStepContext): JsonValue | Promise<JsonValue>;
24
+ }
25
+ interface WorkflowDefinition {
26
+ id: string;
27
+ /** Caller must change this when callback code, closed-over inputs or semantics change. */
28
+ version: string;
29
+ steps: readonly WorkflowStep[];
30
+ }
31
+ interface WorkflowStepState {
32
+ status: 'pending' | 'running' | 'completed' | 'failed' | 'interrupted' | 'blocked';
33
+ attempts: number;
34
+ output?: JsonValue;
35
+ error?: string;
36
+ }
37
+ interface WorkflowCheckpoint {
38
+ format: 1;
39
+ runId: string;
40
+ workflow: {
41
+ id: string;
42
+ version: string;
43
+ fingerprint: string;
44
+ };
45
+ status: 'running' | 'completed' | 'failed' | 'cancelled' | 'halted';
46
+ steps: Record<string, WorkflowStepState>;
47
+ }
48
+ /** Holds exclusive ownership for the entire run, including callback drainage. */
49
+ interface WorkflowLease {
50
+ load(): Promise<unknown | undefined>;
51
+ /** Atomic durable replacement. A rejection stops scheduling and aborts active callbacks. */
52
+ save(checkpoint: WorkflowCheckpoint): Promise<void>;
53
+ release(): Promise<void>;
54
+ }
55
+ /** Custom stores must serialize or reject same-run leases across all of their clients. */
56
+ interface WorkflowStore {
57
+ acquire(runId: string): Promise<WorkflowLease>;
58
+ }
59
+ /** The caller verified that no process still executes this run's work; re-armed side effects may repeat. */
60
+ interface WorkflowRearmAcknowledgement {
61
+ workStopped: true;
62
+ }
63
+ interface WorkflowRearmOptions {
64
+ runId: string;
65
+ /** `'incomplete'`: every step that is not completed. Explicit ids must name non-completed steps. */
66
+ steps: 'incomplete' | readonly string[];
67
+ acknowledgement: WorkflowRearmAcknowledgement;
68
+ }
69
+ interface WorkflowRearmResult {
70
+ /** The persisted checkpoint; `halted` until a `run` resumes it. Unchanged when nothing was re-armed. */
71
+ checkpoint: WorkflowCheckpoint;
72
+ /** What each re-armed step looked like before: the audit trail for the caller's own log. */
73
+ rearmed: Array<{
74
+ stepId: string;
75
+ status: WorkflowStepState['status'];
76
+ attempts: number;
77
+ }>;
78
+ }
79
+ interface WorkflowRunOptions {
80
+ runId: string;
81
+ /** Positive integer; defaults to four. Wave barriers are preserved. */
82
+ concurrency?: number;
83
+ signal?: AbortSignal;
84
+ /** Also requires replaySafe on each interrupted step. Default is to halt. */
85
+ recoverInterrupted?: 'replay-safe';
86
+ }
87
+
88
+ export type { JsonValue as J, WorkflowStore as W, WorkflowDefinition as a, WorkflowLease as b, WorkflowRunOptions as c, WorkflowCheckpoint as d, WorkflowRearmOptions as e, WorkflowRearmResult as f, WorkflowRearmAcknowledgement as g, WorkflowStep as h, WorkflowStepContext as i, WorkflowStepState as j };
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024-2026 ruvnet
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,13 @@
1
+ # HiveAgents Runtime 0.1.0-beta.3
2
+
3
+ Un solo paquete npm, `hiveagents-runtime`, integra Claude Code, Codex, Gemini CLI y Antigravity CLI mediante la misma API TypeScript. Requiere Node.js 22.16 o posterior y ESM. Las pruebas de la beta se enfocan en macOS. Instalá y autenticá el binario de cada proveedor que quieras usar.
4
+
5
+ - `new Runtime()` registra los cuatro proveedores incluidos. Los imports de las factories de Gemini y Antigravity ahora salen de `hiveagents-runtime`. Quitá las dependencias separadas de esos adaptadores al migrar desde beta.1.
6
+ - El selector toma los catálogos de los proveedores registrados, filtra permisos y preparación y devuelve un agente y un recibo. Podés definir prioridades y reglas por tarea. La selección basada en resultados medidos está en `hiveagents-runtime/routing/learning`.
7
+ - Para incorporar un CLI adicional, registrá un `ProviderRegistration` y usalo con las mismas APIs de ejecución y selección.
8
+ - Las consultas SQLite de memoria ahora enlazan sus parámetros explícitamente y funcionan en Node 22.16. Podés seguir abriendo bases de memoria de la beta anterior.
9
+ - La instalación externa y las pruebas de la app se ejecutan contra un solo tarball. Los CLIs simulados verifican los contratos sin enviar turnos reales.
10
+
11
+ El catálogo estático identifica candidatos. Para seleccionarlos en modo automático, declaralos como admisibles con `allowUnverifiedModels: true`; la autenticación y las capacidades se evalúan por separado. Gemini y Antigravity mantienen sus restricciones de autenticación y permisos. Antigravity exige `edit` explícito.
12
+
13
+ Probá la [demo offline](../../examples/README.md#document-triage-and-restart). Consultá la [guía de integración](../integration-guide.md), la [matriz de capacidades](../capability-matrix.md) y el [checklist de verificación](../release-checklist.md).
package/package.json CHANGED
@@ -1,6 +1,116 @@
1
1
  {
2
2
  "name": "hiveagents-runtime",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0-beta.3",
4
+ "description": "One local-first SDK to use and route tasks across installed AI agent CLIs",
5
+ "private": false,
6
+ "license": "Apache-2.0",
7
+ "peerDependencies": {
8
+ "@anthropic-ai/claude-agent-sdk": ">=0.3.251 <0.4",
9
+ "@modelcontextprotocol/sdk": "^1.29.0"
10
+ },
11
+ "peerDependenciesMeta": {
12
+ "@anthropic-ai/claude-agent-sdk": {
13
+ "optional": true
14
+ },
15
+ "@modelcontextprotocol/sdk": {
16
+ "optional": true
17
+ }
18
+ },
19
+ "type": "module",
20
+ "engines": {
21
+ "node": ">=22.16.0"
22
+ },
23
+ "exports": {
24
+ ".": {
25
+ "types": "./dist/index.d.ts",
26
+ "import": "./dist/index.js"
27
+ },
28
+ "./orchestration": {
29
+ "types": "./dist/orchestration/index.d.ts",
30
+ "import": "./dist/orchestration/index.js"
31
+ },
32
+ "./orchestration/graph": {
33
+ "types": "./dist/orchestration/graph.d.ts",
34
+ "import": "./dist/orchestration/graph.js"
35
+ },
36
+ "./orchestration/memory": {
37
+ "types": "./dist/orchestration/memory.d.ts",
38
+ "import": "./dist/orchestration/memory.js"
39
+ },
40
+ "./orchestration/dynamic": {
41
+ "types": "./dist/orchestration/dynamic.d.ts",
42
+ "import": "./dist/orchestration/dynamic.js"
43
+ },
44
+ "./orchestration/log": {
45
+ "types": "./dist/orchestration/log.d.ts",
46
+ "import": "./dist/orchestration/log.js"
47
+ },
48
+ "./memory-tools": {
49
+ "types": "./dist/memory-tools.d.ts",
50
+ "import": "./dist/memory-tools.js"
51
+ },
52
+ "./adapter-kit": {
53
+ "types": "./dist/adapter-kit.d.ts",
54
+ "import": "./dist/adapter-kit.js"
55
+ },
56
+ "./hosted": {
57
+ "types": "./dist/hosted-runtime.d.ts",
58
+ "import": "./dist/hosted-runtime.js"
59
+ },
60
+ "./routing": {
61
+ "types": "./dist/routing/index.d.ts",
62
+ "import": "./dist/routing/index.js"
63
+ },
64
+ "./routing/learning": {
65
+ "types": "./dist/routing/learning/index.d.ts",
66
+ "import": "./dist/routing/learning/index.js"
67
+ }
68
+ },
69
+ "bin": {
70
+ "hiveagents-runtime": "./dist/cli.js"
71
+ },
72
+ "files": [
73
+ "dist",
74
+ "README.md",
75
+ "LICENSE",
76
+ "docs/licenses",
77
+ "docs/releases/0.1.0-beta.3.md"
78
+ ],
79
+ "scripts": {
80
+ "build": "tsup",
81
+ "typecheck": "tsc --noEmit",
82
+ "test": "vitest run",
83
+ "test:watch": "vitest",
84
+ "verify:orchestration": "npm run build && node scripts/verify-orchestration-package.mjs",
85
+ "test:live": "npm run build && OAR_LIVE=1 vitest run tests/live --passWithNoTests",
86
+ "prepack": "npm run build && npm run typecheck",
87
+ "verify:external": "node scripts/verify-external-consumer.mjs",
88
+ "verify:first-delivery": "node scripts/verify-first-delivery.mjs",
89
+ "verify:release": "node scripts/verify-release-candidate.mjs",
90
+ "verify:harness": "node scripts/verify-harness-consumer.mjs",
91
+ "verify:routing": "node scripts/verify-routing-consumer.mjs",
92
+ "verify:learning": "node scripts/verify-learning-consumer.mjs",
93
+ "verify:continuous": "node scripts/verify-continuous-consumer.mjs"
94
+ },
95
+ "dependencies": {
96
+ "ajv": "8.20.0"
97
+ },
98
+ "devDependencies": {
99
+ "@types/node": "26.4.0",
100
+ "tsup": "8.5.1",
101
+ "typescript": "5.9.3",
102
+ "vitest": "4.1.11"
103
+ },
104
+ "overrides": {
105
+ "esbuild": "0.28.2"
106
+ },
107
+ "repository": {
108
+ "type": "git",
109
+ "url": "git+https://github.com/hiveagents-dev/runtime.git"
110
+ },
111
+ "homepage": "https://github.com/hiveagents-dev/runtime",
112
+ "publishConfig": {
113
+ "access": "public",
114
+ "tag": "beta"
115
+ }
116
+ }