@framers/agentos 0.15.64 → 0.15.65

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 (123) hide show
  1. package/.github/badges/tests.json +1 -1
  2. package/README.md +2 -2
  3. package/dist/agents/agency/AgencyRegistry.d.ts +10 -0
  4. package/dist/agents/agency/AgencyRegistry.d.ts.map +1 -1
  5. package/dist/agents/agency/AgencyRegistry.js +38 -0
  6. package/dist/agents/agency/AgencyRegistry.js.map +1 -1
  7. package/dist/api/AgentOS.d.ts +21 -0
  8. package/dist/api/AgentOS.d.ts.map +1 -1
  9. package/dist/api/AgentOS.js +43 -0
  10. package/dist/api/AgentOS.js.map +1 -1
  11. package/dist/api/agent.d.ts +8 -5
  12. package/dist/api/agent.d.ts.map +1 -1
  13. package/dist/api/agent.js.map +1 -1
  14. package/dist/api/gmi.d.ts.map +1 -1
  15. package/dist/api/gmi.js +27 -14
  16. package/dist/api/gmi.js.map +1 -1
  17. package/dist/api/index.d.ts +1 -0
  18. package/dist/api/index.d.ts.map +1 -1
  19. package/dist/api/index.js.map +1 -1
  20. package/dist/api/runtime/WorkflowFacade.d.ts +6 -0
  21. package/dist/api/runtime/WorkflowFacade.d.ts.map +1 -1
  22. package/dist/api/runtime/WorkflowFacade.js +7 -0
  23. package/dist/api/runtime/WorkflowFacade.js.map +1 -1
  24. package/dist/api/runtime/agencyLaunch/gmiLaunchTool.d.ts +3 -2
  25. package/dist/api/runtime/agencyLaunch/gmiLaunchTool.d.ts.map +1 -1
  26. package/dist/api/runtime/agencyLaunch/gmiLaunchTool.js +122 -61
  27. package/dist/api/runtime/agencyLaunch/gmiLaunchTool.js.map +1 -1
  28. package/dist/api/runtime/agencyLaunch/index.d.ts +11 -0
  29. package/dist/api/runtime/agencyLaunch/index.d.ts.map +1 -0
  30. package/dist/api/runtime/agencyLaunch/index.js +11 -0
  31. package/dist/api/runtime/agencyLaunch/index.js.map +1 -0
  32. package/dist/api/runtime/agencyLaunch/launchRegistry.d.ts +4 -1
  33. package/dist/api/runtime/agencyLaunch/launchRegistry.d.ts.map +1 -1
  34. package/dist/api/runtime/agencyLaunch/launchRegistry.js.map +1 -1
  35. package/dist/api/runtime/agencyLaunch/meteredProviderManager.d.ts +13 -0
  36. package/dist/api/runtime/agencyLaunch/meteredProviderManager.d.ts.map +1 -1
  37. package/dist/api/runtime/agencyLaunch/meteredProviderManager.js +19 -0
  38. package/dist/api/runtime/agencyLaunch/meteredProviderManager.js.map +1 -1
  39. package/dist/api/runtime/agencyLaunch/runLaunch.d.ts +32 -3
  40. package/dist/api/runtime/agencyLaunch/runLaunch.d.ts.map +1 -1
  41. package/dist/api/runtime/agencyLaunch/runLaunch.js +57 -9
  42. package/dist/api/runtime/agencyLaunch/runLaunch.js.map +1 -1
  43. package/dist/api/runtime/agencyLaunch/runtimeLaunchTool.d.ts +84 -0
  44. package/dist/api/runtime/agencyLaunch/runtimeLaunchTool.d.ts.map +1 -0
  45. package/dist/api/runtime/agencyLaunch/runtimeLaunchTool.js +344 -0
  46. package/dist/api/runtime/agencyLaunch/runtimeLaunchTool.js.map +1 -0
  47. package/dist/api/runtime/agencyLaunch/runtimeSeat.d.ts +61 -0
  48. package/dist/api/runtime/agencyLaunch/runtimeSeat.d.ts.map +1 -0
  49. package/dist/api/runtime/agencyLaunch/runtimeSeat.js +277 -0
  50. package/dist/api/runtime/agencyLaunch/runtimeSeat.js.map +1 -0
  51. package/dist/api/runtime/agencyLaunch/seatToolView.d.ts +11 -0
  52. package/dist/api/runtime/agencyLaunch/seatToolView.d.ts.map +1 -0
  53. package/dist/api/runtime/agencyLaunch/seatToolView.js +69 -0
  54. package/dist/api/runtime/agencyLaunch/seatToolView.js.map +1 -0
  55. package/dist/api/runtime/agencyLaunch/types.d.ts +126 -13
  56. package/dist/api/runtime/agencyLaunch/types.d.ts.map +1 -1
  57. package/dist/api/runtime/agencyLaunch/types.js +102 -2
  58. package/dist/api/runtime/agencyLaunch/types.js.map +1 -1
  59. package/dist/api/runtime/capabilityContract.d.ts +7 -1
  60. package/dist/api/runtime/capabilityContract.d.ts.map +1 -1
  61. package/dist/api/runtime/capabilityContract.js +6 -0
  62. package/dist/api/runtime/capabilityContract.js.map +1 -1
  63. package/dist/api/runtime/gmiPersona.d.ts +6 -0
  64. package/dist/api/runtime/gmiPersona.d.ts.map +1 -1
  65. package/dist/api/runtime/gmiPersona.js +9 -1
  66. package/dist/api/runtime/gmiPersona.js.map +1 -1
  67. package/dist/api/runtime/gmiSession.d.ts +4 -3
  68. package/dist/api/runtime/gmiSession.d.ts.map +1 -1
  69. package/dist/api/runtime/gmiSession.js +1 -1
  70. package/dist/api/runtime/gmiSession.js.map +1 -1
  71. package/dist/api/runtime/lightweightAgentDiagnostics.d.ts +14 -6
  72. package/dist/api/runtime/lightweightAgentDiagnostics.d.ts.map +1 -1
  73. package/dist/api/runtime/lightweightAgentDiagnostics.js +10 -4
  74. package/dist/api/runtime/lightweightAgentDiagnostics.js.map +1 -1
  75. package/dist/api/types.d.ts +11 -5
  76. package/dist/api/types.d.ts.map +1 -1
  77. package/dist/api/types.js.map +1 -1
  78. package/dist/cognition/emergent/CreateWorkflowTool.d.ts +12 -2
  79. package/dist/cognition/emergent/CreateWorkflowTool.d.ts.map +1 -1
  80. package/dist/cognition/emergent/CreateWorkflowTool.js +12 -2
  81. package/dist/cognition/emergent/CreateWorkflowTool.js.map +1 -1
  82. package/dist/cognition/emergent/EmergentCapabilityEngine.d.ts +8 -1
  83. package/dist/cognition/emergent/EmergentCapabilityEngine.d.ts.map +1 -1
  84. package/dist/cognition/emergent/EmergentCapabilityEngine.js +11 -0
  85. package/dist/cognition/emergent/EmergentCapabilityEngine.js.map +1 -1
  86. package/dist/cognition/emergent/SelfImprovementConfig.d.ts +8 -2
  87. package/dist/cognition/emergent/SelfImprovementConfig.d.ts.map +1 -1
  88. package/dist/cognition/emergent/SelfImprovementConfig.js.map +1 -1
  89. package/dist/cognition/emergent/StepGate.d.ts +15 -3
  90. package/dist/cognition/emergent/StepGate.d.ts.map +1 -1
  91. package/dist/cognition/emergent/StepGate.js +33 -5
  92. package/dist/cognition/emergent/StepGate.js.map +1 -1
  93. package/dist/cognition/emergent/types.d.ts +4 -2
  94. package/dist/cognition/emergent/types.d.ts.map +1 -1
  95. package/dist/cognition/emergent/types.js.map +1 -1
  96. package/dist/cognition/substrate/GMI.d.ts +8 -2
  97. package/dist/cognition/substrate/GMI.d.ts.map +1 -1
  98. package/dist/cognition/substrate/GMI.js +52 -5
  99. package/dist/cognition/substrate/GMI.js.map +1 -1
  100. package/dist/cognition/substrate/GMIManager.d.ts +88 -9
  101. package/dist/cognition/substrate/GMIManager.d.ts.map +1 -1
  102. package/dist/cognition/substrate/GMIManager.js +202 -11
  103. package/dist/cognition/substrate/GMIManager.js.map +1 -1
  104. package/dist/cognition/substrate/IGMI.d.ts +7 -0
  105. package/dist/cognition/substrate/IGMI.d.ts.map +1 -1
  106. package/dist/cognition/substrate/IGMI.js.map +1 -1
  107. package/dist/core/llm/providers/AIModelProviderManager.d.ts +11 -0
  108. package/dist/core/llm/providers/AIModelProviderManager.d.ts.map +1 -1
  109. package/dist/core/llm/providers/AIModelProviderManager.js +18 -0
  110. package/dist/core/llm/providers/AIModelProviderManager.js.map +1 -1
  111. package/dist/core/tools/ITool.d.ts +11 -5
  112. package/dist/core/tools/ITool.d.ts.map +1 -1
  113. package/dist/core/tools/ToolExecutor.d.ts +15 -9
  114. package/dist/core/tools/ToolExecutor.d.ts.map +1 -1
  115. package/dist/core/tools/ToolExecutor.js.map +1 -1
  116. package/dist/core/tools/ToolOrchestrator.d.ts +8 -0
  117. package/dist/core/tools/ToolOrchestrator.d.ts.map +1 -1
  118. package/dist/core/tools/ToolOrchestrator.js +37 -11
  119. package/dist/core/tools/ToolOrchestrator.js.map +1 -1
  120. package/dist/index.d.ts +1 -0
  121. package/dist/index.d.ts.map +1 -1
  122. package/dist/index.js.map +1 -1
  123. package/package.json +1 -1
