oneie 5.7.6 → 5.8.1
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 +19 -1
- package/dist/package.json +7 -8
- package/dist/src/age-yefbe8pe.js +1 -0
- package/dist/src/evm-tx-ee2q0e3w.js +1 -0
- package/dist/src/hl-run-tgrkrk69.js +1 -0
- package/dist/src/index-0rj9wdk9.js +4 -0
- package/dist/src/index-91y484c2.js +2052 -0
- package/dist/src/index-940y3rnv.js +12 -0
- package/dist/src/index.js +1047 -121
- package/dist/src/message-key-db1xjdkw.js +1 -0
- package/dist/src/message-lock-5vr8079x.js +5 -0
- package/dist/src/sweep-order-c2p6rk8c.js +1 -0
- package/dist/src/sweep-runner-t68xe7vx.js +1 -0
- package/package.json +7 -8
- package/dist/src/agent.d.ts +0 -75
- package/dist/src/agent.js +0 -1334
- package/dist/src/agentverse.d.ts +0 -26
- package/dist/src/agentverse.js +0 -171
- package/dist/src/args.d.ts +0 -9
- package/dist/src/args.js +0 -61
- package/dist/src/auth.d.ts +0 -6
- package/dist/src/auth.js +0 -121
- package/dist/src/balances.d.ts +0 -89
- package/dist/src/balances.js +0 -202
- package/dist/src/banner.d.ts +0 -1
- package/dist/src/banner.js +0 -17
- package/dist/src/broadcast.d.ts +0 -8
- package/dist/src/broadcast.js +0 -175
- package/dist/src/catalog.d.ts +0 -12
- package/dist/src/catalog.js +0 -76
- package/dist/src/chat.d.ts +0 -2
- package/dist/src/chat.js +0 -92
- package/dist/src/client.d.ts +0 -5
- package/dist/src/client.js +0 -157
- package/dist/src/compiler.d.ts +0 -36
- package/dist/src/compiler.js +0 -366
- package/dist/src/config.d.ts +0 -24
- package/dist/src/config.js +0 -70
- package/dist/src/connect.d.ts +0 -2
- package/dist/src/connect.js +0 -64
- package/dist/src/coordinate.d.ts +0 -3
- package/dist/src/coordinate.js +0 -58
- package/dist/src/create.d.ts +0 -2
- package/dist/src/create.js +0 -113
- package/dist/src/deploy.d.ts +0 -2
- package/dist/src/deploy.js +0 -19
- package/dist/src/dev.d.ts +0 -2
- package/dist/src/dev.js +0 -75
- package/dist/src/device-flow.d.ts +0 -57
- package/dist/src/device-flow.js +0 -173
- package/dist/src/doctor.d.ts +0 -26
- package/dist/src/doctor.js +0 -146
- package/dist/src/draw.d.ts +0 -18
- package/dist/src/draw.js +0 -156
- package/dist/src/endpoint.d.ts +0 -2
- package/dist/src/endpoint.js +0 -250
- package/dist/src/env.d.ts +0 -3
- package/dist/src/env.js +0 -37
- package/dist/src/eval.d.ts +0 -2
- package/dist/src/eval.js +0 -43
- package/dist/src/fn.d.ts +0 -2
- package/dist/src/fn.js +0 -70
- package/dist/src/group.d.ts +0 -2
- package/dist/src/group.js +0 -117
- package/dist/src/hl-run.d.ts +0 -119
- package/dist/src/hl-run.js +0 -480
- package/dist/src/hl.d.ts +0 -17
- package/dist/src/hl.js +0 -148
- package/dist/src/index.d.ts +0 -2
- package/dist/src/init.d.ts +0 -76
- package/dist/src/init.js +0 -278
- package/dist/src/join.d.ts +0 -11
- package/dist/src/join.js +0 -293
- package/dist/src/key-publish.d.ts +0 -40
- package/dist/src/key-publish.js +0 -232
- package/dist/src/key-seal.d.ts +0 -21
- package/dist/src/key-seal.js +0 -142
- package/dist/src/key-sweep.d.ts +0 -93
- package/dist/src/key-sweep.js +0 -263
- package/dist/src/key.d.ts +0 -26
- package/dist/src/key.js +0 -338
- package/dist/src/lib/age-plugin.d.ts +0 -51
- package/dist/src/lib/age-plugin.js +0 -130
- package/dist/src/lib/agent-env.d.ts +0 -12
- package/dist/src/lib/agent-env.js +0 -48
- package/dist/src/lib/api-path.d.ts +0 -2
- package/dist/src/lib/api-path.js +0 -40
- package/dist/src/lib/asker.d.ts +0 -34
- package/dist/src/lib/asker.js +0 -126
- package/dist/src/lib/client.d.ts +0 -20
- package/dist/src/lib/client.js +0 -71
- package/dist/src/lib/env-sealed.d.ts +0 -53
- package/dist/src/lib/env-sealed.js +0 -184
- package/dist/src/lib/flow-tag.d.ts +0 -86
- package/dist/src/lib/flow-tag.js +0 -230
- package/dist/src/lib/hl-core/actions.d.ts +0 -99
- package/dist/src/lib/hl-core/actions.js +0 -69
- package/dist/src/lib/hl-core/eip712.d.ts +0 -33
- package/dist/src/lib/hl-core/eip712.js +0 -107
- package/dist/src/lib/hl-core/errors.d.ts +0 -10
- package/dist/src/lib/hl-core/errors.js +0 -15
- package/dist/src/lib/hl-core/exchange.d.ts +0 -24
- package/dist/src/lib/hl-core/exchange.js +0 -47
- package/dist/src/lib/hl-core/index.d.ts +0 -13
- package/dist/src/lib/hl-core/index.js +0 -14
- package/dist/src/lib/hl-core/meta.d.ts +0 -57
- package/dist/src/lib/hl-core/meta.js +0 -110
- package/dist/src/lib/hl-core/msgpack.d.ts +0 -18
- package/dist/src/lib/hl-core/msgpack.js +0 -136
- package/dist/src/lib/hl-core/net.d.ts +0 -2
- package/dist/src/lib/hl-core/net.js +0 -7
- package/dist/src/lib/hl-core/signing.d.ts +0 -103
- package/dist/src/lib/hl-core/signing.js +0 -295
- package/dist/src/lib/hl-core/wire.d.ts +0 -34
- package/dist/src/lib/hl-core/wire.js +0 -81
- package/dist/src/lib/invoked-as.d.ts +0 -2
- package/dist/src/lib/invoked-as.js +0 -24
- package/dist/src/lib/journey-words.d.ts +0 -84
- package/dist/src/lib/journey-words.js +0 -360
- package/dist/src/lib/journey.d.ts +0 -148
- package/dist/src/lib/journey.js +0 -245
- package/dist/src/lib/key-receipt.d.ts +0 -48
- package/dist/src/lib/key-receipt.js +0 -116
- package/dist/src/lib/key-source.d.ts +0 -9
- package/dist/src/lib/key-source.js +0 -33
- package/dist/src/lib/keyfile.d.ts +0 -136
- package/dist/src/lib/keyfile.js +0 -397
- package/dist/src/lib/launch-claude.d.ts +0 -5
- package/dist/src/lib/launch-claude.js +0 -45
- package/dist/src/lib/lock-lookup.d.ts +0 -40
- package/dist/src/lib/lock-lookup.js +0 -92
- package/dist/src/lib/message-seal.d.ts +0 -63
- package/dist/src/lib/message-seal.js +0 -150
- package/dist/src/lib/network.d.ts +0 -15
- package/dist/src/lib/network.js +0 -41
- package/dist/src/lib/paths.d.ts +0 -41
- package/dist/src/lib/paths.js +0 -91
- package/dist/src/lib/plan-draw.d.ts +0 -56
- package/dist/src/lib/plan-draw.js +0 -219
- package/dist/src/lib/plan-live.d.ts +0 -20
- package/dist/src/lib/plan-live.js +0 -192
- package/dist/src/lib/qr.d.ts +0 -21
- package/dist/src/lib/qr.js +0 -402
- package/dist/src/lib/roster.d.ts +0 -20
- package/dist/src/lib/roster.js +0 -79
- package/dist/src/lib/sale-card.d.ts +0 -117
- package/dist/src/lib/sale-card.js +0 -261
- package/dist/src/lib/shop-init.d.ts +0 -62
- package/dist/src/lib/shop-init.js +0 -63
- package/dist/src/lib/sui-grpc-send.d.ts +0 -50
- package/dist/src/lib/sui-grpc-send.js +0 -89
- package/dist/src/lib/swap-core.d.ts +0 -163
- package/dist/src/lib/swap-core.js +0 -405
- package/dist/src/lib/tasks-digest.d.ts +0 -66
- package/dist/src/lib/tasks-digest.js +0 -200
- package/dist/src/lib/tasks-graph.d.ts +0 -79
- package/dist/src/lib/tasks-graph.js +0 -463
- package/dist/src/lib/tasks-lens.d.ts +0 -31
- package/dist/src/lib/tasks-lens.js +0 -47
- package/dist/src/lib/tasks-next.d.ts +0 -25
- package/dist/src/lib/tasks-next.js +0 -103
- package/dist/src/lib/tasks-prove.d.ts +0 -15
- package/dist/src/lib/tasks-prove.js +0 -68
- package/dist/src/lib/tasks-route.d.ts +0 -29
- package/dist/src/lib/tasks-route.js +0 -151
- package/dist/src/lib/tasks-score.d.ts +0 -36
- package/dist/src/lib/tasks-score.js +0 -152
- package/dist/src/lib/tasks-workspace.d.ts +0 -18
- package/dist/src/lib/tasks-workspace.js +0 -73
- package/dist/src/lib/vault-read.d.ts +0 -24
- package/dist/src/lib/vault-read.js +0 -77
- package/dist/src/lib/vaultfile.d.ts +0 -88
- package/dist/src/lib/vaultfile.js +0 -222
- package/dist/src/lib/wallet-money.d.ts +0 -222
- package/dist/src/lib/wallet-money.js +0 -578
- package/dist/src/lib/wallet-request.d.ts +0 -50
- package/dist/src/lib/wallet-request.js +0 -86
- package/dist/src/links.d.ts +0 -5
- package/dist/src/links.js +0 -45
- package/dist/src/media.d.ts +0 -29
- package/dist/src/media.js +0 -487
- package/dist/src/message-receipt.d.ts +0 -25
- package/dist/src/message-receipt.js +0 -71
- package/dist/src/message.d.ts +0 -13
- package/dist/src/message.js +0 -92
- package/dist/src/onboard.d.ts +0 -16
- package/dist/src/onboard.js +0 -149
- package/dist/src/plugin.d.ts +0 -2
- package/dist/src/plugin.js +0 -193
- package/dist/src/push.d.ts +0 -2
- package/dist/src/push.js +0 -115
- package/dist/src/render.d.ts +0 -21
- package/dist/src/render.js +0 -32
- package/dist/src/secrets-device.d.ts +0 -32
- package/dist/src/secrets-device.js +0 -127
- package/dist/src/secrets-give.d.ts +0 -125
- package/dist/src/secrets-give.js +0 -236
- package/dist/src/secrets-list.d.ts +0 -27
- package/dist/src/secrets-list.js +0 -84
- package/dist/src/secrets-run.d.ts +0 -31
- package/dist/src/secrets-run.js +0 -182
- package/dist/src/secrets.d.ts +0 -33
- package/dist/src/secrets.js +0 -200
- package/dist/src/setup.d.ts +0 -6
- package/dist/src/setup.js +0 -127
- package/dist/src/ship.d.ts +0 -2
- package/dist/src/ship.js +0 -18
- package/dist/src/shop.d.ts +0 -10
- package/dist/src/shop.js +0 -110
- package/dist/src/skill-parser.d.ts +0 -14
- package/dist/src/skill-parser.js +0 -113
- package/dist/src/skill.d.ts +0 -2
- package/dist/src/skill.js +0 -493
- package/dist/src/slug.d.ts +0 -2
- package/dist/src/slug.js +0 -6
- package/dist/src/social.d.ts +0 -2
- package/dist/src/social.js +0 -106
- package/dist/src/staff.d.ts +0 -2
- package/dist/src/staff.js +0 -104
- package/dist/src/start.d.ts +0 -15
- package/dist/src/start.js +0 -203
- package/dist/src/status.d.ts +0 -2
- package/dist/src/status.js +0 -52
- package/dist/src/substrate.d.ts +0 -2
- package/dist/src/substrate.js +0 -258
- package/dist/src/swap.d.ts +0 -93
- package/dist/src/swap.js +0 -622
- package/dist/src/tasks.d.ts +0 -2
- package/dist/src/tasks.js +0 -743
- package/dist/src/templates.d.ts +0 -1
- package/dist/src/templates.js +0 -213
- package/dist/src/trade.d.ts +0 -2
- package/dist/src/trade.js +0 -91
- package/dist/src/trail.d.ts +0 -2
- package/dist/src/trail.js +0 -41
- package/dist/src/validate.d.ts +0 -13
- package/dist/src/validate.js +0 -35
- package/dist/src/wallet-money.d.ts +0 -152
- package/dist/src/wallet-money.js +0 -564
- package/dist/src/wallet.d.ts +0 -167
- package/dist/src/wallet.js +0 -855
- package/dist/src/workflow.d.ts +0 -2
- package/dist/src/workflow.js +0 -166
- package/dist/src/write.d.ts +0 -43
- package/dist/src/write.js +0 -180
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import type { BoardRes } from '@oneie/sdk/tasks-bulk';
|
|
2
|
-
export type Row = NonNullable<BoardRes['tasks']>[number];
|
|
3
|
-
export type Kind = 'work' | 'approval' | 'all';
|
|
4
|
-
export declare const CLOSED: ReadonlySet<string>;
|
|
5
|
-
export declare function kindOf(r: Row): 'work' | 'approval';
|
|
6
|
-
export declare function filterKind(rows: Row[], kind: Kind): {
|
|
7
|
-
rows: Row[];
|
|
8
|
-
excluded: {
|
|
9
|
-
approval: number;
|
|
10
|
-
work: number;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
export declare function isStaleDone(r: Row): boolean;
|
|
14
|
-
export interface BlockedEntry {
|
|
15
|
-
tid: string;
|
|
16
|
-
name: string;
|
|
17
|
-
priority: number;
|
|
18
|
-
blockers: {
|
|
19
|
-
tid: string;
|
|
20
|
-
name?: string;
|
|
21
|
-
status?: string;
|
|
22
|
-
}[];
|
|
23
|
-
outside: number;
|
|
24
|
-
staleStatus: boolean;
|
|
25
|
-
}
|
|
26
|
-
export interface Move {
|
|
27
|
-
tid: string;
|
|
28
|
-
name: string;
|
|
29
|
-
action: string;
|
|
30
|
-
why: string;
|
|
31
|
-
}
|
|
32
|
-
export interface Digest {
|
|
33
|
-
kind: Kind;
|
|
34
|
-
rows: number;
|
|
35
|
-
excluded: {
|
|
36
|
-
approval: number;
|
|
37
|
-
work: number;
|
|
38
|
-
};
|
|
39
|
-
byStatus: Record<string, number>;
|
|
40
|
-
ready: Row[];
|
|
41
|
-
blocked: BlockedEntry[];
|
|
42
|
-
overdue: Row[];
|
|
43
|
-
unassigned: Row[];
|
|
44
|
-
orphans: Row[];
|
|
45
|
-
noNotes: Row[] | null;
|
|
46
|
-
staleDone: Row[];
|
|
47
|
-
picked: Row[];
|
|
48
|
-
nextMoves: Move[];
|
|
49
|
-
}
|
|
50
|
-
export declare function digest(rows: Row[], opts?: {
|
|
51
|
-
kind?: Kind;
|
|
52
|
-
}): Digest;
|
|
53
|
-
export interface BoardMeta {
|
|
54
|
-
total?: number;
|
|
55
|
-
asOf?: string;
|
|
56
|
-
pages?: number;
|
|
57
|
-
truncated?: {
|
|
58
|
-
rows?: number;
|
|
59
|
-
edges?: boolean;
|
|
60
|
-
tags?: number;
|
|
61
|
-
};
|
|
62
|
-
nextCursor?: string;
|
|
63
|
-
}
|
|
64
|
-
export declare function renderDigest(d: Digest, meta: BoardMeta, opts?: {
|
|
65
|
-
top?: number;
|
|
66
|
-
}): string;
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
export const CLOSED = new Set(['done', 'verified', 'dissolved', 'failed']);
|
|
2
|
-
export function kindOf(r) {
|
|
3
|
-
return r.tags?.includes('approval') ? 'approval' : 'work';
|
|
4
|
-
}
|
|
5
|
-
export function filterKind(rows, kind) {
|
|
6
|
-
if (kind === 'all')
|
|
7
|
-
return { rows, excluded: { approval: 0, work: 0 } };
|
|
8
|
-
let approval = 0;
|
|
9
|
-
let work = 0;
|
|
10
|
-
const out = [];
|
|
11
|
-
for (const r of rows) {
|
|
12
|
-
const k = kindOf(r);
|
|
13
|
-
if (k === kind) {
|
|
14
|
-
out.push(r);
|
|
15
|
-
continue;
|
|
16
|
-
}
|
|
17
|
-
if (k === 'approval')
|
|
18
|
-
approval += 1;
|
|
19
|
-
else
|
|
20
|
-
work += 1;
|
|
21
|
-
}
|
|
22
|
-
return { rows: out, excluded: { approval, work } };
|
|
23
|
-
}
|
|
24
|
-
const STALE_DONE_RE = /^\s*(DONE|SHIPPED|LANDED)\b/i;
|
|
25
|
-
export function isStaleDone(r) {
|
|
26
|
-
if (kindOf(r) === 'approval')
|
|
27
|
-
return false;
|
|
28
|
-
if (CLOSED.has(r.status))
|
|
29
|
-
return false;
|
|
30
|
-
if (!r.notes)
|
|
31
|
-
return false;
|
|
32
|
-
return STALE_DONE_RE.test(r.notes);
|
|
33
|
-
}
|
|
34
|
-
const byPriorityDesc = (a, b) => (b.priority ?? 0) - (a.priority ?? 0);
|
|
35
|
-
export function digest(rows, opts) {
|
|
36
|
-
const kind = opts?.kind ?? 'work';
|
|
37
|
-
// Blocker lookup is built from ALL rows passed in, before the kind filter —
|
|
38
|
-
// an approval row can still be the blocker a work row is waiting on.
|
|
39
|
-
const byId = new Map();
|
|
40
|
-
for (const r of rows)
|
|
41
|
-
byId.set(r.tid, r);
|
|
42
|
-
const { rows: filtered, excluded } = filterKind(rows, kind);
|
|
43
|
-
const byStatus = {};
|
|
44
|
-
for (const r of filtered)
|
|
45
|
-
byStatus[r.status] = (byStatus[r.status] ?? 0) + 1;
|
|
46
|
-
const ready = filtered.filter((r) => r.ready === true).sort(byPriorityDesc);
|
|
47
|
-
const blocked = [];
|
|
48
|
-
for (const r of filtered) {
|
|
49
|
-
const openBlockers = r.openBlockers ?? 0;
|
|
50
|
-
const hasBlockedStatus = r.status === 'blocked';
|
|
51
|
-
if (openBlockers <= 0 && !hasBlockedStatus)
|
|
52
|
-
continue;
|
|
53
|
-
const ids = r.blockedBy ?? [];
|
|
54
|
-
const blockers = [];
|
|
55
|
-
for (const bid of ids) {
|
|
56
|
-
const b = byId.get(bid);
|
|
57
|
-
if (!b)
|
|
58
|
-
continue;
|
|
59
|
-
if (CLOSED.has(b.status))
|
|
60
|
-
continue;
|
|
61
|
-
blockers.push({ tid: b.tid, name: b.name, status: b.status });
|
|
62
|
-
}
|
|
63
|
-
const outside = Math.max(0, openBlockers - blockers.length);
|
|
64
|
-
const staleStatus = hasBlockedStatus && openBlockers === 0;
|
|
65
|
-
blocked.push({
|
|
66
|
-
tid: r.tid,
|
|
67
|
-
name: r.name,
|
|
68
|
-
priority: r.priority,
|
|
69
|
-
blockers,
|
|
70
|
-
outside,
|
|
71
|
-
staleStatus,
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
blocked.sort((a, b) => b.priority - a.priority);
|
|
75
|
-
const overdue = filtered.filter((r) => r.overdue === true).sort(byPriorityDesc);
|
|
76
|
-
const unassigned = filtered.filter((r) => !CLOSED.has(r.status) && !r.assignee).sort(byPriorityDesc);
|
|
77
|
-
const orphans = filtered.filter((r) => !CLOSED.has(r.status) && !r.parent).sort(byPriorityDesc);
|
|
78
|
-
const notesLoaded = filtered.some((r) => 'notes' in r);
|
|
79
|
-
const noNotes = notesLoaded ? filtered.filter((r) => !r.notes) : null;
|
|
80
|
-
const staleDone = filtered.filter(isStaleDone).sort(byPriorityDesc);
|
|
81
|
-
const picked = filtered.filter((r) => r.status === 'picked').sort(byPriorityDesc);
|
|
82
|
-
const nextMoves = [];
|
|
83
|
-
const used = new Set();
|
|
84
|
-
const push = (r, action, why) => {
|
|
85
|
-
if (nextMoves.length >= 5 || used.has(r.tid))
|
|
86
|
-
return;
|
|
87
|
-
used.add(r.tid);
|
|
88
|
-
nextMoves.push({ tid: r.tid, name: r.name, action, why });
|
|
89
|
-
};
|
|
90
|
-
for (const r of staleDone) {
|
|
91
|
-
if (nextMoves.length >= 5)
|
|
92
|
-
break;
|
|
93
|
-
push(r, 'close', `notes say DONE but status is ${r.status}`);
|
|
94
|
-
}
|
|
95
|
-
for (const b of blocked) {
|
|
96
|
-
if (nextMoves.length >= 5)
|
|
97
|
-
break;
|
|
98
|
-
if (!b.staleStatus)
|
|
99
|
-
continue;
|
|
100
|
-
push(b, 'reopen', 'status blocked, no open blocker');
|
|
101
|
-
}
|
|
102
|
-
for (const r of ready) {
|
|
103
|
-
if (nextMoves.length >= 5)
|
|
104
|
-
break;
|
|
105
|
-
if (r.assignee)
|
|
106
|
-
continue;
|
|
107
|
-
push(r, 'assign', 'ready and unowned');
|
|
108
|
-
}
|
|
109
|
-
for (const r of ready) {
|
|
110
|
-
if (nextMoves.length >= 5)
|
|
111
|
-
break;
|
|
112
|
-
if (!r.assignee)
|
|
113
|
-
continue;
|
|
114
|
-
push(r, 'launch', `ready, owned by @${r.assignee}`);
|
|
115
|
-
}
|
|
116
|
-
for (const r of overdue) {
|
|
117
|
-
if (nextMoves.length >= 5)
|
|
118
|
-
break;
|
|
119
|
-
if (CLOSED.has(r.status))
|
|
120
|
-
continue;
|
|
121
|
-
push(r, 'reschedule', 'overdue');
|
|
122
|
-
}
|
|
123
|
-
return {
|
|
124
|
-
kind,
|
|
125
|
-
rows: filtered.length,
|
|
126
|
-
excluded,
|
|
127
|
-
byStatus,
|
|
128
|
-
ready,
|
|
129
|
-
blocked,
|
|
130
|
-
overdue,
|
|
131
|
-
unassigned,
|
|
132
|
-
orphans,
|
|
133
|
-
noNotes,
|
|
134
|
-
staleDone,
|
|
135
|
-
picked,
|
|
136
|
-
nextMoves,
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
function truncateName(name, max = 60) {
|
|
140
|
-
return name.length > max ? `${name.slice(0, max - 1)}…` : name;
|
|
141
|
-
}
|
|
142
|
-
export function renderDigest(d, meta, opts) {
|
|
143
|
-
const top = opts?.top ?? 5;
|
|
144
|
-
const lines = [];
|
|
145
|
-
lines.push(`${d.rows} ${d.kind} rows of ${meta.total ?? '?'} total · asOf ${meta.asOf ?? '?'}`);
|
|
146
|
-
if (meta.truncated) {
|
|
147
|
-
const t = meta.truncated;
|
|
148
|
-
const parts = [];
|
|
149
|
-
if (t.rows !== undefined)
|
|
150
|
-
parts.push(`at least ${t.rows} rows exist (total is a floor)`);
|
|
151
|
-
if (t.edges)
|
|
152
|
-
parts.push('edges capped (blocked/orphan counts may be wrong)');
|
|
153
|
-
if (t.tags !== undefined)
|
|
154
|
-
parts.push(`${t.tags} rows may be missing tags — do not plan from tags alone`);
|
|
155
|
-
lines.push(`TRUNCATED: ${parts.join('; ')}`);
|
|
156
|
-
}
|
|
157
|
-
if (meta.nextCursor) {
|
|
158
|
-
lines.push('SHORT: more rows exist beyond this read — rerun with --all');
|
|
159
|
-
}
|
|
160
|
-
if (d.excluded.approval > 0) {
|
|
161
|
-
lines.push(`${d.excluded.approval} approvals excluded (parked workflow runs — resolve with tasks_approve / workflow:stop, never by status). --kind all to include.`);
|
|
162
|
-
}
|
|
163
|
-
const statusEntries = Object.entries(d.byStatus).sort((a, b) => b[1] - a[1]);
|
|
164
|
-
lines.push(`status ${statusEntries.map(([k, v]) => `${k}=${v}`).join(' ')}`);
|
|
165
|
-
lines.push(`ready=${d.ready.length} blocked=${d.blocked.length} overdue=${d.overdue.length} unassigned=${d.unassigned.length} orphans=${d.orphans.length} noNotes=${d.noNotes === null ? 'unknown (notes not loaded)' : d.noNotes.length} staleDone=${d.staleDone.length} picked=${d.picked.length}`);
|
|
166
|
-
if (d.ready.length) {
|
|
167
|
-
lines.push(`ready (top ${top})`);
|
|
168
|
-
for (const r of d.ready.slice(0, top)) {
|
|
169
|
-
lines.push(` ${r.tid} p${r.priority} @${r.assignee ?? '-'} ${truncateName(r.name)}`);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
if (d.blocked.length) {
|
|
173
|
-
lines.push(`blocked (top ${top})`);
|
|
174
|
-
for (const b of d.blocked.slice(0, top)) {
|
|
175
|
-
let line = ` ${b.tid} ${truncateName(b.name)}`;
|
|
176
|
-
if (b.blockers.length) {
|
|
177
|
-
const blockerParts = b.blockers.map((bl) => `${bl.tid} (${bl.status ?? '?'})`).join(', ');
|
|
178
|
-
line += ` ← ${blockerParts}`;
|
|
179
|
-
}
|
|
180
|
-
if (b.outside > 0)
|
|
181
|
-
line += ` +${b.outside} outside view`;
|
|
182
|
-
if (b.staleStatus)
|
|
183
|
-
line += ' STALE STATUS';
|
|
184
|
-
lines.push(line);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
if (d.staleDone.length) {
|
|
188
|
-
lines.push(`stale DONE (top ${top})`);
|
|
189
|
-
for (const r of d.staleDone.slice(0, top)) {
|
|
190
|
-
lines.push(` ${r.tid} ${truncateName(r.name)}`);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
if (d.nextMoves.length) {
|
|
194
|
-
lines.push('next moves');
|
|
195
|
-
d.nextMoves.forEach((m, i) => {
|
|
196
|
-
lines.push(` ${i + 1}. ${m.action} ${m.tid} ${truncateName(m.name)} — ${m.why}`);
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
return lines.join('\n');
|
|
200
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import type { BoardRes, BulkEdit } from '@oneie/sdk/tasks-bulk';
|
|
2
|
-
export type Row = NonNullable<BoardRes['tasks']>[number];
|
|
3
|
-
export declare const CLOSED: ReadonlySet<string>;
|
|
4
|
-
export interface Hints {
|
|
5
|
-
model?: string;
|
|
6
|
-
effort?: string;
|
|
7
|
-
touches: string[];
|
|
8
|
-
accept?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare function parseHints(notes?: string): Hints;
|
|
11
|
-
export declare function subtree(rows: Row[], rootTid: string): Row[];
|
|
12
|
-
export interface Implied {
|
|
13
|
-
tid: string;
|
|
14
|
-
waitsFor: string;
|
|
15
|
-
reason: 'containment' | 'touches';
|
|
16
|
-
path?: string;
|
|
17
|
-
}
|
|
18
|
-
export interface PlanResult {
|
|
19
|
-
waves: {
|
|
20
|
-
n: number;
|
|
21
|
-
tids: string[];
|
|
22
|
-
}[];
|
|
23
|
-
criticalPath: {
|
|
24
|
-
hops: number;
|
|
25
|
-
tids: string[];
|
|
26
|
-
};
|
|
27
|
-
cycles: string[][];
|
|
28
|
-
missing: {
|
|
29
|
-
tid: string;
|
|
30
|
-
blockedBy: string;
|
|
31
|
-
}[];
|
|
32
|
-
outside: {
|
|
33
|
-
tid: string;
|
|
34
|
-
open: number;
|
|
35
|
-
}[];
|
|
36
|
-
ownerless: string[];
|
|
37
|
-
implied: Implied[];
|
|
38
|
-
closed: string[];
|
|
39
|
-
}
|
|
40
|
-
export declare function sameFile(a: string, b: string): boolean;
|
|
41
|
-
export declare function planWaves(rows: Row[]): PlanResult;
|
|
42
|
-
export interface DispatchRow {
|
|
43
|
-
tid: string;
|
|
44
|
-
name: string;
|
|
45
|
-
assignee?: string;
|
|
46
|
-
model?: string;
|
|
47
|
-
effort?: string;
|
|
48
|
-
touches: string[];
|
|
49
|
-
accept?: string;
|
|
50
|
-
}
|
|
51
|
-
export interface Dispatch {
|
|
52
|
-
goal: string;
|
|
53
|
-
asOf?: string;
|
|
54
|
-
truncated?: unknown;
|
|
55
|
-
waves: {
|
|
56
|
-
n: number;
|
|
57
|
-
rows: DispatchRow[];
|
|
58
|
-
}[];
|
|
59
|
-
criticalPath: {
|
|
60
|
-
hops: number;
|
|
61
|
-
tids: string[];
|
|
62
|
-
};
|
|
63
|
-
warnings: string[];
|
|
64
|
-
}
|
|
65
|
-
export declare function toDispatch(res: PlanResult, rows: Row[], meta: {
|
|
66
|
-
goal: string;
|
|
67
|
-
asOf?: string;
|
|
68
|
-
truncated?: unknown;
|
|
69
|
-
}): Dispatch;
|
|
70
|
-
export declare function sequenceEdits(tids: string[]): {
|
|
71
|
-
ok: true;
|
|
72
|
-
edits: BulkEdit[];
|
|
73
|
-
} | {
|
|
74
|
-
ok: false;
|
|
75
|
-
error: string;
|
|
76
|
-
};
|
|
77
|
-
export declare function renderPlan(res: PlanResult, rows: Row[], opts?: {
|
|
78
|
-
goal?: string;
|
|
79
|
-
}): string;
|