@tekmidian/pai 0.8.5 → 0.9.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.
@@ -4805,6 +4805,57 @@ async function startShim() {
4805
4805
  "",
4806
4806
  "If no project slug is provided, auto-detects from the current working directory."
4807
4807
  ].join("\n"), { project: string().optional().describe("Project slug. Omit to auto-detect from the current working directory.") }, async (args) => proxyTool("project_todo", args));
4808
+ server.tool("memory_wakeup", [
4809
+ "Load the 4-layer wake-up context for the current (or specified) project.",
4810
+ "",
4811
+ "Returns a progressive context block with:",
4812
+ " L0 Identity — user identity from ~/.pai/identity.txt (~100 tokens, always included)",
4813
+ " L1 Essential Story — recent session note highlights: Work Done, Key Decisions, Next Steps",
4814
+ " (~500-800 tokens, auto-extracted from the most recent notes)",
4815
+ "",
4816
+ "Use this at session start to quickly re-orient: who the user is, what they were doing,",
4817
+ "and what decisions were made recently — without loading the full memory index.",
4818
+ "",
4819
+ "For deeper on-demand recall, use memory_search (L2/L3).",
4820
+ "",
4821
+ "Inspired by the mempalace progressive context loading pattern."
4822
+ ].join("\n"), {
4823
+ project: string().optional().describe("Project slug or absolute root path. Omit to auto-detect from the current working directory."),
4824
+ token_budget: number().int().min(100).max(4e3).optional().describe("Maximum tokens for the L1 essential story block. Default: 800 (~3200 chars).")
4825
+ }, async (args) => proxyTool("memory_wakeup", args));
4826
+ server.tool("memory_taxonomy", [
4827
+ "Return the SHAPE of stored memory without requiring a search query.",
4828
+ "",
4829
+ "Answers 'what do I know about?' rather than 'what do I know about X?'",
4830
+ "",
4831
+ "Returns:",
4832
+ " - All active projects with session count, indexed file count, last activity date, and tags",
4833
+ " - Global totals (projects, sessions, indexed files, chunks)",
4834
+ " - Recent activity — last 10 sessions across all projects",
4835
+ "",
4836
+ "Use this at session start for a quick orientation, before memory_search for a",
4837
+ "specific topic, or when you want to know which projects have recorded memory.",
4838
+ "",
4839
+ "Inspired by mempalace's mempalace_get_taxonomy tool."
4840
+ ].join("\n"), {
4841
+ include_archived: boolean().optional().describe("Include archived projects in the result. Default: false."),
4842
+ limit: number().int().min(1).max(200).optional().describe("Maximum number of projects to return. Default: 50.")
4843
+ }, async (args) => proxyTool("memory_taxonomy", args));
4844
+ server.tool("memory_tunnels", [
4845
+ "Find 'tunnels' — concepts that appear across multiple projects in PAI memory.",
4846
+ "",
4847
+ "A tunnel is a shared term or phrase that appears in chunks from at least two",
4848
+ "distinct projects, surfacing serendipitous cross-project connections in your",
4849
+ "knowledge graph (inspired by the memory palace / palace graph concept).",
4850
+ "",
4851
+ "Results are sorted by project breadth (most cross-cutting first), then by",
4852
+ "raw occurrence count. Each tunnel includes the concept, which projects contain",
4853
+ "it, total occurrences, and first/last seen timestamps."
4854
+ ].join("\n"), {
4855
+ min_projects: number().int().min(2).optional().describe("Minimum distinct projects a concept must appear in. Default: 2."),
4856
+ min_occurrences: number().int().min(1).optional().describe("Minimum total chunk occurrences across all projects. Default: 3."),
4857
+ limit: number().int().min(1).max(100).optional().describe("Maximum number of tunnels to return. Default: 20.")
4858
+ }, async (args) => proxyTool("memory_tunnels", args));
4808
4859
  const transport = new StdioServerTransport();
4809
4860
  await server.connect(transport);
4810
4861
  }