@sema-agent/client-core 0.93.1 → 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 +213 -0
- package/README.md +30 -19
- 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.js +9 -1
- 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 +3 -0
- package/dist/hitl/hitlHostSurface.js +14 -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 +27 -2
- package/dist/hitl/toolApprovalWire.js +258 -23
- 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 +719 -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
|
@@ -5,41 +5,46 @@ function ownRead(o, key) {
|
|
|
5
5
|
return Object.hasOwn(o, key) ? o[key] : undefined;
|
|
6
6
|
}
|
|
7
7
|
export function projectDeviceExecutorManagementCapability(caps) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
8
|
+
try {
|
|
9
|
+
if (caps === null || typeof caps !== 'object' || Array.isArray(caps))
|
|
10
|
+
return undefined;
|
|
11
|
+
const c = caps;
|
|
12
|
+
if (!Object.hasOwn(c, 'deviceExecutor'))
|
|
13
|
+
return { kind: 'not_reported', why: 'capability_absent' };
|
|
14
|
+
const d = c.deviceExecutor;
|
|
15
|
+
if (d === undefined)
|
|
16
|
+
return { kind: 'not_reported', why: 'capability_absent' };
|
|
17
|
+
if (d === false)
|
|
18
|
+
return { kind: 'lane_absent' };
|
|
19
|
+
if (d === null || typeof d !== 'object' || Array.isArray(d))
|
|
20
|
+
return undefined;
|
|
21
|
+
const o = d;
|
|
22
|
+
if (ownRead(o, 'enabled') !== true)
|
|
23
|
+
return undefined;
|
|
24
|
+
const mgmt = ownRead(o, 'management');
|
|
25
|
+
let management;
|
|
26
|
+
if (mgmt === undefined)
|
|
27
|
+
management = 'absent';
|
|
28
|
+
else if (mgmt === true)
|
|
29
|
+
management = 'present-true';
|
|
30
|
+
else if (mgmt === false)
|
|
31
|
+
management = 'present-false';
|
|
32
|
+
else
|
|
33
|
+
return undefined;
|
|
34
|
+
const pv = ownRead(o, 'protocolVersion');
|
|
35
|
+
const mi = ownRead(o, 'maxInflightPerDevice');
|
|
36
|
+
const ws = ownRead(o, 'wsPath');
|
|
37
|
+
return {
|
|
38
|
+
kind: 'present',
|
|
39
|
+
management,
|
|
40
|
+
...(typeof pv === 'number' && Number.isFinite(pv) ? { protocolVersion: pv } : {}),
|
|
41
|
+
...(typeof mi === 'number' && Number.isFinite(mi) && mi >= 0 ? { maxInflightPerDevice: mi } : {}),
|
|
42
|
+
...(typeof ws === 'string' && ws.length > 0 ? { wsPath: ws } : {}),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
32
46
|
return undefined;
|
|
33
|
-
|
|
34
|
-
const mi = ownRead(o, 'maxInflightPerDevice');
|
|
35
|
-
const ws = ownRead(o, 'wsPath');
|
|
36
|
-
return {
|
|
37
|
-
kind: 'present',
|
|
38
|
-
management,
|
|
39
|
-
...(typeof pv === 'number' && Number.isFinite(pv) ? { protocolVersion: pv } : {}),
|
|
40
|
-
...(typeof mi === 'number' && Number.isFinite(mi) && mi >= 0 ? { maxInflightPerDevice: mi } : {}),
|
|
41
|
-
...(typeof ws === 'string' && ws.length > 0 ? { wsPath: ws } : {}),
|
|
42
|
-
};
|
|
47
|
+
}
|
|
43
48
|
}
|
|
44
49
|
const reader = createEngineCapReader({
|
|
45
50
|
name: 'deviceExecutor.management',
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { SETTINGS_DEVICE_CODE_TTL_SECONDS, SETTINGS_DEVICE_POLL_INTERVAL_SECONDS } from './generated/settingsSchemaTables.js';
|
|
2
|
+
function positiveSecondsOf(reading, key) {
|
|
3
|
+
try {
|
|
4
|
+
const desc = Object.getOwnPropertyDescriptor(reading, key);
|
|
5
|
+
if (desc === undefined || !('value' in desc))
|
|
6
|
+
return undefined;
|
|
7
|
+
const v = desc.value;
|
|
8
|
+
return typeof v === 'number' && Number.isFinite(v) && v > 0 ? v : undefined;
|
|
9
|
+
}
|
|
10
|
+
catch {
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export function deviceFlowPollingPlan(reading) {
|
|
15
|
+
let isObjectReading = false;
|
|
16
|
+
try {
|
|
17
|
+
isObjectReading = typeof reading === 'object' && reading !== null && !Array.isArray(reading);
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
isObjectReading = false;
|
|
21
|
+
}
|
|
22
|
+
if (!isObjectReading)
|
|
23
|
+
return undefined;
|
|
24
|
+
const r = reading;
|
|
25
|
+
const ttlSeconds = positiveSecondsOf(r, 'expires_in') ?? SETTINGS_DEVICE_CODE_TTL_SECONDS;
|
|
26
|
+
const intervalSeconds = Math.max(1, positiveSecondsOf(r, 'interval') ?? SETTINGS_DEVICE_POLL_INTERVAL_SECONDS);
|
|
27
|
+
return Object.freeze({ timeoutMs: ttlSeconds * 1000, intervalSeconds });
|
|
28
|
+
}
|