@cartanova/qgrid-cli 2.11.0 → 2.12.0
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/bundle/dist/application/qgrid/qgrid-response-format.js +9 -1
- package/bundle/dist/application/qgrid/qgrid-run-lifecycle.js +28 -4
- package/bundle/dist/application/qgrid/qgrid.dispatcher.js +7 -4
- package/bundle/dist/application/qgrid/qgrid.frame.js +25 -4
- package/bundle/dist/application/request-log/request-log.model.js +5 -1
- package/bundle/dist/utils/providers/anthropic/anthropic-dispatcher.js +7 -2
- package/bundle/dist/utils/providers/anthropic/claude-session.js +10 -2
- package/bundle/dist/utils/providers/grok/grok-backend-protocol.js +1 -1
- package/bundle/dist/utils/providers/grok/grok-dispatcher.js +43 -12
- package/bundle/dist/utils/providers/grok/grok-types.js +2 -2
- package/bundle/dist/utils/providers/openai/openai-dispatcher.js +9 -3
- package/bundle/src/application/qgrid/qgrid-response-format.ts +9 -0
- package/bundle/src/application/qgrid/qgrid-run-lifecycle.test.ts +63 -0
- package/bundle/src/application/qgrid/qgrid-run-lifecycle.ts +49 -7
- package/bundle/src/application/qgrid/qgrid.dispatcher.ts +6 -0
- package/bundle/src/application/qgrid/qgrid.frame.test.ts +9 -2
- package/bundle/src/application/qgrid/qgrid.frame.ts +39 -3
- package/bundle/src/application/request-log/request-log.model.ts +11 -0
- package/bundle/src/utils/providers/anthropic/anthropic-dispatcher.ts +2 -0
- package/bundle/src/utils/providers/anthropic/claude-session.ts +15 -1
- package/bundle/src/utils/providers/common/provider-dispatcher.ts +10 -0
- package/bundle/src/utils/providers/grok/grok-backend-protocol.ts +6 -1
- package/bundle/src/utils/providers/grok/grok-dispatcher.test.ts +74 -3
- package/bundle/src/utils/providers/grok/grok-dispatcher.ts +66 -18
- package/bundle/src/utils/providers/grok/grok-quota.test.ts +18 -0
- package/bundle/src/utils/providers/grok/grok-types.ts +2 -1
- package/bundle/src/utils/providers/openai/openai-dispatcher.test.ts +18 -0
- package/bundle/src/utils/providers/openai/openai-dispatcher.ts +10 -2
- package/bundle/web-dist/client/assets/index-CK9LwGNV.js +32 -0
- package/bundle/web-dist/client/assets/logs-DjQcEivP.js +1 -0
- package/bundle/web-dist/client/assets/monit-RTxpU7oZ.js +1 -0
- package/bundle/web-dist/client/assets/plus-DDvVTvQP.js +1 -0
- package/bundle/web-dist/client/assets/refresh-cw-CTQsNddA.js +1 -0
- package/bundle/web-dist/client/assets/request-model-DliRuPcw.js +1 -0
- package/bundle/web-dist/client/assets/routes-DVHoo-YF.js +5 -0
- package/bundle/web-dist/client/assets/{services.generated-CefiDXEv.js → services.generated-B5lc3aIC.js} +1 -1
- package/bundle/web-dist/client/assets/settings-BQUz6UFr.js +1 -0
- package/bundle/web-dist/client/assets/show-CalQG1Ew.js +2 -0
- package/bundle/web-dist/client/assets/tokens-DU4fWXI9.js +1 -0
- package/bundle/web-dist/client/assets/use-oauth-login-flow-BfxYI4Oh.js +1 -0
- package/bundle/web-dist/client/assets/use-update-token-mutation-qKBC2sn7.js +1 -0
- package/bundle/web-dist/client/assets/vendor-react-DH4kUfK2.js +9 -0
- package/bundle/web-dist/client/assets/vendor-tanstack-DRPs09ai.js +1 -0
- package/bundle/web-dist/client/index.html +4 -4
- package/bundle/web-dist/server/assets/{lazyRouteComponent-D8iTIHyn.js → lazyRouteComponent-AKiHfZWp.js} +2 -2
- package/bundle/web-dist/server/assets/logs-B5M5B7pN.js +531 -0
- package/bundle/web-dist/server/assets/{monit-B2hqorPe.js → monit-p6JM8MMl.js} +117 -375
- package/bundle/web-dist/server/assets/plus-I0FfLVgU.js +19 -0
- package/bundle/web-dist/server/assets/{react-dom-BIYQzBqG.js → react-dom-Cv23mm1K.js} +1 -1
- package/bundle/web-dist/server/assets/refresh-cw-DYsnffRC.js +23 -0
- package/bundle/web-dist/server/assets/{request-model-I6OdODSH.js → request-model-Cp6h5EuP.js} +7 -16
- package/bundle/web-dist/server/assets/{routes-B95YlUv2.js → routes-rIXpkI-t.js} +200 -691
- package/bundle/web-dist/server/assets/{services.generated-DQATJ6qf.js → services.generated-CMJ8AHbO.js} +3796 -4012
- package/bundle/web-dist/server/assets/settings-_MoaFGxj.js +461 -0
- package/bundle/web-dist/server/assets/{show-Bxaj3rhH.js → show-Cfm9UeDr.js} +375 -1271
- package/bundle/web-dist/server/assets/tokens-DMSHDg9D.js +560 -0
- package/bundle/web-dist/server/assets/{use-oauth-login-flow-CKDHgc3U.js → use-oauth-login-flow-jkAkT3X6.js} +16 -50
- package/bundle/web-dist/server/assets/{use-update-token-mutation-BEbgOzaa.js → use-update-token-mutation-Sm6kh02m.js} +1 -1
- package/bundle/web-dist/server/entry-server.generated.js +1177 -2657
- package/package.json +1 -1
- package/skills/qgrid/references/ai-sdk-provider-contract.md +1 -1
- package/skills/qgrid/references/cli-env-and-server-boot.md +4 -3
- package/skills/qgrid/references/decision-rationale.md +2 -1
- package/skills/qgrid/references/grok-runtime.md +7 -1
- package/skills/qgrid/references/repo-map.md +2 -0
- package/skills/qgrid/references/request-log-run-lifecycle.md +5 -0
- package/skills/qgrid/references/verification-and-debugging.md +24 -5
- package/bundle/web-dist/client/assets/index-BA7uQ-6c.js +0 -31
- package/bundle/web-dist/client/assets/logs-C47OJGEI.js +0 -1
- package/bundle/web-dist/client/assets/monit-BS9no0dU.js +0 -4
- package/bundle/web-dist/client/assets/plus-sdACTfH0.js +0 -1
- package/bundle/web-dist/client/assets/refresh-cw-CY8o_1cT.js +0 -1
- package/bundle/web-dist/client/assets/request-model-BRtFuZvj.js +0 -1
- package/bundle/web-dist/client/assets/routes-kqgkUxE8.js +0 -5
- package/bundle/web-dist/client/assets/settings-DNDvFGSw.js +0 -1
- package/bundle/web-dist/client/assets/show-u8Np69q3.js +0 -2
- package/bundle/web-dist/client/assets/tokens-QvP410NW.js +0 -1
- package/bundle/web-dist/client/assets/total-cost-MnfKU8IN.js +0 -1
- package/bundle/web-dist/client/assets/use-oauth-login-flow-Bzdh28Ws.js +0 -1
- package/bundle/web-dist/client/assets/use-update-token-mutation-CfJKaxmR.js +0 -1
- package/bundle/web-dist/client/assets/vendor-react-CUFFrVN9.js +0 -244
- package/bundle/web-dist/client/assets/vendor-tanstack-Bf_jag9G.js +0 -1
- package/bundle/web-dist/server/assets/logs-B3OTd9hy.js +0 -825
- package/bundle/web-dist/server/assets/plus-DwG7h9kq.js +0 -28
- package/bundle/web-dist/server/assets/refresh-cw-mMBkwOq0.js +0 -44
- package/bundle/web-dist/server/assets/settings-C3gbGk0m.js +0 -830
- package/bundle/web-dist/server/assets/tokens-CZjH3cB7.js +0 -1038
- package/bundle/web-dist/server/assets/total-cost-fTE9Xy82.js +0 -18
|
@@ -385,6 +385,24 @@ describe("OpenAIDispatcher direct runtime", () => {
|
|
|
385
385
|
expect(complete).toHaveBeenCalledWith(expect.objectContaining({ text: "ab" }));
|
|
386
386
|
});
|
|
387
387
|
|
|
388
|
+
it("reports the selected token and the first-delta TTFT as progress before completing", async () => {
|
|
389
|
+
const d = dispatcher(() =>
|
|
390
|
+
events(
|
|
391
|
+
{ type: "text-delta", text: "a" },
|
|
392
|
+
{ type: "text-delta", text: "b" },
|
|
393
|
+
{ type: "completed", responseId: "r" },
|
|
394
|
+
),
|
|
395
|
+
);
|
|
396
|
+
await d.onTokenAdded(1, "one", credentials);
|
|
397
|
+
const progress = vi.fn();
|
|
398
|
+
|
|
399
|
+
await d.generate(request({ onProgress: progress }));
|
|
400
|
+
|
|
401
|
+
expect(progress).toHaveBeenNthCalledWith(1, { tokenName: "one" });
|
|
402
|
+
expect(progress).toHaveBeenNthCalledWith(2, { ttftMs: expect.any(Number) });
|
|
403
|
+
expect(progress).toHaveBeenCalledTimes(2);
|
|
404
|
+
});
|
|
405
|
+
|
|
388
406
|
it("still rejects an upstream failure after accepting a completed output message", async () => {
|
|
389
407
|
const failure = new Error("upstream failed after tool request");
|
|
390
408
|
const d = dispatcher(() => events(
|
|
@@ -456,6 +456,14 @@ export class OpenAIDispatcher implements ProviderDispatcher {
|
|
|
456
456
|
const startedAt = Date.now();
|
|
457
457
|
let firstDeltaAt: number | undefined;
|
|
458
458
|
let text = "";
|
|
459
|
+
req.onProgress?.({ tokenName: selection.metadata.name });
|
|
460
|
+
|
|
461
|
+
const markFirstDelta = () => {
|
|
462
|
+
if (firstDeltaAt !== undefined) return;
|
|
463
|
+
firstDeltaAt = Date.now();
|
|
464
|
+
req.onProgress?.({ ttftMs: firstDeltaAt - startedAt });
|
|
465
|
+
};
|
|
466
|
+
|
|
459
467
|
let outputMessageAccepted = false;
|
|
460
468
|
const messagePhases = new Map<string, string>();
|
|
461
469
|
const streamedMessageIds = new Set<string>();
|
|
@@ -528,7 +536,7 @@ export class OpenAIDispatcher implements ProviderDispatcher {
|
|
|
528
536
|
streamedMessageIds.add(event.itemId);
|
|
529
537
|
}
|
|
530
538
|
|
|
531
|
-
|
|
539
|
+
markFirstDelta();
|
|
532
540
|
text += event.text;
|
|
533
541
|
onDelta?.(event.text);
|
|
534
542
|
} else if (
|
|
@@ -562,7 +570,7 @@ export class OpenAIDispatcher implements ProviderDispatcher {
|
|
|
562
570
|
(phase !== "commentary" || outputMessageAccepted) &&
|
|
563
571
|
messageText
|
|
564
572
|
) {
|
|
565
|
-
|
|
573
|
+
markFirstDelta();
|
|
566
574
|
text += messageText;
|
|
567
575
|
onDelta?.(messageText);
|
|
568
576
|
streamedMessageIds.add(itemId);
|