@stratusagent/gateway 0.14.7 → 0.14.8
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/dist/index.d.ts +4 -1290
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -279
- package/dist/index.js.map +1 -1
- package/dist/lifecycle.d.ts +130 -0
- package/dist/lifecycle.d.ts.map +1 -0
- package/dist/lifecycle.js +147 -0
- package/dist/lifecycle.js.map +1 -0
- package/dist/session-keys.d.ts +101 -0
- package/dist/session-keys.d.ts.map +1 -0
- package/dist/session-keys.js +148 -0
- package/dist/session-keys.js.map +1 -0
- package/dist/types.d.ts +1103 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +7 -7
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EA2BL,QAAQ,EAkBR,KAAK,eAAe,EAKpB,KAAK,eAAe,EAEpB,KAAK,WAAW,EAChB,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EAChC,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,cAAc,EAInB,KAAK,eAAe,EAEpB,KAAK,YAAY,EAGjB,KAAK,UAAU,EAIf,KAAK,OAAO,EACZ,KAAK,IAAI,EACT,KAAK,QAAQ,EAGb,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAeL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EAevB,KAAK,UAAU,EAEf,KAAK,cAAc,EAIpB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAwB,KAAK,gBAAgB,EAA2B,MAAM,oBAAoB,CAAC;AA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KAAK,OAAO,EACZ,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,cAAc,GACpB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,oBAAoB,EACpB,2BAA2B,EAC3B,qBAAqB,EACrB,iBAAiB,EACjB,yBAAyB,EACzB,8BAA8B,EAC9B,0BAA0B,EAC1B,6BAA6B,EAC7B,6BAA6B,EAC7B,2BAA2B,EAC3B,sBAAsB,EACtB,2BAA2B,GAC5B,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -6,11 +6,9 @@ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExte
|
|
|
6
6
|
}
|
|
7
7
|
return path;
|
|
8
8
|
};
|
|
9
|
-
import { createHash,
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import { filePathsOf, isUnaddressedTurn, carriesKey, leastTrusted, senderTrustOf, SENDER_TRUST_METADATA_KEY, workItemState, turnMessageOf, turnKeyOf, leftForNextStart, lastResponseIsAnswer, MAX_IDEMPOTENCY_KEY_LENGTH, recordTurnFailure, completeAnsweredTurn, abortErrorFor, sessionTrustOf, sessionWriteTrust, AgentRegistry, AgentRunner, InMemorySessionStore, MEMORY_PASS_MAX_MODEL_CALLS, MEMORY_PASS_RULES, ChannelRegistry, ContributionRegistry, createRoutedMemoryStore, EventBus, RunAbortedError, SkillRegistry, ToolRegistry, createSkillReadTool, missingSkillRequirements, describeToolAllowlistFinding, unmatchedToolAllowlist, CONTEXT_FLOOR_METADATA_KEY, CONTEXT_SUMMARY_METADATA_KEY, PENDING_APPROVAL_METADATA_KEY, SESSION_TAINTED_BY_METADATA_KEY, SESSION_TRUST_METADATA_KEY, latestTurnReply, readPendingApproval, conversationContextFrom, CONVERSATION_METADATA_KEY, STRATUS_SKILL_ID, imagesWithinReplayBudget, matchesToolAllowlist, resolveToolRisk, } from '@stratusagent/core';
|
|
13
|
-
import { CREDENTIAL_REQUEST_TOOL_NAME, createCredentialRequestTool, createDelegateTool, DELEGATE_TOOL_NAME, createForgetTool, createPinTool, createMessageSendTool, createMessageSayTool, createMessageReadTool, createChannelArchiveTool, createChannelCreateTool, createChannelInviteTool, createChannelJoinTool, directMessageReadRefusal, createRecallTool, createRememberTool, createScheduleTools, DELEGATED_BY_METADATA_KEY, DELEGATED_SESSION_ID_MARKER, DEFAULT_MAX_DELEGATION_DEPTH, DELEGATION_DEPTH_METADATA_KEY, delegatingSessionIdOf, isDelegatedSession, outstandingDelegationFor, ROOT_SESSION_ID_METADATA_KEY, SCHEDULE_ID_METADATA_KEY, SCHEDULED_TURN_METADATA_KEY, withoutDelegation, loadStratusSkill, STRATUS_SKILL_PATH, credentialVariableProblem, } from '@stratusagent/agents';
|
|
9
|
+
import { createHash, randomUUID } from 'node:crypto';
|
|
10
|
+
import { filePathsOf, isUnaddressedTurn, carriesKey, leastTrusted, senderTrustOf, SENDER_TRUST_METADATA_KEY, workItemState, turnMessageOf, turnKeyOf, leftForNextStart, lastResponseIsAnswer, MAX_IDEMPOTENCY_KEY_LENGTH, recordTurnFailure, completeAnsweredTurn, abortErrorFor, sessionTrustOf, sessionWriteTrust, AgentRegistry, AgentRunner, InMemorySessionStore, MEMORY_PASS_MAX_MODEL_CALLS, MEMORY_PASS_RULES, ChannelRegistry, ContributionRegistry, createRoutedMemoryStore, EventBus, RunAbortedError, SkillRegistry, ToolRegistry, createSkillReadTool, missingSkillRequirements, describeToolAllowlistFinding, unmatchedToolAllowlist, PENDING_APPROVAL_METADATA_KEY, SESSION_TRUST_METADATA_KEY, latestTurnReply, readPendingApproval, conversationContextFrom, CONVERSATION_METADATA_KEY, STRATUS_SKILL_ID, imagesWithinReplayBudget, matchesToolAllowlist, resolveToolRisk, } from '@stratusagent/core';
|
|
11
|
+
import { CREDENTIAL_REQUEST_TOOL_NAME, createCredentialRequestTool, createDelegateTool, createForgetTool, createPinTool, createMessageSendTool, createMessageSayTool, createMessageReadTool, createChannelArchiveTool, createChannelCreateTool, createChannelInviteTool, createChannelJoinTool, directMessageReadRefusal, createRecallTool, createRememberTool, createScheduleTools, DELEGATED_BY_METADATA_KEY, DELEGATED_SESSION_ID_MARKER, DEFAULT_MAX_DELEGATION_DEPTH, DELEGATION_DEPTH_METADATA_KEY, delegatingSessionIdOf, isDelegatedSession, outstandingDelegationFor, ROOT_SESSION_ID_METADATA_KEY, SCHEDULE_ID_METADATA_KEY, withoutDelegation, loadStratusSkill, STRATUS_SKILL_PATH, credentialVariableProblem, } from '@stratusagent/agents';
|
|
14
12
|
import { createFleetReader } from "./fleet.js";
|
|
15
13
|
import { createMemoryPassHost } from "./memory-passes.js";
|
|
16
14
|
import { callShownWhole, readReviewReply, REVIEW_RULES, reviewCaseText } from "./review.js";
|
|
@@ -18,6 +16,8 @@ import { createEventIntake, summarizeEvents, } from "./event-intake.js";
|
|
|
18
16
|
import { SqliteEventStore } from "./events.js";
|
|
19
17
|
import { createSchedulerRuntime, isScheduleSessionId, SqliteScheduleStore, SCHEDULE_SESSION_ID_PREFIX, } from "./schedules.js";
|
|
20
18
|
import { ShardedSessionStore } from "./sessions.js";
|
|
19
|
+
import { DEFAULT_CHANNEL_RELOAD_TIMEOUT_MS, DEFAULT_PAUSED_MESSAGE, DEFAULT_RESTART_DRAIN_TIMEOUT_MS, DEFAULT_STOP_DRAIN_TIMEOUT_MS, GatewayStoppingError, HELD_MESSAGE, IntakePausedError, MAX_PAUSED_MESSAGE_LENGTH, PauseMessageError, readIntakeState, RESTARTING_TURN_ERROR, RestartUnsupportedError, STOPPING_TURN_ERROR, writeIntakeState, } from "./lifecycle.js";
|
|
20
|
+
import { ABANDONED_TURN_ERROR, crossIdentityError, CrossIdentityError, DEFAULT_SUB_AGENTS_PER_TURN, EXECUTOR_METADATA_KEY, isSubAgentSession, ORPHANED_DELEGATION_ERROR, RESERVED_SESSION_METADATA_KEYS, reservedSessionMetadataKey, ROLLED_OVER_FROM_METADATA_KEY, ROLLED_OVER_SESSION_ID_MARKER, ROLLED_OVER_TO_METADATA_KEY, ROLLOVER_REPEAT_WINDOW_MS, SUB_AGENT_METADATA_KEY, SUB_AGENT_SESSION_ID_MARKER, subAgentNeverGets, } from "./session-keys.js";
|
|
21
21
|
export { claimHome, homeLockPath, HomeClaimedError, } from "./lock.js";
|
|
22
22
|
export { SqliteSessionStore, ShardedSessionStore, FleetSessionIndex, SessionIdTakenError, tightenSqliteFile, } from "./sessions.js";
|
|
23
23
|
export { SqliteScheduleStore, createSchedulerRuntime, isScheduleSessionId, SCHEDULE_SESSION_ID_PREFIX, } from "./schedules.js";
|
|
@@ -29,7 +29,7 @@ export { REVIEW_RULES, readReviewReply, reviewCaseText } from "./review.js";
|
|
|
29
29
|
export { createEventIntake, mapGithubDelivery, parseStandardWebhookEvent, verifyGithubSignature, verifyStandardWebhookSignature, DEFAULT_EVENT_MAX_BODY_BYTES, EVENT_SOURCE_REQUESTS_PER_MINUTE, } from "./event-intake.js";
|
|
30
30
|
import { createLocalCommandExecutor } from '@stratusagent/executor-local';
|
|
31
31
|
import { loadPlugins, } from '@stratusagent/plugins';
|
|
32
|
-
import { BUILTIN_EXECUTOR_NAME, BUILTIN_MEMORY_STORE_NAME, BUILTIN_PROVIDER_NAMES, createDemoTool, createFileCredentialResolver, credentialValuesFor, resolveDaemonCredential, createHomeMemoryStore, drainSharedMemory, hasBracketedLegacyStateIn, createRuntimeProvider, describeServingModel, DEFAULT_STRATUS_AGENT, isRegisteredProviderName, loadChannelTransportSecrets, registeredProviderNameOf, loadOperatorSkills, loadRosterSouls, FALLBACK_ACTIVE_METADATA_KEY, loadSoulFile, grantSoulCredential, withSoulFileLock, addNamedCredential, appendCredentialAudit, replaceNamedCredential, NamedCredentialMissingError, namedCredentialSource, NamedCredentialExistsError, CREDENTIAL_NAME_PATTERN, quoteShellArg, migrateLegacyMemory, PROVIDER_STATE_METADATA_KEYS, ConfigFileError, loadConfigFile, resolveConfigLocation, resolveConfiguredSoul, resolveRuntimeConfig, runsOnHarness, applySoulPins, assertStateCompatible, unlistedToolsFor, stratusHomePath,
|
|
32
|
+
import { BUILTIN_EXECUTOR_NAME, BUILTIN_MEMORY_STORE_NAME, BUILTIN_PROVIDER_NAMES, createDemoTool, createFileCredentialResolver, credentialValuesFor, resolveDaemonCredential, createHomeMemoryStore, drainSharedMemory, hasBracketedLegacyStateIn, createRuntimeProvider, describeServingModel, DEFAULT_STRATUS_AGENT, isRegisteredProviderName, loadChannelTransportSecrets, registeredProviderNameOf, loadOperatorSkills, loadRosterSouls, FALLBACK_ACTIVE_METADATA_KEY, loadSoulFile, grantSoulCredential, withSoulFileLock, addNamedCredential, appendCredentialAudit, replaceNamedCredential, NamedCredentialMissingError, namedCredentialSource, NamedCredentialExistsError, CREDENTIAL_NAME_PATTERN, quoteShellArg, migrateLegacyMemory, PROVIDER_STATE_METADATA_KEYS, ConfigFileError, loadConfigFile, resolveConfigLocation, resolveConfiguredSoul, resolveRuntimeConfig, runsOnHarness, applySoulPins, assertStateCompatible, unlistedToolsFor, stratusHomePath, fleetDbIn, createAgentWorkspaces, createPluginStateDirectories, createHostProtectedPaths, foldedAgentId, } from '@stratusagent/state';
|
|
33
33
|
const DEFAULT_IDLE_TIMEOUT_MS = 120_000;
|
|
34
34
|
/**
|
|
35
35
|
* How long a parked call waits for a person. Long enough to survive a
|
|
@@ -53,142 +53,6 @@ const MAX_TIMER_DELAY_MS = 2_147_483_647;
|
|
|
53
53
|
* question even when the rule answering it is not gateway code.
|
|
54
54
|
*/
|
|
55
55
|
export { applySoulPins } from '@stratusagent/state';
|
|
56
|
-
/** What a turn cut short by an announced restart records as its failure. */
|
|
57
|
-
export const RESTARTING_TURN_ERROR = 'Run aborted: stratusd is restarting';
|
|
58
|
-
/** The error a turn still running when a stop's drain window closes is aborted with. */
|
|
59
|
-
export const STOPPING_TURN_ERROR = 'Run aborted: stratusd is stopping';
|
|
60
|
-
/**
|
|
61
|
-
* How long an announced restart lets in-flight turns finish before aborting
|
|
62
|
-
* them. The same as a stop's window (`DEFAULT_STOP_DRAIN_TIMEOUT_MS`), so the
|
|
63
|
-
* two windows an operator can hit agree.
|
|
64
|
-
*/
|
|
65
|
-
export const DEFAULT_RESTART_DRAIN_TIMEOUT_MS = 30_000;
|
|
66
|
-
/** How long a roster reload waits on one channel's `reload()`. */
|
|
67
|
-
export const DEFAULT_CHANNEL_RELOAD_TIMEOUT_MS = 30_000;
|
|
68
|
-
/**
|
|
69
|
-
* How long a stop lets in-flight turns finish before aborting them. The
|
|
70
|
-
* daemon's documented drain ("up to 30 seconds"), and shorter than the
|
|
71
|
-
* service units' stop timeouts, so the abort happens in this process
|
|
72
|
-
* rather than as the manager's SIGKILL. That matters beyond the turn's
|
|
73
|
-
* record: a shell command runs in its own process group, which launchd's
|
|
74
|
-
* kill of the job does not reach, so only the turn's abort stops it.
|
|
75
|
-
*/
|
|
76
|
-
export const DEFAULT_STOP_DRAIN_TIMEOUT_MS = 30_000;
|
|
77
|
-
/** What a paused daemon says when nobody gave it a sentence of its own. */
|
|
78
|
-
export const DEFAULT_PAUSED_MESSAGE = "I'm paused right now and not taking new work. Please try again later.";
|
|
79
|
-
/** What a held gateway answers a dispatch with, before it is promoted. */
|
|
80
|
-
export const HELD_MESSAGE = "I'm starting up and not taking work yet. Please try again in a moment.";
|
|
81
|
-
/** The longest pause message, so a reply to a refused message stays one. */
|
|
82
|
-
export const MAX_PAUSED_MESSAGE_LENGTH = 500;
|
|
83
|
-
/** A pause message the gateway will not take: empty, or too long. */
|
|
84
|
-
export class PauseMessageError extends Error {
|
|
85
|
-
constructor(message) {
|
|
86
|
-
super(message);
|
|
87
|
-
this.name = 'PauseMessageError';
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* A dispatch refused because intake is paused. Its message is the sentence
|
|
92
|
-
* to show whoever sent the work, as it is: a channel posts it as the reply,
|
|
93
|
-
* not as a failure.
|
|
94
|
-
*/
|
|
95
|
-
export class IntakePausedError extends Error {
|
|
96
|
-
constructor(message) {
|
|
97
|
-
super(message);
|
|
98
|
-
this.name = 'IntakePausedError';
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* A dispatch refused because the daemon is restarting or stopping. Channels
|
|
103
|
-
* stay connected while a restart drains, so they hear people during it, and
|
|
104
|
-
* this is what tells them the message reached a daemon on its way down: a
|
|
105
|
-
* channel can say so and keep the message for the next one. Matched by name
|
|
106
|
-
* there, as channel packages do not import the gateway.
|
|
107
|
-
*/
|
|
108
|
-
export class GatewayStoppingError extends Error {
|
|
109
|
-
/** True for a restart, which comes back on its own; false for a stop. */
|
|
110
|
-
restarting;
|
|
111
|
-
constructor(message, restarting) {
|
|
112
|
-
super(message);
|
|
113
|
-
this.name = 'GatewayStoppingError';
|
|
114
|
-
this.restarting = restarting;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* The intake state a previous process left, or open when there is none.
|
|
119
|
-
*
|
|
120
|
-
* Fails closed: a file that exists but cannot be read or parsed starts the
|
|
121
|
-
* daemon paused, with a warning naming it. A pause exists to stop work (a
|
|
122
|
-
* spending cap, a maintenance window), and a file nobody can read is no
|
|
123
|
-
* evidence that it was lifted.
|
|
124
|
-
*/
|
|
125
|
-
const readIntakeState = async (env, warn) => {
|
|
126
|
-
const file = intakeStatePath(env);
|
|
127
|
-
let raw;
|
|
128
|
-
try {
|
|
129
|
-
raw = await readFile(file, 'utf8');
|
|
130
|
-
}
|
|
131
|
-
catch (error) {
|
|
132
|
-
if (error.code === 'ENOENT') {
|
|
133
|
-
return { paused: false };
|
|
134
|
-
}
|
|
135
|
-
warn(`intake: ${file} could not be read (${error.message}); starting paused. Resume intake to clear it.`);
|
|
136
|
-
return { paused: true, since: new Date().toISOString(), unreadable: true };
|
|
137
|
-
}
|
|
138
|
-
try {
|
|
139
|
-
const parsed = JSON.parse(raw);
|
|
140
|
-
// Only a pause is ever written here (resuming removes the file), so
|
|
141
|
-
// anything else in it is not a record this build wrote, and the same
|
|
142
|
-
// rule as an unreadable file applies.
|
|
143
|
-
if (typeof parsed !== 'object' || parsed === null || parsed.paused !== true) {
|
|
144
|
-
warn(`intake: ${file} does not hold a pause record; starting paused. Resume intake to clear it.`);
|
|
145
|
-
return { paused: true, since: new Date().toISOString(), unreadable: true };
|
|
146
|
-
}
|
|
147
|
-
return {
|
|
148
|
-
paused: true,
|
|
149
|
-
...(typeof parsed.message === 'string' && parsed.message.trim().length > 0 ? { message: parsed.message } : {}),
|
|
150
|
-
since: typeof parsed.since === 'string' ? parsed.since : new Date().toISOString(),
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
catch {
|
|
154
|
-
warn(`intake: ${file} is not valid JSON; starting paused. Resume intake to clear it.`);
|
|
155
|
-
return { paused: true, since: new Date().toISOString(), unreadable: true };
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
/**
|
|
159
|
-
* Record a pause durably (0600, replaced in one atomic step), or remove the
|
|
160
|
-
* record when intake reopens: open is the default, so nothing on disk
|
|
161
|
-
* means open.
|
|
162
|
-
*/
|
|
163
|
-
const writeIntakeState = async (env, state) => {
|
|
164
|
-
const file = intakeStatePath(env);
|
|
165
|
-
if (!state.paused) {
|
|
166
|
-
await rm(file, { force: true });
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
await mkdir(path.dirname(file), { recursive: true, mode: 0o700 });
|
|
170
|
-
const staging = `${file}.${randomBytes(8).toString('hex')}`;
|
|
171
|
-
try {
|
|
172
|
-
await writeFileSynced(staging, `${JSON.stringify(state)}\n`, { flag: 'wx', mode: 0o600 });
|
|
173
|
-
await rename(staging, file);
|
|
174
|
-
await syncDirectory(path.dirname(file));
|
|
175
|
-
}
|
|
176
|
-
finally {
|
|
177
|
-
await rm(staging, { force: true });
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
|
-
/**
|
|
181
|
-
* `restart()` on a gateway whose host gave it no way back. Exported so the
|
|
182
|
-
* control API can answer it as "not supported here" rather than as a
|
|
183
|
-
* failure of the daemon.
|
|
184
|
-
*/
|
|
185
|
-
export class RestartUnsupportedError extends Error {
|
|
186
|
-
constructor() {
|
|
187
|
-
super('This daemon cannot restart itself: the host that started it did not say how. '
|
|
188
|
-
+ 'Restart it from the service manager (stratus service stop, then start) or from the terminal it runs in.');
|
|
189
|
-
this.name = 'RestartUnsupportedError';
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
56
|
/**
|
|
193
57
|
* The most text one merged user message may hold (card 423). The runner's
|
|
194
58
|
* overflow recovery can drop earlier transcript but never part of the
|
|
@@ -258,143 +122,6 @@ const formCredentialValue = (value) => value.replace(/^[\r\n]+|[\r\n]+$/g, '');
|
|
|
258
122
|
* so it has none of its own and is fine as sent.
|
|
259
123
|
*/
|
|
260
124
|
const isFlattenedPem = (value) => /^\s*-----BEGIN [A-Z0-9 ]+-----/.test(value) && !value.includes('\n');
|
|
261
|
-
/**
|
|
262
|
-
* Recorded on a turn the previous process was still running when it died.
|
|
263
|
-
*
|
|
264
|
-
* Exported because "distinguishable" is the whole point: a surface, a
|
|
265
|
-
* test, or an operator reading `lastError` has to be able to tell a turn
|
|
266
|
-
* nobody finished apart from one a provider or a tool actually failed, and
|
|
267
|
-
* matching on prose that lives in one place beats each caller inventing
|
|
268
|
-
* its own guess at the wording.
|
|
269
|
-
*/
|
|
270
|
-
export const ABANDONED_TURN_ERROR = 'stratusd stopped while this turn was still running; it was not resumed. Send the message again.';
|
|
271
|
-
/**
|
|
272
|
-
* The longest `DispatchInput.idempotencyKey` accepted. A platform message id
|
|
273
|
-
* is far shorter; the bound is so a key cannot be used to grow every row it
|
|
274
|
-
* is stored on.
|
|
275
|
-
*/
|
|
276
|
-
/**
|
|
277
|
-
* Recorded on a delegated sub-session that was parked on a human when the
|
|
278
|
-
* previous process died.
|
|
279
|
-
*
|
|
280
|
-
* Its parent — the turn whose `agent.delegate` call was awaiting the reply
|
|
281
|
-
* — was running, so the restart settles it as abandoned (above). Recovering
|
|
282
|
-
* the child anyway would re-ask a person to approve a call whose result no
|
|
283
|
-
* turn will ever read, and then run it: a command executed, tokens spent,
|
|
284
|
-
* and a reply delivered to nobody. Distinguishable from the parent's error
|
|
285
|
-
* because the remedy differs — there is no message to send again here;
|
|
286
|
-
* the parent's is the one to repeat.
|
|
287
|
-
*/
|
|
288
|
-
/**
|
|
289
|
-
* Session metadata keys the daemon writes for itself, which no external
|
|
290
|
-
* dispatch may supply.
|
|
291
|
-
*
|
|
292
|
-
* Metadata is one bag: the keys a channel attaches to say where a turn is
|
|
293
|
-
* happening sit beside the ones the kernel, the scheduler, the fallback
|
|
294
|
-
* wrapper, and `agent.delegate` write to remember what a session *is* —
|
|
295
|
-
* and the control API forwards a caller's `metadata` into a new session as
|
|
296
|
-
* given. A caller who can write `delegatedBy` can have the restart sweep
|
|
297
|
-
* fail its own parked turn as an orphan; one who can write `fallbackActive`
|
|
298
|
-
* bills its conversation to the fallback model from the first turn. The
|
|
299
|
-
* scheduler already refused to trust its own keys for exactly this reason
|
|
300
|
-
* (see `activeFirings`); the durable ones cannot be re-derived in memory,
|
|
301
|
-
* so they are refused at the door instead.
|
|
302
|
-
*/
|
|
303
|
-
/**
|
|
304
|
-
* A rolled-over session: the fresh row records where its predecessor's
|
|
305
|
-
* transcript went, and the archived row records which live id continues
|
|
306
|
-
* the conversation. See `Gateway.rolloverSession`.
|
|
307
|
-
*/
|
|
308
|
-
export const ROLLED_OVER_FROM_METADATA_KEY = 'rolledOverFrom';
|
|
309
|
-
export const ROLLED_OVER_TO_METADATA_KEY = 'rolledOverTo';
|
|
310
|
-
/** The segment a rollover mints into the archived transcript's id. */
|
|
311
|
-
export const ROLLED_OVER_SESSION_ID_MARKER = ':rolledover:';
|
|
312
|
-
/**
|
|
313
|
-
* How long after a rollover a repeated key is still looked for in the
|
|
314
|
-
* archived transcript. A rollover moves every keyed message out of the
|
|
315
|
-
* live row, so a redelivery arriving after one would otherwise read as a
|
|
316
|
-
* new message and run again. Platforms redeliver within minutes — Slack
|
|
317
|
-
* gives up after about five — and past the window the archive is not
|
|
318
|
-
* loaded at all, since every new message to the fresh row would pay for a
|
|
319
|
-
* read that can no longer find anything.
|
|
320
|
-
*/
|
|
321
|
-
const ROLLOVER_REPEAT_WINDOW_MS = 60 * 60 * 1000;
|
|
322
|
-
/**
|
|
323
|
-
* The one refusal for a dispatch naming an agent other than its session's.
|
|
324
|
-
* Its own type so a repeat attached to a claimant can tell the claimant was
|
|
325
|
-
* refused for who it named — the item then still has no owner — from the
|
|
326
|
-
* claimant's turn failing. Internal: callers read the message.
|
|
327
|
-
*/
|
|
328
|
-
class CrossIdentityError extends Error {
|
|
329
|
-
constructor(sessionId, owner, claimed) {
|
|
330
|
-
super(`Session ${sessionId} belongs to agent ${owner}, not ${claimed} — sessions never cross agent identities.`);
|
|
331
|
-
this.name = 'CrossIdentityError';
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
const crossIdentityError = (sessionId, owner, claimed) => new CrossIdentityError(sessionId, owner, claimed);
|
|
335
|
-
/** Where the session's tool calls ran: `local-command`, or a contributed executor's registered name. */
|
|
336
|
-
export const EXECUTOR_METADATA_KEY = 'executor';
|
|
337
|
-
/**
|
|
338
|
-
* Marks a sub-agent's session (roadmap 24). Reserved: it is what makes the
|
|
339
|
-
* daemon deny the session's gated calls without asking anyone, so a caller
|
|
340
|
-
* that could set it could also clear it.
|
|
341
|
-
*/
|
|
342
|
-
export const SUB_AGENT_METADATA_KEY = 'subAgent';
|
|
343
|
-
export const SUB_AGENT_SESSION_ID_MARKER = ':subagent:';
|
|
344
|
-
/** How many sub-agents one parent turn runs at once unless the host says otherwise. */
|
|
345
|
-
export const DEFAULT_SUB_AGENTS_PER_TURN = 4;
|
|
346
|
-
export const isSubAgentSession = (session) => session.metadata?.[SUB_AGENT_METADATA_KEY] === true && session.id.includes(SUB_AGENT_SESSION_ID_MARKER);
|
|
347
|
-
/**
|
|
348
|
-
* Tools a sub-agent never gets, whatever its parent holds. `agent.spawn`
|
|
349
|
-
* would fan out inside a fan-out; `agent.delegate` runs a roster agent
|
|
350
|
-
* under that agent's own allowlist, which is the way out of a narrowed
|
|
351
|
-
* slice; `memory.*` would let it persist what nobody reviewed; and
|
|
352
|
-
* `credential.request` asks a person, which a sub-agent never does.
|
|
353
|
-
*/
|
|
354
|
-
const subAgentNeverGets = (name) => name === 'agent.spawn'
|
|
355
|
-
|| name === DELEGATE_TOOL_NAME
|
|
356
|
-
|| name.startsWith('memory.')
|
|
357
|
-
|| name === CREDENTIAL_REQUEST_TOOL_NAME;
|
|
358
|
-
export const RESERVED_SESSION_METADATA_KEYS = [
|
|
359
|
-
PENDING_APPROVAL_METADATA_KEY,
|
|
360
|
-
FALLBACK_ACTIVE_METADATA_KEY,
|
|
361
|
-
DELEGATED_BY_METADATA_KEY,
|
|
362
|
-
ROOT_SESSION_ID_METADATA_KEY,
|
|
363
|
-
DELEGATION_DEPTH_METADATA_KEY,
|
|
364
|
-
SCHEDULED_TURN_METADATA_KEY,
|
|
365
|
-
SCHEDULE_ID_METADATA_KEY,
|
|
366
|
-
// The trust label is the runner's to write and only ever goes down; a
|
|
367
|
-
// caller who could seed it would be seeding it upward.
|
|
368
|
-
SESSION_TRUST_METADATA_KEY,
|
|
369
|
-
SESSION_TAINTED_BY_METADATA_KEY,
|
|
370
|
-
ROLLED_OVER_FROM_METADATA_KEY,
|
|
371
|
-
ROLLED_OVER_TO_METADATA_KEY,
|
|
372
|
-
// Which executor ran the turn's tool calls is the daemon's record of
|
|
373
|
-
// where a command ran, and the one audit question a caller must not be
|
|
374
|
-
// able to answer for it.
|
|
375
|
-
EXECUTOR_METADATA_KEY,
|
|
376
|
-
// The context floor is an index into a specific transcript, so it means
|
|
377
|
-
// nothing next to a different one. Reserved for both halves of that: a
|
|
378
|
-
// caller cannot seed it, and a rollover drops it with the transcript it
|
|
379
|
-
// indexed — otherwise the fresh session inherits an absolute floor over
|
|
380
|
-
// no messages and, once it grows past that index, silently stops sending
|
|
381
|
-
// its own earliest turns, with no overflow and no trim event to say so.
|
|
382
|
-
CONTEXT_FLOOR_METADATA_KEY,
|
|
383
|
-
// The summary that stands in below that floor, for both of the same
|
|
384
|
-
// reasons, and one more: the model reads it as something it wrote itself,
|
|
385
|
-
// so a caller who could seed it could put words in the agent's mouth.
|
|
386
|
-
CONTEXT_SUMMARY_METADATA_KEY,
|
|
387
|
-
SUB_AGENT_METADATA_KEY,
|
|
388
|
-
];
|
|
389
|
-
/**
|
|
390
|
-
* The first reserved key `metadata` carries, or undefined when it carries
|
|
391
|
-
* none. Exported so the control API can refuse the request where the
|
|
392
|
-
* caller can see it, with the same rule the gateway applies at dispatch.
|
|
393
|
-
*/
|
|
394
|
-
export const reservedSessionMetadataKey = (metadata) => metadata === undefined
|
|
395
|
-
? undefined
|
|
396
|
-
: RESERVED_SESSION_METADATA_KEYS.find((key) => Object.prototype.hasOwnProperty.call(metadata, key));
|
|
397
|
-
export const ORPHANED_DELEGATION_ERROR = 'stratusd stopped while the turn that delegated this one was still running; the delegation was not resumed. Send the original message again.';
|
|
398
125
|
/**
|
|
399
126
|
* The always-on Stratus process. One gateway holds the roster, the durable
|
|
400
127
|
* session store, the shared event bus, and a pool of runners keyed by
|
|
@@ -5544,4 +5271,8 @@ export const createGateway = (options = {}) => {
|
|
|
5544
5271
|
};
|
|
5545
5272
|
return gateway;
|
|
5546
5273
|
};
|
|
5274
|
+
// Restart, stop and pause, in their own module (see the top of lifecycle.ts).
|
|
5275
|
+
export { DEFAULT_CHANNEL_RELOAD_TIMEOUT_MS, DEFAULT_PAUSED_MESSAGE, DEFAULT_RESTART_DRAIN_TIMEOUT_MS, DEFAULT_STOP_DRAIN_TIMEOUT_MS, GatewayStoppingError, HELD_MESSAGE, IntakePausedError, MAX_PAUSED_MESSAGE_LENGTH, PauseMessageError, RESTARTING_TURN_ERROR, RestartUnsupportedError, STOPPING_TURN_ERROR, } from "./lifecycle.js";
|
|
5276
|
+
// Reserved session keys and markers, in their own module (see the top of session-keys.ts).
|
|
5277
|
+
export { ABANDONED_TURN_ERROR, DEFAULT_SUB_AGENTS_PER_TURN, EXECUTOR_METADATA_KEY, isSubAgentSession, ORPHANED_DELEGATION_ERROR, RESERVED_SESSION_METADATA_KEYS, reservedSessionMetadataKey, ROLLED_OVER_FROM_METADATA_KEY, ROLLED_OVER_SESSION_ID_MARKER, ROLLED_OVER_TO_METADATA_KEY, SUB_AGENT_METADATA_KEY, SUB_AGENT_SESSION_ID_MARKER, } from "./session-keys.js";
|
|
5547
5278
|
//# sourceMappingURL=index.js.map
|