hiveagents-runtime 0.0.0-stage → 0.1.0-beta.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 +202 -0
- package/README.md +85 -2
- package/dist/adapter-kit.d.ts +37 -0
- package/dist/adapter-kit.js +33 -0
- package/dist/adapter-kit.js.map +1 -0
- package/dist/agent-D0HS38G3.d.ts +169 -0
- package/dist/agent-OLSXNGNN.js +23 -0
- package/dist/agent-OLSXNGNN.js.map +1 -0
- package/dist/agent-readiness-V36OJME4.js +19 -0
- package/dist/agent-readiness-V36OJME4.js.map +1 -0
- package/dist/capture-runtime-GP6NZ2ee.d.ts +54 -0
- package/dist/chunk-2RUEC63U.js +1217 -0
- package/dist/chunk-2RUEC63U.js.map +1 -0
- package/dist/chunk-3B3JW4U3.js +291 -0
- package/dist/chunk-3B3JW4U3.js.map +1 -0
- package/dist/chunk-3TIYA3K5.js +55 -0
- package/dist/chunk-3TIYA3K5.js.map +1 -0
- package/dist/chunk-6XIJW65Q.js +52 -0
- package/dist/chunk-6XIJW65Q.js.map +1 -0
- package/dist/chunk-7LDQKJKI.js +248 -0
- package/dist/chunk-7LDQKJKI.js.map +1 -0
- package/dist/chunk-ALLOMOUN.js +810 -0
- package/dist/chunk-ALLOMOUN.js.map +1 -0
- package/dist/chunk-C2DN6KL4.js +853 -0
- package/dist/chunk-C2DN6KL4.js.map +1 -0
- package/dist/chunk-COKYQUTK.js +581 -0
- package/dist/chunk-COKYQUTK.js.map +1 -0
- package/dist/chunk-CPN4DOXH.js +115 -0
- package/dist/chunk-CPN4DOXH.js.map +1 -0
- package/dist/chunk-DBFXFWQZ.js +385 -0
- package/dist/chunk-DBFXFWQZ.js.map +1 -0
- package/dist/chunk-DZFFGUIA.js +81 -0
- package/dist/chunk-DZFFGUIA.js.map +1 -0
- package/dist/chunk-EEUYQFCP.js +106 -0
- package/dist/chunk-EEUYQFCP.js.map +1 -0
- package/dist/chunk-GFVYNPLS.js +118 -0
- package/dist/chunk-GFVYNPLS.js.map +1 -0
- package/dist/chunk-GJ4FTDBJ.js +2910 -0
- package/dist/chunk-GJ4FTDBJ.js.map +1 -0
- package/dist/chunk-GS5U3KUN.js +201 -0
- package/dist/chunk-GS5U3KUN.js.map +1 -0
- package/dist/chunk-HB7FBSH2.js +960 -0
- package/dist/chunk-HB7FBSH2.js.map +1 -0
- package/dist/chunk-HZFZX5A3.js +21 -0
- package/dist/chunk-HZFZX5A3.js.map +1 -0
- package/dist/chunk-J7VAYJKM.js +595 -0
- package/dist/chunk-J7VAYJKM.js.map +1 -0
- package/dist/chunk-NCNSHOF7.js +52 -0
- package/dist/chunk-NCNSHOF7.js.map +1 -0
- package/dist/chunk-RXU2Q2HF.js +49 -0
- package/dist/chunk-RXU2Q2HF.js.map +1 -0
- package/dist/chunk-SRJUZJKV.js +521 -0
- package/dist/chunk-SRJUZJKV.js.map +1 -0
- package/dist/chunk-TG7NTMTR.js +208 -0
- package/dist/chunk-TG7NTMTR.js.map +1 -0
- package/dist/chunk-TIZKGD4R.js +202 -0
- package/dist/chunk-TIZKGD4R.js.map +1 -0
- package/dist/chunk-WMKO5XOE.js +601 -0
- package/dist/chunk-WMKO5XOE.js.map +1 -0
- package/dist/chunk-WOQBVJH5.js +175 -0
- package/dist/chunk-WOQBVJH5.js.map +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +25 -0
- package/dist/cli.js.map +1 -0
- package/dist/errors-DgehLwqI.d.ts +98 -0
- package/dist/execution-halt-CW0Oi9s9.d.ts +12 -0
- package/dist/execution-types-UJ6gAF48.d.ts +239 -0
- package/dist/host-ledger-VPRWVVOS.js +25 -0
- package/dist/host-ledger-VPRWVVOS.js.map +1 -0
- package/dist/hosted-runtime.d.ts +168 -0
- package/dist/hosted-runtime.js +857 -0
- package/dist/hosted-runtime.js.map +1 -0
- package/dist/index-B86C6VAD.d.ts +41 -0
- package/dist/index.d.ts +327 -0
- package/dist/index.js +8818 -0
- package/dist/index.js.map +1 -0
- package/dist/memory-items-BSTC0_R0.d.ts +28 -0
- package/dist/memory-tools.d.ts +222 -0
- package/dist/memory-tools.js +923 -0
- package/dist/memory-tools.js.map +1 -0
- package/dist/orchestration/dynamic.d.ts +854 -0
- package/dist/orchestration/dynamic.js +3150 -0
- package/dist/orchestration/dynamic.js.map +1 -0
- package/dist/orchestration/graph.d.ts +11 -0
- package/dist/orchestration/graph.js +9 -0
- package/dist/orchestration/graph.js.map +1 -0
- package/dist/orchestration/index.d.ts +2385 -0
- package/dist/orchestration/index.js +6403 -0
- package/dist/orchestration/index.js.map +1 -0
- package/dist/orchestration/log.d.ts +301 -0
- package/dist/orchestration/log.js +3058 -0
- package/dist/orchestration/log.js.map +1 -0
- package/dist/orchestration/memory.d.ts +711 -0
- package/dist/orchestration/memory.js +27 -0
- package/dist/orchestration/memory.js.map +1 -0
- package/dist/provider-XCpWjJ6a.d.ts +151 -0
- package/dist/routing/index.d.ts +29 -0
- package/dist/routing/index.js +385 -0
- package/dist/routing/index.js.map +1 -0
- package/dist/routing/learning/index.d.ts +433 -0
- package/dist/routing/learning/index.js +2501 -0
- package/dist/routing/learning/index.js.map +1 -0
- package/dist/runtime-C6Cu2fvw.d.ts +283 -0
- package/dist/runtime-Y72XJFFO.js +18 -0
- package/dist/runtime-Y72XJFFO.js.map +1 -0
- package/dist/store-types-2YdceOMy.d.ts +78 -0
- package/dist/types-BB7KqceP.d.ts +52 -0
- package/dist/types-BBRKjIc7.d.ts +86 -0
- package/dist/types-DTFc1qO6.d.ts +1065 -0
- package/dist/types-DYex3p7_.d.ts +88 -0
- package/docs/licenses/ruflo-memory-MIT.txt +21 -0
- package/docs/releases/0.1.0-beta.1.md +13 -0
- 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.1
|
|
2
|
+
|
|
3
|
+
HiveAgents Runtime es un SDK TypeScript local-first para integrar agentes a través de CLIs instalados. La beta apunta a flujos supervisados en macOS con Node.js 22.16 o posterior. Incluye Claude Code y Codex, adaptadores separados para Gemini y Antigravity, y una app de triage que se puede probar offline.
|
|
4
|
+
|
|
5
|
+
- Los workflows dinámicos propagan detenciones de infraestructura del control de admisión y esperan la liquidación de la ejecución y la devolución del cupo. Una respuesta vencida se descarta y su uso reportado se conserva.
|
|
6
|
+
- Control aplica un plan privado validado. `Agent.ready()` devuelve un diagnóstico inmutable.
|
|
7
|
+
- El historial reserva capacidad para cerrar las ejecuciones que admite. El verificador prueba el SDK y los dos adaptadores como tarballs instalados en una app externa.
|
|
8
|
+
|
|
9
|
+
Probá primero la [demo offline](../../examples/README.md#document-triage-and-restart). El [checklist de distribución](../release-checklist.md) explica cómo construir y verificar los tres tarballs. Las pruebas offline usan CLIs simulados. Para sesiones reales, consultá la [matriz de capacidades](../capability-matrix.md).
|
|
10
|
+
|
|
11
|
+
## Texto para el anuncio
|
|
12
|
+
|
|
13
|
+
Preparamos la primera beta de HiveAgents Runtime, un SDK TypeScript para ejecutar y reanudar workflows de agentes en aplicaciones locales. Incluye Claude Code y Codex, con adaptadores para Gemini CLI y Antigravity CLI. Podés probar un workflow recuperable sin cuenta ni consumo de modelos, y sumar un CLI autenticado cuando quieras ejecutar agentes reales. Esta beta apunta a flujos supervisados en macOS. Buscamos feedback sobre instalación, diagnóstico de proveedores y recuperación de ejecuciones.
|
package/package.json
CHANGED
|
@@ -1,6 +1,116 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hiveagents-runtime",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0-beta.1",
|
|
4
|
+
"description": "Local-first SDK for agent applications using installed provider CLIs and external adapters",
|
|
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.1.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
|
+
}
|