neotoma 0.24.0 → 0.25.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.
Files changed (100) hide show
  1. package/README.md +3 -1
  2. package/dist/actions.d.ts.map +1 -1
  3. package/dist/actions.js +51 -12
  4. package/dist/actions.js.map +1 -1
  5. package/dist/cli/index.d.ts.map +1 -1
  6. package/dist/cli/index.js +18 -1
  7. package/dist/cli/index.js.map +1 -1
  8. package/dist/cli/issues.d.ts +6 -0
  9. package/dist/cli/issues.d.ts.map +1 -1
  10. package/dist/cli/issues.js +47 -6
  11. package/dist/cli/issues.js.map +1 -1
  12. package/dist/cli/skills_mirror.d.ts +29 -6
  13. package/dist/cli/skills_mirror.d.ts.map +1 -1
  14. package/dist/cli/skills_mirror.js +70 -13
  15. package/dist/cli/skills_mirror.js.map +1 -1
  16. package/dist/docs/developer/cli_agent_instructions.md +3 -1
  17. package/dist/docs/developer/cli_reference.md +2 -0
  18. package/dist/docs/developer/mcp/instructions.md +5 -5
  19. package/dist/docs/reference/error_codes.md +22 -10
  20. package/dist/docs/skills/skill_strategy.md +10 -6
  21. package/dist/docs/specs/MCP_SPEC.md +21 -5
  22. package/dist/docs/subsystems/issues.md +45 -5
  23. package/dist/docs/subsystems/schema_registry.md +35 -7
  24. package/dist/docs/testing/automated_test_catalog.md +23 -14
  25. package/dist/docs/use_cases/README.md +13 -13
  26. package/dist/docs/use_cases/agent_auth.md +1 -1
  27. package/dist/docs/use_cases/cases.md +1 -2
  28. package/dist/docs/use_cases/compliance.md +0 -1
  29. package/dist/docs/use_cases/contracts.md +1 -2
  30. package/dist/docs/use_cases/crypto_engineering.md +0 -1
  31. package/dist/docs/use_cases/customer_ops.md +1 -2
  32. package/dist/docs/use_cases/diligence.md +1 -2
  33. package/dist/docs/use_cases/government.md +1 -2
  34. package/dist/docs/use_cases/healthcare.md +1 -2
  35. package/dist/docs/use_cases/logistics.md +1 -2
  36. package/dist/docs/use_cases/portfolio.md +1 -2
  37. package/dist/docs/use_cases/procurement.md +1 -2
  38. package/dist/docs/use_cases/trading.md +1 -2
  39. package/dist/server.d.ts +14 -0
  40. package/dist/server.d.ts.map +1 -1
  41. package/dist/server.js +109 -33
  42. package/dist/server.js.map +1 -1
  43. package/dist/services/issues/config.d.ts.map +1 -1
  44. package/dist/services/issues/config.js +6 -0
  45. package/dist/services/issues/config.js.map +1 -1
  46. package/dist/services/issues/github_client.d.ts +7 -0
  47. package/dist/services/issues/github_client.d.ts.map +1 -1
  48. package/dist/services/issues/github_client.js +15 -3
  49. package/dist/services/issues/github_client.js.map +1 -1
  50. package/dist/services/issues/inspector_bulk.d.ts +2 -1
  51. package/dist/services/issues/inspector_bulk.d.ts.map +1 -1
  52. package/dist/services/issues/inspector_bulk.js +23 -5
  53. package/dist/services/issues/inspector_bulk.js.map +1 -1
  54. package/dist/services/issues/issue_operations.d.ts +10 -1
  55. package/dist/services/issues/issue_operations.d.ts.map +1 -1
  56. package/dist/services/issues/issue_operations.js +53 -21
  57. package/dist/services/issues/issue_operations.js.map +1 -1
  58. package/dist/services/issues/repo_allowlist.d.ts +55 -0
  59. package/dist/services/issues/repo_allowlist.d.ts.map +1 -0
  60. package/dist/services/issues/repo_allowlist.js +101 -0
  61. package/dist/services/issues/repo_allowlist.js.map +1 -0
  62. package/dist/services/issues/sync_issues_from_github.d.ts +83 -4
  63. package/dist/services/issues/sync_issues_from_github.d.ts.map +1 -1
  64. package/dist/services/issues/sync_issues_from_github.js +203 -28
  65. package/dist/services/issues/sync_issues_from_github.js.map +1 -1
  66. package/dist/services/issues/types.d.ts +21 -2
  67. package/dist/services/issues/types.d.ts.map +1 -1
  68. package/dist/services/issues/types.js.map +1 -1
  69. package/dist/services/root_landing/site_nav.d.ts.map +1 -1
  70. package/dist/services/root_landing/site_nav.js +0 -2
  71. package/dist/services/root_landing/site_nav.js.map +1 -1
  72. package/dist/services/schema_registry.d.ts +59 -3
  73. package/dist/services/schema_registry.d.ts.map +1 -1
  74. package/dist/services/schema_registry.js +175 -63
  75. package/dist/services/schema_registry.js.map +1 -1
  76. package/dist/shared/action_schemas.d.ts +26 -5
  77. package/dist/shared/action_schemas.d.ts.map +1 -1
  78. package/dist/shared/action_schemas.js +31 -3
  79. package/dist/shared/action_schemas.js.map +1 -1
  80. package/dist/shared/openapi_types.d.ts +84 -6
  81. package/dist/shared/openapi_types.d.ts.map +1 -1
  82. package/dist/shared/repo_slug.d.ts +27 -0
  83. package/dist/shared/repo_slug.d.ts.map +1 -0
  84. package/dist/shared/repo_slug.js +45 -0
  85. package/dist/shared/repo_slug.js.map +1 -0
  86. package/dist/shared/skill_deprecation.d.ts +26 -0
  87. package/dist/shared/skill_deprecation.d.ts.map +1 -0
  88. package/dist/shared/skill_deprecation.js +41 -0
  89. package/dist/shared/skill_deprecation.js.map +1 -0
  90. package/dist/tool_definitions.d.ts.map +1 -1
  91. package/dist/tool_definitions.js +32 -8
  92. package/dist/tool_definitions.js.map +1 -1
  93. package/docs/developer/mcp/instructions.md +5 -5
  94. package/openapi.yaml +180 -8
  95. package/package.json +1 -1
  96. package/skills/end/SKILL.md +2 -2
  97. package/skills/ensure-neotoma/SKILL.md +4 -2
  98. package/skills/query-memory/SKILL.md +13 -2
  99. package/skills/recover-sqlite-database/SKILL.md +1 -1
  100. package/skills/store-data/SKILL.md +12 -2
