@sema-agent/client-core 0.95.0 → 0.97.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 +269 -0
- package/README.md +61 -31
- package/dist/adapt/arms.js +7 -1
- package/dist/adapt/toolCards.d.ts +1 -0
- package/dist/adapt/toolCards.js +16 -3
- package/dist/adapt/wireShapes.js +2 -16
- package/dist/adapter/activeRunSelfHeal.d.ts +4 -2
- package/dist/adapter/activeRunSelfHeal.js +32 -6
- package/dist/adapter/downstream/eventToSdkMessage.js +11 -3
- package/dist/adapter/downstream/terminalToSdkResult.js +14 -11
- package/dist/adapter/runStream.js +30 -47
- package/dist/agentSession/backgroundView.js +2 -15
- package/dist/agentSession/engineAgentRegistryRead.js +5 -4
- package/dist/agentSession/engineSessionBackgroundStop.js +22 -15
- package/dist/agentsWireCaps.d.ts +1 -1
- package/dist/agentsWireCaps.js +29 -12
- package/dist/approvalDecidedByCapability.d.ts +2 -0
- package/dist/approvalDecidedByCapability.js +0 -1
- package/dist/approvalsStreamLiveCapability.d.ts +2 -0
- package/dist/approvalsStreamLiveCapability.js +3 -2
- package/dist/attachmentSeatCapability.d.ts +2 -0
- package/dist/attachmentSeatCapability.js +0 -1
- package/dist/callerCwdCapability.d.ts +2 -4
- package/dist/callerCwdCapability.js +0 -7
- package/dist/centerWiringCapability.d.ts +2 -4
- package/dist/centerWiringCapability.js +4 -9
- package/dist/classifierVerdictWire.js +4 -16
- package/dist/clientSlice.js +1 -1
- package/dist/cloudConfigWireCaps.d.ts +4 -4
- package/dist/cloudConfigWireCaps.js +241 -85
- package/dist/coreValuePorts.d.ts +11 -7
- package/dist/coreValuePorts.js +5 -8
- package/dist/credentialProvenance.d.ts +28 -0
- package/dist/credentialProvenance.js +76 -0
- package/dist/decideFailureNote.js +3 -1
- package/dist/decideReceipt.js +7 -10
- package/dist/declared/supportFloorDeclared.js +3 -3
- package/dist/deviceExecutorManagementCapability.d.ts +2 -0
- package/dist/deviceExecutorManagementCapability.js +3 -2
- package/dist/displayUntrusted.d.ts +10 -3
- package/dist/displayUntrusted.js +371 -60
- package/dist/engineCapReader.d.ts +8 -2
- package/dist/engineCapReader.js +15 -7
- package/dist/engineCapsCache.d.ts +17 -3
- package/dist/engineCapsCache.js +268 -43
- package/dist/engineDirectory.d.ts +79 -0
- package/dist/engineDirectory.js +186 -0
- package/dist/engineErrorCodes.d.ts +17 -1
- package/dist/engineErrorCodes.js +46 -16
- package/dist/engineNoticeCodes.d.ts +17 -0
- package/dist/engineNoticeCodes.js +54 -1
- package/dist/executionLaneCapability.d.ts +2 -0
- package/dist/executionLaneCapability.js +3 -2
- package/dist/fileHistoryCaptureCapability.d.ts +16 -0
- package/dist/fileHistoryCaptureCapability.js +98 -2
- package/dist/fileHistoryLegNotice.js +4 -0
- package/dist/fleet/bgSubagentRow.d.ts +15 -0
- package/dist/fleet/bgSubagentRow.js +67 -0
- package/dist/fleet/fleetLedger.d.ts +1 -0
- package/dist/fleet/fleetLedger.js +164 -126
- package/dist/fleet/fleetProjection.d.ts +1 -0
- package/dist/fleet/fleetProjection.js +10 -3
- package/dist/fleetTaskDesc.js +4 -17
- package/dist/gateOutcome.d.ts +12 -1
- package/dist/gateOutcome.js +56 -1
- package/dist/gateVocabulary.d.ts +2 -2
- package/dist/gateVocabulary.js +4 -3
- package/dist/generated/engineAskFaceTables.js +1 -1
- package/dist/generated/engineFactTables.d.ts +5 -3
- package/dist/generated/engineFactTables.js +17 -4
- package/dist/generated/engineNoticeTables.js +12 -3
- package/dist/generated/sdkFactTables.d.ts +2 -0
- package/dist/generated/sdkFactTables.js +7 -0
- package/dist/generated/settingsSchemaFns.d.ts +3 -0
- package/dist/generated/settingsSchemaFns.js +53 -0
- package/dist/generated/toolNameTables.d.ts +1 -1
- package/dist/generated/toolNameTables.js +1 -42
- package/dist/hitl/approvalDecisionNoteAudit.js +2 -2
- package/dist/hitl/approvalEndingCause.d.ts +2 -0
- package/dist/hitl/approvalEndingCause.js +26 -21
- package/dist/hitl/approvalHolds.d.ts +16 -1
- package/dist/hitl/approvalHolds.js +52 -12
- package/dist/hitl/askGateWire.js +1 -0
- package/dist/hitl/askParkRowRouting.js +1 -1
- package/dist/hitl/automaticAnswerVerdict.d.ts +1 -1
- package/dist/hitl/automaticAnswerVerdict.js +13 -10
- package/dist/hitl/decisionConflict.js +4 -5
- package/dist/hitl/decisionRefusal.d.ts +8 -0
- package/dist/hitl/decisionRefusal.js +55 -14
- package/dist/hitl/frameRouter.d.ts +3 -1
- package/dist/hitl/frameRouter.js +58 -39
- package/dist/hitl/gateLedger.d.ts +0 -5
- package/dist/hitl/gateLedger.js +0 -21
- package/dist/hitl/hitlBridge.d.ts +6 -2
- package/dist/hitl/hitlBridge.js +46 -11
- package/dist/hitl/localAllowRule.d.ts +1 -0
- package/dist/hitl/localAllowRule.js +2 -2
- package/dist/hitl/noAllowCause.d.ts +2 -1
- package/dist/hitl/noAllowCause.js +3 -2
- package/dist/hitl/parkResolver.d.ts +1 -0
- package/dist/hitl/parkResolver.js +14 -56
- package/dist/hitl/parkRowBirthWait.d.ts +1 -0
- package/dist/hitl/parkRowBirthWait.js +2 -2
- package/dist/hitl/planReviewWire.d.ts +1 -0
- package/dist/hitl/planReviewWire.js +98 -20
- package/dist/hitl/replayedApproval.d.ts +3 -3
- package/dist/hitl/replayedApproval.js +21 -16
- package/dist/hitl/sessionPolicyDeliverable.d.ts +0 -1
- package/dist/hitl/sessionPolicyDeliverable.js +17 -17
- package/dist/hitl/sessionPolicyWire.d.ts +2 -0
- package/dist/hitl/sessionPolicyWire.js +15 -3
- package/dist/hitl/standingRows.d.ts +19 -0
- package/dist/hitl/standingRows.js +148 -0
- package/dist/hitl/suspendedReopen.js +2 -1
- package/dist/hitl/toolApprovalWire.d.ts +22 -10
- package/dist/hitl/toolApprovalWire.js +286 -47
- package/dist/hookMatcherVerdict.d.ts +1 -9
- package/dist/hookMatcherVerdict.js +21 -61
- package/dist/hooksWireCaps.js +2 -2
- package/dist/hostCallbackGuard.d.ts +1 -0
- package/dist/hostCallbackGuard.js +6 -0
- package/dist/index.d.ts +26 -12
- package/dist/index.js +20 -10
- package/dist/liveModelCatalog.d.ts +13 -0
- package/dist/liveModelCatalog.js +56 -0
- package/dist/mcpProbeCapability.d.ts +2 -4
- package/dist/mcpProbeCapability.js +3 -8
- package/dist/mcpWireCaps.d.ts +1 -0
- package/dist/mcpWireCaps.js +4 -1
- package/dist/memoryComplianceCapability.d.ts +2 -4
- package/dist/memoryComplianceCapability.js +3 -8
- package/dist/memoryOriginCapability.d.ts +2 -4
- package/dist/memoryOriginCapability.js +3 -8
- package/dist/memorySpecWire.js +2 -2
- package/dist/modelIdentityResolvability.d.ts +2 -2
- package/dist/modelIdentityResolvability.js +14 -5
- package/dist/noticePresentation.d.ts +68 -0
- package/dist/noticePresentation.js +247 -0
- package/dist/outputStyleSeatCapability.d.ts +2 -1
- package/dist/outputStyleSeatCapability.js +0 -4
- package/dist/ownKey.d.ts +2 -0
- package/dist/ownKey.js +18 -0
- package/dist/peerFrames.js +13 -9
- package/dist/peerLaneCapability.d.ts +2 -0
- package/dist/peerLaneCapability.js +3 -2
- package/dist/permissionModesCapability.d.ts +2 -4
- package/dist/permissionModesCapability.js +0 -7
- package/dist/permissionRuleIssue.js +0 -3
- package/dist/permissionRulesWriteCapability.d.ts +2 -0
- package/dist/permissionRulesWriteCapability.js +3 -2
- package/dist/permissionsAllowGrantCapability.d.ts +2 -0
- package/dist/permissionsAllowGrantCapability.js +4 -2
- package/dist/permissionsDeclaration.d.ts +2 -0
- package/dist/permissionsDeclaration.js +72 -59
- package/dist/printPermissionOutcome.d.ts +12 -0
- package/dist/printPermissionOutcome.js +50 -0
- package/dist/printToolResultFrame.d.ts +1 -0
- package/dist/printToolResultFrame.js +5 -9
- package/dist/promptBlockedCopy.d.ts +5 -0
- package/dist/promptBlockedCopy.js +35 -0
- package/dist/protocolSegment.d.ts +9 -6
- package/dist/protocolSegment.js +31 -21
- package/dist/providerRejection.d.ts +4 -0
- package/dist/providerRejection.js +75 -14
- package/dist/replayBody.d.ts +12 -0
- package/dist/replayBody.js +25 -0
- package/dist/request/taskRequest.d.ts +1 -4
- package/dist/request/taskRequest.js +74 -19
- package/dist/resumeRefusalCopy.js +9 -25
- package/dist/retryStatus.d.ts +9 -1
- package/dist/retryStatus.js +9 -2
- package/dist/rewindArchiveCapability.d.ts +3 -13
- package/dist/rewindArchiveCapability.js +12 -58
- package/dist/rewindArchiveReading.d.ts +17 -0
- package/dist/rewindArchiveReading.js +55 -0
- package/dist/ruleCompileVerdict.d.ts +9 -1
- package/dist/ruleCompileVerdict.js +29 -4
- package/dist/runTerminal.d.ts +48 -5
- package/dist/runTerminal.js +215 -12
- package/dist/sandboxWire.js +13 -0
- package/dist/sdkWireTransit.d.ts +2 -1
- package/dist/sdkWireTransit.js +1 -0
- package/dist/sealedKeyCapability.d.ts +2 -4
- package/dist/sealedKeyCapability.js +0 -7
- package/dist/seam.js +4 -2
- package/dist/seatContract.d.ts +76 -11
- package/dist/seatContract.js +222 -27
- package/dist/sessionPolicyCapability.d.ts +2 -0
- package/dist/sessionPolicyCapability.js +3 -2
- package/dist/sessionReadRedactionCapability.d.ts +2 -4
- package/dist/sessionReadRedactionCapability.js +0 -7
- package/dist/sessionSyncFileHistory.d.ts +4 -0
- package/dist/sessionSyncFileHistory.js +66 -0
- package/dist/sessionSyncFileHistoryCapability.d.ts +2 -1
- package/dist/sessionSyncFileHistoryCapability.js +3 -5
- package/dist/skillToolListsCapability.d.ts +2 -1
- package/dist/skillToolListsCapability.js +3 -5
- package/dist/sqlEngineCapability.d.ts +2 -0
- package/dist/sqlEngineCapability.js +4 -3
- package/dist/steerPriorityCapability.d.ts +2 -1
- package/dist/steerPriorityCapability.js +3 -5
- package/dist/storePostureCapability.d.ts +2 -4
- package/dist/storePostureCapability.js +4 -9
- package/dist/subagent/engineSubagentSteer.js +7 -5
- package/dist/subagentContentStore.js +4 -15
- package/dist/supportFloor.d.ts +1 -0
- package/dist/supportFloor.js +13 -9
- package/dist/systemReminderTag.d.ts +1 -0
- package/dist/systemReminderTag.js +8 -0
- package/dist/toolHistoryBadTurn.js +3 -2
- package/dist/toolHistoryMismatch.d.ts +0 -3
- package/dist/toolHistoryMismatch.js +3 -7
- package/dist/toolResult.d.ts +12 -1
- package/dist/toolResult.js +55 -1
- package/dist/toolResultContent.d.ts +2 -0
- package/dist/toolResultContent.js +63 -0
- package/dist/usageAnalytics.js +40 -16
- package/dist/userInvokedSkillsCapability.d.ts +2 -1
- package/dist/userInvokedSkillsCapability.js +3 -5
- package/dist/webSearchBackendCapability.d.ts +2 -0
- package/dist/webSearchBackendCapability.js +3 -2
- package/dist/wireErrorTriage.d.ts +2 -0
- package/dist/wireErrorTriage.js +91 -38
- package/dist/wireFailureShape.d.ts +20 -3
- package/dist/wireFailureShape.js +128 -72
- package/dist/workflowsJournalCapability.d.ts +2 -0
- package/dist/workflowsJournalCapability.js +3 -2
- package/dist/writeProtectionCapability.d.ts +2 -0
- package/dist/writeProtectionCapability.js +3 -2
- package/docs/INTEGRATION-CLIENTS.md +1784 -20
- package/package.json +5 -5
- package/dist/engineRefusedToolName.d.ts +0 -1
- package/dist/engineRefusedToolName.js +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { corruptStoredRowContent, corruptStoredRowWhere } from './wireErrorTriage.js';
|
|
1
|
+
import { corruptStoredRowContent, corruptStoredRowWhere, scenarioDenyFromError, scenarioNotAllowedContent } from './wireErrorTriage.js';
|
|
2
2
|
import { checkpointUnsupportedVersionContent, checkpointUnsupportedVersionFromError, parkedResumeStartupContent, parkedResumeStartupFromError, resumePolicyBlockContent, resumePolicyBlockFromError, } from './resumeRefusalCopy.js';
|
|
3
3
|
import { askGoneContent, askGoneFromError, decideParkMovedContent, decideParkMovedFromError } from './decideReceipt.js';
|
|
4
4
|
import { settingsPermissionBucketRefusalContent, settingsPermissionBucketRefusalFromError } from './wireRefusalCopy.js';
|
|
@@ -9,12 +9,14 @@ export function decideFailureNote(err, decision) {
|
|
|
9
9
|
const startup = parkedResumeStartupFromError(err, decision);
|
|
10
10
|
const moved = decideParkMovedFromError(err);
|
|
11
11
|
const bucket = settingsPermissionBucketRefusalFromError(err);
|
|
12
|
+
const scenario = scenarioDenyFromError(err);
|
|
12
13
|
const unsupported = checkpointUnsupportedVersionFromError(err);
|
|
13
14
|
const gone = askGoneFromError(err);
|
|
14
15
|
const answerInvalid = decisionConflictOf(err) === 'answer_invalid';
|
|
15
16
|
return ((where === undefined ? '' : ` — ${corruptStoredRowContent(where)}`) +
|
|
16
17
|
(fold === null ? '' : ` — ${resumePolicyBlockContent(fold)}`) +
|
|
17
18
|
(bucket === null ? '' : ` — ${settingsPermissionBucketRefusalContent(bucket)}`) +
|
|
19
|
+
(scenario === null ? '' : ` — ${scenarioNotAllowedContent(scenario, undefined, 'resumed_work')}`) +
|
|
18
20
|
(startup === null ? '' : ` — ${parkedResumeStartupContent(startup)}`) +
|
|
19
21
|
(moved === null ? '' : ` — ${decideParkMovedContent(moved)}`) +
|
|
20
22
|
(unsupported === null ? '' : ` — ${checkpointUnsupportedVersionContent(unsupported)}`) +
|
package/dist/decideReceipt.js
CHANGED
|
@@ -2,7 +2,7 @@ import { gateOutcomeOf } from './gateOutcome.js';
|
|
|
2
2
|
import { resumeReopenFromError } from './hitl/suspendedReopen.js';
|
|
3
3
|
import { ASK_GONE, DECIDE_CLAIM_LOST, DECIDE_GATE_MOVED, DECIDE_NOT_PARKED, DECIDE_WORKFLOW_HOST_UNKNOWN, DECIDE_WORKFLOW_LANE_CODES, DECIDE_WORKFLOW_PARK_FORKED, DECIDE_WORKFLOW_PARKS_UNREADABLE, DECIDE_WORKFLOW_REMEMBER_UNSUPPORTED, isDecideParkMovedCode, } from './engineErrorCodes.js';
|
|
4
4
|
import { effectiveWireErrorCode } from './wireErrorTriage.js';
|
|
5
|
-
import { readErrorString, readErrorStrictStringList } from './wireFailureShape.js';
|
|
5
|
+
import { readErrorString, readErrorStrictStringList, readThrownExtra } from './wireFailureShape.js';
|
|
6
6
|
import { isCrashConvergedCause } from './hitl/crashConverged.js';
|
|
7
7
|
import { askRowEndingCauseFor } from './hitl/approvalEndingCause.js';
|
|
8
8
|
const STATUS_RESUMING = 'resuming';
|
|
@@ -143,14 +143,11 @@ function askGoneRawCause(e) {
|
|
|
143
143
|
}
|
|
144
144
|
if (typeof top === 'string')
|
|
145
145
|
return top;
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
extra = undefined;
|
|
152
|
-
}
|
|
153
|
-
if (typeof extra === 'object' && extra !== null && !Array.isArray(extra)) {
|
|
146
|
+
const reading = readThrownExtra(e);
|
|
147
|
+
if (reading.state === 'unreadable')
|
|
148
|
+
return undefined;
|
|
149
|
+
if (reading.state === 'object') {
|
|
150
|
+
const extra = reading.value;
|
|
154
151
|
let hasCause = false;
|
|
155
152
|
let word;
|
|
156
153
|
try {
|
|
@@ -163,7 +160,7 @@ function askGoneRawCause(e) {
|
|
|
163
160
|
if (hasCause)
|
|
164
161
|
return word;
|
|
165
162
|
}
|
|
166
|
-
return
|
|
163
|
+
return undefined;
|
|
167
164
|
}
|
|
168
165
|
export function askGoneFromError(e) {
|
|
169
166
|
if (typeof e !== 'object' || e === null)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { engineWireTarget } from './engineWireTarget.js';
|
|
2
|
-
import { createEngineCapReader } from './engineCapReader.js';
|
|
2
|
+
import { createEngineCapReader, unreadableReadingDetail } from './engineCapReader.js';
|
|
3
3
|
import { ownDataField } from './ownKey.js';
|
|
4
4
|
import { capForDisplay } from './fleetTaskDesc.js';
|
|
5
5
|
export function projectDeviceExecutorManagementCapability(caps) {
|
|
@@ -43,7 +43,6 @@ export function projectDeviceExecutorManagementCapability(caps) {
|
|
|
43
43
|
const reader = createEngineCapReader({
|
|
44
44
|
name: 'deviceExecutor.management',
|
|
45
45
|
project: projectDeviceExecutorManagementCapability,
|
|
46
|
-
makeUnobserved: () => ({ kind: 'unobserved' }),
|
|
47
46
|
});
|
|
48
47
|
export function noteEngineCapsForDeviceExecutorManagement(baseUrl, caps, opts) {
|
|
49
48
|
reader.note(baseUrl, caps, opts);
|
|
@@ -83,6 +82,8 @@ function laneFactsSuffix(r) {
|
|
|
83
82
|
}
|
|
84
83
|
export function deviceExecutorManagementDoctorDetail(reading) {
|
|
85
84
|
switch (reading.kind) {
|
|
85
|
+
case 'unreadable':
|
|
86
|
+
return unreadableReadingDetail('device management face');
|
|
86
87
|
case 'unobserved':
|
|
87
88
|
return 'device management face not observed — the engine reports it on /v1/capabilities (deviceExecutor.management); this process has no usable capabilities reading cached for it (none received, the last one was unreadable, or the last one was discarded when the engine connection was reset; this process cannot tell which)';
|
|
88
89
|
case 'not_reported':
|
|
@@ -8,9 +8,6 @@ export interface DisplayFace {
|
|
|
8
8
|
readonly mark: DisplayMark;
|
|
9
9
|
readonly keepBlanks?: boolean;
|
|
10
10
|
}
|
|
11
|
-
export declare const LEGACY_ESCAPE_FACE: DisplayFace;
|
|
12
|
-
export declare const LEGACY_LABEL_FACE: DisplayFace;
|
|
13
|
-
export declare const LEGACY_NAME_FACE: DisplayFace;
|
|
14
11
|
export declare function applyDisplayFace(text: string, face: DisplayFace): string;
|
|
15
12
|
export interface DisplayUntrustedOptions {
|
|
16
13
|
readonly credentialUrls?: boolean;
|
|
@@ -33,10 +30,20 @@ export interface DisplayUntrustedMarked {
|
|
|
33
30
|
readonly text: string;
|
|
34
31
|
readonly marks: readonly DisplayMarkSpan[];
|
|
35
32
|
}
|
|
33
|
+
export declare const ESCAPE_FACE: DisplayFace;
|
|
34
|
+
export declare const LABEL_FACE: DisplayFace;
|
|
35
|
+
export declare const PEER_NAME_FACE: DisplayFace;
|
|
36
|
+
export declare const REDACTION_MARKER_MAX_LENGTH: number;
|
|
37
|
+
export declare const DISPLAY_CAP_BACKOFF_MAX: number;
|
|
38
|
+
export declare function markerSafeCut(text: string, cut: number): number;
|
|
39
|
+
export declare function capDisplay(text: string, max: number | undefined, mark: DisplayMark): string;
|
|
40
|
+
export declare function paintAndCap(text: string, face: DisplayFace, max?: number): string;
|
|
36
41
|
export declare function credentialWashPasses(text: string, opts?: DisplayUntrustedOptions | null): {
|
|
37
42
|
passes: number;
|
|
38
43
|
capped: boolean;
|
|
39
44
|
};
|
|
40
45
|
export declare function displayUntrusted(text: string, opts?: DisplayUntrustedOptions): string;
|
|
46
|
+
export declare function queryCarriesCredential(query: string): boolean;
|
|
47
|
+
export declare function displayConfiguredUrl(url: string, opts?: DisplayUntrustedOptions): string;
|
|
41
48
|
export declare function quoteUntrustedForSentence(text: string, max: number): string | undefined;
|
|
42
49
|
export declare function displayUntrustedMarks(text: string, opts?: DisplayUntrustedOptions): DisplayUntrustedMarked;
|