pi-usereq 0.5.0 → 0.7.0

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.
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 800">
3
+ <rect width="800" height="800" rx="120" fill="#09090b"/>
4
+ <path fill="#fff" fill-rule="evenodd" d="
5
+ M165.29 165.29
6
+ H517.36
7
+ V400
8
+ H400
9
+ V517.36
10
+ H282.65
11
+ V634.72
12
+ H165.29
13
+ Z
14
+ M282.65 282.65
15
+ V400
16
+ H400
17
+ V282.65
18
+ Z
19
+ "/>
20
+ <path fill="#fff" d="M517.36 400 H634.72 V634.72 H517.36 Z"/>
21
+ </svg>
Binary file
@@ -165,9 +165,9 @@ test("inspectExtension surfaces agent-oriented find tool descriptions and schema
165
165
 
166
166
  assert.ok(filesFind, "missing files-find tool");
167
167
  assert.ok(find, "missing find tool");
168
- assert.match(filesFind.description ?? "", /LLM-oriented JSON payload/);
168
+ assert.match(filesFind.description ?? "", /token-optimized JSON payload/);
169
169
  assert.ok(filesFind.promptGuidelines?.some((line) => line.includes("Supported tags [Typescript]:")));
170
- assert.match(String((filesFind.parameters as { description?: string } | undefined)?.description ?? ""), /supported_tags_by_language/);
170
+ assert.match(String((filesFind.parameters as { description?: string } | undefined)?.description ?? ""), /Static supported-tag matrices are documented in tool registration metadata/);
171
171
  assert.match(find.description ?? "", /configured project source directories/);
172
172
  assert.ok(find.promptGuidelines?.some((line) => line.includes("Regex rule:")));
173
173
  assert.match(String((find.parameters as { description?: string } | undefined)?.description ?? ""), /Regex matches construct names only/);
@@ -185,7 +185,7 @@ test("inspectExtension surfaces agent-oriented compression tool descriptions and
185
185
 
186
186
  assert.ok(filesCompress, "missing files-compress tool");
187
187
  assert.ok(compress, "missing compress tool");
188
- assert.match(filesCompress.description ?? "", /request, summary, repository, files, and execution sections/);
188
+ assert.match(filesCompress.description ?? "", /summary, repository, files, and execution sections/);
189
189
  assert.ok(filesCompress.promptGuidelines?.some((line) => line.includes("Line-number behavior:")));
190
190
  assert.match(String((filesCompress.parameters as { description?: string } | undefined)?.description ?? ""), /structured compressed lines/);
191
191
  assert.match(compress.description ?? "", /configured project source directories/);
@@ -212,7 +212,7 @@ test("inspectExtension surfaces structured utility tool descriptions and schema
212
212
  assert.ok(docsCheck, "missing docs-check tool");
213
213
  assert.ok(gitWtCreate, "missing git-wt-create tool");
214
214
 
215
- assert.match(gitPath.description ?? "", /JSON-first payload/);
215
+ assert.match(gitPath.description ?? "", /token-optimized JSON payload/);
216
216
  assert.ok(gitPath.promptGuidelines?.some((line) => line.includes("Output contract:")));
217
217
  assert.match(String((gitPath.parameters as { description?: string } | undefined)?.description ?? ""), /path_value/);
218
218
 
@@ -220,9 +220,9 @@ test("inspectExtension surfaces structured utility tool descriptions and schema
220
220
  assert.ok(filesStaticCheck.promptGuidelines?.some((line) => line.includes("Failure contract:")));
221
221
  assert.match(String((filesStaticCheck.parameters as { description?: string } | undefined)?.description ?? ""), /configured checker modules/);
222
222
 
223
- assert.match(gitCheck.description ?? "", /JSON-first payload/);
223
+ assert.match(gitCheck.description ?? "", /token-optimized JSON payload/);
224
224
  assert.ok(gitCheck.promptGuidelines?.some((line) => line.includes("Behavior contract:")));
225
- assert.match(String((gitCheck.parameters as { description?: string } | undefined)?.description ?? ""), /clean-versus-error repository status/);
225
+ assert.match(String((gitCheck.parameters as { description?: string } | undefined)?.description ?? ""), /aggregate repository status fields/);
226
226
 
227
227
  assert.match(docsCheck.description ?? "", /remediation prompt commands/);
228
228
  assert.ok(docsCheck.promptGuidelines?.some((line) => line.includes("Specialization trigger:")));
@@ -247,18 +247,15 @@ test("replaySessionStart captures active tools, statuses, and cwd semantics", as
247
247
  assert.equal(report.effectiveCtxCwd, projectBase);
248
248
  assert.equal(report.effectiveProcessCwd, projectBase);
249
249
  const normalizedBasePath = projectBase.split(path.sep).join("/");
250
- assert.ok(
251
- status.includes(
252
- `<accent>base:</accent><warning>${normalizedBasePath}</warning><dim> • </dim><accent>docs:</accent><warning>pi-usereq/docs</warning><dim> • </dim><accent>src:</accent><warning>src</warning><dim> • </dim><accent>tests:</accent><warning>tests</warning>`,
253
- ),
254
- );
255
- assert.match(
256
- status,
257
- /<accent>context:<\/accent><bg-from-fg-accent><warning>CLEAR<\/warning><\/bg-from-fg-accent>/,
258
- );
259
- assert.match(status, /<accent>et:<\/accent><warning>▶idle,↻--:--,Σ--:--<\/warning>/);
260
- assert.match(status, /<accent>beep:<\/accent><warning>end,esc,err<\/warning>/);
250
+ assert.match(status, new RegExp(`<accent>base:</accent><warning>${normalizedBasePath.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}</warning>`));
251
+ assert.match(status, /<accent>context:<\/accent><warning>▕_▏<\/warning>/);
252
+ assert.match(status, /<accent>elapsed:<\/accent><warning>⏱︎ --:-- ⚑ --:-- ⌛︎--:--<\/warning>/);
261
253
  assert.match(status, /<accent>sound:<\/accent><warning>none<\/warning>/);
254
+ assert.doesNotMatch(status, /<accent>beep:<\/accent>/);
255
+ assert.doesNotMatch(status, /<accent>pushover:<\/accent>/);
256
+ assert.doesNotMatch(status, /<accent>docs:<\/accent>/);
257
+ assert.doesNotMatch(status, /<accent>src:<\/accent>/);
258
+ assert.doesNotMatch(status, /<accent>tests:<\/accent>/);
262
259
  assert.doesNotMatch(status, /<accent>git:<\/accent>/);
263
260
  assert.doesNotMatch(status, /<accent>tools:<\/accent>/);
264
261
  assert.equal(report.ui.notifications.length, 0);
@@ -290,7 +287,7 @@ test("replayCommand captures interactive UI side effects", async () => {
290
287
  projectBase,
291
288
  undefined,
292
289
  {
293
- selects: ["startup tools", "Disable all configurable tools", "Back", "Save and close"],
290
+ selects: ["Enable tools", "Disable all configurable tools", "Save and close", "Save and close"],
294
291
  inputs: [],
295
292
  },
296
293
  );
@@ -298,7 +295,7 @@ test("replayCommand captures interactive UI side effects", async () => {
298
295
  assert.deepEqual(report.activeTools, []);
299
296
  assert.ok(report.ui.notifications.some((entry) => entry.message === "Disabled all configurable active tools"));
300
297
  assert.doesNotMatch(report.ui.statuses["pi-usereq"] ?? "", /<accent>tools:<\/accent>/);
301
- assert.match(report.ui.statuses["pi-usereq"] ?? "", /<accent>et:<\/accent><warning>▶idle,↻--:--,Σ--:--<\/warning>/);
298
+ assert.match(report.ui.statuses["pi-usereq"] ?? "", /<accent>elapsed:<\/accent><warning>⏱︎ --:-- ⚑ --:-- ⌛︎--:--<\/warning>/);
302
299
  } finally {
303
300
  fs.rmSync(projectBase, { recursive: true, force: true });
304
301
  }
@@ -311,9 +308,7 @@ test("replayTool captures tool results and cwd semantics", async () => {
311
308
  const toolResult = report.toolResult as {
312
309
  content?: Array<{ type: string; text?: string }>;
313
310
  details?: {
314
- request: { project_base_path: string };
315
311
  result: { path_value: string; path_present: boolean };
316
- runtime_paths: { git_path: string };
317
312
  execution: { code: number };
318
313
  };
319
314
  };
@@ -321,8 +316,7 @@ test("replayTool captures tool results and cwd semantics", async () => {
321
316
  assert.equal(report.effectiveCtxCwd, projectBase);
322
317
  assert.equal(report.effectiveProcessCwd, projectBase);
323
318
  assert.deepEqual(JSON.parse(toolResult.content?.[0]?.text ?? "{}"), JSON.parse(JSON.stringify(toolResult.details)));
324
- assert.equal(toolResult.details?.request.project_base_path, projectBase);
325
- assert.equal(toolResult.details?.result.path_value, toolResult.details?.runtime_paths.git_path);
319
+ assert.equal(toolResult.details?.result.path_value, projectBase);
326
320
  assert.equal(toolResult.details?.result.path_present, true);
327
321
  assert.equal(toolResult.details?.execution.code, 0);
328
322
  } finally {