@ordewell/core 0.4.9 → 0.4.11

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.
Files changed (46) hide show
  1. package/dist/{ITerminalRunner-CbE6gKLI.d.ts → ITerminalRunner-BTaKZ659.d.mts} +2 -2
  2. package/dist/{ITerminalRunner-1NAv8wCC.d.mts → ITerminalRunner-DVwORcV9.d.ts} +2 -2
  3. package/dist/ModeResolver-CCKYqdZC.d.mts +44 -0
  4. package/dist/ModeResolver-CzZd-i6T.d.ts +44 -0
  5. package/dist/{Task-1NwmUImI.d.mts → Task-cGrfYRXK.d.mts} +8 -1
  6. package/dist/{Task-1NwmUImI.d.ts → Task-cGrfYRXK.d.ts} +8 -1
  7. package/dist/chunk-DNNZGH3I.mjs +862 -0
  8. package/dist/chunk-DNNZGH3I.mjs.map +1 -0
  9. package/dist/chunk-HPNUFBIT.mjs +19 -0
  10. package/dist/chunk-HPNUFBIT.mjs.map +1 -0
  11. package/dist/{chunk-SRGQBGI5.mjs → chunk-N6HTBUKG.mjs} +13 -1
  12. package/dist/{chunk-SRGQBGI5.mjs.map → chunk-N6HTBUKG.mjs.map} +1 -1
  13. package/dist/{chunk-YXAIQKVE.mjs → chunk-UEJ3SZQ7.mjs} +2 -2
  14. package/dist/index.d.mts +284 -80
  15. package/dist/index.d.ts +284 -80
  16. package/dist/index.js +1670 -820
  17. package/dist/index.js.map +1 -1
  18. package/dist/index.mjs +1067 -597
  19. package/dist/index.mjs.map +1 -1
  20. package/dist/order-labels.d.mts +17 -0
  21. package/dist/order-labels.d.ts +17 -0
  22. package/dist/order-labels.js +44 -0
  23. package/dist/order-labels.js.map +1 -0
  24. package/dist/order-labels.mjs +9 -0
  25. package/dist/order-labels.mjs.map +1 -0
  26. package/dist/{parsing-RjN9JbyG.d.ts → parsing-BT-dvFcu.d.mts} +5 -43
  27. package/dist/{parsing-xpozY5ac.d.mts → parsing-D87zKtTe.d.ts} +5 -43
  28. package/dist/parsing.d.mts +3 -2
  29. package/dist/parsing.d.ts +3 -2
  30. package/dist/parsing.js.map +1 -1
  31. package/dist/parsing.mjs +3 -2
  32. package/dist/{plan-utils-nfHKSbd3.d.mts → plan-utils-BHLbBym3.d.mts} +27 -5
  33. package/dist/{plan-utils-Cgc0cCH1.d.ts → plan-utils-akoB6YCL.d.ts} +27 -5
  34. package/dist/plan-utils.d.mts +3 -2
  35. package/dist/plan-utils.d.ts +3 -2
  36. package/dist/plan-utils.js +1 -9
  37. package/dist/plan-utils.js.map +1 -1
  38. package/dist/plan-utils.mjs +3 -2
  39. package/dist/testing.d.mts +2 -2
  40. package/dist/testing.d.ts +2 -2
  41. package/package.json +12 -2
  42. package/skills/grilling/SKILL.md +31 -0
  43. package/skills/to-spec/SKILL.md +64 -0
  44. package/dist/chunk-4KIWPW4K.mjs +0 -510
  45. package/dist/chunk-4KIWPW4K.mjs.map +0 -1
  46. /package/dist/{chunk-YXAIQKVE.mjs.map → chunk-UEJ3SZQ7.mjs.map} +0 -0
@@ -1,4 +1,4 @@
1
- import { h as RunnerId } from './Task-1NwmUImI.js';
1
+ import { h as RunnerId } from './Task-cGrfYRXK.mjs';
2
2
 
3
3
  /**
4
4
  * The planner's single approval seam. Every capability that reaches beyond the
@@ -474,7 +474,7 @@ interface RunnerInvocation {
474
474
  * testable without real I/O.
475
475
  */
