dsh-github-copilot 0.4.0-alpha.127 → 0.4.0-alpha.129
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 +21 -2
- package/CHANGELOG.md +12 -0
- package/README.md +10 -8
- package/README.zh.md +10 -8
- package/deployment-baseline.json +8 -3
- package/docs/copilot-usage.md +7 -1
- package/lib/client.js +303 -135
- package/lib/client.js.map +1 -1
- package/lib/index.js +231 -31
- package/lib/types/compaction-continuation-ui.d.ts +4 -5
- package/lib/types/context-evidence-ui.d.ts +18 -1
- package/lib/types/context-evidence.d.ts +149 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -310,7 +310,7 @@ const result$1 = strictRemoteCodec("dsh-github-copilot#DiagnosticsView", Diagnos
|
|
|
310
310
|
var package_default = {
|
|
311
311
|
name: "dsh-github-copilot",
|
|
312
312
|
description: "DSH companion for GitHub Copilot sign-in, account-aware model profiles, tool compatibility, and provider-hosted search.",
|
|
313
|
-
version: "0.4.0-alpha.
|
|
313
|
+
version: "0.4.0-alpha.129",
|
|
314
314
|
publishConfig: {
|
|
315
315
|
"access": "public",
|
|
316
316
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -6117,6 +6117,37 @@ const sampleSchema = z.object({
|
|
|
6117
6117
|
seq: count$2,
|
|
6118
6118
|
route: routeSchema
|
|
6119
6119
|
}).strict();
|
|
6120
|
+
const incidentSchema = z.object({
|
|
6121
|
+
kind: z.enum(["failed-zero", "invalid-sample"]),
|
|
6122
|
+
seq: count$2
|
|
6123
|
+
}).strict();
|
|
6124
|
+
const stepSchema = z.object({
|
|
6125
|
+
turn: count$2,
|
|
6126
|
+
step: count$2
|
|
6127
|
+
}).strict();
|
|
6128
|
+
const compactionSchema = z.object({
|
|
6129
|
+
id: z.string().min(1).max(256),
|
|
6130
|
+
startSeq: count$2,
|
|
6131
|
+
endSeq: count$2.nullable(),
|
|
6132
|
+
state: z.enum([
|
|
6133
|
+
"running",
|
|
6134
|
+
"completed",
|
|
6135
|
+
"failed",
|
|
6136
|
+
"unknown"
|
|
6137
|
+
]),
|
|
6138
|
+
checkpoint: z.boolean(),
|
|
6139
|
+
headerSeq: count$2.nullable(),
|
|
6140
|
+
requestRoute: routeSchema.nullable(),
|
|
6141
|
+
step: stepSchema.nullable(),
|
|
6142
|
+
request: z.enum([
|
|
6143
|
+
"idle",
|
|
6144
|
+
"pending",
|
|
6145
|
+
"succeeded",
|
|
6146
|
+
"failed",
|
|
6147
|
+
"cancelled",
|
|
6148
|
+
"unknown"
|
|
6149
|
+
])
|
|
6150
|
+
}).strict();
|
|
6120
6151
|
const ContextEvidenceSchema = z.object({
|
|
6121
6152
|
route: routeSchema.nullable(),
|
|
6122
6153
|
sample: sampleSchema.nullable(),
|
|
@@ -6124,10 +6155,14 @@ const ContextEvidenceSchema = z.object({
|
|
|
6124
6155
|
reason: z.enum([
|
|
6125
6156
|
"none",
|
|
6126
6157
|
"failed-zero",
|
|
6158
|
+
"invalid-sample",
|
|
6127
6159
|
"compaction",
|
|
6128
6160
|
"selection",
|
|
6129
6161
|
"unknown"
|
|
6130
|
-
])
|
|
6162
|
+
]),
|
|
6163
|
+
incident: incidentSchema.nullable(),
|
|
6164
|
+
compaction: compactionSchema.nullable().optional(),
|
|
6165
|
+
activeStep: stepSchema.nullable().optional()
|
|
6131
6166
|
}).strict();
|
|
6132
6167
|
const usageSchema = z.object({
|
|
6133
6168
|
inputTokens: count$2,
|
|
@@ -6151,20 +6186,109 @@ function initialContextEvidence() {
|
|
|
6151
6186
|
route: null,
|
|
6152
6187
|
sample: null,
|
|
6153
6188
|
invalid: false,
|
|
6154
|
-
reason: "none"
|
|
6189
|
+
reason: "none",
|
|
6190
|
+
incident: null,
|
|
6191
|
+
compaction: null,
|
|
6192
|
+
activeStep: null
|
|
6155
6193
|
};
|
|
6156
6194
|
}
|
|
6157
6195
|
/** Read only counts and routing leaves; never message content or opaque replay. */
|
|
6158
6196
|
function foldContextEvidence(state, event) {
|
|
6159
6197
|
if (!record$12(event) || typeof event.type !== "string" || !record$12(event.data)) return state;
|
|
6198
|
+
if (event.type === "step/start") {
|
|
6199
|
+
const step = stepSchema.safeParse({
|
|
6200
|
+
turn: event.data.turn,
|
|
6201
|
+
step: event.data.step
|
|
6202
|
+
});
|
|
6203
|
+
state = {
|
|
6204
|
+
...state,
|
|
6205
|
+
activeStep: step.success ? step.data : null
|
|
6206
|
+
};
|
|
6207
|
+
}
|
|
6208
|
+
if (event.type === "compaction/start") {
|
|
6209
|
+
const id = compactionSchema.shape.id.safeParse(event.data.compactionId);
|
|
6210
|
+
const seq = count$2.safeParse(event.seq);
|
|
6211
|
+
return {
|
|
6212
|
+
...state,
|
|
6213
|
+
sample: null,
|
|
6214
|
+
invalid: false,
|
|
6215
|
+
reason: "compaction",
|
|
6216
|
+
incident: null,
|
|
6217
|
+
compaction: id.success && seq.success ? {
|
|
6218
|
+
id: id.data,
|
|
6219
|
+
startSeq: seq.data,
|
|
6220
|
+
endSeq: null,
|
|
6221
|
+
state: "running",
|
|
6222
|
+
checkpoint: false,
|
|
6223
|
+
headerSeq: null,
|
|
6224
|
+
requestRoute: null,
|
|
6225
|
+
step: null,
|
|
6226
|
+
request: "idle"
|
|
6227
|
+
} : null
|
|
6228
|
+
};
|
|
6229
|
+
}
|
|
6230
|
+
if (event.type === "step/start" && state.compaction?.state === "completed" && state.compaction.endSeq !== null && count$2.safeParse(event.seq).success && Number(event.seq) > state.compaction.endSeq) {
|
|
6231
|
+
const step = compactionSchema.shape.step.safeParse({
|
|
6232
|
+
turn: event.data.turn,
|
|
6233
|
+
step: event.data.step
|
|
6234
|
+
});
|
|
6235
|
+
return {
|
|
6236
|
+
...state,
|
|
6237
|
+
compaction: {
|
|
6238
|
+
...state.compaction,
|
|
6239
|
+
step: step.success ? step.data : null,
|
|
6240
|
+
headerSeq: step.success ? count$2.parse(event.seq) : null,
|
|
6241
|
+
requestRoute: state.route,
|
|
6242
|
+
request: step.success && copilot(state.route) ? "pending" : "unknown"
|
|
6243
|
+
}
|
|
6244
|
+
};
|
|
6245
|
+
}
|
|
6246
|
+
if ((event.type === "step/end" || event.type === "turn/end") && state.compaction?.request === "pending" && event.data.turn === state.compaction.step?.turn && (event.type === "turn/end" || event.data.step === state.compaction.step?.step)) state = {
|
|
6247
|
+
...state,
|
|
6248
|
+
compaction: {
|
|
6249
|
+
...state.compaction,
|
|
6250
|
+
request: "unknown"
|
|
6251
|
+
}
|
|
6252
|
+
};
|
|
6253
|
+
if ((event.type === "step/end" || event.type === "turn/end") && event.data.turn === state.activeStep?.turn && (event.type === "turn/end" || event.data.step === state.activeStep?.step)) return {
|
|
6254
|
+
...state,
|
|
6255
|
+
activeStep: null
|
|
6256
|
+
};
|
|
6257
|
+
const operation = state.compaction;
|
|
6258
|
+
if (operation?.state === "running" && count$2.safeParse(event.seq).success && Number(event.seq) > operation.startSeq) {
|
|
6259
|
+
if (event.type === "user/message" && record$12(event.data.source) && event.data.source.kind === "compact-checkpoint" && event.data.source.compactionId === operation.id) state = {
|
|
6260
|
+
...state,
|
|
6261
|
+
compaction: {
|
|
6262
|
+
...operation,
|
|
6263
|
+
checkpoint: true
|
|
6264
|
+
}
|
|
6265
|
+
};
|
|
6266
|
+
if (event.type === "compaction/end" && event.data.compactionId === operation.id) state = {
|
|
6267
|
+
...state,
|
|
6268
|
+
compaction: {
|
|
6269
|
+
...operation,
|
|
6270
|
+
endSeq: count$2.parse(event.seq),
|
|
6271
|
+
state: event.data.error !== void 0 ? "failed" : operation.checkpoint ? "completed" : "unknown"
|
|
6272
|
+
}
|
|
6273
|
+
};
|
|
6274
|
+
}
|
|
6160
6275
|
if (event.type === "request/header" || event.type === "model/selection") {
|
|
6161
6276
|
const raw = event.type === "request/header" ? record$12(event.data.header) ? event.data.header.config : void 0 : event.data;
|
|
6277
|
+
const revoke = () => state.compaction ? {
|
|
6278
|
+
...state.compaction,
|
|
6279
|
+
headerSeq: null,
|
|
6280
|
+
requestRoute: null,
|
|
6281
|
+
step: null,
|
|
6282
|
+
request: "unknown"
|
|
6283
|
+
} : state.compaction;
|
|
6162
6284
|
if (!record$12(raw)) return {
|
|
6163
6285
|
...state,
|
|
6164
6286
|
route: null,
|
|
6165
6287
|
sample: null,
|
|
6166
6288
|
invalid: true,
|
|
6167
|
-
reason: "unknown"
|
|
6289
|
+
reason: "unknown",
|
|
6290
|
+
incident: null,
|
|
6291
|
+
compaction: revoke()
|
|
6168
6292
|
};
|
|
6169
6293
|
const parsed = routeSchema.safeParse({
|
|
6170
6294
|
provider: raw.provider,
|
|
@@ -6175,39 +6299,83 @@ function foldContextEvidence(state, event) {
|
|
|
6175
6299
|
route: null,
|
|
6176
6300
|
sample: null,
|
|
6177
6301
|
invalid: true,
|
|
6178
|
-
reason: "unknown"
|
|
6302
|
+
reason: "unknown",
|
|
6303
|
+
incident: null,
|
|
6304
|
+
compaction: revoke()
|
|
6179
6305
|
};
|
|
6180
6306
|
const route = parsed.data;
|
|
6307
|
+
const compact = state.compaction;
|
|
6308
|
+
if (compact?.state === "completed") {
|
|
6309
|
+
if (event.type === "request/header" && compact.endSeq !== null && count$2.safeParse(event.seq).success && Number(event.seq) > compact.endSeq && copilot(route)) state = {
|
|
6310
|
+
...state,
|
|
6311
|
+
compaction: {
|
|
6312
|
+
...compact,
|
|
6313
|
+
headerSeq: count$2.parse(event.seq),
|
|
6314
|
+
requestRoute: route,
|
|
6315
|
+
step: state.activeStep ?? null,
|
|
6316
|
+
request: "pending"
|
|
6317
|
+
}
|
|
6318
|
+
};
|
|
6319
|
+
else if (!sameRoute$1(state.route, route)) state = {
|
|
6320
|
+
...state,
|
|
6321
|
+
compaction: revoke()
|
|
6322
|
+
};
|
|
6323
|
+
}
|
|
6181
6324
|
if (sameRoute$1(state.route, route)) return state;
|
|
6182
6325
|
return {
|
|
6183
6326
|
...state,
|
|
6184
6327
|
route,
|
|
6185
6328
|
sample: null,
|
|
6186
|
-
|
|
6329
|
+
invalid: false,
|
|
6330
|
+
reason: "selection",
|
|
6331
|
+
incident: null
|
|
6187
6332
|
};
|
|
6188
6333
|
}
|
|
6189
6334
|
if (event.type.startsWith("compaction/") || event.surfaceOp !== void 0 && event.surfaceOp !== "append") {
|
|
6190
|
-
|
|
6335
|
+
const checkpoint = event.type === "user/message" && record$12(event.data.source) && event.data.source.kind === "compact-checkpoint" && event.data.source.compactionId === state.compaction?.id;
|
|
6191
6336
|
return {
|
|
6192
6337
|
...state,
|
|
6193
6338
|
sample: null,
|
|
6194
|
-
|
|
6339
|
+
invalid: false,
|
|
6340
|
+
reason: "compaction",
|
|
6341
|
+
incident: null,
|
|
6342
|
+
compaction: event.type.startsWith("compaction/") || checkpoint || !state.compaction ? state.compaction : {
|
|
6343
|
+
...state.compaction,
|
|
6344
|
+
request: "unknown",
|
|
6345
|
+
step: null,
|
|
6346
|
+
headerSeq: null,
|
|
6347
|
+
requestRoute: null
|
|
6348
|
+
}
|
|
6195
6349
|
};
|
|
6196
6350
|
}
|
|
6197
6351
|
if (event.type !== "assistant/message" && event.type !== "assistant/attempt") return state;
|
|
6198
6352
|
if (!copilot(state.route)) return state;
|
|
6199
|
-
|
|
6200
|
-
|
|
6353
|
+
const source = record$12(event.data.message) ? event.data.message.source : event.data.source;
|
|
6354
|
+
if (event.type === "assistant/message" && source !== void 0) {
|
|
6201
6355
|
const parsed = routeSchema.safeParse(record$12(source) ? {
|
|
6202
6356
|
provider: source.provider,
|
|
6203
6357
|
model: source.model
|
|
6204
6358
|
} : source);
|
|
6205
|
-
if (!parsed.success || !sameRoute$1(state.route, parsed.data))
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6359
|
+
if (!parsed.success || !sameRoute$1(state.route, parsed.data)) {
|
|
6360
|
+
const seq = count$2.safeParse(event.seq);
|
|
6361
|
+
return {
|
|
6362
|
+
...state,
|
|
6363
|
+
sample: null,
|
|
6364
|
+
invalid: true,
|
|
6365
|
+
reason: seq.success ? "invalid-sample" : "unknown",
|
|
6366
|
+
incident: seq.success ? {
|
|
6367
|
+
kind: "invalid-sample",
|
|
6368
|
+
seq: seq.data
|
|
6369
|
+
} : null,
|
|
6370
|
+
compaction: state.compaction ? {
|
|
6371
|
+
...state.compaction,
|
|
6372
|
+
request: "unknown",
|
|
6373
|
+
step: null,
|
|
6374
|
+
headerSeq: null,
|
|
6375
|
+
requestRoute: null
|
|
6376
|
+
} : state.compaction
|
|
6377
|
+
};
|
|
6378
|
+
}
|
|
6211
6379
|
}
|
|
6212
6380
|
const stream = Array.isArray(event.data.stream) ? event.data.stream : [];
|
|
6213
6381
|
let usage = event.type === "assistant/message" ? event.data.usage : void 0;
|
|
@@ -6218,31 +6386,62 @@ function foldContextEvidence(state, event) {
|
|
|
6218
6386
|
if (!settledUsage && entry.chunk.type === "usage") usage = entry.chunk.usage;
|
|
6219
6387
|
if (entry.chunk.type === "finish") terminal = entry.chunk.reason;
|
|
6220
6388
|
}
|
|
6389
|
+
const successful = event.data.interrupted !== true && record$12(terminal) && (terminal.kind === "stop" || terminal.kind === "max-tokens" || terminal.kind === "tool-calls");
|
|
6390
|
+
const compact = state.compaction;
|
|
6391
|
+
if (compact?.state === "completed") {
|
|
6392
|
+
if (compact.headerSeq === null || !count$2.safeParse(event.seq).success || Number(event.seq) <= compact.headerSeq) return state;
|
|
6393
|
+
if (!sameRoute$1(compact.requestRoute, state.route)) return state;
|
|
6394
|
+
if (compact.step === null) return {
|
|
6395
|
+
...state,
|
|
6396
|
+
compaction: {
|
|
6397
|
+
...compact,
|
|
6398
|
+
request: "unknown"
|
|
6399
|
+
}
|
|
6400
|
+
};
|
|
6401
|
+
if (event.data.turn !== compact.step.turn || event.data.step !== compact.step.step) return state;
|
|
6402
|
+
state = {
|
|
6403
|
+
...state,
|
|
6404
|
+
compaction: {
|
|
6405
|
+
...compact,
|
|
6406
|
+
request: event.type === "assistant/message" && successful && source !== void 0 ? "succeeded" : record$12(terminal) && terminal.kind === "aborted" ? "cancelled" : record$12(terminal) && terminal.kind === "error" ? "failed" : "unknown"
|
|
6407
|
+
}
|
|
6408
|
+
};
|
|
6409
|
+
} else if (compact?.state === "running") return state;
|
|
6221
6410
|
if (usage === void 0) return state;
|
|
6222
6411
|
const parsed = usageSchema.safeParse(usage);
|
|
6223
|
-
if (!parsed.success || !count$2.safeParse(event.seq).success)
|
|
6224
|
-
|
|
6225
|
-
sample: null,
|
|
6226
|
-
invalid: true,
|
|
6227
|
-
reason: "unknown"
|
|
6228
|
-
};
|
|
6229
|
-
const value = parsed.data;
|
|
6230
|
-
const zero = isZeroContextUsage(value);
|
|
6231
|
-
const successful = record$12(terminal) && (terminal.kind === "stop" || terminal.kind === "max-tokens" || terminal.kind === "tool-calls");
|
|
6232
|
-
if (zero && !successful) {
|
|
6233
|
-
const reason = state.sample !== null || state.reason === "none" ? "failed-zero" : state.reason;
|
|
6412
|
+
if (!parsed.success || !count$2.safeParse(event.seq).success) {
|
|
6413
|
+
const seq = count$2.safeParse(event.seq);
|
|
6234
6414
|
return {
|
|
6235
6415
|
...state,
|
|
6416
|
+
sample: null,
|
|
6236
6417
|
invalid: true,
|
|
6237
|
-
reason
|
|
6418
|
+
reason: seq.success ? "invalid-sample" : "unknown",
|
|
6419
|
+
incident: seq.success ? {
|
|
6420
|
+
kind: "invalid-sample",
|
|
6421
|
+
seq: seq.data
|
|
6422
|
+
} : null
|
|
6238
6423
|
};
|
|
6239
6424
|
}
|
|
6425
|
+
const value = parsed.data;
|
|
6426
|
+
if (isZeroContextUsage(value) && !successful) return {
|
|
6427
|
+
...state,
|
|
6428
|
+
invalid: true,
|
|
6429
|
+
reason: "failed-zero",
|
|
6430
|
+
incident: {
|
|
6431
|
+
kind: "failed-zero",
|
|
6432
|
+
seq: count$2.parse(event.seq)
|
|
6433
|
+
}
|
|
6434
|
+
};
|
|
6240
6435
|
const tokens = value.inputTokens + (value.cacheReadTokens ?? 0) + (value.cacheWriteTokens ?? 0);
|
|
6241
6436
|
if (!Number.isSafeInteger(tokens) || state.route === null) return {
|
|
6242
6437
|
...state,
|
|
6243
6438
|
sample: null,
|
|
6244
6439
|
invalid: true,
|
|
6245
|
-
reason: "
|
|
6440
|
+
reason: "invalid-sample",
|
|
6441
|
+
incident: {
|
|
6442
|
+
kind: "invalid-sample",
|
|
6443
|
+
seq: count$2.parse(event.seq)
|
|
6444
|
+
}
|
|
6246
6445
|
};
|
|
6247
6446
|
return {
|
|
6248
6447
|
...state,
|
|
@@ -6252,13 +6451,14 @@ function foldContextEvidence(state, event) {
|
|
|
6252
6451
|
route: state.route
|
|
6253
6452
|
},
|
|
6254
6453
|
invalid: false,
|
|
6255
|
-
reason: "none"
|
|
6454
|
+
reason: "none",
|
|
6455
|
+
incident: null
|
|
6256
6456
|
};
|
|
6257
6457
|
}
|
|
6258
6458
|
/** Separate bounded replay unit; never register under or modify a Core key. */
|
|
6259
6459
|
const contextEvidenceDefinition = {
|
|
6260
6460
|
key: COPILOT_CONTEXT_EVIDENCE,
|
|
6261
|
-
stateVersion:
|
|
6461
|
+
stateVersion: 3,
|
|
6262
6462
|
stateSchema: ContextEvidenceSchema,
|
|
6263
6463
|
init: initialContextEvidence,
|
|
6264
6464
|
apply: foldContextEvidence,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
1
2
|
import type { SessionContinuationRemote } from './session-continuation-ui.ts';
|
|
2
3
|
import type { CompactionContinuationStatus } from './session-continuation-types.ts';
|
|
3
4
|
type NoticeState = CompactionContinuationStatus['state'] | 'unavailable';
|
|
@@ -16,15 +17,13 @@ export declare class CompactionNoticePresentation {
|
|
|
16
17
|
dismiss(sessionId: string, id: string, state: NoticeState): void;
|
|
17
18
|
dispose(): void;
|
|
18
19
|
}
|
|
19
|
-
export declare function CompactionContinuationNotice({ sessionId, remote, lifecycle, locale, presentation: sharedPresentation }: {
|
|
20
|
+
export declare function CompactionContinuationNotice({ sessionId, remote, lifecycle, locale, renderEvidence, presentation: sharedPresentation }: {
|
|
20
21
|
sessionId: string;
|
|
21
22
|
remote?: SessionContinuationRemote;
|
|
22
23
|
lifecycle: unknown;
|
|
23
24
|
locale?: string;
|
|
24
25
|
presentation?: CompactionNoticePresentation;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
style: import("react").CSSProperties;
|
|
28
|
-
}, HTMLElement> | null;
|
|
26
|
+
renderEvidence?: (status?: CompactionContinuationStatus, controls?: ReactElement | null, transient?: boolean) => ReactElement | null;
|
|
27
|
+
}): ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
|
|
29
28
|
export {};
|
|
30
29
|
//# sourceMappingURL=compaction-continuation-ui.d.ts.map
|
|
@@ -1,10 +1,27 @@
|
|
|
1
1
|
import type { Context } from '@deepseek-ai/cordis';
|
|
2
2
|
import type { ReactElement } from 'react';
|
|
3
3
|
import type { ContextEvidence } from './context-evidence.ts';
|
|
4
|
-
|
|
4
|
+
import type { CompactionContinuationStatus } from './session-continuation-types.ts';
|
|
5
|
+
export declare class ContextIncidentPresentation {
|
|
6
|
+
private dismissed;
|
|
7
|
+
private listeners;
|
|
8
|
+
private version;
|
|
9
|
+
subscribe: (listener: () => void) => () => void;
|
|
10
|
+
snapshot: () => number;
|
|
11
|
+
private key;
|
|
12
|
+
visible(sessionId: string, incident: NonNullable<ContextEvidence['incident']>): boolean;
|
|
13
|
+
dismiss(sessionId: string, incident: NonNullable<ContextEvidence['incident']>): void;
|
|
14
|
+
dispose(): void;
|
|
15
|
+
}
|
|
16
|
+
export declare function ContextEvidenceNotice({ evidence, locale, applicable, compactionStatus, showCompactionResult, controls, sessionId, presentation }: {
|
|
5
17
|
evidence: ContextEvidence | undefined;
|
|
6
18
|
locale?: string;
|
|
7
19
|
applicable?: boolean;
|
|
20
|
+
compactionStatus?: CompactionContinuationStatus;
|
|
21
|
+
showCompactionResult?: boolean;
|
|
22
|
+
controls?: ReactElement | null;
|
|
23
|
+
sessionId?: string;
|
|
24
|
+
presentation?: ContextIncidentPresentation;
|
|
8
25
|
}): ReactElement | null;
|
|
9
26
|
/** Additive disclosure only: native input, context ring and billing remain untouched. */
|
|
10
27
|
export declare function registerContextEvidenceUi(ctx: Context): () => void;
|
|
@@ -20,8 +20,49 @@ export declare const ContextEvidenceSchema: z.ZodObject<{
|
|
|
20
20
|
compaction: "compaction";
|
|
21
21
|
unknown: "unknown";
|
|
22
22
|
"failed-zero": "failed-zero";
|
|
23
|
+
"invalid-sample": "invalid-sample";
|
|
23
24
|
selection: "selection";
|
|
24
25
|
}>;
|
|
26
|
+
incident: z.ZodNullable<z.ZodObject<{
|
|
27
|
+
kind: z.ZodEnum<{
|
|
28
|
+
"failed-zero": "failed-zero";
|
|
29
|
+
"invalid-sample": "invalid-sample";
|
|
30
|
+
}>;
|
|
31
|
+
seq: z.ZodNumber;
|
|
32
|
+
}, z.core.$strict>>;
|
|
33
|
+
compaction: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
34
|
+
id: z.ZodString;
|
|
35
|
+
startSeq: z.ZodNumber;
|
|
36
|
+
endSeq: z.ZodNullable<z.ZodNumber>;
|
|
37
|
+
state: z.ZodEnum<{
|
|
38
|
+
running: "running";
|
|
39
|
+
unknown: "unknown";
|
|
40
|
+
failed: "failed";
|
|
41
|
+
completed: "completed";
|
|
42
|
+
}>;
|
|
43
|
+
checkpoint: z.ZodBoolean;
|
|
44
|
+
headerSeq: z.ZodNullable<z.ZodNumber>;
|
|
45
|
+
requestRoute: z.ZodNullable<z.ZodObject<{
|
|
46
|
+
provider: z.ZodString;
|
|
47
|
+
model: z.ZodString;
|
|
48
|
+
}, z.core.$strict>>;
|
|
49
|
+
step: z.ZodNullable<z.ZodObject<{
|
|
50
|
+
turn: z.ZodNumber;
|
|
51
|
+
step: z.ZodNumber;
|
|
52
|
+
}, z.core.$strict>>;
|
|
53
|
+
request: z.ZodEnum<{
|
|
54
|
+
unknown: "unknown";
|
|
55
|
+
cancelled: "cancelled";
|
|
56
|
+
failed: "failed";
|
|
57
|
+
pending: "pending";
|
|
58
|
+
idle: "idle";
|
|
59
|
+
succeeded: "succeeded";
|
|
60
|
+
}>;
|
|
61
|
+
}, z.core.$strict>>>;
|
|
62
|
+
activeStep: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
63
|
+
turn: z.ZodNumber;
|
|
64
|
+
step: z.ZodNumber;
|
|
65
|
+
}, z.core.$strict>>>;
|
|
25
66
|
}, z.core.$strict>;
|
|
26
67
|
export type ContextEvidence = z.infer<typeof ContextEvidenceSchema>;
|
|
27
68
|
declare module '@deepseek-ai/dsh-session-projection/types' {
|
|
@@ -58,8 +99,49 @@ export declare const contextEvidenceDefinition: {
|
|
|
58
99
|
compaction: "compaction";
|
|
59
100
|
unknown: "unknown";
|
|
60
101
|
"failed-zero": "failed-zero";
|
|
102
|
+
"invalid-sample": "invalid-sample";
|
|
61
103
|
selection: "selection";
|
|
62
104
|
}>;
|
|
105
|
+
incident: z.ZodNullable<z.ZodObject<{
|
|
106
|
+
kind: z.ZodEnum<{
|
|
107
|
+
"failed-zero": "failed-zero";
|
|
108
|
+
"invalid-sample": "invalid-sample";
|
|
109
|
+
}>;
|
|
110
|
+
seq: z.ZodNumber;
|
|
111
|
+
}, z.core.$strict>>;
|
|
112
|
+
compaction: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
113
|
+
id: z.ZodString;
|
|
114
|
+
startSeq: z.ZodNumber;
|
|
115
|
+
endSeq: z.ZodNullable<z.ZodNumber>;
|
|
116
|
+
state: z.ZodEnum<{
|
|
117
|
+
running: "running";
|
|
118
|
+
unknown: "unknown";
|
|
119
|
+
failed: "failed";
|
|
120
|
+
completed: "completed";
|
|
121
|
+
}>;
|
|
122
|
+
checkpoint: z.ZodBoolean;
|
|
123
|
+
headerSeq: z.ZodNullable<z.ZodNumber>;
|
|
124
|
+
requestRoute: z.ZodNullable<z.ZodObject<{
|
|
125
|
+
provider: z.ZodString;
|
|
126
|
+
model: z.ZodString;
|
|
127
|
+
}, z.core.$strict>>;
|
|
128
|
+
step: z.ZodNullable<z.ZodObject<{
|
|
129
|
+
turn: z.ZodNumber;
|
|
130
|
+
step: z.ZodNumber;
|
|
131
|
+
}, z.core.$strict>>;
|
|
132
|
+
request: z.ZodEnum<{
|
|
133
|
+
unknown: "unknown";
|
|
134
|
+
cancelled: "cancelled";
|
|
135
|
+
failed: "failed";
|
|
136
|
+
pending: "pending";
|
|
137
|
+
idle: "idle";
|
|
138
|
+
succeeded: "succeeded";
|
|
139
|
+
}>;
|
|
140
|
+
}, z.core.$strict>>>;
|
|
141
|
+
activeStep: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
142
|
+
turn: z.ZodNumber;
|
|
143
|
+
step: z.ZodNumber;
|
|
144
|
+
}, z.core.$strict>>>;
|
|
63
145
|
}, z.core.$strict>;
|
|
64
146
|
init: typeof initialContextEvidence;
|
|
65
147
|
apply: typeof foldContextEvidence;
|
|
@@ -83,8 +165,49 @@ export declare const contextEvidenceDefinition: {
|
|
|
83
165
|
compaction: "compaction";
|
|
84
166
|
unknown: "unknown";
|
|
85
167
|
"failed-zero": "failed-zero";
|
|
168
|
+
"invalid-sample": "invalid-sample";
|
|
86
169
|
selection: "selection";
|
|
87
170
|
}>;
|
|
171
|
+
incident: z.ZodNullable<z.ZodObject<{
|
|
172
|
+
kind: z.ZodEnum<{
|
|
173
|
+
"failed-zero": "failed-zero";
|
|
174
|
+
"invalid-sample": "invalid-sample";
|
|
175
|
+
}>;
|
|
176
|
+
seq: z.ZodNumber;
|
|
177
|
+
}, z.core.$strict>>;
|
|
178
|
+
compaction: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
179
|
+
id: z.ZodString;
|
|
180
|
+
startSeq: z.ZodNumber;
|
|
181
|
+
endSeq: z.ZodNullable<z.ZodNumber>;
|
|
182
|
+
state: z.ZodEnum<{
|
|
183
|
+
running: "running";
|
|
184
|
+
unknown: "unknown";
|
|
185
|
+
failed: "failed";
|
|
186
|
+
completed: "completed";
|
|
187
|
+
}>;
|
|
188
|
+
checkpoint: z.ZodBoolean;
|
|
189
|
+
headerSeq: z.ZodNullable<z.ZodNumber>;
|
|
190
|
+
requestRoute: z.ZodNullable<z.ZodObject<{
|
|
191
|
+
provider: z.ZodString;
|
|
192
|
+
model: z.ZodString;
|
|
193
|
+
}, z.core.$strict>>;
|
|
194
|
+
step: z.ZodNullable<z.ZodObject<{
|
|
195
|
+
turn: z.ZodNumber;
|
|
196
|
+
step: z.ZodNumber;
|
|
197
|
+
}, z.core.$strict>>;
|
|
198
|
+
request: z.ZodEnum<{
|
|
199
|
+
unknown: "unknown";
|
|
200
|
+
cancelled: "cancelled";
|
|
201
|
+
failed: "failed";
|
|
202
|
+
pending: "pending";
|
|
203
|
+
idle: "idle";
|
|
204
|
+
succeeded: "succeeded";
|
|
205
|
+
}>;
|
|
206
|
+
}, z.core.$strict>>>;
|
|
207
|
+
activeStep: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
208
|
+
turn: z.ZodNumber;
|
|
209
|
+
step: z.ZodNumber;
|
|
210
|
+
}, z.core.$strict>>>;
|
|
88
211
|
}, z.core.$strict>;
|
|
89
212
|
view: (state: ContextEvidence) => {
|
|
90
213
|
route: {
|
|
@@ -100,7 +223,32 @@ export declare const contextEvidenceDefinition: {
|
|
|
100
223
|
};
|
|
101
224
|
} | null;
|
|
102
225
|
invalid: boolean;
|
|
103
|
-
reason: "none" | "compaction" | "unknown" | "failed-zero" | "selection";
|
|
226
|
+
reason: "none" | "compaction" | "unknown" | "failed-zero" | "invalid-sample" | "selection";
|
|
227
|
+
incident: {
|
|
228
|
+
kind: "failed-zero" | "invalid-sample";
|
|
229
|
+
seq: number;
|
|
230
|
+
} | null;
|
|
231
|
+
compaction?: {
|
|
232
|
+
id: string;
|
|
233
|
+
startSeq: number;
|
|
234
|
+
endSeq: number | null;
|
|
235
|
+
state: "running" | "unknown" | "failed" | "completed";
|
|
236
|
+
checkpoint: boolean;
|
|
237
|
+
headerSeq: number | null;
|
|
238
|
+
requestRoute: {
|
|
239
|
+
provider: string;
|
|
240
|
+
model: string;
|
|
241
|
+
} | null;
|
|
242
|
+
step: {
|
|
243
|
+
turn: number;
|
|
244
|
+
step: number;
|
|
245
|
+
} | null;
|
|
246
|
+
request: "unknown" | "cancelled" | "failed" | "pending" | "idle" | "succeeded";
|
|
247
|
+
} | null | undefined;
|
|
248
|
+
activeStep?: {
|
|
249
|
+
turn: number;
|
|
250
|
+
step: number;
|
|
251
|
+
} | null | undefined;
|
|
104
252
|
};
|
|
105
253
|
};
|
|
106
254
|
};
|
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.129",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
7
7
|
"registry": "https://registry.npmjs.org/",
|