pi-goosedump 0.12.19 → 0.12.21

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 (2) hide show
  1. package/dist/index.ts +21 -30
  2. package/package.json +2 -2
package/dist/index.ts CHANGED
@@ -525,21 +525,21 @@ function resolveTarget(ctx, provider, contextId) {
525
525
  }
526
526
  var GOOSE_PROVIDERS = ["pi", "claude", "codex", "crush", "gemini", "goose", "opencode"];
527
527
  var HISTORY_TARGET_GUIDELINE = "Use the current Pi session by default; non-Pi providers require an explicit session ID.";
528
- function historyProviderParam(operation) {
528
+ function historyProviderParam() {
529
529
  return Type.Optional(Type.Union(GOOSE_PROVIDERS.map((provider) => Type.Literal(provider)), {
530
530
  default: "pi",
531
- description: `Source provider whose sessions to ${operation}. Defaults to pi. Non-pi providers have no current session, so they require an explicit session id.`
531
+ description: "Source provider. Defaults to pi. Non-Pi providers have no current session, so they require an explicit session ID."
532
532
  }));
533
533
  }
534
534
  function historySessionParam() {
535
535
  return Type.Optional(Type.String({
536
- description: "Context/session ID. Defaults to the current Pi session for pi; required when provider is not pi."
536
+ description: "Session ID. Defaults to the current Pi session for pi; required when provider is not pi."
537
537
  }));
538
538
  }
539
539
  function historyScopeParam() {
540
540
  return Type.Optional(Type.Union([Type.Literal("lineage"), Type.Literal("all")], {
541
541
  default: "lineage",
542
- description: "Scope: lineage (current branch) or all entries in the session"
542
+ description: "lineage (current branch, default) or all session entries"
543
543
  }));
544
544
  }
545
545
  async function goosedumpCompact(target, options, signal, executablePath) {
@@ -1412,7 +1412,6 @@ function createGoosedumpIntegration(options = {}) {
1412
1412
  let activeSessionFile = null;
1413
1413
  let sessionActive = false;
1414
1414
  let activePi = null;
1415
- let resumeAfterCompaction = false;
1416
1415
  const rememberQueue = [];
1417
1416
  let rememberRunning = null;
1418
1417
  function enqueueRemember(target, reportError) {
@@ -1586,7 +1585,6 @@ function createGoosedumpIntegration(options = {}) {
1586
1585
  const generation = request.sessionGeneration;
1587
1586
  const sessionFile = request.sessionFile;
1588
1587
  const resumeAfter = options2.resumeAfter === true;
1589
- resumeAfterCompaction = resumeAfter;
1590
1588
  setCompactionState(ctx, {
1591
1589
  phase: "running",
1592
1590
  request,
@@ -1600,17 +1598,14 @@ function createGoosedumpIntegration(options = {}) {
1600
1598
  onComplete: () => {
1601
1599
  if (!runningOperationIsCurrent(operation, generation, sessionFile))
1602
1600
  return;
1603
- const shouldResume = resumeAfterCompaction;
1604
- resumeAfterCompaction = false;
1605
1601
  setCompactionState(ctx, { phase: "idle" });
1606
1602
  syncCompactCounters(ctx);
1607
1603
  updateStatus(ctx);
1608
- resumeAfterSuccessfulCompaction(ctx, shouldResume);
1604
+ resumeAfterSuccessfulCompaction(ctx, resumeAfter);
1609
1605
  },
1610
1606
  onError: (error) => {
1611
1607
  if (!runningOperationIsCurrent(operation, generation, sessionFile))
1612
1608
  return;
1613
- resumeAfterCompaction = false;
1614
1609
  setCompactionState(ctx, { phase: "idle" });
1615
1610
  syncCompactCounters(ctx);
1616
1611
  updateStatus(ctx);
@@ -1654,14 +1649,14 @@ function createGoosedumpIntegration(options = {}) {
1654
1649
  pi.registerTool(defineTool({
1655
1650
  name: "goose_remember",
1656
1651
  label: "goose_remember",
1657
- description: "Queue local gpt-oss-20b memory extraction and BGE embedding in the background. Defaults to the current Pi session.",
1652
+ description: "Queue local memory extraction and embedding in the background. Defaults to the current Pi session.",
1658
1653
  promptSnippet: "Persist important context from the current or another session into durable memory",
1659
1654
  promptGuidelines: [
1660
1655
  "Use goose_remember after a milestone when important facts, decisions, preferences, procedures, or lessons should be retained.",
1661
1656
  "Defaults to the current Pi session; pass provider/session when targeting a different session."
1662
1657
  ],
1663
1658
  parameters: Type.Object({
1664
- provider: historyProviderParam("read"),
1659
+ provider: historyProviderParam(),
1665
1660
  session: historySessionParam()
1666
1661
  }),
1667
1662
  async execute(_id, params, _signal, _onUpdate, ctx) {
@@ -1682,7 +1677,7 @@ function createGoosedumpIntegration(options = {}) {
1682
1677
  pi.registerTool(defineTool({
1683
1678
  name: "goose_recall",
1684
1679
  label: "goose_recall",
1685
- description: "Recall project-scoped memory. Lexical and entity matches come first; BGE vector matches fill remaining slots. Returns bounded records with provenance; history includes superseded statements.",
1680
+ description: "Recall project-scoped memory. Lexical and entity matches come first; vector matches fill remaining slots. Returns bounded records with provenance; history includes superseded statements.",
1686
1681
  promptSnippet: "Recall durable context from earlier sessions",
1687
1682
  promptGuidelines: [
1688
1683
  "Use goose_recall for decisions, evidence, and context that may have disappeared from the current session.",
@@ -1733,7 +1728,7 @@ function createGoosedumpIntegration(options = {}) {
1733
1728
  pi.registerTool(defineTool({
1734
1729
  name: "goose_forget",
1735
1730
  label: "goose_forget",
1736
- description: "Forget/remove durable context entries from goosedump memory.",
1731
+ description: "Remove durable context entries from goosedump memory.",
1737
1732
  promptSnippet: "Remove obsolete entries from durable memory store",
1738
1733
  promptGuidelines: [
1739
1734
  "Use goose_forget to delete stale, inaccurate, or obsolete entries from durable memory.",
@@ -1783,7 +1778,7 @@ function createGoosedumpIntegration(options = {}) {
1783
1778
  pi.registerTool(defineTool({
1784
1779
  name: "goose_search",
1785
1780
  label: "goose_search",
1786
- description: "Search coding agent session history by ranked relevance. Returns compact entry overviews with entry IDs; use goose_get to expand specific IDs to full content. Defaults to the current Pi session.",
1781
+ description: "Search session history by ranked relevance. Returns compact entry overviews with entry IDs; use goose_get to expand. Defaults to the current Pi session.",
1787
1782
  promptSnippet: "Search session history by ranked relevance",
1788
1783
  promptGuidelines: [
1789
1784
  "Use goose_search to find relevant context in this or another coding agent's session history.",
@@ -1793,7 +1788,7 @@ function createGoosedumpIntegration(options = {}) {
1793
1788
  ],
1794
1789
  parameters: Type.Object({
1795
1790
  query: Type.String({ description: "Search query to rank messages by relevance" }),
1796
- provider: historyProviderParam("search"),
1791
+ provider: historyProviderParam(),
1797
1792
  session: historySessionParam(),
1798
1793
  scope: historyScopeParam(),
1799
1794
  page: Type.Optional(Type.Integer({
@@ -1829,7 +1824,7 @@ function createGoosedumpIntegration(options = {}) {
1829
1824
  pi.registerTool(defineTool({
1830
1825
  name: "goose_get",
1831
1826
  label: "goose_get",
1832
- description: "Expand specific entry IDs (from goose_search or goose_grep) to their full content. Defaults to the current Pi session.",
1827
+ description: "Expand entry IDs from goose_search or goose_grep to full content. Defaults to the current Pi session.",
1833
1828
  promptSnippet: "Expand session entries by ID to full content",
1834
1829
  promptGuidelines: [
1835
1830
  "Use goose_get to expand entry IDs returned by goose_search or goose_grep into their full content.",
@@ -1842,7 +1837,7 @@ function createGoosedumpIntegration(options = {}) {
1842
1837
  minItems: 1,
1843
1838
  description: "Entry IDs to expand (show full content)"
1844
1839
  }),
1845
- provider: historyProviderParam("read"),
1840
+ provider: historyProviderParam(),
1846
1841
  session: historySessionParam(),
1847
1842
  scope: historyScopeParam()
1848
1843
  }),
@@ -1878,7 +1873,7 @@ function createGoosedumpIntegration(options = {}) {
1878
1873
  ],
1879
1874
  parameters: Type.Object({
1880
1875
  pattern: Type.String({ description: "Glob pattern to filter messages (e.g. *rand*)" }),
1881
- provider: historyProviderParam("grep"),
1876
+ provider: historyProviderParam(),
1882
1877
  session: historySessionParam(),
1883
1878
  scope: historyScopeParam()
1884
1879
  }),
@@ -1904,7 +1899,7 @@ function createGoosedumpIntegration(options = {}) {
1904
1899
  pi.registerTool(defineTool({
1905
1900
  name: "goose_compact",
1906
1901
  label: "goose_compact",
1907
- description: "Trigger a goosedump compaction of the current session now, optionally keeping the last N user turns verbatim while summarizing everything before. Compaction runs asynchronously via Pi's compaction flow.",
1902
+ description: "Compact the current session now, optionally keeping the last N user turns verbatim. Runs asynchronously via Pi's compaction flow.",
1908
1903
  promptSnippet: "Compact session history; optionally keep recent user turns",
1909
1904
  promptGuidelines: [
1910
1905
  "Use goose_compact to compact the session proactively with goosedump when context is large or nearing limits.",
@@ -1933,7 +1928,7 @@ function createGoosedumpIntegration(options = {}) {
1933
1928
  pi.registerTool(defineTool({
1934
1929
  name: "goose_sessions",
1935
1930
  label: "goose_sessions",
1936
- description: "List or delete session IDs for the current working directory.",
1931
+ description: "List or delete sessions for the current working directory.",
1937
1932
  promptSnippet: "List or delete coding agent sessions for current directory",
1938
1933
  promptGuidelines: [
1939
1934
  "Use goose_sessions to discover sessions in the current directory or delete a non-active session.",
@@ -1945,7 +1940,7 @@ function createGoosedumpIntegration(options = {}) {
1945
1940
  default: "list",
1946
1941
  description: "Action: list (default) or delete"
1947
1942
  })),
1948
- provider: historyProviderParam("list"),
1943
+ provider: historyProviderParam(),
1949
1944
  session: Type.Optional(Type.String({
1950
1945
  description: "Session ID to delete (required for action: delete)"
1951
1946
  }))
@@ -2026,7 +2021,6 @@ ${lines.join(`
2026
2021
  settlementGeneration = 0;
2027
2022
  activeSessionFile = ctx.sessionManager.getSessionFile?.() ?? null;
2028
2023
  sessionActive = true;
2029
- resumeAfterCompaction = false;
2030
2024
  compactionState = { phase: "idle" };
2031
2025
  goosedumpAvailable = checkGoosedump(ctx);
2032
2026
  notifyInvalidSettings(ctx);
@@ -2040,7 +2034,6 @@ ${lines.join(`
2040
2034
  settlementGeneration = 0;
2041
2035
  activeSessionFile = null;
2042
2036
  sessionActive = false;
2043
- resumeAfterCompaction = false;
2044
2037
  compactionState = { phase: "idle" };
2045
2038
  });
2046
2039
  pi.on("session_tree", async (_event, ctx) => {
@@ -2048,7 +2041,6 @@ ${lines.join(`
2048
2041
  settlementGeneration = 0;
2049
2042
  activeSessionFile = ctx.sessionManager.getSessionFile?.() ?? null;
2050
2043
  sessionActive = true;
2051
- resumeAfterCompaction = false;
2052
2044
  compactionState = { phase: "idle" };
2053
2045
  syncCompactCounters(ctx);
2054
2046
  updateStatus(ctx);
@@ -2212,7 +2204,6 @@ ${lines.join(`
2212
2204
  }
2213
2205
  });
2214
2206
  pi.on("session_compact", async (event, ctx) => {
2215
- resumeAfterCompaction = false;
2216
2207
  if (!shouldOverrideDefaultCompaction)
2217
2208
  return;
2218
2209
  if (!contextIsCurrent(ctx))
@@ -2266,7 +2257,7 @@ ${lines.join(`
2266
2257
  }
2267
2258
  });
2268
2259
  maybePi.registerCommand?.("goose-compact", {
2269
- description: "Compact now with goosedump; optionally keep the last N user turns",
2260
+ description: "Compact the current session now; optionally keep the last N user turns",
2270
2261
  handler: async (args, ctx) => {
2271
2262
  if (!goosedumpAvailable) {
2272
2263
  ctx.ui.notify(GOOSEDUMP_UNAVAILABLE_MESSAGE, "error");
@@ -2318,7 +2309,7 @@ ${lines.join(`
2318
2309
  }
2319
2310
  });
2320
2311
  maybePi.registerCommand?.("goose-sessions", {
2321
- description: "Manage and switch between sessions for the current working directory",
2312
+ description: "List, resume, or delete sessions for the current working directory",
2322
2313
  handler: async (_args, ctx) => {
2323
2314
  if (!goosedumpAvailable) {
2324
2315
  ctx.ui.notify(GOOSEDUMP_UNAVAILABLE_MESSAGE, "error");
@@ -2333,7 +2324,7 @@ ${lines.join(`
2333
2324
  }
2334
2325
  });
2335
2326
  maybePi.registerCommand?.("goose-forget", {
2336
- description: "Forget/remove an entry from goosedump durable memory",
2327
+ description: "Remove a durable memory entry or remembered session",
2337
2328
  handler: async (args, ctx) => {
2338
2329
  if (!goosedumpAvailable) {
2339
2330
  ctx.ui.notify(GOOSEDUMP_UNAVAILABLE_MESSAGE, "error");
@@ -2356,7 +2347,7 @@ ${lines.join(`
2356
2347
  }
2357
2348
  });
2358
2349
  maybePi.registerCommand?.("goose-memory-status", {
2359
- description: "Show durable memory status and health stats",
2350
+ description: "Show durable memory storage health and type counts",
2360
2351
  handler: async (_args, ctx) => {
2361
2352
  if (!goosedumpAvailable) {
2362
2353
  ctx.ui.notify(GOOSEDUMP_UNAVAILABLE_MESSAGE, "error");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-goosedump",
3
- "version": "0.12.19",
3
+ "version": "0.12.21",
4
4
  "description": "Pi extension for goosedump session search, durable memory, and compaction",
5
5
  "keywords": [
6
6
  "compaction",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@earendil-works/pi-tui": "^0.82.1",
41
- "@jarkkojs/goosedump": "^0.12.19",
41
+ "@jarkkojs/goosedump": "^0.12.21",
42
42
  "@sinclair/typebox": "^0.34.49"
43
43
  },
44
44
  "devDependencies": {