@sema-agent/client-core 0.111.0 → 0.112.1
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 +98 -0
- package/README.md +16 -7
- 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/hitlBridge.d.ts +1 -0
- package/dist/hitl/hitlBridge.js +17 -4
- 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/planReviewCard.d.ts +3 -2
- package/dist/hitl/planReviewCard.js +2 -0
- package/dist/hitl/planReviewWire.d.ts +4 -2
- package/dist/hitl/planReviewWire.js +134 -97
- 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 +165 -0
- package/dist/i18n/messages.en.js +166 -1
- package/dist/i18n/messages.zh.js +177 -1
- 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/notifications.js +14 -12
- 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/planReviewOutcomeCause.d.ts +2 -0
- package/dist/planReviewOutcomeCause.js +12 -0
- 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 +680 -14
- package/package.json +3 -3
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import type { UiLanguage } from './env/uiLanguage.js';
|
|
2
|
+
export declare const CA_PIN_LIMITS: Readonly<{
|
|
3
|
+
addressMaxChars: 2048;
|
|
4
|
+
authorityMaxChars: 300;
|
|
5
|
+
fingerprintsMax: 16;
|
|
6
|
+
fingerprintMaxChars: 128;
|
|
7
|
+
bodyMaxBytes: 1048576;
|
|
8
|
+
servedMax: 16;
|
|
9
|
+
pemMaxBytes: 16384;
|
|
10
|
+
budgetMs: 120000;
|
|
11
|
+
roundMs: 10000;
|
|
12
|
+
retriesMax: 3;
|
|
13
|
+
waitCapMs: 60000;
|
|
14
|
+
jitterMaxMs: 2000;
|
|
15
|
+
}>;
|
|
16
|
+
export type CenterAddressSeat = 'invite' | 'address';
|
|
17
|
+
export type CenterAddressRefusal = 'bad_input' | 'empty' | 'too_long' | 'unsafe_character' | 'scheme' | 'userinfo' | 'percent_in_host' | 'unparseable' | 'query' | 'fragment' | 'trailing_dot' | 'ip_not_canonical' | 'plaintext_remote' | 'path' | 'fingerprint' | 'too_many_fingerprints';
|
|
18
|
+
export type CenterAddressReading = {
|
|
19
|
+
readonly ok: true;
|
|
20
|
+
readonly seat: CenterAddressSeat;
|
|
21
|
+
readonly origin: string;
|
|
22
|
+
readonly centerKey: string;
|
|
23
|
+
readonly fingerprints: readonly string[];
|
|
24
|
+
} | {
|
|
25
|
+
readonly ok: false;
|
|
26
|
+
readonly reason: CenterAddressRefusal;
|
|
27
|
+
};
|
|
28
|
+
export type TrustOriginRefusal = 'empty' | 'too_long' | 'unsafe_character' | 'scheme' | 'userinfo' | 'percent_in_host' | 'unparseable' | 'trailing_dot' | 'ip_not_canonical';
|
|
29
|
+
export type TrustOriginReading = {
|
|
30
|
+
readonly ok: true;
|
|
31
|
+
readonly origin: string;
|
|
32
|
+
} | {
|
|
33
|
+
readonly ok: false;
|
|
34
|
+
readonly reason: TrustOriginRefusal;
|
|
35
|
+
};
|
|
36
|
+
export declare function readCenterAddress(raw: string | null | undefined, seat: CenterAddressSeat): CenterAddressReading;
|
|
37
|
+
export declare function trustOriginOf(url: string | null | undefined): TrustOriginReading;
|
|
38
|
+
export type CaFingerprintsRefusal = 'bad_input' | 'prefix' | 'fingerprint' | 'too_many_fingerprints';
|
|
39
|
+
export type CaFingerprintsReading = {
|
|
40
|
+
readonly ok: true;
|
|
41
|
+
readonly fingerprints: readonly string[];
|
|
42
|
+
} | {
|
|
43
|
+
readonly ok: false;
|
|
44
|
+
readonly reason: CaFingerprintsRefusal;
|
|
45
|
+
readonly index?: number;
|
|
46
|
+
};
|
|
47
|
+
export declare function caFingerprintsOf(texts: readonly string[] | null | undefined): CaFingerprintsReading;
|
|
48
|
+
export declare function caFingerprintOfDer(der: Uint8Array): string;
|
|
49
|
+
export declare function caFingerprintDisplay(fp: string | null | undefined): string | undefined;
|
|
50
|
+
export type CaCertificateParser = (der: Uint8Array) => CaCertificateFacts | null | undefined;
|
|
51
|
+
export interface CaCertificateFacts {
|
|
52
|
+
readonly raw: Uint8Array;
|
|
53
|
+
readonly subject: string;
|
|
54
|
+
readonly notAfter: string;
|
|
55
|
+
readonly selfSigned: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface CaBootstrapRequest {
|
|
58
|
+
readonly named?: readonly string[];
|
|
59
|
+
readonly parseCertificate?: CaCertificateParser;
|
|
60
|
+
}
|
|
61
|
+
export interface CaServedCertificate {
|
|
62
|
+
readonly fingerprint: string;
|
|
63
|
+
readonly pem: string;
|
|
64
|
+
readonly selfSigned: boolean;
|
|
65
|
+
readonly subject?: string;
|
|
66
|
+
readonly notAfter?: string;
|
|
67
|
+
}
|
|
68
|
+
export type CaBootstrapRefusal = 'bad_input' | 'parser_unavailable' | 'body_too_large' | 'body_not_json' | 'body_shape' | 'served_count' | 'certificate_too_large' | 'certificate_not_canonical' | 'certificate_unparseable' | 'served_duplicate' | 'named_not_served' | 'anchor_not_self_signed' | 'unconfigured_with_fingerprints';
|
|
69
|
+
export type CaBootstrapReading = {
|
|
70
|
+
readonly kind: 'unconfigured';
|
|
71
|
+
} | {
|
|
72
|
+
readonly kind: 'served';
|
|
73
|
+
readonly certificates: readonly CaServedCertificate[];
|
|
74
|
+
readonly anchors: readonly CaServedCertificate[];
|
|
75
|
+
} | {
|
|
76
|
+
readonly kind: 'refused';
|
|
77
|
+
readonly reason: CaBootstrapRefusal;
|
|
78
|
+
readonly index?: number;
|
|
79
|
+
};
|
|
80
|
+
export declare function readCaBootstrapBody(body: Uint8Array, request: CaBootstrapRequest): CaBootstrapReading;
|
|
81
|
+
export type CaBootstrapPhase = 'idle' | 'in-flight' | 'reading' | 'waiting' | 'stopped';
|
|
82
|
+
export type CaBootstrapStopReason = 'bad_input' | 'cancelled' | 'timed_out' | 'transport_failed' | 'content_type' | 'ca_unavailable' | 'endpoint_missing' | 'unexpected_status' | 'retry_after_unusable' | 'retry_after_too_long' | 'retries_exhausted' | 'budget_exhausted';
|
|
83
|
+
export interface CaBootstrapStop {
|
|
84
|
+
readonly action: 'stop';
|
|
85
|
+
readonly reason: CaBootstrapStopReason;
|
|
86
|
+
readonly status?: number;
|
|
87
|
+
readonly retryAfterSec?: number;
|
|
88
|
+
readonly remainingSec?: number;
|
|
89
|
+
}
|
|
90
|
+
export type CaBootstrapDecision = {
|
|
91
|
+
readonly action: 'attempt';
|
|
92
|
+
readonly timeoutMs: number;
|
|
93
|
+
} | {
|
|
94
|
+
readonly action: 'wait';
|
|
95
|
+
readonly afterMs: number;
|
|
96
|
+
readonly retryAfterSec: number;
|
|
97
|
+
} | {
|
|
98
|
+
readonly action: 'read-body';
|
|
99
|
+
} | {
|
|
100
|
+
readonly action: 'proceed';
|
|
101
|
+
} | CaBootstrapStop;
|
|
102
|
+
export interface CaBootstrapState {
|
|
103
|
+
readonly phase: CaBootstrapPhase;
|
|
104
|
+
readonly deadlineMs: number;
|
|
105
|
+
readonly lastNowMs: number;
|
|
106
|
+
readonly attempts: number;
|
|
107
|
+
readonly roundDeadlineMs?: number;
|
|
108
|
+
readonly notBeforeMs?: number;
|
|
109
|
+
readonly retryAfterSec?: number;
|
|
110
|
+
readonly stop?: CaBootstrapStop;
|
|
111
|
+
}
|
|
112
|
+
export type CaBootstrapEvent = {
|
|
113
|
+
readonly type: 'begin';
|
|
114
|
+
} | {
|
|
115
|
+
readonly type: 'response';
|
|
116
|
+
readonly status: number;
|
|
117
|
+
readonly contentType?: string;
|
|
118
|
+
readonly retryAfter?: string;
|
|
119
|
+
readonly jitter?: number;
|
|
120
|
+
} | {
|
|
121
|
+
readonly type: 'checkpoint';
|
|
122
|
+
} | {
|
|
123
|
+
readonly type: 'timed-out';
|
|
124
|
+
} | {
|
|
125
|
+
readonly type: 'failed';
|
|
126
|
+
} | {
|
|
127
|
+
readonly type: 'cancelled';
|
|
128
|
+
};
|
|
129
|
+
export interface CaBootstrapStep {
|
|
130
|
+
readonly state: CaBootstrapState;
|
|
131
|
+
readonly decision: CaBootstrapDecision;
|
|
132
|
+
}
|
|
133
|
+
export declare function caBootstrapOpen(nowMs: number): CaBootstrapState;
|
|
134
|
+
export declare function caBootstrapStep(state: CaBootstrapState, event: CaBootstrapEvent, nowMs: number): CaBootstrapStep;
|
|
135
|
+
export type CaPinRefusal = CenterAddressRefusal | TrustOriginRefusal | CaFingerprintsRefusal | CaBootstrapRefusal | CaBootstrapStopReason;
|
|
136
|
+
export declare function caPinRefusalSentence(reason: CaPinRefusal | (string & {}), lang?: UiLanguage): string;
|