dsh-github-copilot 0.4.0-alpha.96 → 0.4.0-alpha.98
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 +3 -1
- package/CHANGELOG.md +12 -0
- package/README.md +10 -6
- package/README.zh.md +10 -6
- package/deployment-baseline.json +22 -1
- package/docs/automatic-model-routing.md +13 -2
- package/docs/copilot-compaction.md +4 -0
- package/lib/index.js +328 -121
- package/lib/types/auto-model-intent.d.ts +36 -0
- package/lib/types/request-body-evidence.d.ts +2 -0
- package/lib/types/request-upload-evidence.d.ts +23 -0
- package/package.json +1 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const AUTO_MODEL_INTENT_PROJECTION = "githubCopilotAutoModelIntent";
|
|
3
|
+
export declare const AutoModelIntentSchema: z.ZodObject<{
|
|
4
|
+
inherited: z.ZodNumber;
|
|
5
|
+
selection: z.ZodNullable<z.ZodObject<{
|
|
6
|
+
provider: z.ZodString;
|
|
7
|
+
model: z.ZodString;
|
|
8
|
+
}, z.core.$strict>>;
|
|
9
|
+
blocked: z.ZodBoolean;
|
|
10
|
+
}, z.core.$strict>;
|
|
11
|
+
export type AutoModelIntent = z.infer<typeof AutoModelIntentSchema>;
|
|
12
|
+
export declare function initialAutoModelIntent(inherited?: number): AutoModelIntent;
|
|
13
|
+
/** Request headers describe execution, not replacement of an explicit picker intent. */
|
|
14
|
+
export declare function foldAutoModelIntent(state: AutoModelIntent, event: unknown): AutoModelIntent;
|
|
15
|
+
export declare const autoModelIntentDefinition: {
|
|
16
|
+
key: string;
|
|
17
|
+
stateVersion: number;
|
|
18
|
+
stateSchema: z.ZodObject<{
|
|
19
|
+
inherited: z.ZodNumber;
|
|
20
|
+
selection: z.ZodNullable<z.ZodObject<{
|
|
21
|
+
provider: z.ZodString;
|
|
22
|
+
model: z.ZodString;
|
|
23
|
+
}, z.core.$strict>>;
|
|
24
|
+
blocked: z.ZodBoolean;
|
|
25
|
+
}, z.core.$strict>;
|
|
26
|
+
init: (_header: unknown, inherited?: number) => {
|
|
27
|
+
inherited: number;
|
|
28
|
+
selection: {
|
|
29
|
+
provider: string;
|
|
30
|
+
model: string;
|
|
31
|
+
} | null;
|
|
32
|
+
blocked: boolean;
|
|
33
|
+
};
|
|
34
|
+
apply: typeof foldAutoModelIntent;
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=auto-model-intent.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RequestUploadEvidence } from './request-upload-evidence.ts';
|
|
1
2
|
export type RequestBodyProtocol = 'openai-responses' | 'openai-completions' | 'anthropic-messages';
|
|
2
3
|
export declare const REQUEST_BODY_EVIDENCE_LIMITS: Readonly<{
|
|
3
4
|
bytes: number;
|
|
@@ -25,6 +26,7 @@ export interface RequestBodyDispatchEvidence {
|
|
|
25
26
|
readonly protocol: RequestBodyProtocol;
|
|
26
27
|
/** Fetch invocation to response headers, not upload duration or clone-observation time. */
|
|
27
28
|
readonly responseHeadersMs: number;
|
|
29
|
+
readonly upload?: RequestUploadEvidence;
|
|
28
30
|
}
|
|
29
31
|
export declare function formatRequestBodyEvidence(evidence: RequestBodyEvidence, responseHeadersMs?: number): string;
|
|
30
32
|
/** Diagnostic-only traversal of the original JSON spans; never reserializes or changes a request. */
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type RequestUploadEvidence = {
|
|
2
|
+
readonly state: 'observed';
|
|
3
|
+
readonly bodyWrite: 'observed' | 'not-observed';
|
|
4
|
+
readonly bodyWriteCompleteMs?: number;
|
|
5
|
+
readonly nativeResponseHeadersMs?: number;
|
|
6
|
+
readonly alpn: 'h2' | 'http/1.1' | 'unavailable';
|
|
7
|
+
readonly nodeWritableBufferBytes?: number;
|
|
8
|
+
} | {
|
|
9
|
+
readonly state: 'unavailable';
|
|
10
|
+
} | {
|
|
11
|
+
readonly state: 'work-limit';
|
|
12
|
+
} | {
|
|
13
|
+
readonly state: 'ambiguous';
|
|
14
|
+
readonly requestCount: number;
|
|
15
|
+
};
|
|
16
|
+
/** Observe public native events only; never read request fields, mutate transport or imply remote receipt. */
|
|
17
|
+
export declare function createRequestUploadObserver(): {
|
|
18
|
+
run<T>(operation: () => T): T;
|
|
19
|
+
snapshot(): RequestUploadEvidence;
|
|
20
|
+
close(): void;
|
|
21
|
+
};
|
|
22
|
+
export declare function formatRequestUploadEvidence(evidence: RequestUploadEvidence | undefined): string;
|
|
23
|
+
//# sourceMappingURL=request-upload-evidence.d.ts.map
|
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.
|
|
4
|
+
"version": "0.4.0-alpha.98",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
7
7
|
"registry": "https://registry.npmjs.org/",
|