package/README.md CHANGED
@@ -159,9 +159,11 @@ Skills are guided workflows that teach an agent to import, extract, and persist
159
159
  | **remember-contacts** | Consolidate contacts from email, calendar, chat, vCards. |
160
160
  | **remember-calendar** | Import events and commitments. |
161
161
  | **remember-codebase** | Repository integration: inventory, decisions, MCP wiring. |
162
- | **store-data** / **query-memory** | Generic persist and retrieve workflows. |
163
162
  | **recover-sqlite-database** | Check integrity and recover a corrupted database. |
164
163
 
164
+ Ordinary storage and retrieval need no skill: the live MCP tool instructions delivered at
165
+ session start cover store/query/recall directly.
166
+
165
167
  ## Record types
166
168
 
167
169
  Neotoma stores typed entities with versioned history and provenance. The schema is flexible: store any entity type with whatever fields the data implies, and the system infers and evolves the schema.
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AA2C9B,OAAO,EAIL,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC9B,MAAM,mCAAmC,CAAC;AAS3C,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AAiBrC,OAAO,EAGL,KAAK,aAAa,EAGnB,MAAM,4BAA4B,CAAC;AAoDpC,OAAO,EAUL,KAAK,sBAAsB,EAC5B,MAAM,4BAA4B,CAAC;AAkDpC,OAAO,EAGL,oBAAoB,EACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAWlE,OAAO,EAiCL,KAAK,wBAAwB,EAE9B,MAAM,4BAA4B,CAAC;AA+CpC,6FAA6F;AAC7F,wBAAgB,qBAAqB,IAAI,sBAAsB,GAAG,IAAI,CAErE;AAED,eAAO,MAAM,GAAG,6CAAY,CAAC;AA2zB7B,kFAAkF;AAClF,eAAO,MAAM,4BAA4B,QAAS,CAAC;AAEnD;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAMtE;AAoBD,uFAAuF;AACvF,eAAO,MAAM,wBAAwB,OAAQ,CAAC;AAE9C;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAMlE;AAID;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,OAAO,CAAC,OAAO,EACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,EACrB,OAAO,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,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AgZb,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;;;;;;;;;GAosBxD;AAu+HD;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAGhF;AAED,yEAAyE;AACzE,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGpD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GACnB,OAAO,CAAC;IAAE,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAgD1E;AAGD,wBAAsB,eAAe;;;eA8YpC;AAsBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAiBtE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gCAAgC,IAAI,IAAI,CAqCvD"}
package/dist/actions.js CHANGED
@@ -9267,9 +9267,13 @@ const handleIssuesSyncHttp = async (req, res) => {
9267
9267
  since: parsed.data.since,
9268
9268
  state: parsed.data.state,
9269
9269
  labels: parsed.data.labels,
9270
+ repo: parsed.data.repo,
9270
9271
  push: parsed.data.push,
9272
+ commit: parsed.data.commit,
9271
9273
  });
