@holoscript/holoscript-agent 2.0.0 → 2.0.2
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/README.md +117 -0
- package/bin/holoscript-agent.cjs +18 -0
- package/dist/ablation.js +4 -1
- package/dist/ablation.js.map +1 -1
- package/dist/brain.js +41 -5
- package/dist/brain.js.map +1 -1
- package/dist/commit-hook.js +6 -2
- package/dist/commit-hook.js.map +1 -1
- package/dist/cost-guard.d.ts +17 -2
- package/dist/cost-guard.js +31 -3
- package/dist/cost-guard.js.map +1 -1
- package/dist/holomesh-client.d.ts +57 -1
- package/dist/holomesh-client.js +52 -8
- package/dist/holomesh-client.js.map +1 -1
- package/dist/identity.js +5 -1
- package/dist/identity.js.map +1 -1
- package/dist/index.js +897 -127
- package/dist/index.js.map +1 -1
- package/dist/provision.js +39 -22
- package/dist/provision.js.map +1 -1
- package/dist/runner.d.ts +57 -0
- package/dist/runner.js +351 -31
- package/dist/runner.js.map +1 -1
- package/dist/supervisor-config.js +14 -5
- package/dist/supervisor-config.js.map +1 -1
- package/dist/supervisor.js +656 -57
- package/dist/supervisor.js.map +1 -1
- package/dist/types.d.ts +43 -1
- package/package.json +10 -5
package/dist/types.d.ts
CHANGED
|
@@ -18,6 +18,43 @@ interface RuntimeBrainConfig {
|
|
|
18
18
|
capabilityTags: string[];
|
|
19
19
|
domain: string;
|
|
20
20
|
scopeTier: 'cold' | 'warm' | 'hot';
|
|
21
|
+
/**
|
|
22
|
+
* Capability keys (from `Capabilities` in @holoscript/llm-provider) that
|
|
23
|
+
* this brain MUST have. Router refuses to assign the brain to a provider
|
|
24
|
+
* whose manifest doesn't satisfy every entry. Empty array (default) =
|
|
25
|
+
* open routing — matches today's behavior, backward-compatible.
|
|
26
|
+
*
|
|
27
|
+
* Per founder ruling 2026-05-06 (universal+segregated foundation): brains
|
|
28
|
+
* declare needs as data; router does set arithmetic at session start.
|
|
29
|
+
* `HOLOSCRIPT_AGENT_PROVIDER` env becomes override, not source-of-truth.
|
|
30
|
+
*/
|
|
31
|
+
requires: string[];
|
|
32
|
+
/**
|
|
33
|
+
* Capability keys this brain prefers but doesn't require. Router uses
|
|
34
|
+
* to break ties between candidates that all satisfy `requires`.
|
|
35
|
+
* Empty array (default) = no preference.
|
|
36
|
+
*/
|
|
37
|
+
prefers: string[];
|
|
38
|
+
/**
|
|
39
|
+
* Capability keys this brain explicitly avoids. Router excludes any
|
|
40
|
+
* provider whose manifest declares any of these capabilities (e.g.
|
|
41
|
+
* a privacy-sensitive brain may avoid `liveWebSearch`).
|
|
42
|
+
* Empty array (default) = no exclusions.
|
|
43
|
+
*/
|
|
44
|
+
avoids: string[];
|
|
45
|
+
/**
|
|
46
|
+
* Optional cognitive self-evaluation gate — the brain's `reflect` verb (W.736).
|
|
47
|
+
* When the brain declares a `reflect { criteria, escalate_on_fail }` block, the
|
|
48
|
+
* runner runs one self-evaluation pass over the produced artifact before
|
|
49
|
+
* accepting it. With `escalateOnFail: true` a failed self-evaluation escalates
|
|
50
|
+
* to the fleet (the `local_first` directive) instead of marking the task done;
|
|
51
|
+
* otherwise the verdict is advisory (logged + recorded, never blocks).
|
|
52
|
+
* Absent (default) = no reflect pass — existing brains are unaffected.
|
|
53
|
+
*/
|
|
54
|
+
reflect?: {
|
|
55
|
+
criteria: string;
|
|
56
|
+
escalateOnFail: boolean;
|
|
57
|
+
};
|
|
21
58
|
}
|
|
22
59
|
interface CostState {
|
|
23
60
|
date: string;
|
|
@@ -40,11 +77,16 @@ interface BoardTask {
|
|
|
40
77
|
claimedBy?: string;
|
|
41
78
|
}
|
|
42
79
|
interface TickResult {
|
|
43
|
-
action: 'heartbeat-only' | 'over-budget' | 'no-claimable-task' | 'claimed' | 'executed' | 'errored' | 'no-artifact';
|
|
80
|
+
action: 'heartbeat-only' | 'over-budget' | 'no-claimable-task' | 'claimed' | 'executed' | 'errored' | 'no-artifact' | 'reflect-escalate' | 'messages-processed';
|
|
44
81
|
taskId?: string;
|
|
45
82
|
spentUsd: number;
|
|
46
83
|
remainingUsd: number;
|
|
47
84
|
message?: string;
|
|
85
|
+
receipts?: Array<{
|
|
86
|
+
status: string;
|
|
87
|
+
action: string;
|
|
88
|
+
reason: string;
|
|
89
|
+
}>;
|
|
48
90
|
}
|
|
49
91
|
interface ExecutionResult {
|
|
50
92
|
taskId: string;
|
package/package.json
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holoscript/holoscript-agent",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Headless agent runtime for the HoloMesh — multi-LLM-provider, brain-mounted, cost-guarded. Closes W.087 vertex B.",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
6
9
|
"main": "./dist/index.js",
|
|
7
10
|
"module": "./dist/index.js",
|
|
8
11
|
"types": "./dist/index.d.ts",
|
|
9
12
|
"bin": {
|
|
10
|
-
"holoscript-agent": "./
|
|
13
|
+
"holoscript-agent": "./bin/holoscript-agent.cjs"
|
|
11
14
|
},
|
|
12
15
|
"exports": {
|
|
13
16
|
".": {
|
|
@@ -56,6 +59,7 @@
|
|
|
56
59
|
}
|
|
57
60
|
},
|
|
58
61
|
"files": [
|
|
62
|
+
"bin",
|
|
59
63
|
"dist"
|
|
60
64
|
],
|
|
61
65
|
"keywords": [
|
|
@@ -82,18 +86,19 @@
|
|
|
82
86
|
},
|
|
83
87
|
"dependencies": {
|
|
84
88
|
"ethers": "^6.16.0",
|
|
85
|
-
"@holoscript/llm-provider": "1.2.
|
|
89
|
+
"@holoscript/llm-provider": "^1.2.1"
|
|
86
90
|
},
|
|
87
91
|
"devDependencies": {
|
|
88
92
|
"@types/node": "^24.10.1",
|
|
89
93
|
"tsup": "^8.0.1",
|
|
90
94
|
"typescript": "~5.9.3",
|
|
91
|
-
"vitest": "^4.1.
|
|
95
|
+
"vitest": "^4.1.5"
|
|
92
96
|
},
|
|
93
97
|
"scripts": {
|
|
94
98
|
"build": "tsup",
|
|
95
99
|
"dev": "tsup --watch",
|
|
96
100
|
"test": "vitest run",
|
|
97
|
-
"lint": "eslint src --ext .ts"
|
|
101
|
+
"lint": "eslint src --ext .ts",
|
|
102
|
+
"test:coverage": "vitest run --coverage"
|
|
98
103
|
}
|
|
99
104
|
}
|