dsh-github-copilot 0.4.2-alpha.2 → 0.4.2-alpha.4

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.
@@ -0,0 +1,190 @@
1
+ import { z } from 'zod';
2
+ import type { RequestBodyEvidence } from './request-body-evidence.ts';
3
+ import type { RequestUploadEvidence } from './request-upload-evidence.ts';
4
+ export declare const REQUEST_DIAGNOSTICS_MAX_ROWS = 128;
5
+ export declare const REQUEST_DIAGNOSTICS_RETENTION_MS: number;
6
+ export declare const RequestDiagnosticSchema: z.ZodObject<{
7
+ streamId: z.ZodString;
8
+ dispatchIndex: z.ZodNumber;
9
+ version: z.ZodString;
10
+ startedAt: z.ZodNumber;
11
+ elapsedMs: z.ZodNumber;
12
+ model: z.ZodString;
13
+ protocol: z.ZodEnum<{
14
+ "openai-completions": "openai-completions";
15
+ "openai-responses": "openai-responses";
16
+ "anthropic-messages": "anthropic-messages";
17
+ }>;
18
+ composition: z.ZodDiscriminatedUnion<[z.ZodObject<{
19
+ state: z.ZodLiteral<"complete">;
20
+ totalBytes: z.ZodNumber;
21
+ conversationBytes: z.ZodNumber;
22
+ toolSchemaBytes: z.ZodNumber;
23
+ systemBytes: z.ZodNumber;
24
+ otherBytes: z.ZodNumber;
25
+ imageBlockBytes: z.ZodNumber;
26
+ opaqueReplayBytes: z.ZodNumber;
27
+ remainingConversationBytes: z.ZodNumber;
28
+ }, z.core.$strict>, z.ZodObject<{
29
+ state: z.ZodEnum<{
30
+ unavailable: "unavailable";
31
+ "work-limit": "work-limit";
32
+ "size-limit": "size-limit";
33
+ "invalid-json": "invalid-json";
34
+ "unsupported-shape": "unsupported-shape";
35
+ }>;
36
+ totalBytes: z.ZodOptional<z.ZodNumber>;
37
+ }, z.core.$strict>], "state">;
38
+ encoding: z.ZodEnum<{
39
+ unknown: "unknown";
40
+ identity: "identity";
41
+ gzip: "gzip";
42
+ }>;
43
+ wireBytes: z.ZodOptional<z.ZodNumber>;
44
+ upload: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
45
+ state: z.ZodLiteral<"observed">;
46
+ bodyWrite: z.ZodEnum<{
47
+ observed: "observed";
48
+ "not-observed": "not-observed";
49
+ }>;
50
+ bodyWriteCompleteMs: z.ZodOptional<z.ZodNumber>;
51
+ nativeResponseHeadersMs: z.ZodOptional<z.ZodNumber>;
52
+ alpn: z.ZodEnum<{
53
+ h2: "h2";
54
+ unavailable: "unavailable";
55
+ "http/1.1": "http/1.1";
56
+ }>;
57
+ nodeWritableBufferBytes: z.ZodOptional<z.ZodNumber>;
58
+ }, z.core.$strict>, z.ZodObject<{
59
+ state: z.ZodEnum<{
60
+ unavailable: "unavailable";
61
+ "work-limit": "work-limit";
62
+ }>;
63
+ }, z.core.$strict>, z.ZodObject<{
64
+ state: z.ZodLiteral<"ambiguous">;
65
+ requestCount: z.ZodNumber;
66
+ }, z.core.$strict>], "state">>;
67
+ responseHeadersMs: z.ZodOptional<z.ZodNumber>;
68
+ httpStatus: z.ZodOptional<z.ZodNumber>;
69
+ outcome: z.ZodEnum<{
70
+ "http-error": "http-error";
71
+ "transport-error": "transport-error";
72
+ "stream-done": "stream-done";
73
+ "stream-error": "stream-error";
74
+ cancelled: "cancelled";
75
+ interrupted: "interrupted";
76
+ }>;
77
+ reason: z.ZodEnum<{
78
+ none: "none";
79
+ unknown: "unknown";
80
+ "request-body-timeout": "request-body-timeout";
81
+ "caller-abort": "caller-abort";
82
+ "credential-changed": "credential-changed";
83
+ disposed: "disposed";
84
+ "byte-idle-timeout": "byte-idle-timeout";
85
+ "signal-abort": "signal-abort";
86
+ }>;
87
+ }, z.core.$strict>;
88
+ export declare const RequestDiagnosticsSchema: z.ZodObject<{
89
+ rows: z.ZodArray<z.ZodObject<{
90
+ streamId: z.ZodString;
91
+ dispatchIndex: z.ZodNumber;
92
+ version: z.ZodString;
93
+ startedAt: z.ZodNumber;
94
+ elapsedMs: z.ZodNumber;
95
+ model: z.ZodString;
96
+ protocol: z.ZodEnum<{
97
+ "openai-completions": "openai-completions";
98
+ "openai-responses": "openai-responses";
99
+ "anthropic-messages": "anthropic-messages";
100
+ }>;
101
+ composition: z.ZodDiscriminatedUnion<[z.ZodObject<{
102
+ state: z.ZodLiteral<"complete">;
103
+ totalBytes: z.ZodNumber;
104
+ conversationBytes: z.ZodNumber;
105
+ toolSchemaBytes: z.ZodNumber;
106
+ systemBytes: z.ZodNumber;
107
+ otherBytes: z.ZodNumber;
108
+ imageBlockBytes: z.ZodNumber;
109
+ opaqueReplayBytes: z.ZodNumber;
110
+ remainingConversationBytes: z.ZodNumber;
111
+ }, z.core.$strict>, z.ZodObject<{
112
+ state: z.ZodEnum<{
113
+ unavailable: "unavailable";
114
+ "work-limit": "work-limit";
115
+ "size-limit": "size-limit";
116
+ "invalid-json": "invalid-json";
117
+ "unsupported-shape": "unsupported-shape";
118
+ }>;
119
+ totalBytes: z.ZodOptional<z.ZodNumber>;
120
+ }, z.core.$strict>], "state">;
121
+ encoding: z.ZodEnum<{
122
+ unknown: "unknown";
123
+ identity: "identity";
124
+ gzip: "gzip";
125
+ }>;
126
+ wireBytes: z.ZodOptional<z.ZodNumber>;
127
+ upload: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
128
+ state: z.ZodLiteral<"observed">;
129
+ bodyWrite: z.ZodEnum<{
130
+ observed: "observed";
131
+ "not-observed": "not-observed";
132
+ }>;
133
+ bodyWriteCompleteMs: z.ZodOptional<z.ZodNumber>;
134
+ nativeResponseHeadersMs: z.ZodOptional<z.ZodNumber>;
135
+ alpn: z.ZodEnum<{
136
+ h2: "h2";
137
+ unavailable: "unavailable";
138
+ "http/1.1": "http/1.1";
139
+ }>;
140
+ nodeWritableBufferBytes: z.ZodOptional<z.ZodNumber>;
141
+ }, z.core.$strict>, z.ZodObject<{
142
+ state: z.ZodEnum<{
143
+ unavailable: "unavailable";
144
+ "work-limit": "work-limit";
145
+ }>;
146
+ }, z.core.$strict>, z.ZodObject<{
147
+ state: z.ZodLiteral<"ambiguous">;
148
+ requestCount: z.ZodNumber;
149
+ }, z.core.$strict>], "state">>;
150
+ responseHeadersMs: z.ZodOptional<z.ZodNumber>;
151
+ httpStatus: z.ZodOptional<z.ZodNumber>;
152
+ outcome: z.ZodEnum<{
153
+ "http-error": "http-error";
154
+ "transport-error": "transport-error";
155
+ "stream-done": "stream-done";
156
+ "stream-error": "stream-error";
157
+ cancelled: "cancelled";
158
+ interrupted: "interrupted";
159
+ }>;
160
+ reason: z.ZodEnum<{
161
+ none: "none";
162
+ unknown: "unknown";
163
+ "request-body-timeout": "request-body-timeout";
164
+ "caller-abort": "caller-abort";
165
+ "credential-changed": "credential-changed";
166
+ disposed: "disposed";
167
+ "byte-idle-timeout": "byte-idle-timeout";
168
+ "signal-abort": "signal-abort";
169
+ }>;
170
+ }, z.core.$strict>>;
171
+ dropped: z.ZodNumber;
172
+ evicted: z.ZodNumber;
173
+ pending: z.ZodOptional<z.ZodNumber>;
174
+ interruptedOnReopen: z.ZodOptional<z.ZodNumber>;
175
+ }, z.core.$strict>;
176
+ export type RequestDiagnostic = z.infer<typeof RequestDiagnosticSchema>;
177
+ export interface RequestDiagnosticHandle {
178
+ headers(status: number | undefined, ms: number | undefined, upload?: RequestUploadEvidence): void;
179
+ finish(outcome: RequestDiagnostic['outcome'], reason?: RequestDiagnostic['reason']): void;
180
+ }
181
+ export interface RequestDiagnosticStart {
182
+ streamId: string;
183
+ dispatchIndex: number;
184
+ model: string;
185
+ protocol: RequestDiagnostic['protocol'];
186
+ composition: RequestBodyEvidence;
187
+ encoding: RequestDiagnostic['encoding'];
188
+ wireBytes?: number;
189
+ }
190
+ //# sourceMappingURL=request-diagnostics.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.2-alpha.2",
4
+ "version": "0.4.2-alpha.4",
5
5
  "releaseNotes": "CHANGELOG.md",
6
6
  "publishConfig": {
7
7
  "access": "public",