@remnic/core 9.46.2 → 9.47.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.
@@ -27,7 +27,7 @@ var BUILTIN_SKILLS = [
27
27
  {
28
28
  slug: "remnic-memory-workflow",
29
29
  staticPath: codexSkillPath("remnic-memory-workflow"),
30
- disableModelInvocation: true
30
+ disableModelInvocation: false
31
31
  },
32
32
  {
33
33
  slug: "remnic-recall",
@@ -37,7 +37,7 @@ var BUILTIN_SKILLS = [
37
37
  {
38
38
  slug: "remnic-remember",
39
39
  staticPath: codexSkillPath("remnic-remember"),
40
- disableModelInvocation: true
40
+ disableModelInvocation: false
41
41
  },
42
42
  {
43
43
  slug: "remnic-search",
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/skills-registry.ts"],"sourcesContent":["/**\n * skills-registry.ts\n *\n * Built-in Remnic procedural memory skills — the canonical SKILL.md sources\n * shipped with the monorepo. Consumers (e.g. the Codex materializer in #378)\n * read this registry to discover which skills to materialize into\n * `~/.codex/memories/skills/<slug>/SKILL.md`.\n *\n * This module is intentionally free of Codex/Claude Code host coupling —\n * it only exposes the static metadata each host needs.\n */\n\nimport { fileURLToPath } from \"node:url\";\nimport { statSync } from \"node:fs\";\nimport { dirname, resolve } from \"node:path\";\n\n/**\n * A single procedural-memory skill source that Remnic ships.\n *\n * - `slug` is the canonical folder name under `skills/` and the file on disk\n * must live at `<pluginRoot>/skills/<slug>/SKILL.md`.\n * - `staticPath`, when set, points at a pre-authored SKILL.md on disk.\n * - `generator`, when set, produces a SKILL.md body at materialization time.\n * Exactly one of `staticPath` or `generator` should be provided.\n * - `disableModelInvocation` mirrors the `disable-model-invocation` frontmatter\n * key and indicates a skill that writes or mutates state and therefore\n * should not be auto-invoked by a model without explicit opt-in.\n */\nexport interface RemnicSkillSource {\n slug: string;\n staticPath?: string;\n generator?: () => Promise<string>;\n disableModelInvocation: boolean;\n}\n\n/**\n * Validate a Remnic skill slug. Rules:\n *\n * - lowercase letters, digits, and `-` only\n * - must start with a letter or digit\n * - 1–64 characters\n *\n * This is the same shape the Codex skills directory expects.\n */\nexport function isValidSkillSlug(slug: string): boolean {\n // Must start with alphanumeric; each dash must be followed by alphanumeric\n // (no trailing dashes, no consecutive dashes); 1–64 characters total.\n return /^[a-z0-9](?:[a-z0-9]|-(?=[a-z0-9])){0,63}$/.test(slug);\n}\n\n// ---------------------------------------------------------------------------\n// Built-in skill paths — resolved relative to this module.\n// ---------------------------------------------------------------------------\n//\n// This file lives at `packages/remnic-core/src/skills-registry.ts`.\n// After tsup build it lives at `packages/remnic-core/dist/skills-registry.js`.\n// Packaged @remnic/core artifacts ship skill sources under\n// `packages/remnic-core/skills/<slug>/SKILL.md`; source checkouts can fall back\n// to the canonical monorepo copies in `packages/plugin-codex/skills`.\n//\n// We compute the absolute path from the current module so that callers in any\n// cwd can resolve the files.\n\nconst HERE = dirname(fileURLToPath(import.meta.url));\nconst PACKAGED_SKILLS_DIR = resolve(HERE, \"..\", \"skills\");\nconst PLUGIN_CODEX_SKILLS_DIR = resolve(HERE, \"..\", \"..\", \"plugin-codex\", \"skills\");\n\nfunction isDirectory(pathname: string): boolean {\n try {\n return statSync(pathname).isDirectory();\n } catch {\n return false;\n }\n}\n\nfunction builtinSkillsDir(): string {\n return isDirectory(PACKAGED_SKILLS_DIR) ? PACKAGED_SKILLS_DIR : PLUGIN_CODEX_SKILLS_DIR;\n}\n\nfunction codexSkillPath(slug: string): string {\n return resolve(builtinSkillsDir(), slug, \"SKILL.md\");\n}\n\n/**\n * The canonical list of Remnic procedural memory skills shipped with the\n * monorepo. The Codex materializer (#378) copies these into\n * `~/.codex/memories/skills/<slug>/SKILL.md`.\n */\nexport const BUILTIN_SKILLS: RemnicSkillSource[] = [\n {\n slug: \"remnic-memory-workflow\",\n staticPath: codexSkillPath(\"remnic-memory-workflow\"),\n disableModelInvocation: true,\n },\n {\n slug: \"remnic-recall\",\n staticPath: codexSkillPath(\"remnic-recall\"),\n disableModelInvocation: false,\n },\n {\n slug: \"remnic-remember\",\n staticPath: codexSkillPath(\"remnic-remember\"),\n disableModelInvocation: true,\n },\n {\n slug: \"remnic-search\",\n staticPath: codexSkillPath(\"remnic-search\"),\n disableModelInvocation: false,\n },\n {\n slug: \"remnic-entities\",\n staticPath: codexSkillPath(\"remnic-entities\"),\n disableModelInvocation: false,\n },\n {\n slug: \"remnic-status\",\n staticPath: codexSkillPath(\"remnic-status\"),\n disableModelInvocation: false,\n },\n];\n"],"mappings":";;;AAYA,SAAS,qBAAqB;AAC9B,SAAS,gBAAgB;AACzB,SAAS,SAAS,eAAe;AA8B1B,SAAS,iBAAiB,MAAuB;AAGtD,SAAO,6CAA6C,KAAK,IAAI;AAC/D;AAeA,IAAM,OAAO,QAAQ,cAAc,YAAY,GAAG,CAAC;AACnD,IAAM,sBAAsB,QAAQ,MAAM,MAAM,QAAQ;AACxD,IAAM,0BAA0B,QAAQ,MAAM,MAAM,MAAM,gBAAgB,QAAQ;AAElF,SAAS,YAAY,UAA2B;AAC9C,MAAI;AACF,WAAO,SAAS,QAAQ,EAAE,YAAY;AAAA,EACxC,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,SAAS,mBAA2B;AAClC,SAAO,YAAY,mBAAmB,IAAI,sBAAsB;AAClE;AAEA,SAAS,eAAe,MAAsB;AAC5C,SAAO,QAAQ,iBAAiB,GAAG,MAAM,UAAU;AACrD;AAOO,IAAM,iBAAsC;AAAA,EACjD;AAAA,IACE,MAAM;AAAA,IACN,YAAY,eAAe,wBAAwB;AAAA,IACnD,wBAAwB;AAAA,EAC1B;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,YAAY,eAAe,eAAe;AAAA,IAC1C,wBAAwB;AAAA,EAC1B;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,YAAY,eAAe,iBAAiB;AAAA,IAC5C,wBAAwB;AAAA,EAC1B;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,YAAY,eAAe,eAAe;AAAA,IAC1C,wBAAwB;AAAA,EAC1B;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,YAAY,eAAe,iBAAiB;AAAA,IAC5C,wBAAwB;AAAA,EAC1B;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,YAAY,eAAe,eAAe;AAAA,IAC1C,wBAAwB;AAAA,EAC1B;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/skills-registry.ts"],"sourcesContent":["/**\n * skills-registry.ts\n *\n * Built-in Remnic procedural memory skills — the canonical SKILL.md sources\n * shipped with the monorepo. Consumers (e.g. the Codex materializer in #378)\n * read this registry to discover which skills to materialize into\n * `~/.codex/memories/skills/<slug>/SKILL.md`.\n *\n * This module is intentionally free of Codex/Claude Code host coupling —\n * it only exposes the static metadata each host needs.\n */\n\nimport { fileURLToPath } from \"node:url\";\nimport { statSync } from \"node:fs\";\nimport { dirname, resolve } from \"node:path\";\n\n/**\n * A single procedural-memory skill source that Remnic ships.\n *\n * - `slug` is the canonical folder name under `skills/` and the file on disk\n * must live at `<pluginRoot>/skills/<slug>/SKILL.md`.\n * - `staticPath`, when set, points at a pre-authored SKILL.md on disk.\n * - `generator`, when set, produces a SKILL.md body at materialization time.\n * Exactly one of `staticPath` or `generator` should be provided.\n * - `disableModelInvocation` mirrors the `disable-model-invocation` frontmatter\n * key and indicates a skill that writes or mutates state and therefore\n * should not be auto-invoked by a model without explicit opt-in.\n */\nexport interface RemnicSkillSource {\n slug: string;\n staticPath?: string;\n generator?: () => Promise<string>;\n disableModelInvocation: boolean;\n}\n\n/**\n * Validate a Remnic skill slug. Rules:\n *\n * - lowercase letters, digits, and `-` only\n * - must start with a letter or digit\n * - 1–64 characters\n *\n * This is the same shape the Codex skills directory expects.\n */\nexport function isValidSkillSlug(slug: string): boolean {\n // Must start with alphanumeric; each dash must be followed by alphanumeric\n // (no trailing dashes, no consecutive dashes); 1–64 characters total.\n return /^[a-z0-9](?:[a-z0-9]|-(?=[a-z0-9])){0,63}$/.test(slug);\n}\n\n// ---------------------------------------------------------------------------\n// Built-in skill paths — resolved relative to this module.\n// ---------------------------------------------------------------------------\n//\n// This file lives at `packages/remnic-core/src/skills-registry.ts`.\n// After tsup build it lives at `packages/remnic-core/dist/skills-registry.js`.\n// Packaged @remnic/core artifacts ship skill sources under\n// `packages/remnic-core/skills/<slug>/SKILL.md`; source checkouts can fall back\n// to the canonical monorepo copies in `packages/plugin-codex/skills`.\n//\n// We compute the absolute path from the current module so that callers in any\n// cwd can resolve the files.\n\nconst HERE = dirname(fileURLToPath(import.meta.url));\nconst PACKAGED_SKILLS_DIR = resolve(HERE, \"..\", \"skills\");\nconst PLUGIN_CODEX_SKILLS_DIR = resolve(HERE, \"..\", \"..\", \"plugin-codex\", \"skills\");\n\nfunction isDirectory(pathname: string): boolean {\n try {\n return statSync(pathname).isDirectory();\n } catch {\n return false;\n }\n}\n\nfunction builtinSkillsDir(): string {\n return isDirectory(PACKAGED_SKILLS_DIR) ? PACKAGED_SKILLS_DIR : PLUGIN_CODEX_SKILLS_DIR;\n}\n\nfunction codexSkillPath(slug: string): string {\n return resolve(builtinSkillsDir(), slug, \"SKILL.md\");\n}\n\n/**\n * The canonical list of Remnic procedural memory skills shipped with the\n * monorepo. The Codex materializer (#378) copies these into\n * `~/.codex/memories/skills/<slug>/SKILL.md`.\n */\nexport const BUILTIN_SKILLS: RemnicSkillSource[] = [\n {\n slug: \"remnic-memory-workflow\",\n staticPath: codexSkillPath(\"remnic-memory-workflow\"),\n disableModelInvocation: false,\n },\n {\n slug: \"remnic-recall\",\n staticPath: codexSkillPath(\"remnic-recall\"),\n disableModelInvocation: false,\n },\n {\n slug: \"remnic-remember\",\n staticPath: codexSkillPath(\"remnic-remember\"),\n disableModelInvocation: false,\n },\n {\n slug: \"remnic-search\",\n staticPath: codexSkillPath(\"remnic-search\"),\n disableModelInvocation: false,\n },\n {\n slug: \"remnic-entities\",\n staticPath: codexSkillPath(\"remnic-entities\"),\n disableModelInvocation: false,\n },\n {\n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package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnic/core",
3
- "version": "9.46.2",
3
+ "version": "9.47.0",
4
4
  "description": "Framework-agnostic Remnic memory engine — orchestrator, storage, extraction, search, trust zones",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -3096,7 +3096,7 @@
3096
3096
  "core"
3097
3097
  ],
3098
3098
  "peerDependencies": {
3099
- "@remnic/coding-graph": "^9.46.2"
3099
+ "@remnic/coding-graph": "^9.47.0"
3100
3100
  },
3101
3101
  "peerDependenciesMeta": {
3102
3102
  "@remnic/coding-graph": {
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: remnic-memory-workflow
3
3
  description: Shared memory workflow for Remnic-connected agents — recall before acting, observe during work, remember at the end. Trigger phrases include "what do you remember about", "save this for later", "any context from last time".
4
- disable-model-invocation: true
4
+ disable-model-invocation: false
5
5
  allowed-tools:
6
6
  - remnic_recall
7
7
  - remnic_memory_store
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: remnic-remember
3
3
  description: Store a durable memory in Remnic so every connected agent can recall it. Trigger phrases include "remember this", "save this for later", "add a note that".
4
- disable-model-invocation: true
4
+ disable-model-invocation: false
5
5
  allowed-tools:
6
6
  - remnic_memory_store
7
7
  ---
@@ -229,6 +229,20 @@ test("every authored SKILL.md has valid frontmatter", () => {
229
229
  }
230
230
  });
231
231
 
232
+ test("BUILTIN_SKILLS disableModelInvocation mirrors the authored frontmatter", () => {
233
+ for (const skill of BUILTIN_SKILLS) {
234
+ if (!skill.staticPath) continue;
235
+ const parsed = parseSkillFile(skill.staticPath);
236
+ // An absent key means the host may invoke the skill, i.e. false.
237
+ const authored = parsed.frontmatter["disable-model-invocation"] ?? "false";
238
+ assert.equal(
239
+ authored,
240
+ String(skill.disableModelInvocation),
241
+ `${skill.slug} registry flag must mirror its disable-model-invocation frontmatter`,
242
+ );
243
+ }
244
+ });
245
+
232
246
  test("every authored SKILL.md contains the six required H2 sections in order", () => {
233
247
  for (const file of ALL_SKILL_FILES) {
234
248
  const parsed = parseSkillFile(file);
@@ -90,7 +90,7 @@ export const BUILTIN_SKILLS: RemnicSkillSource[] = [
90
90
  {
91
91
  slug: "remnic-memory-workflow",
92
92
  staticPath: codexSkillPath("remnic-memory-workflow"),
93
- disableModelInvocation: true,
93
+ disableModelInvocation: false,
94
94
  },
95
95
  {
96
96
  slug: "remnic-recall",
@@ -100,7 +100,7 @@ export const BUILTIN_SKILLS: RemnicSkillSource[] = [
100
100
  {
101
101
  slug: "remnic-remember",
102
102
  staticPath: codexSkillPath("remnic-remember"),
103
- disableModelInvocation: true,
103
+ disableModelInvocation: false,
104
104
  },
105
105
  {
106
106
  slug: "remnic-search",