@sema-agent/client-core 0.109.0 → 0.110.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +173 -0
- package/README.md +46 -22
- package/dist/adapt/arms.js +20 -7
- package/dist/adapter/downstream/eventToSdkMessage.js +11 -6
- package/dist/declared/supportFloorDeclared.js +1 -1
- package/dist/displayUntrusted.js +132 -14
- package/dist/engineErrorCodes.d.ts +3 -0
- package/dist/engineErrorCodes.js +3 -0
- package/dist/engineHealthFacts.d.ts +9 -0
- package/dist/engineHealthFacts.js +21 -1
- package/dist/engineInlineTaskStats.d.ts +4 -3
- package/dist/engineInlineTaskStats.js +18 -2
- package/dist/engineNoticeCodes.d.ts +10 -0
- package/dist/engineNoticeCodes.js +33 -1
- package/dist/engineRepoint.d.ts +140 -0
- package/dist/engineRepoint.js +285 -0
- package/dist/engineRowRef.js +2 -0
- package/dist/engineSessionMessages.d.ts +2 -1
- package/dist/engineSessionMessages.js +5 -0
- package/dist/errorSupplementRoles.js +2 -1
- package/dist/fleet/fleetProjection.js +3 -2
- package/dist/generated/engineFactTables.d.ts +2 -0
- package/dist/generated/engineFactTables.js +12 -0
- package/dist/generated/sdkFactTables.d.ts +1 -0
- package/dist/generated/sdkFactTables.js +4 -0
- package/dist/hitl/approvalAskers.d.ts +6 -0
- package/dist/hitl/approvalAskers.js +30 -0
- package/dist/hitl/approvalCardReasons.js +6 -3
- package/dist/hitl/approvalRequestFrameReading.d.ts +7 -0
- package/dist/hitl/approvalRequestFrameReading.js +11 -0
- package/dist/hitl/approvalResolution.d.ts +8 -1
- package/dist/hitl/approvalResolution.js +4 -0
- package/dist/hitl/askGateWire.js +0 -2
- package/dist/hitl/automaticAnswerVerdict.js +2 -2
- package/dist/hitl/decisionConflict.js +6 -3
- package/dist/hitl/decisionRefusal.js +1 -0
- package/dist/hitl/decisionSend.d.ts +3 -0
- package/dist/hitl/decisionSend.js +29 -11
- package/dist/hitl/editedApprovalAcceptance.d.ts +25 -0
- package/dist/hitl/editedApprovalAcceptance.js +26 -0
- package/dist/hitl/frameRouter.js +4 -18
- package/dist/hitl/gateLedger.d.ts +0 -4
- package/dist/hitl/gateLedger.js +0 -19
- package/dist/hitl/hitlBridge.d.ts +1 -0
- package/dist/hitl/hitlBridge.js +4 -4
- package/dist/hitl/hitlHostSurface.d.ts +1 -0
- package/dist/hitl/hitlHostSurface.js +7 -2
- package/dist/hitl/hostWithdrawal.d.ts +15 -0
- package/dist/hitl/hostWithdrawal.js +38 -0
- package/dist/hitl/parkResolver.js +25 -9
- package/dist/hitl/persistedRulesWire.js +2 -2
- package/dist/hitl/planReviewWire.js +14 -4
- package/dist/hitl/sessionPolicyWire.js +6 -4
- package/dist/hitl/standingRows.d.ts +1 -0
- package/dist/hitl/standingRows.js +15 -1
- package/dist/hitl/toolApprovalWire.d.ts +35 -8
- package/dist/hitl/toolApprovalWire.js +235 -33
- package/dist/hooksWireCaps.js +31 -1
- package/dist/hostTurnSettings.d.ts +10 -4
- package/dist/hostTurnSettings.js +112 -5
- package/dist/i18n/messages.en.d.ts +83 -0
- package/dist/i18n/messages.en.js +86 -2
- package/dist/i18n/messages.zh.js +96 -2
- package/dist/index.d.ts +21 -7
- package/dist/index.js +14 -4
- package/dist/inheritEnvCapability.js +2 -0
- package/dist/inputAuthor.d.ts +16 -0
- package/dist/inputAuthor.js +44 -0
- package/dist/interruptRefusalNote.d.ts +2 -0
- package/dist/interruptRefusalNote.js +17 -0
- package/dist/liveModelCatalog.d.ts +2 -0
- package/dist/liveModelCatalog.js +21 -7
- package/dist/liveQuestionStore.d.ts +4 -1
- package/dist/liveQuestionStore.js +12 -3
- package/dist/mcpEngineLeg.d.ts +3 -0
- package/dist/mcpEngineLeg.js +38 -1
- package/dist/mcpPanel.js +2 -0
- package/dist/mcpReconnect.d.ts +9 -1
- package/dist/mcpReconnect.js +121 -16
- package/dist/modelCapabilityProbe.js +4 -3
- package/dist/modsFace.d.ts +8 -1
- package/dist/modsFace.js +27 -0
- package/dist/notifications.d.ts +17 -6
- package/dist/notifications.js +67 -19
- package/dist/ownKey.d.ts +0 -5
- package/dist/ownKey.js +0 -7
- package/dist/peerFrames.d.ts +40 -2
- package/dist/peerFrames.js +158 -3
- package/dist/pluginHooksWire.d.ts +2 -1
- package/dist/pluginHooksWire.js +56 -1
- package/dist/replayBody.js +10 -2
- package/dist/request/taskRequest.d.ts +5 -0
- package/dist/request/taskRequest.js +138 -21
- package/dist/resumeRefusalCopy.d.ts +1 -3
- package/dist/resumeRefusalCopy.js +2 -1
- package/dist/retryStatus.d.ts +2 -2
- package/dist/retryStatus.js +2 -0
- package/dist/seam.d.ts +12 -1
- package/dist/seam.js +7 -1
- package/dist/seatContract.d.ts +86 -9
- package/dist/seatContract.js +196 -7
- package/dist/sessionBackground.js +2 -1
- package/dist/sessionBackgroundHandoff.js +2 -1
- package/dist/sessionEngine.d.ts +2 -0
- package/dist/sessionEngine.js +111 -0
- package/dist/sessionMemoryStatus.d.ts +2 -1
- package/dist/sessionSyncFileHistory.d.ts +4 -0
- package/dist/sessionSyncFileHistory.js +28 -0
- package/dist/sseIdleTriage.d.ts +13 -1
- package/dist/sseIdleTriage.js +24 -6
- package/dist/subagent/engineSubagentTail.js +6 -0
- package/dist/terminalStatuses.d.ts +1 -0
- package/dist/terminalStatuses.js +4 -1
- package/dist/turnFailurePresentation.js +9 -2
- package/dist/typePins.d.ts +11 -0
- package/dist/usageAnalytics.d.ts +17 -0
- package/dist/usageAnalytics.js +44 -2
- package/dist/wireFailureShape.d.ts +2 -5
- package/dist/wireFailureShape.js +10 -20
- package/dist/wireRefusalCopy.d.ts +10 -0
- package/dist/wireRefusalCopy.js +76 -0
- package/docs/INTEGRATION-CLIENTS.md +2126 -20
- package/package.json +3 -3
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import type { TaskRequest } from '@sema-agent/sdk';
|
|
1
|
+
import type { SemaSettings, TaskRequest } from '@sema-agent/sdk';
|
|
2
2
|
import type { WireHooksConfig } from './finalVerifyWire.js';
|
|
3
3
|
import type { memoryOffDeclared as MemoryOffDeclared } from './request/taskRequest.js';
|
|
4
4
|
import type { EnvLike } from './hostEnv.js';
|
|
5
5
|
import { type SettingsDocument } from './host.js';
|
|
6
|
-
import type
|
|
6
|
+
import { type HooksWirePlan, type HooksWirePlanOptions } from './pluginHooksWire.js';
|
|
7
7
|
import { type HostSettingsLayer, type HostSettingsSession, type HostSettingsSource } from './hostSettingsSource.js';
|
|
8
8
|
import { type SubmissionIdentity } from './request/submissionIdentity.js';
|
|
9
9
|
import { type WebSearchApiKeyFor } from './webSearchWireCaps.js';
|
|
10
10
|
import { type FileHistoryCaptureReading } from './fileHistoryCaptureCapability.js';
|
|
11
11
|
import { type PermissionsAllowGrantReading } from './permissionsAllowGrantCapability.js';
|
|
12
|
-
export declare const HOST_SUPPLIED_KEYS: readonly ["settings.hooks", "settings.resolved", "settings.webSearch", "settings.outputStyle", "memory", "fileHistory"];
|
|
12
|
+
export declare const HOST_SUPPLIED_KEYS: readonly ["settings.hooks", "settings.resolved", "settings.webSearch", "settings.outputStyle", "memory", "fileHistory", "settings.env"];
|
|
13
13
|
export type HostSuppliedKey = (typeof HOST_SUPPLIED_KEYS)[number];
|
|
14
14
|
export declare const HOST_SETTING_CAUSES: readonly ["carried", "entries_dropped", "source_rejected", "projection_failed", "source_unreadable", "empty", "no_source", "host_port_missing", "value_malformed", "held_previous", "policy_withheld"];
|
|
15
15
|
export type HostSettingCause = (typeof HOST_SETTING_CAUSES)[number];
|
|
16
16
|
export declare const HOST_SETTING_DISPOSITIONS: readonly ["carry", "carry_partial", "withhold_notice", "withhold_by_policy", "hold_for_consent", "refuse_turn", "unwired", "nothing_to_carry"];
|
|
17
17
|
export type HostSettingDisposition = (typeof HOST_SETTING_DISPOSITIONS)[number];
|
|
18
18
|
export type HostSettingPlane = 'turn' | 'session' | 'diagnostic';
|
|
19
|
-
export type HostSettingNoticeId = 'HS-UNWIRED' | 'HS-MANAGED-REJECTED' | 'HS-PROJECTION' | 'HS-SOURCE-UNREADABLE' | 'HS-WEBSEARCH-MALFORMED' | 'HS-SWITCH-MALFORMED' | 'HS-FILEHISTORY-UNJUDGED' | 'HS-FILEHISTORY-RESTORE' | 'HS-MANAGED-UNREADABLE' | 'HS-LAYER-NOT-LOADED' | 'HS-HELD-PREVIOUS' | 'HS-STYLE-MISSING' | 'HS-STYLE-SAFE' | 'HS-LAYER-PARTS-UNREAD';
|
|
19
|
+
export type HostSettingNoticeId = 'HS-UNWIRED' | 'HS-MANAGED-REJECTED' | 'HS-PROJECTION' | 'HS-SOURCE-UNREADABLE' | 'HS-WEBSEARCH-MALFORMED' | 'HS-SWITCH-MALFORMED' | 'HS-FILEHISTORY-UNJUDGED' | 'HS-FILEHISTORY-RESTORE' | 'HS-MANAGED-UNREADABLE' | 'HS-LAYER-NOT-LOADED' | 'HS-HELD-PREVIOUS' | 'HS-STYLE-MISSING' | 'HS-STYLE-SAFE' | 'HS-LAYER-PARTS-UNREAD' | 'HS-STYLE-OVERSIZE' | 'HS-STYLE-UNREADABLE';
|
|
20
20
|
export interface HostSettingRow {
|
|
21
21
|
readonly key: HostSuppliedKey;
|
|
22
22
|
readonly cause: HostSettingCause;
|
|
@@ -61,6 +61,9 @@ export interface HostTurnSettingsSources {
|
|
|
61
61
|
readonly reading: FileHistoryCaptureReading;
|
|
62
62
|
readonly captureOff: boolean;
|
|
63
63
|
} | 'none';
|
|
64
|
+
readonly env: {
|
|
65
|
+
readonly env: EnvLike;
|
|
66
|
+
} | 'none';
|
|
64
67
|
}
|
|
65
68
|
export interface HostWebSearchSource {
|
|
66
69
|
readonly env: EnvLike;
|
|
@@ -83,6 +86,7 @@ export interface HostSettingsCarried {
|
|
|
83
86
|
readonly outputStyle?: string;
|
|
84
87
|
readonly memory?: TaskRequest['memory'];
|
|
85
88
|
readonly fileHistory?: TaskRequest['fileHistory'];
|
|
89
|
+
readonly env?: NonNullable<SemaSettings['env']>;
|
|
86
90
|
}
|
|
87
91
|
export interface HostOutputStyleFacts {
|
|
88
92
|
readonly name: string;
|
|
@@ -108,6 +112,7 @@ export interface HostSettingsHeld {
|
|
|
108
112
|
};
|
|
109
113
|
readonly version: string;
|
|
110
114
|
}
|
|
115
|
+
export declare function hookEnvNamesOf(hooks: unknown): readonly string[];
|
|
111
116
|
export interface HostTurnSettingsJudges {
|
|
112
117
|
readonly materialize: HostResolvedMaterializer;
|
|
113
118
|
readonly memoryOffDeclared: typeof MemoryOffDeclared;
|
|
@@ -137,6 +142,7 @@ export declare function hostSettingsAcceptCurrent(product: HostTurnSettings, con
|
|
|
137
142
|
export declare function hostSettingsSelfCheck(product: HostTurnSettings): readonly HostSuppliedKey[];
|
|
138
143
|
export declare const hostProjectionNotice: () => HostSettingNotice;
|
|
139
144
|
export declare const hostFileHistoryRestoreNotice: () => HostSettingNotice;
|
|
145
|
+
export declare const hostStyleNotAppliedNotice: (cause: "oversize" | "unreadable", limit: number) => HostSettingNotice;
|
|
140
146
|
export declare class HostSettingsRefused extends Error {
|
|
141
147
|
readonly notice: HostSettingNotice;
|
|
142
148
|
constructor(n: HostSettingNotice);
|
package/dist/hostTurnSettings.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SETTINGS_CLASSIFY_HOOKS_CONFIG } from './generated/settingsSchemaFns.js';
|
|
2
2
|
import { hostLog } from './host.js';
|
|
3
|
+
import { isEngineFiredHookEvent } from './pluginHooksWire.js';
|
|
3
4
|
import { layerNotAppliedRefusesTurn, salvageSettingsHooksEntries } from './settingsHooksSalvage.js';
|
|
4
5
|
import { ADOPTED_LAYERS, HOST_SETTINGS_LAYERS, HostSettingsSourceShapeError, TIGHTEN_ONLY_HOST_SETTINGS_LAYERS, permissionBucketOf, permissionRulesOf, MANAGED_READING_DISPOSITIONS, adoptHostSettingsRead, mintHostSettingsSession, readHostSettingsOnce, remintSameContent, sessionSnapshotOf, settingsValueOf, sourceOfRead, } from './hostSettingsSource.js';
|
|
5
6
|
import { hooksWirePlan } from './hooksWireCaps.js';
|
|
@@ -13,8 +14,8 @@ import { assemblyRefusalOf } from './wireFailureShape.js';
|
|
|
13
14
|
import { permissionRuleLayersOn } from './permissionsAllowGrantCapability.js';
|
|
14
15
|
import { layerAdmissionReading, layerAdmitted } from './settingsLayerAdmission.js';
|
|
15
16
|
import { SETTINGS_BUILD_LAYER_PARTS_UNREAD_NOTICE } from './generated/settingsSchemaFns.js';
|
|
16
|
-
import { appendOwnElement, ownDataField } from './ownKey.js';
|
|
17
|
-
export const HOST_SUPPLIED_KEYS = Object.freeze(['settings.hooks', 'settings.resolved', 'settings.webSearch', 'settings.outputStyle', 'memory', 'fileHistory']);
|
|
17
|
+
import { appendOwnElement, ownDataField, readOwnDataValue } from './ownKey.js';
|
|
18
|
+
export const HOST_SUPPLIED_KEYS = Object.freeze(['settings.hooks', 'settings.resolved', 'settings.webSearch', 'settings.outputStyle', 'memory', 'fileHistory', 'settings.env']);
|
|
18
19
|
export const HOST_SETTING_CAUSES = Object.freeze([
|
|
19
20
|
'carried',
|
|
20
21
|
'entries_dropped',
|
|
@@ -44,6 +45,8 @@ const HOST_SETTING_NOTICE_TEXT = {
|
|
|
44
45
|
'HS-STYLE-MISSING': (what) => renderMessage(msg('session.hostSettings.styleMissing', { name: what })),
|
|
45
46
|
'HS-STYLE-SAFE': () => renderMessage(msg('session.hostSettings.styleSafeMode')),
|
|
46
47
|
'HS-LAYER-PARTS-UNREAD': (line) => line,
|
|
48
|
+
'HS-STYLE-OVERSIZE': (what) => renderMessage(msg('session.hostSettings.styleOversize', { limit: what })),
|
|
49
|
+
'HS-STYLE-UNREADABLE': () => renderMessage(msg('session.hostSettings.styleUnreadable')),
|
|
47
50
|
};
|
|
48
51
|
const KEY_NOUN = {
|
|
49
52
|
'settings.hooks': 'the hooks',
|
|
@@ -52,6 +55,7 @@ const KEY_NOUN = {
|
|
|
52
55
|
'settings.outputStyle': 'the output style',
|
|
53
56
|
memory: 'auto-memory',
|
|
54
57
|
fileHistory: 'file checkpoints',
|
|
58
|
+
'settings.env': 'the environment variables your HTTP hooks read',
|
|
55
59
|
};
|
|
56
60
|
const BASE_DISPOSITION = {
|
|
57
61
|
carried: 'carry',
|
|
@@ -204,6 +208,98 @@ function webSearchArm(src, side) {
|
|
|
204
208
|
notices: [notice('HS-WEBSEARCH-MALFORMED', 'turn', webSearchVerdictMessage(verdict, 'submit') ?? '')],
|
|
205
209
|
};
|
|
206
210
|
}
|
|
211
|
+
function ownElementsOf(v) {
|
|
212
|
+
if (!Array.isArray(v))
|
|
213
|
+
return [];
|
|
214
|
+
const len = readOwnDataValue(v, 'length');
|
|
215
|
+
if (typeof len !== 'number' || !Number.isSafeInteger(len) || len < 0)
|
|
216
|
+
return [];
|
|
217
|
+
const out = [];
|
|
218
|
+
for (let i = 0; i < len; i++)
|
|
219
|
+
appendOwnElement(out, readOwnDataValue(v, String(i)));
|
|
220
|
+
return out;
|
|
221
|
+
}
|
|
222
|
+
export function hookEnvNamesOf(hooks) {
|
|
223
|
+
const out = [];
|
|
224
|
+
if (!isRecordShape(hooks))
|
|
225
|
+
return out;
|
|
226
|
+
for (const event of Object.keys(hooks)) {
|
|
227
|
+
if (!isEngineFiredHookEvent(event))
|
|
228
|
+
continue;
|
|
229
|
+
for (const group of ownElementsOf(readOwnDataValue(hooks, event))) {
|
|
230
|
+
if (!isRecordShape(group))
|
|
231
|
+
continue;
|
|
232
|
+
for (const entry of ownElementsOf(readOwnDataValue(group, 'hooks'))) {
|
|
233
|
+
if (!isRecordShape(entry) || readOwnDataValue(entry, 'type') !== 'http')
|
|
234
|
+
continue;
|
|
235
|
+
for (const name of ownElementsOf(readOwnDataValue(entry, 'allowedEnvVars'))) {
|
|
236
|
+
if (typeof name === 'string' && !out.includes(name))
|
|
237
|
+
appendOwnElement(out, name);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
return out;
|
|
243
|
+
}
|
|
244
|
+
function hookEnvLayerOf(names, env) {
|
|
245
|
+
const layer = {};
|
|
246
|
+
let n = 0;
|
|
247
|
+
for (const name of names) {
|
|
248
|
+
const v = readOwnDataValue(env, name);
|
|
249
|
+
if (typeof v !== 'string')
|
|
250
|
+
continue;
|
|
251
|
+
Object.defineProperty(layer, name, { value: v, enumerable: true, writable: true, configurable: true });
|
|
252
|
+
n++;
|
|
253
|
+
}
|
|
254
|
+
return n > 0 ? freeze(layer) : undefined;
|
|
255
|
+
}
|
|
256
|
+
function hookEnvConsistent(env, hooks) {
|
|
257
|
+
if (env === undefined)
|
|
258
|
+
return true;
|
|
259
|
+
try {
|
|
260
|
+
if (!isRecordShape(env))
|
|
261
|
+
return false;
|
|
262
|
+
const keys = Reflect.ownKeys(env);
|
|
263
|
+
if (keys.length === 0)
|
|
264
|
+
return false;
|
|
265
|
+
const names = hookEnvNamesOf(hooks);
|
|
266
|
+
return keys.every((k) => typeof k === 'string' && names.includes(k) && typeof readOwnDataValue(env, k) === 'string');
|
|
267
|
+
}
|
|
268
|
+
catch {
|
|
269
|
+
return false;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
function envArm(src, hooksCarried) {
|
|
273
|
+
const key = 'settings.env';
|
|
274
|
+
if (src.kind === 'missing')
|
|
275
|
+
return missingArm(key);
|
|
276
|
+
if (src.kind === 'threw')
|
|
277
|
+
return unreadableArm(key);
|
|
278
|
+
const v = src.value;
|
|
279
|
+
if (v === 'none')
|
|
280
|
+
return noSourceArm(key);
|
|
281
|
+
let env;
|
|
282
|
+
try {
|
|
283
|
+
if (!isRecordShape(v) || !Object.hasOwn(v, 'env'))
|
|
284
|
+
throw badSource(key, "{ env } with the host environment (pass 'none' where there is none)");
|
|
285
|
+
env = v.env;
|
|
286
|
+
}
|
|
287
|
+
catch (e) {
|
|
288
|
+
if (e instanceof HostSourceShapeError)
|
|
289
|
+
throw e;
|
|
290
|
+
return unreadableArm(key);
|
|
291
|
+
}
|
|
292
|
+
if (!isRecordShape(env))
|
|
293
|
+
throw badSource(key, '{ env } where env is the environment record');
|
|
294
|
+
let layer;
|
|
295
|
+
try {
|
|
296
|
+
layer = hookEnvLayerOf(hookEnvNamesOf(hooksCarried), env);
|
|
297
|
+
}
|
|
298
|
+
catch {
|
|
299
|
+
return unreadableArm(key);
|
|
300
|
+
}
|
|
301
|
+
return layer === undefined ? emptyArm(key) : carriedArm(key, layer);
|
|
302
|
+
}
|
|
207
303
|
function memoryArm(src, side, judge) {
|
|
208
304
|
const key = 'memory';
|
|
209
305
|
if (src.kind === 'missing')
|
|
@@ -336,7 +432,7 @@ function outputStyleArm(src, side) {
|
|
|
336
432
|
const reminder = state.ok && state.value === 'present' ? ownDataOf(body, 'turnReminder') : undefined;
|
|
337
433
|
if (text !== undefined && text.ok && typeof text.value === 'string' && reminder !== undefined && reminder.ok && (reminder.value === undefined || typeof reminder.value === 'string')) {
|
|
338
434
|
const facts = freeze({ name, body: text.value, ...(reminder.value !== undefined ? { turnReminder: reminder.value } : {}) });
|
|
339
|
-
return { ...carriedArm(key,
|
|
435
|
+
return text.value.trim() === '' ? { ...emptyArm(key), facts } : { ...carriedArm(key, text.value), facts };
|
|
340
436
|
}
|
|
341
437
|
return {
|
|
342
438
|
row: freeze({ key, cause: 'source_unreadable', disposition: 'withhold_notice' }),
|
|
@@ -709,6 +805,7 @@ export function buildHostTurnSettings(input, judges) {
|
|
|
709
805
|
const outputStyle = outputStyleArm(read('outputStyle'), side);
|
|
710
806
|
const memory = memoryArm(read('memory'), side, judges.memoryOffDeclared);
|
|
711
807
|
const fileHistory = fileHistoryArm(read('fileHistory'));
|
|
808
|
+
const envSource = read('env');
|
|
712
809
|
let resolved = resolvedArm;
|
|
713
810
|
let armsByKey = [hooks, resolved, webSearch, outputStyle, memory, fileHistory];
|
|
714
811
|
if (side.kind === 'read' && MANAGED_READING_DISPOSITIONS[side.read.managed].commit === 'refuse') {
|
|
@@ -765,7 +862,10 @@ export function buildHostTurnSettings(input, judges) {
|
|
|
765
862
|
armsByKey = [{ ...mark(armsByKey[0]), ...(hooks.plan !== undefined ? { plan: hooks.plan } : {}) }, mark(armsByKey[1]), armsByKey[2], armsByKey[3], armsByKey[4], armsByKey[5]];
|
|
766
863
|
appendOwnElement(heldNotices, notice('HS-HELD-PREVIOUS', 'diagnostic'));
|
|
767
864
|
}
|
|
768
|
-
const
|
|
865
|
+
const hooksFinal = armsByKey[0];
|
|
866
|
+
const hooksToCarry = hooksFinal.row.disposition === 'carry' || hooksFinal.row.disposition === 'carry_partial' || hooksFinal.row.disposition === 'hold_for_consent' ? hooksFinal.carried : undefined;
|
|
867
|
+
const env = envArm(envSource, hooksToCarry);
|
|
868
|
+
const arms = [...armsByKey, env];
|
|
769
869
|
const rows = freeze(arms.map((a) => a.row));
|
|
770
870
|
const resolvedOut = arms[1]?.row.disposition === 'carry' || arms[1]?.row.disposition === 'carry_partial' || arms[1]?.row.disposition === 'hold_for_consent' ? resolvedCarried : undefined;
|
|
771
871
|
const permissionsRow = arms[1]?.row;
|
|
@@ -790,8 +890,10 @@ export function buildHostTurnSettings(input, judges) {
|
|
|
790
890
|
...(carriedOf(3) !== undefined ? { outputStyle: carriedOf(3) } : {}),
|
|
791
891
|
...(carriedOf(4) !== undefined ? { memory: 'off' } : {}),
|
|
792
892
|
...(carriedOf(5) !== undefined ? { fileHistory: 'disabled' } : {}),
|
|
893
|
+
...(carriedOf(6) !== undefined ? { env: carriedOf(6) } : {}),
|
|
793
894
|
});
|
|
794
|
-
const
|
|
895
|
+
const styleDisposition = arms[3]?.row.disposition;
|
|
896
|
+
const styleFacts = styleDisposition === 'carry' || styleDisposition === 'nothing_to_carry' ? outputStyle.facts : undefined;
|
|
795
897
|
const product = { verdict, rows, notices, hooks: hooks.plan, carried, session: nextSession, outputStyle: styleFacts, held };
|
|
796
898
|
if (resolvedError !== undefined && resolvedOut !== undefined)
|
|
797
899
|
Object.defineProperty(product, RESOLVED_DEFERRED_ERROR, { value: resolvedError, enumerable: false });
|
|
@@ -910,6 +1012,7 @@ export function hostSettingsSelfCheck(product) {
|
|
|
910
1012
|
}
|
|
911
1013
|
export const hostProjectionNotice = () => notice('HS-PROJECTION', 'turn');
|
|
912
1014
|
export const hostFileHistoryRestoreNotice = () => notice('HS-FILEHISTORY-RESTORE', 'turn');
|
|
1015
|
+
export const hostStyleNotAppliedNotice = (cause, limit) => cause === 'oversize' ? notice('HS-STYLE-OVERSIZE', 'turn', String(limit)) : notice('HS-STYLE-UNREADABLE', 'turn');
|
|
913
1016
|
export class HostSettingsRefused extends Error {
|
|
914
1017
|
notice;
|
|
915
1018
|
constructor(n) {
|
|
@@ -985,6 +1088,8 @@ export function hostTurnSettingsOf(v, depth = 'full') {
|
|
|
985
1088
|
return undefined;
|
|
986
1089
|
if (Object.hasOwn(carried, 'hooks') && carried.hooks !== undefined && !hooksPassJudge(carried.hooks))
|
|
987
1090
|
return undefined;
|
|
1091
|
+
if (!hookEnvConsistent(Object.hasOwn(carried, 'env') ? carried.env : undefined, Object.hasOwn(carried, 'hooks') ? carried.hooks : undefined))
|
|
1092
|
+
return undefined;
|
|
988
1093
|
return shaped;
|
|
989
1094
|
}
|
|
990
1095
|
catch {
|
|
@@ -1225,6 +1330,8 @@ function intakeSnapshotUnguarded(product, onResolved) {
|
|
|
1225
1330
|
return undefined;
|
|
1226
1331
|
if (values.hooks !== undefined && !hooksPassJudge(values.hooks))
|
|
1227
1332
|
return undefined;
|
|
1333
|
+
if (!hookEnvConsistent(values.env, values.hooks))
|
|
1334
|
+
return undefined;
|
|
1228
1335
|
const v = ownDataOf(product, 'verdict');
|
|
1229
1336
|
if (!v.ok)
|
|
1230
1337
|
return undefined;
|
|
@@ -117,6 +117,7 @@ declare const EN: {
|
|
|
117
117
|
'model.subagent.ambiguous': string;
|
|
118
118
|
'model.catalogDefault.refused.named': string;
|
|
119
119
|
'model.catalogDefault.refused.select': string;
|
|
120
|
+
'session.sync.pushRowBitsWriterSide': string;
|
|
120
121
|
'session.devices.laneAbsent': string;
|
|
121
122
|
'session.devices.laneUnreported': string;
|
|
122
123
|
'session.devices.verbsOff': string;
|
|
@@ -130,6 +131,24 @@ declare const EN: {
|
|
|
130
131
|
'session.engine.dispatch.scopeUnproven': string;
|
|
131
132
|
'session.engine.dispatch.unresolved': string;
|
|
132
133
|
'session.engine.dispatch.sessionAmbiguous': string;
|
|
134
|
+
'session.mcpReconnect.notRunning': string;
|
|
135
|
+
'session.mcpReconnect.unsupported': string;
|
|
136
|
+
'session.mcpReconnect.notFound': string;
|
|
137
|
+
'session.mcpReconnect.invalid': string;
|
|
138
|
+
'session.mcpReconnect.failed': string;
|
|
139
|
+
'session.mcpReconnect.noSession': string;
|
|
140
|
+
'session.mcpReconnect.unavailable': string;
|
|
141
|
+
'session.mcpReconnect.accepted.one': string;
|
|
142
|
+
'session.mcpReconnect.accepted.other': string;
|
|
143
|
+
'session.mcpReconnect.refused.untouched': string;
|
|
144
|
+
'session.mcpReconnect.refused.noTools': string;
|
|
145
|
+
'session.mcpReconnect.refused.listed.one': string;
|
|
146
|
+
'session.mcpReconnect.refused.listed.other': string;
|
|
147
|
+
'session.mcpReconnect.undeclared': string;
|
|
148
|
+
'session.mcpReconnect.unsettled': string;
|
|
149
|
+
'session.mcpReconnect.reasonTail': string;
|
|
150
|
+
'session.mcpFailure.reauthorizeSuffix': string;
|
|
151
|
+
'session.mcpFailure.serverDownSuffix': string;
|
|
133
152
|
'config.cloudLogin.accessDenied': string;
|
|
134
153
|
'config.cloudLogin.expiredToken': string;
|
|
135
154
|
'config.cloudLogin.invalidGrant': string;
|
|
@@ -252,6 +271,7 @@ declare const EN: {
|
|
|
252
271
|
'approval.settle.cause.streamDisconnected': string;
|
|
253
272
|
'approval.settle.cause.undeliverable': string;
|
|
254
273
|
'approval.resolution.engineUnavailable': string;
|
|
274
|
+
'approval.allowNote.notCarried': string;
|
|
255
275
|
'approval.decide.requiresBinding': string;
|
|
256
276
|
'approval.decide.unboundWayOut.armed': string;
|
|
257
277
|
'approval.decide.unboundWayOut.none': string;
|
|
@@ -261,6 +281,8 @@ declare const EN: {
|
|
|
261
281
|
'approval.rowUnresumable.askNotSurfaced': string;
|
|
262
282
|
'approval.park.stillParked': string;
|
|
263
283
|
'approval.park.refusedNotResumable': string;
|
|
284
|
+
'approval.park.resume.card': string;
|
|
285
|
+
'approval.park.resume.speak': string;
|
|
264
286
|
'approval.park.argsFromModelCall': string;
|
|
265
287
|
'approval.park.questionsFromModelCall': string;
|
|
266
288
|
'approval.policyDeny.denyRule': string;
|
|
@@ -269,6 +291,7 @@ declare const EN: {
|
|
|
269
291
|
'approval.policyDeny.tail': string;
|
|
270
292
|
'approval.decision.grantChanged': string;
|
|
271
293
|
'approval.decision.answerInvalid': string;
|
|
294
|
+
'approval.editRefusal.line': string;
|
|
272
295
|
'approval.decision.settledElsewhereContrary.deniedFirst': string;
|
|
273
296
|
'approval.decision.settledElsewhereContrary.approvedFirst': string;
|
|
274
297
|
'approval.decision.unconfirmedAfterRetry': string;
|
|
@@ -634,6 +657,8 @@ declare const EN: {
|
|
|
634
657
|
'session.hostSettings.heldPrevious': string;
|
|
635
658
|
'session.hostSettings.styleMissing': string;
|
|
636
659
|
'session.hostSettings.styleSafeMode': string;
|
|
660
|
+
'session.hostSettings.styleOversize': string;
|
|
661
|
+
'session.hostSettings.styleUnreadable': string;
|
|
637
662
|
'model.identity.lane.processEnv': string;
|
|
638
663
|
'model.identity.lane.settingsEnv': string;
|
|
639
664
|
'model.identity.lane.modelCatalogFile': string;
|
|
@@ -708,6 +733,27 @@ declare const EN: {
|
|
|
708
733
|
'notice.peer.inbound.resupplyExhausted': string;
|
|
709
734
|
'notice.peer.inbound.other': string;
|
|
710
735
|
'notice.peer.inbound.cause': string;
|
|
736
|
+
'notice.sessionBox.peer.another': string;
|
|
737
|
+
'notice.sessionBox.peer.anotherStart': string;
|
|
738
|
+
'notice.sessionBox.inbox.one': string;
|
|
739
|
+
'notice.sessionBox.inbox.many': string;
|
|
740
|
+
'notice.sessionBox.inbox.urgent': string;
|
|
741
|
+
'notice.sessionBox.inbox.resupplied': string;
|
|
742
|
+
'notice.sessionBox.delivery.delivered': string;
|
|
743
|
+
'notice.sessionBox.delivery.held': string;
|
|
744
|
+
'notice.sessionBox.delivery.heldByPolicy': string;
|
|
745
|
+
'notice.sessionBox.delivery.denied': string;
|
|
746
|
+
'notice.sessionBox.delivery.refused': string;
|
|
747
|
+
'notice.sessionBox.delivery.expired': string;
|
|
748
|
+
'notice.sessionBox.delivery.dropped': string;
|
|
749
|
+
'notice.sessionBox.delivery.droppedPlain': string;
|
|
750
|
+
'notice.sessionBox.delivery.other': string;
|
|
751
|
+
'notice.sessionBox.idle.finished': string;
|
|
752
|
+
'notice.sessionBox.idle.finishedDetail': string;
|
|
753
|
+
'notice.sessionBox.idle.exited': string;
|
|
754
|
+
'notice.sessionBox.idle.unavailable': string;
|
|
755
|
+
'notice.sessionBox.idle.expired': string;
|
|
756
|
+
'notice.sessionBox.idle.other': string;
|
|
711
757
|
'notice.peer.held.deliveredApproved': string;
|
|
712
758
|
'notice.peer.held.deliveredRejudged': string;
|
|
713
759
|
'notice.peer.held.droppedRejudged': string;
|
|
@@ -736,6 +782,7 @@ declare const EN: {
|
|
|
736
782
|
'notice.task.lateApproval': string;
|
|
737
783
|
'notice.task.haltUnconsumed': string;
|
|
738
784
|
'notice.steering.parkedInputBlocked': string;
|
|
785
|
+
'notice.model.capabilityDowngraded.image': string;
|
|
739
786
|
'rules.refusal.sentence.one': string;
|
|
740
787
|
'rules.refusal.sentence.other': string;
|
|
741
788
|
'rules.refusal.item': string;
|
|
@@ -818,6 +865,10 @@ declare const EN: {
|
|
|
818
865
|
'session.steerRefusal.advice': string;
|
|
819
866
|
'session.steerRefusal.hostQueue.queued': string;
|
|
820
867
|
'session.steerRefusal.hostQueue.dropped': string;
|
|
868
|
+
'session.interruptRefusal.nothingInFlight': string;
|
|
869
|
+
'session.interruptRefusal.notHeld': string;
|
|
870
|
+
'session.interruptRefusal.notRunning': string;
|
|
871
|
+
'session.interruptRefusal.unrecognised': string;
|
|
821
872
|
'session.permissionModeSwitch.applied': string;
|
|
822
873
|
'session.permissionModeSwitch.folded': string;
|
|
823
874
|
'session.permissionModeSwitch.reason.entryFloor': string;
|
|
@@ -954,6 +1005,8 @@ declare const EN: {
|
|
|
954
1005
|
'notice.failure.headline.parked': string;
|
|
955
1006
|
'notice.failure.headline.internal': string;
|
|
956
1007
|
'notice.failure.headline.causeUnreadable': string;
|
|
1008
|
+
'notice.streamEnded.emptyLegs.headline': string;
|
|
1009
|
+
'notice.streamEnded.consecutiveFailures.headline': string;
|
|
957
1010
|
'notice.failure.quota.fiveHour': string;
|
|
958
1011
|
'notice.failure.quota.weekly': string;
|
|
959
1012
|
'notice.failure.quota.budgetPersonal': string;
|
|
@@ -1108,6 +1161,16 @@ declare const EN: {
|
|
|
1108
1161
|
'notice.wireRefusal.sessionIdRetired.folded': string;
|
|
1109
1162
|
'notice.wireRefusal.runConcurrencyCap.head': string;
|
|
1110
1163
|
'notice.wireRefusal.runConcurrencyCap.unknownWait': string;
|
|
1164
|
+
'notice.wireRefusal.unreadMembers': string;
|
|
1165
|
+
'notice.wireRefusal.unreadMembers.folded': string;
|
|
1166
|
+
'notice.wireRefusal.unreadMembers.where': string;
|
|
1167
|
+
'notice.wireRefusal.unreadMembers.remedy': string;
|
|
1168
|
+
'notice.wireRefusal.unreadMembers.folded.remedy': string;
|
|
1169
|
+
'notice.wireRefusal.unreadMembers.part.settingsHooks': string;
|
|
1170
|
+
'notice.wireRefusal.unreadMembers.part.settingsEnv': string;
|
|
1171
|
+
'notice.wireRefusal.unreadMembers.part.settingsOther': string;
|
|
1172
|
+
'notice.wireRefusal.unreadMembers.part.mcpTransport': string;
|
|
1173
|
+
'notice.wireRefusal.unreadMembers.part.a2aHeaders': string;
|
|
1111
1174
|
'notice.wireRefusal.unsupportedRule': string;
|
|
1112
1175
|
'notice.wireRefusal.unsupportedRule.other': string;
|
|
1113
1176
|
'notice.wireRefusal.unsupportedRule.stored': string;
|
|
@@ -1169,6 +1232,8 @@ declare const EN: {
|
|
|
1169
1232
|
'session.subagent.delegatedPrompt.absence.forbidden': string;
|
|
1170
1233
|
'session.subagent.delegatedPrompt.absence.promptAbsent': string;
|
|
1171
1234
|
'session.subagent.delegatedPrompt.absence.unknown': string;
|
|
1235
|
+
'rules.sessionPolicy.remove.loosenForbiddenStem': string;
|
|
1236
|
+
'rules.sessionPolicy.remove.loosenForbidden': string;
|
|
1172
1237
|
'rules.sessionPolicy.tighten.unknown.sessionOwnerless.noIdentity': string;
|
|
1173
1238
|
'rules.sessionPolicy.tighten.unknown.storeCorrupt.noOperator': string;
|
|
1174
1239
|
'rules.sessionPolicy.deployment.noOperator.readStoreCorrupt': string;
|
|
@@ -1178,6 +1243,9 @@ declare const EN: {
|
|
|
1178
1243
|
'config.hooks.plan.reason.compactionLocalFallback': string;
|
|
1179
1244
|
'config.hooks.plan.reason.keyNotRead': string;
|
|
1180
1245
|
'config.hooks.plan.disableAllHooks': string;
|
|
1246
|
+
'config.hooks.plan.reason.closedUntrusted': string;
|
|
1247
|
+
'config.hooks.plan.reason.closedGovernanceUnreadable': string;
|
|
1248
|
+
'config.hooks.plan.reason.closedDisableAll': string;
|
|
1181
1249
|
'config.hooks.plan.keyNotRead.oneKey': string;
|
|
1182
1250
|
'config.hooks.plan.keyNotRead.manyKeys': string;
|
|
1183
1251
|
'config.hooks.plan.keyNotRead.more': string;
|
|
@@ -1224,8 +1292,11 @@ declare const EN: {
|
|
|
1224
1292
|
'config.mods.loader.failed': string;
|
|
1225
1293
|
'config.mods.loader.failedNoReason': string;
|
|
1226
1294
|
'config.mods.refusal.by': string;
|
|
1295
|
+
'config.mods.request.by': string;
|
|
1227
1296
|
'config.mods.rewrite.resultInPlace': string;
|
|
1228
1297
|
'config.mods.rewrite.inputBy': string;
|
|
1298
|
+
'config.mods.session.unreadable': string;
|
|
1299
|
+
'config.mods.session.unarmed': string;
|
|
1229
1300
|
'follow.notFollowed.headRun': string;
|
|
1230
1301
|
'follow.notFollowed.headTurn': string;
|
|
1231
1302
|
'follow.notFollowed.reason.exhaustedDraining': string;
|
|
@@ -1337,6 +1408,18 @@ declare const EN: {
|
|
|
1337
1408
|
'localEngine.restartOutcome.pendingBusy': string;
|
|
1338
1409
|
'localEngine.restartOutcome.failedPrepare': string;
|
|
1339
1410
|
'localEngine.restartOutcome.failedDown': string;
|
|
1411
|
+
'session.devices.repoint.done': string;
|
|
1412
|
+
'session.devices.repoint.unverified': string;
|
|
1413
|
+
'session.devices.repoint.undetermined': string;
|
|
1414
|
+
'session.devices.repoint.partial': string;
|
|
1415
|
+
'session.devices.repoint.storeFailed': string;
|
|
1416
|
+
'session.devices.repoint.refused.addressInvalid': string;
|
|
1417
|
+
'session.devices.repoint.refused.sameAddress': string;
|
|
1418
|
+
'session.devices.repoint.refused.recordAbsent': string;
|
|
1419
|
+
'session.devices.repoint.refused.recordNotActive': string;
|
|
1420
|
+
'session.devices.repoint.refused.recordUnreadable': string;
|
|
1421
|
+
'session.devices.repoint.refused.targetOccupied': string;
|
|
1422
|
+
'session.devices.repoint.refused.unarmed': string;
|
|
1340
1423
|
};
|
|
1341
1424
|
export declare const EN_MESSAGES: Readonly<typeof EN>;
|
|
1342
1425
|
export type MessageKey = keyof typeof EN;
|