dsh-github-copilot 0.4.0-alpha.99 → 0.4.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/AGENTS.md +104 -16
- package/CHANGELOG.md +223 -0
- package/CONTRIBUTING.md +9 -0
- package/README.md +108 -18
- package/README.zh.md +99 -18
- package/deployment-baseline.json +227 -8
- package/docs/account-management-experience.md +143 -0
- package/docs/auto-high-cost.md +154 -0
- package/docs/auto-iteration-review.json +22 -0
- package/docs/auto-review-sampling.md +60 -0
- package/docs/auto-task-routing.md +8 -6
- package/docs/automatic-model-routing.md +33 -5
- package/docs/copilot-accounts.md +409 -0
- package/docs/copilot-compaction.md +23 -2
- package/docs/copilot-usage.md +24 -4
- package/docs/evidence-driven-iteration.md +86 -0
- package/docs/images/copilot-accounts-credits.png +0 -0
- package/docs/images/copilot-accounts.png +0 -0
- package/docs/images/copilot-current-provenance.json +39 -0
- package/docs/images/copilot-model-preferences.png +0 -0
- package/docs/images/copilot-search-routing.png +0 -0
- package/docs/images/copilot-session-continuation.png +0 -0
- package/docs/manual-compaction-recovery.md +50 -7
- package/docs/mockups/copilot-account-dropdown.html +71 -0
- package/docs/mockups/copilot-account-management.html +393 -0
- package/docs/model-compatibility-acceptance.md +34 -16
- package/docs/npm-distribution.md +9 -1
- package/docs/official-first-020-rc2.md +1 -0
- package/docs/plugin-diagnostics.md +452 -0
- package/docs/session-continuation.md +141 -0
- package/docs/session-search-routing.md +1 -1
- package/docs/single-route-migration.md +5 -4
- package/lib/client.js +4415 -846
- package/lib/client.js.map +1 -1
- package/lib/diagnostics-analysis-io.js +78 -0
- package/lib/diagnostics-analysis.js +425 -0
- package/lib/diagnostics-types-FVf6zjob.js +182 -0
- package/lib/index.js +10455 -6037
- package/lib/manual-compaction-recovery.js +163 -38
- package/lib/remote.js +593 -34
- package/lib/routed-web.js +1 -1
- package/lib/{search-routing-jzNYveyK.js → search-routing-CV2hs8as.js} +139 -139
- package/lib/types/account-dropdown.d.ts +22 -0
- package/lib/types/account-model-auth.d.ts +1 -1
- package/lib/types/authorization-code-clipboard.d.ts +4 -0
- package/lib/types/authorization-controller.d.ts +2 -0
- package/lib/types/auto-allocation-card.d.ts +9 -0
- package/lib/types/auto-allocation-evidence.d.ts +38 -0
- package/lib/types/auto-allocation.d.ts +24 -0
- package/lib/types/auto-model-host.d.ts +2 -0
- package/lib/types/auto-model-routing.d.ts +6 -2
- package/lib/types/auto-review-sampling.d.ts +6 -0
- package/lib/types/auto-task-classifier.d.ts +1 -1
- package/lib/types/background-compaction.d.ts +2 -2
- package/lib/types/client.d.ts +19 -3
- package/lib/types/compaction-continuation-ui.d.ts +29 -0
- package/lib/types/compaction-continuation.d.ts +48 -0
- package/lib/types/compaction-input-estimate.d.ts +24 -0
- package/lib/types/compaction-replay.d.ts +18 -0
- package/lib/types/composer-notice-style.d.ts +7 -0
- package/lib/types/config.d.ts +42 -2
- package/lib/types/context-evidence-ui.d.ts +18 -1
- package/lib/types/context-evidence.d.ts +152 -4
- package/lib/types/copilot-account-presentation.d.ts +7 -0
- package/lib/types/copilot-accounts-card.d.ts +43 -0
- package/lib/types/copilot-accounts-host.d.ts +93 -0
- package/lib/types/copilot-accounts-remote.d.ts +85 -0
- package/lib/types/copilot-accounts-types.d.ts +43 -0
- package/lib/types/copilot-auth.d.ts +9 -2
- package/lib/types/copilot-usage-card.d.ts +23 -0
- package/lib/types/copilot-usage-host.d.ts +9 -1
- package/lib/types/copilot-usage-remote.d.ts +2 -1
- package/lib/types/copilot-usage-types.d.ts +1 -0
- package/lib/types/diagnostics-analysis-io.d.ts +23 -0
- package/lib/types/diagnostics-analysis.d.ts +295 -0
- package/lib/types/diagnostics-card.d.ts +11 -0
- package/lib/types/diagnostics-client.d.ts +13 -0
- package/lib/types/diagnostics-collector.d.ts +36 -0
- package/lib/types/diagnostics-host.d.ts +72 -0
- package/lib/types/diagnostics-remote.d.ts +109 -0
- package/lib/types/diagnostics-types.d.ts +431 -0
- package/lib/types/manual-compaction-recovery.d.ts +18 -3
- package/lib/types/model-preferences-card.d.ts +1 -1
- package/lib/types/native-settings-style.d.ts +10 -0
- package/lib/types/parent-model-follow-card.d.ts +2 -11
- package/lib/types/preview-provider.d.ts +5 -0
- package/lib/types/preview-route.d.ts +7 -5
- package/lib/types/remote.d.ts +9 -6
- package/lib/types/replay-recovery-host.d.ts +2 -2
- package/lib/types/replay-recovery-ui.d.ts +3 -1
- package/lib/types/request-body-evidence.d.ts +3 -1
- package/lib/types/responses-replay-compat.d.ts +2 -1
- package/lib/types/responses-request-compression.d.ts +33 -0
- package/lib/types/session-accounts-controller.d.ts +20 -0
- package/lib/types/session-accounts-host.d.ts +33 -0
- package/lib/types/session-accounts-remote.d.ts +114 -0
- package/lib/types/session-accounts.d.ts +38 -0
- package/lib/types/session-continuation-host.d.ts +45 -0
- package/lib/types/session-continuation-remote.d.ts +22 -0
- package/lib/types/session-continuation-types.d.ts +62 -0
- package/lib/types/session-continuation-ui.d.ts +49 -0
- package/lib/types/session-continuation.d.ts +14 -0
- package/lib/types/turn-request-models.d.ts +55 -0
- package/lib/types/turn-selection-card.d.ts +15 -1
- package/lib/types/turn-selection-host.d.ts +23 -0
- package/lib/types/turn-selection-remote.d.ts +4 -0
- package/lib/types/turn-selection.d.ts +19 -4
- package/package.json +29 -12
- package/scripts/analyze-diagnostics.mjs +91 -0
- package/scripts/iteration-review.mjs +53 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type { Agent } from '@deepseek-ai/dsh-agent';
|
|
2
3
|
import type { PiAiProviderProfile } from '@deepseek-ai/dsh-llm-pi-ai';
|
|
3
4
|
import { GITHUB_COPILOT_PREVIEW_PROVIDER_ID } from './copilot-identity.ts';
|
|
4
5
|
import type { AccountModelLoadOptions } from './account-model-source.ts';
|
|
@@ -8,8 +9,8 @@ import type { RequestBudgetPolicy } from './request-budget.ts';
|
|
|
8
9
|
/** Safe request knobs; identities, model tables, endpoints and credentials are not configurable. */
|
|
9
10
|
export type PreviewRouteConfig = Pick<PiAiProviderProfile, 'reasoning' | 'cacheRetention' | 'transport' | 'timeoutMs' | 'websocketConnectTimeoutMs' | 'streamIdleTimeoutMs' | 'maxRequestImageBytes' | 'requestImagePixelBudget' | 'requestImageMaxBytes' | 'retryPolicy'> & Pick<InlineConfig, 'accountModelTtlMs' | 'accountModelFailureCooldownMs'> & {
|
|
10
11
|
readonly streamLiveness?: boolean;
|
|
11
|
-
readonly chatRequestSettings?: () => Pick<InlineConfig, 'chatStreamIdleTimeoutMs' | 'chatStreamLiveness' | 'chatMaxRequestImageBytes'>;
|
|
12
|
-
readonly accountModelSettings?: () => Pick<InlineConfig, 'accountModelTtlMs' | 'accountModelFailureCooldownMs' | 'excludedModelIds' | 'parentModelFollow' | 'followParentModel' | 'autoSemanticAssessment'>;
|
|
12
|
+
readonly chatRequestSettings?: () => Pick<InlineConfig, 'chatStreamIdleTimeoutMs' | 'chatStreamLiveness' | 'chatMaxRequestImageBytes' | 'responsesRequestCompression' | 'responsesOmitTemperature'>;
|
|
13
|
+
readonly accountModelSettings?: () => Pick<InlineConfig, 'accountModelTtlMs' | 'accountModelFailureCooldownMs' | 'excludedModelIds' | 'highCostModelIds' | 'parentModelFollow' | 'followParentModel' | 'autoSemanticAssessment' | 'autoAllocationEvidence'>;
|
|
13
14
|
readonly requestBudget?: Partial<RequestBudgetPolicy>;
|
|
14
15
|
readonly requestBudgetSettings?: () => Partial<RequestBudgetPolicy>;
|
|
15
16
|
};
|
|
@@ -34,8 +35,9 @@ export interface GitHubCopilotPreviewView {
|
|
|
34
35
|
}
|
|
35
36
|
export interface GitHubCopilotPreview {
|
|
36
37
|
getView(): GitHubCopilotPreviewView;
|
|
37
|
-
/** Synchronous, account-proven capacities for
|
|
38
|
-
recoveryLimits(modelId: string): {
|
|
38
|
+
/** Synchronous, account-proven summary capacities for the initiating Agent; never triggers discovery. */
|
|
39
|
+
recoveryLimits(modelId: string, agent?: Agent): {
|
|
40
|
+
readonly api: AccountModelDescriptor['api'];
|
|
39
41
|
readonly limits: Pick<AccountModelDescriptor, 'contextWindow' | 'maxInputTokens' | 'maxTokens'>;
|
|
40
42
|
readonly policy: Partial<RequestBudgetPolicy>;
|
|
41
43
|
readonly assertCurrent: () => void;
|
|
@@ -63,7 +65,7 @@ declare module '@deepseek-ai/cordis' {
|
|
|
63
65
|
githubCopilotPreview: GitHubCopilotPreview;
|
|
64
66
|
}
|
|
65
67
|
}
|
|
66
|
-
/** Register
|
|
68
|
+
/** Register services once; account switches affect the directory, not admitted turns. */
|
|
67
69
|
export declare function apply(ctx: Context, config?: PreviewRouteConfig): void;
|
|
68
70
|
declare const _default: {
|
|
69
71
|
name: string;
|
package/lib/types/remote.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ declare module '@deepseek-ai/dsh-typert-protocol' {
|
|
|
16
16
|
excludeModel(modelId: string): Promise<RemoteResult<GitHubCopilotAuthorizationView>>;
|
|
17
17
|
restoreModel(modelId: string): Promise<RemoteResult<GitHubCopilotAuthorizationView>>;
|
|
18
18
|
setModelExcluded(modelId: string, excluded: boolean): Promise<RemoteResult<GitHubCopilotModelPreferencesView>>;
|
|
19
|
+
setModelHighCost(modelId: string, highCost: boolean): Promise<RemoteResult<GitHubCopilotModelPreferencesView>>;
|
|
19
20
|
start(): Promise<RemoteResult<GitHubCopilotAuthorizationView>>;
|
|
20
21
|
cancel(): Promise<RemoteResult<GitHubCopilotAuthorizationView>>;
|
|
21
22
|
signOut(): Promise<RemoteResult<GitHubCopilotAuthorizationView>>;
|
|
@@ -26,8 +27,8 @@ export declare const GITHUB_COPILOT_AUTHORIZATION_VIEW_TYPE_SYMBOL = "dsh-github
|
|
|
26
27
|
export declare const GitHubCopilotAuthorizationViewSchema: z.ZodObject<{
|
|
27
28
|
phase: z.ZodEnum<{
|
|
28
29
|
error: "error";
|
|
29
|
-
"signed-out": "signed-out";
|
|
30
30
|
authorizing: "authorizing";
|
|
31
|
+
"signed-out": "signed-out";
|
|
31
32
|
"signed-in": "signed-in";
|
|
32
33
|
}>;
|
|
33
34
|
configured: z.ZodBoolean;
|
|
@@ -53,13 +54,13 @@ export declare const GitHubCopilotAuthorizationViewSchema: z.ZodObject<{
|
|
|
53
54
|
accountModels: z.ZodOptional<z.ZodObject<{
|
|
54
55
|
state: z.ZodEnum<{
|
|
55
56
|
error: "error";
|
|
56
|
-
idle: "idle";
|
|
57
|
-
loading: "loading";
|
|
58
57
|
ready: "ready";
|
|
58
|
+
unavailable: "unavailable";
|
|
59
|
+
loading: "loading";
|
|
60
|
+
idle: "idle";
|
|
59
61
|
stale: "stale";
|
|
60
62
|
disposed: "disposed";
|
|
61
63
|
unconfigured: "unconfigured";
|
|
62
|
-
unavailable: "unavailable";
|
|
63
64
|
}>;
|
|
64
65
|
models: z.ZodArray<z.ZodObject<{
|
|
65
66
|
id: z.ZodString;
|
|
@@ -87,6 +88,7 @@ export declare const GitHubCopilotAuthorizationViewSchema: z.ZodObject<{
|
|
|
87
88
|
excludedModelIds: z.ZodArray<z.ZodString>;
|
|
88
89
|
lockedModelIds: z.ZodArray<z.ZodString>;
|
|
89
90
|
unavailableExcludedModelIds: z.ZodArray<z.ZodString>;
|
|
91
|
+
highCostModelIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
90
92
|
error: z.ZodOptional<z.ZodEnum<{
|
|
91
93
|
COPILOT_MODEL_PREFERENCES_UNAVAILABLE: "COPILOT_MODEL_PREFERENCES_UNAVAILABLE";
|
|
92
94
|
COPILOT_MODEL_EXCLUSION_SELECTED: "COPILOT_MODEL_EXCLUSION_SELECTED";
|
|
@@ -128,6 +130,7 @@ export declare const GitHubCopilotModelPreferencesViewSchema: z.ZodObject<{
|
|
|
128
130
|
excludedModelIds: z.ZodArray<z.ZodString>;
|
|
129
131
|
lockedModelIds: z.ZodArray<z.ZodString>;
|
|
130
132
|
unavailableExcludedModelIds: z.ZodArray<z.ZodString>;
|
|
133
|
+
highCostModelIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
131
134
|
error: z.ZodOptional<z.ZodEnum<{
|
|
132
135
|
COPILOT_MODEL_PREFERENCES_UNAVAILABLE: "COPILOT_MODEL_PREFERENCES_UNAVAILABLE";
|
|
133
136
|
COPILOT_MODEL_EXCLUSION_SELECTED: "COPILOT_MODEL_EXCLUSION_SELECTED";
|
|
@@ -168,8 +171,8 @@ export declare const GitHubCopilotMigrationStatusSchema: z.ZodObject<{
|
|
|
168
171
|
sessions: z.ZodArray<z.ZodObject<{
|
|
169
172
|
id: z.ZodString;
|
|
170
173
|
status: z.ZodEnum<{
|
|
171
|
-
idle: "idle";
|
|
172
174
|
running: "running";
|
|
175
|
+
idle: "idle";
|
|
173
176
|
}>;
|
|
174
177
|
effectiveSelection: z.ZodNullable<z.ZodObject<{
|
|
175
178
|
provider: z.ZodString;
|
|
@@ -177,8 +180,8 @@ export declare const GitHubCopilotMigrationStatusSchema: z.ZodObject<{
|
|
|
177
180
|
reasoningEffort: z.ZodOptional<z.ZodString>;
|
|
178
181
|
}, z.core.$strict>>;
|
|
179
182
|
selectionSource: z.ZodEnum<{
|
|
180
|
-
unknown: "unknown";
|
|
181
183
|
default: "default";
|
|
184
|
+
unknown: "unknown";
|
|
182
185
|
pending: "pending";
|
|
183
186
|
"request-header": "request-header";
|
|
184
187
|
}>;
|
|
@@ -13,12 +13,12 @@ export declare class ReplayRecoveryController extends TypertRemoteService {
|
|
|
13
13
|
private readonly store;
|
|
14
14
|
private readonly proof;
|
|
15
15
|
private readonly busy;
|
|
16
|
-
constructor(ctx: Context, store: ReplayRecoveryStore, proof: () => string | undefined, busy: WeakSet<object>);
|
|
16
|
+
constructor(ctx: Context, store: ReplayRecoveryStore, proof: (agent?: Agent, request?: GenerateOptions) => string | undefined, busy: WeakSet<object>);
|
|
17
17
|
get(agent: Agent): ReplayRecoveryView;
|
|
18
18
|
setEnabled(agent: Agent, revision: string, enabled: boolean): ReplayRecoveryView;
|
|
19
19
|
authorize(agent: Agent, revision: string, duration: ReplayRecoveryDuration): ReplayRecoveryView;
|
|
20
20
|
}
|
|
21
|
-
export declare function installReplayRecovery(ctx: Context, proof: () => string | undefined): {
|
|
21
|
+
export declare function installReplayRecovery(ctx: Context, proof: (agent?: Agent, request?: GenerateOptions) => string | undefined): {
|
|
22
22
|
prepare(request: GenerateOptions): {
|
|
23
23
|
transform(payload: unknown): unknown;
|
|
24
24
|
rejected(body: string | undefined): void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Context } from '@deepseek-ai/cordis';
|
|
2
2
|
import type { ReactElement } from 'react';
|
|
3
3
|
import type { ReplayRecoveryDuration } from './replay-recovery-types.ts';
|
|
4
|
+
import type { SessionContinuationRemote } from './session-continuation-ui.ts';
|
|
4
5
|
export interface ReplayRecoveryRemote {
|
|
5
6
|
get(agentId: string): Promise<{
|
|
6
7
|
ok: boolean;
|
|
@@ -15,12 +16,13 @@ export interface ReplayRecoveryRemote {
|
|
|
15
16
|
value?: unknown;
|
|
16
17
|
}>;
|
|
17
18
|
}
|
|
18
|
-
export declare function ReplayRecoveryCard({ sessionId, remote, locale, running, refreshKey }: {
|
|
19
|
+
export declare function ReplayRecoveryCard({ sessionId, remote, continuation, locale, running, refreshKey }: {
|
|
19
20
|
sessionId: string;
|
|
20
21
|
remote: ReplayRecoveryRemote;
|
|
21
22
|
locale?: string;
|
|
22
23
|
running?: boolean;
|
|
23
24
|
refreshKey?: string;
|
|
25
|
+
continuation?: SessionContinuationRemote;
|
|
24
26
|
}): ReactElement | null;
|
|
25
27
|
export declare function registerReplayRecoveryUi(ctx: Context): () => void;
|
|
26
28
|
//# sourceMappingURL=replay-recovery-ui.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { RequestUploadEvidence } from './request-upload-evidence.ts';
|
|
2
|
+
import type { RequestCompressionEvidence } from './responses-request-compression.ts';
|
|
2
3
|
export type RequestBodyProtocol = 'openai-responses' | 'openai-completions' | 'anthropic-messages';
|
|
3
4
|
export declare const REQUEST_BODY_EVIDENCE_LIMITS: Readonly<{
|
|
4
5
|
bytes: number;
|
|
@@ -27,8 +28,9 @@ export interface RequestBodyDispatchEvidence {
|
|
|
27
28
|
/** Fetch invocation to response headers, not upload duration or clone-observation time. */
|
|
28
29
|
readonly responseHeadersMs: number;
|
|
29
30
|
readonly upload?: RequestUploadEvidence;
|
|
31
|
+
readonly compression?: RequestCompressionEvidence;
|
|
30
32
|
}
|
|
31
|
-
export declare function formatRequestBodyEvidence(evidence: RequestBodyEvidence, responseHeadersMs?: number): string;
|
|
33
|
+
export declare function formatRequestBodyEvidence(evidence: RequestBodyEvidence, responseHeadersMs?: number, compression?: RequestCompressionEvidence): string;
|
|
32
34
|
/** Diagnostic-only traversal of the original JSON spans; never reserializes or changes a request. */
|
|
33
35
|
export declare function requestBodyEvidence(body: string | undefined, protocol: RequestBodyProtocol): RequestBodyEvidence;
|
|
34
36
|
//# sourceMappingURL=request-body-evidence.d.ts.map
|
|
@@ -6,6 +6,7 @@ interface ReplayDispatch {
|
|
|
6
6
|
}
|
|
7
7
|
/** Fixed diagnostics and bounded counts only; never retain request or replay content. */
|
|
8
8
|
export declare class CopilotResponsesReplayError extends Error {
|
|
9
|
+
readonly dispatchEvidence?: string;
|
|
9
10
|
constructor(reason?: ReplayFailure, dispatch?: ReplayDispatch);
|
|
10
11
|
}
|
|
11
12
|
/** Normalize only the outgoing managed Responses payload, never stored history/context. */
|
|
@@ -20,7 +21,7 @@ export declare class ResponsesRetryReplay {
|
|
|
20
21
|
begin(context: unknown, signal?: AbortSignal, sessionId?: string, modelId?: string): ResponsesRetryAttempt;
|
|
21
22
|
}
|
|
22
23
|
export interface ResponsesRetryAttempt {
|
|
23
|
-
normalize(payload: unknown): unknown;
|
|
24
|
+
normalize(payload: unknown, transform?: (payload: unknown) => unknown): unknown;
|
|
24
25
|
observe(body: string | undefined, status: number): void;
|
|
25
26
|
finish(): void;
|
|
26
27
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type ResponsesCompressionSkipReason = 'disabled' | 'unsupported-protocol' | 'custom-fetch' | 'untrusted-origin' | 'unsupported-request' | 'unsupported-body' | 'unsupported-content-type' | 'existing-encoding' | 'transfer-encoding' | 'invalid-content-length' | 'below-minimum' | 'work-limit' | 'not-beneficial' | 'compression-failed' | 'aborted';
|
|
2
|
+
export type RequestCompressionEvidence = {
|
|
3
|
+
readonly encoding: 'identity';
|
|
4
|
+
readonly reason: ResponsesCompressionSkipReason;
|
|
5
|
+
readonly originalBytes?: number;
|
|
6
|
+
} | {
|
|
7
|
+
readonly encoding: 'gzip';
|
|
8
|
+
readonly reason: 'compressed';
|
|
9
|
+
readonly originalBytes: number;
|
|
10
|
+
readonly wireBytes: number;
|
|
11
|
+
};
|
|
12
|
+
type PreparedRequest = {
|
|
13
|
+
readonly input: RequestInfo | URL;
|
|
14
|
+
readonly init: RequestInit | undefined;
|
|
15
|
+
readonly evidence: RequestCompressionEvidence;
|
|
16
|
+
};
|
|
17
|
+
export type PreparedResponsesRequest = (PreparedRequest & {
|
|
18
|
+
readonly applied: false;
|
|
19
|
+
readonly reason: ResponsesCompressionSkipReason;
|
|
20
|
+
readonly originalBytes?: number;
|
|
21
|
+
}) | (PreparedRequest & {
|
|
22
|
+
readonly applied: true;
|
|
23
|
+
readonly evidence: Extract<RequestCompressionEvidence, {
|
|
24
|
+
encoding: 'gzip';
|
|
25
|
+
}>;
|
|
26
|
+
readonly originalBytes: number;
|
|
27
|
+
readonly wireBytes: number;
|
|
28
|
+
});
|
|
29
|
+
export declare function satisfiesCompressionSavings(originalBytes: number, wireBytes: number): boolean;
|
|
30
|
+
/** Prepares one dispatch without changing the native request when compression is ineligible. */
|
|
31
|
+
export declare function prepareResponsesRequest(input: RequestInfo | URL, init: RequestInit | undefined, accountBaseUrl: string, enabled: boolean, customFetch: boolean, signal?: AbortSignal, api?: string): Promise<PreparedResponsesRequest>;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=responses-request-compression.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol';
|
|
2
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
3
|
+
import type { Agent } from '@deepseek-ai/dsh-agent';
|
|
4
|
+
import type { SessionAccountsHost } from './session-accounts-host.ts';
|
|
5
|
+
import type { SessionAccountView, TurnAccountView } from './session-accounts-remote.ts';
|
|
6
|
+
import type { CopilotUsageView } from './copilot-usage-types.ts';
|
|
7
|
+
export declare class SessionAccountController extends TypertRemoteService {
|
|
8
|
+
private readonly owner;
|
|
9
|
+
constructor(ctx: Context, owner: SessionAccountsHost);
|
|
10
|
+
get(agent: Agent): Promise<SessionAccountView>;
|
|
11
|
+
set(agent: Agent, accountId: string | null, revision: number): Promise<SessionAccountView>;
|
|
12
|
+
refreshIdentity(agent: Agent): Promise<SessionAccountView>;
|
|
13
|
+
ensureIdentity(agent: Agent): Promise<SessionAccountView>;
|
|
14
|
+
private readIdentity;
|
|
15
|
+
private readUsage;
|
|
16
|
+
usage(agent: Agent): Promise<CopilotUsageView>;
|
|
17
|
+
refreshUsage(agent: Agent): Promise<CopilotUsageView>;
|
|
18
|
+
turn(agent: Agent, turn: number): TurnAccountView;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=session-accounts-controller.d.ts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import { SessionAccountTurns } from './session-accounts.ts';
|
|
3
|
+
import type { SessionAccountSelection } from './session-accounts.ts';
|
|
4
|
+
import type { CopilotAccountBinding } from './copilot-accounts-types.ts';
|
|
5
|
+
declare module '@deepseek-ai/cordis' {
|
|
6
|
+
interface Context {
|
|
7
|
+
githubCopilotSessionAccounts: SessionAccountsHost;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
interface SessionOwner {
|
|
11
|
+
readonly session: {
|
|
12
|
+
readonly id: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
/** Host-only routing owner; credentials remain in the existing account service. */
|
|
16
|
+
export declare class SessionAccountsHost {
|
|
17
|
+
private readonly ctx;
|
|
18
|
+
readonly turns: SessionAccountTurns;
|
|
19
|
+
private readonly leases;
|
|
20
|
+
constructor(ctx: Context);
|
|
21
|
+
selected(agent: SessionOwner): SessionAccountSelection;
|
|
22
|
+
admit(agent: SessionOwner, turn: number, signal: AbortSignal): CopilotAccountBinding;
|
|
23
|
+
end(session: object, turn: number): void;
|
|
24
|
+
remove(session: object): void;
|
|
25
|
+
dispose(): void;
|
|
26
|
+
bindingForAccount(accountId: string): CopilotAccountBinding;
|
|
27
|
+
private captureIdentity;
|
|
28
|
+
recordRequest(signal?: AbortSignal): void;
|
|
29
|
+
requestBinding(signal?: AbortSignal): CopilotAccountBinding;
|
|
30
|
+
set(agent: SessionOwner, accountId: string | null, revision: number, observed?: import('./diagnostics-collector.ts').DiagnosticsHandle): Promise<void>;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=session-accounts-host.d.ts.map
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { RemoteResult, TypertRemoteContribution } from '@deepseek-ai/dsh-typert-protocol';
|
|
3
|
+
import type { CopilotUsageView } from './copilot-usage-types.ts';
|
|
4
|
+
import type { CopilotAccountsView } from './copilot-accounts-types.ts';
|
|
5
|
+
export declare const SessionAccountViewSchema: z.ZodObject<{
|
|
6
|
+
source: z.ZodEnum<{
|
|
7
|
+
session: "session";
|
|
8
|
+
global: "global";
|
|
9
|
+
}>;
|
|
10
|
+
accountId: z.ZodString;
|
|
11
|
+
globalAccountId: z.ZodString;
|
|
12
|
+
runningAccountId: z.ZodOptional<z.ZodString>;
|
|
13
|
+
accounts: z.ZodObject<{
|
|
14
|
+
state: z.ZodEnum<{
|
|
15
|
+
error: "error";
|
|
16
|
+
ready: "ready";
|
|
17
|
+
}>;
|
|
18
|
+
activeAccountId: z.ZodString;
|
|
19
|
+
revision: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
writable: z.ZodBoolean;
|
|
21
|
+
switchable: z.ZodBoolean;
|
|
22
|
+
accounts: z.ZodArray<z.ZodObject<{
|
|
23
|
+
id: z.ZodString;
|
|
24
|
+
configured: z.ZodBoolean;
|
|
25
|
+
identityState: z.ZodEnum<{
|
|
26
|
+
ready: "ready";
|
|
27
|
+
unavailable: "unavailable";
|
|
28
|
+
unknown: "unknown";
|
|
29
|
+
}>;
|
|
30
|
+
identity: z.ZodOptional<z.ZodObject<{
|
|
31
|
+
login: z.ZodString;
|
|
32
|
+
userId: z.ZodNumber;
|
|
33
|
+
}, z.core.$strict>>;
|
|
34
|
+
}, z.core.$strict>>;
|
|
35
|
+
operation: z.ZodOptional<z.ZodEnum<{
|
|
36
|
+
authorizing: "authorizing";
|
|
37
|
+
verifying: "verifying";
|
|
38
|
+
switching: "switching";
|
|
39
|
+
}>>;
|
|
40
|
+
notices: z.ZodArray<z.ZodObject<{
|
|
41
|
+
message: z.ZodString;
|
|
42
|
+
url: z.ZodOptional<z.ZodLiteral<"https://github.com/login/device">>;
|
|
43
|
+
code: z.ZodOptional<z.ZodString>;
|
|
44
|
+
}, z.core.$strict>>;
|
|
45
|
+
diagnostic: z.ZodOptional<z.ZodEnum<{
|
|
46
|
+
COPILOT_ACCOUNTS_SELECTOR_INVALID: "COPILOT_ACCOUNTS_SELECTOR_INVALID";
|
|
47
|
+
COPILOT_ACCOUNTS_SETTINGS_UNAVAILABLE: "COPILOT_ACCOUNTS_SETTINGS_UNAVAILABLE";
|
|
48
|
+
COPILOT_ACCOUNTS_SELECTED_MISSING: "COPILOT_ACCOUNTS_SELECTED_MISSING";
|
|
49
|
+
COPILOT_ACCOUNTS_CREDENTIALS_UNAVAILABLE: "COPILOT_ACCOUNTS_CREDENTIALS_UNAVAILABLE";
|
|
50
|
+
COPILOT_ACCOUNTS_CHANGED: "COPILOT_ACCOUNTS_CHANGED";
|
|
51
|
+
COPILOT_ACCOUNTS_BUSY: "COPILOT_ACCOUNTS_BUSY";
|
|
52
|
+
COPILOT_ACCOUNTS_CONFLICT: "COPILOT_ACCOUNTS_CONFLICT";
|
|
53
|
+
COPILOT_ACCOUNTS_COMMIT_UNCERTAIN: "COPILOT_ACCOUNTS_COMMIT_UNCERTAIN";
|
|
54
|
+
COPILOT_ACCOUNTS_MODELS_FAILED: "COPILOT_ACCOUNTS_MODELS_FAILED";
|
|
55
|
+
COPILOT_ACCOUNTS_IDENTITY_UNAVAILABLE: "COPILOT_ACCOUNTS_IDENTITY_UNAVAILABLE";
|
|
56
|
+
COPILOT_ACCOUNTS_IDENTITY_INVALID: "COPILOT_ACCOUNTS_IDENTITY_INVALID";
|
|
57
|
+
COPILOT_ACCOUNTS_IDENTITY_TIMEOUT: "COPILOT_ACCOUNTS_IDENTITY_TIMEOUT";
|
|
58
|
+
COPILOT_ACCOUNTS_IDENTITY_TLS: "COPILOT_ACCOUNTS_IDENTITY_TLS";
|
|
59
|
+
COPILOT_ACCOUNTS_IDENTITY_NETWORK: "COPILOT_ACCOUNTS_IDENTITY_NETWORK";
|
|
60
|
+
COPILOT_ACCOUNTS_IDENTITY_AUTH_REJECTED: "COPILOT_ACCOUNTS_IDENTITY_AUTH_REJECTED";
|
|
61
|
+
COPILOT_ACCOUNTS_IDENTITY_RATE_LIMITED: "COPILOT_ACCOUNTS_IDENTITY_RATE_LIMITED";
|
|
62
|
+
COPILOT_ACCOUNTS_IDENTITY_HTTP_ERROR: "COPILOT_ACCOUNTS_IDENTITY_HTTP_ERROR";
|
|
63
|
+
COPILOT_ACCOUNTS_IDENTITY_CHANGED: "COPILOT_ACCOUNTS_IDENTITY_CHANGED";
|
|
64
|
+
COPILOT_ACCOUNTS_DUPLICATE: "COPILOT_ACCOUNTS_DUPLICATE";
|
|
65
|
+
COPILOT_ACCOUNTS_ENTERPRISE_UNSUPPORTED: "COPILOT_ACCOUNTS_ENTERPRISE_UNSUPPORTED";
|
|
66
|
+
COPILOT_ACCOUNTS_ROUTE_BLOCKED: "COPILOT_ACCOUNTS_ROUTE_BLOCKED";
|
|
67
|
+
COPILOT_ACCOUNTS_EVIDENCE_INCOMPLETE: "COPILOT_ACCOUNTS_EVIDENCE_INCOMPLETE";
|
|
68
|
+
COPILOT_ACCOUNTS_LIMIT: "COPILOT_ACCOUNTS_LIMIT";
|
|
69
|
+
COPILOT_ACCOUNTS_AUTH_FAILED: "COPILOT_ACCOUNTS_AUTH_FAILED";
|
|
70
|
+
COPILOT_ACCOUNTS_AUTH_UNAVAILABLE: "COPILOT_ACCOUNTS_AUTH_UNAVAILABLE";
|
|
71
|
+
COPILOT_ACCOUNTS_ACTIVE_REMOVE_BLOCKED: "COPILOT_ACCOUNTS_ACTIVE_REMOVE_BLOCKED";
|
|
72
|
+
COPILOT_ACCOUNTS_REMOVE_FAILED: "COPILOT_ACCOUNTS_REMOVE_FAILED";
|
|
73
|
+
COPILOT_ACCOUNTS_DISPOSED: "COPILOT_ACCOUNTS_DISPOSED";
|
|
74
|
+
}>>;
|
|
75
|
+
}, z.core.$strict>;
|
|
76
|
+
}, z.core.$strict>;
|
|
77
|
+
export interface SessionAccountView {
|
|
78
|
+
readonly source: 'global' | 'session';
|
|
79
|
+
readonly accountId: string;
|
|
80
|
+
readonly globalAccountId: string;
|
|
81
|
+
readonly runningAccountId?: string;
|
|
82
|
+
readonly accounts: CopilotAccountsView;
|
|
83
|
+
}
|
|
84
|
+
export declare const TurnAccountViewSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
85
|
+
state: z.ZodLiteral<"unknown">;
|
|
86
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
87
|
+
state: z.ZodLiteral<"recorded">;
|
|
88
|
+
accountId: z.ZodString;
|
|
89
|
+
source: z.ZodEnum<{
|
|
90
|
+
session: "session";
|
|
91
|
+
global: "global";
|
|
92
|
+
}>;
|
|
93
|
+
identity: z.ZodOptional<z.ZodObject<{
|
|
94
|
+
login: z.ZodString;
|
|
95
|
+
userId: z.ZodNumber;
|
|
96
|
+
}, z.core.$strict>>;
|
|
97
|
+
}, z.core.$strict>], "state">;
|
|
98
|
+
export type TurnAccountView = z.infer<typeof TurnAccountViewSchema>;
|
|
99
|
+
declare module '@deepseek-ai/dsh-typert-protocol' {
|
|
100
|
+
interface TypertRemoteNamespaceMap {
|
|
101
|
+
githubCopilotSessionAccount: {
|
|
102
|
+
get(agentId: string): Promise<RemoteResult<SessionAccountView>>;
|
|
103
|
+
set(agentId: string, accountId: string | null, revision: number): Promise<RemoteResult<SessionAccountView>>;
|
|
104
|
+
refreshIdentity(agentId: string): Promise<RemoteResult<SessionAccountView>>;
|
|
105
|
+
ensureIdentity(agentId: string): Promise<RemoteResult<SessionAccountView>>;
|
|
106
|
+
usage(agentId: string): Promise<RemoteResult<CopilotUsageView>>;
|
|
107
|
+
refreshUsage(agentId: string): Promise<RemoteResult<CopilotUsageView>>;
|
|
108
|
+
turn(agentId: string, turn: number): Promise<RemoteResult<TurnAccountView>>;
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
declare const contribution: TypertRemoteContribution;
|
|
113
|
+
export default contribution;
|
|
114
|
+
//# sourceMappingURL=session-accounts-remote.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { CopilotAccountIdentity } from './copilot-accounts-types.ts';
|
|
2
|
+
export declare const SESSION_ACCOUNTS_MAX = 2048;
|
|
3
|
+
export interface SessionAccountPreference {
|
|
4
|
+
readonly sessionId: string;
|
|
5
|
+
readonly accountId: string;
|
|
6
|
+
}
|
|
7
|
+
export interface SessionAccountSelection {
|
|
8
|
+
readonly accountId: string;
|
|
9
|
+
readonly source: 'global' | 'session';
|
|
10
|
+
}
|
|
11
|
+
export interface TurnAccountEvidence extends SessionAccountSelection {
|
|
12
|
+
readonly identity?: CopilotAccountIdentity;
|
|
13
|
+
}
|
|
14
|
+
interface Admission extends SessionAccountSelection {
|
|
15
|
+
readonly turn: number;
|
|
16
|
+
readonly signal: AbortSignal;
|
|
17
|
+
}
|
|
18
|
+
export declare function parseSessionAccounts(value: unknown): readonly SessionAccountPreference[];
|
|
19
|
+
export declare function resolveSessionAccount(sessionId: string, preferences: readonly SessionAccountPreference[], globalAccountId: string): SessionAccountSelection;
|
|
20
|
+
/** Active turns are never evicted; bounded historical evidence may become unknown. */
|
|
21
|
+
export declare class SessionAccountTurns {
|
|
22
|
+
private readonly active;
|
|
23
|
+
private readonly signals;
|
|
24
|
+
private readonly identities;
|
|
25
|
+
private readonly history;
|
|
26
|
+
admit(agent: object, turn: number, signal: AbortSignal, selection: SessionAccountSelection): Admission;
|
|
27
|
+
record(agent: object, turn: number, identity?: CopilotAccountIdentity): void;
|
|
28
|
+
current(agent: object): Admission | undefined;
|
|
29
|
+
forSignal(signal: AbortSignal): Admission | undefined;
|
|
30
|
+
evidence(agent: object, turn: number): TurnAccountEvidence | undefined;
|
|
31
|
+
end(agent: object, turn: number): void;
|
|
32
|
+
remove(agent: object): void;
|
|
33
|
+
clear(): void;
|
|
34
|
+
recordSignal(signal: AbortSignal, identity?: CopilotAccountIdentity): void;
|
|
35
|
+
captureIdentity(signal: AbortSignal, identity: CopilotAccountIdentity): void;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=session-accounts.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type { Agent } from '@deepseek-ai/dsh-agent';
|
|
3
|
+
import type { GenerateOptions } from '@deepseek-ai/dsh-llm';
|
|
4
|
+
import { TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol';
|
|
5
|
+
import { SessionContinuationTurn } from './session-continuation.ts';
|
|
6
|
+
import type { SessionContinuationView } from './session-continuation-types.ts';
|
|
7
|
+
import type { CompactionContinuationStatus } from './session-continuation-types.ts';
|
|
8
|
+
declare module '@deepseek-ai/cordis' {
|
|
9
|
+
interface Context {
|
|
10
|
+
githubCopilotSessionContinuation: SessionContinuationController;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
interface Admission {
|
|
14
|
+
readonly turn: number;
|
|
15
|
+
readonly enabled: boolean;
|
|
16
|
+
readonly persistentEnabled: boolean;
|
|
17
|
+
readonly filter: SessionContinuationTurn;
|
|
18
|
+
step: number;
|
|
19
|
+
signal: AbortSignal;
|
|
20
|
+
}
|
|
21
|
+
export declare class SessionContinuationController extends TypertRemoteService {
|
|
22
|
+
private readonly active;
|
|
23
|
+
private readonly once;
|
|
24
|
+
private readonly ready;
|
|
25
|
+
private readonly summaryStatus;
|
|
26
|
+
constructor(ctx: Context, active: Map<object, Admission>, once?: Set<object>, ready?: Promise<void>, summaryStatus?: (agent: Agent) => CompactionContinuationStatus | undefined);
|
|
27
|
+
get(agent: Agent): Promise<SessionContinuationView>;
|
|
28
|
+
set(agent: Agent, revision: number, enabled: boolean | null): Promise<SessionContinuationView>;
|
|
29
|
+
authorizeNext(agent: Agent, revision: number, enabled: boolean): Promise<SessionContinuationView>;
|
|
30
|
+
defaults(): Promise<{
|
|
31
|
+
enabled: boolean;
|
|
32
|
+
revision: number;
|
|
33
|
+
}>;
|
|
34
|
+
setDefault(revision: number, enabled: boolean): Promise<{
|
|
35
|
+
enabled: boolean;
|
|
36
|
+
revision: number;
|
|
37
|
+
}>;
|
|
38
|
+
}
|
|
39
|
+
export declare function installSessionContinuation(ctx: Context): {
|
|
40
|
+
ready: Promise<void>;
|
|
41
|
+
prepare(request: GenerateOptions): ((payload: unknown) => Promise<unknown>) | undefined;
|
|
42
|
+
dispose(): void;
|
|
43
|
+
};
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=session-continuation-host.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { RemoteResult, TypertRemoteContribution } from '@deepseek-ai/dsh-typert-protocol';
|
|
2
|
+
import type { SessionContinuationView } from './session-continuation-types.ts';
|
|
3
|
+
declare module '@deepseek-ai/dsh-typert-protocol' {
|
|
4
|
+
interface TypertRemoteNamespaceMap {
|
|
5
|
+
githubCopilotSessionContinuation: {
|
|
6
|
+
get(agentId: string): Promise<RemoteResult<SessionContinuationView>>;
|
|
7
|
+
set(agentId: string, revision: number, enabled: boolean | null): Promise<RemoteResult<SessionContinuationView>>;
|
|
8
|
+
authorizeNext(agentId: string, revision: number, enabled: boolean): Promise<RemoteResult<SessionContinuationView>>;
|
|
9
|
+
defaults(): Promise<RemoteResult<{
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
revision: number;
|
|
12
|
+
}>>;
|
|
13
|
+
setDefault(revision: number, enabled: boolean): Promise<RemoteResult<{
|
|
14
|
+
enabled: boolean;
|
|
15
|
+
revision: number;
|
|
16
|
+
}>>;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
declare const contribution: TypertRemoteContribution;
|
|
21
|
+
export default contribution;
|
|
22
|
+
//# sourceMappingURL=session-continuation-remote.d.ts.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const COMPACTION_CONTINUATION = "githubCopilotCompactionLifecycle";
|
|
3
|
+
export declare const CompactionContinuationStatusSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
state: z.ZodEnum<{
|
|
6
|
+
running: "running";
|
|
7
|
+
cancelled: "cancelled";
|
|
8
|
+
failed: "failed";
|
|
9
|
+
completed: "completed";
|
|
10
|
+
blocked: "blocked";
|
|
11
|
+
}>;
|
|
12
|
+
}, z.core.$strict>;
|
|
13
|
+
export type CompactionContinuationStatus = z.infer<typeof CompactionContinuationStatusSchema>;
|
|
14
|
+
export declare const CompactionContinuationLifecycleSchema: z.ZodObject<{
|
|
15
|
+
id: z.ZodNullable<z.ZodString>;
|
|
16
|
+
running: z.ZodBoolean;
|
|
17
|
+
}, z.core.$strict>;
|
|
18
|
+
export type CompactionContinuationLifecycle = z.infer<typeof CompactionContinuationLifecycleSchema>;
|
|
19
|
+
export declare const SessionContinuationPreferenceSchema: z.ZodObject<{
|
|
20
|
+
sessionId: z.ZodString;
|
|
21
|
+
version: z.ZodLiteral<1>;
|
|
22
|
+
consentedAt: z.ZodNumber;
|
|
23
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
24
|
+
}, z.core.$strict>;
|
|
25
|
+
export declare const SessionContinuationPreferencesSchema: z.ZodArray<z.ZodObject<{
|
|
26
|
+
sessionId: z.ZodString;
|
|
27
|
+
version: z.ZodLiteral<1>;
|
|
28
|
+
consentedAt: z.ZodNumber;
|
|
29
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
+
}, z.core.$strict>>;
|
|
31
|
+
export type SessionContinuationPreference = z.infer<typeof SessionContinuationPreferenceSchema>;
|
|
32
|
+
export declare const ContinuationDefaultHistorySchema: z.ZodArray<z.ZodObject<{
|
|
33
|
+
enabled: z.ZodBoolean;
|
|
34
|
+
changedAt: z.ZodNumber;
|
|
35
|
+
}, z.core.$strict>>;
|
|
36
|
+
export type ContinuationDefaultChange = z.infer<typeof ContinuationDefaultHistorySchema>[number];
|
|
37
|
+
export declare const ContinuationDefaultViewSchema: z.ZodObject<{
|
|
38
|
+
enabled: z.ZodBoolean;
|
|
39
|
+
revision: z.ZodNumber;
|
|
40
|
+
}, z.core.$strict>;
|
|
41
|
+
export declare const SessionContinuationViewSchema: z.ZodObject<{
|
|
42
|
+
enabled: z.ZodBoolean;
|
|
43
|
+
revision: z.ZodNumber;
|
|
44
|
+
activeTurnEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
45
|
+
source: z.ZodOptional<z.ZodEnum<{
|
|
46
|
+
default: "default";
|
|
47
|
+
session: "session";
|
|
48
|
+
}>>;
|
|
49
|
+
nextTurnAuthorized: z.ZodOptional<z.ZodBoolean>;
|
|
50
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
51
|
+
id: z.ZodString;
|
|
52
|
+
state: z.ZodEnum<{
|
|
53
|
+
running: "running";
|
|
54
|
+
cancelled: "cancelled";
|
|
55
|
+
failed: "failed";
|
|
56
|
+
completed: "completed";
|
|
57
|
+
blocked: "blocked";
|
|
58
|
+
}>;
|
|
59
|
+
}, z.core.$strict>>;
|
|
60
|
+
}, z.core.$strict>;
|
|
61
|
+
export type SessionContinuationView = z.infer<typeof SessionContinuationViewSchema>;
|
|
62
|
+
//# sourceMappingURL=session-continuation-types.d.ts.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
export interface SessionContinuationRemote {
|
|
3
|
+
get(agentId: string): Promise<{
|
|
4
|
+
ok: boolean;
|
|
5
|
+
value?: unknown;
|
|
6
|
+
}>;
|
|
7
|
+
set(agentId: string, revision: number, enabled: boolean | null): Promise<{
|
|
8
|
+
ok: boolean;
|
|
9
|
+
value?: unknown;
|
|
10
|
+
}>;
|
|
11
|
+
authorizeNext?(agentId: string, revision: number, enabled: boolean): Promise<{
|
|
12
|
+
ok: boolean;
|
|
13
|
+
value?: unknown;
|
|
14
|
+
}>;
|
|
15
|
+
defaults?(): Promise<{
|
|
16
|
+
ok: boolean;
|
|
17
|
+
value?: unknown;
|
|
18
|
+
}>;
|
|
19
|
+
setDefault?(revision: number, enabled: boolean): Promise<{
|
|
20
|
+
ok: boolean;
|
|
21
|
+
value?: unknown;
|
|
22
|
+
}>;
|
|
23
|
+
}
|
|
24
|
+
export declare function SessionContinuationCard({ sessionId, remote, locale, running, onEnabledChange, expanded, recovery, onCancel }: {
|
|
25
|
+
sessionId: string;
|
|
26
|
+
remote: SessionContinuationRemote | undefined;
|
|
27
|
+
locale?: string;
|
|
28
|
+
running?: boolean;
|
|
29
|
+
expanded?: boolean;
|
|
30
|
+
recovery?: boolean;
|
|
31
|
+
onCancel?(): void;
|
|
32
|
+
onEnabledChange?(enabled: boolean): void;
|
|
33
|
+
}): ReactElement;
|
|
34
|
+
export declare function ContinuationDefaultCard({ remote, locale, onSaved }: {
|
|
35
|
+
remote?: SessionContinuationRemote;
|
|
36
|
+
locale?: string;
|
|
37
|
+
onSaved?(): void;
|
|
38
|
+
}): ReactElement;
|
|
39
|
+
export declare function useSessionContinuationSwitch({ sessionId, remote, locale, changesAccount, running }: {
|
|
40
|
+
sessionId: string;
|
|
41
|
+
remote?: SessionContinuationRemote;
|
|
42
|
+
locale?: string;
|
|
43
|
+
running?: boolean;
|
|
44
|
+
changesAccount(accountId: string | null): Promise<boolean>;
|
|
45
|
+
}): {
|
|
46
|
+
beforeAccountChange(accountId: string | null, signal?: AbortSignal): Promise<boolean>;
|
|
47
|
+
content: ReactElement;
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=session-continuation-ui.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const SESSION_CONTINUATION_LIMITS: Readonly<{
|
|
2
|
+
items: 4096;
|
|
3
|
+
inputItems: 65536;
|
|
4
|
+
ciphertextCodeUnits: number;
|
|
5
|
+
chunkCodeUnits: number;
|
|
6
|
+
}>;
|
|
7
|
+
/** One admitted turn; fingerprints never become durable history or account provenance. */
|
|
8
|
+
export declare class SessionContinuationTurn {
|
|
9
|
+
private baseline;
|
|
10
|
+
private processing;
|
|
11
|
+
get initialized(): boolean;
|
|
12
|
+
transform(payload: unknown, assertCurrent?: () => void): Promise<unknown>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=session-continuation.d.ts.map
|