@sema-agent/client-core 0.101.0 → 0.103.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 +153 -0
- package/README.md +19 -11
- package/dist/adapt/toolCards.d.ts +4 -2
- package/dist/adapt/toolCards.js +22 -6
- package/dist/adapt.d.ts +1 -1
- package/dist/adapt.js +1 -1
- package/dist/adapter/downstream/eventToSdkMessage.d.ts +5 -1
- package/dist/adapter/downstream/eventToSdkMessage.js +26 -70
- package/dist/adapter/downstream/terminalToSdkResult.js +0 -1
- package/dist/adapter/downstream/wiringManifestView.d.ts +1 -0
- package/dist/adapter/downstream/wiringManifestView.js +141 -0
- package/dist/cloudConfigWireCaps.js +6 -3
- package/dist/compensations.js +1 -1
- package/dist/credentialPlaneCapability.d.ts +22 -0
- package/dist/credentialPlaneCapability.js +75 -0
- package/dist/deviceExecutorManagementCapability.d.ts +1 -0
- package/dist/deviceExecutorManagementCapability.js +3 -1
- package/dist/displayUntrusted.d.ts +8 -4
- package/dist/displayUntrusted.js +769 -96
- package/dist/engineErrorCodes.d.ts +1 -0
- package/dist/engineErrorCodes.js +3 -1
- package/dist/engineNoticeCodes.d.ts +26 -0
- package/dist/engineNoticeCodes.js +121 -12
- package/dist/engineRowRef.js +2 -0
- package/dist/errorSupplementRoles.js +1 -3
- package/dist/eventLeg.js +2 -1
- package/dist/fleet/fleetProjection.js +16 -10
- package/dist/gateOutcome.d.ts +20 -0
- package/dist/gateOutcome.js +89 -0
- package/dist/generated/engineAskFaceTables.js +2 -2
- package/dist/generated/engineFactTables.d.ts +6 -2
- package/dist/generated/engineFactTables.js +41 -1
- package/dist/generated/engineNoticeTables.js +18 -0
- package/dist/generated/settingsSchemaDefaultModel.d.ts +1 -1
- package/dist/generated/settingsSchemaDefaultModel.js +2 -2
- package/dist/generated/settingsSchemaFns.d.ts +15 -0
- package/dist/generated/settingsSchemaFns.js +25 -2
- package/dist/generated/settingsSchemaHooksClassifier.js +109 -29
- package/dist/generated/settingsSchemaMcpRequestEntry.d.ts +1 -1
- package/dist/generated/settingsSchemaMcpRequestEntry.js +213 -93
- package/dist/generated/settingsSchemaMcpServerName.d.ts +1 -0
- package/dist/generated/settingsSchemaMcpServerName.js +8 -0
- package/dist/generated/settingsSchemaOwnKeyRead.d.ts +1 -0
- package/dist/generated/settingsSchemaOwnKeyRead.js +172 -0
- package/dist/generated/settingsSchemaPlainJsonObject.d.ts +1 -0
- package/dist/generated/settingsSchemaPlainJsonObject.js +28 -0
- package/dist/generated/settingsSchemaSafetyMergeSpec.js +10 -7
- package/dist/generated/settingsSchemaTierWords.d.ts +1 -0
- package/dist/generated/settingsSchemaTierWords.js +7 -0
- package/dist/generated/settingsSchemaTypes.d.ts +3 -1
- package/dist/hitl/automaticAnswerVerdict.d.ts +1 -1
- package/dist/hitl/decisionConflict.js +11 -11
- package/dist/hitl/decisionRefusal.d.ts +1 -0
- package/dist/hitl/decisionRefusal.js +4 -2
- package/dist/hitl/editedRuleTextPrecheck.d.ts +1 -0
- package/dist/hitl/editedRuleTextPrecheck.js +26 -1
- package/dist/hitl/persistedRulesWire.js +1 -0
- package/dist/hitl/planReviewWire.d.ts +2 -1
- package/dist/hitl/planReviewWire.js +8 -12
- package/dist/hitl/sessionPolicyDeliverable.d.ts +0 -1
- package/dist/hitl/sessionPolicyDeliverable.js +0 -5
- package/dist/hitl/sessionPolicyWire.js +1 -1
- package/dist/hitl/toolApprovalWire.d.ts +18 -6
- package/dist/hitl/toolApprovalWire.js +9 -4
- package/dist/i18n/messages.en.d.ts +43 -0
- package/dist/i18n/messages.en.js +44 -1
- package/dist/i18n/messages.zh.js +46 -1
- package/dist/index.d.ts +11 -2
- package/dist/index.js +7 -1
- package/dist/inheritEnvWire.d.ts +1 -0
- package/dist/inheritEnvWire.js +8 -5
- package/dist/interactiveHalt.d.ts +3 -1
- package/dist/interactiveHalt.js +2 -0
- package/dist/interactiveInterrupt.d.ts +2 -0
- package/dist/interactiveInterrupt.js +15 -0
- package/dist/mcpEngineLeg.d.ts +3 -0
- package/dist/mcpEngineLeg.js +4 -1
- package/dist/mcpLiveness.d.ts +18 -0
- package/dist/mcpLiveness.js +48 -1
- package/dist/mcpReconnect.d.ts +3 -0
- package/dist/mcpReconnect.js +6 -0
- package/dist/mcpStatusSupersetKeys.js +24 -1
- package/dist/mcpWireCaps.d.ts +2 -3
- package/dist/mcpWireCaps.js +9 -8
- package/dist/memoryEntriesWire.d.ts +35 -1
- package/dist/memoryEntriesWire.js +110 -14
- package/dist/modsFace.d.ts +8 -0
- package/dist/modsFace.js +63 -0
- package/dist/ownKey.d.ts +1 -0
- package/dist/ownKey.js +15 -0
- package/dist/postureKnob.js +1 -1
- package/dist/prepareRefusal.d.ts +0 -1
- package/dist/prepareRefusal.js +0 -3
- package/dist/printToolResultFrame.js +1 -1
- package/dist/promptProfileWireCaps.d.ts +1 -3
- package/dist/promptProfileWireCaps.js +2 -2
- package/dist/request/printNotification.js +1 -1
- package/dist/request/taskRequest.d.ts +22 -1
- package/dist/request/taskRequest.js +126 -10
- package/dist/retryStatus.d.ts +13 -1
- package/dist/retryStatus.js +20 -5
- package/dist/seam.js +1 -1
- package/dist/seatContract.d.ts +22 -6
- package/dist/seatContract.js +45 -6
- package/dist/sessionBackground.d.ts +165 -0
- package/dist/sessionBackground.js +781 -0
- package/dist/sessionBackgroundHandoff.d.ts +54 -0
- package/dist/sessionBackgroundHandoff.js +321 -0
- package/dist/sessionMap.js +4 -1
- package/dist/sessionMemoryErase.js +24 -2
- package/dist/settingsCredentialKeyPaths.js +2 -17
- package/dist/thinkingLatch.d.ts +69 -0
- package/dist/thinkingLatch.js +255 -0
- package/dist/thinkingLatchWords.d.ts +7 -0
- package/dist/thinkingLatchWords.js +4 -0
- package/dist/toolResult.js +2 -24
- package/dist/turnFailurePresentation.js +8 -1
- package/dist/wireFailureShape.d.ts +12 -1
- package/dist/wireFailureShape.js +58 -24
- package/dist/wireRefusalCopy.d.ts +0 -3
- package/dist/wireRefusalCopy.js +0 -17
- package/docs/INTEGRATION-CLIENTS.md +458 -14
- package/package.json +5 -5
- package/dist/argvFlagValue.d.ts +0 -8
- package/dist/argvFlagValue.js +0 -37
|
@@ -118,7 +118,7 @@ export interface McpEntryKeyIssue {
|
|
|
118
118
|
readonly path: string;
|
|
119
119
|
readonly reason: string;
|
|
120
120
|
readonly member?: string;
|
|
121
|
-
readonly fault?:
|
|
121
|
+
readonly fault?: PlainStringRecordFault;
|
|
122
122
|
}
|
|
123
123
|
export type RequestMcpTransportRead = {
|
|
124
124
|
ok: true;
|
|
@@ -128,6 +128,8 @@ export type RequestMcpTransportRead = {
|
|
|
128
128
|
ok: false;
|
|
129
129
|
issue: McpEntryKeyIssue;
|
|
130
130
|
};
|
|
131
|
+
declare const PLAIN_STRING_RECORD_FAULTS: readonly ["not_plain_record", "member_not_string", "member_name_reserved"];
|
|
132
|
+
export type PlainStringRecordFault = (typeof PLAIN_STRING_RECORD_FAULTS)[number];
|
|
131
133
|
declare const MCP_CONTENT_ORIGINS: readonly ["local", "execution", "external"];
|
|
132
134
|
export type McpContentOrigin = (typeof MCP_CONTENT_ORIGINS)[number];
|
|
133
135
|
export {};
|
|
@@ -20,7 +20,7 @@ export type AutomaticAnswerVerdict = {
|
|
|
20
20
|
readonly kind: 'unknown';
|
|
21
21
|
readonly why: AutomaticAnswerUnknownWhy;
|
|
22
22
|
};
|
|
23
|
-
export declare const MODE_ARBITRATION: Readonly<Record<"hook" | "write_protection" | "mode" | "target_unresolved" | "content_question" | "ancestor" | "dangerous_delete" | "unverifiable_delete" | "unverifiable_shell_text" | "transcript_write" | "org_rule" | "rule_unreadable" | "ask_rule" | "denial_limit_fallback" | "classifier_no_ruling" | "requires_user_interaction" | "cross_boundary" | "operator_forced" | "shell_floor" | "probe" | "tool_marks_mcp" | "tool_marks_a2a" | "policy_rra" | "artifact_shared_read" | "unstated" | "ordinary", CoreModeArbitrationRow>>;
|
|
23
|
+
export declare const MODE_ARBITRATION: Readonly<Record<"hook" | "write_protection" | "mode" | "target_unresolved" | "content_question" | "ancestor" | "dangerous_delete" | "unverifiable_delete" | "unverifiable_shell_text" | "transcript_write" | "org_rule" | "rule_unreadable" | "ask_rule" | "denial_limit_fallback" | "classifier_no_ruling" | "requires_user_interaction" | "cross_boundary" | "operator_forced" | "shell_floor" | "probe" | "write_protection_on_disk" | "tool_marks_mcp" | "tool_marks_a2a" | "policy_rra" | "artifact_shared_read" | "unstated" | "ordinary", CoreModeArbitrationRow>>;
|
|
24
24
|
export declare function foldModeArbitrationRow(classes: Iterable<string>, askFace?: AutomaticAnswerAskFace): CoreModeArbitrationRow;
|
|
25
25
|
export declare function automaticAnswerVerdict(card: object | null | undefined, lane: AutomaticAnswerLane, facts?: AutomaticAnswerFacts | null): AutomaticAnswerVerdict;
|
|
26
26
|
export declare function mandatedApprovalDetailOf(card: object | null | undefined, lang?: UiLanguage): string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { APPROVAL_BINDING_MISMATCH, CHECKPOINT_UNSUPPORTED_VERSION, RESUME_OUTCOME_INVALID } from '../engineErrorCodes.js';
|
|
2
2
|
import { msg, renderMessage } from '../i18n/translate.js';
|
|
3
3
|
import { ownDataField } from '../ownKey.js';
|
|
4
|
-
import { isSlotCarrier, PROTOCOL_ERROR_NAME,
|
|
4
|
+
import { isSlotCarrier, PROTOCOL_ERROR_NAME, protocolErrorNameReading, readRefusalSlots, readThrownExtraSnapshot } from '../wireFailureShape.js';
|
|
5
5
|
const BINDING_SEAT_FIELDS = new Set(['boundCallId', 'boundInputHash']);
|
|
6
6
|
const ANSWER_FIELD = 'answer';
|
|
7
|
+
const REFUSAL_WORD_KEYS = Object.freeze(['field', 'reason']);
|
|
7
8
|
const GRANT_DIGEST_FIELD = 'boundGrantDigest';
|
|
8
9
|
function namedProtocolOf(r) {
|
|
9
10
|
return r.state === 'named' ? r.name : undefined;
|
|
@@ -11,6 +12,7 @@ function namedProtocolOf(r) {
|
|
|
11
12
|
export function decisionConflictOf(err, captured, protocolNameRead) {
|
|
12
13
|
if (!isSlotCarrier(err))
|
|
13
14
|
return undefined;
|
|
15
|
+
const extra = readThrownExtraSnapshot(err);
|
|
14
16
|
let code;
|
|
15
17
|
if (captured !== undefined) {
|
|
16
18
|
if (captured.state !== 'read')
|
|
@@ -25,23 +27,21 @@ export function decisionConflictOf(err, captured, protocolNameRead) {
|
|
|
25
27
|
return undefined;
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
|
-
const protocolName =
|
|
30
|
+
const protocolName = namedProtocolOf(protocolNameRead ?? protocolErrorNameReading(err, extra));
|
|
29
31
|
if (code === CHECKPOINT_UNSUPPORTED_VERSION)
|
|
30
32
|
return 'format_version';
|
|
31
33
|
const bindingFamily = code === APPROVAL_BINDING_MISMATCH || (code === undefined && protocolName === PROTOCOL_ERROR_NAME.ApprovalBindingMismatchError);
|
|
32
34
|
if (!bindingFamily && code !== RESUME_OUTCOME_INVALID)
|
|
33
35
|
return undefined;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
field = readRefusalField(err);
|
|
37
|
-
}
|
|
38
|
-
catch {
|
|
39
|
-
field = undefined;
|
|
40
|
-
}
|
|
36
|
+
const slots = readRefusalSlots(err, REFUSAL_WORD_KEYS, extra.bag);
|
|
37
|
+
const field = slots.field.word;
|
|
41
38
|
if (code === RESUME_OUTCOME_INVALID)
|
|
42
39
|
return field === ANSWER_FIELD ? 'answer_invalid' : field === GRANT_DIGEST_FIELD ? 'grant_changed' : undefined;
|
|
43
|
-
if (field === undefined)
|
|
44
|
-
|
|
40
|
+
if (field === undefined) {
|
|
41
|
+
if (slots.field.present)
|
|
42
|
+
return undefined;
|
|
43
|
+
return slots.reason.word !== undefined ? 'row_integrity' : undefined;
|
|
44
|
+
}
|
|
45
45
|
return BINDING_SEAT_FIELDS.has(field) ? 'binding_mismatch' : undefined;
|
|
46
46
|
}
|
|
47
47
|
export const DECISION_ANSWER_INVALID_CONTENT = 'The engine rejected the answer itself because it does not fit the question that was asked · Nothing was decided and the question is still waiting · Correct the answer and send it again';
|
|
@@ -54,6 +54,7 @@ export interface DecisionRefusalReading {
|
|
|
54
54
|
readonly transient?: true;
|
|
55
55
|
readonly conflict?: DecisionRefusalConflict;
|
|
56
56
|
readonly unrecoverable?: true;
|
|
57
|
+
readonly acceptableForm?: {} | null;
|
|
57
58
|
}
|
|
58
59
|
export declare function mintDecisionRefusalReading(err: {} | null | undefined, context?: RefusalRouteContext, attributionCarried?: boolean, delivered?: DeliveredReading, carried?: RefusalCarrier): DecisionRefusalReading;
|
|
59
60
|
export declare function readDecisionRefusalReading(err: {} | null | undefined, context?: RefusalRouteContext): DecisionRefusalReading;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ASK_GONE, ASK_GONE_PARKED, RESUME_PREFLIGHT_REJECTED, isDecideAlreadyResolvedCode, isDecideParkMovedCode, isDecideRowUnrevivableCode, refusalRetriableReading, refusalSaysStillPending } from '../engineErrorCodes.js';
|
|
1
|
+
import { ASK_GONE, ASK_GONE_PARKED, RESUME_CONSTRAINT_REJECTED, RESUME_PREFLIGHT_REJECTED, isDecideAlreadyResolvedCode, isDecideParkMovedCode, isDecideRowUnrevivableCode, refusalRetriableReading, refusalSaysStillPending } from '../engineErrorCodes.js';
|
|
2
2
|
import { isUiLanguage } from '../env/uiLanguage.js';
|
|
3
3
|
import { msg, renderMessage } from '../i18n/translate.js';
|
|
4
4
|
import { notPendingCauseReading, refusalCauseWordOf } from './approvalEndingCause.js';
|
|
@@ -7,7 +7,7 @@ import { isAlreadyResolvedGateReason, isCodeClassifiedGateFailure } from './park
|
|
|
7
7
|
import { decisionConflictOf } from './decisionConflict.js';
|
|
8
8
|
import { readLivePendingRows } from './livePendingAsk.js';
|
|
9
9
|
import { guardedRead, ownDataField, readOwnDataValue } from '../ownKey.js';
|
|
10
|
-
import { PROTOCOL_ERROR_NAME, THROWN_SLOT_UNREADABLE, isDisplayableWireCode, isSlotCarrier, ownFoldedCodeBitsOf, protocolErrorNameReading, readErrorRecord, readRefusalField, readThrownSlot } from '../wireFailureShape.js';
|
|
10
|
+
import { PROTOCOL_ERROR_NAME, THROWN_SLOT_UNREADABLE, isDisplayableWireCode, isSlotCarrier, ownFoldedCodeBitsOf, protocolErrorNameReading, readErrorPresent, readErrorRecord, readRefusalField, readThrownSlot } from '../wireFailureShape.js';
|
|
11
11
|
import { attributionRefusalOf, carrierReadOf } from './attributionLadder.js';
|
|
12
12
|
import { CODE_UNREADABLE, ownReadingSlot } from '../engineWireFor.js';
|
|
13
13
|
export const ASK_DECIDED_CODE = 'conflict.ask_decided';
|
|
@@ -223,6 +223,7 @@ export function mintDecisionRefusalReading(err, context, attributionCarried, del
|
|
|
223
223
|
const inRange = standing !== undefined && status !== undefined;
|
|
224
224
|
const conflict = inRange && status === 409 && obj !== undefined ? isolated(() => decisionConflictOf(obj, captured, pn)) : undefined;
|
|
225
225
|
const unrecoverable = inRange && status !== undefined && Number.isInteger(status) && status >= 400 && status <= 599 && isDecideRowUnrevivableCode(errorCode);
|
|
226
|
+
const acceptableForm = errorCode === RESUME_CONSTRAINT_REJECTED && obj !== undefined ? isolated(() => readErrorPresent(obj, 'acceptableForm')) : undefined;
|
|
226
227
|
const transient = inRange &&
|
|
227
228
|
conflict !== 'grant_changed' &&
|
|
228
229
|
!unrecoverable &&
|
|
@@ -244,6 +245,7 @@ export function mintDecisionRefusalReading(err, context, attributionCarried, del
|
|
|
244
245
|
...(transient ? { transient: true } : {}),
|
|
245
246
|
...(conflict !== undefined ? { conflict } : {}),
|
|
246
247
|
...(unrecoverable ? { unrecoverable: true } : {}),
|
|
248
|
+
...(acceptableForm !== undefined ? { acceptableForm } : {}),
|
|
247
249
|
});
|
|
248
250
|
}
|
|
249
251
|
export function readDecisionRefusalReading(err, context) {
|
|
@@ -12,6 +12,7 @@ export type EditedRuleTextPrecheck = {
|
|
|
12
12
|
message: string;
|
|
13
13
|
};
|
|
14
14
|
export type EditedRuleTextPrechecker = (text: string, command: string) => EditedRuleTextPrecheck;
|
|
15
|
+
export declare function trimEditedRuleText(text: string): string;
|
|
15
16
|
export declare function installEditedRuleTextPrechecker(fn: EditedRuleTextPrechecker | null): () => void;
|
|
16
17
|
export declare function hasEditedRuleTextPrechecker(): boolean;
|
|
17
18
|
export declare function precheckEditedRuleText(text: string, command: string): EditedRuleTextPrecheck | undefined;
|
|
@@ -1,4 +1,29 @@
|
|
|
1
1
|
let installed = null;
|
|
2
|
+
function escapedAt(s, i) {
|
|
3
|
+
let n = 0;
|
|
4
|
+
for (let j = i - 1; j >= 0 && s[j] === '\\'; j -= 1)
|
|
5
|
+
n += 1;
|
|
6
|
+
return n % 2 === 1;
|
|
7
|
+
}
|
|
8
|
+
export function trimEditedRuleText(text) {
|
|
9
|
+
if (typeof text !== 'string')
|
|
10
|
+
return text;
|
|
11
|
+
const outer = text.trim();
|
|
12
|
+
let open = -1;
|
|
13
|
+
for (let i = 0; i < outer.length; i += 1) {
|
|
14
|
+
if (outer[i] === '(' && !escapedAt(outer, i)) {
|
|
15
|
+
open = i;
|
|
16
|
+
break;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
if (open <= 0)
|
|
20
|
+
return outer;
|
|
21
|
+
const head = outer.slice(0, open);
|
|
22
|
+
const name = head.trimEnd();
|
|
23
|
+
if (name === head || name.length === 0 || name.endsWith('\\'))
|
|
24
|
+
return outer;
|
|
25
|
+
return name + outer.slice(open);
|
|
26
|
+
}
|
|
2
27
|
export function installEditedRuleTextPrechecker(fn) {
|
|
3
28
|
const prev = installed;
|
|
4
29
|
installed = fn;
|
|
@@ -13,7 +38,7 @@ export function precheckEditedRuleText(text, command) {
|
|
|
13
38
|
const fn = installed;
|
|
14
39
|
if (fn === null)
|
|
15
40
|
return undefined;
|
|
16
|
-
return fn(text, command);
|
|
41
|
+
return fn(trimEditedRuleText(text), command);
|
|
17
42
|
}
|
|
18
43
|
export function _resetEditedRuleTextPrecheckerForTest() {
|
|
19
44
|
installed = null;
|
|
@@ -208,6 +208,7 @@ const PERSISTED_RULE_MATCH_KEYS = Object.freeze({
|
|
|
208
208
|
host: 'rules.match.host',
|
|
209
209
|
subdomain: 'rules.match.subdomain',
|
|
210
210
|
pattern: 'rules.match.pattern',
|
|
211
|
+
tool: 'rules.match.tool',
|
|
211
212
|
});
|
|
212
213
|
export function persistedRuleMatchLabel(ruleOrMatch, lang) {
|
|
213
214
|
const word = typeof ruleOrMatch === 'string' ? ruleOrMatch : ownSlot(ruleOrMatch, 'match');
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type QuestionAnswer } from '../liveQuestionStore.js';
|
|
2
|
+
import type { EngineWireInjection } from '../engineWireSdk.js';
|
|
2
3
|
import { type PlanReviewModeAfter } from './hitlBridge.js';
|
|
3
4
|
import type { AgentClient } from '@sema-agent/sdk';
|
|
4
5
|
import type { ReopenCardVerdict } from '../adapter/activeRunSelfHeal.js';
|
|
@@ -66,7 +67,7 @@ export type PlanReviewWireClient = {
|
|
|
66
67
|
assistant: Pick<AgentClient['assistant'], 'planReview'>;
|
|
67
68
|
runs: Pick<AgentClient['runs'], 'get'>;
|
|
68
69
|
};
|
|
69
|
-
export interface PlanReviewWire {
|
|
70
|
+
export interface PlanReviewWire extends EngineWireInjection<PlanReviewWireClient> {
|
|
70
71
|
client: PlanReviewWireClient;
|
|
71
72
|
}
|
|
72
73
|
export interface PlanReviewDecisionOutcome extends PlanReviewOutcomeMeta {
|
|
@@ -2,6 +2,7 @@ import { publishQuestionFrame, publishQuestionFrameFor, registerLocalQuestionRes
|
|
|
2
2
|
import { hostLog } from '../host.js';
|
|
3
3
|
import { abortableSleep, settleWithinDeadline } from '../abortableSleep.js';
|
|
4
4
|
import { clientHasVerbs, engineWireFor, noAnswerKindOf, sendOnce } from '../engineWireFor.js';
|
|
5
|
+
import { engineCapTrue } from '../engineCapsCache.js';
|
|
5
6
|
import { engineWireTarget } from '../engineWireTarget.js';
|
|
6
7
|
import { enqueuePlanReviewOutcome } from '../notifications.js';
|
|
7
8
|
import { corruptStoredRowContent, corruptStoredRowWhere } from '../wireErrorTriage.js';
|
|
@@ -370,7 +371,7 @@ export function armPlanReviewApproval(result, sessionKey, opts) {
|
|
|
370
371
|
}
|
|
371
372
|
const wire = opts?.wire;
|
|
372
373
|
if (wire !== undefined) {
|
|
373
|
-
if (
|
|
374
|
+
if (engineWireFor(wire, DEFAULT_SESSION_KEY, usablePlanReviewWireClient).kind !== 'injected') {
|
|
374
375
|
hostLog('error', 'planReviewWire: plan_review card NOT armed — the engine client supplied by the host is not usable (needs assistant.planReview and runs.get)');
|
|
375
376
|
return false;
|
|
376
377
|
}
|
|
@@ -454,15 +455,6 @@ export function planReviewOutcomeTail(taskId, decision, effect, cause) {
|
|
|
454
455
|
return `Do not state the result as fact: tell the user the ${decision} was submitted but its effect could not be confirmed; TaskOutput("${taskId}") shows where the task stands.`;
|
|
455
456
|
}
|
|
456
457
|
}
|
|
457
|
-
function clientOnlyView(wire) {
|
|
458
|
-
if (wire === undefined || wire === null || typeof wire !== 'object')
|
|
459
|
-
return wire;
|
|
460
|
-
return {
|
|
461
|
-
get client() {
|
|
462
|
-
return wire.client;
|
|
463
|
-
},
|
|
464
|
-
};
|
|
465
|
-
}
|
|
466
458
|
function planReviewDecisionTimedOutOutcome(decision) {
|
|
467
459
|
return (`The plan_review ${decision} was sent, but no answer came back from the engine within the time limit this host allows for it — ` +
|
|
468
460
|
`it may have taken effect (${decision === 'approve' ? 'an approval keeps the engine busy until the resumed work finishes' : 'the engine may still be applying it'}).`);
|
|
@@ -654,7 +646,7 @@ async function decidePlanReviewInner(taskId, decision, permissionModeAfter, disp
|
|
|
654
646
|
let stillParkedCause;
|
|
655
647
|
let statusSeen;
|
|
656
648
|
const wire = opts?.wire;
|
|
657
|
-
const resolved = engineWireFor(
|
|
649
|
+
const resolved = engineWireFor(wire, DEFAULT_SESSION_KEY, usablePlanReviewWireClient);
|
|
658
650
|
const badMode = permissionModeAfter !== undefined && !isPlanReviewModeAfter(permissionModeAfter);
|
|
659
651
|
if (badMode) {
|
|
660
652
|
hostLog('error', `planReviewWire: ${decision} NOT sent — permissionModeAfter must be "default" or "acceptEdits"`);
|
|
@@ -683,11 +675,15 @@ async function decidePlanReviewInner(taskId, decision, permissionModeAfter, disp
|
|
|
683
675
|
try {
|
|
684
676
|
const mode = isPlanReviewModeAfter(permissionModeAfter) ? permissionModeAfter : undefined;
|
|
685
677
|
const reason = denyReasonForWire(opts?.reason, `plan-review ${taskId}`);
|
|
678
|
+
const capsBase = resolved.kind === 'target' ? resolved.target.baseUrl : resolved.capsBaseUrl;
|
|
679
|
+
const checkpointId = gateBefore !== undefined && engineCapTrue(capsBase, 'planReviewCheckpointId') ? gateBefore : undefined;
|
|
686
680
|
const reqBody = { decision };
|
|
687
681
|
if (reason !== undefined)
|
|
688
682
|
reqBody.reason = reason;
|
|
689
683
|
if (mode !== undefined)
|
|
690
684
|
reqBody.permissionModeAfter = mode;
|
|
685
|
+
if (checkpointId !== undefined)
|
|
686
|
+
reqBody.checkpointId = checkpointId;
|
|
691
687
|
let body;
|
|
692
688
|
try {
|
|
693
689
|
body = await sendOnce(undefined, () => client.assistant.planReview(taskId, reqBody));
|
|
@@ -697,7 +693,7 @@ async function decidePlanReviewInner(taskId, decision, permissionModeAfter, disp
|
|
|
697
693
|
const defaultConflict = mode === 'default' && conflict?.status === 400 && conflict?.errorCode === REQUEST_FIELD_CONFLICT;
|
|
698
694
|
if (defaultConflict && !directFailureVerdictOf(e1, directSafetyStopOf(e1)).yields) {
|
|
699
695
|
hostLog('debug', 'planReviewWire: permissionModeAfter "default" refused as not applicable — re-sending the approval without the key (same meaning)');
|
|
700
|
-
body = await sendOnce(undefined, () => client.assistant.planReview(taskId, reason !== undefined ? {
|
|
696
|
+
body = await sendOnce(undefined, () => client.assistant.planReview(taskId, { decision, ...(reason !== undefined ? { reason } : {}), ...(checkpointId !== undefined ? { checkpointId } : {}) }));
|
|
701
697
|
}
|
|
702
698
|
else {
|
|
703
699
|
throw e1;
|
|
@@ -22,4 +22,3 @@ export interface SessionPolicyDeliverableOptions {
|
|
|
22
22
|
}
|
|
23
23
|
export declare function sessionPolicyDeliverable(behavior: 'deny' | 'ask', rules: readonly string[], opts?: SessionPolicyDeliverableOptions): SessionPolicyDeliverability;
|
|
24
24
|
export declare function sessionPolicyWithheldNotice(why: SessionPolicyWithheldWhy, lang?: UiLanguage): string;
|
|
25
|
-
export declare function legacyToolNameFailureNoteOf(code: string | undefined): string | undefined;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { CONFIG_LEGACY_TOOL_NAME } from '../engineErrorCodes.js';
|
|
2
1
|
import { rosterMountedNames } from '../rosterMountedNames.js';
|
|
3
2
|
import { msg, renderMessage } from '../i18n/translate.js';
|
|
4
3
|
import { readOwnDataValue } from '../ownKey.js';
|
|
5
4
|
import { denyEntryReading, ruleCompileVerdict } from '../ruleCompileVerdict.js';
|
|
6
5
|
import { ruleToolNameVerdictOf } from '../protocolSegment.js';
|
|
7
6
|
import { PREFIXES_IN_PROSE, REFUSED_NAME_FIX } from './refusedToolNameProse.js';
|
|
8
|
-
import { prepareRefusalNoteOf } from '../prepareRefusal.js';
|
|
9
7
|
import { CORE_PROTOCOL_PREFIXES } from '../generated/toolNameTables.js';
|
|
10
8
|
const COVERING_NAMESPACE_PREFIXES = CORE_PROTOCOL_PREFIXES;
|
|
11
9
|
const WITHHELD_NOTICE = {
|
|
@@ -204,6 +202,3 @@ export function sessionPolicyWithheldNotice(why, lang) {
|
|
|
204
202
|
}
|
|
205
203
|
return 'Not written to this session’s rule record.';
|
|
206
204
|
}
|
|
207
|
-
export function legacyToolNameFailureNoteOf(code) {
|
|
208
|
-
return code === CONFIG_LEGACY_TOOL_NAME ? prepareRefusalNoteOf(code) : undefined;
|
|
209
|
-
}
|
|
@@ -21,7 +21,7 @@ const RULE_FIELD_PRESENCE = {
|
|
|
21
21
|
toolDeny: true,
|
|
22
22
|
allowDirs: true,
|
|
23
23
|
};
|
|
24
|
-
const RECORD_META_KEYS = Object.freeze(['rev', 'gen', 'grammar']);
|
|
24
|
+
const RECORD_META_KEYS = Object.freeze(['rev', 'gen', 'grammar', 'operatorRules']);
|
|
25
25
|
const _metaKeysPin = true;
|
|
26
26
|
void _metaKeysPin;
|
|
27
27
|
export const SESSION_POLICY_RULE_FIELDS = Object.freeze(Object.keys(RULE_FIELD_PRESENCE));
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type HitlClientLike, type DecideOperationObserver } from './hitlBridge.js';
|
|
2
2
|
import { readApprovalCardWord, type ApprovalCardWord } from './approvalCardReading.js';
|
|
3
3
|
import { type ApprovalAllowRuleShadow } from './allowRuleShadow.js';
|
|
4
|
+
import { CORE_PERSISTED_RULE_MATCHES } from '../generated/engineFactTables.js';
|
|
4
5
|
import type { UiLanguage } from '../env/uiLanguage.js';
|
|
5
6
|
import type { SessionRuleInertReason } from './sessionPolicyWire.js';
|
|
6
7
|
import { type ApprovalCardClaim } from './approvalHolds.js';
|
|
@@ -30,22 +31,33 @@ export type { RuleOfferBatchMember };
|
|
|
30
31
|
export type { RuleOfferUncoveredDetail };
|
|
31
32
|
export type { RuleOfferUncoveredReason };
|
|
32
33
|
export { RULE_OFFER_MATCHES, RULE_OFFER_BATCH_MEMBER_KINDS, RULE_OFFER_UNCOVERED_REASONS };
|
|
34
|
+
type RuleOfferMatchWord = (typeof CORE_PERSISTED_RULE_MATCHES)[number];
|
|
35
|
+
type RuleOfferBatchMemberReading = Exclude<RuleOfferBatchMember, {
|
|
36
|
+
kind: 'command';
|
|
37
|
+
}> | (Omit<Extract<RuleOfferBatchMember, {
|
|
38
|
+
kind: 'command';
|
|
39
|
+
}>, 'match'> & {
|
|
40
|
+
match: RuleOfferMatchWord;
|
|
41
|
+
});
|
|
33
42
|
export type { AskOrigin };
|
|
34
43
|
export type { RuleOffersAbsence };
|
|
35
44
|
export type { DenialLimitKind };
|
|
36
45
|
export type { DenialLimitFallback };
|
|
37
46
|
export { RULE_OFFERS_ABSENCE_REASONS };
|
|
38
47
|
export declare const ASK_ORIGIN_WORDS: readonly string[];
|
|
39
|
-
export type RuleOfferReading = (Extract<SdkRuleOffer, {
|
|
48
|
+
export type RuleOfferReading = (Omit<Extract<SdkRuleOffer, {
|
|
40
49
|
kind: 'single';
|
|
41
|
-
}> & {
|
|
50
|
+
}>, 'match'> & {
|
|
51
|
+
match: RuleOfferMatchWord;
|
|
42
52
|
offerIndex: number;
|
|
43
53
|
}) | (Omit<Extract<SdkRuleOffer, {
|
|
44
54
|
kind: 'batch';
|
|
45
|
-
}>, 'uncoveredDetail'> &
|
|
55
|
+
}>, 'uncoveredDetail' | 'rules'> & RuleOfferBatchReadingSeats);
|
|
56
|
+
interface RuleOfferBatchReadingSeats {
|
|
57
|
+
rules: RuleOfferBatchMemberReading[];
|
|
46
58
|
offerIndex: number;
|
|
47
59
|
uncoveredDetail?: readonly RuleOfferUncoveredDetail[];
|
|
48
|
-
}
|
|
60
|
+
}
|
|
49
61
|
export interface ApprovalCardAllowDecision {
|
|
50
62
|
kind: 'allow';
|
|
51
63
|
allowSession: boolean;
|
|
@@ -263,8 +275,8 @@ export declare function approvalSupersedesDetail(card: Pick<ApprovalCardRequest,
|
|
|
263
275
|
export declare function readDenialLimitFallback(v: unknown): DenialLimitFallback | undefined;
|
|
264
276
|
export declare function readRuleOffers(v: unknown): RuleOfferReading[] | undefined;
|
|
265
277
|
export declare function readRuleOfferSupply(offers: unknown): RuleOfferReading[] | undefined;
|
|
266
|
-
export type ApprovalCardV1Facts = Pick<ApprovalCardRequest, 'toolName' | 'args'> & Pick<ApprovalCardRequest, 'toolCallId' | 'workerBadge' | 'wireNote' | 'argsUnavailable' | 'governanceForced' | 'delegation' | 'ruleOffersReadOnly' | 'inputHasBidi' | 'allowRuleShadow' | 'probeCause' | 'rememberRefused' | 'ruleEvidence' | 'requiresRealApproval' | 'ruleOffersAbsence' | 'denialLimitFallback' | 'askClass' | 'classes' | 'grantBinding' | 'unreadableEvidence' | 'message'>;
|
|
267
|
-
export type ApprovalCardFacts = ApprovalCardV1Facts & Pick<ApprovalCardRequest, 'ruleOffers' | 'probeReason' | 'mandated' | 'mandate' | 'readRootCandidate' | 'origin' | '
|
|
278
|
+
export type ApprovalCardV1Facts = Pick<ApprovalCardRequest, 'toolName' | 'args'> & Pick<ApprovalCardRequest, 'toolCallId' | 'workerBadge' | 'wireNote' | 'argsUnavailable' | 'governanceForced' | 'delegation' | 'ruleOffersReadOnly' | 'inputHasBidi' | 'allowRuleShadow' | 'probeCause' | 'rememberRefused' | 'ruleEvidence' | 'requiresRealApproval' | 'ruleOffersAbsence' | 'denialLimitFallback' | 'askClass' | 'classes' | 'grantBinding' | 'unreadableEvidence' | 'message' | 'approvalCard'>;
|
|
279
|
+
export type ApprovalCardFacts = ApprovalCardV1Facts & Pick<ApprovalCardRequest, 'ruleOffers' | 'probeReason' | 'mandated' | 'mandate' | 'readRootCandidate' | 'origin' | 'boundGrants' | 'classifierNoRuling' | 'allowSessionCarried' | 'cardPayloadUnreadable'>;
|
|
268
280
|
export interface ApprovalCardFrameFactsOptions {
|
|
269
281
|
readonly streamArgs?: object;
|
|
270
282
|
readonly argsUnavailable?: true;
|
|
@@ -3,6 +3,7 @@ import { askParkRowArm } from './askParkRowRouting.js';
|
|
|
3
3
|
import { parkGateArmOf } from './frameRouter.js';
|
|
4
4
|
import { seatSessionRowOf } from './standingRows.js';
|
|
5
5
|
import { hostLog } from '../host.js';
|
|
6
|
+
import { trimEditedRuleText } from './editedRuleTextPrecheck.js';
|
|
6
7
|
import { appendOwnElement, guardedRead, readAskOrigin, readOwnDataNonEmptyString, readOwnDataValue, readOwnNonEmptyString } from '../ownKey.js';
|
|
7
8
|
import { ownReadingSlot } from '../engineWireFor.js';
|
|
8
9
|
import { DEPLOYMENT_LIST_ASK_CLASSES, readAskClassPair } from './askClassPair.js';
|
|
@@ -12,7 +13,7 @@ import { readAllowRuleShadowFromWire, retiredAllowRuleShadowKeyPresent, RETIRED_
|
|
|
12
13
|
import { createSessionSlot, DEFAULT_SESSION_KEY } from '../sessionSlot.js';
|
|
13
14
|
import { readEngineActiveBgTasks } from '../fleet/fleetLedger.js';
|
|
14
15
|
import { CORE_SKILL_TOOL_NAME } from '../generated/toolNameTables.js';
|
|
15
|
-
import { CORE_ALLOW_ENTRY_INERT_REASONS } from '../generated/engineFactTables.js';
|
|
16
|
+
import { CORE_ALLOW_ENTRY_INERT_REASONS, CORE_PERSISTED_RULE_MATCHES } from '../generated/engineFactTables.js';
|
|
16
17
|
import { msg, renderMessage } from '../i18n/translate.js';
|
|
17
18
|
import { INTERRUPT_DENY_REASON, observeCancelByDeny, surfaceApprovalParking, surfaceRememberNotApplied, surfaceEditNotForwarded, surfaceEditRefusedOnBlindAsk, surfaceRuleArmNotSent, surfaceRuleArmRejected } from './hitlHostSurface.js';
|
|
18
19
|
import { approvalCallKey, liveFrameCallKey } from './gateIdentity.js';
|
|
@@ -67,6 +68,8 @@ export function structurallyEqual(a, b) {
|
|
|
67
68
|
return ka.every(k => structurallyEqual(a[k], b[k]));
|
|
68
69
|
}
|
|
69
70
|
export { RULE_OFFER_MATCHES, RULE_OFFER_BATCH_MEMBER_KINDS, RULE_OFFER_UNCOVERED_REASONS };
|
|
71
|
+
const _sdkRuleOfferMatchWithinEngine = true;
|
|
72
|
+
void _sdkRuleOfferMatchWithinEngine;
|
|
70
73
|
export { RULE_OFFERS_ABSENCE_REASONS };
|
|
71
74
|
export const ASK_ORIGIN_WORDS = ASK_ORIGINS;
|
|
72
75
|
export const APPROVAL_DENY_SETTLED_BY_WORDS = Object.freeze(['human', 'policy']);
|
|
@@ -1336,7 +1339,7 @@ export function readDenialLimitFallback(v) {
|
|
|
1336
1339
|
};
|
|
1337
1340
|
}
|
|
1338
1341
|
function isRuleOfferMatch(v) {
|
|
1339
|
-
return typeof v === 'string' &&
|
|
1342
|
+
return typeof v === 'string' && CORE_PERSISTED_RULE_MATCHES.includes(v);
|
|
1340
1343
|
}
|
|
1341
1344
|
function readRuleTriple(v) {
|
|
1342
1345
|
if (v === null || typeof v !== 'object')
|
|
@@ -1346,7 +1349,7 @@ function readRuleTriple(v) {
|
|
|
1346
1349
|
return undefined;
|
|
1347
1350
|
if (!isRuleOfferMatch(o.match))
|
|
1348
1351
|
return undefined;
|
|
1349
|
-
if (typeof o.command !== 'string'
|
|
1352
|
+
if (typeof o.command !== 'string')
|
|
1350
1353
|
return undefined;
|
|
1351
1354
|
return { rule: o.rule, match: o.match, command: o.command };
|
|
1352
1355
|
}
|
|
@@ -1624,6 +1627,8 @@ function cardFactsOf(carrier, leg, opts) {
|
|
|
1624
1627
|
if (o !== undefined)
|
|
1625
1628
|
out.origin = o;
|
|
1626
1629
|
});
|
|
1630
|
+
}
|
|
1631
|
+
if (leg !== 'generic') {
|
|
1627
1632
|
v1Bit(() => {
|
|
1628
1633
|
const w = readApprovalCardWord(carrier);
|
|
1629
1634
|
if (w !== undefined)
|
|
@@ -1899,7 +1904,7 @@ async function presentToolApprovalFrameAndRespond(frame, approvalId, respond, st
|
|
|
1899
1904
|
const edited = card.persistRuleEdited === true;
|
|
1900
1905
|
if (edited) {
|
|
1901
1906
|
if (lane?.respondFreeFormRulesCapable === true) {
|
|
1902
|
-
persistRule = card.persistRule;
|
|
1907
|
+
persistRule = trimEditedRuleText(card.persistRule);
|
|
1903
1908
|
persistRuleEdited = true;
|
|
1904
1909
|
}
|
|
1905
1910
|
else {
|
|
@@ -184,6 +184,7 @@ declare const EN: {
|
|
|
184
184
|
'config.mcp.nameEdgeWhitespace': string;
|
|
185
185
|
'config.mcp.nameCollides': string;
|
|
186
186
|
'config.mcp.nameTooLong': string;
|
|
187
|
+
'config.mcp.nameReserved': string;
|
|
187
188
|
'config.mcp.identityHeadersBothSet': string;
|
|
188
189
|
'config.mcp.transportUnreadable': string;
|
|
189
190
|
'config.mcp.transportInvalid': string;
|
|
@@ -584,6 +585,8 @@ declare const EN: {
|
|
|
584
585
|
'notice.wayOut.switchModel': string;
|
|
585
586
|
'notice.wayOut.wait': string;
|
|
586
587
|
'notice.wayOut.fixRequest': string;
|
|
588
|
+
'notice.askUnresolvable.remedy.approver': string;
|
|
589
|
+
'notice.askUnresolvable.remedy.permissionMode': string;
|
|
587
590
|
'rules.refusal.sentence.one': string;
|
|
588
591
|
'rules.refusal.sentence.other': string;
|
|
589
592
|
'rules.refusal.item': string;
|
|
@@ -780,6 +783,7 @@ declare const EN: {
|
|
|
780
783
|
'rules.match.host': string;
|
|
781
784
|
'rules.match.subdomain': string;
|
|
782
785
|
'rules.match.pattern': string;
|
|
786
|
+
'rules.match.tool': string;
|
|
783
787
|
'rules.match.unreported': string;
|
|
784
788
|
'rules.match.unknown': string;
|
|
785
789
|
'model.tier.blurb.ultra': string;
|
|
@@ -1010,6 +1014,45 @@ declare const EN: {
|
|
|
1010
1014
|
'config.hooks.plan.reason.compactionLocalFallback': string;
|
|
1011
1015
|
'session.hooks.compactTransition.disclosure.engineOutcomeUnknown': string;
|
|
1012
1016
|
'session.hooks.compactTransition.disclosure.neitherRan': string;
|
|
1017
|
+
'session.background.handedOff': string;
|
|
1018
|
+
'session.background.refusal.noRun': string;
|
|
1019
|
+
'session.background.refusal.streamEnded': string;
|
|
1020
|
+
'session.background.refusal.notStarted': string;
|
|
1021
|
+
'session.background.refusal.alreadyHandedOff': string;
|
|
1022
|
+
'session.background.refusal.finished': string;
|
|
1023
|
+
'session.background.refusal.stopping': string;
|
|
1024
|
+
'session.background.refusal.engineReplaced': string;
|
|
1025
|
+
'session.background.refusal.declined': string;
|
|
1026
|
+
'session.background.refusal.envOff': string;
|
|
1027
|
+
'session.background.refusal.notReattachable': string;
|
|
1028
|
+
'session.background.refusal.unconfirmed': string;
|
|
1029
|
+
'session.background.refusal.durableOff': string;
|
|
1030
|
+
'session.background.refusal.awaitingUser': string;
|
|
1031
|
+
'session.background.unknown': string;
|
|
1032
|
+
'session.background.hostNotNotified': string;
|
|
1033
|
+
'session.background.settled.completed': string;
|
|
1034
|
+
'session.background.settled.failed': string;
|
|
1035
|
+
'session.background.settled.cancelled': string;
|
|
1036
|
+
'session.background.settled.parked': string;
|
|
1037
|
+
'session.background.settled.observationStopped': string;
|
|
1038
|
+
'session.background.busy': string;
|
|
1039
|
+
'session.thinking.state.on': string;
|
|
1040
|
+
'session.thinking.state.off': string;
|
|
1041
|
+
'session.thinking.state.unset': string;
|
|
1042
|
+
'session.thinking.offWithUltracodeOnBody': string;
|
|
1043
|
+
'session.thinking.modelCannotThink': string;
|
|
1044
|
+
'session.thinking.storeUnreadable': string;
|
|
1045
|
+
'session.thinking.notSaved': string;
|
|
1046
|
+
'config.mods.card.mounted': string;
|
|
1047
|
+
'config.mods.card.refused': string;
|
|
1048
|
+
'config.mods.card.none': string;
|
|
1049
|
+
'config.mods.card.counts': string;
|
|
1050
|
+
'config.mods.card.countsWithRefused': string;
|
|
1051
|
+
'config.mods.loader.failed': string;
|
|
1052
|
+
'config.mods.loader.failedNoReason': string;
|
|
1053
|
+
'config.mods.refusal.by': string;
|
|
1054
|
+
'config.mods.rewrite.resultInPlace': string;
|
|
1055
|
+
'config.mods.rewrite.inputBy': string;
|
|
1013
1056
|
};
|
|
1014
1057
|
export declare const EN_MESSAGES: Readonly<typeof EN>;
|
|
1015
1058
|
export type MessageKey = keyof typeof EN;
|
package/dist/i18n/messages.en.js
CHANGED
|
@@ -184,6 +184,7 @@ const EN = {
|
|
|
184
184
|
'config.mcp.nameEdgeWhitespace': 'MCP server name {name}{where} cannot be used as written, so the server was not started: it would not match the same name in other settings (for example a list of disabled servers). Remove the extra whitespace from the name.',
|
|
185
185
|
'config.mcp.nameCollides': 'MCP server name {name}{where} cannot be used as written, so the server was not started: without its leading or trailing whitespace it would be the same name as another MCP server entry. Remove the extra whitespace from the name, or delete the duplicate entry.',
|
|
186
186
|
'config.mcp.nameTooLong': 'MCP server name {name}{where} cannot be used, so the server was not started: server names are limited to 128 characters. Shorten the name.',
|
|
187
|
+
'config.mcp.nameReserved': 'MCP server name {name}{where} cannot be used, so the server was not started: names starting with "remote-" are kept for the MCP servers a connected device offers. Rename the server.',
|
|
187
188
|
'config.mcp.identityHeadersBothSet': 'MCP server {name}{where} was not started: it sets both principalHeader and assertionHeader, which name the same identity header — keep only one of the two. The other MCP servers are unaffected.',
|
|
188
189
|
'config.mcp.transportUnreadable': 'could not be read (a getter or proxy trap on the declaration threw)',
|
|
189
190
|
'config.mcp.transportInvalid': 'MCP server {name}{where} was not started: its transport setting cannot be used — {path} {problem}. Fix that setting for this server (or remove the server); the other MCP servers are unaffected.',
|
|
@@ -302,7 +303,7 @@ const EN = {
|
|
|
302
303
|
'session.inheritEnv.withheld.scrub': "Not sent with this request: the engine's version is not known yet, so the default-environment setting was left out; that has the same effect, because leaving it out also gives this run the default environment (credential-like variables removed).",
|
|
303
304
|
'session.inheritEnv.withheld.unknown': 'Not sent with this request: the shell-environment setting was held back for a reason this version does not recognize.',
|
|
304
305
|
'session.inheritEnv.refusal': "The engine refused this request as invalid, under a refusal code that many different request fields share · This request asked for the shell to inherit this machine's whole environment, which the engine accepts only when tools run directly on its own machine and the request belongs to a session; if that is what it refused, send it again without that setting (or with the default)",
|
|
305
|
-
'session.inheritEnv.refusalNamed': "The engine refused
|
|
306
|
+
'session.inheritEnv.refusalNamed': "The engine refused this request's shell-environment setting: it accepts only the default or this machine's whole environment, and the whole environment only when tools run directly on its own machine and the request belongs to a session · Send the request again without that setting (or with the default)",
|
|
306
307
|
'session.projectMemory.withheld.absent': 'Not sent with this request: this engine does not declare support for the setting that stops project instruction files from being read, and an engine that does not know it refuses the whole request, so it was held back; those files are still sent to the model.',
|
|
307
308
|
'session.projectMemory.withheld.declined': 'Not sent with this request: this engine declares that it does not support the setting that stops project instruction files from being read, so it was held back; those files are still sent to the model.',
|
|
308
309
|
'session.projectMemory.withheld.unreadable': "Not sent with this request: the engine's capabilities could not be read, so it is not known whether it supports the setting that stops project instruction files from being read, and an engine that does not know it refuses the whole request, so it was held back; those files are still sent to the model.",
|
|
@@ -584,6 +585,8 @@ const EN = {
|
|
|
584
585
|
'notice.wayOut.switchModel': 'The model service cannot serve this request right now — try another model',
|
|
585
586
|
'notice.wayOut.wait': 'The model service is still working on this request — wait a moment, then try again',
|
|
586
587
|
'notice.wayOut.fixRequest': 'The model service refused this request — change the request before sending it again; sending it as it is will not help',
|
|
588
|
+
'notice.askUnresolvable.remedy.approver': 'Way out: connect an approver who can answer requests like this one, or make the connected approver reachable, then try again',
|
|
589
|
+
'notice.askUnresolvable.remedy.permissionMode': 'Another way out, if this deployment allows it: the {mode} permission mode lets requests like this one through without anyone answering them, and each request let through this way is marked on the tool call it applied to',
|
|
587
590
|
'rules.refusal.sentence.one': 'permissions: 1 rule will not be enforced — {list}',
|
|
588
591
|
'rules.refusal.sentence.other': 'permissions: {count} rules will not be enforced — {list}',
|
|
589
592
|
'rules.refusal.item': '{rule} ({reason})',
|
|
@@ -780,6 +783,7 @@ const EN = {
|
|
|
780
783
|
'rules.match.host': 'web domain match (one host)',
|
|
781
784
|
'rules.match.subdomain': 'web domain match (every host under the domain)',
|
|
782
785
|
'rules.match.pattern': 'command pattern match (a star placed anywhere in the command)',
|
|
786
|
+
'rules.match.tool': 'whole-tool match (every call to the tool)',
|
|
783
787
|
'rules.match.unreported': 'an unreported match form',
|
|
784
788
|
'rules.match.unknown': 'a match form this build does not know',
|
|
785
789
|
'model.tier.blurb.ultra': 'reserved above max — binds when a stronger model lands',
|
|
@@ -1010,5 +1014,44 @@ const EN = {
|
|
|
1010
1014
|
'config.hooks.plan.reason.compactionLocalFallback': 'this compaction is summarized on this client because the engine session is unavailable, so the engine will not run it and this client runs it itself',
|
|
1011
1015
|
'session.hooks.compactTransition.disclosure.engineOutcomeUnknown': 'The compaction request had already been sent to the engine when the summary fell back to this client, so whether the engine ran the compaction hooks cannot be told here, and this client did not run them again.',
|
|
1012
1016
|
'session.hooks.compactTransition.disclosure.neitherRan': 'The compaction hooks did not run this time: the engine did not compact here and this client could not start its own summary. If the engine still compacts later it will run them then.',
|
|
1017
|
+
'session.background.handedOff': "Moved to the background. You'll be told when it finishes.",
|
|
1018
|
+
'session.background.refusal.noRun': "There's no answer running from this screen that can be moved to the background.",
|
|
1019
|
+
'session.background.refusal.streamEnded': "This answer is no longer on its original live connection, so it can't be moved to the background from here.",
|
|
1020
|
+
'session.background.refusal.notStarted': "The engine hasn't started streaming this answer yet. Try again in a moment.",
|
|
1021
|
+
'session.background.refusal.alreadyHandedOff': 'This answer is already in the background.',
|
|
1022
|
+
'session.background.refusal.finished': 'This answer has already finished.',
|
|
1023
|
+
'session.background.refusal.stopping': "This answer is being stopped, so it can't move to the background.",
|
|
1024
|
+
'session.background.refusal.engineReplaced': "The engine running this answer has stopped or been replaced; it can't be moved.",
|
|
1025
|
+
'session.background.refusal.declined': "This answer can't move to the background: this engine doesn't keep answers running after you leave. It will finish here.",
|
|
1026
|
+
'session.background.refusal.envOff': 'Background hand-off is turned off (SEMA_HEADLESS_DETACH). This answer will finish here.',
|
|
1027
|
+
'session.background.refusal.notReattachable': "This answer can't move to the background: this window can't reconnect to an answer running elsewhere.",
|
|
1028
|
+
'session.background.refusal.unconfirmed': "This answer can't move to the background: the engine hasn't confirmed it can keep answers running on its own.",
|
|
1029
|
+
'session.background.refusal.durableOff': "This answer can't move to the background: the engine said it can't keep this answer running after you leave.",
|
|
1030
|
+
'session.background.refusal.awaitingUser': "Answer the open question first — an answer that is waiting for you can't move to the background.",
|
|
1031
|
+
'session.background.unknown': "Couldn't confirm this answer can safely move to the background, so it stays here.",
|
|
1032
|
+
'session.background.hostNotNotified': "Moved to the background, but this screen didn't update cleanly.",
|
|
1033
|
+
'session.background.settled.completed': 'The background answer finished.',
|
|
1034
|
+
'session.background.settled.failed': 'The background answer stopped with an error ({code}).',
|
|
1035
|
+
'session.background.settled.cancelled': 'The background answer was cancelled.',
|
|
1036
|
+
'session.background.settled.parked': 'The background answer is waiting for approval; open it to continue.',
|
|
1037
|
+
'session.background.settled.observationStopped': 'Lost track of the background answer. It may still be running — check the task list.',
|
|
1038
|
+
'session.background.busy': "This conversation's answer is still running in the background. Wait for it to finish, or start a new conversation.",
|
|
1039
|
+
'session.thinking.state.on': 'Thinking on',
|
|
1040
|
+
'session.thinking.state.off': 'Thinking off',
|
|
1041
|
+
'session.thinking.state.unset': 'Thinking not set: the effort setting decides, or the engine default when there is none',
|
|
1042
|
+
'session.thinking.offWithUltracodeOnBody': 'This message carries both Ultracode and thinking off; the engine decides which one applies.',
|
|
1043
|
+
'session.thinking.modelCannotThink': 'Thinking is on, but the model {model} does not use extended thinking, so this setting has no effect on it.',
|
|
1044
|
+
'session.thinking.storeUnreadable': 'The thinking setting could not be read, so it is treated as not set: no thinking override is applied and the effort setting decides.',
|
|
1045
|
+
'session.thinking.notSaved': 'The thinking setting was not saved, so it may not have changed.',
|
|
1046
|
+
'config.mods.card.mounted': '{name} is loaded',
|
|
1047
|
+
'config.mods.card.refused': '{name} was not loaded: {refusedBy} refused it — {reason}',
|
|
1048
|
+
'config.mods.card.none': 'No mods registered on this leg',
|
|
1049
|
+
'config.mods.card.counts': '{n} mounted',
|
|
1050
|
+
'config.mods.card.countsWithRefused': '{n} mounted, {m} refused',
|
|
1051
|
+
'config.mods.loader.failed': '{name} could not be loaded: {reason}',
|
|
1052
|
+
'config.mods.loader.failedNoReason': '{name} could not be loaded',
|
|
1053
|
+
'config.mods.refusal.by': 'Refused by {by}',
|
|
1054
|
+
'config.mods.rewrite.resultInPlace': 'Answered by {by} in place of the tool',
|
|
1055
|
+
'config.mods.rewrite.inputBy': 'Arguments changed by {by} before the call was let through',
|
|
1013
1056
|
};
|
|
1014
1057
|
export const EN_MESSAGES = Object.freeze(EN);
|