@framers/agentos 0.1.93 → 0.1.95

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.
Files changed (81) hide show
  1. package/README.md +10 -0
  2. package/dist/api/AgentOS.d.ts +13 -0
  3. package/dist/api/AgentOS.d.ts.map +1 -1
  4. package/dist/api/AgentOS.js +36 -1
  5. package/dist/api/AgentOS.js.map +1 -1
  6. package/dist/api/agent.d.ts +7 -0
  7. package/dist/api/agent.d.ts.map +1 -1
  8. package/dist/api/agent.js +34 -2
  9. package/dist/api/agent.js.map +1 -1
  10. package/dist/api/generateImage.d.ts +3 -0
  11. package/dist/api/generateImage.d.ts.map +1 -1
  12. package/dist/api/generateImage.js +95 -36
  13. package/dist/api/generateImage.js.map +1 -1
  14. package/dist/api/generateText.d.ts +9 -0
  15. package/dist/api/generateText.d.ts.map +1 -1
  16. package/dist/api/generateText.js +173 -101
  17. package/dist/api/generateText.js.map +1 -1
  18. package/dist/api/observability.d.ts +16 -0
  19. package/dist/api/observability.d.ts.map +1 -0
  20. package/dist/api/observability.js +46 -0
  21. package/dist/api/observability.js.map +1 -0
  22. package/dist/api/streamText.d.ts.map +1 -1
  23. package/dist/api/streamText.js +93 -22
  24. package/dist/api/streamText.js.map +1 -1
  25. package/dist/api/usageLedger.d.ts +58 -0
  26. package/dist/api/usageLedger.d.ts.map +1 -0
  27. package/dist/api/usageLedger.js +151 -0
  28. package/dist/api/usageLedger.js.map +1 -0
  29. package/dist/core/tools/IToolOrchestrator.d.ts +38 -1
  30. package/dist/core/tools/IToolOrchestrator.d.ts.map +1 -1
  31. package/dist/core/tools/ToolOrchestrator.d.ts +58 -1
  32. package/dist/core/tools/ToolOrchestrator.d.ts.map +1 -1
  33. package/dist/core/tools/ToolOrchestrator.js +116 -1
  34. package/dist/core/tools/ToolOrchestrator.js.map +1 -1
  35. package/dist/discovery/CapabilityDiscoveryEngine.d.ts +19 -0
  36. package/dist/discovery/CapabilityDiscoveryEngine.d.ts.map +1 -1
  37. package/dist/discovery/CapabilityDiscoveryEngine.js +54 -0
  38. package/dist/discovery/CapabilityDiscoveryEngine.js.map +1 -1
  39. package/dist/discovery/types.d.ts +8 -1
  40. package/dist/discovery/types.d.ts.map +1 -1
  41. package/dist/discovery/types.js.map +1 -1
  42. package/dist/emergent/ComposableToolBuilder.d.ts +125 -0
  43. package/dist/emergent/ComposableToolBuilder.d.ts.map +1 -0
  44. package/dist/emergent/ComposableToolBuilder.js +318 -0
  45. package/dist/emergent/ComposableToolBuilder.js.map +1 -0
  46. package/dist/emergent/EmergentCapabilityEngine.d.ts +168 -0
  47. package/dist/emergent/EmergentCapabilityEngine.d.ts.map +1 -0
  48. package/dist/emergent/EmergentCapabilityEngine.js +437 -0
  49. package/dist/emergent/EmergentCapabilityEngine.js.map +1 -0
  50. package/dist/emergent/EmergentJudge.d.ts +283 -0
  51. package/dist/emergent/EmergentJudge.d.ts.map +1 -0
  52. package/dist/emergent/EmergentJudge.js +463 -0
  53. package/dist/emergent/EmergentJudge.js.map +1 -0
  54. package/dist/emergent/EmergentToolRegistry.d.ts +286 -0
  55. package/dist/emergent/EmergentToolRegistry.d.ts.map +1 -0
  56. package/dist/emergent/EmergentToolRegistry.js +546 -0
  57. package/dist/emergent/EmergentToolRegistry.js.map +1 -0
  58. package/dist/emergent/ForgeToolMetaTool.d.ts +124 -0
  59. package/dist/emergent/ForgeToolMetaTool.d.ts.map +1 -0
  60. package/dist/emergent/ForgeToolMetaTool.js +170 -0
  61. package/dist/emergent/ForgeToolMetaTool.js.map +1 -0
  62. package/dist/emergent/SandboxedToolForge.d.ts +185 -0
  63. package/dist/emergent/SandboxedToolForge.d.ts.map +1 -0
  64. package/dist/emergent/SandboxedToolForge.js +383 -0
  65. package/dist/emergent/SandboxedToolForge.js.map +1 -0
  66. package/dist/emergent/index.d.ts +25 -0
  67. package/dist/emergent/index.d.ts.map +1 -0
  68. package/dist/emergent/index.js +20 -0
  69. package/dist/emergent/index.js.map +1 -0
  70. package/dist/emergent/types.d.ts +596 -0
  71. package/dist/emergent/types.d.ts.map +1 -0
  72. package/dist/emergent/types.js +36 -0
  73. package/dist/emergent/types.js.map +1 -0
  74. package/dist/index.d.ts +8 -1
  75. package/dist/index.d.ts.map +1 -1
  76. package/dist/index.js +7 -1
  77. package/dist/index.js.map +1 -1
  78. package/dist/orchestration/runtime/GraphRuntime.d.ts.map +1 -1
  79. package/dist/orchestration/runtime/GraphRuntime.js +53 -11
  80. package/dist/orchestration/runtime/GraphRuntime.js.map +1 -1
  81. package/package.json +1 -1
