@mercury-fw/cli-engine 0.49.1 → 0.50.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @mercury-fw/cli-engine
2
2
 
3
+ ## 0.50.0
4
+
5
+ ### Minor Changes
6
+
7
+ - ae495c7: - The model is told, at the end of every prompt, which lists it already showed in the conversation: each one's ref and the command that built it, never the list itself. It can show one again with `present`, or run the command again for fresh data, instead of retyping it from memory.
8
+ - A list shown in a conversation stays available for `present` as long as the conversation, previously five minutes, at most the ten most recent per conversation.
9
+ - `stashDisplay` takes an optional label, and the cli-engine passes the command that built the list with its number of items.
10
+ - The jira skill points to the lists already shown, and keeps a new search for fresh data.
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [ae495c7]
15
+ - @mercury-fw/plugin-types@0.50.0
16
+ - @mercury-fw/utils@0.50.0
17
+
3
18
  ## 0.49.1
4
19
 
5
20
  ### Patch Changes
package/cli-tool.ts CHANGED
@@ -172,7 +172,7 @@ export function createCliTool(
172
172
  * the model can `present`. Pre-bound to this turn's session by the
173
173
  * composition root. Optional: with none wired the inline `display` is left
174
174
  * untouched and no `displayRef` is minted. */
175
- stashDisplay?: (artifact: string) => string;
175
+ stashDisplay?: (artifact: string, label?: string) => string;
176
176
  /** The person the turn is for (see `SessionToolContext.person`): every
177
177
  * command runs as them, with `--user` and the id their CLI knows them by.
178
178
  * Absent or `null`: the CLI's own service identity. */
@@ -273,7 +273,9 @@ export function createCliTool(
273
273
  if (opts.stashDisplay && processed.ok && processed.display) {
274
274
  const stringItems = processed.display.items.filter((i): i is string => typeof i === "string");
275
275
  if (stringItems.length > 0) {
276
- const displayRef = opts.stashDisplay(stringItems.join("\n\n"));
276
+ // What the list is, so the model still knows a turn later.
277
+ const count = `${stringItems.length} ${stringItems.length === 1 ? "item" : "items"}`;
278
+ const displayRef = opts.stashDisplay(stringItems.join("\n\n"), `${command.trim()} (${count})`);
277
279
  return { ...processed, displayRef };
278
280
  }
279
281
  }
@@ -101,7 +101,7 @@ export declare function createCliTool(runCliFn: typeof runCli, configs: Record<s
101
101
  * the model can `present`. Pre-bound to this turn's session by the
102
102
  * composition root. Optional: with none wired the inline `display` is left
103
103
  * untouched and no `displayRef` is minted. */
104
- stashDisplay?: (artifact: string) => string;
104
+ stashDisplay?: (artifact: string, label?: string) => string;
105
105
  /** The person the turn is for (see `SessionToolContext.person`): every
106
106
  * command runs as them, with `--user` and the id their CLI knows them by.
107
107
  * Absent or `null`: the CLI's own service identity. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mercury-fw/cli-engine",
3
- "version": "0.49.1",
3
+ "version": "0.50.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,8 +23,8 @@
23
23
  }
24
24
  },
25
25
  "dependencies": {
26
- "@mercury-fw/plugin-types": "0.49.1",
27
- "@mercury-fw/utils": "0.49.1",
26
+ "@mercury-fw/plugin-types": "0.50.0",
27
+ "@mercury-fw/utils": "0.50.0",
28
28
  "ai": "^7.0.126",
29
29
  "shell-quote": "^1.11.0",
30
30
  "zod": "^4.6.5"