@sema-agent/client-core 0.100.0 → 0.101.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 +395 -0
- package/README.md +164 -117
- package/dist/adapt/arms.js +51 -16
- package/dist/adapt/textStream.js +7 -4
- package/dist/adapt/toolCards.js +9 -8
- package/dist/adapt.js +7 -1
- package/dist/adapter/activeRunSelfHeal.d.ts +24 -2
- package/dist/adapter/activeRunSelfHeal.js +108 -6
- package/dist/adapter/downstream/eventToSdkMessage.js +33 -12
- package/dist/adapter/downstream/terminalToSdkResult.d.ts +60 -1
- package/dist/adapter/downstream/terminalToSdkResult.js +209 -39
- package/dist/adapter/runStream.d.ts +4 -4
- package/dist/adapter/runStream.js +158 -43
- package/dist/agentsWireCaps.d.ts +2 -7
- package/dist/agentsWireCaps.js +1 -2
- package/dist/approvalDecidedByCapability.js +2 -2
- package/dist/approvalFrameFamilies.d.ts +33 -0
- package/dist/approvalFrameFamilies.js +120 -0
- package/dist/approvalsStreamLiveCapability.js +2 -2
- package/dist/attachmentsWireCaps.js +41 -13
- package/dist/callerCwdCapability.js +2 -2
- package/dist/centerWiringCapability.js +2 -2
- package/dist/clockReading.d.ts +2 -0
- package/dist/clockReading.js +4 -0
- package/dist/cloudConfigWireCaps.d.ts +19 -5
- package/dist/cloudConfigWireCaps.js +193 -56
- package/dist/coreValuePorts.d.ts +12 -2
- package/dist/coreValuePorts.js +9 -0
- package/dist/decideFailureNote.js +5 -3
- package/dist/decideReceipt.js +2 -2
- package/dist/deviceExecutorManagementCapability.js +2 -2
- package/dist/deviceFlowPolling.js +1 -1
- package/dist/disableSkillsWire.d.ts +1 -1
- package/dist/disableSkillsWire.js +4 -3
- package/dist/displayUntrusted.d.ts +1 -0
- package/dist/displayUntrusted.js +65 -8
- package/dist/engineCapReader.js +1 -1
- package/dist/engineConfigDrift.js +1 -1
- package/dist/engineErrorCodes.d.ts +14 -5
- package/dist/engineErrorCodes.js +27 -6
- package/dist/engineGenerationConvergence.d.ts +39 -0
- package/dist/engineGenerationConvergence.js +95 -0
- package/dist/engineGenerationPort.d.ts +61 -0
- package/dist/engineGenerationPort.js +144 -0
- package/dist/engineHealthFacts.d.ts +23 -0
- package/dist/engineHealthFacts.js +92 -0
- package/dist/engineIdentity.d.ts +4 -0
- package/dist/engineIdentity.js +11 -0
- package/dist/engineNoticeCodes.d.ts +2 -5
- package/dist/engineRowRef.js +3 -0
- package/dist/engineSessionMessages.js +2 -2
- package/dist/engineToolDirectory.js +2 -2
- package/dist/engineWireFor.d.ts +99 -0
- package/dist/engineWireFor.js +248 -6
- package/dist/engineWireTarget.d.ts +1 -0
- package/dist/engineWireTarget.js +8 -0
- package/dist/env/uiLanguage.js +1 -1
- package/dist/errorSupplementRoles.d.ts +3 -0
- package/dist/errorSupplementRoles.js +37 -0
- package/dist/executionLaneCapability.js +2 -2
- package/dist/fileHistoryCaptureCapability.js +3 -3
- package/dist/finalVerifyWire.d.ts +6 -3
- package/dist/finalVerifyWire.js +6 -23
- package/dist/flagInput.d.ts +4 -0
- package/dist/flagInput.js +24 -0
- package/dist/fleet/fleetLedger.js +5 -2
- package/dist/fleet/fleetProjection.d.ts +1 -0
- package/dist/fleet/fleetProjection.js +15 -2
- package/dist/gateVocabulary.js +3 -0
- package/dist/generated/engineFactTables.d.ts +7 -3
- package/dist/generated/engineFactTables.js +52 -0
- package/dist/generated/engineNoticeTables.js +12 -0
- package/dist/generated/settingsSchemaActiveTiers.d.ts +1 -0
- package/dist/generated/settingsSchemaActiveTiers.js +14 -0
- package/dist/generated/settingsSchemaCallerTextEcho.d.ts +1 -0
- package/dist/generated/settingsSchemaCallerTextEcho.js +8 -0
- package/dist/generated/settingsSchemaControlAndBidi.d.ts +1 -0
- package/dist/generated/settingsSchemaControlAndBidi.js +8 -0
- package/dist/generated/settingsSchemaDefaultModel.d.ts +11 -0
- package/dist/generated/settingsSchemaDefaultModel.js +25 -0
- package/dist/generated/settingsSchemaFns.d.ts +54 -0
- package/dist/generated/settingsSchemaFns.js +26 -1
- package/dist/generated/settingsSchemaMcpRequestEntry.d.ts +1 -1
- package/dist/generated/settingsSchemaMcpRequestEntry.js +1 -7
- package/dist/generated/settingsSchemaSafetyMergeSpec.d.ts +1 -0
- package/dist/generated/settingsSchemaSafetyMergeSpec.js +95 -0
- package/dist/generated/settingsSchemaSettingsSources.d.ts +1 -0
- package/dist/generated/settingsSchemaSettingsSources.js +58 -0
- package/dist/generated/settingsSchemaTables.d.ts +2 -0
- package/dist/generated/settingsSchemaTables.js +13 -0
- package/dist/generated/settingsSchemaUrlPattern.d.ts +1 -0
- package/dist/generated/settingsSchemaUrlPattern.js +183 -0
- package/dist/headlessPermissionModeWire.d.ts +18 -2
- package/dist/headlessPermissionModeWire.js +30 -19
- package/dist/hitl/allowRuleShadow.js +7 -5
- package/dist/hitl/approvalCardReading.d.ts +3 -0
- package/dist/hitl/approvalCardReading.js +17 -0
- package/dist/hitl/approvalCompleteParked.js +1 -1
- package/dist/hitl/approvalDelivery.d.ts +87 -0
- package/dist/hitl/approvalDelivery.js +193 -0
- package/dist/hitl/approvalResolution.d.ts +11 -0
- package/dist/hitl/approvalResolution.js +50 -11
- package/dist/hitl/askClassPair.d.ts +6 -0
- package/dist/hitl/askClassPair.js +30 -3
- package/dist/hitl/askParkAutoReopenBlock.d.ts +30 -0
- package/dist/hitl/askParkAutoReopenBlock.js +117 -0
- package/dist/hitl/askParkRowRouting.js +4 -1
- package/dist/hitl/attributionLadder.d.ts +42 -3
- package/dist/hitl/attributionLadder.js +79 -8
- package/dist/hitl/automaticAnswerVerdict.d.ts +6 -1
- package/dist/hitl/automaticAnswerVerdict.js +46 -11
- package/dist/hitl/crashConverged.js +2 -2
- package/dist/hitl/decisionConflict.d.ts +6 -2
- package/dist/hitl/decisionConflict.js +24 -9
- package/dist/hitl/decisionRefusal.d.ts +20 -10
- package/dist/hitl/decisionRefusal.js +99 -54
- package/dist/hitl/decisionSend.d.ts +3 -0
- package/dist/hitl/decisionSend.js +87 -103
- package/dist/hitl/frameRouter.d.ts +1 -0
- package/dist/hitl/frameRouter.js +9 -2
- package/dist/hitl/hitlBridge.d.ts +18 -6
- package/dist/hitl/hitlBridge.js +41 -37
- package/dist/hitl/livePendingAsk.js +4 -3
- package/dist/hitl/noAllowCause.js +1 -1
- package/dist/hitl/parkResolver.js +3 -2
- package/dist/hitl/persistedRulesWire.js +1 -0
- package/dist/hitl/planReviewWire.d.ts +4 -0
- package/dist/hitl/planReviewWire.js +59 -30
- package/dist/hitl/resumeRunningCard.d.ts +3 -2
- package/dist/hitl/resumeRunningCard.js +17 -11
- package/dist/hitl/sessionPolicyDeliverable.d.ts +5 -2
- package/dist/hitl/sessionPolicyDeliverable.js +62 -29
- package/dist/hitl/sessionPolicyWire.d.ts +13 -3
- package/dist/hitl/sessionPolicyWire.js +81 -16
- package/dist/hitl/standingRows.js +1 -1
- package/dist/hitl/toolApprovalWire.d.ts +9 -10
- package/dist/hitl/toolApprovalWire.js +72 -54
- package/dist/hookMatcherVerdict.d.ts +2 -0
- package/dist/hookMatcherVerdict.js +12 -0
- package/dist/hooksCompactTransition.d.ts +19 -0
- package/dist/hooksCompactTransition.js +41 -0
- package/dist/hooksWireCaps.d.ts +1 -1
- package/dist/hooksWireCaps.js +202 -203
- package/dist/host.d.ts +1 -14
- package/dist/host.js +0 -8
- package/dist/hostCallbackGuard.d.ts +1 -0
- package/dist/hostCallbackGuard.js +1 -1
- package/dist/hostSettingsSource.d.ts +172 -0
- package/dist/hostSettingsSource.js +675 -0
- package/dist/hostTurnSettings.d.ts +73 -17
- package/dist/hostTurnSettings.js +594 -97
- package/dist/httpHookPolicy.d.ts +37 -0
- package/dist/httpHookPolicy.js +176 -0
- package/dist/humanTurn.d.ts +2 -1
- package/dist/humanTurn.js +37 -7
- package/dist/humanTurnRead.js +4 -3
- package/dist/humanTurnSentences.d.ts +10 -0
- package/dist/humanTurnSentences.js +74 -0
- package/dist/i18n/messages.en.d.ts +184 -2
- package/dist/i18n/messages.en.js +187 -5
- package/dist/i18n/messages.zh.js +197 -5
- package/dist/i18n/translate.js +3 -3
- package/dist/index.d.ts +69 -15
- package/dist/index.js +45 -13
- package/dist/inheritEnvCapability.d.ts +3 -1
- package/dist/inheritEnvCapability.js +31 -17
- package/dist/inheritEnvWire.d.ts +2 -1
- package/dist/inheritEnvWire.js +11 -5
- package/dist/interactiveToolsWire.d.ts +4 -2
- package/dist/interactiveToolsWire.js +5 -5
- package/dist/jsonFaithful.d.ts +20 -0
- package/dist/jsonFaithful.js +152 -0
- package/dist/limitsWire.d.ts +7 -2
- package/dist/limitsWire.js +19 -13
- package/dist/liveInitToolFace.d.ts +6 -1
- package/dist/liveInitToolFace.js +5 -3
- package/dist/liveModelCatalog.d.ts +22 -0
- package/dist/liveModelCatalog.js +132 -18
- package/dist/mcpPanel.js +1 -1
- package/dist/mcpProbeCapability.js +2 -2
- package/dist/mcpStatusSupersetKeys.d.ts +24 -0
- package/dist/mcpStatusSupersetKeys.js +45 -0
- package/dist/mcpToolToggles.js +2 -1
- package/dist/mcpWireCaps.d.ts +39 -1
- package/dist/mcpWireCaps.js +254 -50
- package/dist/memoryComplianceCapability.js +2 -2
- package/dist/memoryOriginCapability.js +2 -2
- package/dist/model/catalogDefault.d.ts +24 -0
- package/dist/model/catalogDefault.js +4 -0
- package/dist/model/liveCatalogShape.js +5 -4
- package/dist/model/modelsPolicy.js +4 -3
- package/dist/model/onboardJudgement.d.ts +1 -0
- package/dist/model/onboardJudgement.js +1 -1
- package/dist/model/subagentModelWord.js +2 -2
- package/dist/modelCapabilityProbe.js +6 -6
- package/dist/modelIdentityResolvability.d.ts +10 -1
- package/dist/modelIdentityResolvability.js +62 -39
- package/dist/modsKernelIdentity.d.ts +10 -0
- package/dist/modsKernelIdentity.js +103 -0
- package/dist/modsKernelTransit.d.ts +8 -0
- package/dist/modsKernelTransit.js +6 -0
- package/dist/notifications.d.ts +30 -12
- package/dist/notifications.js +241 -53
- package/dist/outputStyleSeatCapability.js +2 -2
- package/dist/ownKey.d.ts +11 -0
- package/dist/ownKey.js +164 -3
- package/dist/panelReduce.js +1 -1
- package/dist/peerFrames.d.ts +1 -1
- package/dist/peerFrames.js +6 -2
- package/dist/peerLaneCapability.js +2 -2
- package/dist/permissionModesCapability.js +4 -4
- package/dist/permissionRuleIssue.js +2 -0
- package/dist/permissionRulesWriteCapability.js +2 -2
- package/dist/permissionsAllowGrantCapability.js +2 -2
- package/dist/permissionsDeclaration.d.ts +43 -4
- package/dist/permissionsDeclaration.js +102 -35
- package/dist/pluginHooksWire.d.ts +20 -4
- package/dist/pluginHooksWire.js +92 -53
- package/dist/prepareRefusal.d.ts +3 -2
- package/dist/prepareRefusal.js +27 -9
- package/dist/printInitToolFace.js +2 -2
- package/dist/printModelStatus.js +1 -1
- package/dist/projectMemory.d.ts +32 -0
- package/dist/projectMemory.js +70 -0
- package/dist/promptBlockedCopy.d.ts +2 -1
- package/dist/promptBlockedCopy.js +2 -1
- package/dist/promptDelivery.d.ts +23 -3
- package/dist/promptDelivery.js +169 -30
- package/dist/providerRejection.d.ts +19 -1
- package/dist/providerRejection.js +75 -4
- package/dist/queuedDelivery.d.ts +48 -0
- package/dist/queuedDelivery.js +233 -0
- package/dist/reattachWindow.d.ts +94 -0
- package/dist/reattachWindow.js +127 -0
- package/dist/request/printNotification.d.ts +1 -1
- package/dist/request/printNotification.js +5 -1
- package/dist/request/submissionIdentity.d.ts +37 -0
- package/dist/request/submissionIdentity.js +65 -0
- package/dist/request/taskRequest.d.ts +12 -4
- package/dist/request/taskRequest.js +221 -152
- package/dist/resultFrameKeys.d.ts +1 -0
- package/dist/resultFrameKeys.js +4 -1
- package/dist/retryStatus.d.ts +8 -0
- package/dist/retryStatus.js +57 -9
- package/dist/rewindArchiveCapability.js +2 -2
- package/dist/rewindEngineAction.d.ts +2 -0
- package/dist/rewindEngineAction.js +23 -1
- package/dist/rowKind.d.ts +36 -0
- package/dist/rowKind.js +97 -0
- package/dist/ruleCompileVerdict.d.ts +18 -0
- package/dist/ruleCompileVerdict.js +67 -2
- package/dist/ruleReadings.d.ts +58 -0
- package/dist/ruleReadings.js +132 -0
- package/dist/ruleRefusalSentence.d.ts +4 -0
- package/dist/ruleRefusalSentence.js +9 -3
- package/dist/runCancelContext.d.ts +0 -1
- package/dist/runCancelContext.js +1 -2
- package/dist/runTerminal.d.ts +5 -0
- package/dist/runTerminal.js +52 -17
- package/dist/sandboxWire.d.ts +1 -1
- package/dist/sandboxWire.js +4 -6
- package/dist/scenarioRefusal.js +1 -1
- package/dist/scenarioSkills.d.ts +20 -0
- package/dist/scenarioSkills.js +72 -0
- package/dist/scenarioWire.d.ts +5 -2
- package/dist/scenarioWire.js +9 -9
- package/dist/sealedKeyCapability.js +2 -2
- package/dist/seam.d.ts +2 -0
- package/dist/seam.js +2 -2
- package/dist/seatContract.d.ts +46 -1
- package/dist/seatContract.js +49 -19
- package/dist/selfOrchestrationDenial.js +1 -1
- package/dist/sessionPolicyCapability.js +2 -2
- package/dist/sessionRulesChildrenReadLive.d.ts +6 -0
- package/dist/sessionRulesChildrenReadLive.js +5 -0
- package/dist/sessionRulesNamespaceFormsCapability.d.ts +12 -0
- package/dist/sessionRulesNamespaceFormsCapability.js +29 -0
- package/dist/sessionSyncFileHistoryCapability.js +2 -2
- package/dist/settingsCredentialKeyPaths.js +60 -5
- package/dist/settingsHooksSalvage.d.ts +1 -0
- package/dist/settingsHooksSalvage.js +7 -1
- package/dist/settingsLayerAdmission.d.ts +4 -0
- package/dist/settingsLayerAdmission.js +16 -0
- package/dist/skillToolListsCapability.js +6 -5
- package/dist/skillsWireCaps.d.ts +14 -0
- package/dist/skillsWireCaps.js +47 -16
- package/dist/slashCommandGate.d.ts +24 -0
- package/dist/slashCommandGate.js +74 -0
- package/dist/slashCommandTable.d.ts +14 -0
- package/dist/slashCommandTable.js +99 -0
- package/dist/sqlEngineCapability.js +2 -2
- package/dist/steerPriorityCapability.js +2 -2
- package/dist/storePostureCapability.js +2 -2
- package/dist/subagent/agentStateDetail.js +1 -1
- package/dist/subagent/engineDelegatedPrompt.d.ts +9 -0
- package/dist/subagent/engineDelegatedPrompt.js +38 -7
- package/dist/subagent/engineRowStopGate.js +2 -2
- package/dist/subagent/engineSubagentResume.js +3 -3
- package/dist/subagent/engineTaskHandleWire.d.ts +1 -0
- package/dist/subagent/engineTaskHandleWire.js +10 -0
- package/dist/submitFailure.d.ts +8 -0
- package/dist/submitFailure.js +17 -0
- package/dist/supportFloor.d.ts +1 -0
- package/dist/supportFloor.js +7 -0
- package/dist/terminationIntent.d.ts +55 -0
- package/dist/terminationIntent.js +352 -0
- package/dist/toolHistoryMismatch.d.ts +8 -0
- package/dist/toolHistoryMismatch.js +37 -6
- package/dist/toolResult.d.ts +13 -3
- package/dist/toolResult.js +158 -9
- package/dist/toolResultContent.d.ts +13 -0
- package/dist/toolResultContent.js +82 -7
- package/dist/toolRoster.d.ts +18 -0
- package/dist/toolRoster.js +64 -0
- package/dist/turnFailurePresentation.js +27 -90
- package/dist/usageLimitAutoResume.d.ts +74 -0
- package/dist/usageLimitAutoResume.js +227 -0
- package/dist/userAttachmentEnvelope.js +1 -1
- package/dist/userAttachmentSeat.js +5 -5
- package/dist/userInvokedSkillsCapability.js +2 -2
- package/dist/webSearchBackendCapability.js +2 -2
- package/dist/wireErrorTriage.js +99 -50
- package/dist/wireFailureShape.d.ts +25 -1
- package/dist/wireFailureShape.js +92 -5
- package/dist/wireRefusalCopy.d.ts +24 -1
- package/dist/wireRefusalCopy.js +253 -32
- package/dist/wiringFleetDoctor.d.ts +3 -0
- package/dist/wiringFleetDoctor.js +21 -0
- package/dist/workflow.d.ts +2 -1
- package/dist/workflow.js +38 -1
- package/dist/workflowClient.d.ts +2 -7
- package/dist/workflowsJournalCapability.js +2 -2
- package/dist/writeProtectionCapability.js +2 -2
- package/docs/INTEGRATION-CLIENTS.md +607 -181
- package/package.json +14 -3
|
@@ -10,6 +10,7 @@ const CLASS_OF_REASON = Object.freeze({
|
|
|
10
10
|
home_relative_path: 'homePath',
|
|
11
11
|
compile_refused: 'compile',
|
|
12
12
|
paren_in_tool_name: 'compile',
|
|
13
|
+
content_form_never_matches: 'neverMatches',
|
|
13
14
|
});
|
|
14
15
|
function reasonOf(row, lang) {
|
|
15
16
|
const cls = typeof row.reason === 'string' && Object.hasOwn(CLASS_OF_REASON, row.reason) ? CLASS_OF_REASON[row.reason] : undefined;
|
|
@@ -17,6 +18,8 @@ function reasonOf(row, lang) {
|
|
|
17
18
|
return renderMessage(msg('rules.refusal.reason.toolName'), lang);
|
|
18
19
|
if (cls === 'homePath')
|
|
19
20
|
return renderMessage(msg('rules.refusal.reason.homePath'), lang);
|
|
21
|
+
if (cls === 'neverMatches')
|
|
22
|
+
return renderMessage(msg('rules.refusal.reason.neverMatches'), lang);
|
|
20
23
|
if (cls === 'compile')
|
|
21
24
|
return permissionRuleIssueDetail(row.code, row.message, row.rule, lang);
|
|
22
25
|
return undefined;
|
|
@@ -48,11 +51,14 @@ export function ruleRefusalSentence(rows, lang) {
|
|
|
48
51
|
}
|
|
49
52
|
if (items.length === 0)
|
|
50
53
|
return undefined;
|
|
54
|
+
const listText = ruleRefusalListText(items, lang);
|
|
55
|
+
return renderMessage(items.length === 1 ? msg('rules.refusal.sentence.one', { list: listText }) : msg('rules.refusal.sentence.other', { count: items.length, list: listText }), lang);
|
|
56
|
+
}
|
|
57
|
+
export function ruleRefusalListText(items, lang) {
|
|
51
58
|
const shown = items.slice(0, RULE_REFUSAL_NAMED_MAX);
|
|
52
59
|
const separator = renderMessage(msg('rules.refusal.itemSeparator'), lang);
|
|
53
|
-
const named = shown.map((it) => renderMessage(msg('rules.refusal.item', { rule: nameOf(it.rule), reason: it.reason }), lang)).join(separator);
|
|
60
|
+
const named = shown.map((it) => (it.rule === undefined ? it.reason : renderMessage(msg('rules.refusal.item', { rule: nameOf(it.rule), reason: it.reason }), lang))).join(separator);
|
|
54
61
|
const rest = items.length - shown.length;
|
|
55
62
|
const list = rest > 0 ? msg('rules.refusal.list.more', { shown: named, count: rest }) : named;
|
|
56
|
-
|
|
57
|
-
return renderMessage(items.length === 1 ? msg('rules.refusal.sentence.one', { list: listText }) : msg('rules.refusal.sentence.other', { count: items.length, list: listText }), lang);
|
|
63
|
+
return typeof list === 'string' ? list : renderMessage(list, lang);
|
|
58
64
|
}
|
|
@@ -30,7 +30,6 @@ export type RunAbortCause = {
|
|
|
30
30
|
};
|
|
31
31
|
export declare const RUN_CANCELLED_CODE: "cancelled";
|
|
32
32
|
export declare function classifyRunAbortCause(record: unknown): RunAbortCause;
|
|
33
|
-
export declare const ABORT_CAUSES: readonly ["client_disconnected", "ask_park_grace_exhausted", "cancel_verb"];
|
|
34
33
|
export type { AbortCause };
|
|
35
34
|
export type AbortCauseReading = {
|
|
36
35
|
readonly kind: 'known';
|
package/dist/runCancelContext.js
CHANGED
|
@@ -57,7 +57,6 @@ export function classifyRunAbortCause(record) {
|
|
|
57
57
|
return { kind: 'run_still_live', status };
|
|
58
58
|
return { kind: 'unknown', ...(read !== null ? { terminal: read.kind } : {}) };
|
|
59
59
|
}
|
|
60
|
-
export const ABORT_CAUSES = SDK_ABORT_CAUSES;
|
|
61
60
|
const _abortCauseTablePin = true;
|
|
62
61
|
void _abortCauseTablePin;
|
|
63
62
|
function ownDataOf(o, key) {
|
|
@@ -85,7 +84,7 @@ function abortCauseIn(holder) {
|
|
|
85
84
|
const raw = ownDataOf(holder, 'abortCause');
|
|
86
85
|
if (typeof raw !== 'string' || raw.length === 0)
|
|
87
86
|
return undefined;
|
|
88
|
-
return
|
|
87
|
+
return SDK_ABORT_CAUSES.includes(raw) ? { kind: 'known', cause: raw } : { kind: 'unrecognized', word: raw };
|
|
89
88
|
}
|
|
90
89
|
export function readAbortCause(frame) {
|
|
91
90
|
try {
|
package/dist/runTerminal.d.ts
CHANGED
|
@@ -27,6 +27,9 @@ export type RunTerminalFailureDetail = RunTerminalProviderRejectedDetail | {
|
|
|
27
27
|
export type RunTerminalJsonValue = string | number | boolean | null | readonly RunTerminalJsonValue[] | {
|
|
28
28
|
readonly [key: string]: RunTerminalJsonValue;
|
|
29
29
|
};
|
|
30
|
+
export type RunTerminalCodedDetail = {
|
|
31
|
+
readonly [key: string]: RunTerminalJsonValue;
|
|
32
|
+
};
|
|
30
33
|
export interface RunTerminalOutputLimit {
|
|
31
34
|
capStop: boolean;
|
|
32
35
|
outputTokens?: number;
|
|
@@ -94,6 +97,8 @@ type RunTerminalReadArm = {
|
|
|
94
97
|
code?: string;
|
|
95
98
|
message?: string;
|
|
96
99
|
};
|
|
100
|
+
export declare function runTerminalCodedDetail(read: RunTerminalRead | null | undefined): RunTerminalCodedDetail | undefined;
|
|
101
|
+
export declare function terminalCodedDetailOf(carrier: {} | null | undefined): RunTerminalCodedDetail | undefined;
|
|
97
102
|
export declare function readRunTerminal(result: unknown): RunTerminalRead | null;
|
|
98
103
|
export declare const REVIEW_PARK_GATE_KINDS: readonly string[];
|
|
99
104
|
export declare function runTerminalGateKind(read: RunTerminalRead | null): string | undefined;
|
package/dist/runTerminal.js
CHANGED
|
@@ -2,6 +2,7 @@ import { CORE_PROMPT_BLOCK_CAUSES } from './generated/engineFactTables.js';
|
|
|
2
2
|
import { isSdkRunParked } from './terminalStatuses.js';
|
|
3
3
|
import { readOwnDataNonEmptyString, readOwnDataValue } from './ownKey.js';
|
|
4
4
|
import { doneResultView } from './replayBody.js';
|
|
5
|
+
import { washCredentials } from './displayUntrusted.js';
|
|
5
6
|
export const PROMPT_BLOCK_CAUSES = CORE_PROMPT_BLOCK_CAUSES;
|
|
6
7
|
const _promptBlockTablePin = true;
|
|
7
8
|
void _promptBlockTablePin;
|
|
@@ -39,7 +40,7 @@ void _modelOutputInvalidCausePin;
|
|
|
39
40
|
const CODED_DETAIL_MAX_DEPTH = 40;
|
|
40
41
|
function ownData(o, k) {
|
|
41
42
|
const d = Object.getOwnPropertyDescriptor(o, k);
|
|
42
|
-
return d !== undefined && 'value'
|
|
43
|
+
return d !== undefined && Object.hasOwn(d, 'value') ? d.value : undefined;
|
|
43
44
|
}
|
|
44
45
|
function isPlainRecord(v) {
|
|
45
46
|
if (typeof v !== 'object' || v === null || Array.isArray(v))
|
|
@@ -53,8 +54,10 @@ function jsonSnapshot(v, depth, ctx) {
|
|
|
53
54
|
ctx.budget -= 1;
|
|
54
55
|
if (ctx.budget < 0)
|
|
55
56
|
throw CODED_DETAIL_OVER_BUDGET;
|
|
56
|
-
if (v === null || typeof v === '
|
|
57
|
+
if (v === null || typeof v === 'boolean')
|
|
57
58
|
return v;
|
|
59
|
+
if (typeof v === 'string')
|
|
60
|
+
return ctx.leaf === undefined ? v : ctx.leaf(v);
|
|
58
61
|
if (typeof v === 'number')
|
|
59
62
|
return Number.isFinite(v) ? v : undefined;
|
|
60
63
|
if (depth >= CODED_DETAIL_MAX_DEPTH)
|
|
@@ -148,6 +151,51 @@ function requestRouteOf(d) {
|
|
|
148
151
|
return undefined;
|
|
149
152
|
}
|
|
150
153
|
}
|
|
154
|
+
function codedBodySnapshot(inner, washLeaves = false) {
|
|
155
|
+
if (!isPlainRecord(inner))
|
|
156
|
+
return undefined;
|
|
157
|
+
let snap;
|
|
158
|
+
try {
|
|
159
|
+
snap = jsonSnapshot(inner, 0, { budget: CODED_DETAIL_BUDGET, path: new Set(), ...(washLeaves ? { leaf: washCredentials } : {}) });
|
|
160
|
+
}
|
|
161
|
+
catch (e) {
|
|
162
|
+
if (e === CODED_DETAIL_OVER_BUDGET)
|
|
163
|
+
return undefined;
|
|
164
|
+
throw e;
|
|
165
|
+
}
|
|
166
|
+
if (snap === undefined || snap === null || typeof snap !== 'object' || Array.isArray(snap))
|
|
167
|
+
return undefined;
|
|
168
|
+
return snap;
|
|
169
|
+
}
|
|
170
|
+
export function runTerminalCodedDetail(read) {
|
|
171
|
+
try {
|
|
172
|
+
if (typeof read !== 'object' || read === null)
|
|
173
|
+
return undefined;
|
|
174
|
+
if (ownData(read, 'kind') !== 'failed')
|
|
175
|
+
return undefined;
|
|
176
|
+
const detail = ownData(read, 'detail');
|
|
177
|
+
if (typeof detail !== 'object' || detail === null)
|
|
178
|
+
return undefined;
|
|
179
|
+
if (ownData(detail, 'kind') !== CODED_DETAIL_KIND)
|
|
180
|
+
return undefined;
|
|
181
|
+
const body = codedBodySnapshot(ownData(detail, 'detail'), true);
|
|
182
|
+
return body !== undefined && Object.keys(body).length > 0 ? body : undefined;
|
|
183
|
+
}
|
|
184
|
+
catch {
|
|
185
|
+
return undefined;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
export function terminalCodedDetailOf(carrier) {
|
|
189
|
+
try {
|
|
190
|
+
if (typeof carrier !== 'object' || carrier === null || Array.isArray(carrier))
|
|
191
|
+
return undefined;
|
|
192
|
+
const body = codedBodySnapshot(ownData(carrier, '_sema_coded_detail'), true);
|
|
193
|
+
return body !== undefined && Object.keys(body).length > 0 ? body : undefined;
|
|
194
|
+
}
|
|
195
|
+
catch {
|
|
196
|
+
return undefined;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
151
199
|
function failureDetailOf(cause) {
|
|
152
200
|
try {
|
|
153
201
|
const own = ownValueOf;
|
|
@@ -185,21 +233,8 @@ function failureDetailOf(cause) {
|
|
|
185
233
|
};
|
|
186
234
|
}
|
|
187
235
|
if (kind === CODED_DETAIL_KIND) {
|
|
188
|
-
const
|
|
189
|
-
|
|
190
|
-
return undefined;
|
|
191
|
-
let snap;
|
|
192
|
-
try {
|
|
193
|
-
snap = jsonSnapshot(inner, 0, { budget: CODED_DETAIL_BUDGET, path: new Set() });
|
|
194
|
-
}
|
|
195
|
-
catch (e) {
|
|
196
|
-
if (e === CODED_DETAIL_OVER_BUDGET)
|
|
197
|
-
return undefined;
|
|
198
|
-
throw e;
|
|
199
|
-
}
|
|
200
|
-
if (snap === undefined || snap === null || typeof snap !== 'object' || Array.isArray(snap))
|
|
201
|
-
return undefined;
|
|
202
|
-
return { kind: CODED_DETAIL_KIND, detail: snap };
|
|
236
|
+
const snap = codedBodySnapshot(ownData(v, 'detail'));
|
|
237
|
+
return snap === undefined ? undefined : { kind: CODED_DETAIL_KIND, detail: snap };
|
|
203
238
|
}
|
|
204
239
|
if (kind === MODEL_OUTPUT_INVALID_DETAIL_KIND) {
|
|
205
240
|
const c = ownData(v, 'cause');
|
package/dist/sandboxWire.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export type SandboxParseResult = {
|
|
|
14
14
|
ok: false;
|
|
15
15
|
error: string;
|
|
16
16
|
};
|
|
17
|
-
export declare function
|
|
17
|
+
export declare function sandboxFromFlag(value?: string): SandboxParseResult;
|
|
18
18
|
export declare function sandboxRequestFields(sel: SandboxSelection | undefined): {
|
|
19
19
|
sandboxImageProfile?: string;
|
|
20
20
|
};
|
package/dist/sandboxWire.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { lastFlagValue } from './argvFlagValue.js';
|
|
2
1
|
import { CAPABILITY_IMAGE_INDEX_REQUIRED, CAPABILITY_K8S_LANE_REQUIRED, isStatusDerivedCoarseCode, NOT_FOUND_IMAGE, REQUEST_FIELD_CONFLICT, REQUEST_PRECONDITION_UNMET } from './engineErrorCodes.js';
|
|
3
2
|
import { THROWN_SLOT_UNREADABLE, readThrownSlot } from './wireFailureShape.js';
|
|
4
3
|
const MAX_PROFILE_LEN = 128;
|
|
@@ -6,13 +5,12 @@ const USAGE_HINT = "sema: --sandbox expects a profile name or 'auto'.\n" +
|
|
|
6
5
|
' --sandbox <profile> run on that sandbox image profile (k8s-lane workers; list: sema cloud images list)\n' +
|
|
7
6
|
' --sandbox auto let the model pick via its SelectEnvironment tool (advisory — choice + reason shown in the reply)\n' +
|
|
8
7
|
' (no flag) the worker default image';
|
|
9
|
-
export function
|
|
10
|
-
|
|
11
|
-
if (!flag.present)
|
|
8
|
+
export function sandboxFromFlag(value) {
|
|
9
|
+
if (value === undefined)
|
|
12
10
|
return { ok: true, sel: { mode: 'default' } };
|
|
13
|
-
if (
|
|
11
|
+
if (typeof value !== 'string')
|
|
14
12
|
return { ok: false, error: USAGE_HINT };
|
|
15
|
-
const v =
|
|
13
|
+
const v = value.trim();
|
|
16
14
|
if (v.length === 0)
|
|
17
15
|
return { ok: false, error: USAGE_HINT };
|
|
18
16
|
if (/\s/.test(v)) {
|
package/dist/scenarioRefusal.js
CHANGED
|
@@ -34,7 +34,7 @@ export function scenarioRefusalOf(body) {
|
|
|
34
34
|
const d = Object.getOwnPropertyDescriptor(body, 'scenarioRefusal');
|
|
35
35
|
if (d === undefined)
|
|
36
36
|
return undefined;
|
|
37
|
-
raw = 'value'
|
|
37
|
+
raw = Object.hasOwn(d, 'value') ? d.value : undefined;
|
|
38
38
|
}
|
|
39
39
|
catch {
|
|
40
40
|
return null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type ScenarioCardSkillSource = 'factory' | 'center' | 'unknown-source';
|
|
2
|
+
export interface ScenarioCardSkill {
|
|
3
|
+
readonly name: string;
|
|
4
|
+
readonly description: string;
|
|
5
|
+
readonly source: ScenarioCardSkillSource;
|
|
6
|
+
}
|
|
7
|
+
export declare function scenarioSkillsOf(card: object | null | undefined): readonly ScenarioCardSkill[] | undefined;
|
|
8
|
+
export type ScenarioSkillsCapabilityReading = {
|
|
9
|
+
readonly kind: 'confirmed';
|
|
10
|
+
} | {
|
|
11
|
+
readonly kind: 'absent';
|
|
12
|
+
} | {
|
|
13
|
+
readonly kind: 'declined';
|
|
14
|
+
} | {
|
|
15
|
+
readonly kind: 'unreadable';
|
|
16
|
+
} | {
|
|
17
|
+
readonly kind: 'unobserved';
|
|
18
|
+
};
|
|
19
|
+
export declare function observedScenarioSkillsCapability(baseUrl?: string | undefined): ScenarioSkillsCapabilityReading;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { engineCapValue } from './engineCapsCache.js';
|
|
2
|
+
import { engineWireTargetBaseUrl } from './engineWireTarget.js';
|
|
3
|
+
import { appendOwnElement, guardedRead, readOwnDataValue } from './ownKey.js';
|
|
4
|
+
const SKILLS_READ_BUDGET = 100_000;
|
|
5
|
+
function skillOfEntry(raw) {
|
|
6
|
+
try {
|
|
7
|
+
if (typeof raw !== 'object' || raw === null || Array.isArray(raw))
|
|
8
|
+
return undefined;
|
|
9
|
+
const name = readOwnDataValue(raw, 'name');
|
|
10
|
+
if (typeof name !== 'string' || name.length === 0)
|
|
11
|
+
return undefined;
|
|
12
|
+
const description = readOwnDataValue(raw, 'description');
|
|
13
|
+
if (typeof description !== 'string')
|
|
14
|
+
return undefined;
|
|
15
|
+
const source = guardedRead(() => readOwnDataValue(raw, 'source'));
|
|
16
|
+
return Object.freeze({
|
|
17
|
+
name,
|
|
18
|
+
description,
|
|
19
|
+
source: source === 'factory' || source === 'center' ? source : 'unknown-source',
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export function scenarioSkillsOf(card) {
|
|
27
|
+
try {
|
|
28
|
+
if (typeof card !== 'object' || card === null)
|
|
29
|
+
return undefined;
|
|
30
|
+
const list = readOwnDataValue(card, 'skills');
|
|
31
|
+
if (!Array.isArray(list))
|
|
32
|
+
return undefined;
|
|
33
|
+
const lengthDesc = Object.getOwnPropertyDescriptor(list, 'length');
|
|
34
|
+
const length = lengthDesc !== undefined && Object.hasOwn(lengthDesc, 'value') ? lengthDesc.value : undefined;
|
|
35
|
+
if (typeof length !== 'number' || !Number.isSafeInteger(length) || length < 0 || length > SKILLS_READ_BUDGET)
|
|
36
|
+
return undefined;
|
|
37
|
+
const out = [];
|
|
38
|
+
for (let i = 0; i < length; i++) {
|
|
39
|
+
const entry = guardedRead(() => skillOfEntry(readOwnDataValue(list, String(i))));
|
|
40
|
+
if (entry !== undefined)
|
|
41
|
+
appendOwnElement(out, entry);
|
|
42
|
+
}
|
|
43
|
+
if (length > 0 && out.length === 0)
|
|
44
|
+
return undefined;
|
|
45
|
+
return Object.freeze(out);
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const SCENARIO_SKILLS_CAPABILITY_KEY = 'scenarioSkills';
|
|
52
|
+
export function observedScenarioSkillsCapability(baseUrl) {
|
|
53
|
+
try {
|
|
54
|
+
const base = baseUrl === undefined ? engineWireTargetBaseUrl() : baseUrl;
|
|
55
|
+
const slot = engineCapValue(typeof base === 'string' ? base : undefined, SCENARIO_SKILLS_CAPABILITY_KEY);
|
|
56
|
+
switch (slot.kind) {
|
|
57
|
+
case 'unobserved':
|
|
58
|
+
return Object.freeze({ kind: 'unobserved' });
|
|
59
|
+
case 'not_reported':
|
|
60
|
+
return Object.freeze({ kind: 'absent' });
|
|
61
|
+
case 'unreadable':
|
|
62
|
+
return Object.freeze({ kind: 'unreadable' });
|
|
63
|
+
case 'null':
|
|
64
|
+
return Object.freeze({ kind: 'declined' });
|
|
65
|
+
case 'value':
|
|
66
|
+
return slot.value === true ? Object.freeze({ kind: 'confirmed' }) : Object.freeze({ kind: 'declined' });
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
return Object.freeze({ kind: 'unobserved' });
|
|
71
|
+
}
|
|
72
|
+
}
|
package/dist/scenarioWire.d.ts
CHANGED
|
@@ -8,6 +8,9 @@ export type ScenarioParseResult = {
|
|
|
8
8
|
ok: false;
|
|
9
9
|
error: string;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export interface ScenarioFlag {
|
|
12
|
+
readonly flag?: string;
|
|
13
|
+
readonly missing?: true;
|
|
14
|
+
}
|
|
12
15
|
export declare function headlessScenarioFromEnv(env?: EnvLike): string | undefined;
|
|
13
|
-
export declare function scenarioForPrint(
|
|
16
|
+
export declare function scenarioForPrint(flag: ScenarioFlag | undefined, env?: EnvLike): ScenarioParseResult;
|
package/dist/scenarioWire.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { hostEnv } from './hostEnv.js';
|
|
2
|
-
import {
|
|
2
|
+
import { flagIsWronglyTyped, flagString, flagTrue } from './flagInput.js';
|
|
3
3
|
export const SCENARIO_NAME_RE = /^[a-z][a-z0-9-]{1,31}$/;
|
|
4
4
|
export const HEADLESS_SCENARIO_ENV = 'SEMA_HEADLESS_SCENARIO';
|
|
5
5
|
const USAGE_HINT = "sema: --scenario expects a scenario name (lowercase letters/digits/hyphens, starting with a letter, ≤32 chars).\n" +
|
|
6
6
|
' --scenario <name> route this run through the named engine scenario (deployment-defined tool\n' +
|
|
7
7
|
' roster + system prompt; unknown names are refused by the engine (scenario_unknown))\n' +
|
|
8
8
|
' (no flag) the default scenario — today\'s behaviour';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
if (!flag.present)
|
|
12
|
-
return { ok: true };
|
|
13
|
-
if (flag.raw === undefined)
|
|
9
|
+
function parseScenarioFlag(input) {
|
|
10
|
+
if (flagIsWronglyTyped(input, 'flag'))
|
|
14
11
|
return { ok: false, error: USAGE_HINT };
|
|
15
|
-
const
|
|
12
|
+
const value = flagString(input, 'flag');
|
|
13
|
+
if (value === undefined)
|
|
14
|
+
return flagTrue(input, 'missing') ? { ok: false, error: USAGE_HINT } : { ok: true };
|
|
15
|
+
const v = value.trim();
|
|
16
16
|
if (/\s/.test(v)) {
|
|
17
17
|
return {
|
|
18
18
|
ok: false,
|
|
@@ -36,8 +36,8 @@ export function headlessScenarioFromEnv(env = hostEnv()) {
|
|
|
36
36
|
}
|
|
37
37
|
return v;
|
|
38
38
|
}
|
|
39
|
-
export function scenarioForPrint(
|
|
40
|
-
const parsed =
|
|
39
|
+
export function scenarioForPrint(flag, env = hostEnv()) {
|
|
40
|
+
const parsed = parseScenarioFlag(flag);
|
|
41
41
|
if (!parsed.ok)
|
|
42
42
|
return parsed;
|
|
43
43
|
if (parsed.scenario)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { engineWireTargetBaseUrl } from './engineWireTarget.js';
|
|
2
2
|
import { createEngineCapReader } from './engineCapReader.js';
|
|
3
3
|
import { ownDataField } from './ownKey.js';
|
|
4
4
|
function ownNonEmpty(seg, key) {
|
|
@@ -29,6 +29,6 @@ const reader = createEngineCapReader({
|
|
|
29
29
|
name: 'sealedKey',
|
|
30
30
|
project: projectSealedKeyCapability,
|
|
31
31
|
});
|
|
32
|
-
export function observedSealedKey(baseUrl =
|
|
32
|
+
export function observedSealedKey(baseUrl = engineWireTargetBaseUrl()) {
|
|
33
33
|
return reader.observed(baseUrl);
|
|
34
34
|
}
|
package/dist/seam.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import type { WiringManifestFleetView } from './adapter/downstream/wiringManifes
|
|
|
7
7
|
import type { SuspendedReopenReading } from './hitl/suspendedReopen.js';
|
|
8
8
|
import type { ToolKillCause } from './toolResult.js';
|
|
9
9
|
import type { HumanInputAttachmentView } from './ownKey.js';
|
|
10
|
+
import type { TaskNotificationFields } from './notifications.js';
|
|
10
11
|
export interface AbortSignalLike {
|
|
11
12
|
readonly aborted: boolean;
|
|
12
13
|
}
|
|
@@ -115,6 +116,7 @@ export type ChromeEvent = {
|
|
|
115
116
|
status: 'completed' | 'failed';
|
|
116
117
|
summary: string;
|
|
117
118
|
message: string;
|
|
119
|
+
notification: Readonly<TaskNotificationFields>;
|
|
118
120
|
} | {
|
|
119
121
|
kind: 'task_ledger_sync';
|
|
120
122
|
laneProof: LaneProof;
|
package/dist/seam.js
CHANGED
|
@@ -201,14 +201,14 @@ export function terminalOwnerOf(row) {
|
|
|
201
201
|
if (typeof row !== 'object' || row === null)
|
|
202
202
|
return undefined;
|
|
203
203
|
const d = Object.getOwnPropertyDescriptor(row, SEMA_TERMINAL_OWNER_KEY);
|
|
204
|
-
if (d === undefined || !('value'
|
|
204
|
+
if (d === undefined || !Object.hasOwn(d, 'value'))
|
|
205
205
|
return undefined;
|
|
206
206
|
const v = d.value;
|
|
207
207
|
if (typeof v !== 'object' || v === null)
|
|
208
208
|
return undefined;
|
|
209
209
|
const own = (k) => {
|
|
210
210
|
const pd = Object.getOwnPropertyDescriptor(v, k);
|
|
211
|
-
return pd !== undefined && 'value'
|
|
211
|
+
return pd !== undefined && Object.hasOwn(pd, 'value') && typeof pd.value === 'string' && pd.value.length > 0 ? pd.value : undefined;
|
|
212
212
|
};
|
|
213
213
|
const kind = own('kind');
|
|
214
214
|
if (kind === 'request-not-sent') {
|
package/dist/seatContract.d.ts
CHANGED
|
@@ -79,7 +79,52 @@ export interface ToolPermissionRequest {
|
|
|
79
79
|
declare const SEAT_EVENT_TYPE_TUPLE: readonly ["start", "close", "session_updated", "message", "stream_event", "chrome_event", "error", "tool_permission_resolved", "subagent_content"];
|
|
80
80
|
export type SeatEventType = (typeof SEAT_EVENT_TYPE_TUPLE)[number];
|
|
81
81
|
export declare const SEAT_EVENT_TYPES: readonly SeatEventType[];
|
|
82
|
-
declare const
|
|
82
|
+
declare const CHROME_ARM_SEAT_ROUTE: {
|
|
83
|
+
readonly panel_task: "seat";
|
|
84
|
+
readonly notification_terminal: "seat";
|
|
85
|
+
readonly prompt_suggestions: "seat";
|
|
86
|
+
readonly subagent_lifecycle: "seat";
|
|
87
|
+
readonly text_segment_end: "seat";
|
|
88
|
+
readonly thinking_segment_end: "seat";
|
|
89
|
+
readonly retry_status: "seat";
|
|
90
|
+
readonly context_usage: "seat";
|
|
91
|
+
readonly last_turn_usage: "seat";
|
|
92
|
+
readonly bgshell_register: "seat";
|
|
93
|
+
readonly bgshell_settle: "seat";
|
|
94
|
+
readonly memory_saved: "seat";
|
|
95
|
+
readonly result_replayed: "seat";
|
|
96
|
+
readonly tool_parked: "seat";
|
|
97
|
+
readonly compaction_started: "seat";
|
|
98
|
+
readonly compaction_outcome: "seat";
|
|
99
|
+
readonly engine_notice: "seat";
|
|
100
|
+
readonly workflow_notification_enqueue: "host";
|
|
101
|
+
readonly plan_review_park: "host";
|
|
102
|
+
readonly approval_request: "host";
|
|
103
|
+
readonly approval_revoke: "host";
|
|
104
|
+
readonly task_ledger_sync: "host";
|
|
105
|
+
readonly inline_task_stats: "host";
|
|
106
|
+
readonly stream_delta: "host";
|
|
107
|
+
readonly thinking_activity: "host";
|
|
108
|
+
readonly request_start: "host";
|
|
109
|
+
readonly response_metrics: "host";
|
|
110
|
+
readonly attachment: "host";
|
|
111
|
+
readonly subagent_turn_usage: "host";
|
|
112
|
+
readonly run_cost_reconciled: "host";
|
|
113
|
+
readonly message_committed: "host";
|
|
114
|
+
readonly human_input: "host";
|
|
115
|
+
readonly tool_roster_delta: "host";
|
|
116
|
+
readonly subagent_started: "host";
|
|
117
|
+
readonly prompt_assembled: "host";
|
|
118
|
+
readonly tool_disclosure: "host";
|
|
119
|
+
readonly tool_progress: "host";
|
|
120
|
+
readonly wiring_manifest: "host";
|
|
121
|
+
readonly suspended_reopened: "host";
|
|
122
|
+
readonly result_text_diverged: "host";
|
|
123
|
+
};
|
|
124
|
+
type SeatRoutedKind = {
|
|
125
|
+
[K in keyof typeof CHROME_ARM_SEAT_ROUTE]: (typeof CHROME_ARM_SEAT_ROUTE)[K] extends "seat" ? K : never;
|
|
126
|
+
}[keyof typeof CHROME_ARM_SEAT_ROUTE];
|
|
127
|
+
declare const CHROME_EVENT_KIND_TUPLE: readonly SeatRoutedKind[];
|
|
83
128
|
export type ChromeEventKind = Extract<ChromeArmKind, (typeof CHROME_EVENT_KIND_TUPLE)[number]>;
|
|
84
129
|
export declare const CHROME_EVENT_KINDS: readonly ChromeEventKind[];
|
|
85
130
|
export interface SeatChromeEnvelopeBase {
|
package/dist/seatContract.js
CHANGED
|
@@ -62,7 +62,7 @@ const firstAccessorPath = (root) => {
|
|
|
62
62
|
const at = path === "" ? k : `${path}.${k}`;
|
|
63
63
|
if (!Object.hasOwn(d, "value"))
|
|
64
64
|
return at;
|
|
65
|
-
stack.
|
|
65
|
+
Object.defineProperty(stack, stack.length, { value: [d.value, at], writable: true, enumerable: true, configurable: true });
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
return undefined;
|
|
@@ -197,7 +197,7 @@ const firstSecretKeyPath = (root, allow) => {
|
|
|
197
197
|
const at = isArr && /^[0-9]+$/.test(k) ? `${path}[${k}]` : pathAt(path, k);
|
|
198
198
|
if (isSecretKeyName(k) && !allow.has(at))
|
|
199
199
|
return at;
|
|
200
|
-
stack.
|
|
200
|
+
Object.defineProperty(stack, stack.length, { value: [d.value, at], writable: true, enumerable: true, configurable: true });
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
return undefined;
|
|
@@ -251,22 +251,49 @@ const SEAT_EVENT_TYPE_TUPLE = [
|
|
|
251
251
|
"subagent_content",
|
|
252
252
|
];
|
|
253
253
|
export const SEAT_EVENT_TYPES = Object.freeze(SEAT_EVENT_TYPE_TUPLE);
|
|
254
|
-
const
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
254
|
+
const CHROME_ARM_SEAT_ROUTE = {
|
|
255
|
+
panel_task: "seat",
|
|
256
|
+
notification_terminal: "seat",
|
|
257
|
+
prompt_suggestions: "seat",
|
|
258
|
+
subagent_lifecycle: "seat",
|
|
259
|
+
text_segment_end: "seat",
|
|
260
|
+
thinking_segment_end: "seat",
|
|
261
|
+
retry_status: "seat",
|
|
262
|
+
context_usage: "seat",
|
|
263
|
+
last_turn_usage: "seat",
|
|
264
|
+
bgshell_register: "seat",
|
|
265
|
+
bgshell_settle: "seat",
|
|
266
|
+
memory_saved: "seat",
|
|
267
|
+
result_replayed: "seat",
|
|
268
|
+
tool_parked: "seat",
|
|
269
|
+
compaction_started: "seat",
|
|
270
|
+
compaction_outcome: "seat",
|
|
271
|
+
engine_notice: "seat",
|
|
272
|
+
workflow_notification_enqueue: "host",
|
|
273
|
+
plan_review_park: "host",
|
|
274
|
+
approval_request: "host",
|
|
275
|
+
approval_revoke: "host",
|
|
276
|
+
task_ledger_sync: "host",
|
|
277
|
+
inline_task_stats: "host",
|
|
278
|
+
stream_delta: "host",
|
|
279
|
+
thinking_activity: "host",
|
|
280
|
+
request_start: "host",
|
|
281
|
+
response_metrics: "host",
|
|
282
|
+
attachment: "host",
|
|
283
|
+
subagent_turn_usage: "host",
|
|
284
|
+
run_cost_reconciled: "host",
|
|
285
|
+
message_committed: "host",
|
|
286
|
+
human_input: "host",
|
|
287
|
+
tool_roster_delta: "host",
|
|
288
|
+
subagent_started: "host",
|
|
289
|
+
prompt_assembled: "host",
|
|
290
|
+
tool_disclosure: "host",
|
|
291
|
+
tool_progress: "host",
|
|
292
|
+
wiring_manifest: "host",
|
|
293
|
+
suspended_reopened: "host",
|
|
294
|
+
result_text_diverged: "host",
|
|
295
|
+
};
|
|
296
|
+
const CHROME_EVENT_KIND_TUPLE = Object.keys(CHROME_ARM_SEAT_ROUTE).filter((k) => CHROME_ARM_SEAT_ROUTE[k] === "seat");
|
|
270
297
|
export const CHROME_EVENT_KINDS = Object.freeze(CHROME_EVENT_KIND_TUPLE);
|
|
271
298
|
const LANE_PROOF_LANE_TUPLE = ["main", "subagent", "workflow"];
|
|
272
299
|
export const SEAT_CHROME_ENVELOPE_KEYS = ["kind", "laneProof"];
|
|
@@ -340,7 +367,7 @@ export function seatCapability(state, name) {
|
|
|
340
367
|
const desc = Object.getOwnPropertyDescriptor(state, name);
|
|
341
368
|
if (desc === undefined)
|
|
342
369
|
return notReported();
|
|
343
|
-
if (!("value"
|
|
370
|
+
if (!Object.hasOwn(desc, "value"))
|
|
344
371
|
return malformedReading();
|
|
345
372
|
const v = desc.value;
|
|
346
373
|
if (v === undefined)
|
|
@@ -1084,9 +1111,11 @@ const SEAT_CHROME_PAYLOAD_SPECS = {
|
|
|
1084
1111
|
registration: reqF(shapeRule("registration", {
|
|
1085
1112
|
kind: reqF(oneOfRule("registration kind", ["register"])),
|
|
1086
1113
|
taskId: reqF(R_NONEMPTY),
|
|
1114
|
+
toolUseId: optF(R_NONEMPTY),
|
|
1087
1115
|
command: reqF(R_STR),
|
|
1088
1116
|
description: optF(R_STR),
|
|
1089
1117
|
receipt: reqF(R_STR),
|
|
1118
|
+
outputFile: optF(R_NONEMPTY),
|
|
1090
1119
|
source: reqF(oneOfRule("registration source", ["bash", "monitor"])),
|
|
1091
1120
|
})),
|
|
1092
1121
|
},
|
|
@@ -2021,5 +2050,6 @@ const _seatContractPins = [
|
|
|
2021
2050
|
true, true, true,
|
|
2022
2051
|
true,
|
|
2023
2052
|
true, true, true,
|
|
2053
|
+
true, true,
|
|
2024
2054
|
];
|
|
2025
2055
|
void _seatContractPins;
|
|
@@ -43,7 +43,7 @@ function ownRead(o, key) {
|
|
|
43
43
|
const d = Object.getOwnPropertyDescriptor(o, key);
|
|
44
44
|
if (d === undefined)
|
|
45
45
|
return ABSENT;
|
|
46
|
-
if ('get'
|
|
46
|
+
if (Object.hasOwn(d, 'get') || Object.hasOwn(d, 'set'))
|
|
47
47
|
return ACCESSOR;
|
|
48
48
|
return { kind: 'data', value: d.value };
|
|
49
49
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { engineWireTargetBaseUrl } from './engineWireTarget.js';
|
|
2
2
|
import { createEngineCapReader, unreadableReadingDetail } from './engineCapReader.js';
|
|
3
3
|
import { msg, renderMessage } from './i18n/translate.js';
|
|
4
4
|
import { ownDataField } from './ownKey.js';
|
|
@@ -22,7 +22,7 @@ const reader = createEngineCapReader({
|
|
|
22
22
|
name: 'sessionPolicy',
|
|
23
23
|
project: projectSessionPolicyCapability,
|
|
24
24
|
});
|
|
25
|
-
export function observedSessionPolicy(baseUrl =
|
|
25
|
+
export function observedSessionPolicy(baseUrl = engineWireTargetBaseUrl()) {
|
|
26
26
|
return reader.observed(baseUrl);
|
|
27
27
|
}
|
|
28
28
|
export function sessionPolicyFaceAvailable(reading) {
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { guardedRead, readOwnDataValue } from './ownKey.js';
|
|
2
|
+
export function sessionRulesChildrenReadLiveOf(manifest) {
|
|
3
|
+
const raw = guardedRead(() => readOwnDataValue(readOwnDataValue(manifest, 'sessionRules'), 'childrenReadLive'));
|
|
4
|
+
return typeof raw === 'boolean' ? raw : undefined;
|
|
5
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type SessionRulesNamespaceFormsReading = {
|
|
2
|
+
readonly kind: 'confirmed';
|
|
3
|
+
} | {
|
|
4
|
+
readonly kind: 'absent';
|
|
5
|
+
} | {
|
|
6
|
+
readonly kind: 'declined';
|
|
7
|
+
} | {
|
|
8
|
+
readonly kind: 'unreadable';
|
|
9
|
+
} | {
|
|
10
|
+
readonly kind: 'unobserved';
|
|
11
|
+
};
|
|
12
|
+
export declare function observedSessionRulesNamespaceForms(baseUrl?: string | undefined): SessionRulesNamespaceFormsReading;
|