@juicesharp/rpiv-todo 2.13.8 → 2.13.9

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 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.js";
25
- import { I18N_NAMESPACE } from "./state/i18n-bridge.js";
26
- import { replayFromBranch } from "./state/replay.js";
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.js";
36
- import { registerTodosCommand, registerTodoTool, TOOL_NAME } from "./todo.js";
37
- import type { TodoOverlay } from "./todo-overlay.js";
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.js");
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.js"),
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.js")) {
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.8",
3
+ "version": "2.13.9",
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.8"
73
+ "@juicesharp/rpiv-config": "^2.13.9"
74
74
  }
75
75
  }
@@ -19,7 +19,7 @@
19
19
  * `const X = formatStatusLabel(...)`.
20
20
  */
21
21
 
22
- import type { TaskStatus } from "../tool/types.js";
22
+ import type { TaskStatus } from "../tool/types.ts";
23
23
 
24
24
  export const I18N_NAMESPACE = "@juicesharp/rpiv-todo";
25
25
 
@@ -1,4 +1,4 @@
1
- import type { TaskStatus } from "../tool/types.js";
1
+ import type { TaskStatus } from "../tool/types.ts";
2
2
 
3
3
  /**
4
4
  * Allowed forward transitions per source status. `completed` is one-way to
package/state/replay.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { TaskDetails } from "../tool/types.js";
2
- import { EMPTY_STATE, type TaskState } from "./state.js";
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`
@@ -1,5 +1,5 @@
1
- import type { Task, TaskStatus } from "../tool/types.js";
2
- import type { TaskState } from "./state.js";
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[] {
@@ -1,7 +1,7 @@
1
- import type { Task, TaskAction, TaskMutationParams, TaskStatus } from "../tool/types.js";
2
- import { isTransitionValid } from "./invariants.js";
3
- import type { TaskState } from "./state.js";
4
- import { detectCycle } from "./task-graph.js";
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
@@ -1,4 +1,4 @@
1
- import type { Task } from "../tool/types.js";
1
+ import type { Task } from "../tool/types.ts";
2
2
 
3
3
  /**
4
4
  * Canonical state for the todo tool. Single source of truth — both the reducer
package/state/store.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { Task } from "../tool/types.js";
2
- import { EMPTY_STATE, type TaskState } from "./state.js";
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
@@ -1,4 +1,4 @@
1
- import type { Task } from "../tool/types.js";
1
+ import type { Task } from "../tool/types.ts";
2
2
 
3
3
  /**
4
4
  * Detect whether merging `newBlockedBy` into `taskId`'s `blockedBy` set would
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.js";
18
- import { formatStatusLabel, t } from "./state/i18n-bridge.js";
19
- import { selectHasActive, selectOverlayLayout, selectShowTaskIds, selectTodoCounts } from "./state/selectors.js";
20
- import { getRenderState } from "./state/store.js";
21
- import { formatOverlayTaskLine } from "./view/format.js";
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.js";
17
- import { formatStatusLabel, t } from "./state/i18n-bridge.js";
18
- import { selectTasksByStatus, selectTodoCounts, selectVisibleTasks } from "./state/selectors.js";
19
- import { applyTaskMutation, changesState } from "./state/state-reducer.js";
20
- import { commitState, getRenderState, getState, sid } from "./state/store.js";
21
- import { buildToolResult } from "./tool/response-envelope.js";
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.js";
32
- import { formatCommandTaskLine, renderTodoCall, renderTodoResult } from "./view/format.js";
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.js";
46
- export { applyTaskMutation } from "./state/state-reducer.js";
47
- export { __resetState, getNextId, getTodos, setActiveRenderSession, sid } from "./state/store.js";
48
- export { deriveBlocks, detectCycle } from "./state/task-graph.js";
49
- export type { Task, TaskAction, TaskDetails, TaskStatus } from "./tool/types.js";
50
- export { TOOL_NAME } from "./tool/types.js";
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.js";
2
- import type { Op } from "../state/state-reducer.js";
3
- import { deriveBlocks } from "../state/task-graph.js";
4
- import { sanitizeTerminalText } from "./sanitize.js";
5
- import type { Task, TaskAction, TaskDetails, TaskMutationParams } from "./types.js";
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.js";
4
- import { selectTaskSubjectById } from "../state/selectors.js";
5
- import type { TaskState } from "../state/state.js";
6
- import { sanitizeTerminalText } from "../tool/sanitize.js";
7
- import type { Task, TaskAction, TaskDetails, TaskMutationParams, TaskStatus } from "../tool/types.js";
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.