@alneas/eaos-server 0.1.0 → 0.2.0
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/CHANGELOG.md +20 -0
- package/README.ja.md +28 -18
- package/README.md +8 -2
- package/dist/agentic/agent-jobs.d.ts +5 -1
- package/dist/agentic/autonomous-worker.d.ts +30 -3
- package/dist/agentic/autonomous-worker.js +2 -1
- package/dist/agentic/event-bridge.d.ts +6 -0
- package/dist/agentic/index.d.ts +7 -3
- package/dist/agentic/index.js +2 -1
- package/dist/agentic/local-runner.d.ts +6 -2
- package/dist/chunk-4BARRLJR.js +180 -0
- package/dist/chunk-4BARRLJR.js.map +1 -0
- package/dist/{chunk-THYUY5ZZ.js → chunk-F2J6IQ6I.js} +68 -25
- package/dist/chunk-F2J6IQ6I.js.map +1 -0
- package/dist/{chunk-6KV5CJBW.js → chunk-F4IITPGX.js} +5 -5
- package/dist/{chunk-DHQGNP4T.js → chunk-SDJNYPYK.js} +2 -2
- package/dist/{chunk-DHQGNP4T.js.map → chunk-SDJNYPYK.js.map} +1 -1
- package/dist/chunk-YMHVRBUU.js +199 -0
- package/dist/chunk-YMHVRBUU.js.map +1 -0
- package/dist/db-package/index.js +3 -3
- package/dist/engine.js +2 -2
- package/dist/execution/chat.d.ts +7 -0
- package/dist/execution/chat.js +7 -0
- package/dist/execution/chat.js.map +1 -0
- package/dist/execution/index.d.ts +294 -2
- package/dist/execution/index.js +10 -1
- package/dist/execution/index.js.map +1 -1
- package/dist/execution/tool-agent.d.ts +7 -0
- package/dist/execution/tool-agent.js +8 -0
- package/dist/execution/tool-agent.js.map +1 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +4 -3
- package/dist/lifecycle-engine/backend-migration.js +1 -1
- package/dist/lifecycle-engine/baseline.js +1 -1
- package/dist/lifecycle-engine/index.js +1 -1
- package/dist/lifecycle-engine/platform/index.js +8 -8
- package/dist/sql-lifecycle/index.d.ts +1 -1
- package/docs/api.md +809 -2
- package/docs/guide.md +44 -0
- package/docs/index.md +6 -2
- package/package.json +12 -3
- package/dist/chunk-THYUY5ZZ.js.map +0 -1
- /package/dist/{chunk-6KV5CJBW.js.map → chunk-F4IITPGX.js.map} +0 -0
package/docs/api.md
CHANGED
|
@@ -89,6 +89,8 @@ tags: ["api", "generated"]
|
|
|
89
89
|
| `@alneas/eaos-server/workspace-context` | Typed public export |
|
|
90
90
|
| `@alneas/eaos-server/entitlements` | Typed public export |
|
|
91
91
|
| `@alneas/eaos-server/plugin-sdk` | Typed public export |
|
|
92
|
+
| `@alneas/eaos-server/execution/chat` | Typed public export |
|
|
93
|
+
| `@alneas/eaos-server/execution/tool-agent` | Typed public export |
|
|
92
94
|
|
|
93
95
|
<a id="api-AccessFrequencyRecord"></a>
|
|
94
96
|
|
|
@@ -1709,6 +1711,55 @@ export async function failClaimedJob(
|
|
|
1709
1711
|
|
|
1710
1712
|
|
|
1711
1713
|
|
|
1714
|
+
### Example
|
|
1715
|
+
|
|
1716
|
+
See the owning declaration and linked feature guide for usage; no standalone example is documented in source.
|
|
1717
|
+
|
|
1718
|
+
<a id="api-AgentTool"></a>
|
|
1719
|
+
|
|
1720
|
+
## [INTERFACE] `AgentTool`
|
|
1721
|
+
|
|
1722
|
+
Host-registered Action binding and explicit automatic-execution policy.
|
|
1723
|
+
|
|
1724
|
+
Imports: `@alneas/eaos-server/execution`, `@alneas/eaos-server/execution/tool-agent`.
|
|
1725
|
+
|
|
1726
|
+
### Signature
|
|
1727
|
+
|
|
1728
|
+
```typescript
|
|
1729
|
+
interface AgentTool {
|
|
1730
|
+
binding: ActionToolBinding;
|
|
1731
|
+
mode: 'read' | 'handoff';
|
|
1732
|
+
}
|
|
1733
|
+
```
|
|
1734
|
+
|
|
1735
|
+
### Parameters
|
|
1736
|
+
|
|
1737
|
+
| Name | Type | Required | Description |
|
|
1738
|
+
| --- | --- | --- | --- |
|
|
1739
|
+
| `binding` | `ActionToolBinding` | Yes | Existing Appkit Action/command binding; registration and input/output schemas remain Appkit-owned. |
|
|
1740
|
+
| `mode` | `'read' \| 'handoff'` | Yes | Only host-verified read-only actions may run automatically; handoffs remain unexecuted. |
|
|
1741
|
+
|
|
1742
|
+
### Returns
|
|
1743
|
+
|
|
1744
|
+
Type declaration; no runtime value.
|
|
1745
|
+
|
|
1746
|
+
### See also
|
|
1747
|
+
|
|
1748
|
+
createToolAgent
|
|
1749
|
+
|
|
1750
|
+
### Public members
|
|
1751
|
+
|
|
1752
|
+
#### `binding`
|
|
1753
|
+
|
|
1754
|
+
Existing Appkit Action/command binding; registration and input/output schemas remain Appkit-owned.
|
|
1755
|
+
|
|
1756
|
+
|
|
1757
|
+
#### `mode`
|
|
1758
|
+
|
|
1759
|
+
Only host-verified read-only actions may run automatically; handoffs remain unexecuted.
|
|
1760
|
+
|
|
1761
|
+
|
|
1762
|
+
|
|
1712
1763
|
### Example
|
|
1713
1764
|
|
|
1714
1765
|
See the owning declaration and linked feature guide for usage; no standalone example is documented in source.
|
|
@@ -5111,6 +5162,275 @@ const serialized = canonical({ b: [2, 1], a: true });
|
|
|
5111
5162
|
```
|
|
5112
5163
|
|
|
5113
5164
|
|
|
5165
|
+
<a id="api-ChatClientOptions"></a>
|
|
5166
|
+
|
|
5167
|
+
## [INTERFACE] `ChatClientOptions`
|
|
5168
|
+
|
|
5169
|
+
Host-configured adapter, current admission and bounded chat policy.
|
|
5170
|
+
|
|
5171
|
+
Imports: `@alneas/eaos-server/execution`, `@alneas/eaos-server/execution/chat`.
|
|
5172
|
+
|
|
5173
|
+
### Signature
|
|
5174
|
+
|
|
5175
|
+
```typescript
|
|
5176
|
+
interface ChatClientOptions extends ExecutionPolicy {
|
|
5177
|
+
adapter: AIChatAdapter;
|
|
5178
|
+
parameters?: ActionToolObject;
|
|
5179
|
+
tools?(principal: ExecutionPrincipal): Promise<readonly ActionToolDescriptor[]>;
|
|
5180
|
+
timeoutMs?: number;
|
|
5181
|
+
maxInputChars?: number;
|
|
5182
|
+
maxOutputChars?: number;
|
|
5183
|
+
maxEvents?: number;
|
|
5184
|
+
modelRegistry?: AIModelRegistry;
|
|
5185
|
+
modelAdapters?: Readonly<Record<string, AIChatAdapter>>;
|
|
5186
|
+
governance?: ChatGovernanceOptions;
|
|
5187
|
+
}
|
|
5188
|
+
```
|
|
5189
|
+
|
|
5190
|
+
### Parameters
|
|
5191
|
+
|
|
5192
|
+
| Name | Type | Required | Description |
|
|
5193
|
+
| --- | --- | --- | --- |
|
|
5194
|
+
| `adapter` | `AIChatAdapter` | Yes | Existing Appkit transport configured with the host endpoint, model and credentials. |
|
|
5195
|
+
| `parameters` | `ActionToolObject` | No | Host-owned provider parameters cloned at creation; model/messages/tools/stream keys are reserved and rejected. |
|
|
5196
|
+
| `tools` | `Promise<readonly ActionToolDescriptor[]>` | No | Resolve descriptors only when the caller explicitly requests tools: catalog. |
|
|
5197
|
+
| `timeoutMs` | `number` | No | Positive integer deadline in milliseconds; default 30000, maximum 3600000. |
|
|
5198
|
+
| `maxInputChars` | `number` | No | Serialized request character ceiling; default 200000, maximum 7000000. |
|
|
5199
|
+
| `maxOutputChars` | `number` | No | Serialized event and final assistant-message character ceiling; default 100000, maximum 10000000. |
|
|
5200
|
+
| `maxEvents` | `number` | No | Maximum stream event count; default 10000, maximum 100000. |
|
|
5201
|
+
| `modelRegistry` | `AIModelRegistry` | No | Host-approved route registry; requests cannot select a model or bypass sensitivity limits. |
|
|
5202
|
+
| `modelAdapters` | `Readonly<Record<string, AIChatAdapter>>` | No | Required with modelRegistry: host-approved logical model to configured adapter bindings, snapshotted at creation. |
|
|
5203
|
+
| `governance` | `ChatGovernanceOptions` | No | Optional host guards, budgets and telemetry; final current authorization follows their completion. |
|
|
5204
|
+
|
|
5205
|
+
### Returns
|
|
5206
|
+
|
|
5207
|
+
Type declaration; no runtime value.
|
|
5208
|
+
|
|
5209
|
+
### See also
|
|
5210
|
+
|
|
5211
|
+
createChatClient
|
|
5212
|
+
|
|
5213
|
+
### Public members
|
|
5214
|
+
|
|
5215
|
+
#### `adapter`
|
|
5216
|
+
|
|
5217
|
+
Existing Appkit transport configured with the host endpoint, model and credentials.
|
|
5218
|
+
|
|
5219
|
+
|
|
5220
|
+
#### `parameters`
|
|
5221
|
+
|
|
5222
|
+
Host-owned provider parameters cloned at creation; model/messages/tools/stream keys are reserved and rejected.
|
|
5223
|
+
|
|
5224
|
+
|
|
5225
|
+
#### `tools`
|
|
5226
|
+
|
|
5227
|
+
Resolve descriptors only when the caller explicitly requests tools: catalog.
|
|
5228
|
+
|
|
5229
|
+
Parameters:
|
|
5230
|
+
|
|
5231
|
+
- `principal`: Copied verified actor whose current disclosure permission the host must check.
|
|
5232
|
+
|
|
5233
|
+
Returns: At most 100 unique descriptors; omission advertises no tools.
|
|
5234
|
+
|
|
5235
|
+
### Errors and rejections
|
|
5236
|
+
|
|
5237
|
+
Host resolution failures reject completion before the provider starts.
|
|
5238
|
+
|
|
5239
|
+
Example:
|
|
5240
|
+
|
|
5241
|
+
```typescript
|
|
5242
|
+
import type { ChatClientOptions } from '@alneas/eaos-server/execution/chat';
|
|
5243
|
+
export function disclosedTools(resolve: NonNullable<ChatClientOptions['tools']>) { return resolve; }
|
|
5244
|
+
```
|
|
5245
|
+
|
|
5246
|
+
|
|
5247
|
+
#### `timeoutMs`
|
|
5248
|
+
|
|
5249
|
+
Positive integer deadline in milliseconds; default 30000, maximum 3600000.
|
|
5250
|
+
|
|
5251
|
+
|
|
5252
|
+
#### `maxInputChars`
|
|
5253
|
+
|
|
5254
|
+
Serialized request character ceiling; default 200000, maximum 7000000.
|
|
5255
|
+
|
|
5256
|
+
|
|
5257
|
+
#### `maxOutputChars`
|
|
5258
|
+
|
|
5259
|
+
Serialized event and final assistant-message character ceiling; default 100000, maximum 10000000.
|
|
5260
|
+
|
|
5261
|
+
|
|
5262
|
+
#### `maxEvents`
|
|
5263
|
+
|
|
5264
|
+
Maximum stream event count; default 10000, maximum 100000.
|
|
5265
|
+
|
|
5266
|
+
|
|
5267
|
+
#### `modelRegistry`
|
|
5268
|
+
|
|
5269
|
+
Host-approved route registry; requests cannot select a model or bypass sensitivity limits.
|
|
5270
|
+
|
|
5271
|
+
|
|
5272
|
+
#### `modelAdapters`
|
|
5273
|
+
|
|
5274
|
+
Required with modelRegistry: host-approved logical model to configured adapter bindings, snapshotted at creation.
|
|
5275
|
+
|
|
5276
|
+
|
|
5277
|
+
#### `governance`
|
|
5278
|
+
|
|
5279
|
+
Optional host guards, budgets and telemetry; final current authorization follows their completion.
|
|
5280
|
+
|
|
5281
|
+
|
|
5282
|
+
|
|
5283
|
+
### Example
|
|
5284
|
+
|
|
5285
|
+
See the owning declaration and linked feature guide for usage; no standalone example is documented in source.
|
|
5286
|
+
|
|
5287
|
+
<a id="api-ChatCompletion"></a>
|
|
5288
|
+
|
|
5289
|
+
## [INTERFACE] `ChatCompletion`
|
|
5290
|
+
|
|
5291
|
+
Completed assistant message and optional host-governance metadata.
|
|
5292
|
+
|
|
5293
|
+
Imports: `@alneas/eaos-server/execution`, `@alneas/eaos-server/execution/chat`.
|
|
5294
|
+
|
|
5295
|
+
### Signature
|
|
5296
|
+
|
|
5297
|
+
```typescript
|
|
5298
|
+
interface ChatCompletion {
|
|
5299
|
+
message: AIChatMessage;
|
|
5300
|
+
finishReason: 'stop' | 'tool-calls';
|
|
5301
|
+
traceId?: string;
|
|
5302
|
+
usage?: AIUsage;
|
|
5303
|
+
sensitivityLevel?: AIExecutionContext['sensitivityLevel'];
|
|
5304
|
+
}
|
|
5305
|
+
```
|
|
5306
|
+
|
|
5307
|
+
### Parameters
|
|
5308
|
+
|
|
5309
|
+
| Name | Type | Required | Description |
|
|
5310
|
+
| --- | --- | --- | --- |
|
|
5311
|
+
| `message` | `AIChatMessage` | Yes | Detached assistant response; tool-call parts are unexecuted requests. |
|
|
5312
|
+
| `finishReason` | `'stop' \| 'tool-calls'` | Yes | Successful provider finish reason; truncated or inconsistent streams reject. |
|
|
5313
|
+
| `traceId` | `string` | No | Unique request trace identity generated before governance callbacks. |
|
|
5314
|
+
| `usage` | `AIUsage` | No | Recognized nonnegative adapter metadata; undefined means unknown, including Appkit OpenAI SSE without usage events. |
|
|
5315
|
+
| `sensitivityLevel` | `AIExecutionContext['sensitivityLevel']` | No | Sensitivity label supplied by the input guard. |
|
|
5316
|
+
|
|
5317
|
+
### Returns
|
|
5318
|
+
|
|
5319
|
+
Type declaration; no runtime value.
|
|
5320
|
+
|
|
5321
|
+
### See also
|
|
5322
|
+
|
|
5323
|
+
createChatClient
|
|
5324
|
+
|
|
5325
|
+
### Public members
|
|
5326
|
+
|
|
5327
|
+
#### `message`
|
|
5328
|
+
|
|
5329
|
+
Detached assistant response; tool-call parts are unexecuted requests.
|
|
5330
|
+
|
|
5331
|
+
|
|
5332
|
+
#### `finishReason`
|
|
5333
|
+
|
|
5334
|
+
Successful provider finish reason; truncated or inconsistent streams reject.
|
|
5335
|
+
|
|
5336
|
+
|
|
5337
|
+
#### `traceId`
|
|
5338
|
+
|
|
5339
|
+
Unique request trace identity generated before governance callbacks.
|
|
5340
|
+
|
|
5341
|
+
|
|
5342
|
+
#### `usage`
|
|
5343
|
+
|
|
5344
|
+
Recognized nonnegative adapter metadata; undefined means unknown, including Appkit OpenAI SSE without usage events.
|
|
5345
|
+
|
|
5346
|
+
|
|
5347
|
+
#### `sensitivityLevel`
|
|
5348
|
+
|
|
5349
|
+
Sensitivity label supplied by the input guard.
|
|
5350
|
+
|
|
5351
|
+
|
|
5352
|
+
|
|
5353
|
+
### Example
|
|
5354
|
+
|
|
5355
|
+
See the owning declaration and linked feature guide for usage; no standalone example is documented in source.
|
|
5356
|
+
|
|
5357
|
+
<a id="api-ChatGovernanceOptions"></a>
|
|
5358
|
+
|
|
5359
|
+
## [INTERFACE] `ChatGovernanceOptions`
|
|
5360
|
+
|
|
5361
|
+
Host-injected model guards, usage budgets and telemetry.
|
|
5362
|
+
|
|
5363
|
+
Imports: `@alneas/eaos-server/execution`, `@alneas/eaos-server/execution/chat`.
|
|
5364
|
+
|
|
5365
|
+
### Signature
|
|
5366
|
+
|
|
5367
|
+
```typescript
|
|
5368
|
+
interface ChatGovernanceOptions {
|
|
5369
|
+
guard?: AIGuard;
|
|
5370
|
+
budget?: AIBudgetGate;
|
|
5371
|
+
observability?: AIObservabilitySink;
|
|
5372
|
+
operation?: string;
|
|
5373
|
+
model?: string;
|
|
5374
|
+
sessionId?: string;
|
|
5375
|
+
}
|
|
5376
|
+
```
|
|
5377
|
+
|
|
5378
|
+
### Parameters
|
|
5379
|
+
|
|
5380
|
+
| Name | Type | Required | Description |
|
|
5381
|
+
| --- | --- | --- | --- |
|
|
5382
|
+
| `guard` | `AIGuard` | No | Optional pre-input and post-output checks; replacement messages remain host-owned. |
|
|
5383
|
+
| `budget` | `AIBudgetGate` | No | Optional request admission and once-per-started-attempt accounting; accounting failures propagate. |
|
|
5384
|
+
| `observability` | `AIObservabilitySink` | No | Awaited started/event/completed telemetry within the deadline; sink errors are ignored. |
|
|
5385
|
+
| `operation` | `string` | No | Telemetry operation label; authorization always checks model:chat. |
|
|
5386
|
+
| `model` | `string` | No | Host-selected registry model ID; without a registry this is metadata, not provider selection. |
|
|
5387
|
+
| `sessionId` | `string` | No | Optional host session identity recorded in governance context. |
|
|
5388
|
+
|
|
5389
|
+
### Returns
|
|
5390
|
+
|
|
5391
|
+
Type declaration; no runtime value.
|
|
5392
|
+
|
|
5393
|
+
### See also
|
|
5394
|
+
|
|
5395
|
+
createChatClient
|
|
5396
|
+
|
|
5397
|
+
### Public members
|
|
5398
|
+
|
|
5399
|
+
#### `guard`
|
|
5400
|
+
|
|
5401
|
+
Optional pre-input and post-output checks; replacement messages remain host-owned.
|
|
5402
|
+
|
|
5403
|
+
|
|
5404
|
+
#### `budget`
|
|
5405
|
+
|
|
5406
|
+
Optional request admission and once-per-started-attempt accounting; accounting failures propagate.
|
|
5407
|
+
|
|
5408
|
+
|
|
5409
|
+
#### `observability`
|
|
5410
|
+
|
|
5411
|
+
Awaited started/event/completed telemetry within the deadline; sink errors are ignored.
|
|
5412
|
+
|
|
5413
|
+
|
|
5414
|
+
#### `operation`
|
|
5415
|
+
|
|
5416
|
+
Telemetry operation label; authorization always checks model:chat.
|
|
5417
|
+
|
|
5418
|
+
|
|
5419
|
+
#### `model`
|
|
5420
|
+
|
|
5421
|
+
Host-selected registry model ID; without a registry this is metadata, not provider selection.
|
|
5422
|
+
|
|
5423
|
+
|
|
5424
|
+
#### `sessionId`
|
|
5425
|
+
|
|
5426
|
+
Optional host session identity recorded in governance context.
|
|
5427
|
+
|
|
5428
|
+
|
|
5429
|
+
|
|
5430
|
+
### Example
|
|
5431
|
+
|
|
5432
|
+
See the owning declaration and linked feature guide for usage; no standalone example is documented in source.
|
|
5433
|
+
|
|
5114
5434
|
<a id="api-CloudflareD1Binding"></a>
|
|
5115
5435
|
|
|
5116
5436
|
## [INTERFACE] `CloudflareD1Binding`
|
|
@@ -6812,6 +7132,67 @@ export function authRouter(resolveSession: (context: Context) => Promise<Browser
|
|
|
6812
7132
|
```
|
|
6813
7133
|
|
|
6814
7134
|
|
|
7135
|
+
<a id="api-createChatClient"></a>
|
|
7136
|
+
|
|
7137
|
+
## [FUNCTION] `createChatClient`
|
|
7138
|
+
|
|
7139
|
+
Complete scoped chat through the existing Appkit adapter with live admission and host governance.
|
|
7140
|
+
|
|
7141
|
+
Imports: `@alneas/eaos-server/execution`, `@alneas/eaos-server/execution/chat`.
|
|
7142
|
+
|
|
7143
|
+
### Signature
|
|
7144
|
+
|
|
7145
|
+
```typescript
|
|
7146
|
+
declare function createChatClient(options: ChatClientOptions): {
|
|
7147
|
+
complete(principal: ExecutionPrincipal, input: {
|
|
7148
|
+
messages: readonly AIChatMessage[];
|
|
7149
|
+
signal?: AbortSignal;
|
|
7150
|
+
tools?: "none" | "catalog";
|
|
7151
|
+
}): Promise<ChatCompletion>;
|
|
7152
|
+
};
|
|
7153
|
+
```
|
|
7154
|
+
|
|
7155
|
+
### Parameters
|
|
7156
|
+
|
|
7157
|
+
| Name | Type | Required | Description |
|
|
7158
|
+
| --- | --- | --- | --- |
|
|
7159
|
+
| `options` | `ChatClientOptions` | Yes | Trusted adapter, current authorization, optional routes/governance and bounded limits. |
|
|
7160
|
+
|
|
7161
|
+
### Returns
|
|
7162
|
+
|
|
7163
|
+
`{ complete(principal: ExecutionPrincipal, input: { messages: readonly AIChatMessage[]; signal?: AbortSignal; tools?: "none" \| "catalog"; }): Promise<ChatCompletion>; }`
|
|
7164
|
+
|
|
7165
|
+
A client whose complete method returns detached, finally authorized assistant data.
|
|
7166
|
+
|
|
7167
|
+
### Remarks
|
|
7168
|
+
|
|
7169
|
+
Every completion authorizes model:chat before disclosure, between events and after awaited
|
|
7170
|
+
output guard, usage recording and completion telemetry. This client never executes model tool calls.
|
|
7171
|
+
The host must configure real endpoint credentials in the Appkit adapter. Abort is cooperative for a
|
|
7172
|
+
custom transport; the request promise remains bounded even if its iterator ignores cancellation.
|
|
7173
|
+
With modelRegistry, provide modelAdapters mapping each approved logical model to its host-configured
|
|
7174
|
+
Appkit adapter; generic adapter IDs alone do not select or prove the provider model. Binding entries
|
|
7175
|
+
and stream methods are snapshotted at creation. Reserved transport parameters are rejected in 0.2.
|
|
7176
|
+
Accounting runs once after each started adapter attempt, including output blocks, revocation and provider
|
|
7177
|
+
failure. Unknown usage is passed as undefined, never zero. Appkit's OpenAI SSE adapter currently emits
|
|
7178
|
+
no usage metadata event even for provider include_usage chunks; hosts must reconcile measured usage
|
|
7179
|
+
through their existing accounting port using trace/session context. Accounting callback errors reject
|
|
7180
|
+
completion in 0.2; a stalled callback remains bounded by the request deadline.
|
|
7181
|
+
|
|
7182
|
+
### Errors and rejections
|
|
7183
|
+
|
|
7184
|
+
Rejects invalid limits or missing adapter/policy during construction. Completion rejects
|
|
7185
|
+
invalid histories/catalogs, denied or revoked admission, guard/budget/route denial, provider failures,
|
|
7186
|
+
incomplete streams, exceeded limits, cancellation, deadline expiry and host accounting failure. Telemetry errors are ignored.
|
|
7187
|
+
|
|
7188
|
+
### Example
|
|
7189
|
+
|
|
7190
|
+
```typescript
|
|
7191
|
+
import { createChatClient, type ChatClientOptions } from '@alneas/eaos-server/execution/chat';
|
|
7192
|
+
export function connectChat(options: ChatClientOptions) { return createChatClient(options); }
|
|
7193
|
+
```
|
|
7194
|
+
|
|
7195
|
+
|
|
6815
7196
|
<a id="api-createCloudflareD1Driver"></a>
|
|
6816
7197
|
|
|
6817
7198
|
## [FUNCTION] `createCloudflareD1Driver`
|
|
@@ -8709,6 +9090,62 @@ export function pluginStorage(adapter: StorageAdapter, trustedOptions: TenantSto
|
|
|
8709
9090
|
```
|
|
8710
9091
|
|
|
8711
9092
|
|
|
9093
|
+
<a id="api-createToolAgent"></a>
|
|
9094
|
+
|
|
9095
|
+
## [FUNCTION] `createToolAgent`
|
|
9096
|
+
|
|
9097
|
+
Orchestrate bounded model rounds through existing Appkit Action/Execution and scoped EAOS chat.
|
|
9098
|
+
|
|
9099
|
+
Imports: `@alneas/eaos-server/execution`, `@alneas/eaos-server/execution/tool-agent`.
|
|
9100
|
+
|
|
9101
|
+
### Signature
|
|
9102
|
+
|
|
9103
|
+
```typescript
|
|
9104
|
+
declare function createToolAgent(options: ToolAgentOptions): {
|
|
9105
|
+
cancel: () => void;
|
|
9106
|
+
getSnapshot: () => readonly _alneas_appkit_core_ai.ExecutionRecord[];
|
|
9107
|
+
subscribe: (listener: () => void) => () => void;
|
|
9108
|
+
close: () => void;
|
|
9109
|
+
run(principal: ExecutionPrincipal, input: {
|
|
9110
|
+
messages: readonly AIChatMessage[];
|
|
9111
|
+
signal?: AbortSignal;
|
|
9112
|
+
}): Promise<_alneas_appkit_core_ai.ExecutionOutcome<ToolAgentResult>>;
|
|
9113
|
+
};
|
|
9114
|
+
```
|
|
9115
|
+
|
|
9116
|
+
### Parameters
|
|
9117
|
+
|
|
9118
|
+
| Name | Type | Required | Description |
|
|
9119
|
+
| --- | --- | --- | --- |
|
|
9120
|
+
| `options` | `ToolAgentOptions` | Yes | Current session/disclosure/call policies, Appkit adapter and chat/round/call limits. |
|
|
9121
|
+
|
|
9122
|
+
### Returns
|
|
9123
|
+
|
|
9124
|
+
`{ cancel: () => void; getSnapshot: () => readonly _alneas_appkit_core_ai.ExecutionRecord[]; subscribe: (listener: () => void) => () => void; close: () => void; run(principal: ExecutionPrincipal, input: { messages: readonly AIChatMessage[]; signal?: AbortSignal; }): Promise<_alneas_appkit_core_ai.ExecutionOutcome<ToolAgentResult>>; }`
|
|
9125
|
+
|
|
9126
|
+
Single-flight run, cancel, close and summary subscription methods backed by Appkit ExecutionSession.
|
|
9127
|
+
|
|
9128
|
+
### Remarks
|
|
9129
|
+
|
|
9130
|
+
Only explicitly host-verified read tools execute automatically. A batch containing any handoff
|
|
9131
|
+
returns all its calls without executing them. No durable command engine, approval grant or transaction
|
|
9132
|
+
is created; retained tool-call/result history and descriptors are reauthorized at the exact adapter
|
|
9133
|
+
boundary after chat governance, including caller-supplied history and guard substitutions. Approved writes belong to the host's existing proposal/approval and owning command service.
|
|
9134
|
+
|
|
9135
|
+
### Errors and rejections
|
|
9136
|
+
|
|
9137
|
+
Invalid policies or round/call limits reject construction. Concurrent/closed runs reject through
|
|
9138
|
+
Appkit; asynchronous authorization/provider failures become failed execution outcomes. Cancellation is
|
|
9139
|
+
cooperative and does not roll back previously completed Action effects.
|
|
9140
|
+
|
|
9141
|
+
### Example
|
|
9142
|
+
|
|
9143
|
+
```typescript
|
|
9144
|
+
import { createToolAgent, type ToolAgentOptions } from '@alneas/eaos-server/execution/tool-agent';
|
|
9145
|
+
export function connectAgent(options: ToolAgentOptions) { return createToolAgent(options); }
|
|
9146
|
+
```
|
|
9147
|
+
|
|
9148
|
+
|
|
8712
9149
|
<a id="api-createValidatedAtomicRepository"></a>
|
|
8713
9150
|
|
|
8714
9151
|
## [FUNCTION] `createValidatedAtomicRepository`
|
|
@@ -12999,6 +13436,102 @@ Nonblank verified user ID.
|
|
|
12999
13436
|
|
|
13000
13437
|
|
|
13001
13438
|
|
|
13439
|
+
### Example
|
|
13440
|
+
|
|
13441
|
+
See the owning declaration and linked feature guide for usage; no standalone example is documented in source.
|
|
13442
|
+
|
|
13443
|
+
<a id="api-ExecutionPolicy"></a>
|
|
13444
|
+
|
|
13445
|
+
## [INTERFACE] `ExecutionPolicy`
|
|
13446
|
+
|
|
13447
|
+
Current admission policy used by model and action orchestration.
|
|
13448
|
+
|
|
13449
|
+
Imports: `@alneas/eaos-server/execution`.
|
|
13450
|
+
|
|
13451
|
+
### Signature
|
|
13452
|
+
|
|
13453
|
+
```typescript
|
|
13454
|
+
interface ExecutionPolicy {
|
|
13455
|
+
authorize(principal: ExecutionPrincipal, operation: string): Promise<boolean>;
|
|
13456
|
+
}
|
|
13457
|
+
```
|
|
13458
|
+
|
|
13459
|
+
### Parameters
|
|
13460
|
+
|
|
13461
|
+
| Name | Type | Required | Description |
|
|
13462
|
+
| --- | --- | --- | --- |
|
|
13463
|
+
| `authorize` | `Promise<boolean>` | Yes | Check current membership, activation and operation permission. |
|
|
13464
|
+
|
|
13465
|
+
### Returns
|
|
13466
|
+
|
|
13467
|
+
Type declaration; no runtime value.
|
|
13468
|
+
|
|
13469
|
+
### See also
|
|
13470
|
+
|
|
13471
|
+
createChatClient
|
|
13472
|
+
|
|
13473
|
+
### Public members
|
|
13474
|
+
|
|
13475
|
+
#### `authorize`
|
|
13476
|
+
|
|
13477
|
+
Check current membership, activation and operation permission.
|
|
13478
|
+
|
|
13479
|
+
Parameters:
|
|
13480
|
+
|
|
13481
|
+
- `principal`: Trusted tenant/user identity copied before calling the host.
|
|
13482
|
+
- `operation`: Host operation identity; chat uses model:chat.
|
|
13483
|
+
|
|
13484
|
+
Returns: Exactly true to admit; any other value denies execution.
|
|
13485
|
+
|
|
13486
|
+
### Errors and rejections
|
|
13487
|
+
|
|
13488
|
+
Host policy failures propagate to the caller.
|
|
13489
|
+
|
|
13490
|
+
### See also
|
|
13491
|
+
|
|
13492
|
+
createChatClient
|
|
13493
|
+
|
|
13494
|
+
Example:
|
|
13495
|
+
|
|
13496
|
+
```typescript
|
|
13497
|
+
import type { ExecutionPolicy } from '@alneas/eaos-server/execution';
|
|
13498
|
+
export function currentPolicy(policy: ExecutionPolicy) { return policy; }
|
|
13499
|
+
```
|
|
13500
|
+
|
|
13501
|
+
|
|
13502
|
+
|
|
13503
|
+
### Example
|
|
13504
|
+
|
|
13505
|
+
See the owning declaration and linked feature guide for usage; no standalone example is documented in source.
|
|
13506
|
+
|
|
13507
|
+
<a id="api-ExecutionPrincipal"></a>
|
|
13508
|
+
|
|
13509
|
+
## [TYPE] `ExecutionPrincipal`
|
|
13510
|
+
|
|
13511
|
+
Verified generic execution identity; policy checks remain host-owned.
|
|
13512
|
+
|
|
13513
|
+
Imports: `@alneas/eaos-server/execution`.
|
|
13514
|
+
|
|
13515
|
+
### Signature
|
|
13516
|
+
|
|
13517
|
+
```typescript
|
|
13518
|
+
type ExecutionPrincipal = ExecutionIdentity;
|
|
13519
|
+
```
|
|
13520
|
+
|
|
13521
|
+
### Parameters
|
|
13522
|
+
|
|
13523
|
+
| Name | Type | Required | Description |
|
|
13524
|
+
| --- | --- | --- | --- |
|
|
13525
|
+
| — | — | — | No call parameters. |
|
|
13526
|
+
|
|
13527
|
+
### Returns
|
|
13528
|
+
|
|
13529
|
+
Type declaration; no runtime value.
|
|
13530
|
+
|
|
13531
|
+
### See also
|
|
13532
|
+
|
|
13533
|
+
createChatClient
|
|
13534
|
+
|
|
13002
13535
|
### Example
|
|
13003
13536
|
|
|
13004
13537
|
See the owning declaration and linked feature guide for usage; no standalone example is documented in source.
|
|
@@ -25614,7 +26147,9 @@ Imports: `@alneas/eaos-server`, `@alneas/eaos-server/agentic`, `@alneas/eaos-ser
|
|
|
25614
26147
|
```typescript
|
|
25615
26148
|
declare class ServerAutonomousWorker {
|
|
25616
26149
|
constructor(options?: ServerWorkerOptions);
|
|
25617
|
-
runTask(request: ServerAgentTaskRequest
|
|
26150
|
+
runTask(request: ServerAgentTaskRequest, execution?: {
|
|
26151
|
+
signal?: AbortSignal;
|
|
26152
|
+
}): Promise<ServerAgentTaskResult>;
|
|
25618
26153
|
}
|
|
25619
26154
|
```
|
|
25620
26155
|
|
|
@@ -25647,12 +26182,13 @@ Checks task limits and gatekeeper policy before dispatching one runtime attempt.
|
|
|
25647
26182
|
Parameters:
|
|
25648
26183
|
|
|
25649
26184
|
- `request`: Verified task identity and instructions; required strings must be nonblank, title at most 500 characters, instructions at most 1000000, and timeout a safe integer 1–3600000 milliseconds when provided.
|
|
26185
|
+
- `execution`: Optional cancellation signal for built-in shared chat tasks; does not change injected executor or process contracts.
|
|
25650
26186
|
|
|
25651
26187
|
Returns: COMPLETED text output, PENDING_APPROVAL ticket data without execution, or FAILED data with error and optional classification/retry advice. Duration is measured in wall-clock milliseconds.
|
|
25652
26188
|
|
|
25653
26189
|
### Remarks
|
|
25654
26190
|
|
|
25655
|
-
Gatekeeper receives fixed agent/server_bot roles rather than request user roles. Approval tickets are generated but not persisted here. The configured framework policy overrides request.runtimePolicy before execution. Injected executors and built-in
|
|
26191
|
+
Gatekeeper receives fixed agent/server_bot roles rather than request user roles. Approval tickets are generated but not persisted here. The configured framework policy overrides request.runtimePolicy before execution. Injected executors and built-in chat outputs are bounded by maxOutputChars. LiteLLM uses Appkit SSE transport through createChatClient; JSON-only endpoints require a Host adapter or executor. Existing FAILED/PENDING_APPROVAL/COMPLETED envelopes and injected-executor priority remain unchanged.
|
|
25656
26192
|
|
|
25657
26193
|
### Errors and rejections
|
|
25658
26194
|
|
|
@@ -25669,6 +26205,11 @@ export async function execute(options: ServerWorkerOptions, request: ServerAgent
|
|
|
25669
26205
|
```
|
|
25670
26206
|
|
|
25671
26207
|
|
|
26208
|
+
#### `runTask.execution.signal`
|
|
26209
|
+
|
|
26210
|
+
Cooperatively cancel built-in shared chat. Injected executors and Goose/Hermes retain their own cancellation contracts.
|
|
26211
|
+
|
|
26212
|
+
|
|
25672
26213
|
|
|
25673
26214
|
### Example
|
|
25674
26215
|
|
|
@@ -25706,6 +26247,59 @@ Type declaration; no runtime value.
|
|
|
25706
26247
|
|
|
25707
26248
|
ServerAutonomousWorker.
|
|
25708
26249
|
|
|
26250
|
+
### Example
|
|
26251
|
+
|
|
26252
|
+
See the owning declaration and linked feature guide for usage; no standalone example is documented in source.
|
|
26253
|
+
|
|
26254
|
+
<a id="api-ServerWorkerChatOptions"></a>
|
|
26255
|
+
|
|
26256
|
+
## [INTERFACE] `ServerWorkerChatOptions`
|
|
26257
|
+
|
|
26258
|
+
Host composition of the shared chat path for built-in model tasks.
|
|
26259
|
+
|
|
26260
|
+
Imports: `@alneas/eaos-server`, `@alneas/eaos-server/agentic`, `@alneas/eaos-server/agentic/autonomous-worker`.
|
|
26261
|
+
|
|
26262
|
+
### Signature
|
|
26263
|
+
|
|
26264
|
+
```typescript
|
|
26265
|
+
interface ServerWorkerChatOptions extends Omit<ChatClientOptions, 'adapter' | 'authorize' | 'tools'> {
|
|
26266
|
+
adapter?: AIChatAdapter;
|
|
26267
|
+
authorize?: ChatClientOptions['authorize'];
|
|
26268
|
+
}
|
|
26269
|
+
```
|
|
26270
|
+
|
|
26271
|
+
### Parameters
|
|
26272
|
+
|
|
26273
|
+
| Name | Type | Required | Description |
|
|
26274
|
+
| --- | --- | --- | --- |
|
|
26275
|
+
| `adapter` | `AIChatAdapter` | No | Optional host adapter; omission uses Appkit's OpenAI-compatible LiteLLM transport. |
|
|
26276
|
+
| `authorize` | `ChatClientOptions['authorize']` | No | Optional live Host authorization, combined with the worker gatekeeper before and after asynchronous work. |
|
|
26277
|
+
|
|
26278
|
+
### Returns
|
|
26279
|
+
|
|
26280
|
+
Type declaration; no runtime value.
|
|
26281
|
+
|
|
26282
|
+
### Remarks
|
|
26283
|
+
|
|
26284
|
+
Defaults retain the worker gatekeeper, 60-second task timeout and worker output bound. Tools are undisclosed; action orchestration belongs to createToolAgent. No model transport or credential is selected from model output.
|
|
26285
|
+
|
|
26286
|
+
### See also
|
|
26287
|
+
|
|
26288
|
+
ServerWorkerOptions for complete worker configuration.
|
|
26289
|
+
|
|
26290
|
+
### Public members
|
|
26291
|
+
|
|
26292
|
+
#### `adapter`
|
|
26293
|
+
|
|
26294
|
+
Optional host adapter; omission uses Appkit's OpenAI-compatible LiteLLM transport.
|
|
26295
|
+
|
|
26296
|
+
|
|
26297
|
+
#### `authorize`
|
|
26298
|
+
|
|
26299
|
+
Optional live Host authorization, combined with the worker gatekeeper before and after asynchronous work.
|
|
26300
|
+
|
|
26301
|
+
|
|
26302
|
+
|
|
25709
26303
|
### Example
|
|
25710
26304
|
|
|
25711
26305
|
See the owning declaration and linked feature guide for usage; no standalone example is documented in source.
|
|
@@ -25727,6 +26321,8 @@ interface ServerWorkerOptions {
|
|
|
25727
26321
|
hermesAgentBinaryPath?: string;
|
|
25728
26322
|
litellmEndpoint?: string;
|
|
25729
26323
|
litellmModel?: string;
|
|
26324
|
+
litellmHeaders?: Readonly<Record<string, string>>;
|
|
26325
|
+
chat?: ServerWorkerChatOptions;
|
|
25730
26326
|
maxOutputChars?: number;
|
|
25731
26327
|
runtimePolicy?: AgentRuntimeResourcePolicy;
|
|
25732
26328
|
runtimeRole?: ServerRuntimeRole;
|
|
@@ -25744,6 +26340,8 @@ interface ServerWorkerOptions {
|
|
|
25744
26340
|
| `hermesAgentBinaryPath` | `string` | No | Trusted executable path; defaults to HERMES_AGENT_BIN_PATH or hermes. |
|
|
25745
26341
|
| `litellmEndpoint` | `string` | No | Host LiteLLM base URL; defaults to LITELLM_ENDPOINT or http://localhost:4000/v1. |
|
|
25746
26342
|
| `litellmModel` | `string` | No | Host model identifier; defaults to LITELLM_MODEL and is required for built-in LiteLLM execution. |
|
|
26343
|
+
| `litellmHeaders` | `Readonly<Record<string, string>>` | No | Host-owned provider headers; captured at construction and never read from task/model input. |
|
|
26344
|
+
| `chat` | `ServerWorkerChatOptions` | No | Optional shared chat model routing, live authorization, limits, guards, usage, budget and observability. |
|
|
25747
26345
|
| `maxOutputChars` | `number` | No | Combined command output/string result ceiling, safe integer 1–10000000; defaults to 1000000. |
|
|
25748
26346
|
| `runtimePolicy` | `AgentRuntimeResourcePolicy` | No | Framework default is safe for the ARM agent host. Host adapters may tighten it. |
|
|
25749
26347
|
| `runtimeRole` | `ServerRuntimeRole` | No | Built-in Goose/Hermes execution is permitted only on the AI placement. |
|
|
@@ -25781,6 +26379,16 @@ Host LiteLLM base URL; defaults to LITELLM_ENDPOINT or http://localhost:4000/v1.
|
|
|
25781
26379
|
Host model identifier; defaults to LITELLM_MODEL and is required for built-in LiteLLM execution.
|
|
25782
26380
|
|
|
25783
26381
|
|
|
26382
|
+
#### `litellmHeaders`
|
|
26383
|
+
|
|
26384
|
+
Host-owned provider headers; captured at construction and never read from task/model input.
|
|
26385
|
+
|
|
26386
|
+
|
|
26387
|
+
#### `chat`
|
|
26388
|
+
|
|
26389
|
+
Optional shared chat model routing, live authorization, limits, guards, usage, budget and observability.
|
|
26390
|
+
|
|
26391
|
+
|
|
25784
26392
|
#### `maxOutputChars`
|
|
25785
26393
|
|
|
25786
26394
|
Combined command output/string result ceiling, safe integer 1–10000000; defaults to 1000000.
|
|
@@ -27989,6 +28597,205 @@ import { textInput } from '@alneas/eaos-server/plugin-data'
|
|
|
27989
28597
|
const title = textInput('Example', 'title', 80)
|
|
27990
28598
|
```
|
|
27991
28599
|
|
|
28600
|
+
<a id="api-ToolAgentOptions"></a>
|
|
28601
|
+
|
|
28602
|
+
## [INTERFACE] `ToolAgentOptions`
|
|
28603
|
+
|
|
28604
|
+
Current host policies and limits for a single-flight Appkit execution session.
|
|
28605
|
+
|
|
28606
|
+
Imports: `@alneas/eaos-server/execution`, `@alneas/eaos-server/execution/tool-agent`.
|
|
28607
|
+
|
|
28608
|
+
### Signature
|
|
28609
|
+
|
|
28610
|
+
```typescript
|
|
28611
|
+
interface ToolAgentOptions extends Omit<ChatClientOptions, 'tools'> {
|
|
28612
|
+
session(principal: ExecutionPrincipal): Promise<{
|
|
28613
|
+
registry: ActionRegistry;
|
|
28614
|
+
tools: readonly AgentTool[];
|
|
28615
|
+
}>;
|
|
28616
|
+
disclose(principal: ExecutionPrincipal, name: string): Promise<boolean>;
|
|
28617
|
+
authorizeCall(principal: ExecutionPrincipal, call: ActionToolCall): Promise<boolean>;
|
|
28618
|
+
maxRounds?: number;
|
|
28619
|
+
maxCalls?: number;
|
|
28620
|
+
}
|
|
28621
|
+
```
|
|
28622
|
+
|
|
28623
|
+
### Parameters
|
|
28624
|
+
|
|
28625
|
+
| Name | Type | Required | Description |
|
|
28626
|
+
| --- | --- | --- | --- |
|
|
28627
|
+
| `session` | `Promise<{ registry: ActionRegistry; tools: readonly AgentTool[]; }>` | Yes | Resolve the current host registry and explicit tool execution policy. |
|
|
28628
|
+
| `disclose` | `Promise<boolean>` | Yes | Check current permission to disclose a tool descriptor or result to the model. |
|
|
28629
|
+
| `authorizeCall` | `Promise<boolean>` | Yes | Check exact resource/input permission before execution and before result disclosure. |
|
|
28630
|
+
| `maxRounds` | `number` | No | Maximum model rounds; default 6, allowed integers 1–20. |
|
|
28631
|
+
| `maxCalls` | `number` | No | Maximum automatic Action calls per run; default 10, allowed integers 1–100. |
|
|
28632
|
+
|
|
28633
|
+
### Returns
|
|
28634
|
+
|
|
28635
|
+
Type declaration; no runtime value.
|
|
28636
|
+
|
|
28637
|
+
### See also
|
|
28638
|
+
|
|
28639
|
+
createToolAgent
|
|
28640
|
+
|
|
28641
|
+
### Public members
|
|
28642
|
+
|
|
28643
|
+
#### `session`
|
|
28644
|
+
|
|
28645
|
+
Resolve the current host registry and explicit tool execution policy.
|
|
28646
|
+
|
|
28647
|
+
Parameters:
|
|
28648
|
+
|
|
28649
|
+
- `principal`: Copied verified tenant/user identity.
|
|
28650
|
+
|
|
28651
|
+
Returns: Existing Action registry and at most 100 read/handoff bindings.
|
|
28652
|
+
|
|
28653
|
+
### Errors and rejections
|
|
28654
|
+
|
|
28655
|
+
Rejects missing host session or registry resolution failures.
|
|
28656
|
+
|
|
28657
|
+
Example:
|
|
28658
|
+
|
|
28659
|
+
```typescript
|
|
28660
|
+
import type { ToolAgentOptions } from '@alneas/eaos-server/execution/tool-agent';
|
|
28661
|
+
export function agentSession(resolve: ToolAgentOptions['session']) { return resolve; }
|
|
28662
|
+
```
|
|
28663
|
+
|
|
28664
|
+
|
|
28665
|
+
#### `session.registry`
|
|
28666
|
+
|
|
28667
|
+
Existing host-owned Appkit Action registry for this authorized session.
|
|
28668
|
+
|
|
28669
|
+
|
|
28670
|
+
#### `session.tools`
|
|
28671
|
+
|
|
28672
|
+
Explicit read/handoff policy for every disclosed binding.
|
|
28673
|
+
|
|
28674
|
+
|
|
28675
|
+
#### `disclose`
|
|
28676
|
+
|
|
28677
|
+
Check current permission to disclose a tool descriptor or result to the model.
|
|
28678
|
+
|
|
28679
|
+
Parameters:
|
|
28680
|
+
|
|
28681
|
+
- `principal`: Copied verified actor.
|
|
28682
|
+
- `name`: Host-registered tool name.
|
|
28683
|
+
|
|
28684
|
+
Returns: Exactly true permits disclosure; other results deny it.
|
|
28685
|
+
|
|
28686
|
+
### Errors and rejections
|
|
28687
|
+
|
|
28688
|
+
Host policy errors propagate into the execution outcome.
|
|
28689
|
+
|
|
28690
|
+
Example:
|
|
28691
|
+
|
|
28692
|
+
```typescript
|
|
28693
|
+
import type { ToolAgentOptions } from '@alneas/eaos-server/execution/tool-agent';
|
|
28694
|
+
export function disclosurePolicy(policy: ToolAgentOptions['disclose']) { return policy; }
|
|
28695
|
+
```
|
|
28696
|
+
|
|
28697
|
+
|
|
28698
|
+
#### `authorizeCall`
|
|
28699
|
+
|
|
28700
|
+
Check exact resource/input permission before execution and before result disclosure.
|
|
28701
|
+
|
|
28702
|
+
Parameters:
|
|
28703
|
+
|
|
28704
|
+
- `principal`: Copied verified actor; callback mutation cannot change the trusted identity.
|
|
28705
|
+
- `call`: Untrusted model request with correlated ID, name and arguments.
|
|
28706
|
+
|
|
28707
|
+
Returns: Exactly true admits the call; it does not approve a handoff for execution.
|
|
28708
|
+
|
|
28709
|
+
### Errors and rejections
|
|
28710
|
+
|
|
28711
|
+
Host policy errors propagate into the execution outcome.
|
|
28712
|
+
|
|
28713
|
+
Example:
|
|
28714
|
+
|
|
28715
|
+
```typescript
|
|
28716
|
+
import type { ToolAgentOptions } from '@alneas/eaos-server/execution/tool-agent';
|
|
28717
|
+
export function callPolicy(policy: ToolAgentOptions['authorizeCall']) { return policy; }
|
|
28718
|
+
```
|
|
28719
|
+
|
|
28720
|
+
|
|
28721
|
+
#### `maxRounds`
|
|
28722
|
+
|
|
28723
|
+
Maximum model rounds; default 6, allowed integers 1–20.
|
|
28724
|
+
|
|
28725
|
+
|
|
28726
|
+
#### `maxCalls`
|
|
28727
|
+
|
|
28728
|
+
Maximum automatic Action calls per run; default 10, allowed integers 1–100.
|
|
28729
|
+
|
|
28730
|
+
|
|
28731
|
+
|
|
28732
|
+
### Example
|
|
28733
|
+
|
|
28734
|
+
See the owning declaration and linked feature guide for usage; no standalone example is documented in source.
|
|
28735
|
+
|
|
28736
|
+
<a id="api-ToolAgentResult"></a>
|
|
28737
|
+
|
|
28738
|
+
## [INTERFACE] `ToolAgentResult`
|
|
28739
|
+
|
|
28740
|
+
Final in-memory conversational outcome, separate from Appkit execution status.
|
|
28741
|
+
|
|
28742
|
+
Imports: `@alneas/eaos-server/execution`, `@alneas/eaos-server/execution/tool-agent`.
|
|
28743
|
+
|
|
28744
|
+
### Signature
|
|
28745
|
+
|
|
28746
|
+
```typescript
|
|
28747
|
+
interface ToolAgentResult {
|
|
28748
|
+
status: 'completed' | 'handoff' | 'limited' | 'tool-error';
|
|
28749
|
+
messages: AIChatMessage[];
|
|
28750
|
+
pending: ActionToolCall[];
|
|
28751
|
+
callsExecuted: number;
|
|
28752
|
+
}
|
|
28753
|
+
```
|
|
28754
|
+
|
|
28755
|
+
### Parameters
|
|
28756
|
+
|
|
28757
|
+
| Name | Type | Required | Description |
|
|
28758
|
+
| --- | --- | --- | --- |
|
|
28759
|
+
| `status` | `'completed' \| 'handoff' \| 'limited' \| 'tool-error'` | Yes | Completed chat, unexecuted handoff, bounded stop, or an Action validation/execution failure. |
|
|
28760
|
+
| `messages` | `AIChatMessage[]` | Yes | Detached correlated chat history, including only authorized projected tool results. |
|
|
28761
|
+
| `pending` | `ActionToolCall[]` | Yes | Unexecuted requests; the host must validate them through its existing Action/Proposal review path. |
|
|
28762
|
+
| `callsExecuted` | `number` | Yes | Number of attempted automatic Action calls, including a returned Action failure. |
|
|
28763
|
+
|
|
28764
|
+
### Returns
|
|
28765
|
+
|
|
28766
|
+
Type declaration; no runtime value.
|
|
28767
|
+
|
|
28768
|
+
### See also
|
|
28769
|
+
|
|
28770
|
+
createToolAgent
|
|
28771
|
+
|
|
28772
|
+
### Public members
|
|
28773
|
+
|
|
28774
|
+
#### `status`
|
|
28775
|
+
|
|
28776
|
+
Completed chat, unexecuted handoff, bounded stop, or an Action validation/execution failure.
|
|
28777
|
+
|
|
28778
|
+
|
|
28779
|
+
#### `messages`
|
|
28780
|
+
|
|
28781
|
+
Detached correlated chat history, including only authorized projected tool results.
|
|
28782
|
+
|
|
28783
|
+
|
|
28784
|
+
#### `pending`
|
|
28785
|
+
|
|
28786
|
+
Unexecuted requests; the host must validate them through its existing Action/Proposal review path.
|
|
28787
|
+
|
|
28788
|
+
|
|
28789
|
+
#### `callsExecuted`
|
|
28790
|
+
|
|
28791
|
+
Number of attempted automatic Action calls, including a returned Action failure.
|
|
28792
|
+
|
|
28793
|
+
|
|
28794
|
+
|
|
28795
|
+
### Example
|
|
28796
|
+
|
|
28797
|
+
See the owning declaration and linked feature guide for usage; no standalone example is documented in source.
|
|
28798
|
+
|
|
27992
28799
|
<a id="api-uniqueRecordKey"></a>
|
|
27993
28800
|
|
|
27994
28801
|
## [FUNCTION] `uniqueRecordKey`
|