@sema-agent/client-core 0.106.0 → 0.108.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 +199 -0
- package/README.md +35 -26
- package/dist/adapter/activeRunSelfHeal.d.ts +10 -0
- package/dist/adapter/activeRunSelfHeal.js +68 -23
- package/dist/checkpointRowVerdict.d.ts +11 -0
- package/dist/checkpointRowVerdict.js +35 -0
- package/dist/cloudConfigWireCaps.d.ts +10 -0
- package/dist/cloudConfigWireCaps.js +33 -0
- package/dist/coreValuePorts.d.ts +17 -1
- package/dist/coreValuePorts.js +5 -0
- package/dist/decideReceipt.js +2 -1
- package/dist/displayUntrusted.d.ts +5 -3
- package/dist/displayUntrusted.js +50 -41
- package/dist/engineErrorCodes.d.ts +5 -0
- package/dist/engineErrorCodes.js +5 -0
- package/dist/engineNoticeCodes.d.ts +31 -1
- package/dist/engineNoticeCodes.js +182 -9
- package/dist/engineTargetSeat.js +1 -0
- package/dist/errorSupplementRoles.js +4 -1
- package/dist/eventLeg.js +1 -1
- package/dist/executionLaneCapability.js +3 -2
- package/dist/executionLaneWords.d.ts +1 -0
- package/dist/executionLaneWords.js +4 -0
- package/dist/gateOutcome.d.ts +10 -1
- package/dist/gateOutcome.js +48 -1
- package/dist/generated/engineFactTables.d.ts +1 -0
- package/dist/generated/engineFactTables.js +5 -0
- package/dist/generated/engineNoticeTables.js +12 -3
- package/dist/generated/settingsSchemaFns.d.ts +4 -2
- package/dist/generated/settingsSchemaFns.js +9 -3
- package/dist/generated/settingsSchemaMcpRequestEntry.d.ts +1 -1
- package/dist/generated/settingsSchemaMcpRequestEntry.js +9 -18
- package/dist/generated/settingsSchemaReservedMemberName.d.ts +1 -0
- package/dist/generated/settingsSchemaReservedMemberName.js +7 -0
- package/dist/generated/settingsSchemaTables.d.ts +2 -0
- package/dist/generated/settingsSchemaTables.js +10 -0
- package/dist/generated/settingsSchemaWireName.d.ts +1 -0
- package/dist/generated/settingsSchemaWireName.js +8 -0
- package/dist/headlessReconnectWire.js +12 -7
- package/dist/hitl/approvalAskers.d.ts +13 -0
- package/dist/hitl/approvalAskers.js +79 -0
- package/dist/hitl/approvalResolution.d.ts +8 -1
- package/dist/hitl/approvalResolution.js +37 -2
- package/dist/hitl/approvalsFeed.js +5 -13
- package/dist/hitl/askParkRowRouting.js +17 -1
- package/dist/hitl/decisionRefusal.d.ts +1 -0
- package/dist/hitl/decisionRefusal.js +5 -2
- package/dist/hitl/decisionSend.d.ts +2 -0
- package/dist/hitl/decisionSend.js +22 -12
- package/dist/hitl/frameRouter.d.ts +3 -2
- package/dist/hitl/frameRouter.js +28 -6
- package/dist/hitl/gateLedger.d.ts +2 -0
- package/dist/hitl/gateLedger.js +3 -1
- package/dist/hitl/hitlBridge.d.ts +5 -1
- package/dist/hitl/hitlBridge.js +26 -2
- package/dist/hitl/livePendingAsk.js +4 -2
- package/dist/hitl/parkOwnership.js +4 -5
- package/dist/hitl/parkResolver.js +34 -21
- package/dist/hitl/parkRowBirthWait.d.ts +9 -0
- package/dist/hitl/parkRowBirthWait.js +8 -1
- package/dist/hitl/parkRowDelegation.d.ts +6 -0
- package/dist/hitl/parkRowDelegation.js +33 -0
- package/dist/hitl/persistedRulesWire.d.ts +19 -3
- package/dist/hitl/persistedRulesWire.js +118 -20
- package/dist/hitl/planReviewWire.js +16 -18
- package/dist/hitl/policyDenyCause.d.ts +3 -0
- package/dist/hitl/policyDenyCause.js +16 -0
- package/dist/hitl/sessionAllowRoute.d.ts +5 -0
- package/dist/hitl/sessionAllowRoute.js +42 -0
- package/dist/hitl/sessionPolicyDeliverable.js +1 -1
- package/dist/hitl/standingRows.js +10 -10
- package/dist/hitl/toolApprovalWire.d.ts +8 -2
- package/dist/hitl/toolApprovalWire.js +44 -11
- package/dist/hooksReaderGenerations.d.ts +1 -0
- package/dist/hooksReaderGenerations.js +12 -0
- package/dist/hooksWireCaps.js +8 -4
- package/dist/i18n/messages.en.d.ts +43 -0
- package/dist/i18n/messages.en.js +47 -4
- package/dist/i18n/messages.zh.js +53 -4
- package/dist/index.d.ts +7 -1
- package/dist/index.js +5 -1
- package/dist/injectionLaneNotice.js +2 -1
- package/dist/liveModelCatalog.d.ts +4 -2
- package/dist/liveModelCatalog.js +164 -26
- package/dist/model/catalogDefault.d.ts +25 -0
- package/dist/model/catalogDefault.js +44 -0
- package/dist/noticePresentation.js +2 -0
- package/dist/permissionWireCaps.d.ts +1 -0
- package/dist/permissionWireCaps.js +11 -0
- package/dist/pluginHooksWire.d.ts +5 -3
- package/dist/pluginHooksWire.js +116 -7
- package/dist/queuedDelivery.d.ts +1 -0
- package/dist/queuedDelivery.js +12 -0
- package/dist/resultFrameKeys.js +4 -2
- package/dist/resumeRefusalCopy.js +15 -8
- package/dist/runPermissionModeSwitch.d.ts +2 -1
- package/dist/runPermissionModeSwitch.js +16 -6
- package/dist/sdkWireTransit.d.ts +1 -1
- package/dist/seatContract.d.ts +64 -10
- package/dist/seatContract.js +167 -12
- package/dist/sessionEngine.d.ts +2 -1
- package/dist/sessionEngine.js +5 -0
- package/dist/settingsHooksSalvage.d.ts +5 -0
- package/dist/settingsHooksSalvage.js +54 -0
- package/dist/subagentContentStore.js +1 -1
- package/dist/supportFloor.js +2 -0
- package/dist/taskNotificationAdmission.d.ts +19 -0
- package/dist/taskNotificationAdmission.js +84 -0
- package/dist/toolResult.js +2 -1
- package/dist/webSearchWireCaps.js +9 -4
- package/dist/wireRefusalCopy.d.ts +7 -1
- package/dist/wireRefusalCopy.js +7 -1
- package/docs/INTEGRATION-CLIENTS.md +1189 -18
- package/package.json +5 -5
|
@@ -3,20 +3,22 @@ import { displayUntrusted } from './displayUntrusted.js';
|
|
|
3
3
|
import { CORE_ENGINE_NOTICE_CODES, CORE_MCP_INJECTION_DROP_REASONS, CORE_NOTICE_AUDIENCE, CORE_USER_INPUT_UNDRAINED_FAMILIES, } from './generated/engineNoticeTables.js';
|
|
4
4
|
import { CORE_APPROVAL_REMEDY_KINDS, CORE_ASK_UNRESOLVABLE_CAUSES, CORE_DURABLE_MANDATE_SOURCES, CORE_PERMISSION_MODE_FOLD_REASONS, } from './generated/engineFactTables.js';
|
|
5
5
|
import { msg, renderMessage } from './i18n/translate.js';
|
|
6
|
-
import { readOwnDataValue } from './ownKey.js';
|
|
6
|
+
import { ownDataField, readOwnDataValue } from './ownKey.js';
|
|
7
|
+
import { slotReadOf } from './wireFailureShape.js';
|
|
7
8
|
export const ENGINE_NOTICE_CODES = CORE_ENGINE_NOTICE_CODES;
|
|
8
9
|
const CATALOG = new Set(ENGINE_NOTICE_CODES);
|
|
9
10
|
function audienceRow(table, code) {
|
|
10
11
|
return Object.hasOwn(table, code) ? table[code] : undefined;
|
|
11
12
|
}
|
|
13
|
+
const LEGACY_NOTICE_AUDIENCE = Object.freeze({ 'context.image_removed': 'user', 'session.records_skipped': 'user' });
|
|
12
14
|
export function engineNoticeInCatalog(code) {
|
|
13
|
-
return typeof code === 'string' && CATALOG.has(code);
|
|
15
|
+
return typeof code === 'string' && (CATALOG.has(code) || Object.hasOwn(LEGACY_NOTICE_AUDIENCE, code));
|
|
14
16
|
}
|
|
15
17
|
export const ENGINE_NOTICE_AUDIENCE = CORE_NOTICE_AUDIENCE;
|
|
16
18
|
export function noticeAudienceOf(code) {
|
|
17
19
|
if (typeof code !== 'string')
|
|
18
20
|
return 'operator';
|
|
19
|
-
return audienceRow(ENGINE_NOTICE_AUDIENCE, code) ?? 'operator';
|
|
21
|
+
return audienceRow(ENGINE_NOTICE_AUDIENCE, code) ?? audienceRow(LEGACY_NOTICE_AUDIENCE, code) ?? 'operator';
|
|
20
22
|
}
|
|
21
23
|
export const MCP_INJECTION_DROP_REASONS = CORE_MCP_INJECTION_DROP_REASONS;
|
|
22
24
|
const DROP_REASONS = new Set(MCP_INJECTION_DROP_REASONS);
|
|
@@ -42,6 +44,46 @@ export function readMcpInjectionDrop(notice) {
|
|
|
42
44
|
const field = typeof fieldIn === 'string' && fieldIn.length > 0 ? fieldIn : undefined;
|
|
43
45
|
return { sessionId, server, reason, ...(field !== undefined ? { field } : {}) };
|
|
44
46
|
}
|
|
47
|
+
const LEG_SELF = Object.freeze({ kind: 'self' });
|
|
48
|
+
const LEG_UNREADABLE = Object.freeze({ kind: 'unreadable' });
|
|
49
|
+
function readNoticeLeg(detail) {
|
|
50
|
+
try {
|
|
51
|
+
const source = slotReadOf(detail, 'sourceSessionId');
|
|
52
|
+
const agent = slotReadOf(detail, 'agentId');
|
|
53
|
+
if (source.presence === 'absent')
|
|
54
|
+
return agent.presence === 'absent' ? LEG_SELF : LEG_UNREADABLE;
|
|
55
|
+
if (source.presence !== 'present' || typeof source.value !== 'string' || source.value.length === 0)
|
|
56
|
+
return LEG_UNREADABLE;
|
|
57
|
+
const agentId = agent.presence === 'present' && typeof agent.value === 'string' && agent.value.length > 0 ? agent.value : undefined;
|
|
58
|
+
return Object.freeze({ kind: 'delegated', sourceSessionId: source.value, ...(agentId !== undefined ? { agentId } : {}) });
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
return LEG_UNREADABLE;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export function noticeCallSessionOf(facts) {
|
|
65
|
+
const str = (o, key) => {
|
|
66
|
+
const s = slotReadOf(o, key);
|
|
67
|
+
return s.presence === 'present' && typeof s.value === 'string' && s.value.length > 0 ? s.value : undefined;
|
|
68
|
+
};
|
|
69
|
+
try {
|
|
70
|
+
if (typeof facts !== 'object' || facts === null)
|
|
71
|
+
return undefined;
|
|
72
|
+
const legSlot = slotReadOf(facts, 'leg');
|
|
73
|
+
const leg = legSlot.presence === 'present' ? legSlot.value : undefined;
|
|
74
|
+
if (typeof leg !== 'object' || leg === null)
|
|
75
|
+
return undefined;
|
|
76
|
+
const kind = str(leg, 'kind');
|
|
77
|
+
if (kind === 'delegated')
|
|
78
|
+
return str(leg, 'sourceSessionId');
|
|
79
|
+
if (kind !== 'self')
|
|
80
|
+
return undefined;
|
|
81
|
+
return str(facts, 'sessionId');
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
return undefined;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
45
87
|
export const ASK_UNRESOLVABLE_CAUSES = CORE_ASK_UNRESOLVABLE_CAUSES;
|
|
46
88
|
const ASK_UNRESOLVABLE_CAUSE_SET = new Set(ASK_UNRESOLVABLE_CAUSES);
|
|
47
89
|
function optionalSeat(o, key) {
|
|
@@ -110,6 +152,9 @@ export function askUnresolvableRemedyContent(remedy, lang) {
|
|
|
110
152
|
return renderMessage(msg('notice.askUnresolvable.remedy.permissionMode', { mode: displayUntrusted(r.value, { max: 64 }) }), lang);
|
|
111
153
|
}
|
|
112
154
|
export function readAskUnresolvable(notice) {
|
|
155
|
+
return guardedRead(notice, readAskUnresolvableOf);
|
|
156
|
+
}
|
|
157
|
+
function readAskUnresolvableOf(notice) {
|
|
113
158
|
if (typeof notice !== 'object' || notice === null || Array.isArray(notice))
|
|
114
159
|
return undefined;
|
|
115
160
|
const n = notice;
|
|
@@ -130,7 +175,7 @@ export function readAskUnresolvable(notice) {
|
|
|
130
175
|
if (sessionId === undefined || toolName === undefined || toolCallId === undefined || cause === undefined) {
|
|
131
176
|
return undefined;
|
|
132
177
|
}
|
|
133
|
-
const parkIn = o
|
|
178
|
+
const parkIn = optionalSeat(o, 'parkLaneExisted');
|
|
134
179
|
const remedyIn = optionalSeat(o, 'remedy');
|
|
135
180
|
let remedies;
|
|
136
181
|
try {
|
|
@@ -147,6 +192,7 @@ export function readAskUnresolvable(notice) {
|
|
|
147
192
|
...(typeof parkIn === 'boolean' ? { parkLaneExisted: parkIn } : {}),
|
|
148
193
|
...(typeof remedyIn === 'string' && remedyIn.length > 0 ? { remedy: remedyIn } : {}),
|
|
149
194
|
...(remedies !== undefined ? { remedies } : {}),
|
|
195
|
+
leg: readNoticeLeg(o),
|
|
150
196
|
};
|
|
151
197
|
}
|
|
152
198
|
export const DURABLE_MANDATE_SOURCES = CORE_DURABLE_MANDATE_SOURCES;
|
|
@@ -432,6 +478,7 @@ function readClassifierUnavailableOf(notice) {
|
|
|
432
478
|
disposition,
|
|
433
479
|
...(sessionId !== undefined ? { sessionId } : {}),
|
|
434
480
|
...(runId !== undefined ? { runId } : {}),
|
|
481
|
+
leg: readNoticeLeg(o),
|
|
435
482
|
};
|
|
436
483
|
}
|
|
437
484
|
export const PERMISSION_MODE_FOLD_REASONS = CORE_PERMISSION_MODE_FOLD_REASONS;
|
|
@@ -494,6 +541,7 @@ function readAskReleasedByModeOf(notice) {
|
|
|
494
541
|
firstToolCallId,
|
|
495
542
|
...(sessionId !== undefined ? { sessionId } : {}),
|
|
496
543
|
...(runId !== undefined ? { runId } : {}),
|
|
544
|
+
leg: readNoticeLeg(o),
|
|
497
545
|
};
|
|
498
546
|
}
|
|
499
547
|
export function readReadDenyUnapplied(notice) {
|
|
@@ -520,7 +568,7 @@ function readReadDenyUnappliedOf(notice) {
|
|
|
520
568
|
rowCount === undefined || sessionId === undefined || runId === undefined) {
|
|
521
569
|
return undefined;
|
|
522
570
|
}
|
|
523
|
-
return { mode, toolCallId, tiers, rows, rowCount, sessionId, runId };
|
|
571
|
+
return { mode, toolCallId, tiers, rows, rowCount, sessionId, runId, leg: readNoticeLeg(o) };
|
|
524
572
|
}
|
|
525
573
|
export function readToolTurnRepaired(notice) {
|
|
526
574
|
return guardedRead(notice, readToolTurnRepairedOf);
|
|
@@ -536,6 +584,15 @@ function optionalOwnSeat(o, key) {
|
|
|
536
584
|
return undefined;
|
|
537
585
|
}
|
|
538
586
|
}
|
|
587
|
+
const UNREADABLE = Symbol('unreadable');
|
|
588
|
+
function ownSeatOrUnreadable(o, key) {
|
|
589
|
+
try {
|
|
590
|
+
return ownSeat(o, key);
|
|
591
|
+
}
|
|
592
|
+
catch {
|
|
593
|
+
return UNREADABLE;
|
|
594
|
+
}
|
|
595
|
+
}
|
|
539
596
|
function readToolTurnRepairedOf(notice) {
|
|
540
597
|
if (typeof notice !== 'object' || notice === null || Array.isArray(notice))
|
|
541
598
|
return undefined;
|
|
@@ -685,6 +742,9 @@ function optionalNonEmpty(o, key) {
|
|
|
685
742
|
return undefined;
|
|
686
743
|
}
|
|
687
744
|
}
|
|
745
|
+
function undrainedInputKindOf(v) {
|
|
746
|
+
return v === 'steer' || v === 'approval_feedback' ? v : undefined;
|
|
747
|
+
}
|
|
688
748
|
export function readUserInputUndrained(notice) {
|
|
689
749
|
return guardedRead(notice, readUserInputUndrainedOf);
|
|
690
750
|
}
|
|
@@ -716,7 +776,11 @@ function readUserInputUndrainedOf(notice) {
|
|
|
716
776
|
const taskId = nonEmpty(optionalOwnSeat(o, 'taskId'));
|
|
717
777
|
const sessionId = nonEmpty(optionalOwnSeat(o, 'sessionId'));
|
|
718
778
|
const runId = nonEmpty(optionalOwnSeat(o, 'runId'));
|
|
719
|
-
const
|
|
779
|
+
const inputKind = kind === 'steer' ? undrainedInputKindOf(optionalOwnSeat(o, 'kind')) : undefined;
|
|
780
|
+
const childSeat = ownSeatOrUnreadable(o, 'childSessionId');
|
|
781
|
+
const childSessionId = nonEmpty(childSeat);
|
|
782
|
+
const childSeatProven = childSeat === undefined || childSessionId !== undefined;
|
|
783
|
+
const inputIds = childSeatProven ? exactInputIdList(optionalOwnSeat(o, 'inputIds'), count) : undefined;
|
|
720
784
|
return {
|
|
721
785
|
kind,
|
|
722
786
|
count,
|
|
@@ -725,8 +789,97 @@ function readUserInputUndrainedOf(notice) {
|
|
|
725
789
|
...(sessionId !== undefined ? { sessionId } : {}),
|
|
726
790
|
...(runId !== undefined ? { runId } : {}),
|
|
727
791
|
...(childSessionId !== undefined ? { childSessionId } : {}),
|
|
792
|
+
...(inputIds !== undefined ? { inputIds } : {}),
|
|
793
|
+
...(inputKind !== undefined ? { inputKind } : {}),
|
|
728
794
|
};
|
|
729
795
|
}
|
|
796
|
+
function exactInputIdList(v, count) {
|
|
797
|
+
try {
|
|
798
|
+
if (!Array.isArray(v) || ownDataField(v, 'length') !== count)
|
|
799
|
+
return undefined;
|
|
800
|
+
const out = [];
|
|
801
|
+
const seen = new Set();
|
|
802
|
+
for (let i = 0; i < count; i++) {
|
|
803
|
+
const d = Object.getOwnPropertyDescriptor(v, i);
|
|
804
|
+
const id = d !== undefined && Object.hasOwn(d, 'value') ? d.value : undefined;
|
|
805
|
+
if (typeof id !== 'string' || id.length === 0 || seen.has(id))
|
|
806
|
+
return undefined;
|
|
807
|
+
seen.add(id);
|
|
808
|
+
out.push(id);
|
|
809
|
+
}
|
|
810
|
+
return Object.freeze(out);
|
|
811
|
+
}
|
|
812
|
+
catch {
|
|
813
|
+
return undefined;
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
function strictSeat(o, key) {
|
|
817
|
+
try {
|
|
818
|
+
return ownDataField(o, key);
|
|
819
|
+
}
|
|
820
|
+
catch {
|
|
821
|
+
return UNREADABLE;
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
function ledgerIdSet(ledger, key) {
|
|
825
|
+
const list = strictSeat(ledger, key);
|
|
826
|
+
if (list === undefined)
|
|
827
|
+
return new Set();
|
|
828
|
+
try {
|
|
829
|
+
if (!Array.isArray(list))
|
|
830
|
+
return UNREADABLE;
|
|
831
|
+
const out = new Set();
|
|
832
|
+
for (const k of Object.getOwnPropertyNames(list)) {
|
|
833
|
+
if (k === 'length' || String(Number(k) >>> 0) !== k || Number(k) === 4294967295)
|
|
834
|
+
continue;
|
|
835
|
+
const id = strictSeat(list, k);
|
|
836
|
+
if (id === UNREADABLE)
|
|
837
|
+
return UNREADABLE;
|
|
838
|
+
if (typeof id === 'string' && id.length > 0)
|
|
839
|
+
out.add(id);
|
|
840
|
+
}
|
|
841
|
+
return out;
|
|
842
|
+
}
|
|
843
|
+
catch {
|
|
844
|
+
return UNREADABLE;
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
export function undrainedInputsVerdict(facts, ledger) {
|
|
848
|
+
if (facts === null || typeof facts !== 'object')
|
|
849
|
+
return undefined;
|
|
850
|
+
try {
|
|
851
|
+
if (Array.isArray(facts))
|
|
852
|
+
return undefined;
|
|
853
|
+
}
|
|
854
|
+
catch {
|
|
855
|
+
return undefined;
|
|
856
|
+
}
|
|
857
|
+
const count = positiveInt(strictSeat(facts, 'count'));
|
|
858
|
+
if (count === undefined)
|
|
859
|
+
return undefined;
|
|
860
|
+
const nothing = Object.freeze({ redeliver: Object.freeze([]), askUser: Object.freeze([]), unattributed: count });
|
|
861
|
+
if (strictSeat(facts, 'cause') !== 'leg_end' || strictSeat(facts, 'childSessionId') !== undefined)
|
|
862
|
+
return nothing;
|
|
863
|
+
const ids = exactInputIdList(strictSeat(facts, 'inputIds'), count);
|
|
864
|
+
if (ids === undefined)
|
|
865
|
+
return nothing;
|
|
866
|
+
if (ledger !== null && ledger !== undefined && typeof ledger !== 'object')
|
|
867
|
+
return nothing;
|
|
868
|
+
const l = ledger ?? {};
|
|
869
|
+
const handed = ledgerIdSet(l, 'handed');
|
|
870
|
+
const redelivered = ledgerIdSet(l, 'redelivered');
|
|
871
|
+
if (handed === UNREADABLE || redelivered === UNREADABLE)
|
|
872
|
+
return nothing;
|
|
873
|
+
const redeliver = [];
|
|
874
|
+
const askUser = [];
|
|
875
|
+
for (const id of ids) {
|
|
876
|
+
if (redelivered.has(id))
|
|
877
|
+
askUser.push(id);
|
|
878
|
+
else if (handed.has(id))
|
|
879
|
+
redeliver.push(id);
|
|
880
|
+
}
|
|
881
|
+
return Object.freeze({ redeliver: Object.freeze(redeliver), askUser: Object.freeze(askUser), unattributed: count - redeliver.length - askUser.length });
|
|
882
|
+
}
|
|
730
883
|
const messagesPhrase = (n, noun) => `${n} ${noun}${n === 1 ? '' : 's'}`;
|
|
731
884
|
const verbBe = (n) => (n === 1 ? 'was' : 'were');
|
|
732
885
|
const itThem = (n) => (n === 1 ? 'it' : 'them');
|
|
@@ -748,11 +901,12 @@ const subagentFollowUpUndrainedSentence = (n) => `${messagesPhrase(n, 'follow-up
|
|
|
748
901
|
`Send ${itThem(n)} again if you still need ${itThem(n)}.`;
|
|
749
902
|
const unrecognizedUndrainedSentence = (n, kind) => `${kind === 'followUp' ? `${messagesPhrase(n, 'follow-up message')} you queued` : `${messagesPhrase(n, 'message')} you sent during a run`} may not have been used, ` +
|
|
750
903
|
`and the reason was not reported in a form this version recognizes. Check the run's transcript before sending ${itThem(n)} again.`;
|
|
751
|
-
export function userInputUndrainedNotice(facts) {
|
|
904
|
+
export function userInputUndrainedNotice(facts, lang) {
|
|
752
905
|
let kind;
|
|
753
906
|
let count;
|
|
754
907
|
let cause;
|
|
755
908
|
let child;
|
|
909
|
+
let inputKind;
|
|
756
910
|
try {
|
|
757
911
|
if (facts === null || typeof facts !== 'object' || Array.isArray(facts))
|
|
758
912
|
return undefined;
|
|
@@ -770,6 +924,12 @@ export function userInputUndrainedNotice(facts) {
|
|
|
770
924
|
child = undefined;
|
|
771
925
|
}
|
|
772
926
|
const fromSubagent = typeof child === 'string' && child.length > 0;
|
|
927
|
+
try {
|
|
928
|
+
inputKind = Object.hasOwn(facts, 'inputKind') ? facts.inputKind : undefined;
|
|
929
|
+
}
|
|
930
|
+
catch {
|
|
931
|
+
inputKind = undefined;
|
|
932
|
+
}
|
|
773
933
|
const n = positiveInt(count);
|
|
774
934
|
if (n === undefined || !isUndrainedLane(kind))
|
|
775
935
|
return undefined;
|
|
@@ -778,6 +938,9 @@ export function userInputUndrainedNotice(facts) {
|
|
|
778
938
|
return fromSubagent ? subagentFollowUpUndrainedSentence(n) : followUpUndrainedSentence(n);
|
|
779
939
|
return unrecognizedUndrainedSentence(n, kind);
|
|
780
940
|
}
|
|
941
|
+
if (cause === 'leg_end' && inputKind === 'approval_feedback') {
|
|
942
|
+
return renderMessage(msg(n === 1 ? 'notice.userInputUndrained.approvalFeedback.one' : 'notice.userInputUndrained.approvalFeedback.other', { count: n }), lang);
|
|
943
|
+
}
|
|
781
944
|
if (cause === 'leg_end' && fromSubagent)
|
|
782
945
|
return subagentSteerUndrainedSentence(n);
|
|
783
946
|
if (typeof cause === 'string' && Object.hasOwn(STEER_UNDRAINED_SENTENCE, cause)) {
|
|
@@ -904,18 +1067,27 @@ function readContextMediaRemovedOf(notice) {
|
|
|
904
1067
|
if (typeof notice !== 'object' || notice === null || Array.isArray(notice))
|
|
905
1068
|
return undefined;
|
|
906
1069
|
const n = notice;
|
|
907
|
-
|
|
1070
|
+
const code = ownSeat(n, 'code');
|
|
1071
|
+
if (code !== 'context.media_removed' && code !== 'context.image_removed')
|
|
908
1072
|
return undefined;
|
|
909
1073
|
const d = ownSeat(n, 'detail');
|
|
910
1074
|
if (typeof d !== 'object' || d === null || Array.isArray(d))
|
|
911
1075
|
return undefined;
|
|
912
1076
|
const o = d;
|
|
1077
|
+
const count = (v) => typeof v === 'number' && Number.isSafeInteger(v) && v >= 0;
|
|
1078
|
+
if (code === 'context.image_removed') {
|
|
1079
|
+
const legacyImages = ownSeat(o, 'images');
|
|
1080
|
+
const legacySessionId = nonEmpty(ownSeat(o, 'sessionId'));
|
|
1081
|
+
const legacyRunId = nonEmpty(ownSeat(o, 'runId'));
|
|
1082
|
+
if (!count(legacyImages) || legacyImages < 1 || legacySessionId === undefined || legacyRunId === undefined)
|
|
1083
|
+
return undefined;
|
|
1084
|
+
return { reason: 'rejected_by_provider', images: legacyImages, documents: 0, sessionId: legacySessionId, runId: legacyRunId };
|
|
1085
|
+
}
|
|
913
1086
|
const reason = nonEmpty(ownSeat(o, 'reason'));
|
|
914
1087
|
const images = ownSeat(o, 'images');
|
|
915
1088
|
const documents = ownSeat(o, 'documents');
|
|
916
1089
|
const sessionId = nonEmpty(ownSeat(o, 'sessionId'));
|
|
917
1090
|
const runId = nonEmpty(ownSeat(o, 'runId'));
|
|
918
|
-
const count = (v) => typeof v === 'number' && Number.isSafeInteger(v) && v >= 0;
|
|
919
1091
|
if (reason === undefined || !count(images) || !count(documents) || images + documents < 1 || sessionId === undefined || runId === undefined)
|
|
920
1092
|
return undefined;
|
|
921
1093
|
return { reason, images, documents, sessionId, runId };
|
|
@@ -1009,6 +1181,7 @@ export const ENGINE_NOTICE_FACT_READERS = Object.freeze({
|
|
|
1009
1181
|
'route.stream_end_ignored': readStreamEndIgnored,
|
|
1010
1182
|
'mcp.authorization_required': readMcpAuthorizationRequired,
|
|
1011
1183
|
'context.media_removed': readContextMediaRemoved,
|
|
1184
|
+
'context.image_removed': readContextMediaRemoved,
|
|
1012
1185
|
'session.lineage_rerooted': readSessionLineageRerooted,
|
|
1013
1186
|
});
|
|
1014
1187
|
const _factReaderTablePin = true;
|
package/dist/engineTargetSeat.js
CHANGED
|
@@ -58,6 +58,7 @@ const REFUSAL_KEYS = {
|
|
|
58
58
|
not_configured: 'config.engineTarget.notConfigured',
|
|
59
59
|
not_signed_in: 'config.engineTarget.notSignedIn',
|
|
60
60
|
probe_failed: 'config.engineTarget.probeFailed',
|
|
61
|
+
cloud_unreachable: 'config.engineTarget.cloudUnreachable',
|
|
61
62
|
org_policy: 'config.engineTarget.orgPolicy',
|
|
62
63
|
url_refused: 'config.engineTarget.urlRefused',
|
|
63
64
|
login_failed: 'config.engineTarget.loginFailed',
|
|
@@ -5,7 +5,8 @@ import { resumeReopenContent } from './hitl/suspendedReopen.js';
|
|
|
5
5
|
import { idempotencyPayloadMismatchContent } from './engineErrorCodes.js';
|
|
6
6
|
import { inheritEnvRefusalContent } from './inheritEnvWire.js';
|
|
7
7
|
import { projectSeedRefusalContent } from './projectSeed.js';
|
|
8
|
-
import { usageWindowExhaustedContent, fleetLeaseUnavailableContent, settingsPermissionBucketRefusalContent, fieldLimitRefusalContent, autonomyLaneRefusalContent, unsupportedRuleRefusalContent, admissionWallRefusalContent, hostPostureRefusalContent, toolDeclarationRefusalContent, } from './wireRefusalCopy.js';
|
|
8
|
+
import { usageWindowExhaustedContent, fleetLeaseUnavailableContent, settingsPermissionBucketRefusalContent, fieldLimitRefusalContent, autonomyLaneRefusalContent, sessionArchiveStampedContent, unsupportedRuleRefusalContent, admissionWallRefusalContent, hostPostureRefusalContent, toolDeclarationRefusalContent, } from './wireRefusalCopy.js';
|
|
9
|
+
import { catalogDefaultRefusalContent } from './model/catalogDefault.js';
|
|
9
10
|
const ROLE_BY_READER = new Map([
|
|
10
11
|
[corruptSessionContent, 'replacement'],
|
|
11
12
|
[corruptStoredRowContent, 'replacement'],
|
|
@@ -19,9 +20,11 @@ const ROLE_BY_READER = new Map([
|
|
|
19
20
|
[settingsPermissionBucketRefusalContent, 'replacement'],
|
|
20
21
|
[fieldLimitRefusalContent, 'replacement'],
|
|
21
22
|
[autonomyLaneRefusalContent, 'replacement'],
|
|
23
|
+
[sessionArchiveStampedContent, 'replacement'],
|
|
22
24
|
[idempotencyPayloadMismatchContent, 'replacement'],
|
|
23
25
|
[unsupportedRuleRefusalContent, 'replacement'],
|
|
24
26
|
[projectSeedRefusalContent, 'replacement'],
|
|
27
|
+
[catalogDefaultRefusalContent, 'replacement'],
|
|
25
28
|
[admissionWallRefusalContent, 'supplement'],
|
|
26
29
|
[hostPostureRefusalContent, 'supplement'],
|
|
27
30
|
[toolDeclarationRefusalContent, 'supplement'],
|
package/dist/eventLeg.js
CHANGED
|
@@ -21,7 +21,7 @@ function makeFrameStageDomains(domains) {
|
|
|
21
21
|
}
|
|
22
22
|
const FRAME_STAGE_DOMAINS = makeFrameStageDomains({
|
|
23
23
|
bindRun: Object.freeze(['meta', 'done', 'failed']),
|
|
24
|
-
stampOwner: Object.freeze(['task_progress']),
|
|
24
|
+
stampOwner: Object.freeze(['task_progress', 'task_started']),
|
|
25
25
|
hitlFrames: Object.freeze(['question', 'question_complete', 'elicitation', 'elicitation_complete', 'tool_approval', 'tool_approval_complete', 'approval_request', 'approval_complete', 'approval_revoke']),
|
|
26
26
|
});
|
|
27
27
|
const HITL_FRAMES_PROJECTED = Object.freeze(['human_input']);
|
|
@@ -2,6 +2,7 @@ import { capForDisplay } from './fleetTaskDesc.js';
|
|
|
2
2
|
import { engineWireTargetBaseUrl } from './engineWireTarget.js';
|
|
3
3
|
import { createEngineCapReader, unreadableReadingDetail } from './engineCapReader.js';
|
|
4
4
|
import { ownDataField } from './ownKey.js';
|
|
5
|
+
import { executionLaneWordIsNone } from './executionLaneWords.js';
|
|
5
6
|
export function projectExecutionLaneCapability(caps) {
|
|
6
7
|
try {
|
|
7
8
|
if (caps === null || typeof caps !== 'object')
|
|
@@ -100,8 +101,8 @@ export function executionLaneDoctorDetail(reading) {
|
|
|
100
101
|
if (reading.view.toolsOnThisHost) {
|
|
101
102
|
return `execution lane ${lane} — tools run on the engine host (same filesystem), so skills that have a directory of their own can carry a baseDir`;
|
|
102
103
|
}
|
|
103
|
-
if (reading.view.provider
|
|
104
|
-
return
|
|
104
|
+
if (executionLaneWordIsNone(reading.view.provider)) {
|
|
105
|
+
return `no execution lane on this deployment (${lane}) — the engine has no machine of its own for running tools here, so its built-in file and shell tools are not mounted and skill baseDir is never sent; whether a given run had tools is answered by its tool roster`;
|
|
105
106
|
}
|
|
106
107
|
return `execution lane ${lane} — tools run on a different machine than the engine, so skill baseDir is never sent on this deployment`;
|
|
107
108
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function executionLaneWordIsNone(provider: string): boolean;
|
package/dist/gateOutcome.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DeniedBy, Settlement } from '@sema-agent/sdk';
|
|
2
2
|
import { type CcToolDenialKind } from './gateVocabulary.js';
|
|
3
|
-
import { CORE_MODE_RELEASE_REASONS } from './generated/engineFactTables.js';
|
|
3
|
+
import { CORE_MODE_RELEASE_REASONS, CORE_REFUSAL_ECHO_KINDS } from './generated/engineFactTables.js';
|
|
4
4
|
export type GateDispositionView = {
|
|
5
5
|
kind: 'allowed';
|
|
6
6
|
classifier?: GateClassifierRoundView;
|
|
@@ -14,7 +14,16 @@ export type GateDispositionView = {
|
|
|
14
14
|
deniedBy: DeniedBy | (string & {});
|
|
15
15
|
cause?: string;
|
|
16
16
|
extension?: string;
|
|
17
|
+
echoed?: readonly GateRefusalEchoView[];
|
|
17
18
|
};
|
|
19
|
+
export interface GateRefusalEchoView {
|
|
20
|
+
readonly kind: string;
|
|
21
|
+
readonly value: string;
|
|
22
|
+
readonly canonical?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const GATE_REFUSAL_ECHO_KIND_WORDS: readonly ["path", "command", "pattern"];
|
|
25
|
+
export type GateRefusalEchoKindWord = (typeof CORE_REFUSAL_ECHO_KINDS)[number];
|
|
26
|
+
export declare function isGateRefusalEchoKindWord(v: string): v is GateRefusalEchoKindWord;
|
|
18
27
|
export interface GateClassifierRoundView {
|
|
19
28
|
modelRequested: string;
|
|
20
29
|
modelUsed: string;
|
package/dist/gateOutcome.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { ccToolDenialKindForSettledBy, isCcToolDenialKind, isGateDeniedByWord } from './gateVocabulary.js';
|
|
2
2
|
import { GATE_PARKED_ERROR_CODE } from './engineErrorCodes.js';
|
|
3
|
-
import { CORE_MODE_RELEASE_REASONS, CORE_SETTLEMENT_KINDS } from './generated/engineFactTables.js';
|
|
3
|
+
import { CORE_MODE_RELEASE_REASONS, CORE_REFUSAL_ECHO_KINDS, CORE_SETTLEMENT_KINDS } from './generated/engineFactTables.js';
|
|
4
4
|
import { readAskOrigin, readOwnDataNonEmptyString, readOwnDataValue } from './ownKey.js';
|
|
5
5
|
function str(v) {
|
|
6
6
|
return typeof v === 'string' && v.length > 0 ? v : undefined;
|
|
7
7
|
}
|
|
8
|
+
export const GATE_REFUSAL_ECHO_KIND_WORDS = CORE_REFUSAL_ECHO_KINDS;
|
|
9
|
+
export function isGateRefusalEchoKindWord(v) {
|
|
10
|
+
return typeof v === 'string' && CORE_REFUSAL_ECHO_KINDS.includes(v);
|
|
11
|
+
}
|
|
8
12
|
export const GATE_MODE_RELEASE_REASON_WORDS = CORE_MODE_RELEASE_REASONS;
|
|
9
13
|
export function isGateModeReleaseReasonWord(v) {
|
|
10
14
|
return typeof v === 'string' && CORE_MODE_RELEASE_REASONS.includes(v);
|
|
@@ -112,6 +116,46 @@ function nonEmptyStringList(v) {
|
|
|
112
116
|
}
|
|
113
117
|
return Object.freeze(out);
|
|
114
118
|
}
|
|
119
|
+
function ownDataOf(o, key) {
|
|
120
|
+
try {
|
|
121
|
+
const d = Object.getOwnPropertyDescriptor(o, key);
|
|
122
|
+
return d === undefined || !Object.hasOwn(d, 'value') ? { ok: false } : { ok: true, value: d.value };
|
|
123
|
+
}
|
|
124
|
+
catch {
|
|
125
|
+
return { ok: false };
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
function readRefusalEchoes(raw) {
|
|
129
|
+
try {
|
|
130
|
+
if (!Array.isArray(raw))
|
|
131
|
+
return undefined;
|
|
132
|
+
const len = ownDataOf(raw, 'length');
|
|
133
|
+
if (!len.ok || typeof len.value !== 'number' || !Number.isInteger(len.value) || len.value <= 0)
|
|
134
|
+
return undefined;
|
|
135
|
+
const out = [];
|
|
136
|
+
for (let i = 0; i < len.value; i += 1) {
|
|
137
|
+
const slot = ownDataOf(raw, String(i));
|
|
138
|
+
if (!slot.ok)
|
|
139
|
+
return undefined;
|
|
140
|
+
const e = slot.value;
|
|
141
|
+
if (typeof e !== 'object' || e === null || Array.isArray(e))
|
|
142
|
+
return undefined;
|
|
143
|
+
const kind = ownDataOf(e, 'kind');
|
|
144
|
+
const value = ownDataOf(e, 'value');
|
|
145
|
+
if (!kind.ok || typeof kind.value !== 'string' || kind.value.length === 0)
|
|
146
|
+
return undefined;
|
|
147
|
+
if (!value.ok || typeof value.value !== 'string' || value.value.length === 0)
|
|
148
|
+
return undefined;
|
|
149
|
+
const canonical = ownDataOf(e, 'canonical');
|
|
150
|
+
const canon = canonical.ok && typeof canonical.value === 'string' && canonical.value.length > 0 ? canonical.value : undefined;
|
|
151
|
+
out.push(Object.freeze({ kind: kind.value, value: value.value, ...(canon !== undefined ? { canonical: canon } : {}) }));
|
|
152
|
+
}
|
|
153
|
+
return Object.freeze(out);
|
|
154
|
+
}
|
|
155
|
+
catch {
|
|
156
|
+
return undefined;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
115
159
|
function readModeRelease(raw) {
|
|
116
160
|
if (typeof raw !== 'object' || raw === null || Array.isArray(raw))
|
|
117
161
|
return undefined;
|
|
@@ -198,6 +242,8 @@ function readGateRecord(frame) {
|
|
|
198
242
|
const askClass = str(dr.askClass);
|
|
199
243
|
const classes = nonEmptyStringList(dr.classes);
|
|
200
244
|
const extension = str(dr.extension);
|
|
245
|
+
const echoedSeat = ownDataOf(dr, 'echoed');
|
|
246
|
+
const echoed = echoedSeat.ok ? readRefusalEchoes(echoedSeat.value) : undefined;
|
|
201
247
|
disposition = {
|
|
202
248
|
kind: 'denied',
|
|
203
249
|
deniedBy,
|
|
@@ -207,6 +253,7 @@ function readGateRecord(frame) {
|
|
|
207
253
|
...(askClass !== undefined ? { askClass } : {}),
|
|
208
254
|
...(classes !== undefined ? { classes } : {}),
|
|
209
255
|
...(extension !== undefined ? { extension } : {}),
|
|
256
|
+
...(echoed !== undefined ? { echoed } : {}),
|
|
210
257
|
};
|
|
211
258
|
}
|
|
212
259
|
else {
|
|
@@ -73,3 +73,4 @@ export declare const CORE_USER_ATTACHMENTS_MAX: number;
|
|
|
73
73
|
export declare const CORE_USER_ATTACHMENT_LABEL_MAX: number;
|
|
74
74
|
export declare const CORE_PRESENT_PLAN_TOOL_NAME: "ExitPlanMode";
|
|
75
75
|
export declare const CORE_WORKFLOW_AGENT_PARKED_ERROR_CODE: "workflow.agent_parked";
|
|
76
|
+
export declare const CORE_REFUSAL_ECHO_KINDS: readonly ["path", "command", "pattern"];
|
|
@@ -466,3 +466,8 @@ export const CORE_USER_ATTACHMENTS_MAX = 20;
|
|
|
466
466
|
export const CORE_USER_ATTACHMENT_LABEL_MAX = 4096;
|
|
467
467
|
export const CORE_PRESENT_PLAN_TOOL_NAME = "ExitPlanMode";
|
|
468
468
|
export const CORE_WORKFLOW_AGENT_PARKED_ERROR_CODE = "workflow.agent_parked";
|
|
469
|
+
export const CORE_REFUSAL_ECHO_KINDS = Object.freeze([
|
|
470
|
+
"path",
|
|
471
|
+
"command",
|
|
472
|
+
"pattern",
|
|
473
|
+
]);
|
|
@@ -51,6 +51,8 @@ export const CORE_ENGINE_NOTICE_CODES = Object.freeze([
|
|
|
51
51
|
"checkpoint.execution_outcome_unrecorded",
|
|
52
52
|
"delegation.transcript_integrity",
|
|
53
53
|
"delegation.ask_unresolvable",
|
|
54
|
+
"delegation.resume_lane_missing",
|
|
55
|
+
"delegation.delivery_discarded",
|
|
54
56
|
"mcp.injection_dropped",
|
|
55
57
|
"mcp.revocation_probe_failed",
|
|
56
58
|
"mcp.server_redialed",
|
|
@@ -60,6 +62,8 @@ export const CORE_ENGINE_NOTICE_CODES = Object.freeze([
|
|
|
60
62
|
"workflow.agent_option_ignored",
|
|
61
63
|
"memory.session_polluted",
|
|
62
64
|
"memory.harvest_quarantined",
|
|
65
|
+
"memory.harvest_refused",
|
|
66
|
+
"memory.harvest_conflict",
|
|
63
67
|
"memory.delegation_static_mark_waived",
|
|
64
68
|
"memory.content_class_declared",
|
|
65
69
|
"memory.hold_opened",
|
|
@@ -110,7 +114,6 @@ export const CORE_ENGINE_NOTICE_CODES = Object.freeze([
|
|
|
110
114
|
"fs.staging_file_swept",
|
|
111
115
|
"session.lineage_rerooted",
|
|
112
116
|
"instructions.source_changed",
|
|
113
|
-
"session.records_skipped",
|
|
114
117
|
"memory.layer_locked_legacy",
|
|
115
118
|
"server.model_unreachable",
|
|
116
119
|
"permission.entry_mode_clamped",
|
|
@@ -168,6 +171,8 @@ export const CORE_NOTICE_AUDIENCE = Object.freeze({
|
|
|
168
171
|
"checkpoint.execution_outcome_unrecorded": "operator",
|
|
169
172
|
"delegation.transcript_integrity": "operator",
|
|
170
173
|
"delegation.ask_unresolvable": "user",
|
|
174
|
+
"delegation.resume_lane_missing": "operator",
|
|
175
|
+
"delegation.delivery_discarded": "operator",
|
|
171
176
|
"mcp.injection_dropped": "user",
|
|
172
177
|
"mcp.revocation_probe_failed": "operator",
|
|
173
178
|
"mcp.server_redialed": "operator",
|
|
@@ -177,6 +182,8 @@ export const CORE_NOTICE_AUDIENCE = Object.freeze({
|
|
|
177
182
|
"workflow.agent_option_ignored": "operator",
|
|
178
183
|
"memory.session_polluted": "user",
|
|
179
184
|
"memory.harvest_quarantined": "user",
|
|
185
|
+
"memory.harvest_refused": "user",
|
|
186
|
+
"memory.harvest_conflict": "user",
|
|
180
187
|
"memory.delegation_static_mark_waived": "user",
|
|
181
188
|
"memory.content_class_declared": "operator",
|
|
182
189
|
"memory.hold_opened": "user",
|
|
@@ -227,7 +234,6 @@ export const CORE_NOTICE_AUDIENCE = Object.freeze({
|
|
|
227
234
|
"fs.staging_file_swept": "operator",
|
|
228
235
|
"session.lineage_rerooted": "user",
|
|
229
236
|
"instructions.source_changed": "user",
|
|
230
|
-
"session.records_skipped": "user",
|
|
231
237
|
"memory.layer_locked_legacy": "operator",
|
|
232
238
|
"server.model_unreachable": "user",
|
|
233
239
|
"permission.entry_mode_clamped": "user",
|
|
@@ -291,6 +297,8 @@ export const CORE_NOTICE_MINTER = Object.freeze({
|
|
|
291
297
|
"checkpoint.execution_outcome_unrecorded": "engine",
|
|
292
298
|
"delegation.transcript_integrity": "engine",
|
|
293
299
|
"delegation.ask_unresolvable": "engine",
|
|
300
|
+
"delegation.resume_lane_missing": "engine",
|
|
301
|
+
"delegation.delivery_discarded": "engine",
|
|
294
302
|
"mcp.injection_dropped": "engine",
|
|
295
303
|
"mcp.revocation_probe_failed": "engine",
|
|
296
304
|
"mcp.server_redialed": "engine",
|
|
@@ -300,6 +308,8 @@ export const CORE_NOTICE_MINTER = Object.freeze({
|
|
|
300
308
|
"workflow.agent_option_ignored": "engine",
|
|
301
309
|
"memory.session_polluted": "engine",
|
|
302
310
|
"memory.harvest_quarantined": "engine",
|
|
311
|
+
"memory.harvest_refused": "engine",
|
|
312
|
+
"memory.harvest_conflict": "engine",
|
|
303
313
|
"memory.delegation_static_mark_waived": "engine",
|
|
304
314
|
"memory.content_class_declared": "engine",
|
|
305
315
|
"memory.hold_opened": "engine",
|
|
@@ -350,7 +360,6 @@ export const CORE_NOTICE_MINTER = Object.freeze({
|
|
|
350
360
|
"fs.staging_file_swept": "engine",
|
|
351
361
|
"session.lineage_rerooted": "engine",
|
|
352
362
|
"instructions.source_changed": "server",
|
|
353
|
-
"session.records_skipped": "server",
|
|
354
363
|
"memory.layer_locked_legacy": "server",
|
|
355
364
|
"server.model_unreachable": "server",
|
|
356
365
|
"permission.entry_mode_clamped": "server",
|
|
@@ -34,18 +34,20 @@ export declare const SETTINGS_READ_KEY: (record: object, key: PropertyKey) => ob
|
|
|
34
34
|
export declare const SETTINGS_IS_RESERVED_MCP_SERVER_NAME: (name: string) => boolean;
|
|
35
35
|
export declare const SETTINGS_REMOTE_MCP_SERVER_NAME_PREFIX: "remote-";
|
|
36
36
|
export declare const SETTINGS_RESERVED_MCP_SERVER_NAME_REASON: "the \"remote-\" prefix is reserved for the remote MCP servers a device executor offers";
|
|
37
|
+
export declare const SETTINGS_IS_USABLE_WIRE_NAME: (v: unknown) => v is string;
|
|
38
|
+
export declare const SETTINGS_TOOL_WIRE_NAME_MAX_CHARS: 128;
|
|
39
|
+
export declare const SETTINGS_HAS_EDGE_WHITESPACE: (v: string) => boolean;
|
|
40
|
+
export declare const SETTINGS_IS_RESERVED_MEMBER_NAME: (name: string) => boolean;
|
|
37
41
|
export declare const SETTINGS_READ_REQUEST_MCP_TRANSPORT: (t: unknown) => RequestMcpTransportRead;
|
|
38
42
|
export declare const SETTINGS_READ_MCP_IDENTITY_HEADERS: (transport: Record<string, unknown>) => {
|
|
39
43
|
principalHeader?: string;
|
|
40
44
|
assertionHeader?: string;
|
|
41
45
|
};
|
|
42
|
-
export declare const SETTINGS_IS_USABLE_WIRE_NAME: (v: unknown) => v is string;
|
|
43
46
|
export declare const SETTINGS_DESCRIBE_BAD_WIRE_NAME: (v: unknown) => string;
|
|
44
47
|
export declare const SETTINGS_IS_USABLE_MCP_SERVER_NAME: (v: unknown) => v is string;
|
|
45
48
|
export declare const SETTINGS_DESCRIBE_BAD_MCP_SERVER_NAME: (v: unknown) => string;
|
|
46
49
|
export declare const SETTINGS_IS_CONTENT_ORIGIN_WORD: (v: unknown) => v is McpContentOrigin;
|
|
47
50
|
export declare const SETTINGS_DESCRIBE_BAD_CONTENT_ORIGIN: (v: unknown) => string;
|
|
48
|
-
export declare const SETTINGS_TOOL_WIRE_NAME_MAX_CHARS: 128;
|
|
49
51
|
export declare const SETTINGS_URL_ALLOW_PATTERN_MATCHES: (url: string, pattern: string) => boolean;
|
|
50
52
|
export declare const SETTINGS_IS_AT_LEAST: (layer: string, minTrust: string) => boolean;
|
|
51
53
|
export declare const SETTINGS_MEMBER_ADMISSION: (category: string, member: string) => object;
|
|
@@ -4,6 +4,8 @@ import { SETTINGS_CALLER_TEXT_ECHO_CLOSURE } from './settingsSchemaCallerTextEch
|
|
|
4
4
|
import { SETTINGS_PLAIN_JSON_OBJECT_CLOSURE } from './settingsSchemaPlainJsonObject.js';
|
|
5
5
|
import { SETTINGS_OWN_KEY_READ_CLOSURE } from './settingsSchemaOwnKeyRead.js';
|
|
6
6
|
import { SETTINGS_MCP_SERVER_NAME_CLOSURE } from './settingsSchemaMcpServerName.js';
|
|
7
|
+
import { SETTINGS_WIRE_NAME_CLOSURE } from './settingsSchemaWireName.js';
|
|
8
|
+
import { SETTINGS_RESERVED_MEMBER_NAME_CLOSURE } from './settingsSchemaReservedMemberName.js';
|
|
7
9
|
import { SETTINGS_MCP_REQUEST_ENTRY_CLOSURE } from './settingsSchemaMcpRequestEntry.js';
|
|
8
10
|
import { SETTINGS_MCP_CONTENT_ORIGINS } from './settingsSchemaTables.js';
|
|
9
11
|
import { SETTINGS_URL_ALLOW_PATTERN_MATCHES_CLOSURE } from './settingsSchemaUrlPattern.js';
|
|
@@ -167,16 +169,20 @@ const SETTINGS_MCP_SERVER_NAME = SETTINGS_MCP_SERVER_NAME_CLOSURE();
|
|
|
167
169
|
export const SETTINGS_IS_RESERVED_MCP_SERVER_NAME = SETTINGS_MCP_SERVER_NAME.isReservedMcpServerName;
|
|
168
170
|
export const SETTINGS_REMOTE_MCP_SERVER_NAME_PREFIX = SETTINGS_MCP_SERVER_NAME.REMOTE_MCP_SERVER_NAME_PREFIX;
|
|
169
171
|
export const SETTINGS_RESERVED_MCP_SERVER_NAME_REASON = SETTINGS_MCP_SERVER_NAME.RESERVED_MCP_SERVER_NAME_REASON;
|
|
170
|
-
const
|
|
172
|
+
const SETTINGS_WIRE_NAME = SETTINGS_WIRE_NAME_CLOSURE();
|
|
173
|
+
export const SETTINGS_IS_USABLE_WIRE_NAME = SETTINGS_WIRE_NAME.isUsableWireName;
|
|
174
|
+
export const SETTINGS_TOOL_WIRE_NAME_MAX_CHARS = SETTINGS_WIRE_NAME.TOOL_WIRE_NAME_MAX_CHARS;
|
|
175
|
+
export const SETTINGS_HAS_EDGE_WHITESPACE = SETTINGS_WIRE_NAME.hasEdgeWhitespace;
|
|
176
|
+
const SETTINGS_RESERVED_MEMBER_NAME = SETTINGS_RESERVED_MEMBER_NAME_CLOSURE();
|
|
177
|
+
export const SETTINGS_IS_RESERVED_MEMBER_NAME = SETTINGS_RESERVED_MEMBER_NAME.isReservedMemberName;
|
|
178
|
+
const SETTINGS_MCP_REQUEST_ENTRY = SETTINGS_MCP_REQUEST_ENTRY_CLOSURE(SETTINGS_MCP_CONTENT_ORIGINS, SETTINGS_STARTS_WITH_HTTP_SCHEME, SETTINGS_ECHO_CALLER_TEXT, SETTINGS_UNINSPECTABLE, SETTINGS_CAPTURE_STRING_ARRAY, SETTINGS_DATA_DESCRIPTOR, SETTINGS_INSPECT, SETTINGS_OWN_FIELDS_OF, SETTINGS_OWN_VALUE_OF, SETTINGS_READ_KEY, SETTINGS_IS_JSON_ARRAY, SETTINGS_JSON_SHAPE_OF, SETTINGS_IS_RESERVED_MCP_SERVER_NAME, SETTINGS_RESERVED_MCP_SERVER_NAME_REASON, SETTINGS_TOOL_WIRE_NAME_MAX_CHARS, SETTINGS_HAS_EDGE_WHITESPACE, SETTINGS_IS_USABLE_WIRE_NAME, SETTINGS_IS_RESERVED_MEMBER_NAME);
|
|
171
179
|
export const SETTINGS_READ_REQUEST_MCP_TRANSPORT = SETTINGS_MCP_REQUEST_ENTRY.readRequestMcpTransport;
|
|
172
180
|
export const SETTINGS_READ_MCP_IDENTITY_HEADERS = SETTINGS_MCP_REQUEST_ENTRY.readMcpIdentityHeaders;
|
|
173
|
-
export const SETTINGS_IS_USABLE_WIRE_NAME = SETTINGS_MCP_REQUEST_ENTRY.isUsableWireName;
|
|
174
181
|
export const SETTINGS_DESCRIBE_BAD_WIRE_NAME = SETTINGS_MCP_REQUEST_ENTRY.describeBadWireName;
|
|
175
182
|
export const SETTINGS_IS_USABLE_MCP_SERVER_NAME = SETTINGS_MCP_REQUEST_ENTRY.isUsableMcpServerName;
|
|
176
183
|
export const SETTINGS_DESCRIBE_BAD_MCP_SERVER_NAME = SETTINGS_MCP_REQUEST_ENTRY.describeBadMcpServerName;
|
|
177
184
|
export const SETTINGS_IS_CONTENT_ORIGIN_WORD = SETTINGS_MCP_REQUEST_ENTRY.isContentOriginWord;
|
|
178
185
|
export const SETTINGS_DESCRIBE_BAD_CONTENT_ORIGIN = SETTINGS_MCP_REQUEST_ENTRY.describeBadContentOrigin;
|
|
179
|
-
export const SETTINGS_TOOL_WIRE_NAME_MAX_CHARS = SETTINGS_MCP_REQUEST_ENTRY.TOOL_WIRE_NAME_MAX_CHARS;
|
|
180
186
|
export const SETTINGS_URL_ALLOW_PATTERN_MATCHES = SETTINGS_URL_ALLOW_PATTERN_MATCHES_CLOSURE();
|
|
181
187
|
const SETTINGS_SAFETY_MERGE = SETTINGS_SAFETY_MERGE_CLOSURE(SETTINGS_MIN_TRUST_WORDS);
|
|
182
188
|
export const SETTINGS_IS_AT_LEAST = SETTINGS_SAFETY_MERGE.isAtLeast;
|