9272
9274
  logDebug("Success:issues_sync", req, {
9275
+ repo: result.repo,
9276
+ dry_run: result.dry_run,
9273
9277
  issues_synced: result.issues_synced,
9274
9278
  messages_synced: result.messages_synced,
9275
9279
  issues_pushed: result.issues_pushed,
@@ -9554,20 +9558,27 @@ app.post("/update_schema_incremental", async (req, res) => {
9554
9558
  }
9555
9559
  try {
9556
9560
  const userId = await getAuthenticatedUserId(req, parsed.data.user_id);
9557
- const { entity_type, fields_to_add, fields_to_remove, canonical_name_fields, schema_version, user_specific = false, activate = true, migrate_existing = false, force = false, } = parsed.data;
9561
+ const { entity_type, fields_to_add, fields_to_remove, canonical_name_fields, schema_version,
9562
+ // #2374: no local `= false` default. `user_specific` stays
9563
+ // `undefined` when the caller omitted it, so `updateSchemaIncremental`
9564
+ // can defer to whichever scope its own read resolved instead of being
9565
+ // told "global" by a default this route manufactured.
9566
+ user_specific, activate = true, migrate_existing = false, force = false, } = parsed.data;
9558
9567
  const { schemaRegistry, loadCodeDefinedSchemaEntry } = await import("./services/schema_registry.js");
9559
- // #2454 REST parity with MCP `updateSchemaIncremental`: the existence guard
9560
- // is scope-limited (`user_specific ? userId : undefined`). When that lookup
9561
- // misses but a schema is active in another scope, return
9562
- // ERR_SCHEMA_SCOPE_MISMATCH — never ERR_NO_SCHEMA_FOR_ENTITY_TYPE with a
9563
- // register_schema hint. Write-scope rematch itself remains #2446.
9564
- const registeredSchema = await schemaRegistry.loadActiveSchema(entity_type, user_specific ? userId : undefined);
9568
+ // #2454 / #2374 REST parity with the MCP handler: the existence guard
9569
+ // resolves the SAME row `updateSchemaIncremental` will read —
9570
+ // user-scope-preferred when `user_specific` is omitted or true,
9571
+ // global-only when the caller explicitly passed `user_specific: false`.
9572
+ // When the global-only lookup misses but a schema is active in the
9573
+ // caller's user scope, return ERR_SCHEMA_SCOPE_MISMATCH — never
9574
+ // ERR_NO_SCHEMA_FOR_ENTITY_TYPE with a register_schema hint.
9575
+ const registeredSchema = await schemaRegistry.loadActiveSchema(entity_type, user_specific === false ? undefined : userId);
9565
9576
  if (!registeredSchema) {
9566
9577
  const codeDefinedSchema = await loadCodeDefinedSchemaEntry(entity_type);
9567
9578
  if (!codeDefinedSchema) {
9568
9579
  const anyScopeSchema = await schemaRegistry.loadActiveSchema(entity_type, userId);
9569
9580
  if (anyScopeSchema) {
9570
- const guardScope = user_specific ? "user" : "global";
9581
+ const guardScope = user_specific === false ? "global" : "user";
9571
9582
  const foundScope = anyScopeSchema.scope ?? "global";
9572
9583
  return res.status(200).json({
9573
9584
  error: {
@@ -9577,13 +9588,13 @@ app.post("/update_schema_incremental", async (req, res) => {
9577
9588
  "and found none there.",
9578
9589
  hint: `The existing SchemaDefinition for "${entity_type}" lives in ` +
9579
9590
  `"${foundScope}" scope. This call did not check that scope because ` +
9580
- `user_specific was ${user_specific ? "true" : "not set (defaults to false)"}. ` +
9591
+ `user_specific was ${user_specific === false ? "false" : "true"}. ` +
9581
9592
  "This entity_type already has an active schema — creating a second one for it " +
9582
9593
  "risks leaving two active schema_registry rows for the same entity_type (see " +
9583
9594
  "#2374/#2378), after which the next incremental update can merge onto stale " +
9584
- "state and drop fields. Instead, retry update_schema_incremental with " +
9585
- `user_specific: ${foundScope === "user"} so the call resolves the scope the ` +
9586
- "schema actually lives in.",
9595
+ "state and drop fields. Instead, retry update_schema_incremental without " +
9596
+ "user_specific (the call then writes to whichever scope your schema resolves " +
9597
+ `to), or with user_specific: ${foundScope === "user"}.`,
9587
9598
  details: {
9588
9599
  entity_type,
9589
9600
  guard_scope: guardScope,
@@ -9623,9 +9634,20 @@ app.post("/update_schema_incremental", async (req, res) => {
9623
9634
  canonical_name_fields,
9624
9635
  schema_version,
9625
9636
  user_specific,
9637
+ // #2374: pass userId unconditionally — same reasoning as the MCP
9638
+ // handler. The service resolves scope from its own read, not from
9639
+ // whether this route pre-gated userId on user_specific.
9626
9640
  user_id: userId,
9627
9641
  activate,
9628
9642
  migrate_existing,
9643
+ // migrate_existing must scope to the authenticated caller so
9644
+ // raw_fragments stored by this user are promoted, matching the MCP
9645
+ // handler's migrate_user_id wiring (#2379 note: REST previously
9646
+ // relied solely on the service's `migrate_user_id ?? user_id`
9647
+ // fallback, which happened to cover this route, but stating it
9648
+ // explicitly here keeps the two surfaces in parity rather than
9649
+ // coincidentally agreeing).
9650
+ migrate_user_id: migrate_existing ? userId : undefined,
9629
9651
  force,
9630
9652
  });
9631
9653
  }
@@ -9636,21 +9658,38 @@ app.post("/update_schema_incremental", async (req, res) => {
9636
9658
  }
9637
9659
  throw err;
9638
9660
  }
9661
+ // #2379: derive migrated_existing from the ACTUAL result, never from
9662
+ // the `migrate_existing` request flag.
9663
+ const migrationResult = newSchema.migration_result;
9664
+ // #2374: report the scope actually written, read off the persisted row.
9665
+ const scopeWritten = newSchema.scope === "user" ? "user" : "global";
9639
9666
  logDebug("Success:update_schema_incremental", req, {
9640
9667
  entity_type,
9641
9668
  fields_added: (fields_to_add || []).length,
9642
9669
  fields_removed: (fields_to_remove || []).length,
9643
9670
  migrate_existing,
9671
+ migrated_existing: (migrationResult?.migrated_count ?? 0) > 0,
9672
+ scope: scopeWritten,
9644
9673
  });
9645
9674
  return res.json({
9646
9675
  success: true,
9647
9676
  schema: newSchema,
9648
9677
  schema_version: newSchema.schema_version,
9678
+ fields_added: (fields_to_add || []).map((f) => f.field_name),
9649
9679
  fields_removed: fields_to_remove || [],
9650
9680
  // Echo the resolved identity rule so CLI/HTTP callers can confirm the
9651
9681
  // re-key without a second describe_entity_type round trip (#2020 ux).
9652
9682
  canonical_name_fields: newSchema.schema_definition
9653
9683
  .canonical_name_fields ?? null,
9684
+ activated: activate,
9685
+ // #2379: true only when the migration actually promoted something.
9686
+ migrated_existing: (migrationResult?.migrated_count ?? 0) > 0,
9687
+ // Present only when migrate_existing was requested this call.
9688
+ ...(migrationResult ? { migration_result: migrationResult } : {}),
9689
+ // #2374: the scope this call actually wrote to, read off the
9690
+ // persisted row rather than re-derived from the request.
9691
+ scope: scopeWritten,
9692
+ ...(scopeWritten === "user" ? { user_id: newSchema.user_id ?? null } : {}),
9654
9693
  });
9655
9694
  }
9656
9695
  catch (error) {