codex-toys 0.140.11 → 0.140.13
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/README.md +35 -15
- package/dist/cli/actions.d.ts +1 -1
- package/dist/cli/actions.d.ts.map +1 -1
- package/dist/cli/actions.js +1 -0
- package/dist/cli/actions.js.map +1 -1
- package/dist/cli/args.d.ts +25 -20
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +67 -33
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +18 -16
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/index.js +68 -57
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/toybox.js +3 -3
- package/dist/internal/feed/index.d.ts +26 -1
- package/dist/internal/feed/index.d.ts.map +1 -1
- package/dist/internal/feed/index.js +102 -1
- package/dist/internal/feed/index.js.map +1 -1
- package/dist/internal/package.json +5 -0
- package/dist/internal/workbench/{deferred-run-methods.d.ts → dispatch-run-methods.d.ts} +12 -12
- package/dist/internal/workbench/{deferred-run-methods.d.ts.map → dispatch-run-methods.d.ts.map} +1 -1
- package/dist/internal/workbench/{deferred-run-methods.js → dispatch-run-methods.js} +61 -61
- package/dist/internal/workbench/{deferred-run-methods.js.map → dispatch-run-methods.js.map} +1 -1
- package/dist/internal/workbench/fetch.js +1 -1
- package/dist/internal/workbench/fetch.js.map +1 -1
- package/dist/internal/workbench/index.d.ts +1 -1
- package/dist/internal/workbench/index.js +1 -1
- package/dist/internal/workbench/workbench-overview.d.ts +9 -9
- package/dist/internal/workbench/workbench-overview.js +12 -12
- package/dist/internal/workbench/workbench-runtime.d.ts +75 -120
- package/dist/internal/workbench/workbench-runtime.d.ts.map +1 -1
- package/dist/internal/workbench/workbench-runtime.js +293 -621
- package/dist/internal/workbench/workbench-runtime.js.map +1 -1
- package/dist/internal/workbench/workflow.d.ts.map +1 -1
- package/dist/internal/workbench/workflow.js +106 -11
- package/dist/internal/workbench/workflow.js.map +1 -1
- package/docs/pages/{reference → components}/cli.md +13 -14
- package/docs/pages/{primitives → components}/toybox.md +4 -4
- package/docs/pages/guides/capability-kit-setup.md +135 -0
- package/docs/pages/guides/dashboard-over-toybox.md +145 -0
- package/docs/pages/guides/delegated-repo-work.md +119 -0
- package/docs/pages/guides/feed-to-workflow.md +138 -0
- package/docs/pages/guides/local-scheduled-workbench.md +149 -0
- package/docs/pages/guides/remote-codex-workbench.md +147 -0
- package/docs/pages/guides/repository-autonomy.md +163 -0
- package/docs/pages/index.md +35 -11
- package/docs/pages/primitives/{deferred-queues.md → dispatch-queues.md} +21 -21
- package/docs/pages/primitives/feed.md +18 -9
- package/docs/pages/primitives/workbench.md +26 -21
- package/docs/pages/primitives/workflow.md +6 -5
- package/docs/pages/reference/packages.md +14 -2
- package/package.json +1 -1
- /package/docs/pages/{primitives → components}/kits.md +0 -0
- /package/docs/pages/{primitives → components}/proxy.md +0 -0
package/dist/cli/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { APP_CALL_METHOD, TOYBOX_INITIALIZE_METHOD, } from "../internal/toybox/i
|
|
|
4
4
|
import { COMMON_APP_SERVER_ACTIONS, COMMON_TOYBOX_METHODS, } from "./actions.js";
|
|
5
5
|
import { cleanupActionsCodexHome, prepareActionsCodexAuth, } from "../internal/actions/index.js";
|
|
6
6
|
import { parseArgs, } from "./args.js";
|
|
7
|
-
import { collectFeedDoctorInfo, collectFeedItems, createFeedContext, dispatchFeedItems, advanceFeedCursor, FEED_COLLECT_METHOD, FEED_CURSOR_ADVANCE_METHOD, FEED_DISPATCH_METHOD, FEED_DOCTOR_METHOD, FEED_ITEM_LIST_METHOD, FEED_ITEM_READ_METHOD, FEED_POLL_METHOD, FEED_PRUNE_METHOD, FEED_SOURCE_LIST_METHOD, formatFeedDoctorInfo, listFeedItems, loadFeedConfig, pollFeedSources, pruneFeedItems, readFeedItem, toFeedEvent, } from "../internal/feed/index.js";
|
|
7
|
+
import { appendFeedItem, collectFeedDoctorInfo, collectFeedItems, createFeedContext, dispatchFeedItems, advanceFeedCursor, FEED_COLLECT_METHOD, FEED_CURSOR_ADVANCE_METHOD, FEED_DISPATCH_METHOD, FEED_DOCTOR_METHOD, FEED_ITEM_APPEND_METHOD, FEED_ITEM_LIST_METHOD, FEED_ITEM_READ_METHOD, FEED_POLL_METHOD, FEED_PRUNE_METHOD, FEED_SOURCE_LIST_METHOD, feedAppendItemOptionsFromParams, formatFeedDoctorInfo, listFeedItems, loadFeedConfig, pollFeedSources, pruneFeedItems, readFeedItem, toFeedEvent, } from "../internal/feed/index.js";
|
|
8
8
|
import { collectFetchInfo, formatFetchInfo, } from "../internal/workbench/index.js";
|
|
9
9
|
import { applyMemoryTransplant, formatMemoryTransplantPlan, } from "./memories.js";
|
|
10
10
|
import { applyKitAdd, collectKitDoctor, formatKitAddPlan, formatKitDoctor, formatKitInspection, formatKitList, inspectKitSource, listInstalledKits, planKitAdd, } from "../internal/kits/index.js";
|
|
@@ -19,7 +19,7 @@ import { WORKBENCH_FUNCTIONS_CALL_METHOD, WORKBENCH_FUNCTIONS_DESCRIBE_METHOD, W
|
|
|
19
19
|
import { WORKBENCH_OVERVIEW_METHOD, } from "../internal/workbench/index.js";
|
|
20
20
|
import { serveToybox } from "./toybox.js";
|
|
21
21
|
import { formatThreadRolloutInspection, formatThreadRolloutInstallation, formatThreadRolloutLocation, formatThreadRolloutTransplant, installThreadRollout, inspectThreadRollout, locateThreadRollout, transplantThreadRollout, } from "../internal/bridge/index.js";
|
|
22
|
-
import {
|
|
22
|
+
import { collectDispatchRuns, collectLocalHandoffRuns, collectPromptQueueRuns, collectWorkbenchDoctorInfo, commitActionsWorkbenchState, cancelDispatchRunIntent, createWorkbenchContext, createDispatchRunIntent, drainLocalHandoffQueue, enqueueLocalHandoffIntent, enqueuePromptQueueIntent, listLocalHandoffIntents, listPromptQueueIntents, listDispatchRunIntents, pruneDispatchRunHistory, readDispatchRun, formatWorkbenchDoctorInfo, retryDispatchRunIntent, runDuePromptQueueIntents, runDueDispatchRuns, runWorkbenchTaskById, scaffoldActionsWorkbench, } from "../internal/workbench/index.js";
|
|
23
23
|
import { formatWorkbenchDelegationListResult, formatWorkbenchDelegationStartResult, startWorkbenchDelegationWithRequest, } from "../internal/workbench/index.js";
|
|
24
24
|
import { serveCodexToysMcp } from "./mcp.js";
|
|
25
25
|
import { parseJsonParamsText, readJsonFile } from "../internal/bridge/json.js";
|
|
@@ -246,6 +246,26 @@ async function main() {
|
|
|
246
246
|
: `${JSON.stringify(item, null, 2)}\n`);
|
|
247
247
|
return;
|
|
248
248
|
}
|
|
249
|
+
if (parsed.type === "feed-item-append") {
|
|
250
|
+
const params = {
|
|
251
|
+
...record(await readParams(parsed.paramsText, parsed.paramsFile)),
|
|
252
|
+
sourceId: parsed.sourceId,
|
|
253
|
+
};
|
|
254
|
+
const result = hasSshRemote(parsed)
|
|
255
|
+
? await callToybox(FEED_ITEM_APPEND_METHOD, compactUndefined({
|
|
256
|
+
...params,
|
|
257
|
+
mode: parsed.mode,
|
|
258
|
+
feedRoot: parsed.feedRoot,
|
|
259
|
+
}), parsed)
|
|
260
|
+
: await appendFeedItem(await createFeedContext({
|
|
261
|
+
root: parsed.feedRoot,
|
|
262
|
+
mode: parsed.mode,
|
|
263
|
+
}), feedAppendItemOptionsFromParams(params));
|
|
264
|
+
write(parsed.json
|
|
265
|
+
? `${JSON.stringify(result, null, parsed.pretty ? 2 : 0)}\n`
|
|
266
|
+
: formatFeedAppendResult(result));
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
249
269
|
if (parsed.type === "feed-collect") {
|
|
250
270
|
const result = hasSshRemote(parsed)
|
|
251
271
|
? await callToybox(FEED_COLLECT_METHOD, compactUndefined({
|
|
@@ -427,7 +447,7 @@ async function main() {
|
|
|
427
447
|
workbenchRoot: parsed.workbenchRoot,
|
|
428
448
|
mode: parsed.mode,
|
|
429
449
|
});
|
|
430
|
-
const info = await collectWorkbenchDoctorInfo(context
|
|
450
|
+
const info = await collectWorkbenchDoctorInfo(context);
|
|
431
451
|
const toybox = await collectToyboxInfo({
|
|
432
452
|
appUrl: parsed.appUrl,
|
|
433
453
|
workbenchUrl: parsed.workbenchUrl,
|
|
@@ -455,21 +475,6 @@ async function main() {
|
|
|
455
475
|
: formatWorkbenchOverview(overview));
|
|
456
476
|
return;
|
|
457
477
|
}
|
|
458
|
-
if (parsed.type === "workbench-tick") {
|
|
459
|
-
const context = await createWorkbenchContext({
|
|
460
|
-
workbenchRoot: parsed.workbenchRoot,
|
|
461
|
-
mode: parsed.mode,
|
|
462
|
-
});
|
|
463
|
-
const result = await withToyboxRequest(parsed, async (request) => await tickWorkbench(context, {
|
|
464
|
-
callToybox: request,
|
|
465
|
-
workflowCwd: parsed.cwd,
|
|
466
|
-
}));
|
|
467
|
-
writeJson({
|
|
468
|
-
...result,
|
|
469
|
-
actionsCommit: await commitActionsWorkbenchState(context),
|
|
470
|
-
}, parsed.pretty);
|
|
471
|
-
return;
|
|
472
|
-
}
|
|
473
478
|
if (parsed.type === "workbench-run") {
|
|
474
479
|
const context = await createWorkbenchContext({
|
|
475
480
|
workbenchRoot: parsed.workbenchRoot,
|
|
@@ -557,7 +562,7 @@ async function main() {
|
|
|
557
562
|
mode: parsed.mode,
|
|
558
563
|
workbenchRoot: parsed.workbenchRoot,
|
|
559
564
|
}), parsed)
|
|
560
|
-
: await
|
|
565
|
+
: await readDispatchRun(await createWorkbenchContext({
|
|
561
566
|
workbenchRoot: parsed.workbenchRoot,
|
|
562
567
|
mode: parsed.mode,
|
|
563
568
|
}), parsed.intentId, { includeOutput: parsed.includeOutput });
|
|
@@ -591,7 +596,7 @@ async function main() {
|
|
|
591
596
|
workbenchRoot: parsed.workbenchRoot,
|
|
592
597
|
}), parsed)
|
|
593
598
|
: {
|
|
594
|
-
intent: await
|
|
599
|
+
intent: await cancelDispatchRunIntent(await createWorkbenchContext({
|
|
595
600
|
workbenchRoot: parsed.workbenchRoot,
|
|
596
601
|
mode: parsed.mode,
|
|
597
602
|
}), parsed.intentId),
|
|
@@ -607,7 +612,7 @@ async function main() {
|
|
|
607
612
|
mode: parsed.mode,
|
|
608
613
|
workbenchRoot: parsed.workbenchRoot,
|
|
609
614
|
}), parsed)
|
|
610
|
-
: await
|
|
615
|
+
: await retryDispatchRunIntent(await createWorkbenchContext({
|
|
611
616
|
workbenchRoot: parsed.workbenchRoot,
|
|
612
617
|
mode: parsed.mode,
|
|
613
618
|
}), parsed.intentId, compactUndefined({
|
|
@@ -714,7 +719,7 @@ async function main() {
|
|
|
714
719
|
mode: parsed.mode,
|
|
715
720
|
workbenchRoot: parsed.workbenchRoot,
|
|
716
721
|
}), parsed)
|
|
717
|
-
: await
|
|
722
|
+
: await readDispatchRun(await createWorkbenchContext({
|
|
718
723
|
workbenchRoot: parsed.workbenchRoot,
|
|
719
724
|
mode: parsed.mode,
|
|
720
725
|
}), parsed.intentId, { includeOutput: parsed.includeOutput });
|
|
@@ -753,7 +758,7 @@ async function main() {
|
|
|
753
758
|
workbenchRoot: parsed.workbenchRoot,
|
|
754
759
|
}), parsed)
|
|
755
760
|
: {
|
|
756
|
-
intent: await
|
|
761
|
+
intent: await cancelDispatchRunIntent(await createWorkbenchContext({
|
|
757
762
|
workbenchRoot: parsed.workbenchRoot,
|
|
758
763
|
mode: parsed.mode,
|
|
759
764
|
}), parsed.intentId),
|
|
@@ -769,7 +774,7 @@ async function main() {
|
|
|
769
774
|
mode: parsed.mode,
|
|
770
775
|
workbenchRoot: parsed.workbenchRoot,
|
|
771
776
|
}), parsed)
|
|
772
|
-
: await
|
|
777
|
+
: await retryDispatchRunIntent(await createWorkbenchContext({
|
|
773
778
|
workbenchRoot: parsed.workbenchRoot,
|
|
774
779
|
mode: parsed.mode,
|
|
775
780
|
}), parsed.intentId, compactUndefined({
|
|
@@ -805,16 +810,16 @@ async function main() {
|
|
|
805
810
|
writeJson(result, parsed.pretty);
|
|
806
811
|
return;
|
|
807
812
|
}
|
|
808
|
-
if (parsed.type === "workbench-
|
|
813
|
+
if (parsed.type === "workbench-dispatch-create") {
|
|
809
814
|
const params = await readParams(parsed.paramsText, parsed.paramsFile);
|
|
810
815
|
const result = hasSshRemote(parsed)
|
|
811
|
-
? await callToybox("
|
|
816
|
+
? await callToybox("dispatch.create", compactUndefined({
|
|
812
817
|
...record(params),
|
|
813
818
|
mode: parsed.mode,
|
|
814
819
|
workbenchRoot: parsed.workbenchRoot,
|
|
815
820
|
}), parsed)
|
|
816
821
|
: {
|
|
817
|
-
intent: await
|
|
822
|
+
intent: await createDispatchRunIntent(await createWorkbenchContext({
|
|
818
823
|
workbenchRoot: parsed.workbenchRoot,
|
|
819
824
|
mode: parsed.mode,
|
|
820
825
|
}), params),
|
|
@@ -822,36 +827,36 @@ async function main() {
|
|
|
822
827
|
writeJson(result, parsed.pretty);
|
|
823
828
|
return;
|
|
824
829
|
}
|
|
825
|
-
if (parsed.type === "workbench-
|
|
830
|
+
if (parsed.type === "workbench-dispatch-list") {
|
|
826
831
|
if (hasSshRemote(parsed)) {
|
|
827
|
-
const result = await callToybox("
|
|
832
|
+
const result = await callToybox("dispatch.list", compactUndefined({
|
|
828
833
|
mode: parsed.mode,
|
|
829
834
|
workbenchRoot: parsed.workbenchRoot,
|
|
830
835
|
}), parsed);
|
|
831
836
|
write(parsed.json
|
|
832
837
|
? `${JSON.stringify(result, null, parsed.pretty ? 2 : 0)}\n`
|
|
833
|
-
:
|
|
838
|
+
: formatDispatchRunList((record(result).intents ?? [])));
|
|
834
839
|
return;
|
|
835
840
|
}
|
|
836
841
|
const context = await createWorkbenchContext({
|
|
837
842
|
workbenchRoot: parsed.workbenchRoot,
|
|
838
843
|
mode: parsed.mode,
|
|
839
844
|
});
|
|
840
|
-
const intents = await
|
|
845
|
+
const intents = await listDispatchRunIntents(context);
|
|
841
846
|
write(parsed.json
|
|
842
847
|
? `${JSON.stringify({ intents }, null, parsed.pretty ? 2 : 0)}\n`
|
|
843
|
-
:
|
|
848
|
+
: formatDispatchRunList(intents));
|
|
844
849
|
return;
|
|
845
850
|
}
|
|
846
|
-
if (parsed.type === "workbench-
|
|
851
|
+
if (parsed.type === "workbench-dispatch-read") {
|
|
847
852
|
const result = hasSshRemote(parsed)
|
|
848
|
-
? await callToybox("
|
|
853
|
+
? await callToybox("dispatch.read", compactUndefined({
|
|
849
854
|
id: parsed.intentId,
|
|
850
855
|
includeOutput: parsed.includeOutput,
|
|
851
856
|
mode: parsed.mode,
|
|
852
857
|
workbenchRoot: parsed.workbenchRoot,
|
|
853
858
|
}), parsed)
|
|
854
|
-
: await
|
|
859
|
+
: await readDispatchRun(await createWorkbenchContext({
|
|
855
860
|
workbenchRoot: parsed.workbenchRoot,
|
|
856
861
|
mode: parsed.mode,
|
|
857
862
|
}), parsed.intentId, { includeOutput: parsed.includeOutput });
|
|
@@ -860,14 +865,14 @@ async function main() {
|
|
|
860
865
|
: `${JSON.stringify(result, null, 2)}\n`);
|
|
861
866
|
return;
|
|
862
867
|
}
|
|
863
|
-
if (parsed.type === "workbench-
|
|
868
|
+
if (parsed.type === "workbench-dispatch-collect") {
|
|
864
869
|
const result = hasSshRemote(parsed)
|
|
865
|
-
? await callToybox("
|
|
870
|
+
? await callToybox("dispatch.collect", compactUndefined({
|
|
866
871
|
cursor: parsed.cursor,
|
|
867
872
|
mode: parsed.mode,
|
|
868
873
|
workbenchRoot: parsed.workbenchRoot,
|
|
869
874
|
}), parsed)
|
|
870
|
-
: await
|
|
875
|
+
: await collectDispatchRuns(await createWorkbenchContext({
|
|
871
876
|
workbenchRoot: parsed.workbenchRoot,
|
|
872
877
|
mode: parsed.mode,
|
|
873
878
|
}), { cursor: parsed.cursor });
|
|
@@ -876,15 +881,15 @@ async function main() {
|
|
|
876
881
|
: `${JSON.stringify(result, null, 2)}\n`);
|
|
877
882
|
return;
|
|
878
883
|
}
|
|
879
|
-
if (parsed.type === "workbench-
|
|
884
|
+
if (parsed.type === "workbench-dispatch-cancel") {
|
|
880
885
|
const result = hasSshRemote(parsed)
|
|
881
|
-
? await callToybox("
|
|
886
|
+
? await callToybox("dispatch.cancel", compactUndefined({
|
|
882
887
|
id: parsed.intentId,
|
|
883
888
|
mode: parsed.mode,
|
|
884
889
|
workbenchRoot: parsed.workbenchRoot,
|
|
885
890
|
}), parsed)
|
|
886
891
|
: {
|
|
887
|
-
intent: await
|
|
892
|
+
intent: await cancelDispatchRunIntent(await createWorkbenchContext({
|
|
888
893
|
workbenchRoot: parsed.workbenchRoot,
|
|
889
894
|
mode: parsed.mode,
|
|
890
895
|
}), parsed.intentId),
|
|
@@ -892,15 +897,15 @@ async function main() {
|
|
|
892
897
|
writeJson(result, parsed.pretty);
|
|
893
898
|
return;
|
|
894
899
|
}
|
|
895
|
-
if (parsed.type === "workbench-
|
|
900
|
+
if (parsed.type === "workbench-dispatch-retry") {
|
|
896
901
|
const result = hasSshRemote(parsed)
|
|
897
|
-
? await callToybox("
|
|
902
|
+
? await callToybox("dispatch.retry", compactUndefined({
|
|
898
903
|
id: parsed.intentId,
|
|
899
904
|
runAt: parsed.runAt,
|
|
900
905
|
mode: parsed.mode,
|
|
901
906
|
workbenchRoot: parsed.workbenchRoot,
|
|
902
907
|
}), parsed)
|
|
903
|
-
: await
|
|
908
|
+
: await retryDispatchRunIntent(await createWorkbenchContext({
|
|
904
909
|
workbenchRoot: parsed.workbenchRoot,
|
|
905
910
|
mode: parsed.mode,
|
|
906
911
|
}), parsed.intentId, compactUndefined({
|
|
@@ -909,13 +914,13 @@ async function main() {
|
|
|
909
914
|
writeJson(result, parsed.pretty);
|
|
910
915
|
return;
|
|
911
916
|
}
|
|
912
|
-
if (parsed.type === "workbench-
|
|
917
|
+
if (parsed.type === "workbench-dispatch-run-due") {
|
|
913
918
|
const result = hasSshRemote(parsed)
|
|
914
|
-
? await callToybox("
|
|
919
|
+
? await callToybox("dispatch.runDue", compactUndefined({
|
|
915
920
|
mode: parsed.mode,
|
|
916
921
|
workbenchRoot: parsed.workbenchRoot,
|
|
917
922
|
}), parsed)
|
|
918
|
-
: await withToyboxRequest(parsed, async (request) => await
|
|
923
|
+
: await withToyboxRequest(parsed, async (request) => await runDueDispatchRuns(await createWorkbenchContext({
|
|
919
924
|
workbenchRoot: parsed.workbenchRoot,
|
|
920
925
|
mode: parsed.mode,
|
|
921
926
|
}), {
|
|
@@ -925,15 +930,15 @@ async function main() {
|
|
|
925
930
|
writeJson(result, parsed.pretty);
|
|
926
931
|
return;
|
|
927
932
|
}
|
|
928
|
-
if (parsed.type === "workbench-
|
|
933
|
+
if (parsed.type === "workbench-dispatch-prune") {
|
|
929
934
|
const result = hasSshRemote(parsed)
|
|
930
|
-
? await callToybox("
|
|
935
|
+
? await callToybox("dispatch.prune", compactUndefined({
|
|
931
936
|
mode: parsed.mode,
|
|
932
937
|
workbenchRoot: parsed.workbenchRoot,
|
|
933
938
|
olderThanDays: parsed.olderThanDays,
|
|
934
939
|
dryRun: parsed.dryRun,
|
|
935
940
|
}), parsed)
|
|
936
|
-
: await
|
|
941
|
+
: await pruneDispatchRunHistory(await createWorkbenchContext({
|
|
937
942
|
workbenchRoot: parsed.workbenchRoot,
|
|
938
943
|
mode: parsed.mode,
|
|
939
944
|
}), {
|
|
@@ -948,6 +953,7 @@ async function main() {
|
|
|
948
953
|
workbenchRoot: parsed.workbenchRoot,
|
|
949
954
|
forgejo: parsed.forgejo,
|
|
950
955
|
github: parsed.github,
|
|
956
|
+
runnerImage: parsed.runnerImage,
|
|
951
957
|
overwrite: parsed.overwrite,
|
|
952
958
|
}), parsed.pretty);
|
|
953
959
|
return;
|
|
@@ -1137,6 +1143,11 @@ function formatFeedItemList(items) {
|
|
|
1137
1143
|
return `${item.id} [${item.sourceId}] ${when} ${item.title}${link}`;
|
|
1138
1144
|
}).join("\n")}\n`;
|
|
1139
1145
|
}
|
|
1146
|
+
function formatFeedAppendResult(result) {
|
|
1147
|
+
const status = result.appended ? "appended" : "duplicate";
|
|
1148
|
+
const when = result.item.publishedAt ?? result.item.updatedAt ?? result.item.observedAt;
|
|
1149
|
+
return `${status} ${result.item.id} [${result.item.sourceId}] ${when} ${result.item.title}\n`;
|
|
1150
|
+
}
|
|
1140
1151
|
function formatFeedCollectResult(result) {
|
|
1141
1152
|
return [
|
|
1142
1153
|
`cursor ${result.cursor}`,
|
|
@@ -1188,14 +1199,14 @@ function formatWorkbenchOverview(overview) {
|
|
|
1188
1199
|
`mode ${overview.workbench.mode}`,
|
|
1189
1200
|
`config ${overview.workbench.config.exists ? "found" : "missing"} ${overview.workbench.config.path}`,
|
|
1190
1201
|
`health ${overview.health.ok ? "ok" : "attention"}`,
|
|
1191
|
-
`
|
|
1202
|
+
`dispatch ${overview.dispatch.summary.total} total, ${overview.dispatch.summary.due} due, ${overview.dispatch.summary.running} running, ${overview.dispatch.summary.failed} failed`,
|
|
1192
1203
|
`workflows ${overview.workflows.ok ? overview.workflows.total : `error: ${overview.workflows.error}`}`,
|
|
1193
1204
|
`functions ${overview.functions.ok ? overview.functions.total : `error: ${overview.functions.error}`}`,
|
|
1194
1205
|
`threads ${overview.threads.ok ? `${overview.threads.total} recent for cwd` : `error: ${overview.threads.error}`}`,
|
|
1195
1206
|
`git ${overview.git.ok && overview.git.isRepo ? `${overview.git.branch ?? "unknown"} ${overview.git.commit ?? ""}${overview.git.dirty ? " dirty" : ""}` : overview.git.error ?? "not a git repo"}`,
|
|
1196
1207
|
];
|
|
1197
|
-
if (overview.
|
|
1198
|
-
lines.push(`latest
|
|
1208
|
+
if (overview.dispatch.latest) {
|
|
1209
|
+
lines.push(`latest dispatch ${overview.dispatch.latest.status} ${overview.dispatch.latest.id} ${overview.dispatch.latest.updatedAt}`);
|
|
1199
1210
|
}
|
|
1200
1211
|
for (const check of overview.health.checks.filter((item) => !item.ok)) {
|
|
1201
1212
|
lines.push(`check ${check.name} ${check.status}${check.error ? `: ${check.error}` : ""}`);
|
|
@@ -1595,18 +1606,18 @@ function threadLabel(thread) {
|
|
|
1595
1606
|
function truncate(value, maxLength) {
|
|
1596
1607
|
return value.length <= maxLength ? value : `${value.slice(0, maxLength - 3)}...`;
|
|
1597
1608
|
}
|
|
1598
|
-
function
|
|
1609
|
+
function formatDispatchRunList(intents) {
|
|
1599
1610
|
if (intents.length === 0) {
|
|
1600
|
-
return "No
|
|
1611
|
+
return "No dispatch runs found.\n";
|
|
1601
1612
|
}
|
|
1602
1613
|
return intents.map((intent) => [
|
|
1603
1614
|
intent.id,
|
|
1604
1615
|
intent.status,
|
|
1605
1616
|
intent.runAt,
|
|
1606
|
-
|
|
1617
|
+
dispatchTargetLabel(intent.target),
|
|
1607
1618
|
].join(" ")).join("\n") + "\n";
|
|
1608
1619
|
}
|
|
1609
|
-
function
|
|
1620
|
+
function dispatchTargetLabel(target) {
|
|
1610
1621
|
if (target.kind === "workbench-task") {
|
|
1611
1622
|
return `workbench-task:${target.taskId}`;
|
|
1612
1623
|
}
|