@sema-agent/client-core 0.98.0 → 0.100.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 +376 -0
- package/README.md +61 -35
- package/dist/adapt/arms.js +120 -55
- package/dist/adapt/panelTasks.d.ts +3 -2
- package/dist/adapt/panelTasks.js +34 -11
- package/dist/adapt/textStream.d.ts +1 -1
- package/dist/adapt/textStream.js +51 -28
- package/dist/adapter/activeRunSelfHeal.d.ts +11 -3
- package/dist/adapter/activeRunSelfHeal.js +210 -294
- package/dist/adapter/downstream/eventToSdkMessage.d.ts +25 -6
- package/dist/adapter/downstream/eventToSdkMessage.js +176 -12
- package/dist/adapter/downstream/terminalToSdkResult.js +10 -0
- package/dist/adapter/downstream/wiringManifestView.d.ts +3 -1
- package/dist/adapter/downstream/wiringManifestView.js +1 -0
- package/dist/adapter/runStream.js +82 -40
- package/dist/adapter/types.d.ts +2 -0
- package/dist/adapter/types.js +2 -1
- package/dist/agentSession/engineSessionBackgroundStop.js +16 -8
- package/dist/agentsWireCaps.d.ts +7 -3
- package/dist/agentsWireCaps.js +133 -39
- package/dist/cloudConfigWireCaps.d.ts +10 -1
- package/dist/cloudConfigWireCaps.js +181 -65
- package/dist/compactionStatus.d.ts +34 -0
- package/dist/compactionStatus.js +196 -0
- package/dist/controlRouter.d.ts +4 -2
- package/dist/controlRouter.js +39 -51
- package/dist/coreValuePorts.d.ts +26 -1
- package/dist/coreValuePorts.js +10 -0
- package/dist/corruptSessionCopy.d.ts +2 -1
- package/dist/corruptSessionCopy.js +3 -3
- package/dist/decideFailureNote.js +3 -3
- package/dist/declared/supportFloorDeclared.js +1 -1
- package/dist/detachWire.js +3 -2
- package/dist/devicesFace.d.ts +34 -0
- package/dist/devicesFace.js +90 -0
- package/dist/displayUntrusted.d.ts +1 -0
- package/dist/displayUntrusted.js +153 -5
- package/dist/engineAgentPanelStore.d.ts +14 -4
- package/dist/engineAgentPanelStore.js +14 -0
- package/dist/engineCapReader.d.ts +2 -1
- package/dist/engineCapReader.js +7 -5
- package/dist/engineCapsCache.d.ts +8 -0
- package/dist/engineCapsCache.js +59 -6
- package/dist/engineCapsChange.d.ts +2 -0
- package/dist/engineCapsChange.js +9 -0
- package/dist/engineErrorCodes.d.ts +11 -2
- package/dist/engineErrorCodes.js +11 -12
- package/dist/engineRowRef.js +4 -0
- package/dist/engineSessionMessages.d.ts +1 -0
- package/dist/engineSessionMessages.js +7 -1
- package/dist/engineTargetSeat.d.ts +27 -0
- package/dist/engineTargetSeat.js +199 -0
- package/dist/engineToolDirectory.d.ts +3 -0
- package/dist/engineToolDirectory.js +4 -2
- package/dist/engineWireFor.js +3 -8
- package/dist/env/uiLanguage.d.ts +2 -1
- package/dist/env/uiLanguage.js +3 -2
- package/dist/eventLeg.d.ts +7 -5
- package/dist/eventLeg.js +68 -49
- package/dist/fileHistoryCaptureCapability.d.ts +2 -4
- package/dist/fileHistoryCaptureCapability.js +12 -22
- package/dist/fileHistoryLegNotice.d.ts +2 -1
- package/dist/fileHistoryLegNotice.js +3 -3
- package/dist/frameBinding.d.ts +3 -0
- package/dist/frameBinding.js +12 -0
- package/dist/gateOutcome.js +16 -2
- package/dist/gateVocabulary.d.ts +8 -7
- package/dist/gateVocabulary.js +71 -73
- package/dist/generated/engineFactTables.d.ts +18 -1
- package/dist/generated/engineFactTables.js +56 -0
- package/dist/generated/engineNoticeTables.js +12 -3
- package/dist/generated/settingsSchemaFns.d.ts +18 -0
- package/dist/generated/settingsSchemaFns.js +70 -0
- package/dist/generated/settingsSchemaHooksClassifier.d.ts +2 -0
- package/dist/generated/settingsSchemaHooksClassifier.js +254 -0
- package/dist/generated/settingsSchemaMcpRequestEntry.d.ts +1 -0
- package/dist/generated/settingsSchemaMcpRequestEntry.js +162 -0
- package/dist/generated/settingsSchemaTables.d.ts +2 -0
- package/dist/generated/settingsSchemaTables.js +9 -0
- package/dist/generated/settingsSchemaTypes.d.ts +133 -0
- package/dist/generated/settingsSchemaTypes.js +1 -0
- package/dist/hitl/allowRuleShadow.d.ts +2 -1
- package/dist/hitl/allowRuleShadow.js +18 -15
- package/dist/hitl/approvalCardReasons.d.ts +3 -2
- package/dist/hitl/approvalCardReasons.js +29 -30
- package/dist/hitl/approvalHolds.d.ts +17 -0
- package/dist/hitl/approvalHolds.js +114 -29
- package/dist/hitl/askClassPair.d.ts +2 -2
- package/dist/hitl/askClassPair.js +16 -0
- package/dist/hitl/askGateWire.js +2 -1
- package/dist/hitl/askSettlementLine.d.ts +14 -4
- package/dist/hitl/askSettlementLine.js +67 -47
- package/dist/hitl/attributionLadder.d.ts +23 -0
- package/dist/hitl/attributionLadder.js +67 -0
- package/dist/hitl/automaticAnswerVerdict.d.ts +2 -1
- package/dist/hitl/automaticAnswerVerdict.js +8 -8
- package/dist/hitl/crashConvergedNotice.d.ts +5 -4
- package/dist/hitl/crashConvergedNotice.js +28 -41
- package/dist/hitl/decisionLedger.d.ts +55 -0
- package/dist/hitl/decisionLedger.js +156 -0
- package/dist/hitl/decisionRefusal.d.ts +1 -0
- package/dist/hitl/decisionRefusal.js +1 -1
- package/dist/hitl/decisionSend.d.ts +113 -0
- package/dist/hitl/decisionSend.js +579 -0
- package/dist/hitl/frameRouter.js +7 -8
- package/dist/hitl/hitlBridge.d.ts +1 -0
- package/dist/hitl/hitlBridge.js +21 -9
- package/dist/hitl/persistedRulesWire.d.ts +6 -5
- package/dist/hitl/persistedRulesWire.js +55 -73
- package/dist/hitl/planReviewWire.d.ts +5 -0
- package/dist/hitl/planReviewWire.js +53 -76
- package/dist/hitl/sessionPolicyDeliverable.d.ts +2 -0
- package/dist/hitl/sessionPolicyDeliverable.js +49 -9
- package/dist/hitl/sessionPolicyWire.d.ts +2 -1
- package/dist/hitl/sessionPolicyWire.js +23 -24
- package/dist/hitl/suspendedReopen.d.ts +2 -1
- package/dist/hitl/suspendedReopen.js +7 -10
- package/dist/hitl/toolApprovalWire.d.ts +17 -5
- package/dist/hitl/toolApprovalWire.js +120 -147
- package/dist/hooksWireCaps.js +145 -56
- package/dist/host.d.ts +21 -0
- package/dist/hostTurnSettings.d.ts +110 -0
- package/dist/hostTurnSettings.js +692 -0
- package/dist/humanTurn.d.ts +15 -1
- package/dist/humanTurn.js +100 -12
- package/dist/humanTurnRead.d.ts +2 -0
- package/dist/humanTurnRead.js +22 -1
- package/dist/i18n/messages.en.d.ts +713 -0
- package/dist/i18n/messages.en.js +713 -0
- package/dist/i18n/messages.zh.js +854 -1
- package/dist/index.d.ts +45 -13
- package/dist/index.js +27 -9
- package/dist/inheritEnvCapability.d.ts +4 -2
- package/dist/inheritEnvCapability.js +12 -5
- package/dist/inheritEnvWire.d.ts +3 -2
- package/dist/inheritEnvWire.js +14 -16
- package/dist/injectionLaneNotice.d.ts +5 -0
- package/dist/injectionLaneNotice.js +46 -0
- package/dist/interactiveHalt.js +17 -6
- package/dist/liveModelCatalog.d.ts +2 -1
- package/dist/liveModelCatalog.js +14 -8
- package/dist/mcpPanel.d.ts +10 -1
- package/dist/mcpPanel.js +42 -13
- package/dist/mcpProbeCapability.d.ts +2 -1
- package/dist/mcpProbeCapability.js +7 -11
- package/dist/mcpProbeWire.d.ts +3 -1
- package/dist/mcpProbeWire.js +5 -0
- package/dist/mcpReconnect.js +2 -2
- package/dist/mcpToolToggles.d.ts +6 -0
- package/dist/mcpToolToggles.js +46 -0
- package/dist/mcpWireCaps.d.ts +43 -3
- package/dist/mcpWireCaps.js +194 -59
- package/dist/mcpWireTransport.d.ts +4 -0
- package/dist/mcpWireTransport.js +18 -0
- package/dist/memoryEntriesWire.js +5 -10
- package/dist/model/onboardJudgement.d.ts +93 -0
- package/dist/model/onboardJudgement.js +415 -0
- package/dist/model/tierVocabulary.d.ts +2 -0
- package/dist/model/tierVocabulary.js +17 -5
- package/dist/modelCapabilityProbe.d.ts +65 -0
- package/dist/modelCapabilityProbe.js +601 -0
- package/dist/modelIdentityResolvability.d.ts +5 -0
- package/dist/modelIdentityResolvability.js +49 -22
- package/dist/ownKey.d.ts +33 -0
- package/dist/ownKey.js +109 -0
- package/dist/panelReduce.d.ts +11 -1
- package/dist/panelReduce.js +95 -16
- package/dist/panelStateHolder.d.ts +1 -0
- package/dist/panelStateHolder.js +10 -1
- package/dist/permissionRuleIssue.d.ts +2 -1
- package/dist/permissionRuleIssue.js +23 -20
- package/dist/permissionRulesWriteCapability.d.ts +2 -1
- package/dist/permissionRulesWriteCapability.js +8 -6
- package/dist/pluginHooksWire.d.ts +46 -3
- package/dist/pluginHooksWire.js +220 -12
- package/dist/prepareRefusal.d.ts +8 -0
- package/dist/prepareRefusal.js +72 -0
- package/dist/printModelStatus.d.ts +63 -0
- package/dist/printModelStatus.js +155 -0
- package/dist/request/taskRequest.d.ts +16 -10
- package/dist/request/taskRequest.js +195 -58
- package/dist/resumeRefusalCopy.d.ts +14 -9
- package/dist/resumeRefusalCopy.js +89 -144
- package/dist/retryStatus.d.ts +55 -0
- package/dist/retryStatus.js +155 -19
- package/dist/ruleRefusalSentence.d.ts +4 -0
- package/dist/ruleRefusalSentence.js +58 -0
- package/dist/sandboxWire.d.ts +2 -1
- package/dist/sandboxWire.js +55 -21
- package/dist/scenarioRefusal.d.ts +10 -0
- package/dist/scenarioRefusal.js +111 -0
- package/dist/seam.d.ts +48 -9
- package/dist/seam.js +54 -5
- package/dist/seatContract.d.ts +272 -14
- package/dist/seatContract.js +711 -23
- package/dist/selfOrchestrationDenial.js +7 -19
- package/dist/sessionIdSegment.d.ts +6 -0
- package/dist/sessionIdSegment.js +24 -0
- package/dist/sessionMemoryStatus.js +6 -11
- package/dist/sessionPolicyCapability.d.ts +2 -1
- package/dist/sessionPolicyCapability.js +8 -6
- package/dist/settingsCredentialKeyPaths.d.ts +8 -0
- package/dist/settingsCredentialKeyPaths.js +219 -0
- package/dist/settingsHooksSalvage.d.ts +44 -0
- package/dist/settingsHooksSalvage.js +211 -0
- package/dist/skillToolListsCapability.d.ts +2 -1
- package/dist/skillToolListsCapability.js +8 -6
- package/dist/skillsWireCaps.d.ts +0 -3
- package/dist/skillsWireCaps.js +1 -2
- package/dist/sseIdleTriage.js +3 -2
- package/dist/subagent/engineSubagentResume.js +15 -9
- package/dist/subagentContentStore.d.ts +4 -0
- package/dist/subagentContentStore.js +157 -27
- package/dist/toolHistoryMismatch.js +3 -2
- package/dist/toolRoster.d.ts +3 -2
- package/dist/toolRoster.js +21 -20
- package/dist/toolsFlagNames.d.ts +8 -0
- package/dist/toolsFlagNames.js +110 -0
- package/dist/turnFailurePresentation.d.ts +12 -1
- package/dist/turnFailurePresentation.js +220 -15
- package/dist/usageAnalytics.js +6 -11
- package/dist/userAttachmentEnvelope.d.ts +1 -0
- package/dist/userAttachmentEnvelope.js +37 -7
- package/dist/userAttachmentSeat.d.ts +21 -0
- package/dist/userAttachmentSeat.js +75 -0
- package/dist/userInvokedSkillsCapability.d.ts +11 -1
- package/dist/userInvokedSkillsCapability.js +31 -7
- package/dist/wireErrorTriage.d.ts +7 -0
- package/dist/wireErrorTriage.js +23 -1
- package/dist/wireFailureShape.js +2 -1
- package/dist/wireRefusalCopy.d.ts +62 -16
- package/dist/wireRefusalCopy.js +307 -148
- package/dist/workflowsJournalCapability.d.ts +2 -1
- package/dist/workflowsJournalCapability.js +8 -6
- package/docs/INTEGRATION-CLIENTS.md +951 -42
- package/package.json +5 -5
|
@@ -35,18 +35,20 @@ export function engineToolDirectoryOf(source) {
|
|
|
35
35
|
const deployment = readHalf(ownDataField(source, 'deploymentMcpServers'));
|
|
36
36
|
if (request === 'unreadable' || deployment === 'unreadable')
|
|
37
37
|
return unreadable();
|
|
38
|
-
if (request === 'absent'
|
|
38
|
+
if (request === 'absent')
|
|
39
39
|
return notLanded();
|
|
40
40
|
const ns = namingPorts();
|
|
41
41
|
if (ns === undefined)
|
|
42
42
|
return unreadable();
|
|
43
43
|
const prefixes = [];
|
|
44
|
-
for (const name of [...request, ...deployment]) {
|
|
44
|
+
for (const name of deployment === 'absent' ? request : [...request, ...deployment]) {
|
|
45
45
|
const prefix = mintNamespacePrefix(ns, name);
|
|
46
46
|
if (typeof prefix !== 'string' || prefix.length === 0)
|
|
47
47
|
return unreadable();
|
|
48
48
|
prefixes.push(prefix);
|
|
49
49
|
}
|
|
50
|
+
if (deployment === 'absent')
|
|
51
|
+
return Object.freeze({ state: 'request_only', requestMcpServerPrefixes: frozenSet(prefixes) });
|
|
50
52
|
return Object.freeze({ state: 'directory', mcpServerPrefixes: frozenSet(prefixes) });
|
|
51
53
|
}
|
|
52
54
|
catch {
|
package/dist/engineWireFor.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { settleWithinDeadline } from './abortableSleep.js';
|
|
2
2
|
import { makeEngineWireClient } from './engineWireSdk.js';
|
|
3
3
|
import { engineWireTargetFor } from './engineWireTarget.js';
|
|
4
|
+
import { readThrownSlot } from './wireFailureShape.js';
|
|
4
5
|
export const INJECTED_WIRE_SETTLE_MS = 60_000;
|
|
5
6
|
export function engineWireFor(wire, sessionKey, usable) {
|
|
6
7
|
if (wire !== undefined) {
|
|
@@ -285,15 +286,9 @@ function abortedBeforeSendError() {
|
|
|
285
286
|
return e;
|
|
286
287
|
}
|
|
287
288
|
function answeredByEngine(e) {
|
|
288
|
-
|
|
289
|
-
if (e === null || typeof e !== 'object')
|
|
290
|
-
return false;
|
|
291
|
-
const o = e;
|
|
292
|
-
return typeof o.status === 'number' || typeof o.errorCode === 'string';
|
|
293
|
-
}
|
|
294
|
-
catch {
|
|
289
|
+
if (e === null || typeof e !== 'object')
|
|
295
290
|
return false;
|
|
296
|
-
|
|
291
|
+
return typeof readThrownSlot(e, 'status', 'data') === 'number' || typeof readThrownSlot(e, 'errorCode', 'data') === 'string';
|
|
297
292
|
}
|
|
298
293
|
const SETTLED_BY_PACKAGE_BRAND = Symbol.for('@sema-agent/client-core:engine-wire-settled');
|
|
299
294
|
function settledByPackage(value) {
|
package/dist/env/uiLanguage.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { SETTINGS_UI_LANGUAGE_VALUES } from '../generated/settingsSchemaTables.js';
|
|
2
|
+
export type UiLanguage = (typeof SETTINGS_UI_LANGUAGE_VALUES)[number];
|
|
2
3
|
export declare const UI_LANGUAGES: readonly UiLanguage[];
|
|
3
4
|
export declare const UI_LANGUAGE_ENDONYMS: Record<UiLanguage, string>;
|
|
4
5
|
export declare function isUiLanguage(v: unknown): v is UiLanguage;
|
package/dist/env/uiLanguage.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { parseLocaleTag } from './localeTag.js';
|
|
2
|
-
|
|
2
|
+
import { SETTINGS_UI_LANGUAGE_VALUES } from '../generated/settingsSchemaTables.js';
|
|
3
|
+
export const UI_LANGUAGES = SETTINGS_UI_LANGUAGE_VALUES;
|
|
3
4
|
export const UI_LANGUAGE_ENDONYMS = {
|
|
4
5
|
en: 'English',
|
|
5
6
|
zh: '中文',
|
|
6
7
|
};
|
|
7
8
|
export function isUiLanguage(v) {
|
|
8
|
-
return v === '
|
|
9
|
+
return typeof v === 'string' && UI_LANGUAGES.includes(v);
|
|
9
10
|
}
|
|
10
11
|
export function pickUiLanguage(localeTag) {
|
|
11
12
|
return parseLocaleTag(localeTag).language === 'zh' ? 'zh' : 'en';
|
package/dist/eventLeg.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { AgentEvent } from '@sema-agent/sdk';
|
|
|
2
2
|
import type { EngineBoundRun } from './engineRowRef.js';
|
|
3
3
|
import { type AskGateWireDeps } from './hitl/askGateWire.js';
|
|
4
4
|
import { type ActiveRunBusySignal } from './adapter/runStream.js';
|
|
5
|
+
import type { ApprovalRequestChromeEvent, ApprovalRevokeChromeEvent } from './seam.js';
|
|
5
6
|
export declare const EVENT_LEG_KINDS: readonly ["live", "durable", "continuation"];
|
|
6
7
|
export type EventLegKind = (typeof EVENT_LEG_KINDS)[number];
|
|
7
8
|
export type EventLegStage = 'bindRun' | 'stampOwner' | 'hitlFrames' | 'askBridge' | 'idleTriage';
|
|
@@ -64,11 +65,13 @@ export interface EventLegIdleTriagePorts {
|
|
|
64
65
|
readonly baseUrl: string;
|
|
65
66
|
}
|
|
66
67
|
export type EventLegTap = (frame: AgentEvent) => void;
|
|
67
|
-
export
|
|
68
|
-
export interface EventLegStreamContext {
|
|
68
|
+
export interface ApprovalFrameContext {
|
|
69
69
|
readonly leg: EventLegKind;
|
|
70
|
-
readonly
|
|
70
|
+
readonly windowIsCurrent: boolean;
|
|
71
|
+
readonly receivedAtMs: number;
|
|
72
|
+
readonly streamEnded: AbortSignal;
|
|
71
73
|
}
|
|
74
|
+
export declare function approvalFrameContextOf(arm: ApprovalRequestChromeEvent | ApprovalRevokeChromeEvent): ApprovalFrameContext | undefined;
|
|
72
75
|
export interface EventLegPorts {
|
|
73
76
|
readonly run?: EventLegRunPorts;
|
|
74
77
|
readonly owner?: EventLegOwnerPorts;
|
|
@@ -77,9 +80,8 @@ export interface EventLegPorts {
|
|
|
77
80
|
readonly idleTriage?: EventLegIdleTriagePorts;
|
|
78
81
|
readonly signal?: AbortSignal;
|
|
79
82
|
readonly taps?: readonly EventLegTap[];
|
|
80
|
-
readonly perStream?: readonly EventLegStreamDecorator[];
|
|
81
83
|
}
|
|
82
|
-
export type EventLegPortName = 'run.headerRunId' | 'run.onBound' | 'run.onRefused' | 'run.onTerminal' | 'run.isCurrent' | 'hitl.question' | 'hitl.elicitation' | 'hitl.toolApproval' | 'askBridge.respondToolApproval' | 'taps'
|
|
84
|
+
export type EventLegPortName = 'run.headerRunId' | 'run.onBound' | 'run.onRefused' | 'run.onTerminal' | 'run.isCurrent' | 'hitl.question' | 'hitl.elicitation' | 'hitl.toolApproval' | 'askBridge.respondToolApproval' | 'taps';
|
|
83
85
|
export interface EventLegReport {
|
|
84
86
|
readonly missingPorts: readonly EventLegPortName[];
|
|
85
87
|
readonly portFaults: Readonly<Partial<Record<EventLegPortName, number>>>;
|
package/dist/eventLeg.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { frameBindingOf, registerFrameBinding } from './frameBinding.js';
|
|
1
|
+
import { approvalFrameContextOfFrame, frameBindingOf, registerApprovalFrameContext, registerFrameBinding } from './frameBinding.js';
|
|
2
2
|
import { bridgeAskUserQuestionGates } from './hitl/askGateWire.js';
|
|
3
3
|
import { diagnoseSseIdleTear } from './sseIdleTriage.js';
|
|
4
4
|
import { recordSubagentOwnerFromProgress } from './subagentContentStore.js';
|
|
@@ -6,6 +6,8 @@ import { activeRunBusySignal } from './adapter/runStream.js';
|
|
|
6
6
|
import { invokeHostCallbackIsolated } from './hostCallbackGuard.js';
|
|
7
7
|
import { hostLog } from './host.js';
|
|
8
8
|
import { guardedRead, readOwnDataNonEmptyString, readOwnDataValue } from './ownKey.js';
|
|
9
|
+
import { settleEngineClosedApproval } from './hitl/approvalHolds.js';
|
|
10
|
+
import { approvalCompleteParked } from './hitl/approvalCompleteParked.js';
|
|
9
11
|
export const EVENT_LEG_KINDS = Object.freeze(['live', 'durable', 'continuation']);
|
|
10
12
|
export const EVENT_LEG_TABLE = Object.freeze({
|
|
11
13
|
live: Object.freeze({ stages: Object.freeze(['bindRun', 'stampOwner', 'hitlFrames', 'askBridge', 'idleTriage']), windowIsCurrent: true }),
|
|
@@ -18,8 +20,14 @@ function makeFrameStageDomains(domains) {
|
|
|
18
20
|
const FRAME_STAGE_DOMAINS = makeFrameStageDomains({
|
|
19
21
|
bindRun: Object.freeze(['meta', 'done', 'failed']),
|
|
20
22
|
stampOwner: Object.freeze(['task_progress']),
|
|
21
|
-
hitlFrames: Object.freeze(['question', 'question_complete', 'elicitation', 'elicitation_complete', 'tool_approval', 'tool_approval_complete']),
|
|
23
|
+
hitlFrames: Object.freeze(['question', 'question_complete', 'elicitation', 'elicitation_complete', 'tool_approval', 'tool_approval_complete', 'approval_request', 'approval_revoke']),
|
|
22
24
|
});
|
|
25
|
+
const HITL_FRAMES_PROJECTED = Object.freeze(['human_input']);
|
|
26
|
+
const _hitlFrameTypesPin = [true, true];
|
|
27
|
+
const _hitlProjectedDisjointPin = true;
|
|
28
|
+
void _hitlFrameTypesPin;
|
|
29
|
+
void _hitlProjectedDisjointPin;
|
|
30
|
+
void HITL_FRAMES_PROJECTED;
|
|
23
31
|
const HITL_PORT_OF = Object.freeze({
|
|
24
32
|
question: 'question',
|
|
25
33
|
question_complete: 'question',
|
|
@@ -27,8 +35,14 @@ const HITL_PORT_OF = Object.freeze({
|
|
|
27
35
|
elicitation_complete: 'elicitation',
|
|
28
36
|
tool_approval: 'toolApproval',
|
|
29
37
|
tool_approval_complete: 'toolApproval',
|
|
38
|
+
approval_request: 'register',
|
|
39
|
+
approval_revoke: 'register',
|
|
30
40
|
});
|
|
31
41
|
const inDomain = (stage, frameType) => FRAME_STAGE_DOMAINS[stage].includes(frameType);
|
|
42
|
+
export function approvalFrameContextOf(arm) {
|
|
43
|
+
const frame = guardedRead(() => readOwnDataValue(arm, 'frame'));
|
|
44
|
+
return typeof frame === 'object' && frame !== null ? approvalFrameContextOfFrame(frame) : undefined;
|
|
45
|
+
}
|
|
32
46
|
const HOST_PORT_MISSING = 'host_port_missing';
|
|
33
47
|
export function composeEventLeg(source, leg, ports) {
|
|
34
48
|
const kind = leg.kind;
|
|
@@ -122,7 +136,6 @@ export function composeEventLeg(source, leg, ports) {
|
|
|
122
136
|
};
|
|
123
137
|
const sessionKey = typeof ports.owner?.sessionKey === 'string' && ports.owner.sessionKey !== '' ? ports.owner.sessionKey : undefined;
|
|
124
138
|
const taps = (ports.taps ?? []).filter((t) => typeof t === 'function');
|
|
125
|
-
const decorators = (ports.perStream ?? []).filter((d) => typeof d === 'function');
|
|
126
139
|
const info = Object.freeze({ leg: kind });
|
|
127
140
|
const runSessions = new Map();
|
|
128
141
|
let lastBound;
|
|
@@ -136,12 +149,18 @@ export function composeEventLeg(source, leg, ports) {
|
|
|
136
149
|
const boundInfo = Object.freeze({ cause, leg: kind });
|
|
137
150
|
callPort('run.onBound', () => runPorts.onBound?.(binding, boundInfo));
|
|
138
151
|
};
|
|
139
|
-
const deliverHitl = (ev, env) => {
|
|
152
|
+
const deliverHitl = (ev, env, streamEnded) => {
|
|
140
153
|
if (!inDomain('hitlFrames', ev.type))
|
|
141
154
|
return false;
|
|
142
155
|
const port = HITL_PORT_OF[ev.type];
|
|
156
|
+
if (port === 'register') {
|
|
157
|
+
registerApprovalFrameContext(ev, Object.freeze({ leg: env.leg, windowIsCurrent: env.windowIsCurrent, receivedAtMs: Date.now(), streamEnded }));
|
|
158
|
+
return false;
|
|
159
|
+
}
|
|
143
160
|
if (port === 'toolApproval' && hostBridge !== undefined)
|
|
144
161
|
return false;
|
|
162
|
+
if (ev.type === 'tool_approval_complete')
|
|
163
|
+
settleEngineClosedApproval(ev, approvalCompleteParked(ev));
|
|
145
164
|
const threw = callPort(`hitl.${port}`, () => hitl?.[port]?.call(hitl, ev, env));
|
|
146
165
|
if (threw)
|
|
147
166
|
hitlUndelivered++;
|
|
@@ -153,58 +172,58 @@ export function composeEventLeg(source, leg, ports) {
|
|
|
153
172
|
let binding;
|
|
154
173
|
let runEvidence = false;
|
|
155
174
|
const env = Object.freeze({ windowIsCurrent: EVENT_LEG_TABLE[streamKind].windowIsCurrent, leg: streamKind });
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
+
const ended = new AbortController();
|
|
176
|
+
try {
|
|
177
|
+
for await (const ev of stream) {
|
|
178
|
+
if (taskId === undefined && streamKind === 'live')
|
|
179
|
+
taskId = readHeaderRunId();
|
|
180
|
+
const refusal = streamKind === 'live' && !runEvidence && inDomain('bindRun', ev.type) ? refusalOf(ev, taskId) : undefined;
|
|
181
|
+
if (!inDomain('bindRun', ev.type))
|
|
182
|
+
runEvidence = true;
|
|
183
|
+
if (refusal !== undefined) {
|
|
184
|
+
if (runPorts !== undefined && typeof runPorts.onRefused === 'function' && isCurrentNow())
|
|
185
|
+
callPort('run.onRefused', () => runPorts.onRefused?.(refusal, info));
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
if (ev.type === 'meta' || ev.type === 'done') {
|
|
189
|
+
const carrier = ev.type === 'meta' ? ev : ev.result;
|
|
190
|
+
const tid = typeof carrier === 'object' && carrier !== null ? guardedRead(() => readOwnDataNonEmptyString(carrier, 'taskId')) : undefined;
|
|
191
|
+
const sid = typeof carrier === 'object' && carrier !== null ? guardedRead(() => readOwnDataNonEmptyString(carrier, 'sessionId')) : undefined;
|
|
192
|
+
const runId = ev.type === 'done' && tid !== undefined && tid === sid ? undefined : tid;
|
|
193
|
+
if (streamKind === 'live' && runId !== undefined && runId !== taskId) {
|
|
194
|
+
taskId = runId;
|
|
195
|
+
sessionId = sid;
|
|
196
|
+
}
|
|
197
|
+
else if (sid !== undefined && taskId !== undefined && (runId === undefined || runId === taskId)) {
|
|
198
|
+
sessionId = sid;
|
|
199
|
+
}
|
|
175
200
|
}
|
|
176
|
-
|
|
177
|
-
sessionId
|
|
201
|
+
if (taskId !== undefined) {
|
|
202
|
+
if (binding === undefined || binding.taskId !== taskId || binding.sessionId !== sessionId) {
|
|
203
|
+
binding = Object.freeze({ taskId, ...(sessionId !== undefined ? { sessionId } : {}) });
|
|
204
|
+
}
|
|
205
|
+
if (sessionId !== undefined)
|
|
206
|
+
runSessions.set(taskId, sessionId);
|
|
207
|
+
registerFrameBinding(ev, binding);
|
|
208
|
+
noteBound(binding);
|
|
178
209
|
}
|
|
179
210
|
}
|
|
180
|
-
if (
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}
|
|
184
|
-
if (sessionId !== undefined)
|
|
185
|
-
runSessions.set(taskId, sessionId);
|
|
186
|
-
registerFrameBinding(ev, binding);
|
|
187
|
-
noteBound(binding);
|
|
211
|
+
if (inDomain('stampOwner', ev.type)) {
|
|
212
|
+
const b = frameBindingOf(ev);
|
|
213
|
+
recordSubagentOwnerFromProgress(ev, b?.taskId, b?.sessionId, sessionKey);
|
|
188
214
|
}
|
|
215
|
+
if (deliverHitl(ev, env, ended.signal))
|
|
216
|
+
continue;
|
|
217
|
+
for (const tap of taps)
|
|
218
|
+
callPort('taps', () => tap(ev));
|
|
219
|
+
yield ev;
|
|
189
220
|
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
}
|
|
194
|
-
if (deliverHitl(ev, env))
|
|
195
|
-
continue;
|
|
196
|
-
for (const tap of taps)
|
|
197
|
-
callPort('taps', () => tap(ev));
|
|
198
|
-
yield ev;
|
|
221
|
+
}
|
|
222
|
+
finally {
|
|
223
|
+
ended.abort();
|
|
199
224
|
}
|
|
200
225
|
}
|
|
201
|
-
const streamOf = (raw, streamKind, streamRunId) =>
|
|
202
|
-
let s = generatorOf(raw);
|
|
203
|
-
const ctx = Object.freeze({ leg: streamKind, runId: streamRunId });
|
|
204
|
-
for (const d of decorators)
|
|
205
|
-
s = d(s, ctx);
|
|
206
|
-
return frameLevel(s, streamKind, streamRunId);
|
|
207
|
-
};
|
|
226
|
+
const streamOf = (raw, streamKind, streamRunId) => frameLevel(generatorOf(raw), streamKind, streamRunId);
|
|
208
227
|
let inner = streamOf(source, kind, legRunId);
|
|
209
228
|
if (hostBridge !== undefined) {
|
|
210
229
|
let windowOpen = row.windowIsCurrent;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { UiLanguage } from './env/uiLanguage.js';
|
|
1
2
|
export type FileHistoryCaptureReading = {
|
|
2
3
|
kind: 'unobserved';
|
|
3
4
|
} | {
|
|
@@ -12,13 +13,10 @@ export type FileHistoryCaptureMode = 'off' | 'on-optional' | 'unknown';
|
|
|
12
13
|
export declare function projectFileHistoryCaptureCapability(caps: unknown): FileHistoryCaptureReading | undefined;
|
|
13
14
|
export declare function observedFileHistoryCapture(baseUrl?: string | undefined): FileHistoryCaptureReading;
|
|
14
15
|
export declare function fileHistoryCaptureMode(reading: FileHistoryCaptureReading): FileHistoryCaptureMode;
|
|
15
|
-
export declare function fileHistoryDeclarationField(reading: FileHistoryCaptureReading, captureOff: boolean): {
|
|
16
|
-
fileHistory: 'disabled';
|
|
17
|
-
} | Record<string, never>;
|
|
18
16
|
export declare const FILE_HISTORY_TIGHTEN_VERDICTS: readonly ["not_requested", "declare", "already_off", "unjudged"];
|
|
19
17
|
export type FileHistoryTightenVerdict = (typeof FILE_HISTORY_TIGHTEN_VERDICTS)[number];
|
|
20
18
|
export declare function fileHistoryTightenVerdict(reading: FileHistoryCaptureReading, captureOffByUser: boolean): FileHistoryTightenVerdict;
|
|
21
|
-
export declare function fileHistoryUnjudgedRefusal(reading: FileHistoryCaptureReading, captureOffByUser: boolean): string | undefined;
|
|
19
|
+
export declare function fileHistoryUnjudgedRefusal(reading: FileHistoryCaptureReading, captureOffByUser: boolean, lang?: UiLanguage): string | undefined;
|
|
22
20
|
export interface FileHistoryTightenJudgement {
|
|
23
21
|
readonly verdict: FileHistoryTightenVerdict;
|
|
24
22
|
readonly reading: FileHistoryCaptureReading;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { msg, renderMessage } from './i18n/translate.js';
|
|
1
2
|
import { capForDisplay } from './fleetTaskDesc.js';
|
|
2
3
|
import { engineWireTarget } from './engineWireTarget.js';
|
|
3
4
|
import { createEngineCapReader, unreadableReadingDetail } from './engineCapReader.js';
|
|
4
5
|
import { refreshEngineCapsOnce } from './engineCapsCache.js';
|
|
5
6
|
import { ownDataField } from './ownKey.js';
|
|
6
|
-
import { FILE_HISTORY_DISABLED } from './request/taskRequest.js';
|
|
7
7
|
export function projectFileHistoryCaptureCapability(caps) {
|
|
8
8
|
try {
|
|
9
9
|
if (caps === null || typeof caps !== 'object' || Array.isArray(caps))
|
|
@@ -46,9 +46,6 @@ export function fileHistoryCaptureMode(reading) {
|
|
|
46
46
|
return 'on-optional';
|
|
47
47
|
return 'unknown';
|
|
48
48
|
}
|
|
49
|
-
export function fileHistoryDeclarationField(reading, captureOff) {
|
|
50
|
-
return captureOff === true && fileHistoryCaptureMode(reading) === 'on-optional' ? { fileHistory: FILE_HISTORY_DISABLED } : {};
|
|
51
|
-
}
|
|
52
49
|
export const FILE_HISTORY_TIGHTEN_VERDICTS = Object.freeze(['not_requested', 'declare', 'already_off', 'unjudged']);
|
|
53
50
|
export function fileHistoryTightenVerdict(reading, captureOffByUser) {
|
|
54
51
|
if (captureOffByUser !== true)
|
|
@@ -60,21 +57,11 @@ export function fileHistoryTightenVerdict(reading, captureOffByUser) {
|
|
|
60
57
|
return 'already_off';
|
|
61
58
|
return 'unjudged';
|
|
62
59
|
}
|
|
63
|
-
const FILE_HISTORY_REFUSAL_NOT_YET =
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
'while this engine reports the same; to send and let file history be recorded this time, turn file checkpointing back on in your settings.';
|
|
69
|
-
const FILE_HISTORY_REFUSAL_UNRECOGNIZED = 'Nothing was sent: file checkpointing is turned off in your settings, but this engine reported a file-history capture mode ' +
|
|
70
|
-
'this client does not recognize, so whether it can stop recording file history for a session is unknown and sending now could ' +
|
|
71
|
-
'record it anyway. Trying again will not change that while this engine reports the same; to send and let file history be ' +
|
|
72
|
-
'recorded this time, turn file checkpointing back on in your settings.';
|
|
73
|
-
const FILE_HISTORY_REFUSAL_UNREADABLE = "Nothing was sent: file checkpointing is turned off in your settings, but this engine's report on whether it can stop " +
|
|
74
|
-
'recording file history for a session could not be read by this client, so sending now could record it anyway. Trying ' +
|
|
75
|
-
'again will not change that while this engine reports the same; to send and let file history be recorded this time, ' +
|
|
76
|
-
'turn file checkpointing back on in your settings.';
|
|
77
|
-
function unjudgedRefusalOf(reading) {
|
|
60
|
+
const FILE_HISTORY_REFUSAL_NOT_YET = 'session.fileHistoryRefusal.notYet';
|
|
61
|
+
const FILE_HISTORY_REFUSAL_NOT_SAID = 'session.fileHistoryRefusal.notSaid';
|
|
62
|
+
const FILE_HISTORY_REFUSAL_UNRECOGNIZED = 'session.fileHistoryRefusal.unrecognized';
|
|
63
|
+
const FILE_HISTORY_REFUSAL_UNREADABLE = 'session.fileHistoryRefusal.unreadable';
|
|
64
|
+
function unjudgedRefusalKeyOf(reading) {
|
|
78
65
|
let kind;
|
|
79
66
|
let word;
|
|
80
67
|
try {
|
|
@@ -92,8 +79,11 @@ function unjudgedRefusalOf(reading) {
|
|
|
92
79
|
return FILE_HISTORY_REFUSAL_UNRECOGNIZED;
|
|
93
80
|
return FILE_HISTORY_REFUSAL_NOT_YET;
|
|
94
81
|
}
|
|
95
|
-
|
|
96
|
-
return
|
|
82
|
+
function unjudgedRefusalOf(reading, lang) {
|
|
83
|
+
return renderMessage(msg(unjudgedRefusalKeyOf(reading)), lang);
|
|
84
|
+
}
|
|
85
|
+
export function fileHistoryUnjudgedRefusal(reading, captureOffByUser, lang) {
|
|
86
|
+
return fileHistoryTightenVerdict(reading, captureOffByUser) === 'unjudged' ? unjudgedRefusalOf(reading, lang) : undefined;
|
|
97
87
|
}
|
|
98
88
|
const FILE_HISTORY_REFRESH_WITHIN_MS = 3000;
|
|
99
89
|
export async function judgeFileHistoryTighten(captureOffByUser, opts) {
|
|
@@ -101,7 +91,7 @@ export async function judgeFileHistoryTighten(captureOffByUser, opts) {
|
|
|
101
91
|
const failClosed = () => {
|
|
102
92
|
const reading = { kind: 'unobserved' };
|
|
103
93
|
return closed
|
|
104
|
-
? { verdict: 'unjudged', reading, refreshed: false, refusal: FILE_HISTORY_REFUSAL_NOT_YET }
|
|
94
|
+
? { verdict: 'unjudged', reading, refreshed: false, refusal: renderMessage(msg(FILE_HISTORY_REFUSAL_NOT_YET)) }
|
|
105
95
|
: { verdict: 'not_requested', reading, refreshed: false, refusal: undefined };
|
|
106
96
|
};
|
|
107
97
|
try {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AgentEvent } from '@sema-agent/sdk';
|
|
2
|
+
import type { UiLanguage } from './env/uiLanguage.js';
|
|
2
3
|
import { type FileHistoryCaptureReading } from './fileHistoryCaptureCapability.js';
|
|
3
4
|
export type FileHistoryDeclarationFact = 'sent' | 'not_sent' | 'unknown';
|
|
4
5
|
export declare const FILE_HISTORY_LEG_VERDICTS: readonly ["not_honored", "honored", "not_declared", "unknown"];
|
|
@@ -10,7 +11,7 @@ export interface FileHistoryLegNoticeInput {
|
|
|
10
11
|
readonly legWord: string | undefined;
|
|
11
12
|
}
|
|
12
13
|
export declare function fileHistoryLegNoticeVerdict(input: FileHistoryLegNoticeInput): FileHistoryLegNoticeVerdict;
|
|
13
|
-
export declare function fileHistoryLegNoticeSentence(verdict: FileHistoryLegNoticeVerdict): string | null;
|
|
14
|
+
export declare function fileHistoryLegNoticeSentence(verdict: FileHistoryLegNoticeVerdict, lang?: UiLanguage): string | null;
|
|
14
15
|
export declare function fileHistoryDeclarationOfBody(body: object | null | undefined): FileHistoryDeclarationFact;
|
|
15
16
|
export type OutboundBodyField = {
|
|
16
17
|
kind: 'absent';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { fileHistoryCaptureMode } from './fileHistoryCaptureCapability.js';
|
|
2
|
+
import { msg, renderMessage } from './i18n/translate.js';
|
|
2
3
|
import { frameProvesDelivery } from './promptDelivery.js';
|
|
3
4
|
import { FILE_HISTORY_DISABLED } from './request/taskRequest.js';
|
|
4
5
|
export const FILE_HISTORY_LEG_VERDICTS = Object.freeze(['not_honored', 'honored', 'not_declared', 'unknown']);
|
|
@@ -35,10 +36,9 @@ export function fileHistoryLegNoticeVerdict(input) {
|
|
|
35
36
|
return 'not_declared';
|
|
36
37
|
return 'unknown';
|
|
37
38
|
}
|
|
38
|
-
|
|
39
|
-
export function fileHistoryLegNoticeSentence(verdict) {
|
|
39
|
+
export function fileHistoryLegNoticeSentence(verdict, lang) {
|
|
40
40
|
if (verdict === 'not_honored')
|
|
41
|
-
return
|
|
41
|
+
return renderMessage(msg('session.fileHistoryLeg.notHonored'), lang);
|
|
42
42
|
return null;
|
|
43
43
|
}
|
|
44
44
|
export function fileHistoryDeclarationOfBody(body) {
|
package/dist/frameBinding.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { AgentEvent } from '@sema-agent/sdk';
|
|
2
2
|
import type { EngineBoundRun } from './engineRowRef.js';
|
|
3
|
+
import type { ApprovalFrameContext } from './eventLeg.js';
|
|
4
|
+
export declare function registerApprovalFrameContext(frame: AgentEvent, ctx: ApprovalFrameContext): void;
|
|
5
|
+
export declare function approvalFrameContextOfFrame(frame: object | null | undefined): ApprovalFrameContext | undefined;
|
|
3
6
|
export declare function registerFrameBinding(frame: AgentEvent, binding: EngineBoundRun): void;
|
|
4
7
|
export declare function frameBindingOf(frame: AgentEvent): EngineBoundRun | undefined;
|
|
5
8
|
export declare function inheritFrameBinding<T extends AgentEvent>(from: AgentEvent, to: T): T;
|
package/dist/frameBinding.js
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
const frameBindings = new WeakMap();
|
|
2
|
+
const approvalFrameContexts = new WeakMap();
|
|
3
|
+
export function registerApprovalFrameContext(frame, ctx) {
|
|
4
|
+
if (typeof frame !== 'object' || frame === null || approvalFrameContexts.has(frame))
|
|
5
|
+
return;
|
|
6
|
+
approvalFrameContexts.set(frame, ctx);
|
|
7
|
+
}
|
|
8
|
+
export function approvalFrameContextOfFrame(frame) {
|
|
9
|
+
return typeof frame === 'object' && frame !== null ? approvalFrameContexts.get(frame) : undefined;
|
|
10
|
+
}
|
|
2
11
|
export function registerFrameBinding(frame, binding) {
|
|
3
12
|
if (typeof frame !== 'object' || frame === null)
|
|
4
13
|
return;
|
|
@@ -19,5 +28,8 @@ export function inheritFrameBinding(from, to) {
|
|
|
19
28
|
const binding = frameBindings.get(from);
|
|
20
29
|
if (binding !== undefined && !frameBindings.has(to))
|
|
21
30
|
frameBindings.set(to, binding);
|
|
31
|
+
const ctx = approvalFrameContexts.get(from);
|
|
32
|
+
if (ctx !== undefined && !approvalFrameContexts.has(to))
|
|
33
|
+
approvalFrameContexts.set(to, ctx);
|
|
22
34
|
return to;
|
|
23
35
|
}
|
package/dist/gateOutcome.js
CHANGED
|
@@ -237,9 +237,23 @@ export function gateOutcomeOf(frame) {
|
|
|
237
237
|
return readGateRecord(frame)?.view;
|
|
238
238
|
}
|
|
239
239
|
export function isGateParkedToolEnd(frame) {
|
|
240
|
-
if (typeof frame !== 'object' || frame === null
|
|
240
|
+
if (typeof frame !== 'object' || frame === null)
|
|
241
|
+
return false;
|
|
242
|
+
try {
|
|
243
|
+
if (Array.isArray(frame))
|
|
244
|
+
return false;
|
|
245
|
+
if (readOwnDataValue(frame, 'errorCode') === GATE_PARKED_ERROR_CODE)
|
|
246
|
+
return true;
|
|
247
|
+
if (readOwnDataValue(frame, 'role') !== 'toolResult')
|
|
248
|
+
return false;
|
|
249
|
+
const details = readOwnDataValue(frame, 'details');
|
|
250
|
+
if (typeof details !== 'object' || details === null || Array.isArray(details))
|
|
251
|
+
return false;
|
|
252
|
+
return readOwnDataValue(details, 'code') === GATE_PARKED_ERROR_CODE;
|
|
253
|
+
}
|
|
254
|
+
catch {
|
|
241
255
|
return false;
|
|
242
|
-
|
|
256
|
+
}
|
|
243
257
|
}
|
|
244
258
|
export function gateModeRelease(g) {
|
|
245
259
|
return g?.disposition.kind === 'allowed' ? g.disposition.released : undefined;
|
package/dist/gateVocabulary.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CORE_DENIED_BY_VALUES, CORE_PERSISTED_RULE_MANDATES } from './generated/engineFactTables.js';
|
|
2
|
+
import type { UiLanguage } from './env/uiLanguage.js';
|
|
2
3
|
export declare const CC_TOOL_DENIAL_KINDS: readonly ["user-rejected", "permission-rule", "automode-blocked", "automode-unavailable", "automode-parsing-error", "interrupted", "cancelled"];
|
|
3
4
|
export type CcToolDenialKind = (typeof CC_TOOL_DENIAL_KINDS)[number];
|
|
4
5
|
export declare function isCcToolDenialKind(v: unknown): v is CcToolDenialKind;
|
|
@@ -7,15 +8,15 @@ export declare function ccToolDenialKindForSettledBy(settledBy: unknown): CcTool
|
|
|
7
8
|
export type GateDeniedByWord = (typeof CORE_DENIED_BY_VALUES)[number];
|
|
8
9
|
export declare const GATE_DENIED_BY_WORDS: readonly GateDeniedByWord[];
|
|
9
10
|
export declare function isGateDeniedByWord(v: unknown): v is GateDeniedByWord;
|
|
10
|
-
export declare function gateDeniedByDetail(deniedBy: unknown): string;
|
|
11
|
-
export declare function askOriginDetail(origin: unknown): string;
|
|
12
|
-
export declare function askOriginNoteOf(origin: string | undefined): string | undefined;
|
|
11
|
+
export declare function gateDeniedByDetail(deniedBy: unknown, lang?: UiLanguage): string;
|
|
12
|
+
export declare function askOriginDetail(origin: unknown, lang?: UiLanguage): string;
|
|
13
|
+
export declare function askOriginNoteOf(origin: string | undefined, lang?: UiLanguage): string | undefined;
|
|
13
14
|
export declare function ruleOffersAbsenceDetail(reason: string | undefined, opts?: {
|
|
14
15
|
readonly deploymentListSessionRow?: boolean;
|
|
15
|
-
}): string | undefined;
|
|
16
|
-
export declare function ruleOfferUncoveredDetail(reason: string | undefined): string;
|
|
17
|
-
export declare function mandatedApprovalDetail(): string;
|
|
16
|
+
}, lang?: UiLanguage): string | undefined;
|
|
17
|
+
export declare function ruleOfferUncoveredDetail(reason: string | undefined, lang?: UiLanguage): string;
|
|
18
|
+
export declare function mandatedApprovalDetail(lang?: UiLanguage): string;
|
|
18
19
|
export declare const APPROVAL_MANDATE_WORDS: readonly (typeof CORE_PERSISTED_RULE_MANDATES)[number][];
|
|
19
20
|
export type ApprovalMandateWord = (typeof APPROVAL_MANDATE_WORDS)[number];
|
|
20
21
|
export declare function isApprovalMandateWord(v: unknown): v is ApprovalMandateWord;
|
|
21
|
-
export declare function approvalMandateDetail(word: ApprovalMandateWord): string;
|
|
22
|
+
export declare function approvalMandateDetail(word: ApprovalMandateWord, lang?: UiLanguage): string;
|