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.
- package/LICENSE +202 -0
- package/README.md +89 -2
- package/dist/adapter-kit.d.ts +37 -0
- package/dist/adapter-kit.js +34 -0
- package/dist/adapter-kit.js.map +1 -0
- package/dist/agent-Bj5YPrO7.d.ts +169 -0
- package/dist/agent-D6OXR7UF.js +24 -0
- package/dist/agent-D6OXR7UF.js.map +1 -0
- package/dist/agent-readiness-KSGNKTGK.js +19 -0
- package/dist/agent-readiness-KSGNKTGK.js.map +1 -0
- package/dist/capture-runtime-GP6NZ2ee.d.ts +54 -0
- package/dist/chunk-2RK74GCA.js +2397 -0
- package/dist/chunk-2RK74GCA.js.map +1 -0
- package/dist/chunk-3TIYA3K5.js +55 -0
- package/dist/chunk-3TIYA3K5.js.map +1 -0
- package/dist/chunk-6FIXXWNM.js +1 -0
- package/dist/chunk-6FIXXWNM.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-CPN4DOXH.js +115 -0
- package/dist/chunk-CPN4DOXH.js.map +1 -0
- package/dist/chunk-DAXPAV2L.js +810 -0
- package/dist/chunk-DAXPAV2L.js.map +1 -0
- package/dist/chunk-DQEMIGKC.js +291 -0
- package/dist/chunk-DQEMIGKC.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-G6JV7WV6.js +521 -0
- package/dist/chunk-G6JV7WV6.js.map +1 -0
- package/dist/chunk-GFVYNPLS.js +118 -0
- package/dist/chunk-GFVYNPLS.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-RH5A5U7G.js +202 -0
- package/dist/chunk-RH5A5U7G.js.map +1 -0
- package/dist/chunk-RX3XZENU.js +385 -0
- package/dist/chunk-RX3XZENU.js.map +1 -0
- package/dist/chunk-RXU2Q2HF.js +49 -0
- package/dist/chunk-RXU2Q2HF.js.map +1 -0
- package/dist/chunk-TG7NTMTR.js +208 -0
- package/dist/chunk-TG7NTMTR.js.map +1 -0
- package/dist/chunk-TWGEYWMO.js +1217 -0
- package/dist/chunk-TWGEYWMO.js.map +1 -0
- package/dist/chunk-UZPDDQVJ.js +2910 -0
- package/dist/chunk-UZPDDQVJ.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/chunk-WVT5SEKC.js +581 -0
- package/dist/chunk-WVT5SEKC.js.map +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +26 -0
- package/dist/cli.js.map +1 -0
- package/dist/errors-BNHvvjn9.d.ts +98 -0
- package/dist/execution-halt-B8G0fOKS.d.ts +12 -0
- package/dist/execution-types-ClYYqPQP.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 +858 -0
- package/dist/hosted-runtime.js.map +1 -0
- package/dist/index-B86C6VAD.d.ts +41 -0
- package/dist/index.d.ts +344 -0
- package/dist/index.js +8825 -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 +6409 -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-DX5Mf0uq.d.ts +151 -0
- package/dist/routing/index.d.ts +29 -0
- package/dist/routing/index.js +386 -0
- package/dist/routing/index.js.map +1 -0
- package/dist/routing/learning/index.d.ts +433 -0
- package/dist/routing/learning/index.js +2502 -0
- package/dist/routing/learning/index.js.map +1 -0
- package/dist/runtime-BSjrnxeF.d.ts +283 -0
- package/dist/runtime-OISPXS4I.js +19 -0
- package/dist/runtime-OISPXS4I.js.map +1 -0
- package/dist/store-types-2YdceOMy.d.ts +78 -0
- package/dist/types-BB7KqceP.d.ts +52 -0
- package/dist/types-CIqkKXix.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.3.md +13 -0
- package/package.json +114 -4
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { b as AdmissionRefusalReason } from './errors-BNHvvjn9.js';
|
|
2
|
+
import { P as ProviderRegistration, R as Runtime } from './runtime-BSjrnxeF.js';
|
|
3
|
+
import { M as ModelInfo, C as CapabilitySupport, d as AgentOptions } from './types-DTFc1qO6.js';
|
|
4
|
+
import { P as ProcessRunner, a as ExecProbeTurn, f as ExecTurnRequest } from './provider-DX5Mf0uq.js';
|
|
5
|
+
import { R as RuntimeCaptureOptions } from './capture-runtime-GP6NZ2ee.js';
|
|
6
|
+
import './types-BB7KqceP.js';
|
|
7
|
+
|
|
8
|
+
type HostedJson = null | boolean | number | string | HostedJson[] | {
|
|
9
|
+
[key: string]: HostedJson;
|
|
10
|
+
};
|
|
11
|
+
interface HostedRecipeDescriptor {
|
|
12
|
+
readonly recipeId: string;
|
|
13
|
+
readonly recipeDigest: string;
|
|
14
|
+
readonly contextArgs: readonly string[];
|
|
15
|
+
readonly permissionArgs: readonly string[];
|
|
16
|
+
readonly providerOptionsDigest: string;
|
|
17
|
+
readonly clientEnvironmentPolicyDigest: string;
|
|
18
|
+
readonly environmentPolicyId: string;
|
|
19
|
+
readonly modelIds: readonly string[];
|
|
20
|
+
readonly efforts: readonly string[];
|
|
21
|
+
readonly allowInstructions: boolean;
|
|
22
|
+
readonly cwdRoots: readonly string[];
|
|
23
|
+
}
|
|
24
|
+
interface HostedProviderDescriptor {
|
|
25
|
+
readonly schemaVersion: 1;
|
|
26
|
+
readonly provider: string;
|
|
27
|
+
readonly bindingId: string;
|
|
28
|
+
readonly bindingDigest: string;
|
|
29
|
+
readonly token: string;
|
|
30
|
+
readonly adapterVersion: string;
|
|
31
|
+
readonly modelCatalog: readonly ModelInfo[];
|
|
32
|
+
readonly execCapabilities: Readonly<Record<string, CapabilitySupport>>;
|
|
33
|
+
readonly target: Readonly<{
|
|
34
|
+
command: string;
|
|
35
|
+
argsPrefix: readonly string[];
|
|
36
|
+
executableDigest: string;
|
|
37
|
+
identityFiles: readonly string[];
|
|
38
|
+
}>;
|
|
39
|
+
readonly probeRecipeId: string;
|
|
40
|
+
readonly limits: Readonly<{
|
|
41
|
+
maxTurnMs: number;
|
|
42
|
+
maxProbeMs: number;
|
|
43
|
+
maxOutputBytes: number;
|
|
44
|
+
}>;
|
|
45
|
+
readonly recipes: readonly HostedRecipeDescriptor[];
|
|
46
|
+
}
|
|
47
|
+
interface HostedTurnPayload {
|
|
48
|
+
readonly mode: 'open' | 'resume' | 'fork' | 'one-shot';
|
|
49
|
+
readonly modelId: string;
|
|
50
|
+
readonly cwd: string;
|
|
51
|
+
readonly prompt: string;
|
|
52
|
+
readonly timeoutMs: number;
|
|
53
|
+
readonly maxOutputBytes: number;
|
|
54
|
+
readonly sessionId?: string;
|
|
55
|
+
readonly instructions?: string;
|
|
56
|
+
readonly effort?: string;
|
|
57
|
+
readonly outputSchema?: {
|
|
58
|
+
[key: string]: HostedJson;
|
|
59
|
+
};
|
|
60
|
+
readonly intentId?: string;
|
|
61
|
+
/**
|
|
62
|
+
* A request to wait behind every default turn for the host's admission. The only value is `low`:
|
|
63
|
+
* a worker may lower a turn (a rehearsal), never raise one. Absent means the default priority.
|
|
64
|
+
*/
|
|
65
|
+
readonly priority?: 'low';
|
|
66
|
+
}
|
|
67
|
+
interface RequestBase {
|
|
68
|
+
readonly schemaVersion: 1;
|
|
69
|
+
readonly channelId: string;
|
|
70
|
+
readonly systemId: string;
|
|
71
|
+
readonly generation: number;
|
|
72
|
+
readonly bindingId: string;
|
|
73
|
+
readonly requestId: string;
|
|
74
|
+
readonly remainingMs: number;
|
|
75
|
+
}
|
|
76
|
+
type HostedRequest = RequestBase & ({
|
|
77
|
+
readonly method: 'detect' | 'auth' | 'models' | 'compatibility';
|
|
78
|
+
readonly recipeId: string;
|
|
79
|
+
readonly cwd: string;
|
|
80
|
+
} | {
|
|
81
|
+
readonly method: 'execute' | 'stream-open';
|
|
82
|
+
readonly recipeId: string;
|
|
83
|
+
readonly turn: HostedTurnPayload;
|
|
84
|
+
} | {
|
|
85
|
+
readonly method: 'stream-next' | 'stream-return' | 'stream-throw' | 'status';
|
|
86
|
+
readonly operationId: string;
|
|
87
|
+
} | {
|
|
88
|
+
readonly method: 'cancel';
|
|
89
|
+
readonly targetRequestId: string;
|
|
90
|
+
} | {
|
|
91
|
+
readonly method: 'intent-begin';
|
|
92
|
+
readonly turnId: string;
|
|
93
|
+
readonly semanticDigest: string;
|
|
94
|
+
} | {
|
|
95
|
+
readonly method: 'intent-finish';
|
|
96
|
+
readonly intentId: string;
|
|
97
|
+
});
|
|
98
|
+
type HostedErrorCode = 'ADMISSION_REFUSED' | 'EXECUTION_HALTED' | 'USAGE_LIMIT' | 'UNSUPPORTED_CAPABILITY' | 'INVALID_RUNTIME_PROTOCOL' | 'ABORTED' | 'TIMEOUT' | 'OUTPUT_LIMIT' | 'PROVIDER_UNAVAILABLE' | 'NOT_AUTHENTICATED';
|
|
99
|
+
type HostedErrorWire = Readonly<{
|
|
100
|
+
code: 'ADMISSION_REFUSED';
|
|
101
|
+
reason: AdmissionRefusalReason;
|
|
102
|
+
receiptDigest: string;
|
|
103
|
+
}> | Readonly<{
|
|
104
|
+
code: Exclude<HostedErrorCode, 'ADMISSION_REFUSED'>;
|
|
105
|
+
receiptDigest?: string;
|
|
106
|
+
}>;
|
|
107
|
+
type HostedReply = Omit<RequestBase, 'remainingMs'> & ({
|
|
108
|
+
readonly ok: true;
|
|
109
|
+
readonly data: HostedJson;
|
|
110
|
+
} | {
|
|
111
|
+
readonly ok: false;
|
|
112
|
+
readonly error: HostedErrorWire;
|
|
113
|
+
});
|
|
114
|
+
/** Trusted local transport facade built by Root bootstrap. It is never serialized or host authority. */
|
|
115
|
+
interface HostedRuntimeClient {
|
|
116
|
+
call(request: HostedRequest, options?: {
|
|
117
|
+
readonly signal?: AbortSignal;
|
|
118
|
+
readonly remainingMs?: number;
|
|
119
|
+
}): Promise<HostedReply>;
|
|
120
|
+
close(): void;
|
|
121
|
+
}
|
|
122
|
+
interface HostedWorkerContext {
|
|
123
|
+
readonly schemaVersion: 1;
|
|
124
|
+
readonly channelId: string;
|
|
125
|
+
readonly systemId: string;
|
|
126
|
+
readonly generation: number;
|
|
127
|
+
readonly dataDirectory: string;
|
|
128
|
+
readonly descriptors: readonly HostedProviderDescriptor[];
|
|
129
|
+
readonly client: HostedRuntimeClient;
|
|
130
|
+
}
|
|
131
|
+
/** Trusted fingerprinted worker code only, never a factory/module name supplied over RPC. */
|
|
132
|
+
interface HostedProxyFactory {
|
|
133
|
+
readonly id: string;
|
|
134
|
+
create(options: {
|
|
135
|
+
runner: ProcessRunner;
|
|
136
|
+
probeRunner: ProcessRunner;
|
|
137
|
+
}): ProviderRegistration;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
declare function hostedDigest(value: unknown): string;
|
|
141
|
+
|
|
142
|
+
declare function captureHostedDescriptor(input: unknown): HostedProviderDescriptor;
|
|
143
|
+
declare function captureHostedRequest(input: unknown): HostedRequest;
|
|
144
|
+
declare function captureHostedReply(input: unknown): HostedReply;
|
|
145
|
+
|
|
146
|
+
/** A per-run capture scope reuses this worker's negotiated providers, transport and admission port. */
|
|
147
|
+
declare function createHostedRunRuntime(parent: Runtime, capture: RuntimeCaptureOptions): Runtime;
|
|
148
|
+
declare function createHostedRuntime(input: HostedWorkerContext, options?: {
|
|
149
|
+
providers?: readonly HostedProxyFactory[];
|
|
150
|
+
}): Runtime;
|
|
151
|
+
|
|
152
|
+
declare function createRecipeMatcher(d: HostedProviderDescriptor): {
|
|
153
|
+
validate(options: Readonly<AgentOptions>): void;
|
|
154
|
+
probe: (env: NodeJS.ProcessEnv, turn?: ExecProbeTurn) => HostedRecipeDescriptor;
|
|
155
|
+
turn: (turn: ExecTurnRequest) => HostedRecipeDescriptor;
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* `priority: 'low'` makes every turn of this intent wait behind default turns for the host's admission
|
|
160
|
+
* (a rehearsal). It is the only accepted value: a caller can lower its own turns, never raise them.
|
|
161
|
+
*/
|
|
162
|
+
declare function withHostedTurnIntent<T>(runtime: Runtime, options: {
|
|
163
|
+
turnId?: string;
|
|
164
|
+
signal?: AbortSignal;
|
|
165
|
+
priority?: 'low';
|
|
166
|
+
}, work: () => T | Promise<T>): Promise<T>;
|
|
167
|
+
|
|
168
|
+
export { type HostedErrorCode, type HostedErrorWire, type HostedJson, type HostedProviderDescriptor, type HostedProxyFactory, type HostedRecipeDescriptor, type HostedReply, type HostedRequest, type HostedRuntimeClient, type HostedTurnPayload, type HostedWorkerContext, captureHostedDescriptor, captureHostedReply, captureHostedRequest, createHostedRunRuntime, createHostedRuntime, createRecipeMatcher, hostedDigest, withHostedTurnIntent };
|