dsh-github-copilot 0.4.0-alpha.66 → 0.4.0-alpha.69

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.
@@ -1,21 +1,8 @@
1
+ import "./copilot-identity-DRZY_d2X.js";
1
2
  import { getSupportedThinkingLevels } from "@earendil-works/pi-ai";
2
3
  import { builtinProviders, getBuiltinModels } from "@earendil-works/pi-ai/providers/all";
3
4
  import { attributionHeaders } from "@deepseek-ai/dsh-llm";
4
5
  import { WebError } from "@deepseek-ai/dsh-web";
5
- //#region lib/types/copilot-identity.js
6
- /** Native OAuth ownership and the sole plugin-owned, account-discovered route. */
7
- const GITHUB_COPILOT_CREDENTIAL_KEY$1 = "llm-pi-ai/github-copilot";
8
- const GITHUB_COPILOT_PROVIDER_ID = "github-copilot";
9
- const GITHUB_COPILOT_PREVIEW_PROVIDER_ID = "github-copilot-preview";
10
- const GITHUB_COPILOT_AUTO_MODEL_ID = "auto";
11
- const GITHUB_COPILOT_AUTO_EFFICIENCY_MODEL_ID = "auto-efficiency";
12
- const GITHUB_COPILOT_AUTO_INTELLIGENCE_MODEL_ID = "auto-intelligence";
13
- function autoModelPreference(model) {
14
- if (model === "auto") return "balance";
15
- if (model === "auto-efficiency") return "efficiency";
16
- if (model === "auto-intelligence") return "intelligence";
17
- }
18
- //#endregion
19
6
  //#region lib/types/model-protocol.js
20
7
  /** Project only public leaves and the same pi library's supported wire efforts. */
21
8
  function projectModelFacts(model) {
@@ -802,4 +789,4 @@ async function routeSessionSearch(request, signal, deps) {
802
789
  };
803
790
  }
804
791
  //#endregion
805
- export { GITHUB_COPILOT_AUTO_EFFICIENCY_MODEL_ID as A, currentSearchInitiator as C, readSettingsNamespace as D, readConfigValue as E, GITHUB_COPILOT_PROVIDER_ID as F, autoModelPreference as I, GITHUB_COPILOT_AUTO_MODEL_ID as M, GITHUB_COPILOT_CREDENTIAL_KEY$1 as N, isPluginPreviewProvider as O, GITHUB_COPILOT_PREVIEW_PROVIDER_ID as P, currentChatRoute as S, onSettingsNamespaceUpdated as T, RESPONSES_WEB_SEARCH_TOOL_TYPE as _, COPILOT_HOSTED_SEARCH_PROVIDER_ID as a, candidatesForRoute as b, abortable as c, readBounded as d, applyRequestAuth as f, GITHUB_COPILOT_CREDENTIAL_KEY as g, ANTHROPIC_WEB_SEARCH_TOOL_TYPE as h, describeSearchBackend as i, GITHUB_COPILOT_AUTO_INTELLIGENCE_MODEL_ID as j, readCopilotCatalog as k, isAbortError as l, providerRequestHeaders as m, routeSessionSearch as n, GITHUB_COPILOT_HOSTED_SEARCH_PROVIDER_ID as o, normalizeRequestAuth as p, DescribedSearchFallbackError as r, createTraditionalSearchProvider as s, isCopilotSearchSelection as t, providerErrorMessage as u, SearchPlan as v, currentSearchSelection as w, sameCandidates as x, WEB_SEARCH_TOOL_TYPE as y };
792
+ export { currentSearchInitiator as C, readSettingsNamespace as D, readConfigValue as E, isPluginPreviewProvider as O, currentChatRoute as S, onSettingsNamespaceUpdated as T, RESPONSES_WEB_SEARCH_TOOL_TYPE as _, COPILOT_HOSTED_SEARCH_PROVIDER_ID as a, candidatesForRoute as b, abortable as c, readBounded as d, applyRequestAuth as f, GITHUB_COPILOT_CREDENTIAL_KEY as g, ANTHROPIC_WEB_SEARCH_TOOL_TYPE as h, describeSearchBackend as i, readCopilotCatalog as k, isAbortError as l, providerRequestHeaders as m, routeSessionSearch as n, GITHUB_COPILOT_HOSTED_SEARCH_PROVIDER_ID as o, normalizeRequestAuth as p, DescribedSearchFallbackError as r, createTraditionalSearchProvider as s, isCopilotSearchSelection as t, providerErrorMessage as u, SearchPlan as v, currentSearchSelection as w, sameCandidates as x, WEB_SEARCH_TOOL_TYPE as y };
@@ -15,6 +15,7 @@ export interface AutoModelHostDependencies {
15
15
  loadModels(signal: AbortSignal): Promise<readonly AccountModelDescriptor[]>;
16
16
  budgetPolicy?: () => Partial<RequestBudgetPolicy>;
17
17
  parentModelBindings?: () => readonly ParentModelBinding[];
18
+ followParentModel?: () => boolean;
18
19
  }
