@sema-agent/client-core 0.93.0 → 0.94.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 +261 -0
- package/README.md +31 -18
- package/dist/adapt/arms.js +8 -5
- package/dist/adapter/downstream/terminalToSdkResult.js +2 -3
- package/dist/agentSession/engineSessionBackgroundStop.js +2 -1
- package/dist/agentsWireCaps.d.ts +15 -0
- package/dist/agentsWireCaps.js +111 -1
- package/dist/approvalReachWire.d.ts +18 -0
- package/dist/approvalReachWire.js +58 -0
- package/dist/approvalsStreamLiveCapability.js +16 -11
- package/dist/callerCwdCapability.d.ts +16 -0
- package/dist/callerCwdCapability.js +47 -0
- package/dist/controlRouter.js +3 -10
- package/dist/coreValuePorts.d.ts +64 -1
- package/dist/coreValuePorts.js +30 -0
- package/dist/detachWire.d.ts +1 -4
- package/dist/detachWire.js +1 -1
- package/dist/deviceExecutorManagementCapability.js +39 -34
- package/dist/deviceFlowPolling.d.ts +5 -0
- package/dist/deviceFlowPolling.js +28 -0
- package/dist/displayUntrusted.js +652 -21
- package/dist/engineErrorCodes.d.ts +5 -1
- package/dist/engineErrorCodes.js +9 -12
- package/dist/engineNoticeCodes.d.ts +22 -2
- package/dist/engineNoticeCodes.js +73 -6
- package/dist/engineRefusedToolName.d.ts +1 -0
- package/dist/engineRefusedToolName.js +8 -0
- package/dist/executionLaneCapability.js +14 -9
- package/dist/fileHistoryCaptureCapability.js +14 -9
- package/dist/fileHistoryLegNotice.d.ts +11 -0
- package/dist/fileHistoryLegNotice.js +50 -13
- package/dist/fleet/fleetLedger.js +5 -0
- package/dist/gateOutcome.d.ts +2 -1
- package/dist/gateOutcome.js +3 -0
- package/dist/gateVocabulary.js +1 -1
- package/dist/generated/engineAskFaceTables.d.ts +3 -0
- package/dist/generated/engineAskFaceTables.js +12 -0
- package/dist/generated/engineFactTables.d.ts +4 -2
- package/dist/generated/engineFactTables.js +13 -0
- package/dist/generated/engineNoticeTables.d.ts +5 -0
- package/dist/generated/engineNoticeTables.js +7 -0
- package/dist/generated/sdkFactTables.d.ts +3 -0
- package/dist/generated/sdkFactTables.js +17 -0
- package/dist/generated/settingsSchemaTables.d.ts +3 -0
- package/dist/generated/settingsSchemaTables.js +3 -0
- package/dist/headlessPermissionModeWire.d.ts +2 -2
- package/dist/headlessPermissionModeWire.js +11 -21
- package/dist/hitl/approvalHolds.d.ts +36 -0
- package/dist/hitl/approvalHolds.js +89 -0
- package/dist/hitl/approvalOutcomeNote.js +2 -1
- package/dist/hitl/approvalResolution.d.ts +3 -2
- package/dist/hitl/approvalResolution.js +21 -0
- package/dist/hitl/approvalsFeed.js +5 -0
- package/dist/hitl/askGateWire.js +3 -0
- package/dist/hitl/automaticAnswerVerdict.d.ts +8 -2
- package/dist/hitl/automaticAnswerVerdict.js +69 -21
- package/dist/hitl/decisionRefusal.d.ts +19 -0
- package/dist/hitl/decisionRefusal.js +63 -0
- package/dist/hitl/frameRouter.d.ts +10 -0
- package/dist/hitl/frameRouter.js +59 -3
- package/dist/hitl/gateLedger.d.ts +3 -0
- package/dist/hitl/gateLedger.js +17 -0
- package/dist/hitl/hitlBridge.d.ts +2 -2
- package/dist/hitl/hitlBridge.js +8 -10
- package/dist/hitl/hitlHostSurface.d.ts +6 -0
- package/dist/hitl/hitlHostSurface.js +25 -4
- package/dist/hitl/localAllowRule.js +2 -1
- package/dist/hitl/noAllowCause.d.ts +9 -0
- package/dist/hitl/noAllowCause.js +26 -0
- package/dist/hitl/parkResolver.js +6 -3
- package/dist/hitl/parkRowBirthWait.js +2 -1
- package/dist/hitl/persistedRulesWire.d.ts +6 -1
- package/dist/hitl/persistedRulesWire.js +12 -4
- package/dist/hitl/planReviewWire.d.ts +0 -1
- package/dist/hitl/planReviewWire.js +30 -9
- package/dist/hitl/sessionPolicyDeliverable.d.ts +1 -1
- package/dist/hitl/sessionPolicyDeliverable.js +3 -8
- package/dist/hitl/sessionPolicyWire.js +1 -1
- package/dist/hitl/toolApprovalWire.d.ts +37 -2
- package/dist/hitl/toolApprovalWire.js +392 -13
- package/dist/humanTurnRead.d.ts +15 -1
- package/dist/humanTurnRead.js +28 -2
- package/dist/index.d.ts +18 -6
- package/dist/index.js +14 -5
- package/dist/limitsWire.d.ts +0 -1
- package/dist/limitsWire.js +2 -10
- package/dist/liveModelCatalog.d.ts +14 -0
- package/dist/liveModelCatalog.js +61 -0
- package/dist/mcpProbeCapability.js +14 -9
- package/dist/mcpReconnect.js +13 -8
- package/dist/memoryComplianceCapability.js +15 -10
- package/dist/memoryOriginCapability.js +15 -10
- package/dist/modelIdentityResolvability.d.ts +4 -2
- package/dist/modelIdentityResolvability.js +31 -4
- package/dist/outputStyleSeatCapability.d.ts +16 -0
- package/dist/outputStyleSeatCapability.js +47 -0
- package/dist/ownKey.d.ts +1 -0
- package/dist/ownKey.js +10 -0
- package/dist/peerLaneCapability.js +16 -11
- package/dist/permissionRuleIssue.js +1 -1
- package/dist/permissionRulesWriteCapability.js +16 -11
- package/dist/permissionsAllowGrantCapability.d.ts +2 -0
- package/dist/permissionsAllowGrantCapability.js +38 -16
- package/dist/permissionsDeclaration.d.ts +10 -1
- package/dist/permissionsDeclaration.js +97 -15
- package/dist/protocolSegment.d.ts +1 -0
- package/dist/protocolSegment.js +13 -1
- package/dist/request/taskRequest.d.ts +11 -3
- package/dist/request/taskRequest.js +13 -1
- package/dist/resultFrameKeys.d.ts +4 -0
- package/dist/resultFrameKeys.js +13 -0
- package/dist/resumeRefusalCopy.js +6 -16
- package/dist/retryStatus.js +6 -4
- package/dist/rewindArchiveCapability.js +13 -8
- package/dist/{hitl/rosterMountedNames.d.ts → rosterMountedNames.d.ts} +1 -1
- package/dist/runCancelContext.js +2 -1
- package/dist/sealedKeyCapability.js +19 -14
- package/dist/seatContract.d.ts +33 -5
- package/dist/seatContract.js +143 -2
- package/dist/sessionPolicyCapability.js +15 -10
- package/dist/sessionReadRedactionCapability.d.ts +16 -0
- package/dist/sessionReadRedactionCapability.js +47 -0
- package/dist/sessionSyncFileHistoryCapability.js +14 -9
- package/dist/skillToolListsCapability.js +14 -9
- package/dist/sqlEngineCapability.js +18 -13
- package/dist/steerPriorityCapability.js +21 -16
- package/dist/subagent/agentStateDetail.d.ts +1 -0
- package/dist/subagent/agentStateDetail.js +41 -0
- package/dist/subagent/engineCompactWire.d.ts +15 -0
- package/dist/subagent/engineCompactWire.js +75 -13
- package/dist/supportFloor.js +1 -1
- package/dist/taskRequestWords.d.ts +2 -4
- package/dist/taskRequestWords.js +3 -2
- package/dist/types/engineState.d.ts +1 -1
- package/dist/userAttachmentEnvelope.d.ts +22 -1
- package/dist/userAttachmentEnvelope.js +90 -2
- package/dist/userInvokedSkillsCapability.js +14 -9
- package/dist/webSearchBackendCapability.js +21 -16
- package/dist/wireErrorTriage.d.ts +11 -0
- package/dist/wireErrorTriage.js +35 -0
- package/dist/wireFailureShape.d.ts +6 -0
- package/dist/wireFailureShape.js +30 -3
- package/dist/wireRefusalCopy.d.ts +6 -1
- package/dist/wireRefusalCopy.js +22 -8
- package/dist/wiringInstructionsAttribution.d.ts +10 -0
- package/dist/wiringInstructionsAttribution.js +67 -0
- package/dist/workflowClient.js +22 -1
- package/dist/workflowsJournalCapability.js +14 -9
- package/dist/writeProtectionCapability.js +28 -23
- package/docs/INTEGRATION-CLIENTS.md +817 -45
- package/package.json +5 -5
- package/dist/askSurvivesStandingAnswer.d.ts +0 -13
- package/dist/askSurvivesStandingAnswer.js +0 -53
- package/dist/hitl/askSurvivesPosture.d.ts +0 -20
- package/dist/hitl/askSurvivesPosture.js +0 -48
- /package/dist/{hitl/rosterMountedNames.js → rosterMountedNames.js} +0 -0
|
@@ -15,7 +15,7 @@ export interface SessionPolicyDeliverability {
|
|
|
15
15
|
export interface SessionPolicyDeliverableOptions {
|
|
16
16
|
readonly roster?: ToolRosterView;
|
|
17
17
|
}
|
|
18
|
-
export
|
|
18
|
+
export { isEngineRefusedToolName } from '../engineRefusedToolName.js';
|
|
19
19
|
export declare function sessionPolicyDeliverable(behavior: 'deny' | 'ask', rules: readonly string[], opts?: SessionPolicyDeliverableOptions): SessionPolicyDeliverability;
|
|
20
20
|
export declare function sessionPolicyWithheldNotice(why: SessionPolicyWithheldWhy): string;
|
|
21
21
|
export declare function legacyToolNameFailureNoteOf(code: string | undefined): string | undefined;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { CONFIG_LEGACY_TOOL_NAME, RULES_LEGACY_TOOL_NAME } from '../engineErrorCodes.js';
|
|
2
|
-
import { rosterMountedNames } from '
|
|
2
|
+
import { rosterMountedNames } from '../rosterMountedNames.js';
|
|
3
3
|
import { ruleCompileVerdict } from '../ruleCompileVerdict.js';
|
|
4
4
|
import { protocolSegmentOf } from '../protocolSegment.js';
|
|
5
5
|
import { PREFIXES_IN_PROSE, REFUSED_NAME_CLASSES, REFUSED_NAME_FIX, RULES_LEGACY_TOOL_NAME_WRITE_NOTE } from './refusedToolNameProse.js';
|
|
6
6
|
import { CORE_PROTOCOL_PREFIXES, CORE_RETIRED_TOOL_CURRENT_NAMES } from '../generated/toolNameTables.js';
|
|
7
|
+
import { isEngineRefusedToolName } from '../engineRefusedToolName.js';
|
|
7
8
|
const COVERING_NAMESPACE_PREFIXES = CORE_PROTOCOL_PREFIXES;
|
|
8
9
|
const ENGINE_RETIRED_TOOL_NAMES = CORE_RETIRED_TOOL_CURRENT_NAMES;
|
|
9
10
|
const WITHHELD_NOTICE = {
|
|
@@ -40,13 +41,7 @@ function withheldWhyOf(rule) {
|
|
|
40
41
|
return 'legacy_tool_name';
|
|
41
42
|
return undefined;
|
|
42
43
|
}
|
|
43
|
-
export
|
|
44
|
-
if (typeof name !== 'string')
|
|
45
|
-
return false;
|
|
46
|
-
if (ENGINE_RETIRED_TOOL_NAMES.has(name))
|
|
47
|
-
return true;
|
|
48
|
-
return name.includes('__') && !COVERING_NAMESPACE_PREFIXES.some((prefix) => name.startsWith(prefix));
|
|
49
|
-
}
|
|
44
|
+
export { isEngineRefusedToolName } from '../engineRefusedToolName.js';
|
|
50
45
|
function suppliedRosterNames(opts) {
|
|
51
46
|
if (opts === undefined || opts === null)
|
|
52
47
|
return 'absent';
|
|
@@ -3,7 +3,7 @@ import { hostLog } from '../host.js';
|
|
|
3
3
|
import { isEngineRefusedToolName } from './sessionPolicyDeliverable.js';
|
|
4
4
|
import { RULES_LEGACY_TOOL_NAME_WRITE_NOTE } from './refusedToolNameProse.js';
|
|
5
5
|
import { RULES_LEGACY_TOOL_NAME, isRulesRefusalCode } from '../engineErrorCodes.js';
|
|
6
|
-
import { rosterMountedNames } from '
|
|
6
|
+
import { rosterMountedNames } from '../rosterMountedNames.js';
|
|
7
7
|
import { CORE_RULE_TOOL_NAME_VERDICTS } from '../generated/engineFactTables.js';
|
|
8
8
|
function isLegacyToolNameVerdict(v) {
|
|
9
9
|
return typeof v === 'string' && v !== 'current' && CORE_RULE_TOOL_NAME_VERDICTS.includes(v);
|
|
@@ -6,7 +6,7 @@ import { type DenyAttributionRefusalDetail } from '../wireRefusalCopy.js';
|
|
|
6
6
|
import { type ApprovalDecidedByReading } from '../approvalDecidedByCapability.js';
|
|
7
7
|
import { type DecideReceiptView } from '../decideReceipt.js';
|
|
8
8
|
import { RULE_OFFER_MATCHES, RULE_OFFER_BATCH_MEMBER_KINDS, RULE_OFFER_UNCOVERED_REASONS, RULE_OFFERS_ABSENCE_REASONS } from '@sema-agent/sdk';
|
|
9
|
-
import type { ToolApprovalRespondAck, PersistedRuleAnchor as SdkPersistedRuleAnchor, RuleOfferMatch as SdkRuleOfferMatch, RuleOfferBatchMember as SdkRuleOfferBatchMember, RuleOfferUncoveredDetail as SdkRuleOfferUncoveredDetail, RuleOfferUncoveredReason as SdkRuleOfferUncoveredReason, AskOrigin as SdkAskOrigin, RuleOffersAbsence as SdkRuleOffersAbsence, DenialLimitKind as SdkDenialLimitKind, DenialLimitFallback as SdkDenialLimitFallback } from '@sema-agent/sdk';
|
|
9
|
+
import type { ApprovalDecidedBy, ToolApprovalRespondAck, PersistedRuleAnchor as SdkPersistedRuleAnchor, RuleOfferMatch as SdkRuleOfferMatch, RuleOfferBatchMember as SdkRuleOfferBatchMember, RuleOfferUncoveredDetail as SdkRuleOfferUncoveredDetail, RuleOfferUncoveredReason as SdkRuleOfferUncoveredReason, AskOrigin as SdkAskOrigin, RuleOffersAbsence as SdkRuleOffersAbsence, DenialLimitKind as SdkDenialLimitKind, DenialLimitFallback as SdkDenialLimitFallback } from '@sema-agent/sdk';
|
|
10
10
|
export declare function isFsApprovalGate(gate: {
|
|
11
11
|
kind?: unknown;
|
|
12
12
|
toolName?: unknown;
|
|
@@ -26,12 +26,15 @@ export type FsApprovalOutcome = {
|
|
|
26
26
|
denyAttributionDropped?: true;
|
|
27
27
|
denyAttributionRenamed?: true;
|
|
28
28
|
receipt?: DecideReceiptView | undefined;
|
|
29
|
+
joinedInFlight?: true;
|
|
29
30
|
} | {
|
|
30
31
|
kind: 'aborted';
|
|
31
32
|
gatedCallId?: string | undefined;
|
|
33
|
+
joinedInFlight?: true;
|
|
32
34
|
} | {
|
|
33
35
|
kind: 'retracted';
|
|
34
36
|
gatedCallId?: string | undefined;
|
|
37
|
+
joinedInFlight?: true;
|
|
35
38
|
} | {
|
|
36
39
|
kind: 'failed';
|
|
37
40
|
stage: HitlFailureStage;
|
|
@@ -45,6 +48,7 @@ export type FsApprovalOutcome = {
|
|
|
45
48
|
currentPending?: GateCurrentPending | undefined;
|
|
46
49
|
denyAttributionRefusal?: DenyAttributionRefusalDetail | undefined;
|
|
47
50
|
editRefused?: true;
|
|
51
|
+
joinedInFlight?: true;
|
|
48
52
|
};
|
|
49
53
|
export interface FsApprovalWireDeps {
|
|
50
54
|
client: HitlClientLike;
|
|
@@ -153,6 +157,15 @@ export interface ApprovalCardRequest {
|
|
|
153
157
|
origin?: string;
|
|
154
158
|
askClass?: string;
|
|
155
159
|
classes?: readonly string[];
|
|
160
|
+
boundGrants?: BoundSkillGrantsWire;
|
|
161
|
+
classifierNoRuling?: string;
|
|
162
|
+
priorCardsForCall?: readonly ApprovalPriorCard[];
|
|
163
|
+
}
|
|
164
|
+
export interface ApprovalPriorCard {
|
|
165
|
+
readonly approvalId?: string;
|
|
166
|
+
readonly origin?: string;
|
|
167
|
+
readonly mandate?: ApprovalMandateWord;
|
|
168
|
+
readonly outcome?: 'allowed' | 'denied';
|
|
156
169
|
}
|
|
157
170
|
export type ApprovalCardPort = (req: ApprovalCardRequest) => Promise<ApprovalCardDecision>;
|
|
158
171
|
export declare function installApprovalCardPort(port: ApprovalCardPort | null): () => void;
|
|
@@ -240,12 +253,25 @@ export interface RespondToolApprovalOpts {
|
|
|
240
253
|
persistRuleBatchOfferIndex?: number;
|
|
241
254
|
note?: string;
|
|
242
255
|
settledBy?: 'policy';
|
|
243
|
-
decidedBy?: 'policy'
|
|
256
|
+
decidedBy?: Extract<ApprovalDecidedBy, 'policy'>;
|
|
244
257
|
}
|
|
245
258
|
export type RespondToolApprovalFn = (approvalId: string, decision: ToolApprovalRespondDecision, opts?: RespondToolApprovalOpts) => Promise<ToolApprovalRespondAck | void>;
|
|
246
259
|
export type ToolApprovalRespondAckView = ToolApprovalRespondAck;
|
|
247
260
|
export type PersistedRuleAnchor = SdkPersistedRuleAnchor;
|
|
248
261
|
export declare function readToolApprovalRespondAck(v: unknown): ToolApprovalRespondAckView | undefined;
|
|
262
|
+
export interface ToolApprovalRespondParkingView {
|
|
263
|
+
readonly approvalId: string;
|
|
264
|
+
readonly retryAfterMs?: number;
|
|
265
|
+
readonly decidePath?: string;
|
|
266
|
+
readonly message?: string;
|
|
267
|
+
}
|
|
268
|
+
export type ToolApprovalParkingBodyReading = {
|
|
269
|
+
readonly kind: 'parking';
|
|
270
|
+
readonly view: ToolApprovalRespondParkingView;
|
|
271
|
+
} | {
|
|
272
|
+
readonly kind: 'claimed_unreadable';
|
|
273
|
+
};
|
|
274
|
+
export declare function readToolApprovalRespondParking(v: unknown): ToolApprovalParkingBodyReading | undefined;
|
|
249
275
|
export declare function decisionAttributionKeyOf(reading: ApprovalDecidedByReading | undefined, denySettledBy: ApprovalDenySettledBy | undefined): {
|
|
250
276
|
decidedBy: 'policy';
|
|
251
277
|
} | {
|
|
@@ -257,11 +283,14 @@ export interface ToolApprovalFrameOutcome {
|
|
|
257
283
|
respondRefusal?: ToolApprovalRespondRefusal;
|
|
258
284
|
editRefused?: true;
|
|
259
285
|
retracted?: true;
|
|
286
|
+
aborted?: true;
|
|
287
|
+
joinedInFlight?: true;
|
|
260
288
|
denySettledBy?: ApprovalDenySettledBy;
|
|
261
289
|
denyReason?: string;
|
|
262
290
|
denyAttributionRefusal?: DenyAttributionRefusalDetail;
|
|
263
291
|
denyAttributionDropped?: true;
|
|
264
292
|
denyAttributionRenamed?: true;
|
|
293
|
+
parking?: ToolApprovalRespondParkingView;
|
|
265
294
|
}
|
|
266
295
|
interface ToolApprovalRespondRefusalFields {
|
|
267
296
|
status?: number;
|
|
@@ -277,6 +306,12 @@ export type ToolApprovalRespondRefusal = (ToolApprovalRespondRefusalFields & {
|
|
|
277
306
|
});
|
|
278
307
|
export declare function readToolApprovalRespondRefusal(err: unknown): ToolApprovalRespondRefusal | undefined;
|
|
279
308
|
export declare function isToolApprovalFrame(ev: unknown): ev is ToolApprovalFrame;
|
|
309
|
+
export declare function askProbeReasonDetail(card: Pick<ApprovalCardRequest, 'probeReason' | 'probeCause'> | null | undefined): string | undefined;
|
|
310
|
+
export declare function readApprovalBoundGrants(v: unknown): BoundSkillGrantsWire | undefined;
|
|
311
|
+
export declare function readApprovalClassifierNoRuling(v: unknown): string | undefined;
|
|
312
|
+
export declare function classifierNoRulingDetail(word: string | undefined): string;
|
|
313
|
+
export declare function approvalBoundGrantsDetail(grants: BoundSkillGrantsWire | null | undefined): string | undefined;
|
|
314
|
+
export declare function approvalPriorCardsDetail(card: Pick<ApprovalCardRequest, 'priorCardsForCall' | 'origin'> | null | undefined): string | undefined;
|
|
280
315
|
export declare function readDenialLimitFallback(v: unknown): DenialLimitFallback | undefined;
|
|
281
316
|
export declare function readRuleOffers(v: unknown): RuleOffer[] | undefined;
|
|
282
317
|
export declare function readRuleOfferSupply(offers: unknown): RuleOffer[] | undefined;
|