@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
|
@@ -16,6 +16,8 @@ export declare const CONFIG_MEMORY_WRITE_SCOPE_MISMATCH = "config.memory_write_s
|
|
|
16
16
|
export declare const CONFIG_LEGACY_TOOL_NAME = "config.legacy_tool_name";
|
|
17
17
|
export declare const CONFIG_IMAGE_INVALID = "config.image_invalid";
|
|
18
18
|
export declare function imageInvalidFailureNoteOf(code: string | undefined): string | undefined;
|
|
19
|
+
export declare const CONFIG_AGENT_UNKNOWN_TOOL = "config.agent.unknown_tool";
|
|
20
|
+
export declare const CONFIG_OUTPUT_STYLE_INVALID = "config.output_style_invalid";
|
|
19
21
|
export declare const CONFIG_REFUSAL_CODES: ReadonlySet<string>;
|
|
20
22
|
export declare const RULES_LEGACY_TOOL_NAME = "rules.legacy_tool_name";
|
|
21
23
|
export declare function isRulesRefusalCode(code: string | undefined): boolean;
|
|
@@ -52,6 +54,7 @@ export declare const RESUME_USAGE_WINDOW_EXHAUSTED = "resume.usage_window_exhaus
|
|
|
52
54
|
export declare const RESUME_PREFLIGHT_REJECTED = "resume.preflight_rejected";
|
|
53
55
|
export declare const RESUME_SESSION_NOT_FOUND = "resume.session_not_found";
|
|
54
56
|
export declare const REQUEST_FIELD_CONFLICT = "request.field_conflict";
|
|
57
|
+
export declare const REQUEST_AUTONOMY_LANE_REFUSED = "request.autonomy_lane_refused";
|
|
55
58
|
export declare const CHECKPOINT_UNSUPPORTED_VERSION = "checkpoint.unsupported_version";
|
|
56
59
|
export declare function refusalSaysStillPending(err: object): boolean;
|
|
57
60
|
export type StatusDerivedCoarseCode = (typeof STATUS_DERIVED_COARSE_CODES)[number];
|
|
@@ -74,7 +77,7 @@ export declare const DECIDE_CLAIM_LOST = "decide.claim_lost";
|
|
|
74
77
|
export declare const DECIDE_PARK_MOVED_CODES: readonly string[];
|
|
75
78
|
export declare function isDecideParkMovedCode(code: string | null | undefined): boolean;
|
|
76
79
|
export declare const ASK_GONE = "gone.ask";
|
|
77
|
-
export declare const ASK_GONE_DENIED_WORD
|
|
80
|
+
export declare const ASK_GONE_DENIED_WORD: "routing_failure_fail_closed";
|
|
78
81
|
export declare const RUN_STALLED = "run.stalled";
|
|
79
82
|
export declare const RUN_ORPHANED = "run.orphaned";
|
|
80
83
|
export declare const APPROVAL_EXPIRED = "approval.expired";
|
|
@@ -82,6 +85,7 @@ export declare const RUN_DEATH_VERDICT_CODES: readonly ["run.stalled", "run.orph
|
|
|
82
85
|
export type RunDeathVerdictCode = (typeof RUN_DEATH_VERDICT_CODES)[number];
|
|
83
86
|
export declare function runDeathVerdictNoteOf(code: string | undefined): string | undefined;
|
|
84
87
|
export declare const CAPABILITY_OPERATOR_PRINCIPALS_REQUIRED = "capability.operator_principals_required";
|
|
88
|
+
export declare const COMPACT_NOT_RUNNING = "compact.not_running";
|
|
85
89
|
export declare function isUnavailableFaceCode(code: string | undefined): boolean;
|
|
86
90
|
export type OperatorGateRefusal = 'operator_only' | 'operators_unconfigured';
|
|
87
91
|
export declare function operatorGateRefusalContent(cause: OperatorGateRefusal): string | undefined;
|
package/dist/engineErrorCodes.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { frozenSet } from './frozenSet.js';
|
|
2
2
|
import { CORE_TOOL_DECLARATION_CODES } from './generated/engineFactTables.js';
|
|
3
|
+
import { SDK_DENY_REASON_ROUTING_FAILURE, SDK_STATUS_DERIVED_COARSE_CODES } from './generated/sdkFactTables.js';
|
|
3
4
|
export const LIMITS_MAX_TOKENS_EXCEEDED = 'limits.max_tokens_exceeded';
|
|
4
5
|
export const LIMITS_MAX_COST_EXCEEDED = 'limits.max_cost_exceeded';
|
|
5
6
|
export const LIMITS_MAX_TURNS_EXCEEDED = 'limits.max_turns_exceeded';
|
|
@@ -25,6 +26,8 @@ const IMAGE_INVALID_FAILURE_NOTE = 'This run did not start: an image sent with t
|
|
|
25
26
|
export function imageInvalidFailureNoteOf(code) {
|
|
26
27
|
return code === CONFIG_IMAGE_INVALID ? IMAGE_INVALID_FAILURE_NOTE : undefined;
|
|
27
28
|
}
|
|
29
|
+
export const CONFIG_AGENT_UNKNOWN_TOOL = 'config.agent.unknown_tool';
|
|
30
|
+
export const CONFIG_OUTPUT_STYLE_INVALID = 'config.output_style_invalid';
|
|
28
31
|
export const CONFIG_REFUSAL_CODES = frozenSet([
|
|
29
32
|
CONFIG_LIMIT_INVALID,
|
|
30
33
|
CONFIG_STRATEGY_FIND_LIMIT_INVALID,
|
|
@@ -35,6 +38,8 @@ export const CONFIG_REFUSAL_CODES = frozenSet([
|
|
|
35
38
|
CONFIG_MEMORY_WRITE_SCOPE_MISMATCH,
|
|
36
39
|
CONFIG_LEGACY_TOOL_NAME,
|
|
37
40
|
CONFIG_IMAGE_INVALID,
|
|
41
|
+
CONFIG_AGENT_UNKNOWN_TOOL,
|
|
42
|
+
CONFIG_OUTPUT_STYLE_INVALID,
|
|
38
43
|
...CORE_TOOL_DECLARATION_CODES,
|
|
39
44
|
]);
|
|
40
45
|
export const RULES_LEGACY_TOOL_NAME = 'rules.legacy_tool_name';
|
|
@@ -92,17 +97,7 @@ export const STOP_CONFLICT_CODES = Object.freeze([
|
|
|
92
97
|
]);
|
|
93
98
|
export const OUTPUT_INVALID = 'output.invalid';
|
|
94
99
|
export const RESUME_POLICY_FOLD_CODE = 'resume_blocked_by_policy';
|
|
95
|
-
export const STATUS_DERIVED_COARSE_CODES =
|
|
96
|
-
'request.rejected',
|
|
97
|
-
'auth.unauthorized',
|
|
98
|
-
'auth.forbidden',
|
|
99
|
-
'not_found.resource',
|
|
100
|
-
'request.payload_too_large',
|
|
101
|
-
'request.unprocessable',
|
|
102
|
-
'limit.rate_exceeded',
|
|
103
|
-
'capability.unavailable',
|
|
104
|
-
'internal.error',
|
|
105
|
-
]);
|
|
100
|
+
export const STATUS_DERIVED_COARSE_CODES = SDK_STATUS_DERIVED_COARSE_CODES;
|
|
106
101
|
export function isStatusDerivedCoarseCode(code) {
|
|
107
102
|
return typeof code === 'string' && STATUS_DERIVED_COARSE_CODES.includes(code);
|
|
108
103
|
}
|
|
@@ -115,6 +110,7 @@ export const RESUME_USAGE_WINDOW_EXHAUSTED = 'resume.usage_window_exhausted';
|
|
|
115
110
|
export const RESUME_PREFLIGHT_REJECTED = 'resume.preflight_rejected';
|
|
116
111
|
export const RESUME_SESSION_NOT_FOUND = 'resume.session_not_found';
|
|
117
112
|
export const REQUEST_FIELD_CONFLICT = 'request.field_conflict';
|
|
113
|
+
export const REQUEST_AUTONOMY_LANE_REFUSED = 'request.autonomy_lane_refused';
|
|
118
114
|
export const CHECKPOINT_UNSUPPORTED_VERSION = 'checkpoint.unsupported_version';
|
|
119
115
|
export function refusalSaysStillPending(err) {
|
|
120
116
|
try {
|
|
@@ -161,7 +157,7 @@ export function isDecideParkMovedCode(code) {
|
|
|
161
157
|
return typeof code === 'string' && DECIDE_PARK_MOVED_CODES.includes(code);
|
|
162
158
|
}
|
|
163
159
|
export const ASK_GONE = 'gone.ask';
|
|
164
|
-
export const ASK_GONE_DENIED_WORD =
|
|
160
|
+
export const ASK_GONE_DENIED_WORD = SDK_DENY_REASON_ROUTING_FAILURE;
|
|
165
161
|
export const RUN_STALLED = 'run.stalled';
|
|
166
162
|
export const RUN_ORPHANED = 'run.orphaned';
|
|
167
163
|
export const APPROVAL_EXPIRED = 'approval.expired';
|
|
@@ -181,6 +177,7 @@ export function runDeathVerdictNoteOf(code) {
|
|
|
181
177
|
return undefined;
|
|
182
178
|
}
|
|
183
179
|
export const CAPABILITY_OPERATOR_PRINCIPALS_REQUIRED = 'capability.operator_principals_required';
|
|
180
|
+
export const COMPACT_NOT_RUNNING = 'compact.not_running';
|
|
184
181
|
export function isUnavailableFaceCode(code) {
|
|
185
182
|
return typeof code === 'string' && (code.startsWith('capability.') || code.startsWith('feature.'));
|
|
186
183
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CORE_TOOL_TURN_INCOMPLETE_CAUSES, CORE_USER_INPUT_UNDRAINED_CAUSES } from './generated/engineNoticeTables.js';
|
|
1
|
+
import { CORE_TOOL_TURN_INCOMPLETE_CAUSES, CORE_USER_INPUT_UNDRAINED_CAUSES, CORE_USER_INPUT_UNDRAINED_FAMILIES } from './generated/engineNoticeTables.js';
|
|
2
2
|
export type NoticeAudience = 'user' | 'operator';
|
|
3
3
|
export declare const ENGINE_NOTICE_CODES: readonly string[];
|
|
4
4
|
export declare function engineNoticeInCatalog(code: unknown): boolean;
|
|
@@ -146,8 +146,27 @@ export interface ModelUnreachableFactsView {
|
|
|
146
146
|
proxyInUse?: string;
|
|
147
147
|
remedy: string;
|
|
148
148
|
sessionId: string;
|
|
149
|
+
taskId?: string;
|
|
149
150
|
}
|
|
150
151
|
export declare function readModelUnreachable(notice: unknown): ModelUnreachableFactsView | undefined;
|
|
152
|
+
export interface AllowedToolNotGrantedEntryView {
|
|
153
|
+
source: string;
|
|
154
|
+
entry: string;
|
|
155
|
+
entryShown: string;
|
|
156
|
+
reason: string;
|
|
157
|
+
skill?: string;
|
|
158
|
+
skillShown?: string;
|
|
159
|
+
list?: string;
|
|
160
|
+
verdict?: string;
|
|
161
|
+
currentName?: string;
|
|
162
|
+
currentNameShown?: string;
|
|
163
|
+
valueType?: string;
|
|
164
|
+
}
|
|
165
|
+
export interface AllowedToolNotGrantedFactsView {
|
|
166
|
+
entries: readonly AllowedToolNotGrantedEntryView[];
|
|
167
|
+
sessionId?: string;
|
|
168
|
+
}
|
|
169
|
+
export declare function readAllowedToolNotGranted(notice: unknown): AllowedToolNotGrantedFactsView | undefined;
|
|
151
170
|
export type ToolTurnIncompleteCause = (typeof CORE_TOOL_TURN_INCOMPLETE_CAUSES)[number];
|
|
152
171
|
export interface ToolTurnIncompleteFactsView {
|
|
153
172
|
cause: string;
|
|
@@ -159,7 +178,7 @@ export interface ToolTurnIncompleteFactsView {
|
|
|
159
178
|
export declare function readToolTurnIncomplete(notice: unknown): ToolTurnIncompleteFactsView | undefined;
|
|
160
179
|
export type UserSteerUndrainedCause = (typeof CORE_USER_INPUT_UNDRAINED_CAUSES)[number];
|
|
161
180
|
export interface UserInputUndrainedFactsView {
|
|
162
|
-
kind:
|
|
181
|
+
kind: keyof typeof CORE_USER_INPUT_UNDRAINED_FAMILIES;
|
|
163
182
|
count: number;
|
|
164
183
|
cause?: string;
|
|
165
184
|
taskId?: string;
|
|
@@ -199,6 +218,7 @@ export declare const ENGINE_NOTICE_FACT_READERS: Readonly<{
|
|
|
199
218
|
readonly 'permission.read_deny_unapplied': typeof readReadDenyUnapplied;
|
|
200
219
|
readonly 'context.tool_turn_repaired': typeof readToolTurnRepaired;
|
|
201
220
|
readonly 'server.model_unreachable': typeof readModelUnreachable;
|
|
221
|
+
readonly 'permission.allowed_tool_not_granted': typeof readAllowedToolNotGranted;
|
|
202
222
|
readonly 'task.tool_turn_incomplete': typeof readToolTurnIncomplete;
|
|
203
223
|
readonly 'task.user_steer_undrained': typeof readUserInputUndrained;
|
|
204
224
|
readonly 'task.user_followup_undrained': typeof readUserInputUndrained;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AUTO_MODE_UNAVAILABLE_CAUSES } from './autoModeUnavailable.js';
|
|
2
|
-
import {
|
|
2
|
+
import { displayUntrusted } from './displayUntrusted.js';
|
|
3
|
+
import { CORE_ENGINE_NOTICE_CODES, CORE_MCP_INJECTION_DROP_REASONS, CORE_NOTICE_AUDIENCE, CORE_USER_INPUT_UNDRAINED_FAMILIES, } from './generated/engineNoticeTables.js';
|
|
3
4
|
import { CORE_ASK_UNRESOLVABLE_CAUSES, CORE_DURABLE_MANDATE_SOURCES, CORE_PERMISSION_MODE_FOLD_REASONS, } from './generated/engineFactTables.js';
|
|
4
5
|
export const ENGINE_NOTICE_CODES = CORE_ENGINE_NOTICE_CODES;
|
|
5
6
|
const CATALOG = new Set(ENGINE_NOTICE_CODES);
|
|
@@ -520,7 +521,61 @@ function readModelUnreachableOf(notice) {
|
|
|
520
521
|
if (code === undefined || targetHost === undefined || remedy === undefined || sessionId === undefined)
|
|
521
522
|
return undefined;
|
|
522
523
|
const proxyInUse = nonEmpty(optionalOwnSeat(o, 'proxyInUse'));
|
|
523
|
-
|
|
524
|
+
const taskId = nonEmpty(optionalOwnSeat(o, 'taskId'));
|
|
525
|
+
return { code, targetHost, ...(proxyInUse !== undefined ? { proxyInUse } : {}), remedy, sessionId, ...(taskId !== undefined ? { taskId } : {}) };
|
|
526
|
+
}
|
|
527
|
+
const ALLOWED_TOOL_NOT_GRANTED_MAX_ENTRIES = 10_000;
|
|
528
|
+
export function readAllowedToolNotGranted(notice) {
|
|
529
|
+
return guardedRead(notice, readAllowedToolNotGrantedOf);
|
|
530
|
+
}
|
|
531
|
+
function readAllowedToolNotGrantedOf(notice) {
|
|
532
|
+
if (typeof notice !== 'object' || notice === null || Array.isArray(notice))
|
|
533
|
+
return undefined;
|
|
534
|
+
const n = notice;
|
|
535
|
+
if (ownSeat(n, 'code') !== 'permission.allowed_tool_not_granted')
|
|
536
|
+
return undefined;
|
|
537
|
+
const d = ownSeat(n, 'detail');
|
|
538
|
+
if (typeof d !== 'object' || d === null || Array.isArray(d))
|
|
539
|
+
return undefined;
|
|
540
|
+
const o = d;
|
|
541
|
+
const list = ownSeat(o, 'entries');
|
|
542
|
+
if (!Array.isArray(list))
|
|
543
|
+
return undefined;
|
|
544
|
+
const length = list.length;
|
|
545
|
+
if (length === 0 || length > ALLOWED_TOOL_NOT_GRANTED_MAX_ENTRIES)
|
|
546
|
+
return undefined;
|
|
547
|
+
const entries = [];
|
|
548
|
+
for (let i = 0; i < length; i++) {
|
|
549
|
+
if (!Object.hasOwn(list, i))
|
|
550
|
+
return undefined;
|
|
551
|
+
const item = list[i];
|
|
552
|
+
if (typeof item !== 'object' || item === null || Array.isArray(item))
|
|
553
|
+
return undefined;
|
|
554
|
+
const e = item;
|
|
555
|
+
const source = nonEmpty(ownSeat(e, 'source'));
|
|
556
|
+
const reason = nonEmpty(ownSeat(e, 'reason'));
|
|
557
|
+
const entry = ownSeat(e, 'entry');
|
|
558
|
+
if (source === undefined || reason === undefined || typeof entry !== 'string')
|
|
559
|
+
return undefined;
|
|
560
|
+
const skill = nonEmpty(optionalOwnSeat(e, 'skill'));
|
|
561
|
+
const which = nonEmpty(optionalOwnSeat(e, 'list'));
|
|
562
|
+
const verdict = nonEmpty(optionalOwnSeat(e, 'verdict'));
|
|
563
|
+
const currentName = nonEmpty(optionalOwnSeat(e, 'currentName'));
|
|
564
|
+
const valueType = nonEmpty(optionalOwnSeat(e, 'valueType'));
|
|
565
|
+
entries.push(Object.freeze({
|
|
566
|
+
source,
|
|
567
|
+
entry,
|
|
568
|
+
entryShown: displayUntrusted(entry),
|
|
569
|
+
reason,
|
|
570
|
+
...(skill !== undefined ? { skill, skillShown: displayUntrusted(skill) } : {}),
|
|
571
|
+
...(which !== undefined ? { list: which } : {}),
|
|
572
|
+
...(verdict !== undefined ? { verdict } : {}),
|
|
573
|
+
...(currentName !== undefined ? { currentName, currentNameShown: displayUntrusted(currentName) } : {}),
|
|
574
|
+
...(valueType !== undefined ? { valueType } : {}),
|
|
575
|
+
}));
|
|
576
|
+
}
|
|
577
|
+
const sessionId = nonEmpty(optionalOwnSeat(o, 'sessionId'));
|
|
578
|
+
return { entries: Object.freeze(entries), ...(sessionId !== undefined ? { sessionId } : {}) };
|
|
524
579
|
}
|
|
525
580
|
const positiveInt = (v) => (typeof v === 'number' && Number.isInteger(v) && v > 0 ? v : undefined);
|
|
526
581
|
export function readToolTurnIncomplete(notice) {
|
|
@@ -557,19 +612,28 @@ function readToolTurnIncompleteOf(notice) {
|
|
|
557
612
|
export function readUserInputUndrained(notice) {
|
|
558
613
|
return guardedRead(notice, readUserInputUndrainedOf);
|
|
559
614
|
}
|
|
615
|
+
function isUndrainedLane(v) {
|
|
616
|
+
return typeof v === 'string' && Object.hasOwn(CORE_USER_INPUT_UNDRAINED_FAMILIES, v);
|
|
617
|
+
}
|
|
618
|
+
function undrainedLaneOfCode(code) {
|
|
619
|
+
for (const lane of Object.keys(CORE_USER_INPUT_UNDRAINED_FAMILIES)) {
|
|
620
|
+
if (CORE_USER_INPUT_UNDRAINED_FAMILIES[lane].code === code)
|
|
621
|
+
return lane;
|
|
622
|
+
}
|
|
623
|
+
return undefined;
|
|
624
|
+
}
|
|
560
625
|
function readUserInputUndrainedOf(notice) {
|
|
561
626
|
if (typeof notice !== 'object' || notice === null || Array.isArray(notice))
|
|
562
627
|
return undefined;
|
|
563
628
|
const n = notice;
|
|
564
|
-
const
|
|
565
|
-
const kind = code === 'task.user_steer_undrained' ? 'steer' : code === 'task.user_followup_undrained' ? 'followUp' : undefined;
|
|
629
|
+
const kind = undrainedLaneOfCode(ownSeat(n, 'code'));
|
|
566
630
|
if (kind === undefined)
|
|
567
631
|
return undefined;
|
|
568
632
|
const d = ownSeat(n, 'detail');
|
|
569
633
|
if (typeof d !== 'object' || d === null || Array.isArray(d))
|
|
570
634
|
return undefined;
|
|
571
635
|
const o = d;
|
|
572
|
-
const count = positiveInt(ownSeat(o, kind));
|
|
636
|
+
const count = positiveInt(ownSeat(o, CORE_USER_INPUT_UNDRAINED_FAMILIES[kind].countKey));
|
|
573
637
|
if (count === undefined)
|
|
574
638
|
return undefined;
|
|
575
639
|
const cause = nonEmpty(optionalOwnSeat(o, 'cause'));
|
|
@@ -598,6 +662,8 @@ const STEER_UNDRAINED_SENTENCE = Object.freeze({
|
|
|
598
662
|
});
|
|
599
663
|
const _steerSentencePin = true;
|
|
600
664
|
void _steerSentencePin;
|
|
665
|
+
const _undrainedLanePin = true;
|
|
666
|
+
void _undrainedLanePin;
|
|
601
667
|
const followUpUndrainedSentence = (n) => `${messagesPhrase(n, 'follow-up message')} you queued ${verbBe(n)} not used before the run ended and will not be delivered. ` +
|
|
602
668
|
`Send ${itThem(n)} again if you still need ${itThem(n)}.`;
|
|
603
669
|
const subagentSteerUndrainedSentence = (n) => `${messagesPhrase(n, 'message')} you sent while the run was in progress ${verbBe(n)} not used before a sub-agent's run ended and will not be delivered. ` +
|
|
@@ -629,7 +695,7 @@ export function userInputUndrainedNotice(facts) {
|
|
|
629
695
|
}
|
|
630
696
|
const fromSubagent = typeof child === 'string' && child.length > 0;
|
|
631
697
|
const n = positiveInt(count);
|
|
632
|
-
if (n === undefined || (kind
|
|
698
|
+
if (n === undefined || !isUndrainedLane(kind))
|
|
633
699
|
return undefined;
|
|
634
700
|
if (kind === 'followUp') {
|
|
635
701
|
if (cause === undefined || cause === 'leg_end')
|
|
@@ -730,6 +796,7 @@ export const ENGINE_NOTICE_FACT_READERS = Object.freeze({
|
|
|
730
796
|
'permission.read_deny_unapplied': readReadDenyUnapplied,
|
|
731
797
|
'context.tool_turn_repaired': readToolTurnRepaired,
|
|
732
798
|
'server.model_unreachable': readModelUnreachable,
|
|
799
|
+
'permission.allowed_tool_not_granted': readAllowedToolNotGranted,
|
|
733
800
|
'task.tool_turn_incomplete': readToolTurnIncomplete,
|
|
734
801
|
'task.user_steer_undrained': readUserInputUndrained,
|
|
735
802
|
'task.user_followup_undrained': readUserInputUndrained,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isEngineRefusedToolName(name: string): boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CORE_PROTOCOL_PREFIXES, CORE_RETIRED_TOOL_CURRENT_NAMES } from './generated/toolNameTables.js';
|
|
2
|
+
export function isEngineRefusedToolName(name) {
|
|
3
|
+
if (typeof name !== 'string')
|
|
4
|
+
return false;
|
|
5
|
+
if (CORE_RETIRED_TOOL_CURRENT_NAMES.has(name))
|
|
6
|
+
return true;
|
|
7
|
+
return name.includes('__') && !CORE_PROTOCOL_PREFIXES.some((prefix) => name.startsWith(prefix));
|
|
8
|
+
}
|
|
@@ -2,16 +2,21 @@ import { capForDisplay } from './fleetTaskDesc.js';
|
|
|
2
2
|
import { engineWireTarget } from './engineWireTarget.js';
|
|
3
3
|
import { capsGenerationOf, createEngineCapReader } from './engineCapReader.js';
|
|
4
4
|
export function projectExecutionLaneCapability(caps) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
try {
|
|
6
|
+
if (caps === null || typeof caps !== 'object')
|
|
7
|
+
return undefined;
|
|
8
|
+
if (caps === null || typeof caps !== 'object' || Array.isArray(caps))
|
|
9
|
+
return undefined;
|
|
10
|
+
if (!Object.hasOwn(caps, 'executionLane'))
|
|
11
|
+
return { kind: 'not_reported' };
|
|
12
|
+
const lane = caps.executionLane;
|
|
13
|
+
if (lane === undefined)
|
|
14
|
+
return { kind: 'not_reported' };
|
|
15
|
+
return projectExecutionLaneObject(lane, () => capsGenerationOf(caps).generation === 'new');
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
8
18
|
return undefined;
|
|
9
|
-
|
|
10
|
-
return { kind: 'not_reported' };
|
|
11
|
-
const lane = caps.executionLane;
|
|
12
|
-
if (lane === undefined)
|
|
13
|
-
return { kind: 'not_reported' };
|
|
14
|
-
return projectExecutionLaneObject(lane, () => capsGenerationOf(caps).generation === 'new');
|
|
19
|
+
}
|
|
15
20
|
}
|
|
16
21
|
function projectExecutionLaneObject(lane, newGeneration) {
|
|
17
22
|
if (lane === null || typeof lane !== 'object' || Array.isArray(lane))
|
|
@@ -3,16 +3,21 @@ import { engineWireTarget } from './engineWireTarget.js';
|
|
|
3
3
|
import { createEngineCapReader } from './engineCapReader.js';
|
|
4
4
|
import { FILE_HISTORY_DISABLED } from './request/taskRequest.js';
|
|
5
5
|
export function projectFileHistoryCaptureCapability(caps) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
try {
|
|
7
|
+
if (caps === null || typeof caps !== 'object' || Array.isArray(caps))
|
|
8
|
+
return undefined;
|
|
9
|
+
if (!Object.hasOwn(caps, 'fileHistoryCapture'))
|
|
10
|
+
return { kind: 'not_reported' };
|
|
11
|
+
const v = caps.fileHistoryCapture;
|
|
12
|
+
if (v === undefined)
|
|
13
|
+
return { kind: 'not_reported' };
|
|
14
|
+
if (typeof v !== 'string' || v.length === 0)
|
|
15
|
+
return undefined;
|
|
16
|
+
return { kind: 'present', word: v };
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
14
19
|
return undefined;
|
|
15
|
-
|
|
20
|
+
}
|
|
16
21
|
}
|
|
17
22
|
const reader = createEngineCapReader({
|
|
18
23
|
name: 'fileHistoryCapture',
|
|
@@ -12,9 +12,20 @@ export interface FileHistoryLegNoticeInput {
|
|
|
12
12
|
export declare function fileHistoryLegNoticeVerdict(input: FileHistoryLegNoticeInput): FileHistoryLegNoticeVerdict;
|
|
13
13
|
export declare function fileHistoryLegNoticeSentence(verdict: FileHistoryLegNoticeVerdict): string | null;
|
|
14
14
|
export declare function fileHistoryDeclarationOfBody(body: object | null | undefined): FileHistoryDeclarationFact;
|
|
15
|
+
export type OutboundBodyField = {
|
|
16
|
+
kind: 'absent';
|
|
17
|
+
} | {
|
|
18
|
+
kind: 'value';
|
|
19
|
+
value: unknown;
|
|
20
|
+
} | {
|
|
21
|
+
kind: 'unprovable';
|
|
22
|
+
};
|
|
23
|
+
export declare function readOutboundBodyField(body: object | null | undefined, key: string): OutboundBodyField;
|
|
15
24
|
export interface FileHistoryDeclarationLedger {
|
|
16
25
|
declared(requestKey: string, fact: FileHistoryDeclarationFact): boolean;
|
|
17
26
|
boundToRun(requestKey: string, runId: string, event: AgentEvent): boolean;
|
|
18
27
|
declarationOf(runId: string): FileHistoryDeclarationFact;
|
|
28
|
+
declaredLegCwd(requestKey: string, cwd: string | undefined): boolean;
|
|
29
|
+
legCwdOf(runId: string): string | undefined;
|
|
19
30
|
}
|
|
20
31
|
export declare function createFileHistoryDeclarationLedger(): FileHistoryDeclarationLedger;
|
|
@@ -42,41 +42,78 @@ export function fileHistoryLegNoticeSentence(verdict) {
|
|
|
42
42
|
return null;
|
|
43
43
|
}
|
|
44
44
|
export function fileHistoryDeclarationOfBody(body) {
|
|
45
|
-
|
|
45
|
+
const r = readOutboundBodyField(body, 'fileHistory');
|
|
46
|
+
if (r.kind === 'unprovable')
|
|
46
47
|
return 'unknown';
|
|
48
|
+
if (r.kind === 'absent')
|
|
49
|
+
return 'not_sent';
|
|
50
|
+
return r.value === FILE_HISTORY_DISABLED ? 'sent' : 'not_sent';
|
|
51
|
+
}
|
|
52
|
+
export function readOutboundBodyField(body, key) {
|
|
53
|
+
const UNPROVABLE = { kind: 'unprovable' };
|
|
54
|
+
if (typeof body !== 'object' || body === null)
|
|
55
|
+
return UNPROVABLE;
|
|
47
56
|
try {
|
|
48
57
|
if (Array.isArray(body))
|
|
49
|
-
return
|
|
58
|
+
return UNPROVABLE;
|
|
50
59
|
if (typeof body.toJSON === 'function')
|
|
51
|
-
return
|
|
52
|
-
const d = Object.getOwnPropertyDescriptor(body,
|
|
60
|
+
return UNPROVABLE;
|
|
61
|
+
const d = Object.getOwnPropertyDescriptor(body, key);
|
|
53
62
|
const all = Object.getOwnPropertyDescriptors(body);
|
|
54
63
|
for (const k of Reflect.ownKeys(all)) {
|
|
55
64
|
const x = all[k];
|
|
56
65
|
if (x !== undefined && x.enumerable === true && !Object.hasOwn(x, 'value'))
|
|
57
|
-
return
|
|
66
|
+
return UNPROVABLE;
|
|
58
67
|
}
|
|
59
|
-
const listed = Object.hasOwn(all,
|
|
68
|
+
const listed = Object.hasOwn(all, key) ? all[key] : undefined;
|
|
60
69
|
const listedOn = listed !== undefined && listed.enumerable === true;
|
|
61
70
|
if (d === undefined || d.enumerable !== true)
|
|
62
|
-
return listedOn ?
|
|
71
|
+
return listedOn ? UNPROVABLE : { kind: 'absent' };
|
|
63
72
|
if (!Object.hasOwn(d, 'value') || !listedOn || !Object.hasOwn(listed, 'value') || !Object.is(listed.value, d.value))
|
|
64
|
-
return
|
|
65
|
-
if (!Object.is(body
|
|
66
|
-
return
|
|
73
|
+
return UNPROVABLE;
|
|
74
|
+
if (!Object.is(body[key], d.value))
|
|
75
|
+
return UNPROVABLE;
|
|
67
76
|
if (typeof d.value === 'object' && d.value !== null)
|
|
68
|
-
return
|
|
69
|
-
return
|
|
77
|
+
return UNPROVABLE;
|
|
78
|
+
return { kind: 'value', value: d.value };
|
|
70
79
|
}
|
|
71
80
|
catch {
|
|
72
|
-
return
|
|
81
|
+
return UNPROVABLE;
|
|
73
82
|
}
|
|
74
83
|
}
|
|
75
84
|
const idOk = (v) => typeof v === 'string' && v.length > 0;
|
|
76
85
|
export function createFileHistoryDeclarationLedger() {
|
|
77
86
|
const factsByKey = new Map();
|
|
87
|
+
const cwdsByKey = new Map();
|
|
78
88
|
const keysByRun = new Map();
|
|
79
89
|
return Object.freeze({
|
|
90
|
+
declaredLegCwd(requestKey, cwd) {
|
|
91
|
+
if (!idOk(requestKey) || !idOk(cwd))
|
|
92
|
+
return false;
|
|
93
|
+
let set = cwdsByKey.get(requestKey);
|
|
94
|
+
if (set === undefined)
|
|
95
|
+
cwdsByKey.set(requestKey, (set = new Set()));
|
|
96
|
+
set.add(cwd);
|
|
97
|
+
return true;
|
|
98
|
+
},
|
|
99
|
+
legCwdOf(runId) {
|
|
100
|
+
if (!idOk(runId))
|
|
101
|
+
return undefined;
|
|
102
|
+
const keys = keysByRun.get(runId);
|
|
103
|
+
if (keys === undefined)
|
|
104
|
+
return undefined;
|
|
105
|
+
let agreed;
|
|
106
|
+
for (const k of keys) {
|
|
107
|
+
const cwds = cwdsByKey.get(k);
|
|
108
|
+
if (cwds === undefined || cwds.size !== 1)
|
|
109
|
+
return undefined;
|
|
110
|
+
const [only] = cwds;
|
|
111
|
+
if (only === undefined || (agreed !== undefined && agreed !== only))
|
|
112
|
+
return undefined;
|
|
113
|
+
agreed = only;
|
|
114
|
+
}
|
|
115
|
+
return agreed;
|
|
116
|
+
},
|
|
80
117
|
declared(requestKey, fact) {
|
|
81
118
|
if (!idOk(requestKey) || (fact !== 'sent' && fact !== 'not_sent'))
|
|
82
119
|
return false;
|
|
@@ -8,6 +8,7 @@ import { recordEngineTranscriptId } from '../subagent/engineDelegatedPrompt.js';
|
|
|
8
8
|
import { recordFleetRowAgentType } from './fleetRowAgentType.js';
|
|
9
9
|
import { DEFAULT_SESSION_KEY } from '../sessionSlot.js';
|
|
10
10
|
import { TERMINAL_FLEET_TASK_STATUSES, projectTasks, projectWorkflows, wireCycleSeq, wireParentId, } from './fleetProjection.js';
|
|
11
|
+
import { isInStreamDrainingEnd } from '../wireErrorTriage.js';
|
|
11
12
|
export const TERMINAL_RETAIN_MS = 60_000;
|
|
12
13
|
const liveBgViews = new Map();
|
|
13
14
|
function viewsFor(sessionKey) {
|
|
@@ -293,6 +294,10 @@ export function createFleetLedger(hooks = {}, opts = {}) {
|
|
|
293
294
|
applyBgNotification(frame.notification, ing);
|
|
294
295
|
break;
|
|
295
296
|
default:
|
|
297
|
+
if (isInStreamDrainingEnd(frame)) {
|
|
298
|
+
debug('[fleet-frame] drain end frame — the engine is going down; the host reconnects');
|
|
299
|
+
break;
|
|
300
|
+
}
|
|
296
301
|
droppedUnknownFrame++;
|
|
297
302
|
debug(`[fleet-frame] UNKNOWN frame type ignored(type=${String(frame.type)})`);
|
|
298
303
|
break;
|
package/dist/gateOutcome.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export interface GateModeReleaseView {
|
|
|
32
32
|
mandate?: string;
|
|
33
33
|
reason?: string;
|
|
34
34
|
}
|
|
35
|
-
export declare const GATE_MODE_RELEASE_REASON_WORDS: readonly ["rule_unreadable"];
|
|
35
|
+
export declare const GATE_MODE_RELEASE_REASON_WORDS: readonly ["rule_unreadable", "write_protection_unresolved"];
|
|
36
36
|
export type GateModeReleaseReasonWord = (typeof CORE_MODE_RELEASE_REASONS)[number];
|
|
37
37
|
export declare function isGateModeReleaseReasonWord(v: unknown): v is GateModeReleaseReasonWord;
|
|
38
38
|
export interface SettlementWhoView {
|
|
@@ -61,6 +61,7 @@ export declare function gateApprover(g: GateOutcomeView | undefined): string | u
|
|
|
61
61
|
export declare function isApprovalWindowExpiredGate(g: GateOutcomeView | undefined): boolean;
|
|
62
62
|
export declare function isDenialLimitAutoDeniedGate(g: GateOutcomeView | undefined): boolean;
|
|
63
63
|
export declare function isParkSlaExpiredGate(g: GateOutcomeView | undefined): boolean;
|
|
64
|
+
export declare function isApproverUnavailableGate(g: GateOutcomeView | undefined): boolean;
|
|
64
65
|
export declare function isHumanSettledGate(g: GateOutcomeView | undefined): boolean;
|
|
65
66
|
export declare function isPolicyRefusedGate(g: GateOutcomeView | undefined): boolean;
|
|
66
67
|
export declare function ccToolDenialKindForToolEnd(frame: unknown): CcToolDenialKind | undefined;
|
package/dist/gateOutcome.js
CHANGED
|
@@ -171,6 +171,9 @@ export function isDenialLimitAutoDeniedGate(g) {
|
|
|
171
171
|
export function isParkSlaExpiredGate(g) {
|
|
172
172
|
return g?.settlement?.kind === 'park_sla_expired';
|
|
173
173
|
}
|
|
174
|
+
export function isApproverUnavailableGate(g) {
|
|
175
|
+
return isDeniedGate(g) && g?.settlement?.kind === 'approver_unavailable';
|
|
176
|
+
}
|
|
174
177
|
export function isHumanSettledGate(g) {
|
|
175
178
|
const k = g?.settlement?.kind;
|
|
176
179
|
return k === 'human_allowed' || k === 'human_refused';
|
package/dist/gateVocabulary.js
CHANGED
|
@@ -69,7 +69,7 @@ export function askOriginDetail(origin) {
|
|
|
69
69
|
return `this call asks; its origin ${word} is a word newer than this client, so answer it as usual`;
|
|
70
70
|
}
|
|
71
71
|
export function mandatedApprovalDetail() {
|
|
72
|
-
return 'no saved allow rule and no remembered answer can retire this question; each call is settled on its own — by you here
|
|
72
|
+
return 'no saved allow rule and no remembered answer can retire this question; each call is settled on its own — by you here or by an automatic check the deployment runs — and an answer covers only that call';
|
|
73
73
|
}
|
|
74
74
|
const _mandateWordsPin = true;
|
|
75
75
|
void _mandateWordsPin;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const CORE_ASK_FACES = Object.freeze([
|
|
2
|
+
"shell",
|
|
3
|
+
"other",
|
|
4
|
+
]);
|
|
5
|
+
export const CORE_SHELL_FACE_TOOL_NAMES = Object.freeze([
|
|
6
|
+
"Bash",
|
|
7
|
+
"Monitor",
|
|
8
|
+
]);
|
|
9
|
+
export const CORE_RELEASABLE_ASK_CLASSES_BY_FACE = Object.freeze({
|
|
10
|
+
"shell": Object.freeze(["transcript_write", "rule_unreadable", "write_protection_unresolved", "probe", "write_protection", "tool_marks_mcp", "tool_marks_a2a", "artifact_shared_read", "mode", "unstated", "ordinary"]),
|
|
11
|
+
"other": Object.freeze(["transcript_write", "rule_unreadable", "probe", "write_protection", "tool_marks_mcp", "tool_marks_a2a", "artifact_shared_read", "mode", "unstated", "ordinary"]),
|
|
12
|
+
});
|
|
@@ -8,7 +8,7 @@ export declare const CORE_DENIED_BY_VALUES: readonly ["policy", "hook", "org", "
|
|
|
8
8
|
export declare const CORE_PERMISSION_MODE_FOLD_REASONS: readonly string[];
|
|
9
9
|
export declare const CORE_ENGINE_CARD_TYPES: readonly string[];
|
|
10
10
|
export declare const CORE_TOOL_DECLARATION_CODES: readonly string[];
|
|
11
|
-
export declare const CORE_MODE_RELEASE_REASONS: readonly ["rule_unreadable"];
|
|
11
|
+
export declare const CORE_MODE_RELEASE_REASONS: readonly ["rule_unreadable", "write_protection_unresolved"];
|
|
12
12
|
export declare const CORE_HOOK_TOOL_ALIASES: Readonly<Record<string, string>>;
|
|
13
13
|
export declare const CORE_ASK_EVIDENCE_ABSENCE_VALUES: readonly ["not_wired", "not_adjudicated", "unavailable", "no_match", "not_reported"];
|
|
14
14
|
export declare const CORE_SYSTEM_INJECTION_PRIORITIES: readonly ["now", "next", "later"];
|
|
@@ -21,7 +21,7 @@ export interface CoreModeArbitrationRow {
|
|
|
21
21
|
readonly ruleMayClear: boolean;
|
|
22
22
|
readonly hookAskFloor: boolean;
|
|
23
23
|
}
|
|
24
|
-
export declare const CORE_MODE_ARBITRATION: Readonly<Record<"content_question" | "hook" | "ancestor" | "unverifiable_delete" | "transcript_write" | "org_rule" | "governance_unavailable" | "rule_unreadable" | "ask_rule" | "denial_limit_fallback" | "classifier_no_ruling" | "requires_user_interaction" | "operator_forced" | "shell_floor" | "write_protection_unresolved" | "probe" | "write_protection" | "tool_marks_mcp" | "tool_marks_a2a" | "policy_rra" | "artifact_shared_read" | "mode" | "unstated" | "ordinary", CoreModeArbitrationRow>>;
|
|
24
|
+
export declare const CORE_MODE_ARBITRATION: Readonly<Record<"content_question" | "hook" | "ancestor" | "dangerous_delete" | "unverifiable_delete" | "transcript_write" | "org_rule" | "governance_unavailable" | "rule_unreadable" | "ask_rule" | "denial_limit_fallback" | "classifier_no_ruling" | "requires_user_interaction" | "operator_forced" | "shell_floor" | "write_protection_unresolved" | "probe" | "write_protection" | "tool_marks_mcp" | "tool_marks_a2a" | "policy_rra" | "artifact_shared_read" | "mode" | "unstated" | "ordinary", CoreModeArbitrationRow>>;
|
|
25
25
|
export declare const CORE_SKILL_GRANT_ORIGINS: readonly ["model", "user", "inherited"];
|
|
26
26
|
export declare const CORE_ALLOW_ENTRY_INERT_REASONS: readonly ["wildcard_all", "namespace_wildcard", "path_pattern", "domain", "content_unsupported", "grammar", "tool_name", "near_miss"];
|
|
27
27
|
export declare const CORE_ALLOW_RULE_MEMBERS: readonly ["hook", "deployment", "persisted", "skill", "request"];
|
|
@@ -38,3 +38,5 @@ export declare const CORE_RULE_BEHAVIORS: readonly ["deny", "ask", "allow"];
|
|
|
38
38
|
export declare const CORE_MCP_IMAGE_MAX_BASE64: number;
|
|
39
39
|
export declare const CORE_MAX_PENDING_STEER_CHARS: number;
|
|
40
40
|
export declare const CORE_PROMPT_BLOCK_CAUSES: readonly ["block", "crashed", "timeout", "cancelled"];
|
|
41
|
+
export declare const CORE_PERMISSION_MODES: readonly ["default", "acceptEdits", "plan", "auto", "bypassPermissions", "dontAsk"];
|
|
42
|
+
export declare const CORE_APPROVAL_REACH: readonly ["none"];
|
|
@@ -113,6 +113,7 @@ export const CORE_TOOL_DECLARATION_CODES = Object.freeze([
|
|
|
113
113
|
]);
|
|
114
114
|
export const CORE_MODE_RELEASE_REASONS = Object.freeze([
|
|
115
115
|
"rule_unreadable",
|
|
116
|
+
"write_protection_unresolved",
|
|
116
117
|
]);
|
|
117
118
|
export const CORE_HOOK_TOOL_ALIASES = Object.freeze(Object.assign(Object.create(null), Object.fromEntries([
|
|
118
119
|
["ListPeers", "ListAgents"],
|
|
@@ -144,6 +145,7 @@ export const CORE_MODE_ARBITRATION = Object.freeze({
|
|
|
144
145
|
"content_question": Object.freeze({ bypassImmune: true, classifierEligible: false, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: true }),
|
|
145
146
|
"hook": Object.freeze({ bypassImmune: true, classifierEligible: false, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: false }),
|
|
146
147
|
"ancestor": Object.freeze({ bypassImmune: true, classifierEligible: false, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: false }),
|
|
148
|
+
"dangerous_delete": Object.freeze({ bypassImmune: true, classifierEligible: false, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: true }),
|
|
147
149
|
"unverifiable_delete": Object.freeze({ bypassImmune: true, classifierEligible: true, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: true }),
|
|
148
150
|
"transcript_write": Object.freeze({ bypassImmune: false, classifierEligible: true, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: true }),
|
|
149
151
|
"org_rule": Object.freeze({ bypassImmune: true, classifierEligible: false, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: false }),
|
|
@@ -255,3 +257,14 @@ export const CORE_PROMPT_BLOCK_CAUSES = Object.freeze([
|
|
|
255
257
|
"timeout",
|
|
256
258
|
"cancelled",
|
|
257
259
|
]);
|
|
260
|
+
export const CORE_PERMISSION_MODES = Object.freeze([
|
|
261
|
+
"default",
|
|
262
|
+
"acceptEdits",
|
|
263
|
+
"plan",
|
|
264
|
+
"auto",
|
|
265
|
+
"bypassPermissions",
|
|
266
|
+
"dontAsk",
|
|
267
|
+
]);
|
|
268
|
+
export const CORE_APPROVAL_REACH = Object.freeze([
|
|
269
|
+
"none",
|
|
270
|
+
]);
|
|
@@ -4,3 +4,8 @@ export declare const CORE_MCP_INJECTION_DROP_REASONS: readonly string[];
|
|
|
4
4
|
export declare const CORE_NOTICE_MINTER: Readonly<Record<string, 'engine' | 'server'>>;
|
|
5
5
|
export declare const CORE_USER_INPUT_UNDRAINED_CAUSES: readonly ["leg_end", "crashed"];
|
|
6
6
|
export declare const CORE_TOOL_TURN_INCOMPLETE_CAUSES: readonly ["truncated", "unnamed", "bad_frame", "missing_result_synthesized"];
|
|
7
|
+
export interface CoreUserInputUndrainedFamily {
|
|
8
|
+
readonly code: string;
|
|
9
|
+
readonly countKey: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const CORE_USER_INPUT_UNDRAINED_FAMILIES: Readonly<Record<"steer" | "followUp", CoreUserInputUndrainedFamily>>;
|