@juicesharp/rpiv-todo 2.13.8 → 2.13.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/index.ts +9 -9
- package/package.json +2 -2
- package/state/i18n-bridge.ts +1 -1
- package/state/invariants.ts +1 -1
- package/state/replay.ts +2 -2
- package/state/selectors.ts +2 -2
- package/state/state-reducer.ts +4 -4
- package/state/state.ts +1 -1
- package/state/store.ts +2 -2
- package/state/task-graph.ts +1 -1
- package/todo-overlay.ts +5 -5
- package/todo.ts +14 -14
- package/tool/response-envelope.ts +5 -5
- package/view/format.ts +5 -5
package/index.ts
CHANGED
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
|
|
22
22
|
import type { ExtensionAPI, ExtensionUIContext } from "@earendil-works/pi-coding-agent";
|
|
23
23
|
import type { KeyId } from "@earendil-works/pi-tui";
|
|
24
|
-
import { COLLAPSE_KEY_OFF, resolveCollapseKey } from "./config.
|
|
25
|
-
import { I18N_NAMESPACE } from "./state/i18n-bridge.
|
|
26
|
-
import { replayFromBranch } from "./state/replay.
|
|
24
|
+
import { COLLAPSE_KEY_OFF, resolveCollapseKey } from "./config.ts";
|
|
25
|
+
import { I18N_NAMESPACE } from "./state/i18n-bridge.ts";
|
|
26
|
+
import { replayFromBranch } from "./state/replay.ts";
|
|
27
27
|
import {
|
|
28
28
|
clearActiveRenderSession,
|
|
29
29
|
evictSession,
|
|
@@ -32,9 +32,9 @@ import {
|
|
|
32
32
|
replaceState,
|
|
33
33
|
setActiveRenderSession,
|
|
34
34
|
sid,
|
|
35
|
-
} from "./state/store.
|
|
36
|
-
import { registerTodosCommand, registerTodoTool, TOOL_NAME } from "./todo.
|
|
37
|
-
import type { TodoOverlay } from "./todo-overlay.
|
|
35
|
+
} from "./state/store.ts";
|
|
36
|
+
import { registerTodosCommand, registerTodoTool, TOOL_NAME } from "./todo.ts";
|
|
37
|
+
import type { TodoOverlay } from "./todo-overlay.ts";
|
|
38
38
|
|
|
39
39
|
type I18nLoader = {
|
|
40
40
|
registerLocalesFromDir: (namespace: string, packageUrl: string, options?: { label?: string }) => void;
|
|
@@ -43,7 +43,7 @@ type I18nLoader = {
|
|
|
43
43
|
/** Delay the overlay graph pre-warm until Pi's startup work has settled. */
|
|
44
44
|
export const PREWARM_DELAY_MS = 2000;
|
|
45
45
|
|
|
46
|
-
type TodoOverlayModule = typeof import("./todo-overlay.
|
|
46
|
+
type TodoOverlayModule = typeof import("./todo-overlay.ts");
|
|
47
47
|
type TodoOverlayImporter = () => Promise<TodoOverlayModule>;
|
|
48
48
|
|
|
49
49
|
/**
|
|
@@ -65,7 +65,7 @@ export function isStaleOverlayModuleError(e: unknown): boolean {
|
|
|
65
65
|
* error instead of a bare "TodoOverlay is not a constructor" TypeError.
|
|
66
66
|
*/
|
|
67
67
|
export function makeTodoOverlayLoader(
|
|
68
|
-
importOverlay: TodoOverlayImporter = () => import("./todo-overlay.
|
|
68
|
+
importOverlay: TodoOverlayImporter = () => import("./todo-overlay.ts"),
|
|
69
69
|
): TodoOverlayImporter {
|
|
70
70
|
let memo: Promise<TodoOverlayModule> | undefined;
|
|
71
71
|
|
|
@@ -125,7 +125,7 @@ function formatError(e: unknown): string {
|
|
|
125
125
|
return e instanceof Error ? e.message : String(e);
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
export default function (pi: ExtensionAPI, importOverlay: TodoOverlayImporter = () => import("./todo-overlay.
|
|
128
|
+
export default function (pi: ExtensionAPI, importOverlay: TodoOverlayImporter = () => import("./todo-overlay.ts")) {
|
|
129
129
|
let todoOverlay: TodoOverlay | undefined;
|
|
130
130
|
const loadTodoOverlay = makeTodoOverlayLoader(importOverlay);
|
|
131
131
|
let uiCtx: ExtensionUIContext | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juicesharp/rpiv-todo",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.10",
|
|
4
4
|
"description": "Pi extension. A todo list for the model, rendered as a live overlay that survives /reload and conversation compaction.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -70,6 +70,6 @@
|
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@juicesharp/rpiv-config": "^2.13.
|
|
73
|
+
"@juicesharp/rpiv-config": "^2.13.10"
|
|
74
74
|
}
|
|
75
75
|
}
|
package/state/i18n-bridge.ts
CHANGED
package/state/invariants.ts
CHANGED
package/state/replay.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TaskDetails } from "../tool/types.
|
|
2
|
-
import { EMPTY_STATE, type TaskState } from "./state.
|
|
1
|
+
import type { TaskDetails } from "../tool/types.ts";
|
|
2
|
+
import { EMPTY_STATE, type TaskState } from "./state.ts";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Discriminator for `details` envelopes that match the persisted `TaskDetails`
|
package/state/selectors.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Task, TaskStatus } from "../tool/types.
|
|
2
|
-
import type { TaskState } from "./state.
|
|
1
|
+
import type { Task, TaskStatus } from "../tool/types.ts";
|
|
2
|
+
import type { TaskState } from "./state.ts";
|
|
3
3
|
|
|
4
4
|
/** Tasks excluding deleted tombstones — the canonical "what's visible". */
|
|
5
5
|
export function selectVisibleTasks(state: TaskState): readonly Task[] {
|
package/state/state-reducer.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Task, TaskAction, TaskMutationParams, TaskStatus } from "../tool/types.
|
|
2
|
-
import { isTransitionValid } from "./invariants.
|
|
3
|
-
import type { TaskState } from "./state.
|
|
4
|
-
import { detectCycle } from "./task-graph.
|
|
1
|
+
import type { Task, TaskAction, TaskMutationParams, TaskStatus } from "../tool/types.ts";
|
|
2
|
+
import { isTransitionValid } from "./invariants.ts";
|
|
3
|
+
import type { TaskState } from "./state.ts";
|
|
4
|
+
import { detectCycle } from "./task-graph.ts";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Reducer outcome. Closed tagged union — adding a new action requires extending
|
package/state/state.ts
CHANGED
package/state/store.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Task } from "../tool/types.
|
|
2
|
-
import { EMPTY_STATE, type TaskState } from "./state.
|
|
1
|
+
import type { Task } from "../tool/types.ts";
|
|
2
|
+
import { EMPTY_STATE, type TaskState } from "./state.ts";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Per-session live state: a Map partitioned by session id, so a detached/child
|
package/state/task-graph.ts
CHANGED
package/todo-overlay.ts
CHANGED
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
|
|
15
15
|
import type { ExtensionUIContext, Theme } from "@earendil-works/pi-coding-agent";
|
|
16
16
|
import { type TUI, truncateToWidth } from "@earendil-works/pi-tui";
|
|
17
|
-
import { COLLAPSE_KEY_OFF, getMaxWidgetLines, resolveCollapseKey } from "./config.
|
|
18
|
-
import { formatStatusLabel, t } from "./state/i18n-bridge.
|
|
19
|
-
import { selectHasActive, selectOverlayLayout, selectShowTaskIds, selectTodoCounts } from "./state/selectors.
|
|
20
|
-
import { getRenderState } from "./state/store.
|
|
21
|
-
import { formatOverlayTaskLine } from "./view/format.
|
|
17
|
+
import { COLLAPSE_KEY_OFF, getMaxWidgetLines, resolveCollapseKey } from "./config.ts";
|
|
18
|
+
import { formatStatusLabel, t } from "./state/i18n-bridge.ts";
|
|
19
|
+
import { selectHasActive, selectOverlayLayout, selectShowTaskIds, selectTodoCounts } from "./state/selectors.ts";
|
|
20
|
+
import { getRenderState } from "./state/store.ts";
|
|
21
|
+
import { formatOverlayTaskLine } from "./view/format.ts";
|
|
22
22
|
|
|
23
23
|
const WIDGET_KEY = "rpiv-todos";
|
|
24
24
|
|
package/todo.ts
CHANGED
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
16
|
-
import { loadConfig, validateGuidanceFields } from "./config.
|
|
17
|
-
import { formatStatusLabel, t } from "./state/i18n-bridge.
|
|
18
|
-
import { selectTasksByStatus, selectTodoCounts, selectVisibleTasks } from "./state/selectors.
|
|
19
|
-
import { applyTaskMutation, changesState } from "./state/state-reducer.
|
|
20
|
-
import { commitState, getRenderState, getState, sid } from "./state/store.
|
|
21
|
-
import { buildToolResult } from "./tool/response-envelope.
|
|
16
|
+
import { loadConfig, validateGuidanceFields } from "./config.ts";
|
|
17
|
+
import { formatStatusLabel, t } from "./state/i18n-bridge.ts";
|
|
18
|
+
import { selectTasksByStatus, selectTodoCounts, selectVisibleTasks } from "./state/selectors.ts";
|
|
19
|
+
import { applyTaskMutation, changesState } from "./state/state-reducer.ts";
|
|
20
|
+
import { commitState, getRenderState, getState, sid } from "./state/store.ts";
|
|
21
|
+
import { buildToolResult } from "./tool/response-envelope.ts";
|
|
22
22
|
import {
|
|
23
23
|
COMMAND_NAME,
|
|
24
24
|
ERR_REQUIRES_INTERACTIVE,
|
|
@@ -28,8 +28,8 @@ import {
|
|
|
28
28
|
TOOL_LABEL,
|
|
29
29
|
TOOL_NAME,
|
|
30
30
|
TodoParamsSchema,
|
|
31
|
-
} from "./tool/types.
|
|
32
|
-
import { formatCommandTaskLine, renderTodoCall, renderTodoResult } from "./view/format.
|
|
31
|
+
} from "./tool/types.ts";
|
|
32
|
+
import { formatCommandTaskLine, renderTodoCall, renderTodoResult } from "./view/format.ts";
|
|
33
33
|
|
|
34
34
|
// English fallbacks for localized /todos section headers — the box-drawing
|
|
35
35
|
// decoration is part of the localized string so translators can adjust spacing.
|
|
@@ -42,12 +42,12 @@ const SECTION_COMPLETED = "── Completed ──";
|
|
|
42
42
|
// importing from `./todo.js`. New code may opt into deeper imports.
|
|
43
43
|
// ---------------------------------------------------------------------------
|
|
44
44
|
|
|
45
|
-
export { isTransitionValid } from "./state/invariants.
|
|
46
|
-
export { applyTaskMutation } from "./state/state-reducer.
|
|
47
|
-
export { __resetState, getNextId, getTodos, setActiveRenderSession, sid } from "./state/store.
|
|
48
|
-
export { deriveBlocks, detectCycle } from "./state/task-graph.
|
|
49
|
-
export type { Task, TaskAction, TaskDetails, TaskStatus } from "./tool/types.
|
|
50
|
-
export { TOOL_NAME } from "./tool/types.
|
|
45
|
+
export { isTransitionValid } from "./state/invariants.ts";
|
|
46
|
+
export { applyTaskMutation } from "./state/state-reducer.ts";
|
|
47
|
+
export { __resetState, getNextId, getTodos, setActiveRenderSession, sid } from "./state/store.ts";
|
|
48
|
+
export { deriveBlocks, detectCycle } from "./state/task-graph.ts";
|
|
49
|
+
export type { Task, TaskAction, TaskDetails, TaskStatus } from "./tool/types.ts";
|
|
50
|
+
export { TOOL_NAME } from "./tool/types.ts";
|
|
51
51
|
|
|
52
52
|
// ---------------------------------------------------------------------------
|
|
53
53
|
// Tool registration
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { TaskState } from "../state/state.
|
|
2
|
-
import type { Op } from "../state/state-reducer.
|
|
3
|
-
import { deriveBlocks } from "../state/task-graph.
|
|
4
|
-
import { sanitizeTerminalText } from "./sanitize.
|
|
5
|
-
import type { Task, TaskAction, TaskDetails, TaskMutationParams } from "./types.
|
|
1
|
+
import type { TaskState } from "../state/state.ts";
|
|
2
|
+
import type { Op } from "../state/state-reducer.ts";
|
|
3
|
+
import { deriveBlocks } from "../state/task-graph.ts";
|
|
4
|
+
import { sanitizeTerminalText } from "./sanitize.ts";
|
|
5
|
+
import type { Task, TaskAction, TaskDetails, TaskMutationParams } from "./types.ts";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Format a single task as a `[status] #id subject [(activeForm)] [⛓ #dep,…]`
|
package/view/format.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Theme } from "@earendil-works/pi-coding-agent";
|
|
2
2
|
import { Text } from "@earendil-works/pi-tui";
|
|
3
|
-
import { formatStatusLabel } from "../state/i18n-bridge.
|
|
4
|
-
import { selectTaskSubjectById } from "../state/selectors.
|
|
5
|
-
import type { TaskState } from "../state/state.
|
|
6
|
-
import { sanitizeTerminalText } from "../tool/sanitize.
|
|
7
|
-
import type { Task, TaskAction, TaskDetails, TaskMutationParams, TaskStatus } from "../tool/types.
|
|
3
|
+
import { formatStatusLabel } from "../state/i18n-bridge.ts";
|
|
4
|
+
import { selectTaskSubjectById } from "../state/selectors.ts";
|
|
5
|
+
import type { TaskState } from "../state/state.ts";
|
|
6
|
+
import { sanitizeTerminalText } from "../tool/sanitize.ts";
|
|
7
|
+
import type { Task, TaskAction, TaskDetails, TaskMutationParams, TaskStatus } from "../tool/types.ts";
|
|
8
8
|
|
|
9
9
|
// Re-export so legacy import paths (todo.ts, tests) continue to resolve;
|
|
10
10
|
// the canonical definition lives in the i18n bridge.
|