@@ -0,0 +1,596 @@
1
+ /**
2
+ * @fileoverview Core types for the Emergent Capability Engine.
3
+ * @module @framers/agentos/emergent/types
4
+ *
5
+ * Provides all type definitions for the runtime tool creation system, enabling
6
+ * agents to forge new tools via composition or sandboxed code execution, subject
7
+ * to LLM-as-judge verification and tiered promotion.
8
+ *
9
+ * Key concepts:
10
+ * - ToolTier: Lifecycle scope of an emergent tool (session → agent → shared)
11
+ * - ComposableToolSpec: Pipeline of existing tool calls with input mapping
12
+ * - SandboxedToolSpec: Arbitrary code execution in a memory/time-bounded sandbox
13
+ * - CreationVerdict: LLM judge evaluation of a newly forged tool
14
+ * - PromotionVerdict: Multi-reviewer gate before tier promotion
15
+ * - EmergentTool: Unified shape for any runtime-created tool
16
+ */
17
+ import type { JSONSchemaObject } from '../core/tools/ITool.js';
18
+ /**
19
+ * Lifecycle scope tier for an emergent tool.
20
+ *
21
+ * Tools progress through tiers as they prove reliability. Higher tiers require
22
+ * more stringent promotion verdicts and multi-reviewer sign-off.
23
+ *
24
+ * - `'session'` — Exists only for the current agent session; discarded on shutdown.
25
+ * - `'agent'` — Persisted for the agent that created it; not shared globally.
26
+ * - `'shared'` — Promoted to a shared tool registry; available to all agents.
27
+ */
28
+ export type ToolTier = 'session' | 'agent' | 'shared';
29
+ /**
30
+ * Named APIs that sandboxed tool code is permitted to invoke.
31
+ *
32
+ * All other I/O is forbidden by default. The allowlist is declared per-tool in
33
+ * {@link SandboxedToolSpec} and enforced by the sandbox runtime at execution time.
34
+ *
35
+ * - `'fetch'` — Outbound HTTP/HTTPS requests via the global `fetch` API.
36
+ * - `'fs.readFile'` — Synchronous read of files in a pre-approved path whitelist.
37
+ * - `'crypto'` — Access to the Node.js `crypto` module for hashing / HMAC.
38
+ */
39
+ export type SandboxAPI = 'fetch' | 'fs.readFile' | 'crypto';
40
+ /**
41
+ * A single step in a composable tool pipeline.
42
+ *
43
+ * Steps are executed sequentially. Each step invokes an existing registered tool
44
+ * by name and maps values from the pipeline's shared input namespace into the
45
+ * step's arguments using reference expressions.
46
+ *
47
+ * Reference expression syntax (resolved at runtime):
48
+ * - `"$input"` — the original input to the composable tool.
49
+ * - `"$prev"` — the output of the immediately preceding step.
50
+ * - `"$steps.<stepName>"` — the output of a named step.
51
+ * - Any other literal value is used as-is.
52
+ */
53
+ export interface ComposableStep {
54
+ /**
55
+ * Unique name for this step within the pipeline.
56
+ * Used for cross-step references via `$steps.<stepName>`.
57
+ * @example "fetchUser"
58
+ */
59
+ name: string;
60
+ /**
61
+ * The registered tool name to invoke for this step.
62
+ * Must match the `name` property of an {@link ITool} available to the agent.
63
+ * @example "web_search"
64
+ */
65
+ tool: string;
66
+ /**
67
+ * Input argument mapping for the tool invocation.
68
+ * Keys are the tool's argument names; values are literal values or reference
69
+ * expressions (`$input`, `$prev`, `$steps.<name>`).
70
+ *
71
+ * @example
72
+ * ```ts
73
+ * { query: "$input.searchTerm", maxResults: 5 }
74
+ * ```
75
+ */
76
+ inputMapping: Record<string, unknown>;
77
+ /**
78
+ * Optional JSONata / simple expression evaluated against `$prev` before
79
+ * executing this step. When the expression evaluates to falsy, the step is
80
+ * skipped and its output is `null`.
81
+ *
82
+ * @example "$prev.totalCount > 0"
83
+ */
84
+ condition?: string;
85
+ }
86
+ /**
87
+ * Implementation specification for a tool built by composing existing tools.
88
+ *
89
+ * The engine executes each step in order, threading outputs through the
90
+ * reference expression system. The final step's output becomes the tool's output.
91
+ */
92
+ export interface ComposableToolSpec {
93
+ /** Discriminant: always `'compose'` for composable specs. */
94
+ mode: 'compose';
95
+ /**
96
+ * Ordered list of pipeline steps.
97
+ * Must contain at least one step; the last step's output is the tool result.
98
+ */
99
+ steps: ComposableStep[];
100
+ }
101
+ /**
102
+ * Implementation specification for a tool whose logic is arbitrary code
103
+ * executed in a memory/time-bounded sandbox.
104
+ *
105
+ * The sandboxed function signature must be:
106
+ * ```ts
107
+ * async function run(input: unknown): Promise<unknown>
108
+ * ```
109
+ * The engine calls `run(input)` and returns its resolved value as the tool output.
110
+ */
111
+ export interface SandboxedToolSpec {
112
+ /** Discriminant: always `'sandbox'` for sandboxed specs. */
113
+ mode: 'sandbox';
114
+ /**
115
+ * The full source code of the sandboxed module.
116
+ * Must export or define an async `run` function as its entry point.
117
+ *
118
+ * @example
119
+ * ```ts
120
+ * async function run(input) {
121
+ * const res = await fetch(`https://api.example.com?q=${input.query}`);
122
+ * return res.json();
123
+ * }
124
+ * ```
125
+ */
126
+ code: string;
127
+ /**
128
+ * Explicit allowlist of sandbox APIs the code may invoke.
129
+ * Any call to an API not in this list will throw at runtime.
130
+ */
131
+ allowlist: SandboxAPI[];
132
+ }
133
+ /**
134
+ * Union of all supported tool implementation specifications.
135
+ */
136
+ export type ToolImplementation = ComposableToolSpec | SandboxedToolSpec;
137
+ /**
138
+ * Input to the sandbox executor for running a single sandboxed tool invocation.
139
+ */
140
+ export interface SandboxExecutionRequest {
141
+ /**
142
+ * Source code of the sandboxed module (same format as {@link SandboxedToolSpec.code}).
143
+ */
144
+ code: string;
145
+ /**
146
+ * The argument object passed to the `run(input)` entry point.
147
+ */
148
+ input: unknown;
149
+ /**
150
+ * APIs the sandbox is permitted to call. Anything not listed is blocked.
151
+ */
152
+ allowlist: SandboxAPI[];
153
+ /**
154
+ * Maximum heap memory in megabytes the sandbox process may consume.
155
+ * The executor terminates the process if this limit is exceeded.
156
+ * @default 128
157
+ */
158
+ memoryMB: number;
159
+ /**
160
+ * Maximum wall-clock time in milliseconds before the sandbox is forcibly
161
+ * killed and an error is returned.
162
+ * @default 5000
163
+ */
164
+ timeoutMs: number;
165
+ }
166
+ /**
167
+ * Outcome of a single sandbox execution attempt.
168
+ */
169
+ export interface SandboxExecutionResult {
170
+ /**
171
+ * `true` when `run()` resolved without throwing and within resource limits.
172
+ */
173
+ success: boolean;
174
+ /**
175
+ * The resolved return value of `run()`, present only when `success` is `true`.
176
+ */
177
+ output?: unknown;
178
+ /**
179
+ * Human-readable error description, present when `success` is `false`.
180
+ * Includes timeout, memory-exceeded, and thrown-exception cases.
181
+ */
182
+ error?: string;
183
+ /**
184
+ * Actual wall-clock execution time in milliseconds.
185
+ * Populated regardless of success/failure.
186
+ */
187
+ executionTimeMs: number;
188
+ /**
189
+ * Peak heap memory used by the sandbox process in bytes.
190
+ * Populated when the runtime can measure it; otherwise `0`.
191
+ */
192
+ memoryUsedBytes: number;
193
+ }
194
+ /**
195
+ * Evaluation verdict produced by the LLM-as-judge after a tool is forged.
196
+ *
197
+ * The judge runs the tool against its declared test cases and scores it across
198
+ * five evaluation dimensions. A tool is only registered when `approved` is `true`.
199
+ */
200
+ export interface CreationVerdict {
201
+ /**
202
+ * Whether the judge approves the tool for registration at its initial tier.
203
+ * `false` means the forge request is rejected and no tool is registered.
204
+ */
205
+ approved: boolean;
206
+ /**
207
+ * Overall confidence the judge has in its verdict, in the range [0, 1].
208
+ * Low confidence may trigger a second judge pass or human review.
209
+ */
210
+ confidence: number;
211
+ /**
212
+ * Safety score in the range [0, 1].
213
+ * Assesses whether the tool's implementation could cause unintended harm,
214
+ * data exfiltration, or resource exhaustion.
215
+ */
216
+ safety: number;
217
+ /**
218
+ * Correctness score in the range [0, 1].
219
+ * Measures how well the tool's outputs match the expected outputs in the
220
+ * declared test cases.
221
+ */
222
+ correctness: number;
223
+ /**
224
+ * Determinism score in the range [0, 1].
225
+ * Gauges whether repeated invocations with identical inputs produce
226
+ * consistent outputs. Lower scores flag non-deterministic behaviour.
227
+ */
228
+ determinism: number;
229
+ /**
230
+ * Bounded execution score in the range [0, 1].
231
+ * Indicates whether the tool reliably completes within its declared
232
+ * resource limits (memory, time). Scores derived from sandbox telemetry.
233
+ */
234
+ bounded: number;
235
+ /**
236
+ * Free-text explanation of the verdict, including any failure reasons,
237
+ * flagged patterns, or suggestions for improvement.
238
+ */
239
+ reasoning: string;
240
+ }
241
+ /**
242
+ * Verdict produced by the multi-reviewer panel before a tool is promoted
243
+ * to a higher {@link ToolTier}.
244
+ *
245
+ * Requires independent sign-off from a safety auditor and a correctness reviewer.
246
+ * Both must approve for `approved` to be `true`.
247
+ */
248
+ export interface PromotionVerdict {
249
+ /**
250
+ * Whether both reviewers approved the promotion.
251
+ * `false` means the tool remains at its current tier.
252
+ */
253
+ approved: boolean;
254
+ /**
255
+ * Safety audit sub-verdict from the safety-focused reviewer model.
256
+ * Mirrors the shape of a partial {@link CreationVerdict}: `{ approved, confidence, reasoning }`.
257
+ */
258
+ safetyAuditor: {
259
+ /** Whether the safety auditor approved. */
260
+ approved: boolean;
261
+ /** Safety auditor's confidence in [0, 1]. */
262
+ confidence: number;
263
+ /** Safety auditor's reasoning text. */
264
+ reasoning: string;
265
+ };
266
+ /**
267
+ * Correctness review sub-verdict from the correctness-focused reviewer model.
268
+ * Mirrors the shape of a partial {@link CreationVerdict}: `{ approved, confidence, reasoning }`.
269
+ */
270
+ correctnessReviewer: {
271
+ /** Whether the correctness reviewer approved. */
272
+ approved: boolean;
273
+ /** Correctness reviewer's confidence in [0, 1]. */
274
+ confidence: number;
275
+ /** Correctness reviewer's reasoning text. */
276
+ reasoning: string;
277
+ };
278
+ /**
279
+ * Combined confidence score derived from both reviewer confidences.
280
+ * Typically the minimum or harmonic mean of the two sub-scores.
281
+ */
282
+ confidence: number;
283
+ }
284
+ /**
285
+ * Verdict produced before reusing an emergent tool from a previous session.
286
+ *
287
+ * Validates that the tool's schema and runtime behaviour still match expectations,
288
+ * and flags any anomalies that may indicate drift or tampering.
289
+ */
290
+ export interface ReuseVerdict {
291
+ /**
292
+ * Whether the tool is safe to reuse in the current context.
293
+ * `false` means the tool should be re-forged or discarded.
294
+ */
295
+ valid: boolean;
296
+ /**
297
+ * JSON Schema validation errors for the tool's input/output schemas, if any.
298
+ * An empty array means schemas are structurally valid.
299
+ */
300
+ schemaErrors: string[];
301
+ /**
302
+ * Whether a behavioural anomaly was detected compared to the tool's
303
+ * historical usage baseline.
304
+ */
305
+ anomaly: boolean;
306
+ /**
307
+ * Human-readable description of the detected anomaly, present when
308
+ * `anomaly` is `true`.
309
+ */
310
+ anomalyReason?: string;
311
+ }
312
+ /**
313
+ * Accumulated runtime usage statistics for an emergent tool.
314
+ *
315
+ * Used by the promotion engine to decide when a tool has proven sufficient
316
+ * reliability to advance to the next {@link ToolTier}.
317
+ */
318
+ export interface ToolUsageStats {
319
+ /**
320
+ * Total number of times the tool has been invoked across all sessions
321
+ * since it was first registered.
322
+ */
323
+ totalUses: number;
324
+ /**
325
+ * Number of invocations that completed without throwing or returning an error.
326
+ */
327
+ successCount: number;
328
+ /**
329
+ * Number of invocations that returned an error or threw an exception.
330
+ */
331
+ failureCount: number;
332
+ /**
333
+ * Rolling average wall-clock execution time in milliseconds, computed over
334
+ * all recorded invocations.
335
+ */
336
+ avgExecutionTimeMs: number;
337
+ /**
338
+ * ISO-8601 timestamp of the most recent invocation, or `null` if the tool
339
+ * has never been invoked.
340
+ */
341
+ lastUsedAt: string | null;
342
+ /**
343
+ * Aggregate confidence score in [0, 1] derived from judge verdict history.
344
+ * Updated each time a new {@link CreationVerdict} or {@link PromotionVerdict}
345
+ * is recorded.
346
+ */
347
+ confidenceScore: number;
348
+ }
349
+ /**
350
+ * A tool created at runtime by the Emergent Capability Engine.
351
+ *
352
+ * `EmergentTool` is the persisted record that backs a forged tool. It carries
353
+ * the tool's identity, schemas, implementation spec, current tier, audit trail,
354
+ * and accumulated usage statistics.
355
+ */
356
+ export interface EmergentTool {
357
+ /**
358
+ * Globally unique identifier assigned at forge time.
359
+ * Convention: `emergent:<uuid-v4>` (e.g., `"emergent:a1b2c3d4-..."`).
360
+ */
361
+ id: string;
362
+ /**
363
+ * Machine-readable tool name exposed to the LLM in tool call requests.
364
+ * Must be unique among tools currently registered for the agent.
365
+ * @example "fetch_github_pr_summary"
366
+ */
367
+ name: string;
368
+ /**
369
+ * Natural language description of what the tool does and when to use it.
370
+ * Injected into the LLM prompt as the tool's description field.
371
+ */
372
+ description: string;
373
+ /**
374
+ * JSON Schema defining the structure of arguments the tool accepts.
375
+ * Validated by the executor before each invocation.
376
+ */
377
+ inputSchema: JSONSchemaObject;
378
+ /**
379
+ * JSON Schema defining the structure of the tool's output on success.
380
+ * Used by downstream tools and the judge for output validation.
381
+ */
382
+ outputSchema: JSONSchemaObject;
383
+ /**
384
+ * The implementation specification — either a composable pipeline or
385
+ * sandboxed code. Determines how the executor runs the tool.
386
+ */
387
+ implementation: ToolImplementation;
388
+ /**
389
+ * Current lifecycle tier. Tools start at `'session'` and may be promoted
390
+ * to `'agent'` and then `'shared'` as they accumulate usage and pass audits.
391
+ */
392
+ tier: ToolTier;
393
+ /**
394
+ * Identifier of the entity (agent ID or `'system'`) that created this tool.
395
+ */
396
+ createdBy: string;
397
+ /**
398
+ * ISO-8601 timestamp of when the tool was first forged and registered.
399
+ */
400
+ createdAt: string;
401
+ /**
402
+ * Ordered log of all judge verdicts issued for this tool, from initial
403
+ * creation through any subsequent promotion reviews.
404
+ * The most recent verdict is the last element.
405
+ */
406
+ judgeVerdicts: Array<CreationVerdict | PromotionVerdict>;
407
+ /**
408
+ * Accumulated runtime usage statistics.
409
+ * Updated after every invocation by the usage tracking subsystem.
410
+ */
411
+ usageStats: ToolUsageStats;
412
+ /**
413
+ * Human-readable label describing the origin of this tool for audit purposes.
414
+ * @example "forged by agent gmi-42 during session sess-99"
415
+ */
416
+ source: string;
417
+ }
418
+ /**
419
+ * A single test case used by the LLM judge to evaluate a newly forged tool.
420
+ *
421
+ * The judge invokes the tool with `input` and compares the result against
422
+ * `expectedOutput` using semantic equivalence (not strict equality).
423
+ */
424
+ export interface ForgeTestCase {
425
+ /**
426
+ * Input arguments object passed to the tool's `run` / execution entry point.
427
+ * Must conform to the tool's declared `inputSchema`.
428
+ */
429
+ input: Record<string, unknown>;
430
+ /**
431
+ * Expected output value used for correctness scoring.
432
+ * The judge uses this as a reference — partial matches may still score well.
433
+ */
434
+ expectedOutput: unknown;
435
+ }
436
+ /**
437
+ * Request payload for the `forge_tool` system tool.
438
+ *
439
+ * An agent submits this to request the creation of a new emergent tool. The
440
+ * engine validates the request, runs the judge, and returns a {@link ForgeResult}.
441
+ */
442
+ export interface ForgeToolRequest {
443
+ /**
444
+ * Desired machine-readable name for the new tool.
445
+ * Must be unique among tools currently visible to the requesting agent.
446
+ */
447
+ name: string;
448
+ /**
449
+ * Natural language description of the tool's purpose and behaviour.
450
+ * Used verbatim as the tool's description in the LLM tool list.
451
+ */
452
+ description: string;
453
+ /**
454
+ * JSON Schema for the tool's input arguments.
455
+ */
456
+ inputSchema: JSONSchemaObject;
457
+ /**
458
+ * JSON Schema for the tool's expected output.
459
+ */
460
+ outputSchema: JSONSchemaObject;
461
+ /**
462
+ * Implementation specification — composable pipeline or sandboxed code.
463
+ */
464
+ implementation: ToolImplementation;
465
+ /**
466
+ * One or more test cases the judge uses to evaluate correctness.
467
+ * At least one test case is required for the forge request to be accepted.
468
+ */
469
+ testCases: [ForgeTestCase, ...ForgeTestCase[]];
470
+ }
471
+ /**
472
+ * Result returned after a forge_tool invocation.
473
+ *
474
+ * On success the new tool is registered and available immediately. On failure
475
+ * the `verdict` field explains why the judge rejected the tool.
476
+ */
477
+ export interface ForgeResult {
478
+ /**
479
+ * `true` when the tool was forged, judged, and registered successfully.
480
+ */
481
+ success: boolean;
482
+ /**
483
+ * The assigned tool ID, present only when `success` is `true`.
484
+ * @example "emergent:a1b2c3d4-e5f6-..."
485
+ */
486
+ toolId?: string;
487
+ /**
488
+ * The full emergent tool record, present only when `success` is `true`.
489
+ */
490
+ tool?: EmergentTool;
491
+ /**
492
+ * The judge's creation verdict.
493
+ * Present whether the forge succeeded or was rejected — callers can inspect
494
+ * `verdict.reasoning` to understand why a rejection occurred.
495
+ */
496
+ verdict?: CreationVerdict;
497
+ /**
498
+ * Human-readable error message for system-level failures (e.g., sandbox crash,
499
+ * schema parse error). Distinct from judge rejection — check `verdict` for those.
500
+ */
501
+ error?: string;
502
+ }
503
+ /**
504
+ * Result returned after a `promote_tool` invocation.
505
+ *
506
+ * On success the tool's tier is incremented and the new record is persisted.
507
+ */
508
+ export interface PromotionResult {
509
+ /**
510
+ * `true` when both reviewers approved and the tier was incremented.
511
+ */
512
+ success: boolean;
513
+ /**
514
+ * The multi-reviewer promotion verdict.
515
+ * Present whether the promotion succeeded or was rejected.
516
+ */
517
+ verdict?: PromotionVerdict;
518
+ /**
519
+ * Human-readable error for system-level failures during the promotion process.
520
+ */
521
+ error?: string;
522
+ }
523
+ /**
524
+ * Configuration options for the Emergent Capability Engine.
525
+ *
526
+ * All fields have sensible defaults defined in {@link DEFAULT_EMERGENT_CONFIG}.
527
+ * Pass a partial object to override only the fields you need.
528
+ */
529
+ export interface EmergentConfig {
530
+ /**
531
+ * Master switch. When `false`, all forge / promote / execute requests are
532
+ * rejected immediately with a `"emergent capabilities disabled"` error.
533
+ * @default false
534
+ */
535
+ enabled: boolean;
536
+ /**
537
+ * Maximum number of session-scoped emergent tools an agent may hold at once.
538
+ * Forge requests beyond this limit are rejected until older tools are evicted.
539
+ * @default 10
540
+ */
541
+ maxSessionTools: number;
542
+ /**
543
+ * Maximum number of agent-scoped emergent tools persisted per agent.
544
+ * Promotion from `'session'` to `'agent'` is blocked when this limit is reached.
545
+ * @default 50
546
+ */
547
+ maxAgentTools: number;
548
+ /**
549
+ * Memory limit in megabytes for each sandboxed tool execution.
550
+ * Passed as {@link SandboxExecutionRequest.memoryMB}.
551
+ * @default 128
552
+ */
553
+ sandboxMemoryMB: number;
554
+ /**
555
+ * Wall-clock timeout in milliseconds for each sandboxed tool execution.
556
+ * Passed as {@link SandboxExecutionRequest.timeoutMs}.
557
+ * @default 5000
558
+ */
559
+ sandboxTimeoutMs: number;
560
+ /**
561
+ * Thresholds that must be met before a tool is eligible for tier promotion.
562
+ */
563
+ promotionThreshold: {
564
+ /**
565
+ * Minimum total invocation count before promotion is considered.
566
+ * @default 5
567
+ */
568
+ uses: number;
569
+ /**
570
+ * Minimum aggregate confidence score (from usage stats) before promotion.
571
+ * In the range [0, 1].
572
+ * @default 0.8
573
+ */
574
+ confidence: number;
575
+ };
576
+ /**
577
+ * Model ID used by the single LLM judge at forge time ({@link CreationVerdict}).
578
+ * Should be a fast, cost-efficient model — correctness is handled by test cases.
579
+ * @default "gpt-4o-mini"
580
+ */
581
+ judgeModel: string;
582
+ /**
583
+ * Model ID used by both reviewers in the multi-reviewer promotion panel
584
+ * ({@link PromotionVerdict}). Should be a more capable model than `judgeModel`.
585
+ * @default "gpt-4o"
586
+ */
587
+ promotionJudgeModel: string;
588
+ }
589
+ /**
590
+ * Default configuration for the Emergent Capability Engine.
591
+ *
592
+ * Note: `enabled` defaults to `false` — emergent capabilities must be explicitly
593
+ * opted-in via the agent's configuration to prevent accidental runtime tool creation.
594
+ */
595
+ export declare const DEFAULT_EMERGENT_CONFIG: Readonly<EmergentConfig>;
596
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/emergent/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAM/D;;;;;;;;;GASG;AACH,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;AAMtD;;;;;;;;;GASG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,aAAa,GAAG,QAAQ,CAAC;AAM5D;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,cAA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AAE,GAAG,aAAa,EAAE,CAAC,CAAC;CAChD;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;IAEpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC;IAE1B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAE3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAMD;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;;OAIG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,kBAAkB,EAAE;QAClB;;;WAGG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;;;WAIG;QACH,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IAEF;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,cAAc,CAYnD,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @fileoverview Core types for the Emergent Capability Engine.
3
+ * @module @framers/agentos/emergent/types
4
+ *
5
+ * Provides all type definitions for the runtime tool creation system, enabling
6
+ * agents to forge new tools via composition or sandboxed code execution, subject
7
+ * to LLM-as-judge verification and tiered promotion.
8
+ *
9
+ * Key concepts:
10
+ * - ToolTier: Lifecycle scope of an emergent tool (session → agent → shared)
11
+ * - ComposableToolSpec: Pipeline of existing tool calls with input mapping
12
+ * - SandboxedToolSpec: Arbitrary code execution in a memory/time-bounded sandbox
13
+ * - CreationVerdict: LLM judge evaluation of a newly forged tool
14
+ * - PromotionVerdict: Multi-reviewer gate before tier promotion
15
+ * - EmergentTool: Unified shape for any runtime-created tool
16
+ */
17
+ /**
18
+ * Default configuration for the Emergent Capability Engine.
19
+ *
20
+ * Note: `enabled` defaults to `false` — emergent capabilities must be explicitly
21
+ * opted-in via the agent's configuration to prevent accidental runtime tool creation.
22
+ */
23
+ export const DEFAULT_EMERGENT_CONFIG = {
24
+ enabled: false,
25
+ maxSessionTools: 10,
26
+ maxAgentTools: 50,
27
+ sandboxMemoryMB: 128,
28
+ sandboxTimeoutMs: 5000,
29
+ promotionThreshold: {
30
+ uses: 5,
31
+ confidence: 0.8,
32
+ },
33
+ judgeModel: 'gpt-4o-mini',
34
+ promotionJudgeModel: 'gpt-4o',
35
+ };
36
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/emergent/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAmrBH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAA6B;IAC/D,OAAO,EAAE,KAAK;IACd,eAAe,EAAE,EAAE;IACnB,aAAa,EAAE,EAAE;IACjB,eAAe,EAAE,GAAG;IACpB,gBAAgB,EAAE,IAAI;IACtB,kBAAkB,EAAE;QAClB,IAAI,EAAE,CAAC;QACP,UAAU,EAAE,GAAG;KAChB;IACD,UAAU,EAAE,aAAa;IACzB,mBAAmB,EAAE,QAAQ;CACrB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -58,11 +58,13 @@ export type { ILogger } from './logging/ILogger';
58
58
  export { createLogger, setLoggerFactory, resetLoggerFactory } from './logging/loggerFactory';