476
476
  interface IPluginStore {
477
- /** Path to the user plugins directory (~/.config/ordewell/plugins/). */
477
+ /** Path to the user plugins directory (~/.ordewell/plugins/). */
478
478
  getUserPluginsDir(): string;
479
479
  /** List subdirectory names inside the user plugins directory. */
480
480
  listUserPluginDirs(): string[];
@@ -1,4 +1,4 @@
1
- import { h as RunnerId } from './Task-1NwmUImI.mjs';
1
+ import { h as RunnerId } from './Task-cGrfYRXK.js';
2
2
 
3
3
  /**
4
4
  * The planner's single approval seam. Every capability that reaches beyond the
@@ -474,7 +474,7 @@ interface RunnerInvocation {
474
474
  * testable without real I/O.
475
475
  */
476
476
  interface IPluginStore {
477
- /** Path to the user plugins directory (~/.config/ordewell/plugins/). */
477
+ /** Path to the user plugins directory (~/.ordewell/plugins/). */
478
478
  getUserPluginsDir(): string;
479
479
  /** List subdirectory names inside the user plugins directory. */
480
480
  listUserPluginDirs(): string[];
@@ -0,0 +1,44 @@
1
+ import { h as RunnerId } from './Task-cGrfYRXK.mjs';
2
+
3
+ interface RunnerModeInfo {
4
+ id: string;
5
+ label: string;
6
+ description: string;
7
+ autonomous?: boolean;
8
+ safe?: boolean;
9
+ }
10
+ /** The slice of RunnerRegistry this module needs — structural, so nothing here depends on the plugin layer. */
11
+ interface ManifestLookup {
12
+ getManifest(runner: RunnerId): {
13
+ modes?: RunnerModeInfo[];
14
+ } | undefined;
15
+ }
16
+ /**
17
+ * A runner's modes are declared only in its manifest, never through a service,
18
+ * so every caller that needs them fuses registry and runner list by hand. This
19
+ * is that fusion, in one place: the planner prompt, the mode pickers on each
20
+ * surface, and the runner-change retarget all read modes the same way.
21
+ *
22
+ * A runner with no modes maps to `[]` rather than being dropped — callers
23
+ * distinguish "declares no modes" from "not asked about".
24
+ */
25
+ declare function runnerModesFrom(registry: ManifestLookup, runners: RunnerId[]): Record<RunnerId, RunnerModeInfo[]>;
26
+ /**
27
+ * Find the mode ID a runner resolves to under the given toggle state.
28
+ * Tag-based first (autonomous/safe); falls back to positional last non-plan
29
+ * if no tag is present on any mode (degrades gracefully on untagged manifests).
30
+ * Returns undefined if `modes` is empty or undefined.
31
+ */
32
+ declare function resolveDefaultMode(modes: RunnerModeInfo[] | undefined, autonomousDefault?: boolean): string | undefined;
33
+ /**
34
+ * Build modes compatible with the current toggle. Plan is excluded from the
35
+ * build-mode list (it is never a default for implementation tasks). Modes
36
+ * tagged exclusively for the OPPOSITE toggle are hidden — the LLM cannot see
37
+ * or select them. A dual-tagged mode (both autonomous + safe) is shown under
38
+ * either toggle.
39
+ */
40
+ declare function filteredBuildModes(modes: RunnerModeInfo[], autonomousDefault: boolean): RunnerModeInfo[];
41
+ declare function buildModeGuide(runnerModes: Record<RunnerId, RunnerModeInfo[]>, autonomousDefault?: boolean): string;
42
+ declare function resolveTaskMode(emittedMode: string | undefined, runnerId: RunnerId, runnerModes: Record<RunnerId, RunnerModeInfo[]> | undefined, autonomousDefault?: boolean): string;
43
+
44
+ export { type ManifestLookup as M, type RunnerModeInfo as R, resolveTaskMode as a, buildModeGuide as b, runnerModesFrom as c, filteredBuildModes as f, resolveDefaultMode as r };
@@ -0,0 +1,44 @@
1
+ import { h as RunnerId } from './Task-cGrfYRXK.js';
2
+
3
+ interface RunnerModeInfo {
4
+ id: string;
5
+ label: string;
6
+ description: string;
7
+ autonomous?: boolean;
8
+ safe?: boolean;
9
+ }
10
+ /** The slice of RunnerRegistry this module needs — structural, so nothing here depends on the plugin layer. */
11
+ interface ManifestLookup {
12
+ getManifest(runner: RunnerId): {
13
+ modes?: RunnerModeInfo[];
14
+ } | undefined;
15
+ }
16
+ /**
17
+ * A runner's modes are declared only in its manifest, never through a service,
18
+ * so every caller that needs them fuses registry and runner list by hand. This
19
+ * is that fusion, in one place: the planner prompt, the mode pickers on each
20
+ * surface, and the runner-change retarget all read modes the same way.
21
+ *
22
+ * A runner with no modes maps to `[]` rather than being dropped — callers
23
+ * distinguish "declares no modes" from "not asked about".
24
+ */
25
+ declare function runnerModesFrom(registry: ManifestLookup, runners: RunnerId[]): Record<RunnerId, RunnerModeInfo[]>;
26
+ /**
27
+ * Find the mode ID a runner resolves to under the given toggle state.
28
+ * Tag-based first (autonomous/safe); falls back to positional last non-plan
29
+ * if no tag is present on any mode (degrades gracefully on untagged manifests).
30
+ * Returns undefined if `modes` is empty or undefined.
31
+ */
32
+ declare function resolveDefaultMode(modes: RunnerModeInfo[] | undefined, autonomousDefault?: boolean): string | undefined;
33
+ /**
34
+ * Build modes compatible with the current toggle. Plan is excluded from the
35
+ * build-mode list (it is never a default for implementation tasks). Modes
36
+ * tagged exclusively for the OPPOSITE toggle are hidden — the LLM cannot see
37
+ * or select them. A dual-tagged mode (both autonomous + safe) is shown under
38
+ * either toggle.
39
+ */
40
+ declare function filteredBuildModes(modes: RunnerModeInfo[], autonomousDefault: boolean): RunnerModeInfo[];
41
+ declare function buildModeGuide(runnerModes: Record<RunnerId, RunnerModeInfo[]>, autonomousDefault?: boolean): string;
42
+ declare function resolveTaskMode(emittedMode: string | undefined, runnerId: RunnerId, runnerModes: Record<RunnerId, RunnerModeInfo[]> | undefined, autonomousDefault?: boolean): string;
43
+
44
+ export { type ManifestLookup as M, type RunnerModeInfo as R, resolveTaskMode as a, buildModeGuide as b, runnerModesFrom as c, filteredBuildModes as f, resolveDefaultMode as r };
@@ -235,9 +235,16 @@ type PlanState = {
235
235
  };
236
236
  declare function migratePlanState(raw: unknown): PlanState;
237
237
  declare function migrateLegacyPlan(legacy: LegacyPlanState): PlanState;
238
+
238
239
  declare function createTask(overrides?: Partial<Task>): Task;
239
240
  declare function createEmptyPlan(): LegacyPlanState;
240
241
  declare function flattenTasks(tasks: Task[]): Task[];
242
+ /** A flattened task with the parent it hangs under, null for a top-level task. */
243
+ interface TaskWithParent {
244
+ task: Task;
245
+ parent: Task | null;
246
+ }
247
+ declare function flattenTasksWithParents(tasks: Task[]): TaskWithParent[];
241
248
  declare function migrateTask(task: Record<string, unknown>): Task;
242
249
  declare function addTaskToPlan(tasks: Task[], partial: Partial<Task>): Task[];
243
250
  declare function removeTaskFromPlan(tasks: Task[], taskId: string): Task[];
@@ -261,4 +268,4 @@ interface ValidationContext {
261
268
  type ValidationCheck = (ctx: ValidationContext) => ValidationResult;
262
269
  declare function warningsText(w: PlanModificationWarnings): string | null;
263
270
 
264
- export { type ActiveTaskSession as A, flattenTasks as B, type ConversationMessage as C, type DiscoveredMode as D, migrateLegacyPlan as E, migratePlanState as F, migrateTask as G, removeTaskFromPlan as H, renumberTasks as I, updateTaskInPlan as J, validateModifiedPlan as K, type LegacyPlanState as L, type Message as M, warningsText as N, type PlanModificationWarnings as P, type QueuedMessage as Q, type ResearchLogEntry as R, type StreamEvent as S, type Task as T, type UserPromptEntry as U, type ValidationCheck as V, type DiscoveredModel as a, type PlanState as b, type PlanStatus as c, type ResearchProgress as d, type ResearchStep as e, type ResearchStepOutcome as f, type ResearchToolType as g, type RunnerId as h, type StreamStepEvent as i, type StreamThinkingEvent as j, type TaskMode as k, type TaskModelAssignment as l, type TaskOutputSummary as m, type TaskSnapshot as n, type TaskStatus as o, type TaskType as p, type ThinkingBlock as q, type UserStep as r, type ValidationContext as s, type ValidationResult as t, type Verdict as u, type VerificationCheck as v, addTaskToPlan as w, createEmptyPlan as x, createTask as y, emptyWarnings as z };
271
+ export { type ActiveTaskSession as A, emptyWarnings as B, type ConversationMessage as C, type DiscoveredMode as D, flattenTasks as E, flattenTasksWithParents as F, migrateLegacyPlan as G, migratePlanState as H, migrateTask as I, removeTaskFromPlan as J, renumberTasks as K, type LegacyPlanState as L, type Message as M, updateTaskInPlan as N, validateModifiedPlan as O, type PlanModificationWarnings as P, type QueuedMessage as Q, type ResearchLogEntry as R, type StreamEvent as S, type Task as T, type UserPromptEntry as U, type ValidationCheck as V, warningsText as W, type DiscoveredModel as a, type PlanState as b, type PlanStatus as c, type ResearchProgress as d, type ResearchStep as e, type ResearchStepOutcome as f, type ResearchToolType as g, type RunnerId as h, type StreamStepEvent as i, type StreamThinkingEvent as j, type TaskMode as k, type TaskModelAssignment as l, type TaskOutputSummary as m, type TaskSnapshot as n, type TaskStatus as o, type TaskType as p, type TaskWithParent as q, type ThinkingBlock as r, type UserStep as s, type ValidationContext as t, type ValidationResult as u, type Verdict as v, type VerificationCheck as w, addTaskToPlan as x, createEmptyPlan as y, createTask as z };
@@ -235,9 +235,16 @@ type PlanState = {
235
235
  };
236
236
  declare function migratePlanState(raw: unknown): PlanState;
237
237
  declare function migrateLegacyPlan(legacy: LegacyPlanState): PlanState;
238
+
238
239
  declare function createTask(overrides?: Partial<Task>): Task;
239
240
  declare function createEmptyPlan(): LegacyPlanState;
240
241
  declare function flattenTasks(tasks: Task[]): Task[];
242
+ /** A flattened task with the parent it hangs under, null for a top-level task. */
243
+ interface TaskWithParent {
244
+ task: Task;
245
+ parent: Task | null;
246
+ }
247
+ declare function flattenTasksWithParents(tasks: Task[]): TaskWithParent[];
241
248
  declare function migrateTask(task: Record<string, unknown>): Task;
242
249
  declare function addTaskToPlan(tasks: Task[], partial: Partial<Task>): Task[];
243
250
  declare function removeTaskFromPlan(tasks: Task[], taskId: string): Task[];
@@ -261,4 +268,4 @@ interface ValidationContext {
261
268
  type ValidationCheck = (ctx: ValidationContext) => ValidationResult;
262
269
  declare function warningsText(w: PlanModificationWarnings): string | null;
263
270
 
264
- export { type ActiveTaskSession as A, flattenTasks as B, type ConversationMessage as C, type DiscoveredMode as D, migrateLegacyPlan as E, migratePlanState as F, migrateTask as G, removeTaskFromPlan as H, renumberTasks as I, updateTaskInPlan as J, validateModifiedPlan as K, type LegacyPlanState as L, type Message as M, warningsText as N, type PlanModificationWarnings as P, type QueuedMessage as Q, type ResearchLogEntry as R, type StreamEvent as S, type Task as T, type UserPromptEntry as U, type ValidationCheck as V, type DiscoveredModel as a, type PlanState as b, type PlanStatus as c, type ResearchProgress as d, type ResearchStep as e, type ResearchStepOutcome as f, type ResearchToolType as g, type RunnerId as h, type StreamStepEvent as i, type StreamThinkingEvent as j, type TaskMode as k, type TaskModelAssignment as l, type TaskOutputSummary as m, type TaskSnapshot as n, type TaskStatus as o, type TaskType as p, type ThinkingBlock as q, type UserStep as r, type ValidationContext as s, type ValidationResult as t, type Verdict as u, type VerificationCheck as v, addTaskToPlan as w, createEmptyPlan as x, createTask as y, emptyWarnings as z };
271
+ export { type ActiveTaskSession as A, emptyWarnings as B, type ConversationMessage as C, type DiscoveredMode as D, flattenTasks as E, flattenTasksWithParents as F, migrateLegacyPlan as G, migratePlanState as H, migrateTask as I, removeTaskFromPlan as J, renumberTasks as K, type LegacyPlanState as L, type Message as M, updateTaskInPlan as N, validateModifiedPlan as O, type PlanModificationWarnings as P, type QueuedMessage as Q, type ResearchLogEntry as R, type StreamEvent as S, type Task as T, type UserPromptEntry as U, type ValidationCheck as V, warningsText as W, type DiscoveredModel as a, type PlanState as b, type PlanStatus as c, type ResearchProgress as d, type ResearchStep as e, type ResearchStepOutcome as f, type ResearchToolType as g, type RunnerId as h, type StreamStepEvent as i, type StreamThinkingEvent as j, type TaskMode as k, type TaskModelAssignment as l, type TaskOutputSummary as m, type TaskSnapshot as n, type TaskStatus as o, type TaskType as p, type TaskWithParent as q, type ThinkingBlock as r, type UserStep as s, type ValidationContext as t, type ValidationResult as u, type Verdict as v, type VerificationCheck as w, addTaskToPlan as x, createEmptyPlan as y, createTask as z };