@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,262 @@
|
|
|
1
|
+
import type { SettingsDocument } from '../host.js';
|
|
2
|
+
import type { ModelApiWord, PresetModel } from '../model/providerPresets.js';
|
|
3
|
+
import { type CatalogDefaultDangling, type CatalogDefaultSelectCriteria, type CatalogDefaultSource } from '../model/catalogDefault.js';
|
|
4
|
+
import { type Tier } from '../model/tierVocabulary.js';
|
|
5
|
+
import { type EntryVisionResolution, type PoolDeleteBlocker, type PoolDeleteWarning } from '../model/modelSupplyRules.js';
|
|
6
|
+
import { type ModelProbeResult, type ProbeVerdictWord } from '../modelCapabilityProbe.js';
|
|
7
|
+
import { type OnboardWritePlan, type OnboardWritePlanInput } from '../model/onboardJudgement.js';
|
|
8
|
+
import type { OnboardCatalogIssue, SeatModelPoolEdit } from '../seatContract.js';
|
|
9
|
+
import type { LocalConfigDisclosure, LocalConfigFileReading, LocalConfigHostFacts, LocalConfigIntent, LocalConfigPreview, LocalConfigReceipt, LocalConfigRefusal, LocalConfigStorePort } from './kernel.js';
|
|
10
|
+
import { type ModelPoolChannelSource, type ModelPoolCompleteness, type ModelPoolDefaultKeepReason, type ModelPoolProbeState } from './modelPoolWords.js';
|
|
11
|
+
export { MODEL_POOL_EDIT_KINDS, MODEL_POOL_CHANNEL_SOURCES, MODEL_POOL_CREDENTIAL_KINDS, MODEL_POOL_COMPLETENESS, MODEL_POOL_MAX_BATCH, MODEL_POOL_PROBE_STATES, MODEL_POOL_DEFAULT_KEEP_REASONS } from './modelPoolWords.js';
|
|
12
|
+
export type { ModelPoolEditKind, ModelPoolChannelSource, ModelPoolCredentialKind, ModelPoolCompleteness, ModelPoolProbeState, ModelPoolDefaultKeepReason } from './modelPoolWords.js';
|
|
13
|
+
export interface ModelPoolEntrySpec {
|
|
14
|
+
readonly modelId: string;
|
|
15
|
+
readonly api: ModelApiWord;
|
|
16
|
+
readonly baseUrl: string;
|
|
17
|
+
readonly credential: {
|
|
18
|
+
readonly kind: 'key';
|
|
19
|
+
readonly apiKey: string;
|
|
20
|
+
} | {
|
|
21
|
+
readonly kind: 'none';
|
|
22
|
+
};
|
|
23
|
+
readonly label?: string;
|
|
24
|
+
readonly vision?: boolean;
|
|
25
|
+
readonly contextWindow?: number;
|
|
26
|
+
readonly maxTokens?: number;
|
|
27
|
+
readonly channel?: string;
|
|
28
|
+
readonly probe?: ModelPoolProbeReading;
|
|
29
|
+
readonly acceptUnverified?: boolean;
|
|
30
|
+
readonly thinking?: ModelProbeResult;
|
|
31
|
+
}
|
|
32
|
+
export interface ModelPoolProbeReading {
|
|
33
|
+
readonly verdict: ProbeVerdictWord;
|
|
34
|
+
readonly at: number;
|
|
35
|
+
}
|
|
36
|
+
export type ModelPoolChannelData = SettingsDocument | readonly SettingsDocument[];
|
|
37
|
+
export interface ModelPoolModelRow {
|
|
38
|
+
readonly id: string;
|
|
39
|
+
readonly contextWindow?: number;
|
|
40
|
+
readonly maxTokens?: number;
|
|
41
|
+
}
|
|
42
|
+
export interface ModelPoolChannelProfile {
|
|
43
|
+
readonly source: ModelPoolChannelSource;
|
|
44
|
+
readonly id: string;
|
|
45
|
+
readonly name: string;
|
|
46
|
+
readonly baseUrl: string;
|
|
47
|
+
readonly api: ModelApiWord;
|
|
48
|
+
readonly apiKey?: string;
|
|
49
|
+
readonly models: readonly ModelPoolModelRow[];
|
|
50
|
+
readonly isCurrent?: boolean;
|
|
51
|
+
}
|
|
52
|
+
export type ModelPoolEdit = {
|
|
53
|
+
readonly kind: 'add';
|
|
54
|
+
readonly entries: readonly ModelPoolEntrySpec[];
|
|
55
|
+
readonly defaultIndex?: number;
|
|
56
|
+
} | {
|
|
57
|
+
readonly kind: 'update';
|
|
58
|
+
readonly name: string;
|
|
59
|
+
readonly label?: string | null;
|
|
60
|
+
readonly vision?: boolean | null;
|
|
61
|
+
readonly contextWindow?: number;
|
|
62
|
+
readonly maxTokens?: number;
|
|
63
|
+
} | {
|
|
64
|
+
readonly kind: 'remove';
|
|
65
|
+
readonly name: string;
|
|
66
|
+
} | {
|
|
67
|
+
readonly kind: 'setDefault';
|
|
68
|
+
readonly name: string;
|
|
69
|
+
} | {
|
|
70
|
+
readonly kind: 'importEnvModels';
|
|
71
|
+
} | {
|
|
72
|
+
readonly kind: 'importChannel';
|
|
73
|
+
readonly profile: ModelPoolChannelProfile;
|
|
74
|
+
readonly modelIds: readonly string[];
|
|
75
|
+
readonly defaultIndex?: number;
|
|
76
|
+
readonly acceptUnverified?: boolean;
|
|
77
|
+
} | {
|
|
78
|
+
readonly kind: 'bindTier';
|
|
79
|
+
readonly group: string;
|
|
80
|
+
readonly tier: Tier;
|
|
81
|
+
readonly name: string | null;
|
|
82
|
+
} | {
|
|
83
|
+
readonly kind: 'switchTierGroup';
|
|
84
|
+
readonly group: string;
|
|
85
|
+
} | {
|
|
86
|
+
readonly kind: 'addTierGroup';
|
|
87
|
+
readonly group: string;
|
|
88
|
+
readonly tiers?: Readonly<Partial<Record<Tier, string>>>;
|
|
89
|
+
} | {
|
|
90
|
+
readonly kind: 'removeTierGroup';
|
|
91
|
+
readonly group: string;
|
|
92
|
+
} | {
|
|
93
|
+
readonly kind: 'migrateTierGroups';
|
|
94
|
+
} | {
|
|
95
|
+
readonly kind: 'sweepOrphanKeySlots';
|
|
96
|
+
};
|
|
97
|
+
export interface ModelPoolProblem {
|
|
98
|
+
readonly reason: LocalConfigRefusal;
|
|
99
|
+
readonly detail: string;
|
|
100
|
+
readonly index?: number;
|
|
101
|
+
readonly name?: string;
|
|
102
|
+
}
|
|
103
|
+
export interface ModelPoolPlannedEntry {
|
|
104
|
+
readonly name: string;
|
|
105
|
+
readonly modelId: string;
|
|
106
|
+
readonly keyEnv: string | null;
|
|
107
|
+
readonly updatedExisting: boolean;
|
|
108
|
+
readonly probe: ModelPoolProbeState;
|
|
109
|
+
}
|
|
110
|
+
export type ModelPoolPlan = {
|
|
111
|
+
readonly ok: true;
|
|
112
|
+
readonly nextModelsDoc: SettingsDocument;
|
|
113
|
+
readonly nextSettingsDoc: SettingsDocument;
|
|
114
|
+
readonly modelsChanged: boolean;
|
|
115
|
+
readonly settingsChanged: boolean;
|
|
116
|
+
readonly entries: readonly ModelPoolPlannedEntry[];
|
|
117
|
+
readonly releasedKeySlots: readonly string[];
|
|
118
|
+
readonly warnings: readonly PoolDeleteWarning[];
|
|
119
|
+
readonly otherIssues: readonly OnboardCatalogIssue[];
|
|
120
|
+
readonly disclosures: readonly LocalConfigDisclosure[];
|
|
121
|
+
} | {
|
|
122
|
+
readonly ok: false;
|
|
123
|
+
readonly reason: LocalConfigRefusal;
|
|
124
|
+
readonly detail?: string;
|
|
125
|
+
readonly problems: readonly ModelPoolProblem[];
|
|
126
|
+
};
|
|
127
|
+
export type EffectiveDefaultModel = {
|
|
128
|
+
readonly kind: 'named';
|
|
129
|
+
readonly name: string;
|
|
130
|
+
readonly source: CatalogDefaultSource;
|
|
131
|
+
readonly dangling: readonly CatalogDefaultDangling[];
|
|
132
|
+
readonly disclosures: readonly LocalConfigDisclosure[];
|
|
133
|
+
} | {
|
|
134
|
+
readonly kind: 'select';
|
|
135
|
+
readonly select: CatalogDefaultSelectCriteria;
|
|
136
|
+
readonly disclosures: readonly LocalConfigDisclosure[];
|
|
137
|
+
} | {
|
|
138
|
+
readonly kind: 'none';
|
|
139
|
+
readonly disclosures: readonly LocalConfigDisclosure[];
|
|
140
|
+
} | {
|
|
141
|
+
readonly kind: 'unknown';
|
|
142
|
+
readonly disclosures: readonly LocalConfigDisclosure[];
|
|
143
|
+
};
|
|
144
|
+
export interface EffectiveDefaultModelInput {
|
|
145
|
+
readonly modelsDoc: SettingsDocument | null | undefined;
|
|
146
|
+
readonly userSettings: SettingsDocument | null | undefined;
|
|
147
|
+
}
|
|
148
|
+
export declare function effectiveDefaultModelOf(input: EffectiveDefaultModelInput): EffectiveDefaultModel;
|
|
149
|
+
export interface DefaultModelBatchRow {
|
|
150
|
+
readonly probe: ModelPoolProbeState;
|
|
151
|
+
}
|
|
152
|
+
export type DefaultModelChoice = {
|
|
153
|
+
readonly kind: 'pick';
|
|
154
|
+
readonly index: number;
|
|
155
|
+
} | {
|
|
156
|
+
readonly kind: 'unchanged';
|
|
157
|
+
readonly reason: ModelPoolDefaultKeepReason;
|
|
158
|
+
};
|
|
159
|
+
export declare function defaultModelChoiceOf(existing: EffectiveDefaultModel, batch: readonly DefaultModelBatchRow[], declined?: boolean): DefaultModelChoice;
|
|
160
|
+
export declare function poolWritePlan(edit: ModelPoolEdit, modelsDoc: SettingsDocument | null, settingsDoc: SettingsDocument | null, effectiveEnv: Readonly<Record<string, string | undefined>>): ModelPoolPlan;
|
|
161
|
+
export interface ModelPoolIntentProbe {
|
|
162
|
+
plan: ModelPoolPlan | undefined;
|
|
163
|
+
}
|
|
164
|
+
export declare function modelPoolIntentOf(edit: ModelPoolEdit, effectiveEnv: Readonly<Record<string, string | undefined>>, probe?: ModelPoolIntentProbe): LocalConfigIntent;
|
|
165
|
+
export interface ModelPoolEditOutcome {
|
|
166
|
+
readonly receipt: LocalConfigReceipt | LocalConfigPreview;
|
|
167
|
+
readonly problems?: readonly ModelPoolProblem[];
|
|
168
|
+
readonly entries?: readonly ModelPoolPlannedEntry[];
|
|
169
|
+
readonly warnings?: readonly PoolDeleteWarning[];
|
|
170
|
+
readonly otherIssues?: readonly OnboardCatalogIssue[];
|
|
171
|
+
}
|
|
172
|
+
export declare function editModelPoolWith(edit: ModelPoolEdit, store: LocalConfigStorePort, facts: LocalConfigHostFacts, effectiveEnv: Readonly<Record<string, string | undefined>>, opts?: {
|
|
173
|
+
readonly dryRun?: boolean;
|
|
174
|
+
}): Promise<ModelPoolEditOutcome>;
|
|
175
|
+
export declare function onboardWritePlan(input: OnboardWritePlanInput): OnboardWritePlan;
|
|
176
|
+
export declare function channelProfilesOf(source: ModelPoolChannelSource, data: ModelPoolChannelData, env?: Readonly<Record<string, string | undefined>>): readonly ModelPoolChannelProfile[];
|
|
177
|
+
export declare function modelPoolEditOfSeat(edit: SeatModelPoolEdit, profiles: readonly ModelPoolChannelProfile[], probes?: readonly (ModelPoolProbeReading | undefined)[]): ModelPoolEdit | undefined;
|
|
178
|
+
export interface ModelPoolViewEntry {
|
|
179
|
+
readonly name: string;
|
|
180
|
+
readonly modelId: string;
|
|
181
|
+
readonly api: string;
|
|
182
|
+
readonly baseUrl: string;
|
|
183
|
+
readonly enabled: boolean;
|
|
184
|
+
readonly label?: string;
|
|
185
|
+
readonly vision: {
|
|
186
|
+
readonly source: EntryVisionResolution['source'];
|
|
187
|
+
readonly value?: boolean;
|
|
188
|
+
};
|
|
189
|
+
readonly keyless: boolean;
|
|
190
|
+
readonly keyEnv?: string;
|
|
191
|
+
readonly contextWindow?: number;
|
|
192
|
+
readonly maxTokens?: number;
|
|
193
|
+
readonly probe: ModelPoolProbeState;
|
|
194
|
+
readonly probeVerdict?: string;
|
|
195
|
+
readonly probedAt?: number;
|
|
196
|
+
readonly isDefault: boolean;
|
|
197
|
+
readonly tiers: readonly {
|
|
198
|
+
readonly group: string;
|
|
199
|
+
readonly tier: string;
|
|
200
|
+
}[];
|
|
201
|
+
readonly deleteBlockers: readonly PoolDeleteBlocker[];
|
|
202
|
+
readonly deleteWarnings: readonly PoolDeleteWarning[];
|
|
203
|
+
readonly credentialIssue?: string;
|
|
204
|
+
}
|
|
205
|
+
export interface ModelPoolViewTierGroup {
|
|
206
|
+
readonly name: string;
|
|
207
|
+
readonly active: boolean;
|
|
208
|
+
readonly tiers: Readonly<Record<string, string>>;
|
|
209
|
+
readonly resolved: Readonly<Record<string, string>>;
|
|
210
|
+
}
|
|
211
|
+
export interface ModelPoolRoleRow {
|
|
212
|
+
readonly role: string;
|
|
213
|
+
readonly model?: string;
|
|
214
|
+
readonly select?: true;
|
|
215
|
+
}
|
|
216
|
+
export type ModelPoolRowAction = {
|
|
217
|
+
readonly kind: 'remove';
|
|
218
|
+
} | {
|
|
219
|
+
readonly kind: 'setDefault';
|
|
220
|
+
} | {
|
|
221
|
+
readonly kind: 'update';
|
|
222
|
+
readonly label?: string | null;
|
|
223
|
+
readonly vision?: boolean | null;
|
|
224
|
+
readonly contextWindow?: number;
|
|
225
|
+
readonly maxTokens?: number;
|
|
226
|
+
} | {
|
|
227
|
+
readonly kind: 'bindTier';
|
|
228
|
+
readonly group: string;
|
|
229
|
+
readonly tier: Tier;
|
|
230
|
+
};
|
|
231
|
+
export interface ModelPoolProvider {
|
|
232
|
+
readonly id: string;
|
|
233
|
+
readonly name: string;
|
|
234
|
+
readonly baseUrl: string;
|
|
235
|
+
readonly api: string;
|
|
236
|
+
readonly authEnv: string;
|
|
237
|
+
readonly consoleUrl?: string;
|
|
238
|
+
readonly signupUrl?: string;
|
|
239
|
+
readonly keyOptional: boolean;
|
|
240
|
+
readonly models: readonly Readonly<Pick<PresetModel, 'id' | 'contextWindow' | 'maxTokens'>>[];
|
|
241
|
+
}
|
|
242
|
+
export interface ModelPoolView {
|
|
243
|
+
readonly catalog: 'read' | 'absent' | 'unreadable';
|
|
244
|
+
readonly completeness: ModelPoolCompleteness;
|
|
245
|
+
readonly unreadableRows: number;
|
|
246
|
+
readonly entries: readonly ModelPoolViewEntry[];
|
|
247
|
+
readonly roles: readonly ModelPoolRoleRow[];
|
|
248
|
+
readonly tierGroups: readonly ModelPoolViewTierGroup[];
|
|
249
|
+
readonly activeTierGroup?: string;
|
|
250
|
+
readonly defaultModel: EffectiveDefaultModel;
|
|
251
|
+
readonly legacyTierSettings: boolean;
|
|
252
|
+
readonly orphanKeySlots: number;
|
|
253
|
+
readonly envModels: readonly string[];
|
|
254
|
+
readonly providers: readonly ModelPoolProvider[];
|
|
255
|
+
}
|
|
256
|
+
export interface ModelPoolReadings {
|
|
257
|
+
readonly models: LocalConfigFileReading | undefined;
|
|
258
|
+
readonly userSettings: LocalConfigFileReading | undefined;
|
|
259
|
+
readonly effectiveEnv?: Readonly<Record<string, string | undefined>>;
|
|
260
|
+
}
|
|
261
|
+
export declare function modelPoolViewOf(readings: ModelPoolReadings): ModelPoolView;
|
|
262
|
+
export declare function modelPoolRowEditOf(row: ModelPoolViewEntry, action: ModelPoolRowAction): ModelPoolEdit | undefined;
|