dsh-github-copilot 0.1.0-alpha.1.dsh.0.2.1.alpha.5
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 +439 -0
- package/CHANGELOG.md +875 -0
- package/CONTRIBUTING.md +55 -0
- package/LICENSE +21 -0
- package/README.md +366 -0
- package/README.zh.md +341 -0
- package/SECURITY.md +29 -0
- package/cordis.patch.yml +16 -0
- package/deployment-baseline.json +1580 -0
- package/docs/account-management-experience.md +143 -0
- package/docs/agent-readiness.md +110 -0
- package/docs/auto-high-cost.md +255 -0
- package/docs/auto-iteration-review.json +22 -0
- package/docs/auto-review-sampling.md +60 -0
- package/docs/auto-task-routing.md +341 -0
- package/docs/automatic-model-routing.md +236 -0
- package/docs/copilot-accounts.md +424 -0
- package/docs/copilot-compaction.md +148 -0
- package/docs/copilot-usage.md +133 -0
- package/docs/dual-model.md +66 -0
- package/docs/evidence-driven-iteration.md +86 -0
- package/docs/image-input-compatibility.md +64 -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/images/dual-model-desktop.png +0 -0
- package/docs/images/dual-model-mobile.png +0 -0
- package/docs/images/dual-model-provenance.json +35 -0
- package/docs/images/parent-model-follow.png +0 -0
- package/docs/manual-compaction-recovery.md +109 -0
- package/docs/mockups/copilot-account-dropdown.html +71 -0
- package/docs/mockups/copilot-account-management.html +393 -0
- package/docs/model-compatibility-acceptance.md +182 -0
- package/docs/npm-distribution.md +202 -0
- package/docs/official-first-016-alpha2.md +66 -0
- package/docs/official-first-020-rc1.md +32 -0
- package/docs/official-first-020-rc2.md +17 -0
- package/docs/official-first-021-alpha4.md +157 -0
- package/docs/official-first-021-alpha5.md +83 -0
- package/docs/plugin-diagnostics.md +605 -0
- package/docs/session-continuation.md +141 -0
- package/docs/session-search-routing.md +133 -0
- package/docs/single-route-migration.md +131 -0
- package/docs/web-lifecycle-rc2.md +55 -0
- package/lib/client.js +13236 -0
- package/lib/client.js.map +1 -0
- package/lib/copilot-identity-DRZY_d2X.js +15 -0
- package/lib/diagnostics-analysis-io.js +78 -0
- package/lib/diagnostics-analysis.js +427 -0
- package/lib/diagnostics-types-CF-qg8Do.js +708 -0
- package/lib/index.js +15661 -0
- package/lib/manual-compaction-recovery.js +485 -0
- package/lib/remote.js +1507 -0
- package/lib/request-budget-DLY_aRq0.js +87 -0
- package/lib/routed-web.js +120 -0
- package/lib/search-routing-CV2hs8as.js +792 -0
- package/lib/types/account-dropdown.d.ts +22 -0
- package/lib/types/account-model-auth.d.ts +15 -0
- package/lib/types/account-model-catalog.d.ts +70 -0
- package/lib/types/account-model-source.d.ts +85 -0
- package/lib/types/agent-compaction.d.ts +4 -0
- package/lib/types/authorization-code-clipboard.d.ts +4 -0
- package/lib/types/authorization-controller.d.ts +121 -0
- package/lib/types/auto-allocation-card.d.ts +9 -0
- package/lib/types/auto-allocation-diagnostics.d.ts +126 -0
- package/lib/types/auto-allocation-evidence.d.ts +44 -0
- package/lib/types/auto-allocation.d.ts +47 -0
- package/lib/types/auto-assessment-evidence.d.ts +111 -0
- package/lib/types/auto-model-host.d.ts +30 -0
- package/lib/types/auto-model-intent.d.ts +36 -0
- package/lib/types/auto-model-presentation.d.ts +57 -0
- package/lib/types/auto-model-routing.d.ts +64 -0
- package/lib/types/auto-review-sampling.d.ts +6 -0
- package/lib/types/auto-selection-explanation.d.ts +9 -0
- package/lib/types/auto-task-assessment.d.ts +49 -0
- package/lib/types/auto-task-classifier.d.ts +10 -0
- package/lib/types/background-compaction.d.ts +30 -0
- package/lib/types/client.d.ts +129 -0
- package/lib/types/compact-account.d.ts +42 -0
- 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 +28 -0
- package/lib/types/compaction-pressure.d.ts +23 -0
- package/lib/types/compaction-replay.d.ts +18 -0
- package/lib/types/compatibility.d.ts +17 -0
- package/lib/types/composer-notice-style.d.ts +7 -0
- package/lib/types/config.d.ts +141 -0
- package/lib/types/content-file.d.ts +10 -0
- package/lib/types/context-evidence-ui.d.ts +28 -0
- package/lib/types/context-evidence.d.ts +256 -0
- package/lib/types/context-usage.d.ts +4 -0
- 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 +31 -0
- package/lib/types/copilot-grant.d.ts +11 -0
- package/lib/types/copilot-identity.d.ts +11 -0
- package/lib/types/copilot-request.d.ts +11 -0
- package/lib/types/copilot-stream-liveness.d.ts +23 -0
- package/lib/types/copilot-usage-card.d.ts +51 -0
- package/lib/types/copilot-usage-host.d.ts +61 -0
- package/lib/types/copilot-usage-normalize.d.ts +9 -0
- package/lib/types/copilot-usage-remote.d.ts +63 -0
- package/lib/types/copilot-usage-types.d.ts +20 -0
- package/lib/types/copilot-usage-ui.d.ts +4 -0
- package/lib/types/current-provider.d.ts +59 -0
- package/lib/types/deepseek-search-fallback.d.ts +11 -0
- package/lib/types/diagnostics-analysis-io.d.ts +23 -0
- package/lib/types/diagnostics-analysis.d.ts +298 -0
- package/lib/types/diagnostics-card.d.ts +12 -0
- package/lib/types/diagnostics-client.d.ts +13 -0
- package/lib/types/diagnostics-collector.d.ts +50 -0
- package/lib/types/diagnostics-host.d.ts +183 -0
- package/lib/types/diagnostics-remote.d.ts +113 -0
- package/lib/types/diagnostics-types.d.ts +893 -0
- package/lib/types/dual-model-host.d.ts +119 -0
- package/lib/types/dual-model-remote.d.ts +63 -0
- package/lib/types/dual-model-types.d.ts +34 -0
- package/lib/types/external-link.d.ts +3 -0
- package/lib/types/failure.d.ts +38 -0
- package/lib/types/http.d.ts +48 -0
- package/lib/types/image-input-admission.d.ts +5 -0
- package/lib/types/index.d.ts +39 -0
- package/lib/types/manual-compaction-recovery.d.ts +67 -0
- package/lib/types/migration-status.d.ts +50 -0
- package/lib/types/model-exclusions.d.ts +15 -0
- package/lib/types/model-preferences-card.d.ts +9 -0
- package/lib/types/model-protocol.d.ts +31 -0
- package/lib/types/native-select-style.d.ts +4 -0
- package/lib/types/native-settings-style.d.ts +10 -0
- package/lib/types/parent-model-follow-card.d.ts +32 -0
- package/lib/types/parent-model-follow.d.ts +44 -0
- package/lib/types/pi-provider-bridge.d.ts +22 -0
- package/lib/types/plan.d.ts +148 -0
- package/lib/types/pre-step-pressure.d.ts +8 -0
- package/lib/types/preview-provider.d.ts +77 -0
- package/lib/types/preview-route.d.ts +76 -0
- package/lib/types/probe.d.ts +39 -0
- package/lib/types/remote-codec.d.ts +10 -0
- package/lib/types/remote.d.ts +202 -0
- package/lib/types/replay-recovery-host.d.ts +28 -0
- package/lib/types/replay-recovery-remote.d.ts +14 -0
- package/lib/types/replay-recovery-types.d.ts +24 -0
- package/lib/types/replay-recovery-ui.d.ts +28 -0
- package/lib/types/replay-recovery.d.ts +17 -0
- package/lib/types/request-body-composition.d.ts +17 -0
- package/lib/types/request-body-evidence.d.ts +37 -0
- package/lib/types/request-body-timeout-marker.d.ts +2 -0
- package/lib/types/request-body-timeout.d.ts +4 -0
- package/lib/types/request-budget.d.ts +58 -0
- package/lib/types/request-diagnostics.d.ts +278 -0
- package/lib/types/request-upload-evidence.d.ts +23 -0
- package/lib/types/response-error-body.d.ts +3 -0
- package/lib/types/responses-reasoning-text.d.ts +24 -0
- package/lib/types/responses-reasoning.d.ts +7 -0
- package/lib/types/responses-replay-compat.d.ts +31 -0
- package/lib/types/responses-request-compression.d.ts +33 -0
- package/lib/types/route-ownership.d.ts +70 -0
- package/lib/types/routed-web.d.ts +50 -0
- package/lib/types/search-backend.d.ts +16 -0
- package/lib/types/search-routing-host.d.ts +19 -0
- package/lib/types/search-routing-policy.d.ts +18 -0
- package/lib/types/search-routing-remote.d.ts +20 -0
- package/lib/types/search-routing.d.ts +43 -0
- package/lib/types/search-tool-routing.d.ts +22 -0
- package/lib/types/serialize.d.ts +106 -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/settings-reader.d.ts +16 -0
- package/lib/types/sse.d.ts +28 -0
- package/lib/types/temporary-models.d.ts +25 -0
- package/lib/types/tool-schema-compat.d.ts +17 -0
- package/lib/types/traditional-search.d.ts +17 -0
- package/lib/types/turn-model-provenance.d.ts +45 -0
- package/lib/types/turn-request-models.d.ts +55 -0
- package/lib/types/turn-selection-card.d.ts +24 -0
- package/lib/types/turn-selection-host.d.ts +35 -0
- package/lib/types/turn-selection-remote.d.ts +17 -0
- package/lib/types/turn-selection.d.ts +186 -0
- package/lib/types/turn-usage-evidence.d.ts +66 -0
- package/lib/types/turn-usage-notice.d.ts +7 -0
- package/lib/types/types.d.ts +69 -0
- package/lib/types/usage.d.ts +26 -0
- package/lib/types/watchdog.d.ts +22 -0
- package/lib/types/web-delegate.d.ts +12 -0
- package/lib/types/web-search-routing-card.d.ts +16 -0
- package/lib/types/web-search-routing-config.d.ts +12 -0
- package/lib/types/wire-anthropic.d.ts +37 -0
- package/lib/types/wire.d.ts +56 -0
- package/lib/web-delegate.js +9 -0
- package/output/auto-model-mockup/index.html +207 -0
- package/package.json +261 -0
- package/scripts/analyze-diagnostics.mjs +91 -0
- package/scripts/check-search-composition.mjs +191 -0
- package/scripts/iteration-review.mjs +53 -0
- package/scripts/release-policy.mjs +353 -0
- package/scripts/select-core-release.mjs +11 -0
|
@@ -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
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
export interface LiveSetting<T> {
|
|
3
|
+
get(): T;
|
|
4
|
+
}
|
|
5
|
+
/** Capture a native volatile field for one operation, or retain a plain fixture value. */
|
|
6
|
+
export declare function readConfigValue<T>(value: T | LiveSetting<T>): T;
|
|
7
|
+
/** Read non-secret configuration through the API available on the running Core. */
|
|
8
|
+
export declare function readSettingsNamespace(ctx: Context, namespace: string): unknown;
|
|
9
|
+
declare module '@deepseek-ai/cordis' {
|
|
10
|
+
interface Events {
|
|
11
|
+
'settings/updated'(namespace: string): void;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
/** Subscribe to namespace changes across the legacy settings provider and current form service. */
|
|
15
|
+
export declare function onSettingsNamespaceUpdated(ctx: Context, listener: (namespace: string) => void): () => void;
|
|
16
|
+
//# sourceMappingURL=settings-reader.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bounded SSE line parser for the inline wire path. Handles `event:` and
|
|
3
|
+
* `data:` fields, multi-line data, CRLF, comments, and trailing events
|
|
4
|
+
* without a final blank line; unknown fields are ignored and oversized
|
|
5
|
+
* individual events are rejected.
|
|
6
|
+
* @module dsh-github-copilot/sse
|
|
7
|
+
*/
|
|
8
|
+
/** Upper bound on one incomplete SSE event, in bytes. */
|
|
9
|
+
export declare const MAX_SSE_EVENT_BYTES: number;
|
|
10
|
+
/** Stable error raised when one incomplete SSE event exceeds its byte bound. */
|
|
11
|
+
export declare class SseEventSizeError extends Error {
|
|
12
|
+
readonly limit: number;
|
|
13
|
+
constructor();
|
|
14
|
+
}
|
|
15
|
+
/** One parsed SSE event; `type` falls back to `message`. */
|
|
16
|
+
export interface SseEvent {
|
|
17
|
+
readonly type: string;
|
|
18
|
+
readonly data: unknown;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Parse an SSE byte stream into typed events.
|
|
22
|
+
* @param body - the response body stream.
|
|
23
|
+
* @returns an async generator of parsed events.
|
|
24
|
+
* @throws on invalid JSON or when one event exceeds
|
|
25
|
+
* {@link MAX_SSE_EVENT_BYTES}.
|
|
26
|
+
*/
|
|
27
|
+
export declare function parseSse(body: ReadableStream<Uint8Array>): AsyncGenerator<SseEvent>;
|
|
28
|
+
//# sourceMappingURL=sse.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Api } from '@earendil-works/pi-ai';
|
|
2
|
+
import type { CopilotModelFacts } from './model-protocol.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Narrow compatibility metadata for account models that GitHub releases before
|
|
5
|
+
* the published pi-ai Copilot catalog catches up. Correct native protocol and
|
|
6
|
+
* capability metadata retire the correction; a matching ID alone does not.
|
|
7
|
+
*/
|
|
8
|
+
export interface TemporaryGitHubCopilotModel {
|
|
9
|
+
readonly id: string;
|
|
10
|
+
readonly name: string;
|
|
11
|
+
readonly api: Api;
|
|
12
|
+
readonly baseUrl: string;
|
|
13
|
+
readonly contextWindow: number;
|
|
14
|
+
readonly maxTokens: number;
|
|
15
|
+
readonly input: readonly ('text' | 'image')[];
|
|
16
|
+
readonly reasoningEfforts: Readonly<Record<string, string | null>>;
|
|
17
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
18
|
+
}
|
|
19
|
+
/** Return a narrow correction until the native entry supplies the verified capabilities. */
|
|
20
|
+
export declare function temporaryGitHubCopilotModel(modelId: string, installedModels: ReadonlyMap<string, CopilotModelFacts>, nativeAuthoritative?: boolean): TemporaryGitHubCopilotModel | undefined;
|
|
21
|
+
/** Minimal llm-pi-ai settings entry for one temporary model. */
|
|
22
|
+
export declare function temporaryGitHubCopilotModelProfile(model: TemporaryGitHubCopilotModel): Record<string, unknown>;
|
|
23
|
+
/** Recognize metadata written by this overlay without matching user-owned extras. */
|
|
24
|
+
export declare function temporaryGitHubCopilotModelFromProfile(value: Readonly<Record<string, unknown>>): TemporaryGitHubCopilotModel | undefined;
|
|
25
|
+
//# sourceMappingURL=temporary-models.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type { ToolSchema } from '@deepseek-ai/dsh-llm';
|
|
3
|
+
interface PromptAssemblyView {
|
|
4
|
+
readonly variables: Readonly<Record<string, string | undefined>>;
|
|
5
|
+
readonly tools: readonly ToolSchema[];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Copilot models repeatedly emit optional arguments even when runtime state
|
|
9
|
+
* makes them invalid. Remove unusable sandbox escalation fields and expose the
|
|
10
|
+
* multi-action Goal update as a discriminated union, so each action advertises
|
|
11
|
+
* only its legal fields. Other model providers retain the original schemas.
|
|
12
|
+
*/
|
|
13
|
+
export declare function filterCopilotToolAssembly<T extends PromptAssemblyView>(assembly: T, ownedPreview?: boolean): T;
|
|
14
|
+
/** Install the provider-scoped filter after Agent model selection has run. */
|
|
15
|
+
export declare function installCopilotToolSchemaCompatibility(ctx: Context): void;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=tool-schema-compat.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Traditional `ctx.web` search provider backed by a verified OpenAI Responses
|
|
3
|
+
* candidate. This is intentionally search-only: URL fetching remains owned by
|
|
4
|
+
* dedicated anonymous fetch providers.
|
|
5
|
+
* @module dsh-github-copilot/traditional-search
|
|
6
|
+
*/
|
|
7
|
+
import type { WebSearchProvider } from '@deepseek-ai/dsh-web';
|
|
8
|
+
import type { InlineConfig } from './config.ts';
|
|
9
|
+
import type { SearchPlan } from './plan.ts';
|
|
10
|
+
import type { InlineHooks } from './wire.ts';
|
|
11
|
+
/** Stable provider id selected through `web.searchProvider`. */
|
|
12
|
+
export declare const GITHUB_COPILOT_HOSTED_SEARCH_PROVIDER_ID = "github-copilot-hosted";
|
|
13
|
+
/** @deprecated Use {@link GITHUB_COPILOT_HOSTED_SEARCH_PROVIDER_ID}. */
|
|
14
|
+
export declare const COPILOT_HOSTED_SEARCH_PROVIDER_ID = "github-copilot-hosted";
|
|
15
|
+
/** Build the search-only provider registered with `ctx.web`. */
|
|
16
|
+
export declare function createTraditionalSearchProvider(available: () => boolean, plan: (signal?: AbortSignal) => SearchPlan | Promise<SearchPlan>, hooks: InlineHooks, config: () => InlineConfig, unavailableMessage?: string): WebSearchProvider;
|
|
17
|
+
//# sourceMappingURL=traditional-search.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export declare const TURN_MODEL_PROVENANCE_KEY = "github-copilot-turn-model-provenance";
|
|
2
|
+
export interface RecordedModel {
|
|
3
|
+
readonly provider: string;
|
|
4
|
+
readonly model: string;
|
|
5
|
+
}
|
|
6
|
+
export interface TurnModelProvenance {
|
|
7
|
+
readonly routes: readonly RecordedModel[];
|
|
8
|
+
readonly incomplete: boolean;
|
|
9
|
+
readonly ended: boolean;
|
|
10
|
+
}
|
|
11
|
+
interface State {
|
|
12
|
+
readonly turn: number;
|
|
13
|
+
readonly hasStart: boolean;
|
|
14
|
+
readonly openSteps: readonly number[];
|
|
15
|
+
readonly value: TurnModelProvenance;
|
|
16
|
+
}
|
|
17
|
+
interface Match {
|
|
18
|
+
readonly event: unknown;
|
|
19
|
+
}
|
|
20
|
+
interface Context {
|
|
21
|
+
readonly state?: State;
|
|
22
|
+
readonly matches: readonly Match[];
|
|
23
|
+
}
|
|
24
|
+
interface LocationData {
|
|
25
|
+
readonly kind: 'turn';
|
|
26
|
+
readonly turn: number;
|
|
27
|
+
readonly key: typeof TURN_MODEL_PROVENANCE_KEY;
|
|
28
|
+
readonly value: TurnModelProvenance;
|
|
29
|
+
}
|
|
30
|
+
export declare function isTurnModelProvenance(value: unknown): value is TurnModelProvenance;
|
|
31
|
+
/** Read provenance only; native Core retains attempt accounting and token totals. */
|
|
32
|
+
export declare const turnModelProvenanceDefinition: {
|
|
33
|
+
kind: string;
|
|
34
|
+
match(event: unknown): {
|
|
35
|
+
id: string;
|
|
36
|
+
role: "start" | "update";
|
|
37
|
+
} | null;
|
|
38
|
+
start(_context: Context, match: Match): State;
|
|
39
|
+
update(context: Context & {
|
|
40
|
+
readonly state: State;
|
|
41
|
+
}, match: Match): State;
|
|
42
|
+
buildLocationData(context: Context, scope: string, previous: LocationData | null): LocationData | null;
|
|
43
|
+
};
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=turn-model-provenance.d.ts.map
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
3
|
+
export declare const TURN_REQUEST_MODELS = "githubCopilotTurnRequestModels";
|
|
4
|
+
export declare const RequestedModelsSchema: z.ZodObject<{
|
|
5
|
+
routes: z.ZodArray<z.ZodObject<{
|
|
6
|
+
provider: z.ZodString;
|
|
7
|
+
model: z.ZodString;
|
|
8
|
+
}, z.core.$strict>>;
|
|
9
|
+
incomplete: z.ZodBoolean;
|
|
10
|
+
}, z.core.$strict>;
|
|
11
|
+
export type RequestedModels = z.infer<typeof RequestedModelsSchema>;
|
|
12
|
+
export declare const TurnRequestModelsStateSchema: z.ZodObject<{
|
|
13
|
+
active: z.ZodNullable<z.ZodObject<{
|
|
14
|
+
turn: z.ZodNumber;
|
|
15
|
+
step: z.ZodNullable<z.ZodNumber>;
|
|
16
|
+
}, z.core.$strict>>;
|
|
17
|
+
turns: z.ZodArray<z.ZodObject<{
|
|
18
|
+
routes: z.ZodArray<z.ZodObject<{
|
|
19
|
+
provider: z.ZodString;
|
|
20
|
+
model: z.ZodString;
|
|
21
|
+
}, z.core.$strict>>;
|
|
22
|
+
incomplete: z.ZodBoolean;
|
|
23
|
+
turn: z.ZodNumber;
|
|
24
|
+
}, z.core.$strict>>;
|
|
25
|
+
}, z.core.$strict>;
|
|
26
|
+
type State = z.infer<typeof TurnRequestModelsStateSchema>;
|
|
27
|
+
declare module '@deepseek-ai/dsh-session-projection/types' {
|
|
28
|
+
interface SessionProjectionStateMap {
|
|
29
|
+
githubCopilotTurnRequestModels: State;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export declare function foldTurnRequestModels(state: State, event: unknown): State;
|
|
33
|
+
export declare const turnRequestModelsDefinition: {
|
|
34
|
+
key: "githubCopilotTurnRequestModels";
|
|
35
|
+
stateVersion: number;
|
|
36
|
+
stateSchema: z.ZodObject<{
|
|
37
|
+
active: z.ZodNullable<z.ZodObject<{
|
|
38
|
+
turn: z.ZodNumber;
|
|
39
|
+
step: z.ZodNullable<z.ZodNumber>;
|
|
40
|
+
}, z.core.$strict>>;
|
|
41
|
+
turns: z.ZodArray<z.ZodObject<{
|
|
42
|
+
routes: z.ZodArray<z.ZodObject<{
|
|
43
|
+
provider: z.ZodString;
|
|
44
|
+
model: z.ZodString;
|
|
45
|
+
}, z.core.$strict>>;
|
|
46
|
+
incomplete: z.ZodBoolean;
|
|
47
|
+
turn: z.ZodNumber;
|
|
48
|
+
}, z.core.$strict>>;
|
|
49
|
+
}, z.core.$strict>;
|
|
50
|
+
init: () => State;
|
|
51
|
+
apply: typeof foldTurnRequestModels;
|
|
52
|
+
};
|
|
53
|
+
export declare function installTurnRequestModels(ctx: Context): void;
|
|
54
|
+
export {};
|
|
55
|
+
//# sourceMappingURL=turn-request-models.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { TurnSelection } from './turn-selection.ts';
|
|
3
|
+
import type { TurnAccountView } from './session-accounts-remote.ts';
|
|
4
|
+
import type { RecordedModel } from './turn-model-provenance.ts';
|
|
5
|
+
export interface TurnModelEvidence {
|
|
6
|
+
readonly kind: 'recorded' | 'requested' | 'unknown';
|
|
7
|
+
readonly routes: readonly RecordedModel[];
|
|
8
|
+
readonly incomplete: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function TurnSelectionCard({ selection, locale, incomplete, readState, retry, account, accountFailed, retryAccount, models, modelsFailed, retryModels, allocationEvidence }: {
|
|
11
|
+
selection: TurnSelection;
|
|
12
|
+
locale?: string;
|
|
13
|
+
incomplete?: boolean;
|
|
14
|
+
readState?: 'loading' | 'ready' | 'failed';
|
|
15
|
+
retry?: () => void;
|
|
16
|
+
account?: TurnAccountView;
|
|
17
|
+
accountFailed?: boolean;
|
|
18
|
+
retryAccount?: () => void;
|
|
19
|
+
models?: TurnModelEvidence;
|
|
20
|
+
modelsFailed?: boolean;
|
|
21
|
+
retryModels?: () => void;
|
|
22
|
+
allocationEvidence?: ReactElement;
|
|
23
|
+
}): ReactElement;
|
|
24
|
+
//# sourceMappingURL=turn-selection-card.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type { Agent } from '@deepseek-ai/dsh-agent';
|
|
3
|
+
import { TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol';
|
|
4
|
+
import type { TurnSelection, TurnSelectionStore } from './turn-selection.ts';
|
|
5
|
+
import type { RequestedModels } from './turn-request-models.ts';
|
|
6
|
+
/** Public Host binding for the existing bounded, runtime-only decision store. */
|
|
7
|
+
export declare class TurnSelectionController extends TypertRemoteService {
|
|
8
|
+
private readonly selections;
|
|
9
|
+
constructor(ctx: Context, selections: TurnSelectionStore);
|
|
10
|
+
get(agent: Agent, turn: number): TurnSelection;
|
|
11
|
+
allocationSummary(agent: Agent): {
|
|
12
|
+
policyVersion: "high-cost-v1" | "high-cost-v2" | "high-cost-v3" | "high-cost-v4";
|
|
13
|
+
scope: "viewed-session-host-lifetime";
|
|
14
|
+
status: "observed" | "not-collected";
|
|
15
|
+
retainedDecisions: number;
|
|
16
|
+
noFitDecisions: number;
|
|
17
|
+
rowsTruncated: boolean;
|
|
18
|
+
completeHistory: false;
|
|
19
|
+
observationStart: number | null;
|
|
20
|
+
observationEnd: number | null;
|
|
21
|
+
rows: {
|
|
22
|
+
modelId: string;
|
|
23
|
+
category: "unknown" | "powerful" | "versatile" | "lightweight";
|
|
24
|
+
highCost: boolean;
|
|
25
|
+
previous: boolean;
|
|
26
|
+
weight: number;
|
|
27
|
+
opportunities: number;
|
|
28
|
+
expectedSelections: number;
|
|
29
|
+
selections: number;
|
|
30
|
+
}[];
|
|
31
|
+
omittedPolicyDecisions?: number | undefined;
|
|
32
|
+
};
|
|
33
|
+
requestedModels(agent: Agent, turn: number): RequestedModels;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=turn-selection-host.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { RemoteResult, TypertRemoteContribution } from '@deepseek-ai/dsh-typert-protocol';
|
|
2
|
+
import type { TurnSelection } from './turn-selection.ts';
|
|
3
|
+
import type { RequestedModels } from './turn-request-models.ts';
|
|
4
|
+
import type { AutoAllocationSummary } from './auto-allocation-evidence.ts';
|
|
5
|
+
export { TurnSelectionSchema } from './turn-selection.ts';
|
|
6
|
+
declare module '@deepseek-ai/dsh-typert-protocol' {
|
|
7
|
+
interface TypertRemoteNamespaceMap {
|
|
8
|
+
githubCopilotTurnSelection: {
|
|
9
|
+
get(agentId: string, turn: number): Promise<RemoteResult<TurnSelection>>;
|
|
10
|
+
requestedModels(agentId: string, turn: number): Promise<RemoteResult<RequestedModels>>;
|
|
11
|
+
allocationSummary(agentId: string): Promise<RemoteResult<AutoAllocationSummary>>;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
declare const contribution: TypertRemoteContribution;
|
|
16
|
+
export default contribution;
|
|
17
|
+
//# sourceMappingURL=turn-selection-remote.d.ts.map
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import type { AutoModelPreference } from './copilot-identity.ts';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import type { AutoSelectionExplanation } from './auto-model-routing.ts';
|
|
4
|
+
import type { AutoAllocationSummary } from './auto-allocation-evidence.ts';
|
|
5
|
+
export declare const TurnSelectionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6
|
+
mode: z.ZodLiteral<"unknown">;
|
|
7
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
8
|
+
mode: z.ZodLiteral<"manual">;
|
|
9
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
10
|
+
mode: z.ZodLiteral<"auto">;
|
|
11
|
+
preference: z.ZodEnum<{
|
|
12
|
+
balance: "balance";
|
|
13
|
+
efficiency: "efficiency";
|
|
14
|
+
intelligence: "intelligence";
|
|
15
|
+
}>;
|
|
16
|
+
reason: z.ZodEnum<{
|
|
17
|
+
"short-text-turn": "short-text-turn";
|
|
18
|
+
"standard-turn": "standard-turn";
|
|
19
|
+
"large-structured-turn": "large-structured-turn";
|
|
20
|
+
"image-capability": "image-capability";
|
|
21
|
+
}>;
|
|
22
|
+
candidateCount: z.ZodNumber;
|
|
23
|
+
fittingCandidateCount: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
explanation: z.ZodOptional<z.ZodObject<{
|
|
25
|
+
allocationPolicy: z.ZodOptional<z.ZodLiteral<"high-cost-v4">>;
|
|
26
|
+
assessment: z.ZodObject<{
|
|
27
|
+
demand: z.ZodEnum<{
|
|
28
|
+
unknown: "unknown";
|
|
29
|
+
simple: "simple";
|
|
30
|
+
routine: "routine";
|
|
31
|
+
complex: "complex";
|
|
32
|
+
}>;
|
|
33
|
+
signals: z.ZodArray<z.ZodEnum<{
|
|
34
|
+
reasoning: "reasoning";
|
|
35
|
+
"context-omitted": "context-omitted";
|
|
36
|
+
"isolated-greeting": "isolated-greeting";
|
|
37
|
+
"bounded-transformation": "bounded-transformation";
|
|
38
|
+
investigation: "investigation";
|
|
39
|
+
continuation: "continuation";
|
|
40
|
+
"insufficient-evidence": "insufficient-evidence";
|
|
41
|
+
}>>;
|
|
42
|
+
source: z.ZodEnum<{
|
|
43
|
+
local: "local";
|
|
44
|
+
semantic: "semantic";
|
|
45
|
+
}>;
|
|
46
|
+
diagnostic: z.ZodOptional<z.ZodEnum<{
|
|
47
|
+
disabled: "disabled";
|
|
48
|
+
unavailable: "unavailable";
|
|
49
|
+
"context-omitted": "context-omitted";
|
|
50
|
+
"invalid-result": "invalid-result";
|
|
51
|
+
timeout: "timeout";
|
|
52
|
+
failed: "failed";
|
|
53
|
+
}>>;
|
|
54
|
+
semantic: z.ZodOptional<z.ZodObject<{
|
|
55
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
56
|
+
budgetMs: z.ZodNumber;
|
|
57
|
+
elapsedMs: z.ZodNumber;
|
|
58
|
+
stage: z.ZodEnum<{
|
|
59
|
+
preparing: "preparing";
|
|
60
|
+
"model-selected": "model-selected";
|
|
61
|
+
"adapter-started": "adapter-started";
|
|
62
|
+
"text-received": "text-received";
|
|
63
|
+
finished: "finished";
|
|
64
|
+
}>;
|
|
65
|
+
adapterStartedMs: z.ZodOptional<z.ZodNumber>;
|
|
66
|
+
firstTextMs: z.ZodOptional<z.ZodNumber>;
|
|
67
|
+
nativeFinish: z.ZodOptional<z.ZodEnum<{
|
|
68
|
+
stop: "stop";
|
|
69
|
+
"non-stop": "non-stop";
|
|
70
|
+
}>>;
|
|
71
|
+
outputCharacters: z.ZodNumber;
|
|
72
|
+
validation: z.ZodEnum<{
|
|
73
|
+
invalid: "invalid";
|
|
74
|
+
"not-validated": "not-validated";
|
|
75
|
+
valid: "valid";
|
|
76
|
+
"context-omitted": "context-omitted";
|
|
77
|
+
}>;
|
|
78
|
+
candidateScan: z.ZodOptional<z.ZodObject<{
|
|
79
|
+
candidates: z.ZodNumber;
|
|
80
|
+
eligible: z.ZodNumber;
|
|
81
|
+
rejected: z.ZodRecord<z.ZodEnum<{
|
|
82
|
+
input: "input";
|
|
83
|
+
category: "category";
|
|
84
|
+
excluded: "excluded";
|
|
85
|
+
"configured-id": "configured-id";
|
|
86
|
+
"reasoning-disable-unproven": "reasoning-disable-unproven";
|
|
87
|
+
budget: "budget";
|
|
88
|
+
}> & z.core.$partial, z.ZodNumber>;
|
|
89
|
+
}, z.core.$strict>>;
|
|
90
|
+
preparationFailure: z.ZodOptional<z.ZodEnum<{
|
|
91
|
+
"native-off-unavailable": "native-off-unavailable";
|
|
92
|
+
}>>;
|
|
93
|
+
projection: z.ZodOptional<z.ZodObject<{
|
|
94
|
+
retainedMessages: z.ZodNumber;
|
|
95
|
+
historyOmitted: z.ZodBoolean;
|
|
96
|
+
taskTextLimited: z.ZodBoolean;
|
|
97
|
+
continuationAnchor: z.ZodEnum<{
|
|
98
|
+
missing: "missing";
|
|
99
|
+
"not-needed": "not-needed";
|
|
100
|
+
retained: "retained";
|
|
101
|
+
}>;
|
|
102
|
+
}, z.core.$strict>>;
|
|
103
|
+
classifierDemand: z.ZodOptional<z.ZodEnum<{
|
|
104
|
+
unknown: "unknown";
|
|
105
|
+
simple: "simple";
|
|
106
|
+
routine: "routine";
|
|
107
|
+
complex: "complex";
|
|
108
|
+
}>>;
|
|
109
|
+
}, z.core.$strict>>;
|
|
110
|
+
}, z.core.$strict>;
|
|
111
|
+
targetCategory: z.ZodEnum<{
|
|
112
|
+
powerful: "powerful";
|
|
113
|
+
versatile: "versatile";
|
|
114
|
+
lightweight: "lightweight";
|
|
115
|
+
}>;
|
|
116
|
+
selectedCategory: z.ZodEnum<{
|
|
117
|
+
unknown: "unknown";
|
|
118
|
+
powerful: "powerful";
|
|
119
|
+
versatile: "versatile";
|
|
120
|
+
lightweight: "lightweight";
|
|
121
|
+
}>;
|
|
122
|
+
categoryCandidateCount: z.ZodNumber;
|
|
123
|
+
method: z.ZodEnum<{
|
|
124
|
+
continuity: "continuity";
|
|
125
|
+
"equal-distribution": "equal-distribution";
|
|
126
|
+
"weighted-distribution": "weighted-distribution";
|
|
127
|
+
"only-candidate": "only-candidate";
|
|
128
|
+
"no-fit": "no-fit";
|
|
129
|
+
}>;
|
|
130
|
+
fallback: z.ZodBoolean;
|
|
131
|
+
allocation: z.ZodOptional<z.ZodObject<{
|
|
132
|
+
policyVersion: z.ZodEnum<{
|
|
133
|
+
"high-cost-v1": "high-cost-v1";
|
|
134
|
+
"high-cost-v2": "high-cost-v2";
|
|
135
|
+
"high-cost-v3": "high-cost-v3";
|
|
136
|
+
"high-cost-v4": "high-cost-v4";
|
|
137
|
+
}>;
|
|
138
|
+
targetCategory: z.ZodOptional<z.ZodEnum<{
|
|
139
|
+
powerful: "powerful";
|
|
140
|
+
versatile: "versatile";
|
|
141
|
+
lightweight: "lightweight";
|
|
142
|
+
}>>;
|
|
143
|
+
deferredHighCostCount: z.ZodOptional<z.ZodNumber>;
|
|
144
|
+
selectedModelId: z.ZodString;
|
|
145
|
+
candidates: z.ZodArray<z.ZodObject<{
|
|
146
|
+
modelId: z.ZodString;
|
|
147
|
+
category: z.ZodOptional<z.ZodEnum<{
|
|
148
|
+
unknown: "unknown";
|
|
149
|
+
powerful: "powerful";
|
|
150
|
+
versatile: "versatile";
|
|
151
|
+
lightweight: "lightweight";
|
|
152
|
+
}>>;
|
|
153
|
+
categoryWeight: z.ZodOptional<z.ZodNumber>;
|
|
154
|
+
highCost: z.ZodBoolean;
|
|
155
|
+
previous: z.ZodBoolean;
|
|
156
|
+
weight: z.ZodNumber;
|
|
157
|
+
expectedShare: z.ZodNumber;
|
|
158
|
+
}, z.core.$strict>>;
|
|
159
|
+
}, z.core.$strict>>;
|
|
160
|
+
}, z.core.$strict>>;
|
|
161
|
+
}, z.core.$strict>], "mode">;
|
|
162
|
+
export type TurnSelection = {
|
|
163
|
+
readonly mode: 'unknown';
|
|
164
|
+
} | {
|
|
165
|
+
readonly mode: 'manual';
|
|
166
|
+
} | {
|
|
167
|
+
readonly mode: 'auto';
|
|
168
|
+
readonly preference: AutoModelPreference;
|
|
169
|
+
readonly reason: 'short-text-turn' | 'standard-turn' | 'large-structured-turn' | 'image-capability';
|
|
170
|
+
readonly candidateCount: number;
|
|
171
|
+
readonly fittingCandidateCount?: number;
|
|
172
|
+
readonly explanation?: AutoSelectionExplanation;
|
|
173
|
+
};
|
|
174
|
+
/** Ephemeral decision evidence only; never session content, model usage or credentials. */
|
|
175
|
+
export declare class TurnSelectionStore {
|
|
176
|
+
private readonly onAutoDecision?;
|
|
177
|
+
private readonly agents;
|
|
178
|
+
private timestamps;
|
|
179
|
+
constructor(onAutoDecision?: ((explanation: AutoSelectionExplanation) => void) | undefined);
|
|
180
|
+
record(agent: object, turn: number, selection: TurnSelection): void;
|
|
181
|
+
get(agent: object, turn: number): TurnSelection;
|
|
182
|
+
allocationSummary(agent: object): AutoAllocationSummary;
|
|
183
|
+
remove(agent: object): void;
|
|
184
|
+
clear(): void;
|
|
185
|
+
}
|
|
186
|
+
//# sourceMappingURL=turn-selection.d.ts.map
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export declare const TURN_USAGE_EVIDENCE_KEY = "github-copilot-turn-usage-evidence";
|
|
2
|
+
export interface TimeoutUsageDetail {
|
|
3
|
+
readonly step?: number;
|
|
4
|
+
readonly seq?: number;
|
|
5
|
+
readonly recovered: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface TurnUsageEvidence {
|
|
8
|
+
readonly ended: boolean;
|
|
9
|
+
readonly hasStart: boolean;
|
|
10
|
+
readonly localPreDispatchBlocks: number;
|
|
11
|
+
readonly unreportedAttempts: number;
|
|
12
|
+
readonly requestBodyTimeouts?: number;
|
|
13
|
+
readonly timeoutDetails?: readonly TimeoutUsageDetail[];
|
|
14
|
+
}
|
|
15
|
+
interface PendingRetry {
|
|
16
|
+
readonly index: number;
|
|
17
|
+
readonly step: number;
|
|
18
|
+
readonly seq: number;
|
|
19
|
+
readonly phase: 'failed' | 'scheduled' | 'started';
|
|
20
|
+
readonly retryId?: string;
|
|
21
|
+
readonly retry?: number;
|
|
22
|
+
}
|
|
23
|
+
interface State {
|
|
24
|
+
readonly turn: number;
|
|
25
|
+
readonly value: TurnUsageEvidence;
|
|
26
|
+
readonly pending?: PendingRetry;
|
|
27
|
+
}
|
|
28
|
+
interface Match {
|
|
29
|
+
readonly event: unknown;
|
|
30
|
+
}
|
|
31
|
+
interface Context {
|
|
32
|
+
readonly state?: State;
|
|
33
|
+
readonly matches: readonly Match[];
|
|
34
|
+
}
|
|
35
|
+
interface LocationData {
|
|
36
|
+
readonly kind: 'turn';
|
|
37
|
+
readonly turn: number;
|
|
38
|
+
readonly key: typeof TURN_USAGE_EVIDENCE_KEY;
|
|
39
|
+
readonly value: TurnUsageEvidence;
|
|
40
|
+
}
|
|
41
|
+
export declare function isTurnUsageEvidence(value: unknown): value is TurnUsageEvidence;
|
|
42
|
+
export interface TurnUsageDiagnostic {
|
|
43
|
+
readonly localPreDispatchBlocks: number;
|
|
44
|
+
readonly unreportedAttempts: number;
|
|
45
|
+
readonly incompleteHistory: boolean;
|
|
46
|
+
readonly requestBodyTimeouts?: number;
|
|
47
|
+
readonly timeoutDetails?: readonly TimeoutUsageDetail[];
|
|
48
|
+
}
|
|
49
|
+
/** Native completed-tail evidence gates the notice; native totals are never replaced. */
|
|
50
|
+
export declare function turnUsageDiagnostic(turn: number, tail: unknown, evidence: unknown, copilot: boolean): TurnUsageDiagnostic | undefined;
|
|
51
|
+
/** Bounded diagnostic evidence, not a competing usage total or billing projection. */
|
|
52
|
+
export declare const turnUsageEvidenceDefinition: {
|
|
53
|
+
kind: string;
|
|
54
|
+
stateVersion: number;
|
|
55
|
+
match(event: unknown): {
|
|
56
|
+
id: string;
|
|
57
|
+
role: "start" | "update";
|
|
58
|
+
} | null;
|
|
59
|
+
start(_context: Context, match: Match): State;
|
|
60
|
+
update(context: Context & {
|
|
61
|
+
readonly state: State;
|
|
62
|
+
}, match: Match): State;
|
|
63
|
+
buildLocationData(context: Context, scope: string, previous: LocationData | null): LocationData | null;
|
|
64
|
+
};
|
|
65
|
+
export {};
|
|
66
|
+
//# sourceMappingURL=turn-usage-evidence.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { TurnUsageDiagnostic } from './turn-usage-evidence.ts';
|
|
3
|
+
export declare function TurnUsageNotice({ diagnostic, locale }: {
|
|
4
|
+
readonly diagnostic: TurnUsageDiagnostic;
|
|
5
|
+
readonly locale?: string;
|
|
6
|
+
}): ReactElement;
|
|
7
|
+
//# sourceMappingURL=turn-usage-notice.d.ts.map
|