@krapht/ork 1.0.0-alpha.4 → 1.0.0-alpha.5
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/dist/{__build_info__-1i1IwLg7.mjs → __build_info__-Dl8yTEu-.mjs} +2 -2
- package/dist/bin.mjs +54 -224
- package/dist/{clean-B1zPxq6A.mjs → clean-DYVmLkd4.mjs} +1 -1
- package/dist/{completion-BY-frez8.mjs → completion-BVx917Yr.mjs} +5 -5
- package/dist/{context-CD5TCD1D.mjs → context-CepHRoj9.mjs} +3 -3
- package/dist/{decide-CBhYcjwI.mjs → decide-CK_-lI5V.mjs} +3 -3
- package/dist/{find-BgZjVKhv.mjs → find-DWiDJ5Lc.mjs} +1 -1
- package/dist/{format-Creyq4U3.mjs → format-yBEAXZhk.mjs} +223 -17
- package/dist/{in-a-run-CsSBQQ2q.mjs → in-a-run-CKFIeMpU.mjs} +1 -1
- package/dist/{limits-D_HxH0CK.mjs → limits-CwzPe9wZ.mjs} +1 -1
- package/dist/{list-CzzpVEpM.mjs → list-BE02pCZ9.mjs} +1 -1
- package/dist/{mcp-DYmQt372.mjs → mcp-DMuBbUHU.mjs} +6 -6
- package/dist/{output-CuivUcDa.mjs → output-BhYkshYq.mjs} +9 -6
- package/dist/{pause-W6MzQqg8.mjs → pause-C_Q0W6iX.mjs} +4 -4
- package/dist/{relay-CsdoZUXJ.mjs → relay-COCvG-0I.mjs} +2 -2
- package/dist/{remove-DLfDjBdF.mjs → remove-RVcX1KqP.mjs} +3 -3
- package/dist/{send-Bw2FI_Sv.mjs → send-OVpRei_5.mjs} +3 -3
- package/dist/{src-CrYCkU9J.mjs → src-CxZr4Bp2.mjs} +1 -1
- package/dist/{src-BRB5EQyC.mjs → src-Do_MhwiV.mjs} +54 -20
- package/dist/{src-Bc9yaAiZ.mjs → src-HxtJOMRr.mjs} +14 -7
- package/dist/{src-CsjumY1t.mjs → src-QEycKJWk.mjs} +26 -12
- package/dist/ui/THIRD_PARTY_LICENSES.txt +594 -0
- package/dist/ui/assets/app-DzI77WV9.js +75 -0
- package/dist/ui/assets/app-pTYGrAbI.css +1 -0
- package/dist/ui/assets/{index-UEC5ZLYw.js → index-2G_6XIIv.js} +3 -3
- package/dist/ui/assets/theme-CdXvqTQ6.js +1 -0
- package/dist/ui/index.html +2 -2
- package/dist/{ui-wX050aH1.mjs → ui-Dz_qfUOz.mjs} +4 -4
- package/dist/{usage-C96RDH-G.mjs → usage-BcLUZ1xw.mjs} +5 -5
- package/dist/{watch-vdRobJil.mjs → watch-Buyn0Mhz.mjs} +6 -6
- package/dist/{workflows-B28q8zMY.mjs → workflows-1sntXqSd.mjs} +3 -3
- package/dist/{worktrees-CKDRkl6b.mjs → worktrees-B_Go_A9w.mjs} +4 -4
- package/package.json +1 -1
- package/dist/ui/assets/app-BNT0SuIz.css +0 -1
- package/dist/ui/assets/app-m9Gfrg_S.js +0 -67
- package/dist/ui/assets/theme-3xH5jxKs.js +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { B as linkNodes, Bn as readDocument, Cn as placeFiles, Ct as walkChecks, En as runDirOf, G as requestContinue, Gn as EdgeInputSchema, Gt as planPost, Hn as parseWorkflow, In as skillsIn, J as tellLiveRun, Jn as expandEdge, K as requestPause, Kt as runGh, Ln as WorkflowEditSchema, Nt as nodeSays, On as workflowDirOf, Rn as applyEdits, St as checkWorkflowText, U as unlinkNodes, Vn as renderJsonSchema, Wt as DISCUSSIONS, Xn as NodeSchema, _t as runStatus, bt as processAlive, ct as explainWorkflowText, d as runningRunIds, f as runningScript, gt as pausedOf, ht as liveStatus,
|
|
2
|
-
import { C as feedbackActions, S as placeOf$1, _ as previewPost, a as registryShown, b as acceptItem, c as checkDue, f as readUpdateCache, g as nodeSession, h as writeUpdateCache, i as registryOf, l as fetchLatest, m as updateCachePath, o as updateSwitchOff, p as refreshUpdateCache, s as runInstall, u as newerVersion, w as openFixRun, x as lessonPlaceOf, y as recordNote } from "./__build_info__-
|
|
3
|
-
import { n as pendingDecisions, r as builtinProblem, t as answerDecision } from "./decide-
|
|
4
|
-
import { n as newRunId, t as findRun } from "./find-
|
|
5
|
-
import { c as openStore, l as storePath, s as nodeOf } from "./output-
|
|
1
|
+
import { B as linkNodes, Bn as readDocument, Cn as placeFiles, Ct as walkChecks, En as runDirOf, G as requestContinue, Gn as EdgeInputSchema, Gt as planPost, Hn as parseWorkflow, In as skillsIn, J as tellLiveRun, Jn as expandEdge, K as requestPause, Kt as runGh, Ln as WorkflowEditSchema, Nt as nodeSays, On as workflowDirOf, Rn as applyEdits, St as checkWorkflowText, U as unlinkNodes, Vn as renderJsonSchema, Wt as DISCUSSIONS, Xn as NodeSchema, _t as runStatus, bt as processAlive, ct as explainWorkflowText, d as runningRunIds, f as runningScript, gt as pausedOf, ht as liveStatus, jn as LESSON_CAP_TOKENS, kn as inside, l as planUpgrade, nn as readCondition, nt as resumable, o as limitsReport, ot as detachRun, p as detectInstaller, q as requestStop, qt as sendPost, r as capsHere, st as followEvents, tt as detachResume, u as releaseNotes, v as triggersReport, vn as loadAgents, vt as runTree, wn as placeFor, wt as walkSummary, zn as newWorkflowText } from "./src-Do_MhwiV.mjs";
|
|
2
|
+
import { C as feedbackActions, S as placeOf$1, _ as previewPost, a as registryShown, b as acceptItem, c as checkDue, f as readUpdateCache, g as nodeSession, h as writeUpdateCache, i as registryOf, l as fetchLatest, m as updateCachePath, o as updateSwitchOff, p as refreshUpdateCache, s as runInstall, u as newerVersion, w as openFixRun, x as lessonPlaceOf, y as recordNote } from "./__build_info__-Dl8yTEu-.mjs";
|
|
3
|
+
import { n as pendingDecisions, r as builtinProblem, t as answerDecision } from "./decide-CK_-lI5V.mjs";
|
|
4
|
+
import { n as newRunId, t as findRun } from "./find-DWiDJ5Lc.mjs";
|
|
5
|
+
import { c as openStore, l as storePath, s as nodeOf } from "./output-BhYkshYq.mjs";
|
|
6
6
|
import { n as usageReport } from "./report-DK4LGqwF.mjs";
|
|
7
|
-
import { a as planClean, i as keyOf, o as stepActs, r as cleanStep, s as stepPrunes, t as applyClean } from "./clean-
|
|
8
|
-
import { a as readWorktrees, c as planLine, i as projectHead, l as removeRefusal, n as lostWork, o as labelOf, r as planRemove, s as mergeStateOf, t as applyRemove, u as stateParts } from "./remove-
|
|
7
|
+
import { a as planClean, i as keyOf, o as stepActs, r as cleanStep, s as stepPrunes, t as applyClean } from "./clean-DYVmLkd4.mjs";
|
|
8
|
+
import { a as readWorktrees, c as planLine, i as projectHead, l as removeRefusal, n as lostWork, o as labelOf, r as planRemove, s as mergeStateOf, t as applyRemove, u as stateParts } from "./remove-RVcX1KqP.mjs";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import { z } from "zod";
|
|
11
11
|
import { chmodSync, existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
@@ -349,7 +349,9 @@ const EventsQuerySchema = z.strictObject({
|
|
|
349
349
|
});
|
|
350
350
|
const DecisionsQuerySchema = z.strictObject({
|
|
351
351
|
run: z.string().min(1).optional(),
|
|
352
|
-
project: z.string().min(1).optional()
|
|
352
|
+
project: z.string().min(1).optional(),
|
|
353
|
+
/** Only runs of this workflow, by name; ANDed with `run` or `project`. */
|
|
354
|
+
workflow: z.string().min(1).optional()
|
|
353
355
|
});
|
|
354
356
|
/** An answer: the option, and what the person said with it, if anything. */
|
|
355
357
|
const AnswerSchema = z.strictObject({
|
|
@@ -483,7 +485,8 @@ const STREAMS = {
|
|
|
483
485
|
run: "/api/runs/:id/stream",
|
|
484
486
|
/**
|
|
485
487
|
* `runs`, `decisions`, `version`, each when it changes; `?project=` keeps
|
|
486
|
-
* one
|
|
488
|
+
* one, `?workflow=` narrows `decisions` to that workflow's. `upgrade`: the
|
|
489
|
+
* upgrade's output, then `end` (contract-update.ts).
|
|
487
490
|
*/
|
|
488
491
|
overview: "/api/stream",
|
|
489
492
|
upgrade: "/api/upgrade/stream"
|
|
@@ -1625,10 +1628,17 @@ const readRoutes = (context) => ({
|
|
|
1625
1628
|
return ok(query.limit === void 0 ? newest : newest.slice(0, query.limit));
|
|
1626
1629
|
},
|
|
1627
1630
|
decisions: ({ query }) => {
|
|
1628
|
-
|
|
1631
|
+
const workflow = query.workflow === void 0 ? {} : { workflow: query.workflow };
|
|
1632
|
+
if (query.run === void 0) return ok(pendingDecisions(context.store, {
|
|
1633
|
+
...workflow,
|
|
1634
|
+
...query.project === void 0 ? {} : { project: projectRoot(context, query.project) }
|
|
1635
|
+
}));
|
|
1629
1636
|
const found = runOf(context, query.run);
|
|
1630
1637
|
if (!found.ok) return found.refusal;
|
|
1631
|
-
return ok(pendingDecisions(context.store, {
|
|
1638
|
+
return ok(pendingDecisions(context.store, {
|
|
1639
|
+
...workflow,
|
|
1640
|
+
runId: found.run.id
|
|
1641
|
+
}));
|
|
1632
1642
|
},
|
|
1633
1643
|
decision: ({ params }) => {
|
|
1634
1644
|
const found = context.store.decision(params.id);
|
|
@@ -2869,6 +2879,7 @@ const runStream = async (context, req, res, url, id, shutdown) => {
|
|
|
2869
2879
|
const overviewStream = (context, res, url, shutdown) => {
|
|
2870
2880
|
const key = url.searchParams.get("project");
|
|
2871
2881
|
const root = key === null ? void 0 : projectOf(context, key)?.root ?? key;
|
|
2882
|
+
const workflow = url.searchParams.get("workflow");
|
|
2872
2883
|
const stream = openEventStream(res);
|
|
2873
2884
|
const last = {
|
|
2874
2885
|
runs: "",
|
|
@@ -2881,7 +2892,10 @@ const overviewStream = (context, res, url, shutdown) => {
|
|
|
2881
2892
|
...filter,
|
|
2882
2893
|
limit: OVERVIEW_RUNS
|
|
2883
2894
|
}).map((run) => viewOf$2(context, run));
|
|
2884
|
-
const decisions = pendingDecisions(context.store,
|
|
2895
|
+
const decisions = pendingDecisions(context.store, {
|
|
2896
|
+
...filter,
|
|
2897
|
+
...workflow === null ? {} : { workflow }
|
|
2898
|
+
});
|
|
2885
2899
|
for (const [name, value] of [
|
|
2886
2900
|
["runs", runs],
|
|
2887
2901
|
["decisions", decisions],
|