@sema-agent/client-core 0.111.0 → 0.112.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 +75 -0
- package/README.md +15 -6
- package/dist/agentSession/engineSessionBackgroundStop.js +2 -2
- package/dist/checkpointRowVerdict.d.ts +3 -0
- package/dist/checkpointRowVerdict.js +14 -1
- package/dist/consoleCaPin.d.ts +136 -0
- package/dist/consoleCaPin.js +827 -0
- package/dist/decideReceipt.d.ts +2 -1
- package/dist/deviceRebind.js +3 -3
- package/dist/effectiveFacts.d.ts +9 -0
- package/dist/effectiveFacts.js +33 -0
- package/dist/engineAddress.d.ts +1 -0
- package/dist/engineAddress.js +4 -1
- package/dist/engineCredentialRelease.d.ts +54 -0
- package/dist/engineCredentialRelease.js +146 -0
- package/dist/engineErrorCodes.d.ts +1 -0
- package/dist/engineErrorCodes.js +1 -0
- package/dist/engineHealthFacts.d.ts +0 -11
- package/dist/engineHealthFacts.js +0 -21
- package/dist/engineHealthProbeVerdict.d.ts +1 -0
- package/dist/engineHealthProbeVerdict.js +21 -13
- package/dist/engineUnavailable.d.ts +3 -2
- package/dist/engineUnavailable.js +16 -12
- package/dist/engineUrl.js +4 -2
- package/dist/gateFailureCodes.js +2 -2
- package/dist/generated/sdkFactTables.d.ts +1 -0
- package/dist/generated/sdkFactTables.js +13 -0
- package/dist/generated/settingsSchemaFns.d.ts +1 -0
- package/dist/generated/settingsSchemaFns.js +3 -0
- package/dist/generated/settingsSchemaHooksClassifier.js +38 -9
- package/dist/generated/settingsSchemaTables.d.ts +52 -0
- package/dist/generated/settingsSchemaTables.js +18 -0
- package/dist/generated/settingsSchemaTypes.d.ts +23 -13
- package/dist/generated/settingsSchemaUrlShape.d.ts +1 -0
- package/dist/generated/settingsSchemaUrlShape.js +17 -0
- package/dist/hitl/decisionRefusal.d.ts +4 -0
- package/dist/hitl/decisionRefusal.js +12 -2
- package/dist/hitl/localAllowRedemption.d.ts +9 -6
- package/dist/hitl/localAllowRedemption.js +20 -0
- package/dist/hitl/parkOwnership.js +2 -1
- package/dist/hitl/parkResolver.js +7 -0
- package/dist/hitl/screenDecisionCards.js +3 -2
- package/dist/hitl/sessionPolicyWire.js +2 -2
- package/dist/hitl/standingRows.d.ts +4 -2
- package/dist/hitl/standingRows.js +10 -3
- package/dist/hooksReaderGenerations.js +1 -1
- package/dist/i18n/messages.en.d.ts +163 -0
- package/dist/i18n/messages.en.js +163 -0
- package/dist/i18n/messages.zh.js +174 -0
- package/dist/index.d.ts +30 -5
- package/dist/index.js +15 -2
- package/dist/liveModelCatalog.d.ts +4 -0
- package/dist/liveModelCatalog.js +10 -1
- package/dist/localConfig/documents.d.ts +61 -0
- package/dist/localConfig/documents.js +51 -0
- package/dist/localConfig/kernel.d.ts +149 -0
- package/dist/localConfig/kernel.js +597 -0
- package/dist/localConfig/mcp/edit.d.ts +161 -0
- package/dist/localConfig/mcp/edit.js +846 -0
- package/dist/localConfig/mcp/servers.d.ts +165 -0
- package/dist/localConfig/mcp/servers.js +776 -0
- package/dist/localConfig/mcp/views.d.ts +170 -0
- package/dist/localConfig/mcp/views.js +429 -0
- package/dist/localConfig/modelPool.d.ts +262 -0
- package/dist/localConfig/modelPool.js +1489 -0
- package/dist/localConfig/modelPoolWords.d.ts +13 -0
- package/dist/localConfig/modelPoolWords.js +20 -0
- package/dist/localConfig/receiptShape.d.ts +7 -0
- package/dist/localConfig/receiptShape.js +135 -0
- package/dist/localConfig/settingsWrite.d.ts +127 -0
- package/dist/localConfig/settingsWrite.js +237 -0
- package/dist/localConfig/skills.d.ts +124 -0
- package/dist/localConfig/skills.js +397 -0
- package/dist/localConfig/skillsWords.d.ts +10 -0
- package/dist/localConfig/skillsWords.js +5 -0
- package/dist/mcpProbeWire.js +2 -1
- package/dist/mcpWireCaps.js +1 -1
- package/dist/memoryVerbsWire.js +3 -2
- package/dist/model/onboardJudgement.d.ts +14 -4
- package/dist/model/onboardJudgement.js +91 -139
- package/dist/modelConfigGapNotice.d.ts +20 -0
- package/dist/modelConfigGapNotice.js +102 -0
- package/dist/modsKernelIdentity.js +2 -47
- package/dist/ownKey.d.ts +1 -0
- package/dist/ownKey.js +40 -8
- package/dist/permissionsDeclaration.d.ts +2 -1
- package/dist/permissionsDeclaration.js +31 -17
- package/dist/promptBlockedCopy.js +2 -2
- package/dist/resumeRefusalCopy.d.ts +3 -1
- package/dist/resumeRefusalCopy.js +12 -4
- package/dist/runLedgerSnapshot.js +3 -3
- package/dist/runPermissionModeSwitch.js +2 -3
- package/dist/seatContract.d.ts +154 -4
- package/dist/seatContract.js +228 -2
- package/dist/sessionIdSegment.d.ts +1 -0
- package/dist/sessionIdSegment.js +4 -1
- package/dist/sessionMemoryErase.js +2 -1
- package/dist/sha256Bytes.d.ts +1 -0
- package/dist/sha256Bytes.js +46 -0
- package/dist/skillOverrideChain.d.ts +83 -0
- package/dist/skillOverrideChain.js +378 -0
- package/dist/skillsWireCaps.d.ts +3 -0
- package/dist/skillsWireCaps.js +16 -1
- package/dist/turnFailurePresentation.js +4 -10
- package/docs/INTEGRATION-CLIENTS.md +614 -14
- package/package.json +3 -3
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import type { McpServerSpec } from '@sema-agent/sdk';
|
|
2
|
+
import type { SettingsDocument } from '../../host.js';
|
|
3
|
+
import type { LocalConfigFileReading } from '../kernel.js';
|
|
4
|
+
import { type McpConfigDropReason } from '../../mcpWireCaps.js';
|
|
5
|
+
import { type HostSettingsSource } from '../../hostSettingsSource.js';
|
|
6
|
+
import type { UiLanguage } from '../../env/uiLanguage.js';
|
|
7
|
+
export declare const MCP_SERVER_SCOPES: readonly ["user", "project", "local"];
|
|
8
|
+
export type McpServerScope = (typeof MCP_SERVER_SCOPES)[number];
|
|
9
|
+
export type McpServerFileReading = LocalConfigFileReading;
|
|
10
|
+
export interface McpServerFilesReading {
|
|
11
|
+
readonly global?: McpServerFileReading;
|
|
12
|
+
readonly projectKey?: string;
|
|
13
|
+
readonly projectChain?: readonly McpServerFileReading[];
|
|
14
|
+
readonly enterprise?: McpServerFileReading;
|
|
15
|
+
}
|
|
16
|
+
export interface McpServerEnvFacts {
|
|
17
|
+
readonly values?: Readonly<Record<string, string | undefined>>;
|
|
18
|
+
readonly hostSecretNames?: readonly string[];
|
|
19
|
+
}
|
|
20
|
+
export interface McpServerHostFacts {
|
|
21
|
+
readonly permissionMode?: 'bypass' | 'other';
|
|
22
|
+
readonly nonInteractive?: boolean;
|
|
23
|
+
readonly sessionApproved?: readonly string[];
|
|
24
|
+
readonly reservedNames?: readonly string[];
|
|
25
|
+
readonly defaultOffNames?: readonly string[];
|
|
26
|
+
readonly deploymentNames?: readonly string[] | 'unknown';
|
|
27
|
+
readonly projectConfigRootSet?: boolean;
|
|
28
|
+
readonly env?: McpServerEnvFacts;
|
|
29
|
+
}
|
|
30
|
+
export type McpSupplementarySlot<T> = T | 'unreadable';
|
|
31
|
+
type RawTable = Readonly<Record<string, unknown>>;
|
|
32
|
+
export interface McpServerSupplementarySources {
|
|
33
|
+
readonly claudeai?: McpSupplementarySlot<RawTable>;
|
|
34
|
+
readonly plugin?: McpSupplementarySlot<RawTable>;
|
|
35
|
+
readonly agent?: McpSupplementarySlot<{
|
|
36
|
+
readonly fromFlagSettings: boolean;
|
|
37
|
+
readonly servers: RawTable;
|
|
38
|
+
}>;
|
|
39
|
+
readonly dynamic?: McpSupplementarySlot<RawTable>;
|
|
40
|
+
readonly strictDynamicOnly?: boolean;
|
|
41
|
+
}
|
|
42
|
+
export type McpServerRowScope = McpServerScope | 'managed' | 'enterprise' | 'claudeai' | 'plugin' | 'agent' | 'dynamic';
|
|
43
|
+
export declare const MCP_SERVER_ROW_STATES: readonly ["active", "pending_approval", "rejected", "disabled", "withheld", "unusable"];
|
|
44
|
+
export type McpServerRowState = (typeof MCP_SERVER_ROW_STATES)[number];
|
|
45
|
+
export declare const MCP_SERVER_WITHHELD_CAUSES: readonly ["narrowing_conflict", "narrowing_invalid", "layer_unreadable", "policy_locked"];
|
|
46
|
+
export type McpServerWithheldCause = (typeof MCP_SERVER_WITHHELD_CAUSES)[number];
|
|
47
|
+
export type McpServerApprovedBy = 'settings' | 'session' | 'bypass' | 'non_interactive';
|
|
48
|
+
export type McpServerSourceFile = 'global' | 'project' | 'enterprise' | 'managed' | 'supplementary';
|
|
49
|
+
export interface McpServerProblem {
|
|
50
|
+
readonly reason: McpConfigDropReason | 'name_reserved';
|
|
51
|
+
readonly path?: string;
|
|
52
|
+
readonly notice: string;
|
|
53
|
+
}
|
|
54
|
+
export interface McpServerRow {
|
|
55
|
+
readonly name: string;
|
|
56
|
+
readonly scope: McpServerRowScope;
|
|
57
|
+
readonly entry: {} | null | undefined;
|
|
58
|
+
readonly shadows: readonly McpServerRowScope[];
|
|
59
|
+
readonly state: McpServerRowState;
|
|
60
|
+
readonly withheldBy?: McpServerWithheldCause;
|
|
61
|
+
readonly approvedBy?: McpServerApprovedBy;
|
|
62
|
+
readonly problems?: readonly McpServerProblem[];
|
|
63
|
+
readonly origin: {
|
|
64
|
+
readonly file: McpServerSourceFile;
|
|
65
|
+
readonly revision: string | null;
|
|
66
|
+
};
|
|
67
|
+
readonly writable: boolean;
|
|
68
|
+
readonly spec?: McpServerSpec;
|
|
69
|
+
readonly missing: readonly string[];
|
|
70
|
+
readonly withheldVars: readonly string[];
|
|
71
|
+
}
|
|
72
|
+
export type McpDeploymentRows = {
|
|
73
|
+
readonly state: 'unknown';
|
|
74
|
+
} | {
|
|
75
|
+
readonly state: 'read';
|
|
76
|
+
readonly names: readonly string[];
|
|
77
|
+
};
|
|
78
|
+
export interface McpServersReport {
|
|
79
|
+
readonly rows: readonly McpServerRow[];
|
|
80
|
+
readonly unreadable: readonly McpServerSourceFile[];
|
|
81
|
+
readonly locked: 'enterprise_config' | 'plugin_only' | undefined;
|
|
82
|
+
readonly purpose: 'report' | 'load';
|
|
83
|
+
readonly approvalsWithheld: readonly {
|
|
84
|
+
readonly layer: 'projectSettings' | 'localSettings';
|
|
85
|
+
readonly cause: 'trust_withheld';
|
|
86
|
+
}[];
|
|
87
|
+
readonly deployment: McpDeploymentRows;
|
|
88
|
+
readonly pluginRoster: 'host_supplied' | 'absent';
|
|
89
|
+
readonly promptsAndResources: 'not_yet';
|
|
90
|
+
}
|
|
91
|
+
export declare function ownData(v: {} | null | undefined, key: string): {
|
|
92
|
+
readonly ok: true;
|
|
93
|
+
readonly value: {} | null | undefined;
|
|
94
|
+
} | {
|
|
95
|
+
readonly ok: false;
|
|
96
|
+
};
|
|
97
|
+
export declare function stringListOf(v: {} | null | undefined): string[] | undefined;
|
|
98
|
+
export type McpNameListReading = {
|
|
99
|
+
readonly kind: 'absent';
|
|
100
|
+
} | {
|
|
101
|
+
readonly kind: 'list';
|
|
102
|
+
readonly list: readonly string[];
|
|
103
|
+
} | {
|
|
104
|
+
readonly kind: 'bad';
|
|
105
|
+
};
|
|
106
|
+
export declare function nameListOf(holder: {} | null | undefined, key: string): McpNameListReading;
|
|
107
|
+
export declare function subTableOf(doc: {} | null | undefined, path: readonly string[]): {
|
|
108
|
+
readonly kind: 'table';
|
|
109
|
+
readonly table: object;
|
|
110
|
+
} | {
|
|
111
|
+
readonly kind: 'absent';
|
|
112
|
+
} | {
|
|
113
|
+
readonly kind: 'bad';
|
|
114
|
+
};
|
|
115
|
+
export declare function documentOf(r: McpServerFileReading | undefined): SettingsDocument | undefined;
|
|
116
|
+
export declare const localScopePath: (projectKey: string) => readonly string[];
|
|
117
|
+
export declare const USER_SCOPE_PATH: readonly string[];
|
|
118
|
+
export declare const PROJECT_FILE_PATH: readonly string[];
|
|
119
|
+
export declare function mcpProjectChainOf(startDir: string, sep: '/' | '\\', fence?: string): readonly string[];
|
|
120
|
+
export declare function mcpPathWithinFence(physicalPath: string, fence: string, sep: '/' | '\\'): boolean;
|
|
121
|
+
export interface McpExpansion {
|
|
122
|
+
readonly entry: {} | null | undefined;
|
|
123
|
+
readonly missing: readonly string[];
|
|
124
|
+
readonly withheld: readonly string[];
|
|
125
|
+
}
|
|
126
|
+
export declare function expandMcpServerEntry(entry: {} | null | undefined, env: McpServerEnvFacts | undefined, target: 'plain' | 'remote'): McpExpansion;
|
|
127
|
+
export declare function expansionTargetOf(entry: {} | null | undefined): 'plain' | 'remote';
|
|
128
|
+
export interface JudgedEntry {
|
|
129
|
+
readonly name: string;
|
|
130
|
+
readonly raw: {} | null | undefined;
|
|
131
|
+
readonly spec: McpServerSpec | undefined;
|
|
132
|
+
readonly problems: readonly McpServerProblem[];
|
|
133
|
+
readonly missing: readonly string[];
|
|
134
|
+
readonly withheld: readonly string[];
|
|
135
|
+
readonly vote: {
|
|
136
|
+
readonly kind: 'absent';
|
|
137
|
+
} | {
|
|
138
|
+
readonly kind: 'list';
|
|
139
|
+
readonly list: readonly string[];
|
|
140
|
+
} | {
|
|
141
|
+
readonly kind: 'bad';
|
|
142
|
+
} | {
|
|
143
|
+
readonly kind: 'none';
|
|
144
|
+
};
|
|
145
|
+
readonly reserved: boolean;
|
|
146
|
+
readonly envSig?: string;
|
|
147
|
+
}
|
|
148
|
+
export interface JudgeTableOptions {
|
|
149
|
+
readonly expand: boolean;
|
|
150
|
+
readonly reserved: ReadonlySet<string>;
|
|
151
|
+
readonly lang?: UiLanguage | undefined;
|
|
152
|
+
readonly signature?: boolean;
|
|
153
|
+
}
|
|
154
|
+
export declare function judgeTable(table: {} | null | undefined, env: McpServerEnvFacts | undefined, opts: JudgeTableOptions): readonly JudgedEntry[] | undefined;
|
|
155
|
+
export declare function fileReadingOf(holder: {} | null | undefined, key: string, missing: 'absent' | 'unreadable'): McpServerFileReading;
|
|
156
|
+
export interface McpServersMergeInput {
|
|
157
|
+
readonly files: McpServerFilesReading;
|
|
158
|
+
readonly facts: McpServerHostFacts;
|
|
159
|
+
readonly settings: HostSettingsSource | 'none';
|
|
160
|
+
readonly supplementarySources?: McpServerSupplementarySources;
|
|
161
|
+
readonly lang?: UiLanguage;
|
|
162
|
+
}
|
|
163
|
+
export declare function mergeMcpServers(input: McpServersMergeInput, purpose: 'report' | 'load'): McpServersReport;
|
|
164
|
+
export declare function mcpServersReport(files: McpServerFilesReading, facts: McpServerHostFacts, settings: HostSettingsSource | 'none', supplementarySources?: McpServerSupplementarySources, lang?: UiLanguage): McpServersReport;
|
|
165
|
+
export {};
|