mu-harness 0.16.12 → 0.16.14

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.
@@ -4,6 +4,8 @@ import type { SkillRegistry } from '../skills/index.js';
4
4
  import type { Command } from './types.js';
5
5
  export declare const createAgentsCommand: (agents: AgentRegistry) => Command;
6
6
  export declare const createSkillsCommand: (skills: SkillRegistry) => Command;
7
- export declare const createSessionsCommand: (sessions: SessionManager) => Command;
7
+ export declare const createSessionsCommand: (sessions: SessionManager, options?: {
8
+ cwd?: string;
9
+ }) => Command;
8
10
  export declare const createQuitCommand: (onQuit: () => void | Promise<void>) => Command;
9
11
  export declare const createHelpCommand: (list: () => Command[]) => Command;
@@ -20,11 +20,11 @@ export const createSkillsCommand = (skills) => ({
20
20
  return { ok: true, output: lines.join('\n') };
21
21
  },
22
22
  });
23
- export const createSessionsCommand = (sessions) => ({
23
+ export const createSessionsCommand = (sessions, options) => ({
24
24
  name: 'sessions',
25
25
  description: 'List saved sessions',
26
26
  run: async () => {
27
- const list = await sessions.list();
27
+ const list = await sessions.list(options?.cwd ? { cwd: options.cwd } : undefined);
28
28
  if (list.length === 0)
29
29
  return { ok: true, output: 'No sessions yet.' };
30
30
  const lines = list.map((s) => `- ${s.title || s.id}`);
@@ -134,7 +134,7 @@ export const createHarness = async (options) => {
134
134
  const commands = createCommandRegistry([
135
135
  createAgentsCommand(agents),
136
136
  createSkillsCommand(skills),
137
- createSessionsCommand(sessions),
137
+ createSessionsCommand(sessions, { cwd }),
138
138
  ...(tasks ? [createTasksCommand(tasks)] : []),
139
139
  ]);
140
140
  commands.register(createHelpCommand(() => commands.list()));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mu-harness",
3
- "version": "0.16.12",
3
+ "version": "0.16.14",
4
4
  "description": "Agent harness: createHarness wires mu-core into a host — XDG paths, model registry, plugins, disk-loaded agents & skills, sub-agents, sessions (JSONL + SQLite catalog), slash commands, permission/approval hooks, an optional scheduler, and a composable TUI chat app",
5
5
  "license": "MIT",
6
6
  "main": "./script/index.js",
@@ -16,8 +16,8 @@
16
16
  "dependencies": {
17
17
  "@swc/wasm-typescript": "^1.15.0",
18
18
  "croner": "^9.0.0",
19
- "mu-core": "^0.16.12",
20
- "mu-tui": "^0.16.12"
19
+ "mu-core": "^0.16.14",
20
+ "mu-tui": "^0.16.14"
21
21
  },
22
22
  "_generatedBy": "dnt@dev"
23
23
  }
@@ -4,6 +4,8 @@ import type { SkillRegistry } from '../skills/index.js';
4
4
  import type { Command } from './types.js';
5
5
  export declare const createAgentsCommand: (agents: AgentRegistry) => Command;
6
6
  export declare const createSkillsCommand: (skills: SkillRegistry) => Command;
7
- export declare const createSessionsCommand: (sessions: SessionManager) => Command;
7
+ export declare const createSessionsCommand: (sessions: SessionManager, options?: {
8
+ cwd?: string;
9
+ }) => Command;
8
10
  export declare const createQuitCommand: (onQuit: () => void | Promise<void>) => Command;
9
11
  export declare const createHelpCommand: (list: () => Command[]) => Command;
@@ -25,11 +25,11 @@ const createSkillsCommand = (skills) => ({
25
25
  },
26
26
  });
27
27
  exports.createSkillsCommand = createSkillsCommand;
28
- const createSessionsCommand = (sessions) => ({
28
+ const createSessionsCommand = (sessions, options) => ({
29
29
  name: 'sessions',
30
30
  description: 'List saved sessions',
31
31
  run: async () => {
32
- const list = await sessions.list();
32
+ const list = await sessions.list(options?.cwd ? { cwd: options.cwd } : undefined);
33
33
  if (list.length === 0)
34
34
  return { ok: true, output: 'No sessions yet.' };
35
35
  const lines = list.map((s) => `- ${s.title || s.id}`);
@@ -140,7 +140,7 @@ const createHarness = async (options) => {
140
140
  const commands = (0, index_js_2.createCommandRegistry)([
141
141
  (0, index_js_2.createAgentsCommand)(agents),
142
142
  (0, index_js_2.createSkillsCommand)(skills),
143
- (0, index_js_2.createSessionsCommand)(sessions),
143
+ (0, index_js_2.createSessionsCommand)(sessions, { cwd }),
144
144
  ...(tasks ? [(0, index_js_7.createTasksCommand)(tasks)] : []),
145
145
  ]);
146
146
  commands.register((0, index_js_2.createHelpCommand)(() => commands.list()));