@songsid/agend 2.3.2-beta.9 → 2.3.2
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 +6 -0
- package/README.zh-TW.md +6 -0
- package/dist/agent-cli.js +48 -0
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.js +6 -0
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-whats-new.js +3 -0
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/auth-api.js +2 -0
- package/dist/auth-api.js.map +1 -1
- package/dist/backend/claude-code.js +23 -1
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/codex-session-lookup.d.ts +15 -0
- package/dist/backend/codex-session-lookup.js +58 -0
- package/dist/backend/codex-session-lookup.js.map +1 -1
- package/dist/backend/codex.js +15 -4
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/kiro-classic-archive.d.ts +57 -0
- package/dist/backend/kiro-classic-archive.js +622 -0
- package/dist/backend/kiro-classic-archive.js.map +1 -0
- package/dist/backend/kiro-classic-links.d.ts +24 -0
- package/dist/backend/kiro-classic-links.js +135 -0
- package/dist/backend/kiro-classic-links.js.map +1 -0
- package/dist/backend/kiro-identity.d.ts +100 -1
- package/dist/backend/kiro-identity.js +262 -31
- package/dist/backend/kiro-identity.js.map +1 -1
- package/dist/backend/kiro-migration-verify.d.ts +10 -0
- package/dist/backend/kiro-migration-verify.js +52 -0
- package/dist/backend/kiro-migration-verify.js.map +1 -0
- package/dist/backend/kiro-reconcile-store.d.ts +27 -0
- package/dist/backend/kiro-reconcile-store.js +344 -0
- package/dist/backend/kiro-reconcile-store.js.map +1 -0
- package/dist/backend/kiro-v2-store-worker.js +35 -1
- package/dist/backend/kiro-v2-store-worker.js.map +1 -1
- package/dist/backend/kiro-v2-store.d.ts +31 -1
- package/dist/backend/kiro-v2-store.js +22 -12
- package/dist/backend/kiro-v2-store.js.map +1 -1
- package/dist/backend/kiro.d.ts +124 -1
- package/dist/backend/kiro.js +553 -29
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/types.d.ts +102 -0
- package/dist/backend/types.js +9 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/cache-service.d.ts +13 -1
- package/dist/cache-service.js +45 -2
- package/dist/cache-service.js.map +1 -1
- package/dist/channel/ipc-timeouts.js +3 -0
- package/dist/channel/ipc-timeouts.js.map +1 -1
- package/dist/channel/mcp-tools.js +40 -5
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/channel/tool-router.js +2 -1
- package/dist/channel/tool-router.js.map +1 -1
- package/dist/classic-channel-manager.d.ts +6 -0
- package/dist/classic-channel-manager.js +25 -0
- package/dist/classic-channel-manager.js.map +1 -1
- package/dist/cli.js +50 -4
- package/dist/cli.js.map +1 -1
- package/dist/config-validator.d.ts +7 -1
- package/dist/config-validator.js +17 -8
- package/dist/config-validator.js.map +1 -1
- package/dist/config.js +2 -0
- package/dist/config.js.map +1 -1
- package/dist/daemon.d.ts +66 -0
- package/dist/daemon.js +421 -19
- package/dist/daemon.js.map +1 -1
- package/dist/dashboard-permissions.d.ts +15 -4
- package/dist/dashboard-permissions.js +49 -23
- package/dist/dashboard-permissions.js.map +1 -1
- package/dist/doctor.js +2 -1
- package/dist/doctor.js.map +1 -1
- package/dist/fleet-control-audit.d.ts +1 -1
- package/dist/fleet-control-audit.js +3 -0
- package/dist/fleet-control-audit.js.map +1 -1
- package/dist/fleet-manager.d.ts +90 -3
- package/dist/fleet-manager.js +569 -41
- package/dist/fleet-manager.js.map +1 -1
- package/dist/forged-envelope-scan.d.ts +9 -0
- package/dist/forged-envelope-scan.js +30 -5
- package/dist/forged-envelope-scan.js.map +1 -1
- package/dist/general-instance.d.ts +24 -0
- package/dist/general-instance.js +53 -0
- package/dist/general-instance.js.map +1 -1
- package/dist/general-knowledge/skills/docker-install/SKILL.md +25 -0
- package/dist/general-knowledge/skills/fleet-config/SKILL.md +5 -3
- package/dist/general-knowledge/skills/fleet-restart/SKILL.md +1 -1
- package/dist/general-knowledge/skills/kiro-engine-migration/SKILL.md +34 -0
- package/dist/general-knowledge/skills/session-management/SKILL.md +1 -1
- package/dist/general-knowledge/skills/tui-effort/SKILL.md +1 -1
- package/dist/general-knowledge/skills/web-appearance/SKILL.canvas-worker-off.md +32 -0
- package/dist/general-knowledge/skills/web-appearance/SKILL.md +32 -0
- package/dist/general-knowledge/skills/web-dashboard/SKILL.canvas-worker-off.md +57 -17
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +57 -17
- package/dist/instance-config-impact.js +3 -2
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +4 -0
- package/dist/instance-lifecycle.js +7 -0
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/kiro-migrate.d.ts +19 -2
- package/dist/kiro-migrate.js +133 -35
- package/dist/kiro-migrate.js.map +1 -1
- package/dist/kiro-reconcile.d.ts +21 -0
- package/dist/kiro-reconcile.js +88 -0
- package/dist/kiro-reconcile.js.map +1 -0
- package/dist/kiro-session-proof.d.ts +41 -0
- package/dist/kiro-session-proof.js +89 -0
- package/dist/kiro-session-proof.js.map +1 -0
- package/dist/kiro-tui-forensic.d.ts +19 -0
- package/dist/kiro-tui-forensic.js +124 -0
- package/dist/kiro-tui-forensic.js.map +1 -0
- package/dist/locale.js +198 -0
- package/dist/locale.js.map +1 -1
- package/dist/log-service.js +2 -2
- package/dist/log-service.js.map +1 -1
- package/dist/needs-you.d.ts +3 -1
- package/dist/needs-you.js +4 -2
- package/dist/needs-you.js.map +1 -1
- package/dist/office-levels.d.ts +64 -0
- package/dist/office-levels.js +66 -0
- package/dist/office-levels.js.map +1 -0
- package/dist/office-share-page.d.ts +3 -1
- package/dist/office-share-page.js +8 -3
- package/dist/office-share-page.js.map +1 -1
- package/dist/office-share-service.d.ts +6 -3
- package/dist/office-share-service.js +12 -8
- package/dist/office-share-service.js.map +1 -1
- package/dist/office-share.d.ts +45 -8
- package/dist/office-share.js +75 -15
- package/dist/office-share.js.map +1 -1
- package/dist/outbound-handlers.js +20 -1
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +47 -2
- package/dist/outbound-schemas.js +41 -2
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/public-web-gateway.js +1 -1
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/quickstart-api.d.ts +39 -1
- package/dist/quickstart-api.js +115 -17
- package/dist/quickstart-api.js.map +1 -1
- package/dist/remote-card-answer.d.ts +83 -0
- package/dist/remote-card-answer.js +208 -0
- package/dist/remote-card-answer.js.map +1 -0
- package/dist/remote-card-prompt.d.ts +38 -0
- package/dist/remote-card-prompt.js +86 -0
- package/dist/remote-card-prompt.js.map +1 -0
- package/dist/scheduler/task-board.d.ts +28 -6
- package/dist/scheduler/task-board.js +66 -11
- package/dist/scheduler/task-board.js.map +1 -1
- package/dist/service-installer.d.ts +13 -0
- package/dist/service-installer.js +15 -0
- package/dist/service-installer.js.map +1 -1
- package/dist/service-owner.d.ts +25 -0
- package/dist/service-owner.js +43 -2
- package/dist/service-owner.js.map +1 -1
- package/dist/settings-api.d.ts +2 -0
- package/dist/settings-api.js +18 -12
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.js +10 -5
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-effect.js +7 -4
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-instance-patch.js +1 -1
- package/dist/settings-instance-patch.js.map +1 -1
- package/dist/setup-form.d.ts +2 -2
- package/dist/setup-form.js +139 -93
- package/dist/setup-form.js.map +1 -1
- package/dist/setup-i18n.d.ts +25 -0
- package/dist/setup-i18n.js +226 -0
- package/dist/setup-i18n.js.map +1 -0
- package/dist/task-board-waker.js +7 -2
- package/dist/task-board-waker.js.map +1 -1
- package/dist/tool-permissions.js +18 -0
- package/dist/tool-permissions.js.map +1 -1
- package/dist/transcript-sources.d.ts +1 -0
- package/dist/transcript-sources.js +20 -3
- package/dist/transcript-sources.js.map +1 -1
- package/dist/types.d.ts +10 -0
- package/dist/ui/backend-signin.js +4 -3
- package/dist/ui/chat-store.js +3 -2
- package/dist/ui/chat-strings.js +2 -2
- package/dist/ui/fleet-office-card.js +114 -0
- package/dist/ui/fleet-office-editor.js +81 -9
- package/dist/ui/fleet-office-layout.js +56 -11
- package/dist/ui/fleet-office-levels.js +105 -0
- package/dist/ui/fleet-office-model.js +9 -1
- package/dist/ui/fleet-office-pack.d.ts +15 -3
- package/dist/ui/fleet-office-pack.js +177 -23
- package/dist/ui/fleet-office-skin.js +39 -3
- package/dist/ui/fleet-office-store.js +74 -3
- package/dist/ui/fleet-office-view.js +8 -0
- package/dist/ui/fleet-office-zones.js +102 -19
- package/dist/ui/fleet-office.js +308 -44
- package/dist/ui/fleet-org.js +2 -0
- package/dist/ui/fleet-task-card.js +2 -2
- package/dist/ui/fleet-task-common.js +30 -7
- package/dist/ui/fleet-task-work.js +2 -2
- package/dist/ui/fleet-tasks.js +10 -11
- package/dist/ui/office-share-dialog.js +31 -7
- package/dist/ui/office-share-page.js +1 -0
- package/dist/ui/panel-chat.js +14 -2
- package/dist/ui/panel-log.js +4 -4
- package/dist/ui/panel-needs.js +1 -1
- package/dist/ui/panel-settings.js +16 -8
- package/dist/ui/settings-discord.js +3 -2
- package/dist/ui/settings-guests.js +17 -7
- package/dist/ui/settings-model.js +17 -9
- package/dist/ui/settings-registry.js +1 -0
- package/dist/ui/settings-strings.js +16 -4
- package/dist/ui/settings-token.js +3 -2
- package/dist/ui/settings-wizard.js +25 -9
- package/dist/ui/shared/app-i18n.js +2 -2
- package/dist/ui/shared/app-stream.js +1 -1
- package/dist/ui/shared/app.css +70 -2
- package/dist/ui/shared/setup-host-text.js +107 -0
- package/dist/ui/structured-signin.js +89 -38
- package/dist/usage-rollup.d.ts +34 -3
- package/dist/usage-rollup.js +56 -3
- package/dist/usage-rollup.js.map +1 -1
- package/dist/web-api.d.ts +10 -1
- package/dist/web-api.js +207 -17
- package/dist/web-api.js.map +1 -1
- package/dist/web-auth.js +1 -1
- package/dist/web-auth.js.map +1 -1
- package/dist/web-office-acts.d.ts +5 -2
- package/dist/web-office-acts.js +9 -4
- package/dist/web-office-acts.js.map +1 -1
- package/dist/web-office-pack-read.d.ts +35 -0
- package/dist/web-office-pack-read.js +252 -0
- package/dist/web-office-pack-read.js.map +1 -0
- package/dist/web-office-pack-tools.d.ts +241 -0
- package/dist/web-office-pack-tools.js +785 -0
- package/dist/web-office-pack-tools.js.map +1 -0
- package/dist/web-office-skins.d.ts +68 -4
- package/dist/web-office-skins.js +324 -33
- package/dist/web-office-skins.js.map +1 -1
- package/dist/web-office-store.d.ts +47 -4
- package/dist/web-office-store.js +124 -23
- package/dist/web-office-store.js.map +1 -1
- package/dist/web-settings-patch.d.ts +3 -1
- package/dist/web-settings-patch.js +4 -1
- package/dist/web-settings-patch.js.map +1 -1
- package/dist/workflow-templates/default.md +1 -1
- package/package.json +2 -2
- package/templates/windows-shortcuts.ps1 +18 -17
|
@@ -157,6 +157,10 @@ export interface ProjectStats {
|
|
|
157
157
|
/** A card as the dashboard draws it: references by card number. */
|
|
158
158
|
export interface CardView {
|
|
159
159
|
id: string;
|
|
160
|
+
/** #2080: in review needing the person's confirmation, or blocked on a question theirs (waitsForPerson): Waiting for you. */
|
|
161
|
+
waitsForPerson: boolean;
|
|
162
|
+
/** #2080: the instance that confirms it in review (its dispatcher, else its assignee); null when the person does. */
|
|
163
|
+
confirmer: string | null;
|
|
160
164
|
uuid: string;
|
|
161
165
|
kind: CardKind;
|
|
162
166
|
projectId: number | null;
|
|
@@ -224,7 +228,7 @@ export interface CardEvent {
|
|
|
224
228
|
* a main task went to the person by itself before its owner wrapped it up (wrap_up); or someone else cancelled it — a
|
|
225
229
|
* main task's cancel takes its unfinished sub tasks down with it, and their assignees hear (cancelled).
|
|
226
230
|
*/
|
|
227
|
-
export type WakeReason = "assigned" | "start" | "sent_back" | "answered" | "comment" | "ready" | "decide" | "to_confirm" | "approved" | "wrap_up" | "cancelled";
|
|
231
|
+
export type WakeReason = "assigned" | "start" | "sent_back" | "answered" | "comment" | "ready" | "decide" | "to_confirm" | "confirm_own" | "approved" | "wrap_up" | "cancelled";
|
|
228
232
|
/** One card's news for one instance from one committed write. Never sent to a page (it carries titles and text). */
|
|
229
233
|
export interface Wake {
|
|
230
234
|
instance: string;
|
|
@@ -371,6 +375,11 @@ export interface SearchHit {
|
|
|
371
375
|
export declare const personConfirms: (card: Pick<Card, "dispatcher">) => boolean;
|
|
372
376
|
/** Who that is, in words (an error, the card's text). */
|
|
373
377
|
export declare function confirmerOf(card: Pick<Card, "dispatcher" | "assignee">): string;
|
|
378
|
+
/**
|
|
379
|
+
* #2080: the instance that confirms a card in review (`confirms`' rule), or null when it is the person's — handed out by
|
|
380
|
+
* them, or by an instance deleted since (`gone`), or nobody's at all.
|
|
381
|
+
*/
|
|
382
|
+
export declare function confirmingInstance(card: Pick<Card, "dispatcher" | "assignee" | "createdBy">, gone?: GoneDispatcher): string | null;
|
|
374
383
|
/** "m3", "M - 3" → "M-3"; null when it is not a card number. */
|
|
375
384
|
export declare function cardCode(raw: string): string | null;
|
|
376
385
|
/**
|
|
@@ -462,10 +471,11 @@ export declare class TaskBoard {
|
|
|
462
471
|
/**
|
|
463
472
|
* Each project's numbers (by id; "none" for No project) over all its cards, finished ones included: main tasks,
|
|
464
473
|
* work units (a main task's sub tasks, or one unit for a main task without them; a done main task counts all its
|
|
465
|
-
* units done), cards waiting for the person and blocked, and the last change. One pass over the table.
|
|
474
|
+
* units done), cards waiting for the person and blocked, and the last change. One pass over the table. #2080: waiting
|
|
475
|
+
* counts only the cards in review the person confirms (waitsForPerson, `gone` as for Needs you), never an agent's.
|
|
466
476
|
*/
|
|
467
|
-
projectStats(): Record<string, ProjectStats>;
|
|
468
|
-
view(card: Card, scope?: ReadScope): CardView;
|
|
477
|
+
projectStats(gone?: GoneDispatcher): Record<string, ProjectStats>;
|
|
478
|
+
view(card: Card, scope?: ReadScope, gone?: GoneDispatcher): CardView;
|
|
469
479
|
/** ` AND <column> NOT IN (…)` for a scope's left-out authors, with its values (empty when none). */
|
|
470
480
|
private notBy;
|
|
471
481
|
/**
|
|
@@ -474,8 +484,13 @@ export declare class TaskBoard {
|
|
|
474
484
|
* queries per card: a board read stays a handful of statements however many cards it has (it runs on the fleet's
|
|
475
485
|
* event loop). Same answers as progress(), unmetDeps() and newComments() card by card.
|
|
476
486
|
*/
|
|
477
|
-
views(cards: Card[], scope?: ReadScope): CardView[];
|
|
478
|
-
detail(ref: string, scope?: ReadScope): CardDetail;
|
|
487
|
+
views(cards: Card[], scope?: ReadScope, gone?: GoneDispatcher): CardView[];
|
|
488
|
+
detail(ref: string, scope?: ReadScope, gone?: GoneDispatcher): CardDetail;
|
|
489
|
+
/**
|
|
490
|
+
* #2757 review: the instance dispatchers on the board that `gone` says are gone, as one string — what a cached read
|
|
491
|
+
* that names waitsForPerson / confirmer must also be keyed by (a dispatcher deleted changes them, the revision not).
|
|
492
|
+
*/
|
|
493
|
+
goneDispatchers(gone?: GoneDispatcher): string;
|
|
479
494
|
/** The latest `limit` entries of a card, oldest first. */
|
|
480
495
|
entries(uuid: string, kinds: EntryKind[], limit?: number): Entry[];
|
|
481
496
|
/** Comments and rejections by others that the assignee has not acted on yet. */
|
|
@@ -615,6 +630,13 @@ export declare class TaskBoard {
|
|
|
615
630
|
result?: string;
|
|
616
631
|
priority?: CardPriority;
|
|
617
632
|
}): Card;
|
|
633
|
+
/**
|
|
634
|
+
* #2080: review for an instance's own confirmation is done. An instance moving a card to review that it confirms itself
|
|
635
|
+
* (nobody else handed it out, or it handed it to itself) would wait for nobody but itself — and sat there unnoticed,
|
|
636
|
+
* in the person's Waiting for you too: it finishes instead (the checks for review are the ones for done). A person's
|
|
637
|
+
* move, and a card someone else confirms, stay as asked.
|
|
638
|
+
*/
|
|
639
|
+
private ownReview;
|
|
618
640
|
/**
|
|
619
641
|
* Cards moved by hand: sub tasks, and main tasks that have no sub tasks. `comment` is the move's own comment (a
|
|
620
642
|
* dispatcher's answer); `finishing`: a claim on the way to done (the `task` tool's done of an open card).
|
|
@@ -120,6 +120,17 @@ export function confirmerOf(card) {
|
|
|
120
120
|
return card.dispatcher.name;
|
|
121
121
|
return card.assignee ?? "its assignee";
|
|
122
122
|
}
|
|
123
|
+
/**
|
|
124
|
+
* #2080: the instance that confirms a card in review (`confirms`' rule), or null when it is the person's — handed out by
|
|
125
|
+
* them, or by an instance deleted since (`gone`), or nobody's at all.
|
|
126
|
+
*/
|
|
127
|
+
export function confirmingInstance(card, gone) {
|
|
128
|
+
if (personConfirms(card) || orphaned(card, gone))
|
|
129
|
+
return null;
|
|
130
|
+
if (card.dispatcher?.kind === "instance")
|
|
131
|
+
return card.dispatcher.name;
|
|
132
|
+
return card.assignee ?? (card.createdBy || null);
|
|
133
|
+
}
|
|
123
134
|
function normalizeAssignee(raw) {
|
|
124
135
|
const v = raw?.trim() ?? "";
|
|
125
136
|
if (v === "" || v.toLowerCase() === "none")
|
|
@@ -518,10 +529,11 @@ export class TaskBoard {
|
|
|
518
529
|
/**
|
|
519
530
|
* Each project's numbers (by id; "none" for No project) over all its cards, finished ones included: main tasks,
|
|
520
531
|
* work units (a main task's sub tasks, or one unit for a main task without them; a done main task counts all its
|
|
521
|
-
* units done), cards waiting for the person and blocked, and the last change. One pass over the table.
|
|
532
|
+
* units done), cards waiting for the person and blocked, and the last change. One pass over the table. #2080: waiting
|
|
533
|
+
* counts only the cards in review the person confirms (waitsForPerson, `gone` as for Needs you), never an agent's.
|
|
522
534
|
*/
|
|
523
|
-
projectStats() {
|
|
524
|
-
const rows = this.db.prepare("SELECT id, kind, status, project_id, parent_id, updated_at FROM tasks").all();
|
|
535
|
+
projectStats(gone) {
|
|
536
|
+
const rows = this.db.prepare("SELECT id, kind, status, project_id, parent_id, updated_at, needs_review, dispatcher, dispatcher_kind FROM tasks").all();
|
|
525
537
|
const subs = new Map();
|
|
526
538
|
for (const r of rows) {
|
|
527
539
|
if (r.kind !== "sub" || !r.parent_id || r.status === "cancelled")
|
|
@@ -540,7 +552,8 @@ export class TaskBoard {
|
|
|
540
552
|
const status = r.status;
|
|
541
553
|
if (status === "cancelled")
|
|
542
554
|
continue;
|
|
543
|
-
if (status === "review")
|
|
555
|
+
if (status === "review" && waitsForPerson({ status, needsReview: Number(r.needs_review) === 1,
|
|
556
|
+
dispatcher: r.dispatcher ? { kind: r.dispatcher_kind === "person" ? "person" : "instance", name: r.dispatcher } : null }, gone))
|
|
544
557
|
st.waiting++;
|
|
545
558
|
if (status === "blocked")
|
|
546
559
|
st.blocked++;
|
|
@@ -565,8 +578,8 @@ export class TaskBoard {
|
|
|
565
578
|
st.percent = st.units.total ? Math.round((st.units.done / st.units.total) * 100) : 0;
|
|
566
579
|
return out;
|
|
567
580
|
}
|
|
568
|
-
view(card, scope = {}) {
|
|
569
|
-
return this.views([card], scope)[0];
|
|
581
|
+
view(card, scope = {}, gone) {
|
|
582
|
+
return this.views([card], scope, gone)[0];
|
|
570
583
|
}
|
|
571
584
|
/** ` AND <column> NOT IN (…)` for a scope's left-out authors, with its values (empty when none). */
|
|
572
585
|
notBy(scope, column) {
|
|
@@ -579,7 +592,7 @@ export class TaskBoard {
|
|
|
579
592
|
* queries per card: a board read stays a handful of statements however many cards it has (it runs on the fleet's
|
|
580
593
|
* event loop). Same answers as progress(), unmetDeps() and newComments() card by card.
|
|
581
594
|
*/
|
|
582
|
-
views(cards, scope = {}) {
|
|
595
|
+
views(cards, scope = {}, gone) {
|
|
583
596
|
if (!cards.length)
|
|
584
597
|
return [];
|
|
585
598
|
const all = new Map();
|
|
@@ -618,6 +631,8 @@ export class TaskBoard {
|
|
|
618
631
|
const c = comments.get(card.uuid);
|
|
619
632
|
return {
|
|
620
633
|
id: card.code,
|
|
634
|
+
waitsForPerson: waitsForPerson(card, gone),
|
|
635
|
+
confirmer: confirmingInstance(card, gone),
|
|
621
636
|
uuid: card.uuid,
|
|
622
637
|
kind: card.kind,
|
|
623
638
|
projectId: card.projectId,
|
|
@@ -653,18 +668,28 @@ export class TaskBoard {
|
|
|
653
668
|
};
|
|
654
669
|
});
|
|
655
670
|
}
|
|
656
|
-
detail(ref, scope = {}) {
|
|
671
|
+
detail(ref, scope = {}, gone) {
|
|
657
672
|
const card = this.getCard(ref);
|
|
658
673
|
const parent = card.parent ? this.byUuid(card.parent) : undefined;
|
|
659
674
|
return {
|
|
660
|
-
card: this.view(card, scope),
|
|
675
|
+
card: this.view(card, scope, gone),
|
|
661
676
|
parent: parent ? { id: parent.code, title: parent.title, status: parent.status } : null,
|
|
662
|
-
children: this.views(this.children(card.uuid), scope),
|
|
677
|
+
children: this.views(this.children(card.uuid), scope, gone),
|
|
663
678
|
comments: this.entries(card.uuid, ["comment", "reject", "approve"], 200),
|
|
664
679
|
logs: this.entries(card.uuid, ["log"], 200),
|
|
665
680
|
history: this.events(card.uuid, 200).filter((e) => e.type !== "reordered"),
|
|
666
681
|
};
|
|
667
682
|
}
|
|
683
|
+
/**
|
|
684
|
+
* #2757 review: the instance dispatchers on the board that `gone` says are gone, as one string — what a cached read
|
|
685
|
+
* that names waitsForPerson / confirmer must also be keyed by (a dispatcher deleted changes them, the revision not).
|
|
686
|
+
*/
|
|
687
|
+
goneDispatchers(gone) {
|
|
688
|
+
if (!gone)
|
|
689
|
+
return "";
|
|
690
|
+
const rows = this.db.prepare("SELECT DISTINCT dispatcher FROM tasks WHERE dispatcher IS NOT NULL AND (dispatcher_kind IS NULL OR dispatcher_kind != 'person')").all();
|
|
691
|
+
return rows.map((r) => r.dispatcher).filter((n) => gone(n)).sort().join("\u0000");
|
|
692
|
+
}
|
|
668
693
|
/** The latest `limit` entries of a card, oldest first. */
|
|
669
694
|
entries(uuid, kinds, limit = 20) {
|
|
670
695
|
const rows = this.db.prepare(`SELECT * FROM task_entries WHERE task_id = ? AND kind IN (${kinds.map(() => "?").join(", ")}) ORDER BY id DESC LIMIT ?`)
|
|
@@ -1249,7 +1274,7 @@ export class TaskBoard {
|
|
|
1249
1274
|
this.checkDerivedMove(card, actor, to, reason, { comment });
|
|
1250
1275
|
else
|
|
1251
1276
|
this.checkManualMove(card, actor, to, reason, { comment });
|
|
1252
|
-
this.applyMove(card, actor, to, reason, comment);
|
|
1277
|
+
this.applyMove(card, actor, this.ownReview(card, actor, to, reason), reason, comment);
|
|
1253
1278
|
return { card, from, ...this.spoken() };
|
|
1254
1279
|
});
|
|
1255
1280
|
}
|
|
@@ -1429,6 +1454,8 @@ export class TaskBoard {
|
|
|
1429
1454
|
if (held && to !== card.status)
|
|
1430
1455
|
this.checkManualMove(card, actor, to, "");
|
|
1431
1456
|
}
|
|
1457
|
+
// #2757 review: a derived main task too; a card off the board (not held) keeps the tool's old, unchecked finish.
|
|
1458
|
+
to = this.ownReview(card, actor, to, "", held);
|
|
1432
1459
|
}
|
|
1433
1460
|
if (to !== card.status) {
|
|
1434
1461
|
this.applyMove(card, actor, to, "");
|
|
@@ -1447,6 +1474,21 @@ export class TaskBoard {
|
|
|
1447
1474
|
});
|
|
1448
1475
|
}
|
|
1449
1476
|
// ── Rules ───────────────────────────────────────────────
|
|
1477
|
+
/**
|
|
1478
|
+
* #2080: review for an instance's own confirmation is done. An instance moving a card to review that it confirms itself
|
|
1479
|
+
* (nobody else handed it out, or it handed it to itself) would wait for nobody but itself — and sat there unnoticed,
|
|
1480
|
+
* in the person's Waiting for you too: it finishes instead (the checks for review are the ones for done). A person's
|
|
1481
|
+
* move, and a card someone else confirms, stay as asked.
|
|
1482
|
+
*/
|
|
1483
|
+
ownReview(card, actor, to, reason = "", check = true) {
|
|
1484
|
+
if (to !== "review" || isPerson(actor) || card.status === "review" || !confirms(card, actor))
|
|
1485
|
+
return to;
|
|
1486
|
+
// #2757 review: finished as done is, whichever way it came (a derived main task's review checks less).
|
|
1487
|
+
if (check)
|
|
1488
|
+
this.checkFinish(card, true, reason);
|
|
1489
|
+
this.say("own_review", [card.code], `${card.code} waits for nobody else's confirmation (you confirm it): done, not review`);
|
|
1490
|
+
return "done";
|
|
1491
|
+
}
|
|
1450
1492
|
/**
|
|
1451
1493
|
* Cards moved by hand: sub tasks, and main tasks that have no sub tasks. `comment` is the move's own comment (a
|
|
1452
1494
|
* dispatcher's answer); `finishing`: a claim on the way to done (the `task` tool's done of an open card).
|
|
@@ -1628,6 +1670,13 @@ export class TaskBoard {
|
|
|
1628
1670
|
return;
|
|
1629
1671
|
}
|
|
1630
1672
|
if (ai) {
|
|
1673
|
+
// #2080: a main task in review by itself (its sub tasks done) is finished by the instance that confirms it.
|
|
1674
|
+
if (from === "review" && to === "done" && confirms(card, actor)) {
|
|
1675
|
+
if (reason)
|
|
1676
|
+
this.entry(card, "approve", actor, reason);
|
|
1677
|
+
this.checkFinish(card, ai, reason);
|
|
1678
|
+
return;
|
|
1679
|
+
}
|
|
1631
1680
|
if (from === "claimed" && to === "review") {
|
|
1632
1681
|
if (!own)
|
|
1633
1682
|
throw notOwner();
|
|
@@ -1921,6 +1970,10 @@ export class TaskBoard {
|
|
|
1921
1970
|
// person's card has no instance dispatcher, so no notice: the person has it in Needs you.
|
|
1922
1971
|
if (d.to === "review" && !isPerson(e.actor) && requiresReview(card))
|
|
1923
1972
|
add(card, dispatcherOf(), "to_confirm", e.actor);
|
|
1973
|
+
// #2080: a card its own assignee confirms, in review by itself (its sub tasks done) or by someone else's move:
|
|
1974
|
+
// nobody else will confirm it, so its assignee is told it is theirs.
|
|
1975
|
+
if (d.to === "review" && card.assignee && confirmingInstance(card) === card.assignee)
|
|
1976
|
+
add(card, card.assignee, "confirm_own", e.actor);
|
|
1924
1977
|
if (d.auto) {
|
|
1925
1978
|
if (d.to === "review" && card.kind === "main" && wrapUpGap(card))
|
|
1926
1979
|
add(card, card.assignee, "wrap_up", e.actor);
|
|
@@ -1980,6 +2033,8 @@ export class TaskBoard {
|
|
|
1980
2033
|
return handedOut && card.status === "review" && requiresReview(card);
|
|
1981
2034
|
if (!own)
|
|
1982
2035
|
return false;
|
|
2036
|
+
if (r === "confirm_own")
|
|
2037
|
+
return card.status === "review" && confirmingInstance(card) === wake.instance;
|
|
1983
2038
|
if (r === "wrap_up")
|
|
1984
2039
|
return card.status === "review" && wrapUpGap(card) !== null;
|
|
1985
2040
|
if (r === "assigned")
|