@sema-agent/client-core 0.110.0 → 0.112.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 +244 -0
- package/README.md +59 -18
- package/dist/abortableSleep.d.ts +7 -0
- package/dist/abortableSleep.js +37 -0
- package/dist/adapt/arms.js +25 -4
- package/dist/adapt/toolCards.d.ts +3 -1
- package/dist/adapt/toolCards.js +4 -2
- package/dist/adapter/activeRunSelfHeal.d.ts +39 -0
- package/dist/adapter/activeRunSelfHeal.js +171 -3
- package/dist/adapter/downstream/eventToSdkMessage.js +10 -10
- package/dist/adapter/downstream/terminalToSdkResult.d.ts +2 -0
- package/dist/adapter/downstream/terminalToSdkResult.js +11 -0
- package/dist/adapter/runStream.d.ts +5 -0
- package/dist/adapter/runStream.js +15 -3
- package/dist/agentSession/engineSessionBackgroundStop.js +2 -2
- package/dist/attachmentRoute.d.ts +20 -0
- package/dist/attachmentRoute.js +39 -0
- package/dist/attachmentsWireCaps.js +1 -1
- package/dist/builtinOutputStyles.d.ts +12 -0
- package/dist/builtinOutputStyles.js +147 -0
- package/dist/checkpointRowVerdict.d.ts +3 -0
- package/dist/checkpointRowVerdict.js +14 -1
- package/dist/compactionStatus.d.ts +9 -0
- package/dist/compactionStatus.js +29 -5
- package/dist/consoleCaPin.d.ts +136 -0
- package/dist/consoleCaPin.js +827 -0
- package/dist/controlRouter.js +2 -1
- package/dist/coreValuePorts.d.ts +39 -1
- package/dist/coreValuePorts.js +10 -0
- package/dist/decideReceipt.d.ts +2 -1
- package/dist/deviceRebind.js +3 -3
- package/dist/displayUntrusted.d.ts +1 -0
- package/dist/displayUntrusted.js +6 -0
- package/dist/effectiveFacts.d.ts +9 -0
- package/dist/effectiveFacts.js +33 -0
- package/dist/engineAddress.d.ts +1 -0
- package/dist/engineAddress.js +4 -1
- package/dist/engineCredentialRelease.d.ts +54 -0
- package/dist/engineCredentialRelease.js +146 -0
- package/dist/engineErrorCodes.d.ts +1 -0
- package/dist/engineErrorCodes.js +1 -0
- package/dist/engineHealthProbeVerdict.d.ts +24 -0
- package/dist/engineHealthProbeVerdict.js +123 -0
- package/dist/engineNoticeCodes.js +5 -7
- package/dist/engineRepoint.d.ts +12 -5
- package/dist/engineRepoint.js +44 -19
- package/dist/engineRowRef.d.ts +3 -0
- package/dist/engineRowRef.js +11 -1
- package/dist/engineSwapCrossing.d.ts +57 -0
- package/dist/engineSwapCrossing.js +297 -0
- package/dist/engineUnavailable.d.ts +45 -0
- package/dist/engineUnavailable.js +496 -0
- package/dist/engineUrl.js +4 -2
- package/dist/eventLeg.js +3 -3
- package/dist/gateFailureCodes.js +2 -2
- package/dist/generated/sdkFactTables.d.ts +2 -1
- package/dist/generated/sdkFactTables.js +14 -0
- package/dist/generated/settingsSchemaFns.d.ts +1 -0
- package/dist/generated/settingsSchemaFns.js +3 -0
- package/dist/generated/settingsSchemaHooksClassifier.js +38 -9
- package/dist/generated/settingsSchemaTables.d.ts +56 -0
- package/dist/generated/settingsSchemaTables.js +19 -0
- package/dist/generated/settingsSchemaTypes.d.ts +23 -13
- package/dist/generated/settingsSchemaUrlShape.d.ts +1 -0
- package/dist/generated/settingsSchemaUrlShape.js +17 -0
- package/dist/hitl/approvalDelivery.d.ts +1 -0
- package/dist/hitl/approvalDelivery.js +1 -1
- package/dist/hitl/approvalResolution.d.ts +1 -1
- package/dist/hitl/approvalResolution.js +2 -1
- package/dist/hitl/askGateWire.js +5 -6
- package/dist/hitl/decisionRefusal.d.ts +6 -0
- package/dist/hitl/decisionRefusal.js +19 -10
- package/dist/hitl/decisionRefusalCarrier.d.ts +3 -0
- package/dist/hitl/decisionRefusalCarrier.js +348 -0
- package/dist/hitl/decisionSend.d.ts +7 -0
- package/dist/hitl/decisionSend.js +34 -12
- package/dist/hitl/editedApprovalAcceptance.js +1 -1
- package/dist/hitl/elicitationRefusal.d.ts +4 -0
- package/dist/hitl/elicitationRefusal.js +23 -0
- package/dist/hitl/frameRouter.d.ts +2 -2
- package/dist/hitl/frameRouter.js +8 -15
- package/dist/hitl/gateIdentity.d.ts +5 -0
- package/dist/hitl/gateIdentity.js +23 -0
- package/dist/hitl/hitlBridge.d.ts +6 -0
- package/dist/hitl/hitlBridge.js +10 -4
- package/dist/hitl/hitlHostSurface.d.ts +2 -1
- package/dist/hitl/hitlHostSurface.js +7 -2
- package/dist/hitl/localAllowRedemption.d.ts +70 -0
- package/dist/hitl/localAllowRedemption.js +276 -0
- package/dist/hitl/parkOwnership.js +2 -1
- package/dist/hitl/parkResolver.js +14 -4
- package/dist/hitl/persistedRulesWire.d.ts +16 -0
- package/dist/hitl/persistedRulesWire.js +70 -0
- package/dist/hitl/planReviewWire.d.ts +3 -0
- package/dist/hitl/planReviewWire.js +23 -6
- package/dist/hitl/policyDenyCause.d.ts +1 -1
- package/dist/hitl/policyDenyCause.js +1 -1
- package/dist/hitl/resumeRunningCard.d.ts +1 -0
- package/dist/hitl/resumeRunningCard.js +1 -0
- package/dist/hitl/screenCardCarriers.d.ts +15 -0
- package/dist/hitl/screenCardCarriers.js +41 -0
- package/dist/hitl/screenDecisionCards.d.ts +98 -0
- package/dist/hitl/screenDecisionCards.js +363 -0
- package/dist/hitl/sessionPolicyWire.js +2 -2
- package/dist/hitl/standingRows.d.ts +6 -2
- package/dist/hitl/standingRows.js +27 -2
- package/dist/hitl/toolApprovalWire.d.ts +30 -8
- package/dist/hitl/toolApprovalWire.js +264 -121
- package/dist/hooksReaderGenerations.js +1 -1
- package/dist/hooksWireCaps.js +3 -3
- package/dist/hostSettingNoticeArm.d.ts +3 -0
- package/dist/hostSettingNoticeArm.js +12 -0
- package/dist/hostTurnSettings.d.ts +3 -0
- package/dist/hostTurnSettings.js +38 -5
- package/dist/humanTurnRead.js +11 -1
- package/dist/i18n/messages.en.d.ts +292 -0
- package/dist/i18n/messages.en.js +298 -7
- package/dist/i18n/messages.zh.js +316 -6
- package/dist/i18n/translate.d.ts +3 -0
- package/dist/i18n/translate.js +78 -10
- package/dist/i18n/zh.d.ts +1 -0
- package/dist/i18n/zh.js +1 -0
- package/dist/index.d.ts +71 -20
- package/dist/index.js +44 -13
- package/dist/interactiveHalt.js +2 -1
- package/dist/interactiveInterrupt.js +20 -2
- package/dist/liveModelCatalog.d.ts +4 -0
- package/dist/liveModelCatalog.js +12 -3
- package/dist/localConfig/documents.d.ts +61 -0
- package/dist/localConfig/documents.js +51 -0
- package/dist/localConfig/kernel.d.ts +149 -0
- package/dist/localConfig/kernel.js +597 -0
- package/dist/localConfig/mcp/edit.d.ts +161 -0
- package/dist/localConfig/mcp/edit.js +846 -0
- package/dist/localConfig/mcp/servers.d.ts +165 -0
- package/dist/localConfig/mcp/servers.js +776 -0
- package/dist/localConfig/mcp/views.d.ts +170 -0
- package/dist/localConfig/mcp/views.js +429 -0
- package/dist/localConfig/modelPool.d.ts +262 -0
- package/dist/localConfig/modelPool.js +1489 -0
- package/dist/localConfig/modelPoolWords.d.ts +13 -0
- package/dist/localConfig/modelPoolWords.js +20 -0
- package/dist/localConfig/receiptShape.d.ts +7 -0
- package/dist/localConfig/receiptShape.js +135 -0
- package/dist/localConfig/settingsWrite.d.ts +127 -0
- package/dist/localConfig/settingsWrite.js +237 -0
- package/dist/localConfig/skills.d.ts +124 -0
- package/dist/localConfig/skills.js +397 -0
- package/dist/localConfig/skillsWords.d.ts +10 -0
- package/dist/localConfig/skillsWords.js +5 -0
- package/dist/localEngineSeatReading.d.ts +2 -2
- package/dist/localEngineSeatReading.js +5 -3
- package/dist/localEngineSpawn.d.ts +0 -7
- package/dist/localEngineSpawn.js +0 -92
- package/dist/localEngineStep.d.ts +2 -2
- package/dist/localEngineStep.js +2 -0
- package/dist/mcpProbeWire.js +2 -1
- package/dist/mcpReconnect.js +3 -3
- package/dist/mcpWireCaps.js +1 -1
- package/dist/memoryVerbsWire.js +3 -2
- package/dist/model/engineModelWords.d.ts +3 -0
- package/dist/model/engineModelWords.js +13 -0
- package/dist/model/onboardJudgement.d.ts +14 -4
- package/dist/model/onboardJudgement.js +91 -139
- package/dist/model/subagentModelWord.d.ts +21 -2
- package/dist/model/subagentModelWord.js +100 -29
- package/dist/modelCapabilityProbe.js +3 -40
- package/dist/modelConfigGapNotice.d.ts +20 -0
- package/dist/modelConfigGapNotice.js +102 -0
- package/dist/modsKernelIdentity.js +2 -47
- package/dist/notifications.d.ts +19 -0
- package/dist/notifications.js +114 -12
- package/dist/ownKey.d.ts +7 -0
- package/dist/ownKey.js +71 -8
- package/dist/pendingUserRow.d.ts +4 -0
- package/dist/pendingUserRow.js +16 -0
- package/dist/permissionsDeclaration.d.ts +3 -1
- package/dist/permissionsDeclaration.js +33 -9
- package/dist/planReviewCardFacts.d.ts +3 -0
- package/dist/planReviewCardFacts.js +52 -2
- package/dist/pluginHooksWire.d.ts +9 -1
- package/dist/pluginHooksWire.js +40 -6
- package/dist/printToolResultFrame.js +4 -2
- package/dist/promptBlockedCopy.js +12 -7
- package/dist/promptSuggestionBatch.d.ts +7 -0
- package/dist/promptSuggestionBatch.js +9 -0
- package/dist/promptSuggestionsTail.d.ts +39 -0
- package/dist/promptSuggestionsTail.js +116 -0
- package/dist/request/taskRequest.js +10 -6
- package/dist/requestCoordinate.d.ts +1 -0
- package/dist/requestCoordinate.js +13 -0
- package/dist/resumeRefusalCopy.d.ts +3 -1
- package/dist/resumeRefusalCopy.js +12 -4
- package/dist/rewindArchiveReading.js +4 -4
- package/dist/runCancelContext.d.ts +2 -1
- package/dist/runCancelContext.js +1 -0
- package/dist/runLedgerSnapshot.js +3 -3
- package/dist/runPermissionModeSwitch.js +3 -4
- package/dist/scenarioRefusal.js +11 -13
- package/dist/scenarioSkills.js +11 -6
- package/dist/seam.d.ts +16 -2
- package/dist/seam.js +10 -0
- package/dist/seatContract.d.ts +259 -9
- package/dist/seatContract.js +444 -15
- package/dist/sessionCostReading.d.ts +70 -0
- package/dist/sessionCostReading.js +150 -0
- package/dist/sessionHooksRoster.d.ts +4 -0
- package/dist/sessionHooksRoster.js +158 -0
- package/dist/sessionIdSegment.d.ts +1 -0
- package/dist/sessionIdSegment.js +4 -1
- package/dist/sessionMemoryErase.js +2 -1
- package/dist/sessionMemoryStatus.js +2 -2
- package/dist/sessionReadRedaction.d.ts +7 -0
- package/dist/sessionReadRedaction.js +26 -0
- package/dist/sessionSyncFileHistory.js +8 -9
- package/dist/settingsHooksSalvage.js +2 -1
- package/dist/sha256Bytes.d.ts +1 -0
- package/dist/sha256Bytes.js +46 -0
- package/dist/skillOverrideChain.d.ts +83 -0
- package/dist/skillOverrideChain.js +378 -0
- package/dist/skillsWireCaps.d.ts +3 -0
- package/dist/skillsWireCaps.js +16 -1
- package/dist/sseIdleTriage.js +2 -1
- package/dist/storeDurabilityWord.d.ts +15 -0
- package/dist/storeDurabilityWord.js +18 -0
- package/dist/storePostureCapability.d.ts +7 -3
- package/dist/storePostureCapability.js +69 -39
- package/dist/subagent/engineSubagentResume.js +2 -2
- package/dist/subagent/engineSubagentTail.js +2 -1
- package/dist/subagentContentStore.d.ts +11 -0
- package/dist/subagentContentStore.js +28 -2
- package/dist/toolResult.d.ts +1 -0
- package/dist/toolResult.js +2 -0
- package/dist/turnFailurePresentation.js +4 -10
- package/dist/userAttachmentEnvelope.d.ts +2 -1
- package/dist/userAttachmentEnvelope.js +10 -0
- package/dist/wireErrorTriage.js +2 -1
- package/dist/wireFailureShape.d.ts +4 -0
- package/dist/wireFailureShape.js +141 -19
- package/dist/wireRefusalCopy.d.ts +6 -5
- package/dist/wireRefusalCopy.js +49 -92
- package/docs/INTEGRATION-CLIENTS.md +2718 -17
- package/package.json +7 -3
|
@@ -3,7 +3,7 @@ import { wireFailureShapeOf } from '../wireFailureShape.js';
|
|
|
3
3
|
import { hostLog } from '../host.js';
|
|
4
4
|
import { msg, renderMessage } from '../i18n/translate.js';
|
|
5
5
|
import { ruleToolNameVerdictOf } from '../protocolSegment.js';
|
|
6
|
-
import { RULES_INERT_ENTRY, RULES_INVALID_SHAPE, isRulesRefusalCode } from '../engineErrorCodes.js';
|
|
6
|
+
import { CORRUPT_ROW_ERROR_CODE, RULES_INERT_ENTRY, RULES_INVALID_SHAPE, isRulesRefusalCode } from '../engineErrorCodes.js';
|
|
7
7
|
import { deniedEntryToolName } from '../engineToolDirectory.js';
|
|
8
8
|
import { rosterMountedNames } from '../rosterMountedNames.js';
|
|
9
9
|
import { CORE_ALLOW_ENTRY_INERT_REASONS, CORE_RULE_TOOL_NAME_VERDICTS } from '../generated/engineFactTables.js';
|
|
@@ -64,7 +64,7 @@ export function classifySessionPolicyFailure(e) {
|
|
|
64
64
|
}
|
|
65
65
|
if (errorCode === 'loosen_forbidden')
|
|
66
66
|
return { kind: 'loosen-forbidden', message };
|
|
67
|
-
if (errorCode ===
|
|
67
|
+
if (errorCode === CORRUPT_ROW_ERROR_CODE)
|
|
68
68
|
return { kind: 'store-corrupt', message };
|
|
69
69
|
if (errorCode === 'conflict')
|
|
70
70
|
return { kind: 'cas-conflict', message };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type PermissionsKeptReason } from '../permissionsDeclaration.js';
|
|
2
2
|
import type { PermissionsAllowGrantReading } from '../permissionsAllowGrantCapability.js';
|
|
3
|
-
|
|
3
|
+
import { type LocalAllowDeclaredFacts, type LocalAllowOfferedFacts, type LocalAllowRedeemability } from './localAllowRedemption.js';
|
|
4
|
+
export type StandingRowWhy = 'given' | 'card_unreadable' | 'remember_refused' | 'remember_unreadable' | 'route_cannot_carry' | 'classes_unreadable' | 'not_deployment_list_question' | 'evidence_unreadable' | 'offers_unreadable' | 'engine_lane_closed' | 'args_unavailable' | 'grant_binding' | 'tool_name_unreadable' | 'rule_cannot_clear' | 'host_fact_missing' | 'card_face_absent' | 'face_not_generic' | 'rule_not_sent' | 'redemption_closed' | 'redemption_unknown';
|
|
4
5
|
export type StandingPersistentRow = 'engine_offer' | 'local_whole_tool' | 'none';
|
|
5
6
|
export interface StandingRowsWhy {
|
|
6
7
|
readonly session: StandingRowWhy;
|
|
@@ -15,6 +16,8 @@ export interface StandingRows {
|
|
|
15
16
|
}
|
|
16
17
|
export interface StandingRowsHostFacts {
|
|
17
18
|
readonly wholeToolRuleSent?: boolean;
|
|
19
|
+
readonly readOnlyRedemption?: LocalAllowOfferedFacts;
|
|
20
|
+
readonly wholeToolLanding?: LocalAllowDeclaredFacts;
|
|
18
21
|
}
|
|
19
22
|
export declare function standingRowsOf(card: object | null | undefined, host?: StandingRowsHostFacts | null): StandingRows;
|
|
20
23
|
export declare function seatSessionRowOf(card: object | null | undefined, requestId: string | undefined): boolean;
|
|
@@ -29,6 +32,7 @@ export declare function rememberOfferable(card: object | null | undefined, host?
|
|
|
29
32
|
export interface LocalAllowRuleEnforcement {
|
|
30
33
|
readonly enforceable: boolean;
|
|
31
34
|
readonly engine: 'sent' | 'kept' | 'unreadable';
|
|
35
|
+
readonly redemption: LocalAllowRedeemability;
|
|
32
36
|
readonly keptReason?: PermissionsKeptReason;
|
|
33
37
|
}
|
|
34
|
-
export declare function localAllowRuleEnforceable(rule: string, caps: PermissionsAllowGrantReading): LocalAllowRuleEnforcement;
|
|
38
|
+
export declare function localAllowRuleEnforceable(rule: string, caps: PermissionsAllowGrantReading, landing?: LocalAllowDeclaredFacts): LocalAllowRuleEnforcement;
|
|
@@ -6,6 +6,7 @@ import { inSlotReadOf, inValueOf } from '../wireFailureShape.js';
|
|
|
6
6
|
import { toolPermissionRequestIdDomain } from '../seatContract.js';
|
|
7
7
|
import { permissionsDeclarationReport } from '../permissionsDeclaration.js';
|
|
8
8
|
import { readCardUnreadableEvidence, sessionAllowCardReadable, sessionAllowEligible } from './sessionAllowRoute.js';
|
|
9
|
+
import { localAllowLandingRedeemability, localAllowRedeemability } from './localAllowRedemption.js';
|
|
9
10
|
const UNREADABLE = Symbol('unreadable');
|
|
10
11
|
function ownData(v, key) {
|
|
11
12
|
try {
|
|
@@ -54,6 +55,21 @@ function persistentRowOf(card, host, evidenceUnreadable) {
|
|
|
54
55
|
const offers = readRuleOffers(p.state === 'present' ? p.value : undefined);
|
|
55
56
|
if (offers === undefined || offers.length === 0)
|
|
56
57
|
return { row: 'none', why: 'offers_unreadable' };
|
|
58
|
+
if (key === 'ruleOffersReadOnly') {
|
|
59
|
+
const facts = typeof host === 'object' && host !== null ? ownData(host, 'readOnlyRedemption') : undefined;
|
|
60
|
+
if (typeof facts !== 'object' || facts === null)
|
|
61
|
+
return { row: 'none', why: 'redemption_unknown' };
|
|
62
|
+
const judged = localAllowRedeemability({
|
|
63
|
+
subject: 'offered',
|
|
64
|
+
managedRulesOnly: ownData(facts, 'managedRulesOnly'),
|
|
65
|
+
scopeRoot: ownData(facts, 'scopeRoot'),
|
|
66
|
+
road: ownData(facts, 'road'),
|
|
67
|
+
});
|
|
68
|
+
if (judged.kind === 'not_redeemable')
|
|
69
|
+
return { row: 'none', why: 'redemption_closed' };
|
|
70
|
+
if (judged.kind === 'unknown')
|
|
71
|
+
return { row: 'none', why: 'redemption_unknown' };
|
|
72
|
+
}
|
|
57
73
|
return { row: 'engine_offer', why: 'given' };
|
|
58
74
|
}
|
|
59
75
|
const absence = present(card, 'ruleOffersAbsence');
|
|
@@ -87,6 +103,11 @@ function persistentRowOf(card, host, evidenceUnreadable) {
|
|
|
87
103
|
return { row: 'none', why: 'host_fact_missing' };
|
|
88
104
|
if (!sent)
|
|
89
105
|
return { row: 'none', why: 'rule_not_sent' };
|
|
106
|
+
const judged = localAllowLandingRedeemability(tool, ownData(host, 'wholeToolLanding'));
|
|
107
|
+
if (judged.kind === 'not_redeemable')
|
|
108
|
+
return { row: 'none', why: 'redemption_closed' };
|
|
109
|
+
if (judged.kind === 'unknown')
|
|
110
|
+
return { row: 'none', why: 'redemption_unknown' };
|
|
90
111
|
return { row: 'local_whole_tool', why: 'given' };
|
|
91
112
|
}
|
|
92
113
|
function enginePremiseOf(card) {
|
|
@@ -186,6 +207,8 @@ const SESSION_OFFER = Object.freeze({
|
|
|
186
207
|
card_face_absent: 'unknown',
|
|
187
208
|
face_not_generic: 'refused',
|
|
188
209
|
rule_not_sent: 'refused',
|
|
210
|
+
redemption_closed: 'refused',
|
|
211
|
+
redemption_unknown: 'unknown',
|
|
189
212
|
});
|
|
190
213
|
const PERSISTENT_OFFER = Object.freeze({ ...SESSION_OFFER, remember_refused: 'unknown' });
|
|
191
214
|
export function rememberOfferable(card, host) {
|
|
@@ -196,7 +219,7 @@ export function rememberOfferable(card, host) {
|
|
|
196
219
|
deploymentList: SESSION_OFFER[rows.why.deploymentList],
|
|
197
220
|
});
|
|
198
221
|
}
|
|
199
|
-
export function localAllowRuleEnforceable(rule, caps) {
|
|
222
|
+
export function localAllowRuleEnforceable(rule, caps, landing) {
|
|
200
223
|
let engine = 'unreadable';
|
|
201
224
|
let keptReason;
|
|
202
225
|
if (typeof rule === 'string' && rule.trim() !== '') {
|
|
@@ -216,9 +239,11 @@ export function localAllowRuleEnforceable(rule, caps) {
|
|
|
216
239
|
engine = 'unreadable';
|
|
217
240
|
}
|
|
218
241
|
}
|
|
242
|
+
const redemption = localAllowLandingRedeemability(rule, landing);
|
|
219
243
|
return Object.freeze({
|
|
220
|
-
enforceable: engine === 'sent',
|
|
244
|
+
enforceable: engine === 'sent' && redemption.kind === 'redeemable',
|
|
221
245
|
engine,
|
|
246
|
+
redemption,
|
|
222
247
|
...(keptReason !== undefined ? { keptReason } : {}),
|
|
223
248
|
});
|
|
224
249
|
}
|
|
@@ -29,6 +29,7 @@ export interface FsApprovalWireDeps {
|
|
|
29
29
|
onPresented?: () => void;
|
|
30
30
|
onDecideOperation?: DecideOperationObserver;
|
|
31
31
|
approvalDecidedBy?: ApprovalDecidedByReading | undefined;
|
|
32
|
+
engineGeneration?: () => number;
|
|
32
33
|
}
|
|
33
34
|
export declare function structurallyEqual(a: unknown, b: unknown): boolean;
|
|
34
35
|
export type { RuleOfferMatch };
|
|
@@ -101,6 +102,7 @@ export interface ApprovalCardRequest {
|
|
|
101
102
|
callKey: string;
|
|
102
103
|
toolCallId?: string;
|
|
103
104
|
taskId?: string;
|
|
105
|
+
sourceGeneration?: number;
|
|
104
106
|
signal?: AbortSignal;
|
|
105
107
|
workerBadge?: {
|
|
106
108
|
name: string;
|
|
@@ -158,7 +160,6 @@ export interface ApprovalCardSupersedes {
|
|
|
158
160
|
readonly priorAnswerOutcome?: 'not_sent' | 'not_accepted' | 'unconfirmed';
|
|
159
161
|
}
|
|
160
162
|
export interface ApprovalCardParkRow {
|
|
161
|
-
readonly taskId: string;
|
|
162
163
|
readonly gatedCallId?: string;
|
|
163
164
|
readonly deadlineMs?: number;
|
|
164
165
|
}
|
|
@@ -238,7 +239,8 @@ export declare function answerPayloadFor(answer: ApprovalCardDecision, lane: 'de
|
|
|
238
239
|
export interface AnswerCarriage {
|
|
239
240
|
readonly allowNote: 'model' | 'none';
|
|
240
241
|
}
|
|
241
|
-
export declare function answerCarriage(card: Pick<ApprovalCardRequest, 'callKey' | 'parkRow'> | null | undefined): AnswerCarriage;
|
|
242
|
+
export declare function answerCarriage(card: Pick<ApprovalCardRequest, 'callKey' | 'parkRow' | 'taskId'> | null | undefined): AnswerCarriage;
|
|
243
|
+
export declare function cardIsOnParkRow(card: object | null | undefined): boolean;
|
|
242
244
|
export declare function allowNoteNotCarriedSentence(lang?: UiLanguage): string;
|
|
243
245
|
export interface ApprovalAnswerCommitted {
|
|
244
246
|
readonly callKey: string;
|
|
@@ -286,6 +288,25 @@ export type ToolApprovalParkingBodyReading = {
|
|
|
286
288
|
readonly kind: 'claimed_unreadable';
|
|
287
289
|
};
|
|
288
290
|
export declare function readToolApprovalRespondParking(v: unknown): ToolApprovalParkingBodyReading | undefined;
|
|
291
|
+
export type ReplayVerdict = {
|
|
292
|
+
readonly kind: 'none';
|
|
293
|
+
} | {
|
|
294
|
+
readonly kind: 'replayed';
|
|
295
|
+
readonly firstDecision: 'allow' | 'deny';
|
|
296
|
+
readonly via: 'arm' | 'claim';
|
|
297
|
+
} | {
|
|
298
|
+
readonly kind: 'unreadable';
|
|
299
|
+
};
|
|
300
|
+
export declare function replayVerdictFrom(raw: {} | null | undefined, parsed: ToolApprovalRespondAckView | undefined, approvalId: string): ReplayVerdict;
|
|
301
|
+
export type ToolApprovalReplayVerdict = {
|
|
302
|
+
readonly kind: 'not_replay';
|
|
303
|
+
} | {
|
|
304
|
+
readonly kind: 'replayed';
|
|
305
|
+
readonly firstDecision: 'allow' | 'deny';
|
|
306
|
+
} | {
|
|
307
|
+
readonly kind: 'unreadable';
|
|
308
|
+
};
|
|
309
|
+
export declare function toolApprovalReplayVerdictOf(raw: {} | null | undefined, approvalId: string): ToolApprovalReplayVerdict;
|
|
289
310
|
export declare function decisionAttributionKeyOf(reading: ApprovalDecidedByReading | undefined, denySettledBy: ApprovalDenySettledBy | undefined): {
|
|
290
311
|
decidedBy: 'policy';
|
|
291
312
|
} | {
|
|
@@ -317,6 +338,8 @@ export interface ApprovalCardFrameFactsOptions {
|
|
|
317
338
|
readonly streamArgs?: object;
|
|
318
339
|
readonly argsUnavailable?: true;
|
|
319
340
|
}
|
|
341
|
+
export type ApprovalCardHostBits = Readonly<Pick<ApprovalCardRequest, 'callKey' | 'taskId' | 'signal' | 'expiresInMs' | 'expiresAtMs' | 'serverNowMs' | 'receivedAtMs' | 'sourceGeneration'>>;
|
|
342
|
+
export declare function approvalCardRequestOf(facts: Readonly<ApprovalCardFacts>, host: ApprovalCardHostBits): ApprovalCardRequest | undefined;
|
|
320
343
|
export declare function approvalCardFactsOfV1(card: object | null | undefined): Readonly<ApprovalCardV1Facts> | undefined;
|
|
321
344
|
export declare function approvalCardFactsOfV1Frame(frame: object | null | undefined): Readonly<ApprovalCardFacts> | undefined;
|
|
322
345
|
export declare function approvalCardFactsOfFrame(frame: object | null | undefined, opts?: ApprovalCardFrameFactsOptions | null): Readonly<ApprovalCardFacts> | undefined;
|
|
@@ -329,14 +352,13 @@ export interface ToolApprovalFrameLaneOpts {
|
|
|
329
352
|
windowIsCurrent?: boolean;
|
|
330
353
|
argsUnavailable?: true;
|
|
331
354
|
}
|
|
332
|
-
export
|
|
333
|
-
readonly taskId?: string;
|
|
334
|
-
readonly sessionId?: string;
|
|
335
|
-
}): Promise<ApprovalResolution>;
|
|
336
|
-
export declare function surfaceApprovalFrameWithId(frame: ToolApprovalFrame | ApprovalRequestFrame, approvalId: string, respond: RespondToolApprovalFn, streamArgs: Parameters<typeof surfaceToolApprovalFrameAndRespond>[2], signal: AbortSignal | undefined, lane: ToolApprovalFrameLaneOpts | undefined, run: {
|
|
355
|
+
export interface ToolApprovalFrameRunBits {
|
|
337
356
|
readonly taskId?: string;
|
|
338
357
|
readonly sessionId?: string;
|
|
339
|
-
|
|
358
|
+
readonly sourceGeneration?: number;
|
|
359
|
+
}
|
|
360
|
+
export declare function surfaceToolApprovalFrameAndRespond(frame: ToolApprovalFrame | ApprovalRequestFrame, respond: RespondToolApprovalFn, streamArgs: unknown | undefined, signal?: AbortSignal, lane?: ToolApprovalFrameLaneOpts, run?: ToolApprovalFrameRunBits): Promise<ApprovalResolution>;
|
|
361
|
+
export declare function surfaceApprovalFrameWithId(frame: ToolApprovalFrame | ApprovalRequestFrame, approvalId: string, respond: RespondToolApprovalFn, streamArgs: Parameters<typeof surfaceToolApprovalFrameAndRespond>[2], signal: AbortSignal | undefined, lane: ToolApprovalFrameLaneOpts | undefined, run: ToolApprovalFrameRunBits | undefined): Promise<ApprovalResolution>;
|
|
340
362
|
export interface ApprovalHolderIdentity {
|
|
341
363
|
readonly approvalId?: string;
|
|
342
364
|
readonly taskId?: string;
|