19
20
  /** Resolve virtual Auto once per Core turn before request/header persistence. */
20
21
  export declare function installAutoModelRouting(ctx: Context, dependencies: AutoModelHostDependencies): () => void;
@@ -8,6 +8,7 @@ import type { CSSProperties, ReactElement } from 'react';
8
8
  import type { GitHubCopilotAuthorizationView } from './authorization-controller.ts';
9
9
  import type { ProviderCardExtrasOwnerProps, SettingsSectionOwnerProps } from './dsh-supported-types.ts';
10
10
  export { HostedSearchSettingsCard, WebSearchRoutingCard } from './web-search-routing-card.ts';
11
+ export { ParentModelFollowCard } from './parent-model-follow-card.ts';
11
12
  export { CopilotUsageCard } from './copilot-usage-card.ts';
12
13
  export { GitHubCopilotModelPreferencesPanel } from './model-preferences-card.ts';
13
14
  export declare const inject: string[];
@@ -103,6 +104,10 @@ export declare function GitHubCopilotAccountSurface(props: GitHubCopilotPreviewF
103
104
  }): ReactElement | null;
104
105
  /** Unified fallback when the Models footer extension is absent or incompatible. */
105
106
  export declare function GitHubCopilotSettingsSection(props: GitHubCopilotSettingsSectionProps): ReturnType<typeof createElement>;
107
+ export declare function CopilotPluginSettingsPage(props: {
108
+ settings: ClientContext['remote']['settings'];
109
+ routing: ClientContext['remote']['githubCopilotSearchRouting'];
110
+ }): import("react").DetailedReactHTMLElement<import("react").HTMLAttributes<HTMLElement>, HTMLElement>;
106
111
  /** Mount the plugin-owned Remote namespace and register the Models card seat. */
107
112
  export declare function apply(ctx: ClientContext): Promise<() => Promise<void>>;
108
113
  //# sourceMappingURL=client.d.ts.map
