@sema-agent/client-core 0.97.0 → 0.98.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 +429 -0
- package/README.md +74 -36
- package/dist/adapt/arms.d.ts +1 -0
- package/dist/adapt/arms.js +128 -34
- package/dist/adapt/ids.d.ts +12 -1
- package/dist/adapt/ids.js +59 -8
- package/dist/adapt/instanceLedger.d.ts +50 -0
- package/dist/adapt/instanceLedger.js +147 -0
- package/dist/adapt/textStream.d.ts +1 -0
- package/dist/adapt/textStream.js +24 -7
- package/dist/adapt/toolCards.d.ts +27 -5
- package/dist/adapt/toolCards.js +39 -6
- package/dist/adapt/wireShapes.js +6 -2
- package/dist/adapt.d.ts +2 -0
- package/dist/adapt.js +8 -3
- package/dist/adapter/activeRunSelfHeal.d.ts +5 -0
- package/dist/adapter/activeRunSelfHeal.js +51 -28
- package/dist/adapter/downstream/eventToSdkMessage.d.ts +2 -5
- package/dist/adapter/downstream/eventToSdkMessage.js +27 -34
- package/dist/adapter/downstream/terminalToSdkResult.js +11 -4
- package/dist/adapter/downstream/turnUsageToModelUsage.d.ts +5 -2
- package/dist/adapter/downstream/turnUsageToModelUsage.js +2 -0
- package/dist/adapter/runStream.js +29 -13
- package/dist/adapter/types.d.ts +4 -4
- package/dist/agentSession/backgroundView.js +2 -1
- package/dist/agentSession/engineAgentRegistryRead.d.ts +2 -2
- package/dist/agentSession/engineAgentRegistryRead.js +12 -13
- package/dist/agentsWireCaps.d.ts +8 -6
- package/dist/agentsWireCaps.js +177 -162
- package/dist/approvalDecidedByCapability.d.ts +0 -4
- package/dist/approvalDecidedByCapability.js +0 -6
- package/dist/approvalsStreamLiveCapability.d.ts +0 -4
- package/dist/approvalsStreamLiveCapability.js +0 -6
- package/dist/assistantInbox.d.ts +34 -0
- package/dist/assistantInbox.js +118 -0
- package/dist/centerWiringCapability.js +9 -1
- package/dist/clientSlice.d.ts +0 -9
- package/dist/clientSlice.js +0 -3
- package/dist/cloudConfigWireCaps.d.ts +4 -2
- package/dist/cloudConfigWireCaps.js +81 -61
- package/dist/compensations.js +1 -1
- package/dist/connectorStatus.d.ts +21 -0
- package/dist/connectorStatus.js +112 -0
- package/dist/controlRouter.d.ts +14 -1
- package/dist/controlRouter.js +68 -17
- package/dist/coreValuePorts.d.ts +3 -3
- package/dist/decideReceipt.d.ts +2 -2
- package/dist/decideReceipt.js +5 -2
- package/dist/declared/supportFloorDeclared.js +3 -3
- package/dist/deviceExecutorManagementCapability.d.ts +0 -4
- package/dist/deviceExecutorManagementCapability.js +0 -6
- package/dist/deviceRebind.d.ts +49 -1
- package/dist/deviceRebind.js +221 -3
- package/dist/displayUntrusted.d.ts +1 -0
- package/dist/displayUntrusted.js +250 -76
- package/dist/engineAgentAbsence.d.ts +1 -1
- package/dist/engineAgentPanelStore.d.ts +5 -4
- package/dist/engineAgentPanelStore.js +3 -12
- package/dist/engineCapReader.d.ts +0 -4
- package/dist/engineCapReader.js +1 -5
- package/dist/engineCapsCache.d.ts +4 -0
- package/dist/engineCapsCache.js +17 -12
- package/dist/engineClosedSets.d.ts +1 -0
- package/dist/engineClosedSets.js +4 -1
- package/dist/engineErrorCodes.d.ts +9 -2
- package/dist/engineErrorCodes.js +9 -1
- package/dist/engineIdentity.d.ts +1 -0
- package/dist/engineIdentity.js +8 -0
- package/dist/engineRowRef.d.ts +28 -0
- package/dist/engineRowRef.js +111 -0
- package/dist/engineSessionMessages.d.ts +67 -0
- package/dist/engineSessionMessages.js +364 -0
- package/dist/engineToolDirectory.d.ts +18 -0
- package/dist/engineToolDirectory.js +85 -0
- package/dist/engineUrl.d.ts +18 -0
- package/dist/engineUrl.js +52 -0
- package/dist/env/uiLanguage.d.ts +9 -0
- package/dist/env/uiLanguage.js +35 -0
- package/dist/eventLeg.d.ts +92 -0
- package/dist/eventLeg.js +285 -0
- package/dist/executionLaneCapability.d.ts +0 -4
- package/dist/executionLaneCapability.js +3 -16
- package/dist/fileHistoryCaptureCapability.d.ts +0 -4
- package/dist/fileHistoryCaptureCapability.js +5 -7
- package/dist/fleet/fleetLedger.d.ts +0 -3
- package/dist/fleet/fleetLedger.js +21 -36
- package/dist/fleet/fleetProjection.d.ts +2 -2
- package/dist/fleet/fleetProjection.js +10 -8
- package/dist/frameBinding.d.ts +5 -0
- package/dist/frameBinding.js +23 -0
- package/dist/gateFailureCodes.d.ts +2 -0
- package/dist/gateFailureCodes.js +15 -0
- package/dist/gateOutcome.d.ts +3 -1
- package/dist/gateOutcome.js +25 -6
- package/dist/gateVocabulary.d.ts +5 -0
- package/dist/gateVocabulary.js +64 -2
- package/dist/generated/engineAskFaceTables.js +2 -2
- package/dist/generated/engineFactTables.d.ts +6 -3
- package/dist/generated/engineFactTables.js +22 -4
- package/dist/generated/engineNoticeTables.js +9 -0
- package/dist/generated/toolNameTables.d.ts +1 -0
- package/dist/generated/toolNameTables.js +1 -0
- package/dist/hitl/allowRuleShadow.d.ts +6 -1
- package/dist/hitl/allowRuleShadow.js +21 -17
- package/dist/hitl/approvalCardReading.d.ts +15 -0
- package/dist/hitl/approvalCardReading.js +154 -0
- package/dist/hitl/approvalCardReasons.d.ts +13 -0
- package/dist/hitl/approvalCardReasons.js +120 -0
- package/dist/hitl/approvalHolds.d.ts +47 -15
- package/dist/hitl/approvalHolds.js +134 -28
- package/dist/hitl/approvalResolution.d.ts +51 -26
- package/dist/hitl/approvalResolution.js +86 -122
- package/dist/hitl/approvalsFeed.js +6 -18
- package/dist/hitl/askClassPair.d.ts +2 -0
- package/dist/hitl/askClassPair.js +1 -0
- package/dist/hitl/askGateWire.d.ts +20 -2
- package/dist/hitl/askGateWire.js +49 -1
- package/dist/hitl/askParkRowRouting.d.ts +5 -0
- package/dist/hitl/askParkRowRouting.js +32 -1
- package/dist/hitl/askSettlementLine.d.ts +18 -0
- package/dist/hitl/askSettlementLine.js +79 -0
- package/dist/hitl/automaticAnswerVerdict.d.ts +1 -1
- package/dist/hitl/automaticAnswerVerdict.js +21 -5
- package/dist/hitl/crashConverged.d.ts +11 -20
- package/dist/hitl/crashConverged.js +56 -0
- package/dist/hitl/crashConvergedNotice.d.ts +3 -1
- package/dist/hitl/crashConvergedNotice.js +48 -11
- package/dist/hitl/decisionConflict.js +3 -10
- package/dist/hitl/decisionRefusal.d.ts +40 -1
- package/dist/hitl/decisionRefusal.js +199 -42
- package/dist/hitl/frameRouter.d.ts +5 -2
- package/dist/hitl/frameRouter.js +20 -16
- package/dist/hitl/gateLedger.d.ts +2 -0
- package/dist/hitl/gateLedger.js +50 -13
- package/dist/hitl/hitlBridge.d.ts +1 -2
- package/dist/hitl/hitlBridge.js +10 -7
- package/dist/hitl/livePendingAsk.d.ts +3 -3
- package/dist/hitl/livePendingAsk.js +7 -18
- package/dist/hitl/parkResolver.d.ts +2 -24
- package/dist/hitl/parkResolver.js +61 -97
- package/dist/hitl/persistedRulesWire.d.ts +24 -0
- package/dist/hitl/persistedRulesWire.js +122 -2
- package/dist/hitl/planReviewWire.d.ts +26 -13
- package/dist/hitl/planReviewWire.js +112 -78
- package/dist/hitl/refusedToolNameProse.d.ts +0 -1
- package/dist/hitl/refusedToolNameProse.js +0 -3
- package/dist/hitl/replayedApproval.d.ts +4 -3
- package/dist/hitl/replayedApproval.js +7 -4
- package/dist/hitl/sessionPolicyDeliverable.js +2 -4
- package/dist/hitl/sessionPolicyWire.d.ts +32 -20
- package/dist/hitl/sessionPolicyWire.js +162 -52
- package/dist/hitl/standingRows.d.ts +20 -2
- package/dist/hitl/standingRows.js +69 -8
- package/dist/hitl/toolApprovalWire.d.ts +87 -152
- package/dist/hitl/toolApprovalWire.js +591 -380
- package/dist/hookMatcherVerdict.d.ts +6 -1
- package/dist/hookMatcherVerdict.js +14 -7
- package/dist/hooksWireCaps.d.ts +2 -2
- package/dist/hooksWireCaps.js +59 -55
- package/dist/i18n/messages.en.d.ts +121 -0
- package/dist/i18n/messages.en.js +119 -0
- package/dist/i18n/messages.zh.d.ts +3 -0
- package/dist/i18n/messages.zh.js +120 -0
- package/dist/i18n/translate.d.ts +25 -0
- package/dist/i18n/translate.js +127 -0
- package/dist/index.d.ts +53 -18
- package/dist/index.js +38 -10
- package/dist/inheritEnvCapability.d.ts +31 -0
- package/dist/inheritEnvCapability.js +104 -0
- package/dist/liveModelCatalog.d.ts +1 -2
- package/dist/liveModelCatalog.js +2 -6
- package/dist/liveQuestionStore.d.ts +2 -21
- package/dist/mcpLiveness.d.ts +2 -1
- package/dist/mcpProbeWire.d.ts +6 -1
- package/dist/mcpProbeWire.js +1 -1
- package/dist/mcpWireCaps.d.ts +13 -2
- package/dist/mcpWireCaps.js +48 -0
- package/dist/memoryEntriesWire.d.ts +4 -9
- package/dist/model/modelSupplyRules.d.ts +0 -2
- package/dist/model/modelSupplyRules.js +3 -12
- package/dist/model/modelsPolicy.d.ts +0 -5
- package/dist/model/modelsPolicy.js +6 -36
- package/dist/model/subagentModelWord.d.ts +31 -0
- package/dist/model/subagentModelWord.js +261 -0
- package/dist/notifications.d.ts +6 -0
- package/dist/notifications.js +71 -23
- package/dist/outputStyleSeatCapability.d.ts +0 -3
- package/dist/outputStyleSeatCapability.js +0 -3
- package/dist/ownKey.d.ts +15 -0
- package/dist/ownKey.js +60 -3
- package/dist/panelReduce.d.ts +15 -9
- package/dist/panelReduce.js +680 -549
- package/dist/panelStateHolder.d.ts +3 -7
- package/dist/panelStateHolder.js +14 -130
- package/dist/peerLaneCapability.d.ts +0 -4
- package/dist/peerLaneCapability.js +0 -6
- package/dist/permissionRulesWriteCapability.d.ts +0 -4
- package/dist/permissionRulesWriteCapability.js +0 -6
- package/dist/permissionWireCaps.d.ts +2 -2
- package/dist/permissionWireCaps.js +2 -0
- package/dist/permissionsAllowGrantCapability.d.ts +0 -4
- package/dist/permissionsAllowGrantCapability.js +0 -6
- package/dist/permissionsDeclaration.d.ts +0 -11
- package/dist/permissionsDeclaration.js +60 -53
- package/dist/pluginHooksWire.d.ts +1 -1
- package/dist/pluginHooksWire.js +3 -6
- package/dist/preemptWire.d.ts +44 -0
- package/dist/preemptWire.js +83 -0
- package/dist/printToolResultFrame.js +15 -4
- package/dist/replayBody.d.ts +3 -0
- package/dist/replayBody.js +14 -0
- package/dist/request/taskRequest.d.ts +0 -1
- package/dist/request/taskRequest.js +0 -3
- package/dist/resumeRefusalCopy.d.ts +2 -1
- package/dist/resumeRefusalCopy.js +38 -2
- package/dist/retryStatus.d.ts +8 -0
- package/dist/retryStatus.js +106 -1
- package/dist/rewindArchiveCapability.d.ts +0 -4
- package/dist/rewindArchiveCapability.js +2 -10
- package/dist/rewindArchiveReading.d.ts +0 -1
- package/dist/rewindArchiveReading.js +0 -3
- package/dist/runCancelContext.d.ts +2 -1
- package/dist/runCancelContext.js +4 -2
- package/dist/runReattachPolicy.d.ts +31 -0
- package/dist/runReattachPolicy.js +46 -0
- package/dist/runTerminal.d.ts +3 -6
- package/dist/runTerminal.js +8 -9
- package/dist/sandboxWire.d.ts +3 -1
- package/dist/sandboxWire.js +76 -27
- package/dist/scenarioWire.js +1 -1
- package/dist/seam.d.ts +24 -2
- package/dist/seam.js +15 -3
- package/dist/seatContract.d.ts +53 -10
- package/dist/seatContract.js +132 -81
- package/dist/sessionPolicyCapability.d.ts +0 -4
- package/dist/sessionPolicyCapability.js +0 -6
- package/dist/sessionSyncFileHistoryCapability.d.ts +0 -3
- package/dist/sessionSyncFileHistoryCapability.js +0 -3
- package/dist/skillToolListsCapability.d.ts +0 -3
- package/dist/skillToolListsCapability.js +0 -3
- package/dist/sqlEngineCapability.d.ts +0 -4
- package/dist/sqlEngineCapability.js +0 -6
- package/dist/steerPriorityCapability.d.ts +0 -3
- package/dist/steerPriorityCapability.js +0 -3
- package/dist/streamDrainingLegs.d.ts +4 -0
- package/dist/streamDrainingLegs.js +6 -1
- package/dist/subagent/engineCompactWire.d.ts +0 -1
- package/dist/subagent/engineCompactWire.js +7 -5
- package/dist/subagent/engineTaskHandleWire.js +4 -7
- package/dist/subagentContentStore.js +1 -11
- package/dist/submitReopen.d.ts +24 -0
- package/dist/submitReopen.js +75 -0
- package/dist/terminalStatuses.d.ts +3 -0
- package/dist/terminalStatuses.js +10 -2
- package/dist/toolResult.d.ts +10 -1
- package/dist/toolResult.js +34 -6
- package/dist/toolRoster.d.ts +0 -2
- package/dist/toolRoster.js +0 -2
- package/dist/turnFailurePresentation.d.ts +28 -0
- package/dist/turnFailurePresentation.js +205 -0
- package/dist/userInvokedSkillsCapability.d.ts +0 -3
- package/dist/userInvokedSkillsCapability.js +0 -3
- package/dist/webSearchBackendCapability.d.ts +0 -4
- package/dist/webSearchBackendCapability.js +0 -6
- package/dist/wireErrorTriage.js +5 -24
- package/dist/wireFailureShape.d.ts +62 -5
- package/dist/wireFailureShape.js +105 -5
- package/dist/wireRefusalCopy.d.ts +12 -2
- package/dist/wireRefusalCopy.js +50 -52
- package/dist/workflowsJournalCapability.d.ts +0 -4
- package/dist/workflowsJournalCapability.js +0 -6
- package/dist/writeProtectionCapability.d.ts +0 -4
- package/dist/writeProtectionCapability.js +0 -6
- package/docs/INTEGRATION-CLIENTS.md +1305 -46
- package/package.json +5 -4
- package/dist/attachmentSeatCapability.d.ts +0 -12
- package/dist/attachmentSeatCapability.js +0 -23
- package/dist/hitl/approvalOutcomeNote.d.ts +0 -10
- package/dist/hitl/approvalOutcomeNote.js +0 -29
- package/dist/sessionReadRedactionCapability.d.ts +0 -13
- package/dist/sessionReadRedactionCapability.js +0 -35
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export type HookMatcherUnjudgedReason = 'event_out_of_scope' | 'not_a_string' | 'oversize' | '
|
|
1
|
+
export type HookMatcherUnjudgedReason = 'event_out_of_scope' | 'not_a_string' | 'oversize' | 'pattern_unsupported' | 'over_budget';
|
|
2
|
+
export type HookMatcherRefusedReason = 'alias_without_canonical' | 'invalid_regex';
|
|
2
3
|
export type HookMatcherVerdict = {
|
|
3
4
|
readonly kind: 'matchesAll';
|
|
4
5
|
} | {
|
|
@@ -14,6 +15,10 @@ export type HookMatcherVerdict = {
|
|
|
14
15
|
readonly reading: 'names' | 'pattern';
|
|
15
16
|
readonly alias: string;
|
|
16
17
|
readonly canonical: string;
|
|
18
|
+
} | {
|
|
19
|
+
readonly kind: 'refused';
|
|
20
|
+
readonly reason: 'invalid_regex';
|
|
21
|
+
readonly reading: 'pattern';
|
|
17
22
|
} | {
|
|
18
23
|
readonly kind: 'unjudged';
|
|
19
24
|
readonly reason: HookMatcherUnjudgedReason;
|
|
@@ -12,6 +12,9 @@ function unjudged(reason) {
|
|
|
12
12
|
function refused(reading, p) {
|
|
13
13
|
return Object.freeze({ kind: 'refused', reason: 'alias_without_canonical', reading, alias: p.alias, canonical: p.canonical });
|
|
14
14
|
}
|
|
15
|
+
function refusedInvalidRegex() {
|
|
16
|
+
return Object.freeze({ kind: 'refused', reason: 'invalid_regex', reading: 'pattern' });
|
|
17
|
+
}
|
|
15
18
|
function aliasPairs() {
|
|
16
19
|
return Object.entries(HOOK_TOOL_ALIASES).map(([alias, canonical]) => ({ alias, canonical }));
|
|
17
20
|
}
|
|
@@ -185,7 +188,7 @@ export function hookMatcherVerdict(event, matcher) {
|
|
|
185
188
|
return unjudged('oversize');
|
|
186
189
|
const form = SETTINGS_HOOK_MATCHER_FORM(matcher);
|
|
187
190
|
if (form === 'invalid')
|
|
188
|
-
return
|
|
191
|
+
return refusedInvalidRegex();
|
|
189
192
|
const pairs = aliasPairs();
|
|
190
193
|
if (form === 'regex' && matcher !== undefined) {
|
|
191
194
|
const subjects = pairs.flatMap((p) => [p.alias, p.canonical]);
|
|
@@ -199,10 +202,10 @@ export function hookMatcherVerdict(event, matcher) {
|
|
|
199
202
|
const selects = (name) => {
|
|
200
203
|
try {
|
|
201
204
|
const v = SETTINGS_HOOK_MATCHER_SELECTS(matcher, name);
|
|
202
|
-
return
|
|
205
|
+
return v === true ? true : v === false ? false : 'invalid';
|
|
203
206
|
}
|
|
204
207
|
catch {
|
|
205
|
-
return
|
|
208
|
+
return 'threw';
|
|
206
209
|
}
|
|
207
210
|
};
|
|
208
211
|
if (form === 'literal' && selects('') === true)
|
|
@@ -211,13 +214,17 @@ export function hookMatcherVerdict(event, matcher) {
|
|
|
211
214
|
const selected = [];
|
|
212
215
|
for (const p of pairs) {
|
|
213
216
|
const a = selects(p.alias);
|
|
214
|
-
if (a ===
|
|
215
|
-
return
|
|
217
|
+
if (a === 'invalid')
|
|
218
|
+
return refusedInvalidRegex();
|
|
219
|
+
if (a === 'threw')
|
|
220
|
+
return unjudged('pattern_unsupported');
|
|
216
221
|
if (!a)
|
|
217
222
|
continue;
|
|
218
223
|
const c = selects(p.canonical);
|
|
219
|
-
if (c ===
|
|
220
|
-
return
|
|
224
|
+
if (c === 'invalid')
|
|
225
|
+
return refusedInvalidRegex();
|
|
226
|
+
if (c === 'threw')
|
|
227
|
+
return unjudged('pattern_unsupported');
|
|
221
228
|
if (!c)
|
|
222
229
|
return refused(reading, p);
|
|
223
230
|
selected.push(p);
|
package/dist/hooksWireCaps.d.ts
CHANGED
|
@@ -4,9 +4,9 @@ import type { WireHooksConfig } from './finalVerifyWire.js';
|
|
|
4
4
|
export { GOAL_STOP_HOOK_WIRE_ENV, isGoalStopHookWireArmed, setWireSessionStopHook, getWireSessionStopHook, } from './goalStopHook.js';
|
|
5
5
|
export type { WireHooksConfig };
|
|
6
6
|
export interface HooksForWireOptions {
|
|
7
|
-
readonly plan
|
|
7
|
+
readonly plan: HooksWirePlan;
|
|
8
8
|
}
|
|
9
|
-
export declare function hooksForWire(opts
|
|
9
|
+
export declare function hooksForWire(opts: HooksForWireOptions): WireHooksConfig | undefined;
|
|
10
10
|
export declare function hooksWirePlan(opts?: HooksWirePlanOptions): HooksWirePlan;
|
|
11
11
|
export declare function __resetHooksWireCapsForTests(): void;
|
|
12
12
|
export declare function fleetHookFailureNoticeCapable(baseUrl: string | undefined): boolean;
|
package/dist/hooksWireCaps.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { engineCapNestedTrue, engineCapState, engineCapValue } from './engineCapsCache.js';
|
|
2
|
-
import { displayUntrusted } from './displayUntrusted.js';
|
|
3
2
|
import { capForDisplay, collapseLabel } from './fleetTaskDesc.js';
|
|
4
3
|
import { hostLog, hostSettings } from './host.js';
|
|
5
|
-
import { createSettingsHookJudge, decidePluginHooks, dedupeSettingsHookGroups, filterSettingsHookGroups, occupancyOf,
|
|
4
|
+
import { createSettingsHookJudge, decidePluginHooks, dedupeSettingsHookGroups, filterSettingsHookGroups, occupancyOf, } from './pluginHooksWire.js';
|
|
6
5
|
import { MAX_HOOK_NOTICE_TEXT_CHARS } from './notifications.js';
|
|
7
6
|
import { goalStopHookMatcher, __resetGoalStopHookForTests } from './goalStopHook.js';
|
|
8
7
|
export { GOAL_STOP_HOOK_WIRE_ENV, isGoalStopHookWireArmed, setWireSessionStopHook, getWireSessionStopHook, } from './goalStopHook.js';
|
|
@@ -114,12 +113,6 @@ let warnedNoPluginReader = new WeakSet();
|
|
|
114
113
|
const NO_PLUGIN_READER_WARNING = 'client-core: the installed settings port does not implement enabledPluginHooks() — ' +
|
|
115
114
|
'plugin hooks are not sent to the engine and are not reported as not running. ' +
|
|
116
115
|
'Implement SettingsPort.enabledPluginHooks() to list the enabled plugins and their hooks.';
|
|
117
|
-
let warnedNoPlanDrops = new WeakMap();
|
|
118
|
-
function noPlanDropWarning(event, reason) {
|
|
119
|
-
return (`client-core: ${displayUntrusted(event, { credentialUrls: false, credentialWords: false })} hooks from settings are not sent to the engine (${reason}), so they do not run there — ` +
|
|
120
|
-
`${settingsHookDropText(reason)}. Build the request with hooksForWire({ plan }) from hooksWirePlan() and show ` +
|
|
121
|
-
'hooksNotRunNotice(plan) to tell the user which hooks will not run.');
|
|
122
|
-
}
|
|
123
116
|
function guardPluginTraversal(run) {
|
|
124
117
|
try {
|
|
125
118
|
return run();
|
|
@@ -150,31 +143,61 @@ function readPluginHooks(settings, warnIfAbsent) {
|
|
|
150
143
|
}
|
|
151
144
|
return { state: 'absent' };
|
|
152
145
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
146
|
+
function usageError(tail) {
|
|
147
|
+
return new TypeError(`hooksForWire: pass { plan } with the plan returned by hooksWirePlan() for this turn — ${tail}`);
|
|
148
|
+
}
|
|
149
|
+
function hostValueShape(v) {
|
|
150
|
+
try {
|
|
151
|
+
if (v === undefined)
|
|
152
|
+
return 'nothing';
|
|
153
|
+
if (v === null)
|
|
154
|
+
return 'null';
|
|
155
|
+
if (Array.isArray(v))
|
|
156
|
+
return 'an array';
|
|
157
|
+
return typeof v === 'object' ? 'an object' : `a ${typeof v}`;
|
|
158
|
+
}
|
|
159
|
+
catch {
|
|
160
|
+
return 'unreadable';
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
export function hooksForWire(opts) {
|
|
164
|
+
if (typeof opts !== 'object' || opts === null)
|
|
165
|
+
throw usageError(`got ${hostValueShape(opts)}.`);
|
|
166
|
+
let given;
|
|
167
|
+
try {
|
|
168
|
+
given = opts.plan;
|
|
169
|
+
}
|
|
170
|
+
catch {
|
|
171
|
+
throw usageError(`reading opts.plan threw.`);
|
|
172
|
+
}
|
|
173
|
+
const shape = planShapeOf(given);
|
|
174
|
+
if (shape === 'plan') {
|
|
175
|
+
try {
|
|
176
|
+
return given.wire;
|
|
177
|
+
}
|
|
178
|
+
catch {
|
|
179
|
+
throw usageError(`reading the plan's wire threw.`);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
if (shape === 'threw')
|
|
183
|
+
throw usageError(`opts.plan could not be read as a plan.`);
|
|
184
|
+
if (given === undefined && planShapeOf(opts) === 'plan')
|
|
185
|
+
throw usageError(`the plan itself was passed; wrap it as { plan }.`);
|
|
186
|
+
throw usageError(`opts.plan is ${given === undefined ? 'missing' : `not such a plan (got ${hostValueShape(given)})`}.`);
|
|
164
187
|
}
|
|
165
|
-
function
|
|
188
|
+
function planShapeOf(v) {
|
|
166
189
|
try {
|
|
167
190
|
if (typeof v !== 'object' || v === null || Array.isArray(v))
|
|
168
|
-
return
|
|
191
|
+
return 'not';
|
|
169
192
|
const o = v;
|
|
170
193
|
for (const k of PLAN_KEYS)
|
|
171
194
|
if (!Object.hasOwn(o, k) && k !== 'settingsVerdicts' && k !== 'settingsExcluded')
|
|
172
|
-
return
|
|
195
|
+
return 'not';
|
|
173
196
|
const reader = o.pluginReader;
|
|
174
197
|
const engineFacts = o.engine;
|
|
175
198
|
const wire = o.wire;
|
|
176
199
|
const arrayOrAbsent = (k) => !Object.hasOwn(o, k) || Array.isArray(o[k]);
|
|
177
|
-
return
|
|
200
|
+
return Array.isArray(o.verdicts) &&
|
|
178
201
|
Array.isArray(o.excluded) &&
|
|
179
202
|
Array.isArray(o.settingsDropped) &&
|
|
180
203
|
arrayOrAbsent('settingsVerdicts') &&
|
|
@@ -182,11 +205,12 @@ function isHooksWirePlan(v) {
|
|
|
182
205
|
(reader === 'present' || reader === 'absent' || reader === 'failed') &&
|
|
183
206
|
typeof engineFacts === 'object' &&
|
|
184
207
|
engineFacts !== null &&
|
|
185
|
-
(wire === undefined || (typeof wire === 'object' && wire !== null && !Array.isArray(wire)))
|
|
208
|
+
(wire === undefined || (typeof wire === 'object' && wire !== null && !Array.isArray(wire)))
|
|
209
|
+
? 'plan'
|
|
210
|
+
: 'not';
|
|
186
211
|
}
|
|
187
|
-
catch
|
|
188
|
-
|
|
189
|
-
return false;
|
|
212
|
+
catch {
|
|
213
|
+
return 'threw';
|
|
190
214
|
}
|
|
191
215
|
}
|
|
192
216
|
const PLAN_KEYS = ['engine', 'pluginReader', 'verdicts', 'excluded', 'settingsDropped', 'settingsVerdicts', 'settingsExcluded', 'wire'];
|
|
@@ -217,7 +241,7 @@ export function hooksWirePlan(opts = {}) {
|
|
|
217
241
|
const types = typesByEvent.get(event);
|
|
218
242
|
return types === undefined || (typeof type === 'string' && types.has(type));
|
|
219
243
|
};
|
|
220
|
-
return buildHooksWirePlan(engine, shellRuns,
|
|
244
|
+
return buildHooksWirePlan(engine, shellRuns, promptAuthoredByUserOf(o));
|
|
221
245
|
}
|
|
222
246
|
function taskHooksCapability(baseUrl) {
|
|
223
247
|
const v = engineCapValue(baseUrl, 'taskSettings');
|
|
@@ -268,16 +292,14 @@ function promptAuthoredByUserOf(o) {
|
|
|
268
292
|
}
|
|
269
293
|
return true;
|
|
270
294
|
}
|
|
271
|
-
function buildHooksWirePlan(engine, shellRuns,
|
|
295
|
+
function buildHooksWirePlan(engine, shellRuns, promptAuthoredByUser) {
|
|
272
296
|
const settingsDropped = [];
|
|
273
297
|
const settingsVerdicts = [];
|
|
274
298
|
const settingsExcluded = [];
|
|
275
|
-
const judge =
|
|
299
|
+
const judge = createSettingsHookJudge(engine, shellRuns, promptAuthoredByUser);
|
|
276
300
|
let settingsStripped = 0;
|
|
277
301
|
const planOf = (pluginReader, wire, verdicts = [], excluded = []) => ({ engine, pluginReader, verdicts, excluded, settingsDropped, settingsVerdicts, settingsExcluded, wire });
|
|
278
302
|
const closedPlan = (settings, reason) => {
|
|
279
|
-
if (!withPlugins)
|
|
280
|
-
return planOf('absent', undefined);
|
|
281
303
|
const read = readPluginHooks(settings, false);
|
|
282
304
|
if (read.reading === undefined)
|
|
283
305
|
return planOf(read.state, undefined);
|
|
@@ -334,10 +356,10 @@ function buildHooksWirePlan(engine, shellRuns, withPlugins, promptAuthoredByUser
|
|
|
334
356
|
hostLog('debug', 'hooksWireCaps: disableAllHooks (merged, non-managed) — only policySettings hooks projected to the engine');
|
|
335
357
|
}
|
|
336
358
|
const managedOnly = managedByPolicy || disabledByNonManaged;
|
|
337
|
-
const read =
|
|
359
|
+
const read = readPluginHooks(settings, true);
|
|
338
360
|
let oldStartupBit;
|
|
339
361
|
let pluginDataThrew = false;
|
|
340
|
-
if (read
|
|
362
|
+
if (read.reading !== undefined) {
|
|
341
363
|
const reading = read.reading;
|
|
342
364
|
const bit = guardPluginTraversal(() => reading.suppressedByStartupMode === true);
|
|
343
365
|
if (bit === undefined)
|
|
@@ -362,7 +384,7 @@ function buildHooksWirePlan(engine, shellRuns, withPlugins, promptAuthoredByUser
|
|
|
362
384
|
for (const [event, groups] of Object.entries(hooks)) {
|
|
363
385
|
if (!Array.isArray(groups) || groups.length === 0)
|
|
364
386
|
continue;
|
|
365
|
-
const kept = filterSettingsHookGroups(source, event, groups, engine.pluginHooksCapable === true, (type) => shellRuns(event, type),
|
|
387
|
+
const kept = filterSettingsHookGroups(source, event, groups, engine.pluginHooksCapable === true, (type) => shellRuns(event, type), judge);
|
|
366
388
|
settingsDropped.push(...kept.drops);
|
|
367
389
|
settingsVerdicts.push(...kept.verdicts);
|
|
368
390
|
settingsExcluded.push(...kept.excluded);
|
|
@@ -401,25 +423,8 @@ function buildHooksWirePlan(engine, shellRuns, withPlugins, promptAuthoredByUser
|
|
|
401
423
|
'stripped before sending (plugin context is only minted for entries from the plugin reader)');
|
|
402
424
|
}
|
|
403
425
|
const wireOf = () => (Object.keys(merged).length > 0 ? merged : undefined);
|
|
404
|
-
if (
|
|
405
|
-
|
|
406
|
-
for (const d of settingsDropped) {
|
|
407
|
-
if (!d.notRun)
|
|
408
|
-
continue;
|
|
409
|
-
const key = `${d.event}\u0000${d.reason}`;
|
|
410
|
-
if (seen?.has(key) === true)
|
|
411
|
-
continue;
|
|
412
|
-
if (seen === undefined) {
|
|
413
|
-
seen = new Set();
|
|
414
|
-
warnedNoPlanDrops.set(settings, seen);
|
|
415
|
-
}
|
|
416
|
-
seen.add(key);
|
|
417
|
-
hostLog('warn', noPlanDropWarning(d.event, d.reason));
|
|
418
|
-
}
|
|
419
|
-
return planOf('absent', wireOf());
|
|
420
|
-
}
|
|
421
|
-
if (read?.reading === undefined)
|
|
422
|
-
return planOf(read?.state ?? 'absent', wireOf());
|
|
426
|
+
if (read.reading === undefined)
|
|
427
|
+
return planOf(read.state, wireOf());
|
|
423
428
|
if (pluginDataThrew)
|
|
424
429
|
return planOf('failed', wireOf());
|
|
425
430
|
const reading = read.reading;
|
|
@@ -451,7 +456,6 @@ export function __resetHooksWireCapsForTests() {
|
|
|
451
456
|
__resetGoalStopHookForTests();
|
|
452
457
|
warnedNoMergedReader = new WeakSet();
|
|
453
458
|
warnedNoPluginReader = new WeakSet();
|
|
454
|
-
warnedNoPlanDrops = new WeakMap();
|
|
455
459
|
}
|
|
456
460
|
export function fleetHookFailureNoticeCapable(baseUrl) {
|
|
457
461
|
return engineCapNestedTrue(baseUrl, 'fleet', 'hookFailureNotice');
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
declare const EN: {
|
|
2
|
+
'onboard.chrome.step': string;
|
|
3
|
+
'onboard.chrome.quitHint': string;
|
|
4
|
+
'onboard.chrome.quitArmed': string;
|
|
5
|
+
'onboard.station.language': string;
|
|
6
|
+
'onboard.station.theme': string;
|
|
7
|
+
'onboard.station.model': string;
|
|
8
|
+
'onboard.station.tiers': string;
|
|
9
|
+
'onboard.station.websearch': string;
|
|
10
|
+
'onboard.station.memory': string;
|
|
11
|
+
'onboard.station.mcp': string;
|
|
12
|
+
'onboard.station.skills': string;
|
|
13
|
+
'onboard.station.plugins': string;
|
|
14
|
+
'onboard.blurb.model': string;
|
|
15
|
+
'onboard.blurb.tiers': string;
|
|
16
|
+
'onboard.blurb.mcp': string;
|
|
17
|
+
'onboard.blurb.skills': string;
|
|
18
|
+
'onboard.blurb.plugins': string;
|
|
19
|
+
'onboard.welcome.title': string;
|
|
20
|
+
'onboard.welcome.tagline': string;
|
|
21
|
+
'onboard.theme.hint': string;
|
|
22
|
+
'onboard.theme.hintFirst': string;
|
|
23
|
+
'onboard.language.title': string;
|
|
24
|
+
'onboard.language.blurb': string;
|
|
25
|
+
'onboard.language.hint': string;
|
|
26
|
+
'onboard.language.detected': string;
|
|
27
|
+
'onboard.language.savedPreference': string;
|
|
28
|
+
'onboard.language.sourceDefault': string;
|
|
29
|
+
'onboard.memory.title': string;
|
|
30
|
+
'onboard.memory.on': string;
|
|
31
|
+
'onboard.memory.off': string;
|
|
32
|
+
'onboard.memory.current': string;
|
|
33
|
+
'onboard.memory.blurb': string;
|
|
34
|
+
'onboard.memory.hint': string;
|
|
35
|
+
'onboard.language.saveFailed': string;
|
|
36
|
+
'config.header.subtitle': string;
|
|
37
|
+
'config.menu.hint': string;
|
|
38
|
+
'config.domain.model': string;
|
|
39
|
+
'config.domain.tiers': string;
|
|
40
|
+
'config.domain.mcp': string;
|
|
41
|
+
'config.domain.skills': string;
|
|
42
|
+
'config.domain.plugins': string;
|
|
43
|
+
'config.domain.marketplaces': string;
|
|
44
|
+
'config.domain.engine': string;
|
|
45
|
+
'config.domain.language': string;
|
|
46
|
+
'config.language.title': string;
|
|
47
|
+
'config.language.intro': string;
|
|
48
|
+
'config.language.hint': string;
|
|
49
|
+
'config.language.saved': string;
|
|
50
|
+
'config.language.saveFailed': string;
|
|
51
|
+
'config.language.sourceSaved': string;
|
|
52
|
+
'config.language.sourceSystem': string;
|
|
53
|
+
'config.language.sourceDefault': string;
|
|
54
|
+
'doctor.section.diagnostics': string;
|
|
55
|
+
'doctor.section.version': string;
|
|
56
|
+
'doctor.section.settings': string;
|
|
57
|
+
'doctor.section.updates': string;
|
|
58
|
+
'doctor.section.engine': string;
|
|
59
|
+
'doctor.section.axes': string;
|
|
60
|
+
'doctor.common.unknown': string;
|
|
61
|
+
'doctor.version.line': string;
|
|
62
|
+
'doctor.version.enginePinned': string;
|
|
63
|
+
'doctor.version.ccBase': string;
|
|
64
|
+
'doctor.version.packageManager': string;
|
|
65
|
+
'doctor.version.path': string;
|
|
66
|
+
'doctor.version.invoked': string;
|
|
67
|
+
'doctor.version.diagnosticUnavailable': string;
|
|
68
|
+
'doctor.row.warn': string;
|
|
69
|
+
'doctor.row.fix': string;
|
|
70
|
+
'doctor.row.learnMore': string;
|
|
71
|
+
'doctor.settings.ok': string;
|
|
72
|
+
'doctor.settings.fileUnspecified': string;
|
|
73
|
+
'doctor.settings.checkUnavailable': string;
|
|
74
|
+
'doctor.updates.devChannel': string;
|
|
75
|
+
'doctor.updates.npmChannel': string;
|
|
76
|
+
'doctor.updates.installed': string;
|
|
77
|
+
'doctor.updates.latest': string;
|
|
78
|
+
'doctor.updates.upToDateSuffix': string;
|
|
79
|
+
'doctor.updates.updateAvailable': string;
|
|
80
|
+
'doctor.updates.fetchFailed': string;
|
|
81
|
+
'doctor.updates.checkUnavailable': string;
|
|
82
|
+
'doctor.updates.localChannel': string;
|
|
83
|
+
'doctor.updates.unknownChannel': string;
|
|
84
|
+
'doctor.updates.aheadSuffix': string;
|
|
85
|
+
'doctor.updates.updateAvailableLocal': string;
|
|
86
|
+
'doctor.updates.autoOn': string;
|
|
87
|
+
'doctor.updates.autoOff': string;
|
|
88
|
+
'doctor.updates.lastAutoFailure': string;
|
|
89
|
+
'doctor.diag.managedSettingsInvalid.issue': string;
|
|
90
|
+
'doctor.diag.managedSettingsInvalid.fix': string;
|
|
91
|
+
'doctor.diag.managedSettingsUnknown.issue': string;
|
|
92
|
+
'doctor.diag.managedSettingsUnknown.fix': string;
|
|
93
|
+
'doctor.diag.pathWindows.issue': string;
|
|
94
|
+
'doctor.diag.pathWindows.fix': string;
|
|
95
|
+
'doctor.diag.pathUnix.issue': string;
|
|
96
|
+
'doctor.diag.pathUnix.fix': string;
|
|
97
|
+
'doctor.diag.unknownShellConfig': string;
|
|
98
|
+
'doctor.diag.localMismatch.issue': string;
|
|
99
|
+
'doctor.diag.nativeMismatch.issue': string;
|
|
100
|
+
'doctor.diag.considerNative.fix': string;
|
|
101
|
+
'doctor.diag.runSemaInstall.fix': string;
|
|
102
|
+
'doctor.diag.localExists.issue': string;
|
|
103
|
+
'doctor.diag.localNotAccessible.issue': string;
|
|
104
|
+
'doctor.diag.localNotAccessibleAlias.fix': string;
|
|
105
|
+
'doctor.diag.localNotAccessibleNoAlias.fix': string;
|
|
106
|
+
'doctor.diag.linuxGlob.issue': string;
|
|
107
|
+
'doctor.diag.linuxGlob.fix': string;
|
|
108
|
+
'doctor.diag.leftoverGlobal.issue': string;
|
|
109
|
+
'doctor.diag.orphanGlobal.issue': string;
|
|
110
|
+
'doctor.diag.leftoverLocal.issue': string;
|
|
111
|
+
'doctor.diag.runCmd.fix': string;
|
|
112
|
+
'doctor.diag.insufficientPermissions.issue': string;
|
|
113
|
+
'doctor.diag.insufficientPermissions.fix': string;
|
|
114
|
+
'model.subagent.tiersInert': string;
|
|
115
|
+
'model.subagent.chainUnbound': string;
|
|
116
|
+
'model.subagent.bindingNotInCatalog': string;
|
|
117
|
+
'model.subagent.ambiguous': string;
|
|
118
|
+
};
|
|
119
|
+
export declare const EN_MESSAGES: Readonly<typeof EN>;
|
|
120
|
+
export type MessageKey = keyof typeof EN;
|
|
121
|
+
export {};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
const EN = {
|
|
2
|
+
'onboard.chrome.step': 'Step {step} of {total} · {label}',
|
|
3
|
+
'onboard.chrome.quitHint': '(ctrl+C twice to quit)',
|
|
4
|
+
'onboard.chrome.quitArmed': 'press again to quit setup',
|
|
5
|
+
'onboard.station.language': 'Language',
|
|
6
|
+
'onboard.station.theme': 'Theme',
|
|
7
|
+
'onboard.station.model': 'Model',
|
|
8
|
+
'onboard.station.tiers': 'Model tiers',
|
|
9
|
+
'onboard.station.websearch': 'Web search',
|
|
10
|
+
'onboard.station.memory': 'Memory',
|
|
11
|
+
'onboard.station.mcp': 'MCP servers',
|
|
12
|
+
'onboard.station.skills': 'Skills',
|
|
13
|
+
'onboard.station.plugins': 'Plugins',
|
|
14
|
+
'onboard.blurb.model': 'Add the model(s) sema should use — you can change this anytime with `sema config model`.',
|
|
15
|
+
'onboard.blurb.tiers': 'Bind your models to tiers (pro drives everyday work, flash the cheap volume) and pick the default tier — you can change this anytime with `sema config tiers`.',
|
|
16
|
+
'onboard.blurb.mcp': 'Import MCP servers — you can change this anytime with `sema config mcp`.',
|
|
17
|
+
'onboard.blurb.skills': 'Import skills — you can change this anytime with `sema config skills`.',
|
|
18
|
+
'onboard.blurb.plugins': 'Install plugins — you can change this anytime with `sema config plugins`.',
|
|
19
|
+
'onboard.welcome.title': '✻ Welcome to Sema',
|
|
20
|
+
'onboard.welcome.tagline': 'One shell, your whole fleet — local engine autostart, multi-agent orchestration, cloud when you want it.',
|
|
21
|
+
'onboard.theme.hint': 'enter to continue · esc to go back · q twice to quit',
|
|
22
|
+
'onboard.theme.hintFirst': 'enter to continue · q/esc twice to quit',
|
|
23
|
+
'onboard.language.title': 'Choose your language',
|
|
24
|
+
'onboard.language.blurb': "sema's own screens (setup, `sema config`, `sema doctor`) use this language — you can change it anytime with `sema config language`.",
|
|
25
|
+
'onboard.language.hint': '↑↓ to select · enter to continue',
|
|
26
|
+
'onboard.language.detected': 'detected from your system',
|
|
27
|
+
'onboard.language.savedPreference': 'your saved preference',
|
|
28
|
+
'onboard.language.sourceDefault': 'default — no saved choice and no system language found',
|
|
29
|
+
'onboard.memory.title': 'Should sema remember things across sessions?',
|
|
30
|
+
'onboard.memory.on': 'On — remember useful facts and preferences',
|
|
31
|
+
'onboard.memory.off': 'Off — nothing is saved, recalled or added to requests',
|
|
32
|
+
'onboard.memory.current': 'current setting',
|
|
33
|
+
'onboard.memory.blurb': 'Auto-memory is kept by the engine and shared by all your projects. You can change this anytime with /memory or `sema config`.',
|
|
34
|
+
'onboard.memory.hint': '↑↓ to select · enter to continue',
|
|
35
|
+
'onboard.language.saveFailed': "language picked {language}, but it could not be saved ({error}) — this session only",
|
|
36
|
+
'config.header.subtitle': 'Settings',
|
|
37
|
+
'config.menu.hint': '↑↓ to select · enter to open · esc to exit',
|
|
38
|
+
'config.domain.model': 'Model',
|
|
39
|
+
'config.domain.tiers': 'Model tiers',
|
|
40
|
+
'config.domain.mcp': 'MCP servers',
|
|
41
|
+
'config.domain.skills': 'Skills',
|
|
42
|
+
'config.domain.plugins': 'Plugins',
|
|
43
|
+
'config.domain.marketplaces': 'Marketplaces',
|
|
44
|
+
'config.domain.engine': 'Engine',
|
|
45
|
+
'config.domain.language': 'Language',
|
|
46
|
+
'config.language.title': 'Language',
|
|
47
|
+
'config.language.intro': "The language sema's own screens use. The model's replies follow your prompt and the /config `Language` setting, not this one.",
|
|
48
|
+
'config.language.hint': '↑↓ to select · enter to save · esc to go back',
|
|
49
|
+
'config.language.saved': 'Language set to {language}.',
|
|
50
|
+
'config.language.saveFailed': 'Could not save the language: {error}',
|
|
51
|
+
'config.language.sourceSaved': 'saved',
|
|
52
|
+
'config.language.sourceSystem': 'from system locale',
|
|
53
|
+
'config.language.sourceDefault': 'default (no saved choice and no system language found)',
|
|
54
|
+
'doctor.section.diagnostics': 'Diagnostics',
|
|
55
|
+
'doctor.section.version': 'Version',
|
|
56
|
+
'doctor.section.settings': 'Settings',
|
|
57
|
+
'doctor.section.updates': 'Updates',
|
|
58
|
+
'doctor.section.engine': 'Engine',
|
|
59
|
+
'doctor.section.axes': 'Axes',
|
|
60
|
+
'doctor.common.unknown': 'unknown',
|
|
61
|
+
'doctor.version.line': '└ Version: sema {version}',
|
|
62
|
+
'doctor.version.enginePinned': '└ Engine (pinned): {version}',
|
|
63
|
+
'doctor.version.ccBase': '└ CC-compatible base: {version} · running as {installationType}',
|
|
64
|
+
'doctor.version.packageManager': '└ Package manager: {packageManager}',
|
|
65
|
+
'doctor.version.path': '└ Path: {path}',
|
|
66
|
+
'doctor.version.invoked': '└ Invoked: {binary}',
|
|
67
|
+
'doctor.version.diagnosticUnavailable': '└ WARN installation diagnostic unavailable',
|
|
68
|
+
'doctor.row.warn': '└ WARN {issue}',
|
|
69
|
+
'doctor.row.fix': ' fix: {fix}',
|
|
70
|
+
'doctor.row.learnMore': ' learn more: {link}',
|
|
71
|
+
'doctor.settings.ok': '└ Settings files: OK no problems reported',
|
|
72
|
+
'doctor.settings.fileUnspecified': '(file not specified)',
|
|
73
|
+
'doctor.settings.checkUnavailable': '└ WARN settings check unavailable',
|
|
74
|
+
'doctor.updates.devChannel': '└ Channel: dev workdir (local dist build — not an npm install)',
|
|
75
|
+
'doctor.updates.npmChannel': '└ Channel: npm registry (@sema-agent/cli)',
|
|
76
|
+
'doctor.updates.installed': '└ Installed: {version}',
|
|
77
|
+
'doctor.updates.latest': '└ Latest: {version}',
|
|
78
|
+
'doctor.updates.upToDateSuffix': ' (up to date)',
|
|
79
|
+
'doctor.updates.updateAvailable': '└ Update available — run `sema update`',
|
|
80
|
+
'doctor.updates.fetchFailed': '└ Failed to fetch latest from the sema registry',
|
|
81
|
+
'doctor.updates.checkUnavailable': '└ WARN update check unavailable',
|
|
82
|
+
'doctor.updates.localChannel': "└ Channel: npm package installed in {path} (not npm's global install)",
|
|
83
|
+
'doctor.updates.unknownChannel': '└ Channel: npm package (install location unconfirmed: {why})',
|
|
84
|
+
'doctor.updates.aheadSuffix': ' (installed version is newer — nothing to update)',
|
|
85
|
+
'doctor.updates.updateAvailableLocal': "└ Update available — update it where it was installed (sema update only updates npm's global install)",
|
|
86
|
+
'doctor.updates.autoOn': '└ Auto-updates: enabled (checked every 4h)',
|
|
87
|
+
'doctor.updates.autoOff': '└ Auto-updates: disabled ({reason})',
|
|
88
|
+
'doctor.updates.lastAutoFailure': '└ Last automatic update: {detail}',
|
|
89
|
+
'doctor.diag.managedSettingsInvalid.issue': 'managed-settings.json: strictPluginOnlyCustomization has an invalid value (expected true or an array, got {type})',
|
|
90
|
+
'doctor.diag.managedSettingsInvalid.fix': 'The field is silently ignored (schema .catch rescues it). Set it to true, or an array of: {surfaces}.',
|
|
91
|
+
'doctor.diag.managedSettingsUnknown.issue': "managed-settings.json: strictPluginOnlyCustomization has {count} value(s) this client doesn't recognize: {values}",
|
|
92
|
+
'doctor.diag.managedSettingsUnknown.fix': 'These are silently ignored (forwards-compat). Known surfaces for this version: {surfaces}. Either remove them, or this client is older than the managed-settings intended.',
|
|
93
|
+
'doctor.diag.pathWindows.issue': 'Native installation exists but {path} is not in your PATH',
|
|
94
|
+
'doctor.diag.pathWindows.fix': 'Add it by opening: System Properties → Environment Variables → Edit User PATH → New → Add the path above. Then restart your terminal.',
|
|
95
|
+
'doctor.diag.pathUnix.issue': 'Native installation exists but ~/.local/bin is not in your PATH',
|
|
96
|
+
'doctor.diag.pathUnix.fix': 'Run: echo \'export PATH="$HOME/.local/bin:$PATH"\' >> {configFile} then open a new terminal or run: source {configFile}',
|
|
97
|
+
'doctor.diag.unknownShellConfig': 'your shell config file',
|
|
98
|
+
'doctor.diag.localMismatch.issue': "Running from local installation but config install method is '{method}'",
|
|
99
|
+
'doctor.diag.nativeMismatch.issue': "Running native installation but config install method is '{method}'",
|
|
100
|
+
'doctor.diag.considerNative.fix': 'Consider using native installation: sema install',
|
|
101
|
+
'doctor.diag.runSemaInstall.fix': 'Run sema install to update configuration',
|
|
102
|
+
'doctor.diag.localExists.issue': 'Local installation exists but not being used',
|
|
103
|
+
'doctor.diag.localNotAccessible.issue': 'Local installation not accessible',
|
|
104
|
+
'doctor.diag.localNotAccessibleAlias.fix': 'Alias exists but points to invalid target: {alias}. Update alias: alias claude="~/.sema/local/claude"',
|
|
105
|
+
'doctor.diag.localNotAccessibleNoAlias.fix': 'Create alias: alias claude="~/.sema/local/claude"',
|
|
106
|
+
'doctor.diag.linuxGlob.issue': 'Glob patterns in sandbox permission rules are not fully supported on Linux',
|
|
107
|
+
'doctor.diag.linuxGlob.fix': 'Found {count} pattern(s): {patterns}. On Linux, glob patterns in Edit/Read rules will be ignored.',
|
|
108
|
+
'doctor.diag.leftoverGlobal.issue': 'Leftover npm global installation at {path}',
|
|
109
|
+
'doctor.diag.orphanGlobal.issue': 'Orphaned npm global package at {path}',
|
|
110
|
+
'doctor.diag.leftoverLocal.issue': 'Leftover npm local installation at {path}',
|
|
111
|
+
'doctor.diag.runCmd.fix': 'Run: {cmd}',
|
|
112
|
+
'doctor.diag.insufficientPermissions.issue': 'Insufficient permissions for auto-updates',
|
|
113
|
+
'doctor.diag.insufficientPermissions.fix': 'Do one of: (1) Re-install node without sudo, or (2) Use `sema install` for native installation',
|
|
114
|
+
'model.subagent.tiersInert': "Subagent model {word} is a tier word, but this engine has no model tiers configured — the subagent will run on its parent's model.",
|
|
115
|
+
'model.subagent.chainUnbound': "Subagent model {word} is not bound on this engine (neither it nor any tier below it has a model) — the subagent will run on its parent's model.",
|
|
116
|
+
'model.subagent.bindingNotInCatalog': "Subagent model {word} is bound to a model that is not in this engine's model catalog — the subagent will run on its parent's model.",
|
|
117
|
+
'model.subagent.ambiguous': "Subagent model {word} matches more than one model name that differ only in case — spell it exactly; the subagent will run on its parent's model.",
|
|
118
|
+
};
|
|
119
|
+
export const EN_MESSAGES = Object.freeze(EN);
|