@krapht/ork 1.0.0-alpha.1 → 1.0.0-alpha.10
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 +3 -4
- package/dist/{__build_info__-D9lSlMFy.mjs → __build_info__-DFF18K8y.mjs} +72 -3
- package/dist/bin.mjs +579 -379
- package/dist/{clean-CA_Oi2Wl.mjs → clean-DVaEH9e7.mjs} +5 -2
- package/dist/{completion-DBGfL-gN.mjs → completion-Dv5kf598.mjs} +6 -6
- package/dist/context-CEaKOVmG.mjs +683 -0
- package/dist/{decide-CoIJh34e.mjs → decide-3l9q8UtX.mjs} +3 -3
- package/dist/{find-rBBk7Jui.mjs → find-DEjjOlTG.mjs} +1 -1
- package/dist/format-Cb5_m-Qd.mjs +191 -0
- package/dist/{in-a-run-DdAakpRR.mjs → in-a-run-BS9Nc-JW.mjs} +1 -1
- package/dist/{limits-BPM9wUlV.mjs → limits-BSwEjQST.mjs} +1 -1
- package/dist/{list-Bv5Lxu7z.mjs → list-Qxr6rwsY.mjs} +11 -4
- package/dist/{mcp-DM30MFBw.mjs → mcp-CslnG5wf.mjs} +6 -6
- package/dist/output-Bqljtmp_.mjs +40 -0
- package/dist/{pause-C7lJkSma.mjs → pause-D7OVB5Ac.mjs} +4 -4
- package/dist/{relay-BipJYszF.mjs → relay-EceRIebO.mjs} +2 -2
- package/dist/{remove-BDs9isB6.mjs → remove-0IQZVWmI.mjs} +14 -7
- package/dist/{send-nbkjf3sc.mjs → send-C0uwfUYi.mjs} +3 -3
- package/dist/{src-hrj2h0IZ.mjs → src-Df6KOIDC.mjs} +5678 -3245
- package/dist/{src-BxUJPGa5.mjs → src-cmmXKHn1.mjs} +265 -203
- package/dist/{src-B0TT7DBi.mjs → src-i5k2Y-kf.mjs} +35 -86
- package/dist/src-oaJYIddp.mjs +2255 -0
- package/dist/ui/THIRD_PARTY_LICENSES.txt +594 -0
- package/dist/ui/assets/app-C8uhHVYp.css +1 -0
- package/dist/ui/assets/app-qs8Lofv6.js +75 -0
- package/dist/ui/assets/{index-CPx74lFf.js → index-DV1ZaOk-.js} +3 -3
- package/dist/ui/assets/theme-CdXvqTQ6.js +1 -0
- package/dist/ui/index.html +2 -2
- package/dist/{ui-B98FSboa.mjs → ui-CBkHJdqk.mjs} +4 -4
- package/dist/{usage-EW7DI6Z7.mjs → usage-Cd8pEYyK.mjs} +5 -5
- package/dist/{watch-BAkSGaOp.mjs → watch-DW5R2OPO.mjs} +6 -6
- package/dist/{workflows-vsEohqa7.mjs → workflows-BT1gDRIV.mjs} +4 -3
- package/dist/{worktrees-Ahj9rdWK.mjs → worktrees-g1MQMGie.mjs} +78 -19
- package/package.json +2 -4
- package/dist/context-6x3kXREO.mjs +0 -274
- package/dist/format-zMmhqyLE.mjs +0 -427
- package/dist/output-TV_j7Ni0.mjs +0 -950
- package/dist/src-B9v0lDc6.mjs +0 -1204
- package/dist/ui/assets/app-BNT0SuIz.css +0 -1
- package/dist/ui/assets/app-CmkynZyW.js +0 -67
- package/dist/ui/assets/theme-3xH5jxKs.js +0 -1
package/README.md
CHANGED
|
@@ -26,10 +26,9 @@ ork worktrees clean # removes the merged ones; asks first
|
|
|
26
26
|
ork upgrade # a newer version? upgrade the way you installed Ork
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
A workflow that names no
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
one.
|
|
29
|
+
A workflow that names no agent driver runs on the one that's ready. Today that
|
|
30
|
+
is `claude-code`: your own `claude`, logged in or with `ANTHROPIC_API_KEY` or a
|
|
31
|
+
cloud provider set. `--driver claude-code` names it.
|
|
33
32
|
|
|
34
33
|
Ork never stores or asks for credentials: it uses the tools you already have,
|
|
35
34
|
signed in with your own accounts. Once a day it asks the npm registry whether a
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $t as targetOf, An as inside, Ct as runTree, Fn as plainPathInside, Ht as FEEDBACK_KINDS, In as writePlainFile, Mn as LESSON_CAP_TOKENS, Nn as estimateTokens, Pn as guardedBase, Tn as placeFor, Ut as FEEDBACK_SEVERITIES, Yt as publishPost, Zt as fingerprint, g as parseVersion, h as isNewer, m as compareVersions, un as maskSecrets, wn as placeFiles } from "./src-Df6KOIDC.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,6 +410,75 @@ 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
|
+
};
|
|
413
482
|
/** The dist-tags every install follows, toward and after 1.0.0. */
|
|
414
483
|
const CHANNEL_TAGS = [
|
|
415
484
|
"latest",
|
|
@@ -611,5 +680,5 @@ const registryShown = (registry) => {
|
|
|
611
680
|
* fails when it is stale.
|
|
612
681
|
*/
|
|
613
682
|
const ORK_NAME = "@krapht/ork";
|
|
614
|
-
const ORK_VERSION = "1.0.0-alpha.
|
|
615
|
-
export {
|
|
683
|
+
const ORK_VERSION = "1.0.0-alpha.10";
|
|
684
|
+
export { placeOf as C, lessonPlaceOf as S, openFixRun as T, nodeSession as _, registryShown as a, recordNote as b, checkDue as c, pendingNotice as d, readUpdateCache as f, activeTree 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, previewPost as v, feedbackActions as w, acceptItem as x, checkNote as y };
|