@@ -16,8 +16,9 @@ export interface GmiLaunchToolOptions {
16
16
  /** Builds a temporary seat's agent (gmi() itself). */
17
17
  createAgent: (options: AgentOptions) => Agent;
18
18
  /**
19
- * The provider and model the agent's persona resolved in its shared build: those its options name, else the pair its
20
- * first call resolved from the environment. Every turn that can launch runs on that build, so it has resolved.
19
+ * The provider and model the agent's persona resolved in its shared build: those its options name (the provider's
20
+ * default model when they name only a provider), else the pair its first call resolved from the environment. Every
21
+ * turn that can launch runs on that build, so it has resolved.
21
22
  */
22
23
  route: () => Promise<{
23
24
  provider?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"gmiLaunchTool.d.ts","sourceRoot":"","sources":["../../../../src/api/runtime/agencyLaunch/gmiLaunchTool.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EAAE,KAAK,EAA+D,MAAM,8BAA8B,CAAC;AAIvH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAInE,OAAO,EAKL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EAElB,MAAM,YAAY,CAAC;AAKpB,iCAAiC;AACjC,MAAM,WAAW,oBAAoB;IACnC,qCAAqC;IACrC,IAAI,EAAE,YAAY,CAAC;IACnB,2EAA2E;IAC3E,MAAM,EAAE,YAAY,CAAC;IACrB,oHAAoH;IACpH,KAAK,EAAE,MAAM,SAAS,KAAK,EAAE,CAAC;IAC9B,kIAAkI;IAClI,MAAM,CAAC,EAAE,yBAAyB,CAAC;IACnC,sDAAsD;IACtD,WAAW,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,KAAK,CAAC;IAC9C;;;OAGG;IACH,KAAK,EAAE,MAAM,OAAO,CAAC;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC7D;AAkGD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,oBAAoB,GAAG,KAAK,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAgJxG"}
1
+ {"version":3,"file":"gmiLaunchTool.d.ts","sourceRoot":"","sources":["../../../../src/api/runtime/agencyLaunch/gmiLaunchTool.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EAAE,KAAK,EAA6C,MAAM,8BAA8B,CAAC;AAKrG,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAInE,OAAO,EAOL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EAElB,MAAM,YAAY,CAAC;AAQpB,iCAAiC;AACjC,MAAM,WAAW,oBAAoB;IACnC,qCAAqC;IACrC,IAAI,EAAE,YAAY,CAAC;IACnB,2EAA2E;IAC3E,MAAM,EAAE,YAAY,CAAC;IACrB,oHAAoH;IACpH,KAAK,EAAE,MAAM,SAAS,KAAK,EAAE,CAAC;IAC9B,kIAAkI;IAClI,MAAM,CAAC,EAAE,yBAAyB,CAAC;IACnC,sDAAsD;IACtD,WAAW,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,KAAK,CAAC;IAC9C;;;;OAIG;IACH,KAAK,EAAE,MAAM,OAAO,CAAC;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC7D;AAyDD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,oBAAoB,GAAG,KAAK,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CA4OxG"}
@@ -2,21 +2,27 @@
2
2
  * @file gmiLaunchTool.ts
3
3
  * `launch_agency` on gmi(): the tool a gmi() agent with `agencies.launch` registers, and the host the launch engine
4
4
  * runs through on that surface. A temporary seat is a gmi() agent built for the launch from the launching agent's route
5
- * (the provider and model its persona resolved, and its other route options), the seat's instructions and the very tool
6
- * instances its allowlist names, on the light profile with no memory and no learner, and closed with the seat; a
7
- * persistent seat runs a member of `agencies.members` as itself, through a session of its own. The engine, and agency()
8
- * with it, is imported on the first launch, so building an agent loads neither.
5
+ * (the provider and model its persona resolved, and its other route options), its generation hooks and request timeout,
6
+ * the seat's instructions and the very tool instances its allowlist names, on the light profile with no memory and no
7
+ * learner, and closed with the seat; a persistent seat runs a member of `agencies.members` as itself, through a session
8
+ * of its own. Every seat's tool calls run the tool hooks of the turn that launched the team before the seat's own. A
9
+ * seat whose call fails rejects with its error's name and code alone, and the error itself goes to the agent's
10
+ * `on.error`, else to the console; a team whose run fails is reported to that callback once, by the team. The engine,
11
+ * and agency() with it, is imported on the first launch, so building an agent loads neither.
9
12
  * @internal
10
13
  */
11
14
  import { randomUUID } from 'node:crypto';
12
15
  import { createContentSafeConsole } from '../../../core/logging/contentSafeConsole.js';
16
+ import { callMaxTokensOf } from '../gmiPersona.js';
13
17
  import { outputEstimateTokens } from '../spendBudget.js';
14
18
  import { adaptTools } from '../toolAdapter.js';
15
19
  import { buildSessionSeat, descriptionOf } from './sessionSeat.js';
16
- import { LAUNCH_AGENCY_TOOL_NAME, LAUNCH_STRATEGIES, gmiOptionsOf, } from './types.js';
20
+ import { LAUNCH_AGENCY_TOOL_NAME, gmiOptionsOf, gmiRouteOf, launchAgencyDescription, launchAgencyInputSchema, } from './types.js';
17
21
  /** This module's fixed diagnostic origin; no runtime name enters telemetry. */
18
22
  const console = createContentSafeConsole('gmi_launch_tool');
19
- /** The launching agent's options a temporary seat's agent takes: its route and its completion settings. */
23
+ /** What the engine names a team's failed run when it reports it (runLaunch). */
24
+ const RUN_FAILED = `${LAUNCH_AGENCY_TOOL_NAME} run`;
25
+ /** The launching agent's options a temporary seat's agent takes: its route, completion settings and generation hooks. */
20
26
  const SEAT_OPTION_KEYS = [
21
27
  'provider',
22
28
  'model',
@@ -32,10 +38,18 @@ const SEAT_OPTION_KEYS = [
32
38
  'thinking',
33
39
  'effort',
34
40
  'customModelParams',
41
+ 'cache',
35
42
  'maxSteps',
36
43
  'chainOfThought',
44
+ // Its generation hooks, so a host's rewrite of a request or of a step's text covers the seat's calls. Its tool hook is
45
+ // not among them: every seat's tool calls run the hooks of the turn that launched the team, the agent's own among them.
46
+ 'onBeforeGeneration',
47
+ 'onAfterGeneration',
37
48
  ];
38
- /** The options of a temporary seat's agent: the launching agent's route, the seat's role, instructions and tools. */
49
+ /**
50
+ * The options of a temporary seat's agent: the launching agent's route, generation hooks and request timeout, and the
51
+ * seat's role, instructions and tools.
52
+ */
39
53
  function temporarySeatOptions(parent, role, instructions, tools, ledger) {
40
54
  const inherited = {};
41
55
  for (const key of SEAT_OPTION_KEYS)
@@ -50,6 +64,9 @@ function temporarySeatOptions(parent, role, instructions, tools, ledger) {
50
64
  // The light profile with no memory: a seat runs one goal, and nothing it is told outlives the launch.
51
65
  cognition: 'light',
52
66
  ...(ledger ? { usageLedger: { ...ledger, source: LAUNCH_AGENCY_TOOL_NAME } } : {}),
67
+ // The launching agent's request timeout bounds each of the seat's calls too. Its other controls stay the agent's:
68
+ // the launch's budget bounds what the seat spends.
69
+ ...(parent.controls?.maxDurationMs !== undefined ? { controls: { maxDurationMs: parent.controls.maxDurationMs } } : {}),
53
70
  };
54
71
  }
55
72
  /** The tool names a persistent member's own turns can run: its tools, and launch_agency when it launches teams itself. */
@@ -60,55 +77,6 @@ function memberToolNames(member) {
60
77
  names.add(LAUNCH_AGENCY_TOOL_NAME);
61
78
  return names;
62
79
  }
63
- /** The input schema the model is offered. Counts, unknown keys and the forms' rules are the engine's, with its codes. */
64
- function inputSchemaFor(limits, memberKeys) {
65
- const names = { type: 'array', items: { type: 'string' } };
66
- const seat = {
67
- type: 'object',
68
- properties: {
69
- role: { type: 'string', description: "The seat's name in the team, unique: a letter, then letters, digits, '_' or '-', at most 52 characters." },
70
- instructions: { type: 'string', description: 'Who the seat is and what it does: the system prompt of an agent made for this team.' },
71
- ...(memberKeys.length > 0
72
- ? {
73
- agentKey: { type: 'string', description: `A persistent member to seat as itself, in place of instructions: one of ${memberKeys.join(', ')}.` },
74
- brief: { type: 'string', description: "A member's brief for this team, at most 1,000 characters; only with agentKey." },
75
- }
76
- : {}),
77
- tools: { ...names, description: 'The names of your own tools this seat may use. A seat given none uses none.' },
78
- dependsOn: { ...names, description: 'For the graph strategy: the roles this seat waits for; their outputs are its input.' },
79
- },
80
- required: ['role'],
81
- };
82
- return {
83
- type: 'object',
84
- properties: {
85
- goal: { type: 'string', description: 'What the team must produce, in full: its members see nothing of this conversation. At most 8,000 characters.' },
86
- strategy: {
87
- type: 'string',
88
- enum: [...LAUNCH_STRATEGIES],
89
- description: "How the seats work together. sequential (the default): each seat receives the task and the previous seat's output. parallel: every seat answers at once, and one answer is made from theirs. debate: the seats argue in rounds, and their arguments are summed up. review-loop: exactly two seats, the first writes and the second reviews until it approves. hierarchical: a manager delegates to the seats. graph: a seat runs once the seats its dependsOn names have answered.",
90
- },
91
- seats: { type: 'array', items: seat, description: `The team, at most ${limits.maxSeats} seats.` },
92
- budgetUsd: { type: 'number', description: 'The most the team may spend, in US dollars; the launch takes the least of this and its own bounds.' },
93
- maxTokens: { type: 'number', description: 'The most tokens the team may use; the launch takes the least of this and its own bounds.' },
94
- deadlineMs: { type: 'number', description: `The team's deadline in milliseconds, at least 1,000; default ${limits.defaultDeadlineMs}, at most ${limits.maxDeadlineMs}.` },
95
- maxRounds: { type: 'integer', description: 'The rounds of debate and review-loop: 1, 2 or 3 (the default).' },
96
- },
97
- required: ['goal', 'seats'],
98
- };
99
- }
100
- /** What the model reads about the tool. */
101
- function descriptionFor(limits, memberKeys) {
102
- const members = memberKeys.length > 0 ? `, or a member you seat as itself by agentKey (${memberKeys.join(', ')})` : '';
103
- return [
104
- "Launches a temporary team of agents on one goal and returns the team's answer as this call's result.",
105
- `Each seat is an agent with the instructions you give it${members}.`,
106
- "The team sees nothing of this conversation, so put everything it needs in the goal and each seat's instructions.",
107
- "A seat uses only the tools its tools list names, from your own tools.",
108
- `At most ${limits.maxSeats} seats; the team runs within a share of this turn's budget and a deadline.`,
109
- 'A launch that is refused returns an error that starts with its code, such as too_many_seats or invalid_arguments.',
110
- ].join(' ');
111
- }
112
80
  /**
113
81
  * The `launch_agency` tool of a gmi() agent with `agencies.launch`.
114
82
  *
@@ -120,12 +88,68 @@ export function createGmiLaunchTool(o) {
120
88
  // One id per agent: a root launch's scope is this agent and the launching session, so two agents' sessions of one
121
89
  // id are two scopes.
122
90
  const agentScope = randomUUID();
123
- const members = opts.agencies?.members ?? {};
91
+ // The members record, copied once: resolveLaunchLimits checked these entries at construction, so a member the caller
92
+ // puts in its record later, under a new key or an old one, never takes a seat.
93
+ const members = Object.freeze({ ...opts.agencies?.members });
124
94
  const memberKeys = Object.keys(members);
95
+ // The members the schema and the description offer by agentKey: none when the record names none.
96
+ const memberForm = memberKeys.length > 0 ? { field: 'agentKey', keys: memberKeys } : undefined;
125
97
  const learning = opts.learning;
126
98
  const namespace = typeof learning === 'object' && learning !== null && typeof learning.namespace === 'string' ? learning.namespace : '';
99
+ /**
100
+ * The agent's callbacks as it was built with them, which the child agency of every launch fires as
101
+ * `launch:<agencyId>`: a team whose run fails reports it to their `error` itself.
102
+ */
103
+ const callbacks = opts.on;
104
+ /**
105
+ * Where a launch's failures go: a seat's failed call, whose original error the seat keeps from the team's models and
106
+ * from the result (it rejects with the error's name and code alone), and a route, a run or a close that failed. The
107
+ * agent's `on.error` receives each, under `launch_agency` and what failed (`launch_agency seat <role>`,
108
+ * `launch_agency close`), with the agent's `on` object as `this`, as agency() calls its callbacks; without it, the
109
+ * console does. A run that fails is reported to `on.error` once, by the team, which hands it the error it rejects
110
+ * with under its own name; the launch reports the run (`launch_agency run`) only where the team has not: to the
111
+ * console when those callbacks hold no error callback, and to an `on` the agent's options took after it was built. A
112
+ * callback that throws or rejects fails no launch: its error and the one it was handed go to the console. Never
113
+ * throws: a seat reports its failed call through it.
114
+ */
127
115
  const logError = (error, where) => {
128
- console.warn(`[agentos] gmi(): ${where} failed:`, error);
116
+ const agent = where.startsWith(LAUNCH_AGENCY_TOOL_NAME) ? where : `${LAUNCH_AGENCY_TOOL_NAME} ${where}`;
117
+ const warn = (...args) => {
118
+ try {
119
+ console.warn(...args);
120
+ }
121
+ catch {
122
+ // A console that throws fails no launch.
123
+ }
124
+ };
125
+ const callbackFailed = (callbackError) => {
126
+ warn('[agentos] gmi(): on.error threw:', callbackError);
127
+ warn(`[agentos] gmi(): ${agent} failed:`, error);
128
+ };
129
+ try {
130
+ // Read at each report, as agency() reads its callbacks, so one set or replaced after the agent was built runs.
131
+ const on = opts.on;
132
+ const onError = on?.error;
133
+ // The team handed its failed run to this very callback, under its own name.
134
+ if (where === RUN_FAILED && on === callbacks && typeof onError === 'function')
135
+ return;
136
+ if (typeof onError !== 'function') {
137
+ warn(`[agentos] gmi(): ${agent} failed:`, error);
138
+ return;
139
+ }
140
+ const returned = onError.call(on, {
141
+ agent,
142
+ error: error instanceof Error ? error : new Error(String(error)),
143
+ timestamp: Date.now(),
144
+ });
145
+ // An async callback fails by rejecting.
146
+ if ((typeof returned === 'object' || typeof returned === 'function') && returned !== null && typeof returned.then === 'function') {
147
+ Promise.resolve(returned).then(undefined, callbackFailed);
148
+ }
149
+ }
150
+ catch (callbackError) {
151
+ callbackFailed(callbackError);
152
+ }
129
153
  };
130
154
  /** The member of a persistent seat, by its agentKey. */
131
155
  const memberOf = (ref) => (Object.prototype.hasOwnProperty.call(members, ref) ? members[ref] : undefined);
@@ -146,12 +170,40 @@ export function createGmiLaunchTool(o) {
146
170
  return { ...(opts.provider ? { provider: opts.provider } : {}), ...(opts.model ? { model: opts.model } : {}) };
147
171
  }
148
172
  };
173
+ /**
174
+ * The output tokens one call of a temporary seat is counted with, as the seat's own check counts it: the agent's
175
+ * maxTokens, which the seat takes, held to the output ceiling of the model the persona resolved, which the seat runs
176
+ * on (4,096 when maxTokens is unset). The one-call floor counts it for the temporary seats of every launch this agent
177
+ * runs: its root launches, and the teams it launches from a seat it holds in another agent's team, whose seats it
178
+ * builds on this route too.
179
+ */
180
+ const seatOutputEstimate = async () => outputEstimateTokens((await agentRoute()).model ?? '', opts.maxTokens);
181
+ /**
182
+ * The output tokens one call of a member's seat is counted with, as its own check counts it: the member runs as
183
+ * itself, so the cap its calls are sent with (its maxTokens, else its controls.maxTotalTokens) held to the output
184
+ * ceiling of the model its persona resolved (the model its options name when that pair cannot be read).
185
+ */
186
+ const memberOutputEstimate = async (ref) => {
187
+ const member = memberOf(ref);
188
+ if (!member)
189
+ return undefined;
190
+ const config = gmiOptionsOf(member) ?? {};
191
+ let model = config.model;
192
+ try {
193
+ model = (await gmiRouteOf(member)?.())?.model ?? model;
194
+ }
195
+ catch (error) {
196
+ logError(error, `launch_agency member ${ref} route`);
197
+ }
198
+ return outputEstimateTokens(model ?? '', callMaxTokensOf(config));
199
+ };
149
200
  const host = {
150
201
  surface: 'gmi',
151
202
  async rootParent(ctx) {
152
203
  const caller = ctx.callerTurn;
153
204
  const sessionId = String(ctx.sessionData?.sessionId ?? ctx.gmiId);
154
205
  const conversationId = ctx.sessionData?.conversationId;
206
+ const outputEstimate = await seatOutputEstimate();
155
207
  return {
156
208
  gmiId: ctx.gmiId,
157
209
  personaId: ctx.personaId,
@@ -160,6 +212,8 @@ export function createGmiLaunchTool(o) {
160
212
  depth: 0,
161
213
  limits,
162
214
  ...(caller?.budget ? { budget: caller.budget } : {}),
215
+ // The gate the launching turn carries (an agency's, when this agent is one of its members): the team asks it
216
+ // first on every seat's tool call, and its refusal is final.
163
217
  ...(caller?.approvalGate ? { approvalGate: caller.approvalGate } : {}),
164
218
  ...(ctx.signal ? { signal: ctx.signal } : {}),
165
219
  ...(caller?.providerUserId !== undefined ? { providerUserId: caller.providerUserId } : {}),
@@ -167,11 +221,15 @@ export function createGmiLaunchTool(o) {
167
221
  ...(ctx.correlationId ? { turnId: ctx.correlationId } : {}),
168
222
  // The GMI's tool view: the turn's launch pool lasts as long as the GMI that runs the turn.
169
223
  ...(caller?.dispatch ? { poolOwner: caller.dispatch } : {}),
224
+ // The hooks the launching turn's calls ran under, outermost first: any it carried, then the agent's own. Every
225
+ // seat's tool calls run them before the seat's own hook, a member's included.
170
226
  toolHooks: caller?.toolHooks ?? [],
171
- outputEstimateTokens: outputEstimateTokens(opts.model ?? '', opts.maxTokens),
227
+ outputEstimateTokens: outputEstimate,
172
228
  scopeId: `${agentScope}:${sessionId}`,
173
229
  };
174
230
  },
231
+ outputEstimateTokens: seatOutputEstimate,
232
+ memberOutputEstimateTokens: memberOutputEstimate,
175
233
  async parentToolNames(ctx) {
176
234
  // A seat's turn runs only its names; any other turn runs every tool of the agent.
177
235
  return ctx.callerTurn?.toolNames ?? new Set(o.tools().map((tool) => tool.name));
@@ -233,6 +291,9 @@ export function createGmiLaunchTool(o) {
233
291
  ...(opts.baseUrl !== undefined ? { baseUrl: opts.baseUrl } : {}),
234
292
  };
235
293
  },
294
+ // The agent's callbacks, for the child agency, which fires them as `launch:<agencyId>`: the agent's `on` sees every
295
+ // team it launches, a team one of its temporary seats launches through the agent's own tool included.
296
+ ...(callbacks ? { callbacks } : {}),
236
297
  ...(ledger ? { usageLedger: ledger } : {}),
237
298
  // gmi() keeps no registry of running teams.
238
299
  recorder: { start: () => undefined, close: () => undefined },
@@ -242,8 +303,8 @@ export function createGmiLaunchTool(o) {
242
303
  id: `launch-agency-${agentScope}`,
243
304
  name: LAUNCH_AGENCY_TOOL_NAME,
244
305
  displayName: 'Launch agency',
245
- description: descriptionFor(limits, memberKeys),
246
- inputSchema: inputSchemaFor(limits, memberKeys),
306
+ description: launchAgencyDescription(limits, memberForm),
307
+ inputSchema: launchAgencyInputSchema(limits, memberForm),
247
308
  category: 'agency',
248
309
  hasSideEffects: true,
249
310
  async execute(args, ctx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aACjE,CAAC;QACJ,CAAC;QAED,oHAAoH;QACpH,sGAAsG;QACtG,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACnC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1C,4CAA4C;QAC5C,QAAQ,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE;QAC5D,QAAQ;KACT,CAAC;IAEF,OAAO;QACL,EAAE,EAAE,iBAAiB,UAAU,EAAE;QACjC,IAAI,EAAE,uBAAuB;QAC7B,WAAW,EAAE,eAAe;QAC5B,WAAW,EAAE,uBAAuB,CAAC,MAAM,EAAE,UAAU,CAAC;QACxD,WAAW,EAAE,uBAAuB,CAAC,MAAM,EAAE,UAAU,CAAC;QACxD,QAAQ,EAAE,QAAQ;QAClB,cAAc,EAAE,IAAI;QACpB,KAAK,CAAC,OAAO,CAAC,IAAsB,EAAE,GAAyB;YAC7D,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC,CAAC;YACrD,OAAO,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;QACpC,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @file index.ts
3
+ * The public surface of teams of GMIs (docs/AGENCIES.md), all of which the package root and `./api` export:
4
+ * `sessionSeat()`, which seats a persistent gmi() agent in an agency as itself, the `launch_agency` tool's name, and
5
+ * the types of the `agencies` options, a launch tree's limits, the tool's arguments and result, a seat, the frame a
6
+ * seat's turns carry, the turn a tool call came from, a tool hook and a launched team's registry record. Neither the
7
+ * root nor `./api` exports the launch registry, the engine or the two tool factories.
8
+ */
9
+ export { sessionSeat, type SessionSeatOptions, type SeatHandle } from './sessionSeat.js';
10
+ export { LAUNCH_AGENCY_TOOL_NAME, type AgencyLaunchOptions, type RuntimeAgencyLaunchOptions, type LaunchLimits, type AgencyLaunchFrame, type CallerTurnContext, type ToolCallHook, type LaunchSeatSpec, type LaunchAgencyArgs, type LaunchStatus, type LaunchRefusalCode, type LaunchRefusal, type LaunchUsage, type LaunchSeatRecord, type LaunchAgencyResult, type LaunchRecordMetadata, type SeatMetadata, } from './types.js';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/runtime/agencyLaunch/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACzF,OAAO,EACL,uBAAuB,EACvB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,YAAY,GAClB,MAAM,YAAY,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @file index.ts
3
+ * The public surface of teams of GMIs (docs/AGENCIES.md), all of which the package root and `./api` export:
4
+ * `sessionSeat()`, which seats a persistent gmi() agent in an agency as itself, the `launch_agency` tool's name, and
5
+ * the types of the `agencies` options, a launch tree's limits, the tool's arguments and result, a seat, the frame a
6
+ * seat's turns carry, the turn a tool call came from, a tool hook and a launched team's registry record. Neither the
7
+ * root nor `./api` exports the launch registry, the engine or the two tool factories.
8
+ */
9
+ export { sessionSeat } from './sessionSeat.js';
10
+ export { LAUNCH_AGENCY_TOOL_NAME, } from './types.js';
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/runtime/agencyLaunch/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,WAAW,EAA4C,MAAM,kBAAkB,CAAC;AACzF,OAAO,EACL,uBAAuB,GAiBxB,MAAM,YAAY,CAAC"}
@@ -31,7 +31,10 @@ export interface LaunchEntry {
31
31
  toolHooks: readonly ToolCallHook[];
32
32
  /** Each seat's tool names, by role: a nested launch's parent tool names. */
33
33
  seatTools: Map<string, ReadonlySet<string>>;
34
- /** The output tokens one call of the tree's route is counted with. */
34
+ /**
35
+ * The output tokens one call of this launch's seats is counted with; a launch nested under it counts this when its
36
+ * host counts none of its own.
37
+ */
35
38
  outputEstimateTokens: number;
36
39
  /**
37
40
  * 'closing': the run outlived the grace, or its seats, or those of a launch nested under it, are not released yet;
@@ -1 +1 @@
1
- {"version":3,"file":"launchRegistry.d.ts","sourceRoot":"","sources":["../../../../src/api/runtime/agencyLaunch/launchRegistry.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAK7D,4BAA4B;AAC5B,MAAM,WAAW,WAAW;IAC1B,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;IACjB,wBAAwB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,MAAM,EAAE,YAAY,CAAC;IACrB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,4BAA4B;IAC5B,MAAM,EAAE,WAAW,CAAC;IACpB,2CAA2C;IAC3C,YAAY,CAAC,EAAE,cAAc,CAAC;IAC9B,mDAAmD;IACnD,MA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AC;IAED,wFAAwF;IACxF,WAAW,CAAC,QAAgB;QAC1B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC;YAAE,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;QACrD,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;YACnC,MAAM,OAAO,GAAG,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YAC7C,IAAI,OAAO;gBAAE,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;;gBAC9B,cAAc,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,QAAgB;QACrB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACzB,IAAI,KAAK,CAAC,IAAI,GAAG,eAAe;YAAE,aAAa,EAAE,CAAC;QAClD,MAAM,OAAO,GAAG,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC7C,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAChC,KAAK,MAAM,OAAO,IAAI,OAAO,IAAI,EAAE;YAAE,OAAO,EAAE,CAAC;IACjD,CAAC;CACF,CAAC"}
@@ -4,6 +4,7 @@
4
4
  * metaprompts and self-reflection reach through `gmi()`'s provider manager, and the provider manager of a
5
5
  * runtime seat of a launched team, through which every one of that seat's completion calls goes.
6
6
  */
7
+ import type { AIModelProviderManager } from '../../../core/llm/providers/AIModelProviderManager.js';
7
8
  import type { IProvider, ModelUsage } from '../../../core/llm/providers/IProvider.js';
8
9
  import { type SpendBudget } from '../spendBudget.js';
9
10
  /**
@@ -22,4 +23,16 @@ import { type SpendBudget } from '../spendBudget.js';
22
23
  * @param onUsage - Receives each charged usage report (a seat's own totals).
23
24
  */
24
25
  export declare function meteredProvider(provider: IProvider, budget: SpendBudget, what: string, onUsage?: (usage: ModelUsage) => void): IProvider;
26
+ /**
27
+ * A view of a provider manager whose providers check `budget` before each completion request and charge each answer
28
+ * ({@link meteredProvider}, the calls recorded as `launch.seat`); every other member runs on `base`. A runtime seat's
29
+ * GMI makes every completion call through it, its steps, metaprompts and self-reflection alike, so each is refused
30
+ * before its request once the launch's budget is spent, and a step whose turn has already stopped is not sent.
31
+ * Embeddings are not counted.
32
+ *
33
+ * @param base - The runtime's provider manager.
34
+ * @param budget - The launch's budget.
35
+ * @returns The view, typed as the manager it wraps.
36
+ */
37
+ export declare function meteredProviderManager(base: AIModelProviderManager, budget: SpendBudget): AIModelProviderManager;
25
38
  //# sourceMappingURL=meteredProviderManager.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"meteredProviderManager.d.ts","sourceRoot":"","sources":["../../../../src/api/runtime/agencyLaunch/meteredProviderManager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAe,SAAS,EAAmD,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACpJ,OAAO,EAAyD,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAmB5G;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,GAAG,SAAS,CAiDxI"}
1
+ {"version":3,"file":"meteredProviderManager.d.ts","sourceRoot":"","sources":["../../../../src/api/runtime/agencyLaunch/meteredProviderManager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uDAAuD,CAAC;AACpG,OAAO,KAAK,EAAe,SAAS,EAAmD,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACpJ,OAAO,EAAyD,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAmB5G;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,GAAG,SAAS,CAiDxI;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,sBAAsB,EAAE,MAAM,EAAE,WAAW,GAAG,sBAAsB,CAOhH"}
@@ -85,4 +85,23 @@ export function meteredProvider(provider, budget, what, onUsage) {
85
85
  generateCompletionStream: stream,
86
86
  });
87
87
  }
88
+ /**
89
+ * A view of a provider manager whose providers check `budget` before each completion request and charge each answer
90
+ * ({@link meteredProvider}, the calls recorded as `launch.seat`); every other member runs on `base`. A runtime seat's
91
+ * GMI makes every completion call through it, its steps, metaprompts and self-reflection alike, so each is refused
92
+ * before its request once the launch's budget is spent, and a step whose turn has already stopped is not sent.
93
+ * Embeddings are not counted.
94
+ *
95
+ * @param base - The runtime's provider manager.
96
+ * @param budget - The launch's budget.
97
+ * @returns The view, typed as the manager it wraps.
98
+ */
99
+ export function meteredProviderManager(base, budget) {
100
+ const metered = (provider) => (provider ? meteredProvider(provider, budget, 'launch.seat') : undefined);
101
+ return withMembers(base, {
102
+ getProvider: (providerId) => metered(base.getProvider(providerId)),
103
+ getDefaultProvider: () => metered(base.getDefaultProvider()),
104
+ getProviderForModel: (modelId) => metered(base.getProviderForModel(modelId)),
105
+ });
106
+ }
88
107
  //# sourceMappingURL=meteredProviderManager.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"meteredProviderManager.js","sourceRoot":"","sources":["../../../../src/api/runtime/agencyLaunch/meteredProviderManager.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,aAAa,EAAoB,MAAM,mBAAmB,CAAC;AAC5G,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,+GAA+G;AAC/G,SAAS,QAAQ,CAAC,KAA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AAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QAC1E,kBAAkB,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC5D,mBAAmB,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;KACrF,CAAC,CAAC;AACL,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import type { AgencyCallbacks, AgencyOptions } from '../../types.js';
2
+ import type { GMIToolCallGate } from '../../../cognition/substrate/IGMI.js';
2
3
  import type { ToolExecutionContext, ToolExecutionResult } from '../../../core/tools/ITool.js';
3
4
  import type { ApprovalGateFn } from '../approval-gate.js';
4
5
  import { SpendBudget } from '../spendBudget.js';
@@ -24,7 +25,15 @@ export interface LaunchParent {
24
25
  turnId?: string;
25
26
  /** The hooks the parent turn's calls ran under, outermost first. */
26
27
  toolHooks: readonly ToolCallHook[];
27
- /** The output tokens one call of the route is counted with. */
28
+ /**
29
+ * The full runtime: the output guardrails' tool-call gate the parent turn asks before each of its calls (the call's
30
+ * `callerTurn.toolCallGate`). Every seat's turn asks it before each of its own calls.
31
+ */
32
+ toolCallGate?: GMIToolCallGate;
33
+ /**
34
+ * The output tokens one call of a temporary seat the launch builds is counted with, on the route its host builds it
35
+ * on. The one-call floor counts it for each temporary seat; a persistent member's call is counted on its own route.
36
+ */
28
37
  outputEstimateTokens: number;
29
38
  /**
30
39
  * The root scope's id: the launching session as its agent knows it, never the calling GMI. On
@@ -60,6 +69,18 @@ export interface LaunchHost {
60
69
  surface: 'gmi' | 'runtime';
61
70
  /** The parent of a root launch (no frame): depth 0. */
62
71
  rootParent(ctx: ToolExecutionContext): Promise<LaunchParent | LaunchRefusal>;
72
+ /**
73
+ * The output tokens one call of a seat this host builds is counted with: the one-call floor of a nested launch it
74
+ * runs, whose seats it builds on its own route (a persistent member that launches from its seat builds them on the
75
+ * member's, not the root's). Unset, a nested launch counts the one its parent launch's entry holds.
76
+ */
77
+ outputEstimateTokens?(ctx: ToolExecutionContext): Promise<number>;
78
+ /**
79
+ * The output tokens one call of a persistent member's seat is counted with: its calls run on the member's own route
80
+ * (an `agentKey` member on gmi(), a `personaId` seat on the full runtime). Unset, or undefined for a member, the
81
+ * floor counts the parent's estimate for that seat.
82
+ */
83
+ memberOutputEstimateTokens?(ref: string): Promise<number | undefined>;
63
84
  /** A root launch's parent tool names; a nested launch reads its seat's from the entry. */
64
85
  parentToolNames(ctx: ToolExecutionContext, parent: LaunchParent): Promise<ReadonlySet<string>>;
65
86
  /** A tool of the parent's table by name, read for a composition's step tools. */
@@ -74,7 +95,13 @@ export interface LaunchHost {
74
95
  callbacks?: AgencyCallbacks;
75
96
  /** gmi(): the parent's usage ledger, which the coordinator's calls record to under source `launch_agency`. */
76
97
  usageLedger?: AgentOSUsageLedgerOptions;
77
- /** The full runtime's registry entry; no-ops on gmi(). A recorder that throws is logged and the launch goes on. */
98
+ /**
99
+ * The full runtime's registry entry; no-ops on gmi(). `start` once the team is built; `close`, with the result the
100
+ * launch returned, when the launch's entry goes: before the launch returns when every seat is released by then,
101
+ * else once every seat is released and every launch its seats started is gone, `closing` being told at the return
102
+ * meanwhile. So the record lasts as long as the team holds a seat. A recorder that throws is logged and the launch
103
+ * goes on.
104
+ */
78
105
  recorder: {
79
106
  start(record: {
80
107
  agencyId: string;
@@ -82,6 +109,7 @@ export interface LaunchHost {
82
109
  meta: LaunchRecordMetadata;
83
110
  seats: SeatHandle[];
84
111
  }): void;
112
+ closing?(result: LaunchAgencyResult): void;
85
113
  close(result: LaunchAgencyResult): void;
86
114
  };
87
115
  logError(error: unknown, where: string): void;
@@ -109,7 +137,8 @@ export declare function validateLaunchArgs(args: LaunchAgencyArgs): LaunchRefusa
109
137
  * the least of `maxTokens`, the parent's remaining tokens times `budgetShare` (when it has a token cap), the pool's
110
138
  * remaining tokens and `limits.maxLaunchTokens`.
111
139
  *
112
- * @param outputEstimateTokens - The output tokens one call is counted with.
140
+ * @param outputEstimateTokens - The output tokens the floor counts one call with: the largest a seat's call is counted
141
+ * with.
113
142
  * @returns The caps, or `budget_unavailable` when the token cap cannot cover one call (`MIN_LAUNCH_TOKENS` plus the
114
143
  * output estimate) or no dollars are left.
115
144
  */
@@ -1 +1 @@
1
- {"version":3,"file":"runLaunch.d.ts","sourceRoot":"","sources":["../../../../src/api/runtime/agencyLaunch/runLaunch.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAS,eAAe,EAAE,aAAa,EAAkB,MAAM,gBAAgB,CAAC;AAG5F,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAC9F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAuB,MAAM,mBAAmB,CAAC;AACrE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EASL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAIlB,KAAK,YAAY,EACjB,KAAK,YAAY,EAClB,MAAM,YAAY,CAAC;AAkBpB,+CAA+C;AAC/C,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,YAAY,CAAC;IACrB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,YAAY,CAAC,EAAE,cAAc,CAAC;IAC9B,MAAM,C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