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
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,90 @@
|
|
|
1
|
-
#
|
|
1
|
+
# HiveAgents Runtime
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Una sola API TypeScript para ejecutar los CLIs de IA que ya usás.** HiveAgents Runtime incluye Claude Code, Codex, Gemini CLI y Antigravity CLI en un único paquete. Usá un modelo fijo o dejá que el SDK elija entre los proveedores registrados según la tarea, su preparación y los permisos. Podés sumar otro CLI mediante la misma API de adaptadores y guardar checkpoints para retomar workflows.
|
|
4
|
+
|
|
5
|
+
Está pensado para equipos de herramientas internas, apps de escritorio y automatizaciones de desarrollo en macOS. Por ejemplo, una app puede recibir notas técnicas, procesar dos ramas en paralelo y guardar un informe. Si el proceso se interrumpe después de la ingesta, la app retoma desde los pasos pendientes.
|
|
6
|
+
|
|
7
|
+
**Estado.** Beta `0.1.0-beta.3`. Requiere Node.js 22.16 o posterior y una aplicación ESM. Los turnos reales requieren un CLI instalado y autenticado. La demo usa reglas locales y funciona con los paquetes ya instalados, sin CLI ni turnos de modelo. [Notas de la beta](docs/releases/0.1.0-beta.3.md)
|
|
8
|
+
|
|
9
|
+
## Probá qué se recupera
|
|
10
|
+
|
|
11
|
+
Desde la raíz del repositorio:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm ci
|
|
15
|
+
npm run build
|
|
16
|
+
state_dir=$(mktemp -d)
|
|
17
|
+
node --experimental-strip-types examples/08-document-triage.ts --state-dir "$state_dir" --stop-after-intake
|
|
18
|
+
node --experimental-strip-types examples/08-document-triage.ts --state-dir "$state_dir"
|
|
19
|
+
node --experimental-strip-types examples/08-document-triage.ts --state-dir "$state_dir"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Mirá `executedSteps`. La primera ejecución hace `intake` y se detiene. La segunda ejecuta `network`, `backups` y `report`. La tercera devuelve el informe guardado con `executedSteps: []`. Cada comando abre un proceso nuevo. [Ejemplos y datos de entrada](examples/README.md#document-triage-and-restart)
|
|
23
|
+
|
|
24
|
+
## Usalo en tu app
|
|
25
|
+
|
|
26
|
+
Desde una app ESM, instalá el SDK y ejecutá `doctor` para ver los cuatro proveedores. Cada CLI usa su binario y su cuenta local. Para construir el mismo paquete desde el repositorio usá `npm run verify:first-delivery` e instalá el `core.tgz` que genera.
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm install hiveagents-runtime@beta
|
|
30
|
+
npx --no-install hiveagents-runtime doctor
|
|
31
|
+
npx --no-install hiveagents-runtime capabilities --model opus-5
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`doctor` y `capabilities` inspeccionan la instalación sin lanzar un turno. La disponibilidad del ejecutable y una comprobación por ayuda del CLI dan información para diagnosticar. Un turno real verifica si el modelo funciona con tu cuenta y configuración. Con Claude Code instalado, guardá esto como `run.mjs` y ejecutá `node run.mjs` desde un directorio de trabajo confiable.
|
|
35
|
+
|
|
36
|
+
```js
|
|
37
|
+
import { Agent, AgentRuntimeError } from 'hiveagents-runtime';
|
|
38
|
+
|
|
39
|
+
const agent = new Agent({
|
|
40
|
+
model: 'opus-5',
|
|
41
|
+
transport: 'exec',
|
|
42
|
+
context: { profile: 'clean', memory: 'off' },
|
|
43
|
+
permissions: { mode: 'analyze' },
|
|
44
|
+
environment: { mode: 'minimal' },
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
try {
|
|
48
|
+
const turn = await agent.run('Identificá el comando que corre las pruebas del repositorio.');
|
|
49
|
+
console.log(turn.text, turn.usage);
|
|
50
|
+
} catch (error) {
|
|
51
|
+
if (!(error instanceof AgentRuntimeError)) throw error;
|
|
52
|
+
console.error(error.code, error.message);
|
|
53
|
+
process.exitCode = 1;
|
|
54
|
+
} finally {
|
|
55
|
+
await agent.close();
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Para Codex elegí un modelo que te muestre `doctor`, por ejemplo `codex/gpt-5.6-sol`, y cambiá el contexto a `{ profile: 'native', memory: 'off' }`. Codex exec rechaza el perfil `clean` estricto. El perfil nativo puede cargar instrucciones, hooks, plugins y MCP locales. Ejecutá turnos reales sobre contenido confiable y revisá los permisos efectivos de cada proveedor. [Guía de integración](docs/integration-guide.md#contexto-permisos-y-environment)
|
|
60
|
+
|
|
61
|
+
## Dejá que el SDK elija
|
|
62
|
+
|
|
63
|
+
`createAgent` de `hiveagents-runtime/routing` recorre los candidatos de los proveedores registrados, aplica las prioridades o reglas de la tarea y elige el primer modelo que pasa el preflight. Revisa instalación, autenticación, permisos y capacidades. Devuelve un agente listo para ejecutar y un recibo de la decisión. Para elegir con calidad y latencia medidas en tus propias tareas, usá `hiveagents-runtime/routing/learning`. [Ejemplo y filtros de selección](docs/integration-guide.md#selector-local-de-modelo)
|
|
64
|
+
|
|
65
|
+
## Elegí el módulo según tu problema
|
|
66
|
+
|
|
67
|
+
| Quiero… | Empezá con… |
|
|
68
|
+
| --- | --- |
|
|
69
|
+
| Ejecutar un agente, conservar una sesión, recibir eventos o pedir JSON validado | `hiveagents-runtime` |
|
|
70
|
+
| Reanudar trabajos, acotar admisión o verificar efectos | `hiveagents-runtime/orchestration` |
|
|
71
|
+
| Elegir un agente según reglas y disponibilidad antes de ejecutar | `hiveagents-runtime/routing` |
|
|
72
|
+
| Ejecutar un plan validado que varía por tarea | `hiveagents-runtime/orchestration/dynamic` |
|
|
73
|
+
| Persistir memoria, exponer herramientas de memoria o registrar un historial | [Mapa de módulos y evidencia](docs/modules.md) |
|
|
74
|
+
| Integrar otro CLI, usar Control o conectar un Host | [Guía de integración](docs/integration-guide.md) |
|
|
75
|
+
|
|
76
|
+
Empezá con `exec` para Claude Code o Codex. Control es experimental y se habilita por proveedor. Gemini y Antigravity están incluidos con pruebas de contrato offline y restricciones propias. Antigravity requiere `edit` explícito. [Capacidades por proveedor y transporte](docs/capability-matrix.md)
|
|
77
|
+
|
|
78
|
+
## Alcance
|
|
79
|
+
|
|
80
|
+
El código de la aplicación, la ejecución del CLI y los checkpoints viven en el entorno que controlás. La inferencia sigue el servicio y las condiciones de la autenticación del CLI. `analyze`, `clean` y un worktree tienen garantías diferentes. Para contenido no confiable, usá contención externa. Para efectos externos ambiguos, usá autorización, verificación y reconciliación desde la app. [Límites de ejecución](docs/runtime-execution-boundaries.md) · [Efectos y handoff](docs/harness.md)
|
|
81
|
+
|
|
82
|
+
## Documentación del repositorio
|
|
83
|
+
|
|
84
|
+
- [Integración](docs/integration-guide.md) para sesiones, streaming, esquemas, contexto y permisos.
|
|
85
|
+
- [Módulos y evidencia](docs/modules.md) para saber qué usar y qué podés verificar.
|
|
86
|
+
- [Orquestación](docs/orchestration.md) para workflows recuperables, memoria y planes dinámicos.
|
|
87
|
+
- [Mantenimiento y distribución](docs/release-checklist.md) para build, validación offline y empaquetado.
|
|
88
|
+
- [Mercado y usuarios](docs/product/market-and-adoption.md) para posicionamiento, perfiles e hipótesis de adopción.
|
|
89
|
+
|
|
90
|
+
Apache-2.0. [Licencia](LICENSE)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { P as ProcessRunner, E as ExecProbeContext } from './provider-DX5Mf0uq.js';
|
|
2
|
+
export { a as ExecProbeTurn, b as ProcessOutcome, c as ProcessRequest, r as runProcess } from './provider-DX5Mf0uq.js';
|
|
3
|
+
import { L as LaunchTarget, e as ProviderInstallation } from './types-DTFc1qO6.js';
|
|
4
|
+
export { r as resolveBinaryCandidates } from './types-DTFc1qO6.js';
|
|
5
|
+
export { a as AbortError, A as AgentRuntimeError, O as OutputLimitError, P as ProtocolError, T as TimeoutError } from './errors-BNHvvjn9.js';
|
|
6
|
+
export { E as ExecutionHaltedError, i as isExecutionHalted } from './execution-halt-B8G0fOKS.js';
|
|
7
|
+
|
|
8
|
+
/** Fall back only after an executable fails its version probe. Never switch accounts
|
|
9
|
+
* after an auth failure, override an explicit target, or expand the caller's PATH. */
|
|
10
|
+
declare class ExecDiscovery {
|
|
11
|
+
#private;
|
|
12
|
+
readonly name: string;
|
|
13
|
+
readonly runner: ProcessRunner;
|
|
14
|
+
readonly configured?: LaunchTarget | undefined;
|
|
15
|
+
constructor(name: string, runner: ProcessRunner, configured?: LaunchTarget | undefined);
|
|
16
|
+
target(env: NodeJS.ProcessEnv): LaunchTarget | undefined;
|
|
17
|
+
detect(env: NodeJS.ProcessEnv, context?: ExecProbeContext): Promise<ProviderInstallation>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
declare class IncrementalLineDecoder {
|
|
21
|
+
#private;
|
|
22
|
+
constructor(options?: {
|
|
23
|
+
maxBufferedBytes?: number;
|
|
24
|
+
});
|
|
25
|
+
/**
|
|
26
|
+
* A frame over the limit is terminal: the partial frame is discarded, the
|
|
27
|
+
* same error is rethrown for every later chunk, and the frame is never
|
|
28
|
+
* delivered when its newline finally arrives. Throwing once per chunk while
|
|
29
|
+
* keeping the buffer used to surface as one uncaught exception per chunk in
|
|
30
|
+
* the host and then hand the oversized frame to the consumer anyway.
|
|
31
|
+
*/
|
|
32
|
+
push(chunk: Uint8Array): string[];
|
|
33
|
+
assertHealthy(): void;
|
|
34
|
+
finish(): string[];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { ExecDiscovery, ExecProbeContext, IncrementalLineDecoder, LaunchTarget, ProcessRunner };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import "./chunk-6FIXXWNM.js";
|
|
2
|
+
import {
|
|
3
|
+
ExecDiscovery,
|
|
4
|
+
IncrementalLineDecoder,
|
|
5
|
+
resolveBinaryCandidates
|
|
6
|
+
} from "./chunk-RX3XZENU.js";
|
|
7
|
+
import {
|
|
8
|
+
runProcess
|
|
9
|
+
} from "./chunk-7LDQKJKI.js";
|
|
10
|
+
import {
|
|
11
|
+
ExecutionHaltedError,
|
|
12
|
+
isExecutionHalted
|
|
13
|
+
} from "./chunk-NCNSHOF7.js";
|
|
14
|
+
import {
|
|
15
|
+
AbortError,
|
|
16
|
+
AgentRuntimeError,
|
|
17
|
+
OutputLimitError,
|
|
18
|
+
ProtocolError,
|
|
19
|
+
TimeoutError
|
|
20
|
+
} from "./chunk-TG7NTMTR.js";
|
|
21
|
+
export {
|
|
22
|
+
AbortError,
|
|
23
|
+
AgentRuntimeError,
|
|
24
|
+
ExecDiscovery,
|
|
25
|
+
ExecutionHaltedError,
|
|
26
|
+
IncrementalLineDecoder,
|
|
27
|
+
OutputLimitError,
|
|
28
|
+
ProtocolError,
|
|
29
|
+
TimeoutError,
|
|
30
|
+
isExecutionHalted,
|
|
31
|
+
resolveBinaryCandidates,
|
|
32
|
+
runProcess
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=adapter-kit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { R as RunIdentity } from './types-BB7KqceP.js';
|
|
2
|
+
import { C as ControlSessionHandle, R as Runtime } from './runtime-BSjrnxeF.js';
|
|
3
|
+
import { n as PinnedOption, b as TransportKind, o as PinnedTurnNote, p as MemoryOption, q as AgentInput, P as ProviderId, s as MemoryTurnNote, a as Turn, h as AgentMemoryScope, M as ModelInfo, t as SessionPersistence, u as RuntimeWarning, C as CapabilitySupport, S as SessionRef, v as CapabilityStatus, w as SessionState, f as SessionIdentity, x as PersistedSessionRef, T as TurnOptions, y as TurnHandle, A as AgentEvent, F as ForkOptions, d as AgentOptions, z as AgentReadinessOptions, B as AgentReadiness, D as CapabilityReport, E as SessionOptions, O as OneShotOptions } from './types-DTFc1qO6.js';
|
|
4
|
+
import { d as ExecOperation, e as ExecAdapter } from './provider-DX5Mf0uq.js';
|
|
5
|
+
import { A as AgentLogCaptureBinding } from './capture-runtime-GP6NZ2ee.js';
|
|
6
|
+
|
|
7
|
+
/** What the Session knows about one turn that decides how the constraints are delivered. */
|
|
8
|
+
interface PinnedTurnInput {
|
|
9
|
+
modelId: string;
|
|
10
|
+
provider: string;
|
|
11
|
+
transport: TransportKind;
|
|
12
|
+
mode: ExecOperation | 'control';
|
|
13
|
+
cliVersion?: string;
|
|
14
|
+
instructions?: string;
|
|
15
|
+
providerOptions?: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
/** The turn's instruction channel as the constraints leave it, and the record of what happened. */
|
|
18
|
+
interface PinnedApplied {
|
|
19
|
+
instructions?: string;
|
|
20
|
+
providerOptions?: Record<string, unknown>;
|
|
21
|
+
note: PinnedTurnNote;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The pinned option of one Agent, shared by its sessions. It compiles the constraints for every
|
|
25
|
+
* turn from the store, remembers the versions earlier turns saw (so a store that later shows
|
|
26
|
+
* less stops the turn), and decides between delivery, refusal and a recorded opt-out.
|
|
27
|
+
*/
|
|
28
|
+
declare class PinnedTurns {
|
|
29
|
+
#private;
|
|
30
|
+
constructor(option: PinnedOption);
|
|
31
|
+
/** Reads, verifies and delivers for one turn. Throws before the CLI runs when it must not. */
|
|
32
|
+
apply(input: PinnedTurnInput): PinnedApplied;
|
|
33
|
+
/**
|
|
34
|
+
* The refusals `apply` would make now, without delivering or recording the versions seen: the
|
|
35
|
+
* pre-flight of a turn that recalls memory first. That turn calls `apply` once recall is done,
|
|
36
|
+
* so it runs with the constraints current when it starts, never older ones another turn saw.
|
|
37
|
+
*/
|
|
38
|
+
check(input: PinnedTurnInput): void;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Where the turn runs, as the recall request reports it. */
|
|
42
|
+
interface MemoryTurnContext {
|
|
43
|
+
provider: ProviderId;
|
|
44
|
+
transport: TransportKind;
|
|
45
|
+
cwd: string;
|
|
46
|
+
}
|
|
47
|
+
/** One turn's recall: the input the CLI receives and what memory did, for the session to record. */
|
|
48
|
+
interface RecalledTurn {
|
|
49
|
+
/** The turn input with the recalled block prepended, or the original input when nothing was recalled. */
|
|
50
|
+
readonly input: AgentInput;
|
|
51
|
+
/** Recorded on the turn by the session that completes it, before any log capture sees the turn. */
|
|
52
|
+
readonly note: MemoryTurnNote;
|
|
53
|
+
/**
|
|
54
|
+
* Schedules the capture of a completed turn once, owned by `owner` (the session whose `close()`
|
|
55
|
+
* waits for it), and returns the turn unchanged.
|
|
56
|
+
*/
|
|
57
|
+
finish(turn: Turn, owner: object): Turn;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The memory option of one Agent, shared by its sessions. Before a turn it asks the provider for
|
|
61
|
+
* a few items (and, alongside, for the scope's profile when it has one) and carries what fits as
|
|
62
|
+
* one reference block prepended to the input; after
|
|
63
|
+
* a completed turn, when asked, it hands the turn to the provider without delaying its result.
|
|
64
|
+
* Every failure is fail-open and recorded on the turn.
|
|
65
|
+
*/
|
|
66
|
+
declare class MemoryTurns {
|
|
67
|
+
#private;
|
|
68
|
+
constructor(option: MemoryOption);
|
|
69
|
+
/**
|
|
70
|
+
* Recalls for one turn, and reads the scope's profile alongside when the provider has one: both
|
|
71
|
+
* run at once, under one deadline and one signal. Never rejects: a provider that throws, times
|
|
72
|
+
* out, is cancelled or answers malformed data leaves the turn without what it failed to give and
|
|
73
|
+
* a note that says why. `capMs` bounds both below `recallTimeoutMs` (a share of the turn's own deadline).
|
|
74
|
+
*/
|
|
75
|
+
recall(input: AgentInput, context: MemoryTurnContext, signal: AbortSignal | undefined, capMs?: number): Promise<RecalledTurn>;
|
|
76
|
+
/**
|
|
77
|
+
* Waits for the pending captures of `owner`, or of every session when omitted; each is bounded.
|
|
78
|
+
* A capture nobody waits for never keeps the process alive; one that `close()` waits for does,
|
|
79
|
+
* until it settles or its own deadline passes, so the process cannot exit before `close()` returns.
|
|
80
|
+
*/
|
|
81
|
+
drain(owner?: object): Promise<void>;
|
|
82
|
+
/** What a digest may record of this memory: the provider's id and the scope, never a function. */
|
|
83
|
+
get identity(): {
|
|
84
|
+
provider: string;
|
|
85
|
+
scope: AgentMemoryScope;
|
|
86
|
+
};
|
|
87
|
+
/** Leaves `owner`'s pending captures to `drain()` without an owner (the Agent's close). */
|
|
88
|
+
forget(owner: object): void;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
interface SessionConfig {
|
|
92
|
+
capture?: AgentLogCaptureBinding;
|
|
93
|
+
adapter: ExecAdapter;
|
|
94
|
+
model: ModelInfo;
|
|
95
|
+
resolveModel?: (requested: string) => ModelInfo;
|
|
96
|
+
cwd: string;
|
|
97
|
+
transport: TransportKind;
|
|
98
|
+
persistence: SessionPersistence;
|
|
99
|
+
cliVersion?: string;
|
|
100
|
+
instructions?: string;
|
|
101
|
+
effort?: string;
|
|
102
|
+
contextArgs: string[];
|
|
103
|
+
permissionArgs: string[];
|
|
104
|
+
env: NodeJS.ProcessEnv;
|
|
105
|
+
warnings: RuntimeWarning[];
|
|
106
|
+
features: Record<string, CapabilitySupport>;
|
|
107
|
+
providerOptions?: Record<string, unknown>;
|
|
108
|
+
resume?: SessionRef;
|
|
109
|
+
/** Present only on a control transport; its absence keeps the exec path. */
|
|
110
|
+
control?: ControlSessionHandle;
|
|
111
|
+
/** Negotiated control verdicts; gates steering and other control-only operations. */
|
|
112
|
+
negotiated?: Record<string, CapabilityStatus>;
|
|
113
|
+
/** Present only when the Agent was given the `pinned` option; its absence changes nothing. */
|
|
114
|
+
pinned?: PinnedTurns;
|
|
115
|
+
/** Present only when the Agent has memory (its own option or the Runtime default); its absence changes nothing. */
|
|
116
|
+
memory?: MemoryTurns;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
declare class Session {
|
|
120
|
+
#private;
|
|
121
|
+
constructor(config: SessionConfig);
|
|
122
|
+
get state(): SessionState;
|
|
123
|
+
get provider(): ProviderId;
|
|
124
|
+
get ref(): SessionRef | undefined;
|
|
125
|
+
get identity(): SessionIdentity | undefined;
|
|
126
|
+
export(): PersistedSessionRef;
|
|
127
|
+
send(input: AgentInput, options?: TurnOptions): Promise<Turn>;
|
|
128
|
+
start(input: AgentInput, options?: TurnOptions): TurnHandle;
|
|
129
|
+
stream(input: AgentInput, options?: TurnOptions): AsyncIterable<AgentEvent>;
|
|
130
|
+
runOneShot(input: AgentInput, options?: TurnOptions): Promise<Turn>;
|
|
131
|
+
forkAndSend(input: AgentInput, options?: ForkOptions): Promise<{
|
|
132
|
+
session: Session;
|
|
133
|
+
turn: Turn;
|
|
134
|
+
}>;
|
|
135
|
+
/** Returns after native child identity is confirmed; its first turn remains live. */
|
|
136
|
+
startFork(input: AgentInput, options?: ForkOptions): Promise<{
|
|
137
|
+
session: Session;
|
|
138
|
+
turn: TurnHandle;
|
|
139
|
+
}>;
|
|
140
|
+
/** Forks and starts a turn; a confirmed child survives a failed turn. */
|
|
141
|
+
forkAndStart(input: AgentInput, options?: ForkOptions): Promise<{
|
|
142
|
+
session: Session;
|
|
143
|
+
turn: TurnHandle;
|
|
144
|
+
}>;
|
|
145
|
+
/** Injects input into the turn already running; control transports that negotiated steering only. */
|
|
146
|
+
steer(input: AgentInput): Promise<void>;
|
|
147
|
+
close(): Promise<void>;
|
|
148
|
+
reconcile(): Promise<SessionState>;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
declare class Agent {
|
|
152
|
+
#private;
|
|
153
|
+
readonly model: ModelInfo;
|
|
154
|
+
constructor(options: AgentOptions, runtime?: Runtime);
|
|
155
|
+
/** Logical capture identity of this actual Agent instance; never a dispatch authority. */
|
|
156
|
+
get logIdentity(): RunIdentity | undefined;
|
|
157
|
+
/** Options request fresh bounded readiness, independent of the default readiness cache. */
|
|
158
|
+
ready(options?: AgentReadinessOptions): Promise<AgentReadiness>;
|
|
159
|
+
capabilities(): Promise<CapabilityReport>;
|
|
160
|
+
openSession(options?: SessionOptions): Promise<Session>;
|
|
161
|
+
send(input: AgentInput, options?: TurnOptions): Promise<Turn>;
|
|
162
|
+
start(input: AgentInput, options?: TurnOptions): TurnHandle;
|
|
163
|
+
stream(input: AgentInput, options?: TurnOptions): AsyncIterable<AgentEvent>;
|
|
164
|
+
run(input: AgentInput, options?: OneShotOptions): Promise<Turn>;
|
|
165
|
+
/** Also waits for pending memory captures of every session of this Agent, each bounded by 10 s. */
|
|
166
|
+
close(): Promise<void>;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export { Agent as A, Session as S, type SessionConfig as a };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Agent
|
|
3
|
+
} from "./chunk-UZPDDQVJ.js";
|
|
4
|
+
import "./chunk-HZFZX5A3.js";
|
|
5
|
+
import "./chunk-WVT5SEKC.js";
|
|
6
|
+
import "./chunk-3TIYA3K5.js";
|
|
7
|
+
import "./chunk-2RK74GCA.js";
|
|
8
|
+
import "./chunk-J7VAYJKM.js";
|
|
9
|
+
import "./chunk-G6JV7WV6.js";
|
|
10
|
+
import "./chunk-6FIXXWNM.js";
|
|
11
|
+
import "./chunk-DAXPAV2L.js";
|
|
12
|
+
import "./chunk-6XIJW65Q.js";
|
|
13
|
+
import "./chunk-RXU2Q2HF.js";
|
|
14
|
+
import "./chunk-TWGEYWMO.js";
|
|
15
|
+
import "./chunk-GS5U3KUN.js";
|
|
16
|
+
import "./chunk-EEUYQFCP.js";
|
|
17
|
+
import "./chunk-RX3XZENU.js";
|
|
18
|
+
import "./chunk-7LDQKJKI.js";
|
|
19
|
+
import "./chunk-NCNSHOF7.js";
|
|
20
|
+
import "./chunk-TG7NTMTR.js";
|
|
21
|
+
export {
|
|
22
|
+
Agent
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=agent-D6OXR7UF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
agentEnvironment,
|
|
3
|
+
agentTransport,
|
|
4
|
+
freshAgentReadiness,
|
|
5
|
+
prepareAgent
|
|
6
|
+
} from "./chunk-WVT5SEKC.js";
|
|
7
|
+
import "./chunk-3TIYA3K5.js";
|
|
8
|
+
import "./chunk-G6JV7WV6.js";
|
|
9
|
+
import "./chunk-EEUYQFCP.js";
|
|
10
|
+
import "./chunk-7LDQKJKI.js";
|
|
11
|
+
import "./chunk-NCNSHOF7.js";
|
|
12
|
+
import "./chunk-TG7NTMTR.js";
|
|
13
|
+
export {
|
|
14
|
+
agentEnvironment,
|
|
15
|
+
agentTransport,
|
|
16
|
+
freshAgentReadiness,
|
|
17
|
+
prepareAgent
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=agent-readiness-KSGNKTGK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { A as AgentEvent, U as Usage, M as ModelInfo, b as TransportKind, f as SessionIdentity } from './types-DTFc1qO6.js';
|
|
2
|
+
import { b as LogReceipt, c as LogCommit, R as RunIdentity } from './types-BB7KqceP.js';
|
|
3
|
+
|
|
4
|
+
interface RequiredLogCaptureOptions {
|
|
5
|
+
readonly store: {
|
|
6
|
+
append(commit: LogCommit): Promise<LogReceipt>;
|
|
7
|
+
};
|
|
8
|
+
readonly identity: RunIdentity;
|
|
9
|
+
readonly actual: {
|
|
10
|
+
readonly provider: string;
|
|
11
|
+
readonly model?: string;
|
|
12
|
+
readonly attemptId: string;
|
|
13
|
+
readonly transport?: 'exec' | 'control';
|
|
14
|
+
readonly phase?: 'startup' | 'turn';
|
|
15
|
+
readonly sessionId?: string;
|
|
16
|
+
readonly transportEpoch?: string;
|
|
17
|
+
};
|
|
18
|
+
readonly maxPending?: number;
|
|
19
|
+
readonly maxWriteMs?: number;
|
|
20
|
+
readonly signal?: AbortSignal;
|
|
21
|
+
}
|
|
22
|
+
interface RequiredLogCapture {
|
|
23
|
+
run<T>(work: () => Promise<T>): Promise<T>;
|
|
24
|
+
observe(event: AgentEvent): Promise<LogReceipt>;
|
|
25
|
+
drain(): Promise<void>;
|
|
26
|
+
recordUsage(usage: Usage): void;
|
|
27
|
+
markInterrupted(): void;
|
|
28
|
+
readonly signal: AbortSignal;
|
|
29
|
+
snapshot(): Readonly<{
|
|
30
|
+
state: 'idle' | 'starting' | 'running' | 'draining' | 'settled' | 'halted';
|
|
31
|
+
pending: number;
|
|
32
|
+
maxPending: number;
|
|
33
|
+
mode: 'metadata-only';
|
|
34
|
+
textReconstruction: 'unavailable';
|
|
35
|
+
}>;
|
|
36
|
+
}
|
|
37
|
+
/** Awaited capture boundary. Completion means only this observed invocation settled, never a business postcondition. */
|
|
38
|
+
declare function createRequiredLogCapture(options: RequiredLogCaptureOptions): RequiredLogCapture;
|
|
39
|
+
|
|
40
|
+
interface RuntimeCaptureOptions {
|
|
41
|
+
readonly store: {
|
|
42
|
+
append(commit: LogCommit): Promise<LogReceipt>;
|
|
43
|
+
};
|
|
44
|
+
readonly identity: RunIdentity;
|
|
45
|
+
readonly maxPending?: number;
|
|
46
|
+
readonly maxWriteMs?: number;
|
|
47
|
+
}
|
|
48
|
+
interface AgentLogCaptureBinding {
|
|
49
|
+
readonly identity: RunIdentity;
|
|
50
|
+
assertActive(): void;
|
|
51
|
+
create(model: ModelInfo, transport: TransportKind, phase: 'startup' | 'turn', signal?: AbortSignal, session?: SessionIdentity): RequiredLogCapture;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { type AgentLogCaptureBinding as A, type RuntimeCaptureOptions as R, type RequiredLogCapture as a, type RequiredLogCaptureOptions as b, createRequiredLogCapture as c };
|