@krapht/ork 1.0.0-alpha.10 → 1.0.0-alpha.11
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__-DFF18K8y.mjs → __build_info__-CIchF6nr.mjs} +3 -72
- package/dist/bin.mjs +1066 -387
- package/dist/chips-BA7SrrH5.mjs +43 -0
- package/dist/{clean-DVaEH9e7.mjs → clean-Di-KT7Mf.mjs} +1 -1
- package/dist/{completion-Dv5kf598.mjs → completion-C5D0sEs5.mjs} +22 -15
- package/dist/{context-CEaKOVmG.mjs → context-BaNshWr9.mjs} +43 -31
- package/dist/{decide-3l9q8UtX.mjs → decide-B6PnKeqo.mjs} +1 -1
- package/dist/{find-DEjjOlTG.mjs → find-BicBbGMg.mjs} +1 -1
- package/dist/{format-Cb5_m-Qd.mjs → format-lWhN-jYR.mjs} +130 -35
- package/dist/{in-a-run-BS9Nc-JW.mjs → in-a-run-CgkVouyG.mjs} +1 -1
- package/dist/{limits-BSwEjQST.mjs → limits-jZQp9ZJC.mjs} +1 -1
- package/dist/{list-Qxr6rwsY.mjs → list-CEaJ07jd.mjs} +1 -1
- package/dist/{mcp-CslnG5wf.mjs → mcp-DYgVA9f5.mjs} +6 -6
- package/dist/output-CM95njYt.mjs +421 -0
- package/dist/{pause-D7OVB5Ac.mjs → pause-D6PuSlNl.mjs} +4 -4
- package/dist/{relay-EceRIebO.mjs → relay-DNx7be9k.mjs} +2 -2
- package/dist/{remove-0IQZVWmI.mjs → remove-CpMb4NDl.mjs} +3 -3
- package/dist/{report-DK4LGqwF.mjs → report-CEN8VoUb.mjs} +31 -20
- package/dist/{send-C0uwfUYi.mjs → send-CLs_fyg7.mjs} +3 -3
- package/dist/{src-cmmXKHn1.mjs → src-9iGkjnsy.mjs} +234 -150
- package/dist/{src-i5k2Y-kf.mjs → src-B6KvTm7B.mjs} +78 -11
- package/dist/{src-oaJYIddp.mjs → src-BnZgZGrf.mjs} +523 -81
- package/dist/{src-Df6KOIDC.mjs → src-D6_xjm-x.mjs} +1722 -825
- package/dist/ui/assets/{app-qs8Lofv6.js → app-CxURph7a.js} +16 -16
- package/dist/ui/assets/app-QoHVi-mb.css +1 -0
- package/dist/ui/assets/{index-DV1ZaOk-.js → index-By_8KKG6.js} +2 -2
- package/dist/ui/index.html +1 -1
- package/dist/{ui-CBkHJdqk.mjs → ui-CIci4UBW.mjs} +4 -4
- package/dist/{usage-Cd8pEYyK.mjs → usage-GceBGMjU.mjs} +43 -32
- package/dist/{watch-DW5R2OPO.mjs → watch-BmoybMQg.mjs} +28 -16
- package/dist/{workflows-BT1gDRIV.mjs → workflows-DZvW3i1e.mjs} +3 -3
- package/dist/{worktrees-g1MQMGie.mjs → worktrees-Be51E2rB.mjs} +11 -10
- package/package.json +1 -1
- package/dist/output-Bqljtmp_.mjs +0 -40
- package/dist/ui/assets/app-C8uhHVYp.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Bn as placeFiles, En as maskSecrets, Jn as LESSON_CAP_TOKENS, Kn as inside, Qn as writePlainFile, Vn as placeFor, Xn as guardedBase, Yn as estimateTokens, Zn as plainPathInside, an as FEEDBACK_SEVERITIES, d as parseVersion, dn as publishPost, hn as targetOf, in as FEEDBACK_KINDS, l as compareVersions, pn as fingerprint, u as isNewer } from "./src-D6_xjm-x.mjs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { existsSync, mkdirSync, readFileSync, realpathSync, renameSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { homedir } from "node:os";
|
|
@@ -410,75 +410,6 @@ const nodeSession = (events, node) => {
|
|
|
410
410
|
outputs
|
|
411
411
|
};
|
|
412
412
|
};
|
|
413
|
-
// ../core/src/store/activity.ts
|
|
414
|
-
const LONGEST_LINE = 120;
|
|
415
|
-
/**
|
|
416
|
-
* The fields of a tool's input that say what it's working on, best first. Only
|
|
417
|
-
* these are shown, so what else a tool was given stays in the logs.
|
|
418
|
-
*/
|
|
419
|
-
const TARGETS = [
|
|
420
|
-
"file_path",
|
|
421
|
-
"notebook_path",
|
|
422
|
-
"path",
|
|
423
|
-
"url",
|
|
424
|
-
"pattern",
|
|
425
|
-
"query",
|
|
426
|
-
"command"
|
|
427
|
-
];
|
|
428
|
-
const oneLine = (text) => {
|
|
429
|
-
const line = text.replaceAll(/\s+/gu, " ").trim();
|
|
430
|
-
return line.length > LONGEST_LINE ? `${line.slice(0, 119)}…` : line;
|
|
431
|
-
};
|
|
432
|
-
const toolLine = ({ name, input }) => {
|
|
433
|
-
const target = TARGETS.map((field) => input[field]).find((value) => typeof value === "string" && value.trim() !== "");
|
|
434
|
-
if (typeof target !== "string") return name;
|
|
435
|
-
return oneLine(target.startsWith(`${name} `) ? target : `${name} ${target}`);
|
|
436
|
-
};
|
|
437
|
-
/** What a finished node said, or why it failed. */
|
|
438
|
-
const finishedNow = (ok, error, summary) => {
|
|
439
|
-
if (!ok) return error === void 0 ? void 0 : oneLine(error);
|
|
440
|
-
return typeof summary === "string" && summary.trim() !== "" ? oneLine(summary) : void 0;
|
|
441
|
-
};
|
|
442
|
-
/** Each node's activity, by id; a node that never started has none. */
|
|
443
|
-
const runActivity = (stored) => {
|
|
444
|
-
const nodes = /* @__PURE__ */ new Map();
|
|
445
|
-
const of = (id) => {
|
|
446
|
-
const found = nodes.get(id);
|
|
447
|
-
if (found !== void 0) return found;
|
|
448
|
-
const fresh = {};
|
|
449
|
-
nodes.set(id, fresh);
|
|
450
|
-
return fresh;
|
|
451
|
-
};
|
|
452
|
-
for (const { at, event } of stored) if (event.type === "node.started") {
|
|
453
|
-
const node = of(event.id);
|
|
454
|
-
node.startedAt ??= at;
|
|
455
|
-
delete node.finishedAt;
|
|
456
|
-
delete node.now;
|
|
457
|
-
} else if (event.type === "node.event") {
|
|
458
|
-
if (event.event.type === "tool.called") of(event.id).now = toolLine(event.event);
|
|
459
|
-
} else if (event.type === "decision.opened") of(event.node).now = oneLine(`Asked: ${event.question}`);
|
|
460
|
-
else if (event.type === "decision.answered") of(event.node).now = oneLine(`Answered: ${event.answer}`);
|
|
461
|
-
else if (event.type === "decision.withdrawn") delete of(event.node).now;
|
|
462
|
-
else if (event.type === "node.finished") {
|
|
463
|
-
const node = of(event.id);
|
|
464
|
-
node.finishedAt = at;
|
|
465
|
-
const now = finishedNow(event.ok, event.error, event.output["summary"]);
|
|
466
|
-
if (now === void 0) delete node.now;
|
|
467
|
-
else node.now = now;
|
|
468
|
-
}
|
|
469
|
-
return nodes;
|
|
470
|
-
};
|
|
471
|
-
/** The ownership tree, with what each node is doing and when it ran. */
|
|
472
|
-
const activeTree = (stored) => {
|
|
473
|
-
const activity = runActivity(stored);
|
|
474
|
-
const dress = (node) => {
|
|
475
|
-
Object.assign(node, activity.get(node.id));
|
|
476
|
-
for (const child of node.children) dress(child);
|
|
477
|
-
};
|
|
478
|
-
const roots = runTree(stored.map(({ event }) => event));
|
|
479
|
-
for (const root of roots) dress(root);
|
|
480
|
-
return roots;
|
|
481
|
-
};
|
|
482
413
|
/** The dist-tags every install follows, toward and after 1.0.0. */
|
|
483
414
|
const CHANNEL_TAGS = [
|
|
484
415
|
"latest",
|
|
@@ -680,5 +611,5 @@ const registryShown = (registry) => {
|
|
|
680
611
|
* fails when it is stale.
|
|
681
612
|
*/
|
|
682
613
|
const ORK_NAME = "@krapht/ork";
|
|
683
|
-
const ORK_VERSION = "1.0.0-alpha.
|
|
684
|
-
export {
|
|
614
|
+
const ORK_VERSION = "1.0.0-alpha.11";
|
|
615
|
+
export { feedbackActions as C, placeOf as S, previewPost as _, registryShown as a, acceptItem as b, checkDue as c, pendingNotice as d, readUpdateCache as f, nodeSession as g, writeUpdateCache as h, registryOf as i, fetchLatest as l, updateCachePath as m, ORK_VERSION as n, updateSwitchOff as o, refreshUpdateCache as p, isSwitchedOn as r, runInstall as s, ORK_NAME as t, newerVersion as u, checkNote as v, openFixRun as w, lessonPlaceOf as x, recordNote as y };
|