59
59
  export * from './types/rateLimitTypes';
60
60
  export * from './core/storage';
61
+ export * from './core/usage/UsageLedger';
61
62
  export * from './rag';
62
63
  export * from './memory';
63
64
  export * from './orchestration/index.js';
64
65
  export * from './core/provenance';
65
66
  export * from './core/safety';
67
+ export * from './emergent/index.js';
66
68
  export { EXTENSION_SECRET_DEFINITIONS, type ExtensionSecretDefinition, getSecretDefinition, resolveSecretForProvider, } from './config/extensionSecrets.js';
67
69
  export { generateText } from './api/generateText.js';
68
70
  export type { GenerateTextOptions, GenerateTextResult, Message, ToolCallRecord, TokenUsage } from './api/generateText.js';
@@ -72,7 +74,12 @@ export { agent } from './api/agent.js';
72
74
  export type { Agent, AgentSession, AgentOptions } from './api/agent.js';
73
75
  export { generateImage } from './api/generateImage.js';
74
76
  export type { GenerateImageOptions, GenerateImageResult } from './api/generateImage.js';
75
- export { parseModelString, resolveProvider } from './api/model.js';
77
+ export { parseModelString, resolveProvider, resolveModelOption, } from './api/model.js';
78
+ export { PROVIDER_DEFAULTS, autoDetectProvider } from './api/provider-defaults.js';
79
+ export type { ProviderDefaults } from './api/provider-defaults.js';
80
+ export type { TaskType, ModelOption } from './api/model.js';
76
81
  export { adaptTools } from './api/toolAdapter.js';
77
82
  export type { ToolDefinitionMap } from './api/toolAdapter.js';
83
+ export { getDefaultAgentOSUsageLedgerPath, resolveAgentOSUsageLedgerPath, readRecordedAgentOSUsageEvents, recordAgentOSUsage, getRecordedAgentOSUsage, clearRecordedAgentOSUsage, } from './api/usageLedger.js';
84
+ export type { AgentOSUsageLedgerOptions, AgentOSUsageEvent, AgentOSUsageRecordInput, AgentOSUsageAggregate, } from './api/usageLedger.js';
78
85
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,kBAAkB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