@@ -36,6 +36,8 @@ export interface InlineConfig {
36
36
  excludedModelIds?: string[];
37
37
  /** Explicit native child/direct-parent enrollments; empty preserves native routing. */
38
38
  parentModelFollow?: ParentModelBinding[];
39
+ /** Profile-wide next-turn policy for supported native children. */
40
+ followParentModel?: boolean;
39
41
  /** Estimated managed-route input headroom, separate from truthful catalog capacities. */
40
42
  requestBudgetSafetyTokens?: number;
41
43
  /** Fraction of admissible input used by eligible automatic-compaction requests. */
@@ -53,14 +55,16 @@ export interface InlineConfig {
53
55
  /** Internal JSON backup of route leaves temporarily owned by the GPT-6 overlay. */
54
56
  temporaryRouteBackup?: string;
55
57
  }
56
- export type LiveInlineConfig = Omit<InlineConfig, 'searchModel' | 'searchRouting' | 'temporaryRouteBackup' | 'excludedModelIds' | 'parentModelFollow'> & {
58
+ export type LiveInlineConfig = Omit<InlineConfig, 'searchModel' | 'searchRouting' | 'temporaryRouteBackup' | 'excludedModelIds' | 'parentModelFollow' | 'followParentModel'> & {
59
+ followParentModel?: boolean | LiveSetting<boolean>;
57
60
  parentModelFollow?: ParentModelBinding[] | LiveSetting<ArrayLike<ParentModelBinding>>;
58
61
  excludedModelIds?: string[] | LiveSetting<ArrayLike<string>>;
59
62
  searchModel?: string | LiveSetting<string | undefined>;
60
63
  searchRouting?: WebSearchRoutingConfig | LiveSetting<WebSearchRoutingConfig | undefined>;
61
64
  temporaryRouteBackup?: string | LiveSetting<string | undefined>;
62
65
  };
63
- export type ResolvedInlineConfig = Omit<InlineConfig, 'searchModel' | 'searchRouting' | 'temporaryRouteBackup' | 'excludedModelIds' | 'parentModelFollow'> & {
66
+ export type ResolvedInlineConfig = Omit<InlineConfig, 'searchModel' | 'searchRouting' | 'temporaryRouteBackup' | 'excludedModelIds' | 'parentModelFollow' | 'followParentModel'> & {
67
+ followParentModel: LiveSetting<boolean>;
64
68
  parentModelFollow: LiveSetting<ArrayLike<ParentModelBinding>>;
65
69
  excludedModelIds: LiveSetting<ArrayLike<string>>;
66
70
  searchModel: LiveSetting<string | undefined>;
@@ -0,0 +1,50 @@
1
+ import type { Agent } from '@deepseek-ai/dsh-agent';
2
+ import BasicCompactionEngine from '@deepseek-ai/dsh-compaction-basic';
3
+ import type { ContentBlock, Message, TokenUsage, ToolSchema } from '@deepseek-ai/dsh-llm';
4
+ import type { CommandId } from '@deepseek-ai/dsh-commands/brand';
5
+ import type { CompactionResult } from '@deepseek-ai/dsh-compaction';
6
+ interface RecoveryMessage {
7
+ readonly role: string;
8
+ readonly content: readonly {
9
+ readonly type: string;
10
+ readonly id?: string;
11
+ }[];
12
+ readonly toolCallId?: string;
13
+ }
14
+ interface RecoveryInput<M> {
15
+ readonly messages: readonly M[];
16
+ readonly tools?: readonly ToolSchema[];
17
+ }
18
+ interface RecoveryResult {
19
+ readonly summary: ContentBlock[];
20
+ readonly provider: string;
21
+ readonly model: string;
22
+ readonly maxTokens?: number;
23
+ readonly usage?: TokenUsage;
24
+ }
25
+ interface RecoveryOptions<M extends RecoveryMessage, R extends RecoveryResult> {
26
+ readonly input: RecoveryInput<M>;
27
+ readonly inputLimit: number;
28
+ readonly maxCalls?: number;
29
+ readonly signal: AbortSignal;
30
+ readonly estimate: (input: RecoveryInput<M>) => number;
31
+ readonly summarize: (input: RecoveryInput<M>) => Promise<R>;
32
+ readonly makeCheckpoint: (summary: readonly ContentBlock[]) => M;
33
+ readonly assertCurrent?: () => void;
34
+ }
35
+ /**
36
+ * Bounded, explicit manual-only map/fold. The native engine still owns the only
37
+ * durable transaction, source-stability check, shrink check and cancellation.
38
+ */
39
+ export declare function summarizeOversizedManualInput<M extends RecoveryMessage, R extends RecoveryResult>(options: RecoveryOptions<M, R>): Promise<RecoveryResult>;
40
+ /**
41
+ * Deployment-selected alternative to stock BasicCompactionEngine. Do not
42
+ * mount both: Cordis compaction is a singleton, not an overridable service.
43
+ */
44
+ export declare class CopilotManualRecoveryCompactionEngine extends BasicCompactionEngine {
45
+ private readonly manual;
46
+ compactNow(agent: Agent, signal: AbortSignal, sourceCommandId?: CommandId): Promise<CompactionResult | null>;
47
+ protected summarize(input: RecoveryInput<Message>, agent: Agent, signal?: AbortSignal): Promise<RecoveryResult>;
48
+ }
49
+ export default CopilotManualRecoveryCompactionEngine;
50
+ //# sourceMappingURL=manual-compaction-recovery.d.ts.map
@@ -0,0 +1,41 @@
1
+ import type { Context } from '@deepseek-ai/cordis';
2
+ type Settings = Context['remote']['settings'];
3
+ interface Snapshot {
4
+ enabled: boolean;
5
+ revision: number;
6
+ writable: boolean;
7
+ legacy: boolean;
8
+ }
9
+ interface Props {
10
+ settings: Settings;
11
+ onSaved?: (revision: {
12
+ previous: number;
13
+ next: number;
14
+ }) => void;
15
+ }
16
+ export declare function readParentFollowSettings(settings: Settings): Promise<Snapshot>;
17
+ export declare function saveParentFollowSettings(settings: Settings, saved: Snapshot, enabled: boolean): Promise<{
18
+ snapshot: {
19
+ enabled: boolean;
20
+ revision: number;
21
+ writable: boolean;
22
+ legacy: boolean;
23
+ };
24
+ revision: {
25
+ previous: number;
26
+ next: number;
27
+ };
28
+ }>;
29
+ export declare function ParentModelFollowCard({ settings, onSaved }: Props): import("react").DetailedReactHTMLElement<{
30
+ 'data-dsh-parent-model-follow': boolean;
31
+ 'aria-busy': boolean;
32
+ style: {
33
+ padding: string;
34
+ marginTop: string;
35
+ display: "grid";
36
+ gap: string;
37
+ minWidth: number;
38
+ };
39
+ }, HTMLElement>;
40
+ export {};
41
+ //# sourceMappingURL=parent-model-follow-card.d.ts.map
@@ -37,7 +37,8 @@ export interface FollowSubject {
37
37
  readonly pending: FollowSelection | null;
38
38
  readonly recorded?: FollowSelection;
39
39
  }
40
+ export declare function supportsParentFollowing(subject: FollowSubject): boolean;
40
41
  /** Resolve a new turn's intent without changing any Session, setting or descriptor. */
41
- export declare function resolveParentModel(child: FollowSubject, bindings: readonly ParentModelBinding[], lookup: (id: string) => FollowSubject | undefined): FollowSelection | undefined;
42
+ export declare function resolveParentModel(child: FollowSubject, bindings: readonly ParentModelBinding[], lookup: (id: string) => FollowSubject | undefined, followAll?: boolean): FollowSelection | undefined;
42
43
  export {};
43
44
  //# sourceMappingURL=parent-model-follow.d.ts.map
@@ -2,12 +2,12 @@ import type { Context } from '@deepseek-ai/cordis';
2
2
  import type { PiAiProviderProfile } from '@deepseek-ai/dsh-llm-pi-ai';
3
3
  import { GITHUB_COPILOT_PREVIEW_PROVIDER_ID } from './copilot-identity.ts';
4
4
  import type { AccountModelLoadOptions } from './account-model-source.ts';
5
- import type { AccountModelRejection } from './account-model-catalog.ts';
5
+ import type { AccountModelDescriptor, AccountModelRejection } from './account-model-catalog.ts';
6
6
  import type { InlineConfig } from './config.ts';
7
7
  import type { RequestBudgetPolicy } from './request-budget.ts';
8
8
  /** Safe request knobs; identities, model tables, endpoints and credentials are not configurable. */
9
9
  export type PreviewRouteConfig = Pick<PiAiProviderProfile, 'reasoning' | 'cacheRetention' | 'transport' | 'timeoutMs' | 'websocketConnectTimeoutMs' | 'streamIdleTimeoutMs' | 'maxRequestImageBytes' | 'requestImagePixelBudget' | 'requestImageMaxBytes' | 'retryPolicy'> & Pick<InlineConfig, 'accountModelTtlMs' | 'accountModelFailureCooldownMs'> & {
10
- readonly accountModelSettings?: () => Pick<InlineConfig, 'accountModelTtlMs' | 'accountModelFailureCooldownMs' | 'excludedModelIds' | 'parentModelFollow'>;
10
+ readonly accountModelSettings?: () => Pick<InlineConfig, 'accountModelTtlMs' | 'accountModelFailureCooldownMs' | 'excludedModelIds' | 'parentModelFollow' | 'followParentModel'>;
11
11
  readonly requestBudget?: Partial<RequestBudgetPolicy>;
12
12
  readonly requestBudgetSettings?: () => Partial<RequestBudgetPolicy>;
13
13
  };
@@ -32,6 +32,12 @@ export interface GitHubCopilotPreviewView {
32
32
  }
33
33
  export interface GitHubCopilotPreview {
34
34
  getView(): GitHubCopilotPreviewView;
35
+ /** Synchronous, account-proven capacities for an explicit manual summary; never triggers discovery. */
36
+ recoveryLimits(modelId: string): {
37
+ readonly limits: Pick<AccountModelDescriptor, 'contextWindow' | 'maxInputTokens' | 'maxTokens'>;
38
+ readonly policy: Partial<RequestBudgetPolicy>;
39
+ readonly assertCurrent: () => void;
40
+ } | undefined;
35
41
  /** Host-only current endpoint facts; no discovery and no credential material. */
36
42
  routeFacts(modelId: string): {
37
43
  readonly api: string;
@@ -3,6 +3,10 @@ import type { ReactElement } from 'react';
3
3
  interface SearchRoutingCardProps {
4
4
  readonly settings: ClientContext['remote']['settings'];
5
5
  readonly routing: ClientContext['remote']['githubCopilotSearchRouting'];
6
+ readonly settingsRevision?: {
7
+ previous: number;
8
+ next: number;
9
+ };
6
10
  }
7
11
  /** Edit only explicit Copilot hosted-search leaves; provider routing remains a separate CAS. */
8
12
  export declare function HostedSearchSettingsCard({ settings }: Pick<SearchRoutingCardProps, 'settings'>): ReactElement;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-github-copilot",
3
3
  "description": "DSH companion for GitHub Copilot sign-in, account-aware model profiles, tool compatibility, and provider-hosted search.",
4
- "version": "0.4.0-alpha.66",
4
+ "version": "0.4.0-alpha.69",
5
5
  "publishConfig": {
6
6
  "access": "public",
7
7
  "registry": "https://registry.npmjs.org/",
@@ -33,6 +33,10 @@
33
33
  "types": "./lib/types/routed-web.d.ts",
34
34
  "default": "./lib/routed-web.js"
35
35
  },
36
+ "./manual-compaction-recovery": {
37
+ "types": "./lib/types/manual-compaction-recovery.d.ts",
38
+ "default": "./lib/manual-compaction-recovery.js"
39
+ },
36
40
  "./deployment-baseline.json": "./deployment-baseline.json",
37
41
  "./package.json": "./package.json"
38
42
  },
@@ -59,6 +63,7 @@
59
63
  "docs/official-first-020-rc2.md",
60
64
  "docs/web-lifecycle-rc2.md",
61
65
  "docs/copilot-compaction.md",
66
+ "docs/manual-compaction-recovery.md",
62
67
  "docs/copilot-usage.md",
63
68
  "docs/automatic-model-routing.md",
64
69
  "output/auto-model-mockup/index.html",
@@ -88,6 +93,9 @@
88
93
  "@deepseek-ai/cordis": "^4.0.4",
89
94
  "@deepseek-ai/dsh-agent": "0.2.0-rc.2",
90
95
  "@deepseek-ai/dsh-agent-default-model": "0.2.0-rc.2",
96
+ "@deepseek-ai/dsh-commands": "0.2.0-rc.2",
97
+ "@deepseek-ai/dsh-compaction": "0.2.0-rc.2",
98
+ "@deepseek-ai/dsh-compaction-basic": "0.2.0-rc.2",
91
99
  "@deepseek-ai/dsh-api-remotes": "0.2.0-rc.2",
92
100
  "@deepseek-ai/dsh-authorization": "0.2.0-rc.2",
93
101
  "@deepseek-ai/dsh-client-ui-renderer": "0.2.0-rc.2",
@@ -97,6 +105,7 @@
97
105
  "@deepseek-ai/dsh-launch-environment": "0.2.0-rc.2",
98
106
  "@deepseek-ai/dsh-llm": "0.2.0-rc.2",
99
107
  "@deepseek-ai/dsh-llm-pi-ai": "0.2.0-rc.2",
108
+ "@deepseek-ai/dsh-session": "0.2.0-rc.2",
100
109
  "@deepseek-ai/dsh-scope": "0.2.0-rc.2",
101
110
  "@deepseek-ai/dsh-settings": "0.2.0-rc.2",
102
111
  "@deepseek-ai/dsh-typert-protocol": "0.2.0-rc.2",
@@ -136,6 +145,9 @@
136
145
  "@deepseek-ai/cordis": "~4.0.4",
137
146
  "@deepseek-ai/dsh-agent": "0.2.0-rc.2",
138
147
  "@deepseek-ai/dsh-agent-default-model": "0.2.0-rc.2",
148
+ "@deepseek-ai/dsh-commands": "0.2.0-rc.2",
149
+ "@deepseek-ai/dsh-compaction": "0.2.0-rc.2",
150
+ "@deepseek-ai/dsh-compaction-basic": "0.2.0-rc.2",
139
151
  "@deepseek-ai/dsh-api-gateway": "0.2.0-rc.2",
140
152
  "@deepseek-ai/dsh-api-remotes": "0.2.0-rc.2",
141
153
  "@deepseek-ai/dsh-app-boot": "0.2.0-rc.2",