@cerefox/memory 1.1.0 → 1.2.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.
@@ -7438,7 +7438,7 @@ var exports_meta = {};
7438
7438
  __export(exports_meta, {
7439
7439
  PKG_VERSION: () => PKG_VERSION
7440
7440
  });
7441
- var PKG_VERSION = "1.1.0";
7441
+ var PKG_VERSION = "1.2.0";
7442
7442
  var init_meta = () => {};
7443
7443
 
7444
7444
  // ../../_shared/config/paths.ts
@@ -25858,7 +25858,7 @@ async function checkServerCompatibility(opts) {
25858
25858
  var COMPATIBILITY;
25859
25859
  var init_compatibility = __esm(() => {
25860
25860
  COMPATIBILITY = {
25861
- minSchema: "0.10.3",
25861
+ minSchema: "0.10.5",
25862
25862
  minEdgeFunctions: "0.6.0"
25863
25863
  };
25864
25864
  });
@@ -55148,6 +55148,12 @@ var init_audit_log = __esm(() => {
55148
55148
  auditLogTool = {
55149
55149
  name: "cerefox_get_audit_log",
55150
55150
  description: "Retrieve audit log entries showing who changed what and when. Supports filtering by document, author, operation type, and time range. Returns entries with document titles, author attribution, size changes, and descriptions.",
55151
+ annotations: {
55152
+ title: "Read audit log",
55153
+ readOnlyHint: true,
55154
+ idempotentHint: true,
55155
+ openWorldHint: false
55156
+ },
55151
55157
  inputSchema: {
55152
55158
  type: "object",
55153
55159
  required: [],
@@ -55346,6 +55352,13 @@ var init_relations = __esm(() => {
55346
55352
  setRelationTool = {
55347
55353
  name: "cerefox_set_relation",
55348
55354
  description: "Link two documents with a typed, directed relation (source → target). " + `Known types with behaviour: ${KNOWN_TYPES}. Symmetric types (related_to, ` + "contradicts, duplicates) write both directions. `supersedes` marks the target " + "superseded; `contradicts` marks both stale. Any other type string is accepted " + "and stored, just without special behaviour. Re-setting the same edge updates it.",
55355
+ annotations: {
55356
+ title: "Link two documents",
55357
+ readOnlyHint: false,
55358
+ destructiveHint: false,
55359
+ idempotentHint: true,
55360
+ openWorldHint: false
55361
+ },
55349
55362
  inputSchema: {
55350
55363
  type: "object",
55351
55364
  required: ["source_id", "target_id", "rel_type"],
@@ -55369,6 +55382,13 @@ var init_relations = __esm(() => {
55369
55382
  deleteRelationTool = {
55370
55383
  name: "cerefox_delete_relation",
55371
55384
  description: "Remove a typed relation between two documents. Symmetric types remove both " + "directions. Lifecycle status set by an earlier relation is NOT reverted.",
55385
+ annotations: {
55386
+ title: "Remove a relation",
55387
+ readOnlyHint: false,
55388
+ destructiveHint: true,
55389
+ idempotentHint: true,
55390
+ openWorldHint: false
55391
+ },
55372
55392
  inputSchema: {
55373
55393
  type: "object",
55374
55394
  required: ["source_id", "target_id", "rel_type"],
@@ -55385,6 +55405,12 @@ var init_relations = __esm(() => {
55385
55405
  getRelationsTool = {
55386
55406
  name: "cerefox_get_relations",
55387
55407
  description: "List every relation touching a document, in both directions (→ outbound, " + "← inbound). Shows each neighbour's title and lifecycle status, so an agent " + "can tell whether retrieved knowledge has been superseded or contradicted.",
55408
+ annotations: {
55409
+ title: "List a document's relations",
55410
+ readOnlyHint: true,
55411
+ idempotentHint: true,
55412
+ openWorldHint: false
55413
+ },
55388
55414
  inputSchema: {
55389
55415
  type: "object",
55390
55416
  required: ["document_id"],
@@ -55398,6 +55424,12 @@ var init_relations = __esm(() => {
55398
55424
  getNeighborsTool = {
55399
55425
  name: "cerefox_get_neighbors",
55400
55426
  description: "Walk the relation graph outward from a document along ONE relation type. " + "Use after cerefox_get_relations shows which types exist. depth > 1 follows " + "chains (useful for follows / reply_to); cycles terminate safely. Optional " + "from_time / to_time filter neighbours by their creation time.",
55427
+ annotations: {
55428
+ title: "Walk the relation graph",
55429
+ readOnlyHint: true,
55430
+ idempotentHint: true,
55431
+ openWorldHint: false
55432
+ },
55401
55433
  inputSchema: {
55402
55434
  type: "object",
55403
55435
  required: ["document_id", "rel_type"],
@@ -55450,6 +55482,12 @@ var init_get_document = __esm(() => {
55450
55482
  getDocumentTool = {
55451
55483
  name: "cerefox_get_document",
55452
55484
  description: "Retrieve the full reconstructed content of a document. Pass version_id to retrieve an archived version; omit it (or pass null) for the current version. Version UUIDs are returned by cerefox_list_versions. The response header includes the document's current content_hash — pass it back as expected_content_hash when updating via cerefox_ingest (optimistic concurrency).",
55485
+ annotations: {
55486
+ title: "Read document",
55487
+ readOnlyHint: true,
55488
+ idempotentHint: true,
55489
+ openWorldHint: false
55490
+ },
55453
55491
  inputSchema: {
55454
55492
  type: "object",
55455
55493
  required: ["document_id"],
@@ -55535,6 +55573,12 @@ var init_get_help = __esm(() => {
55535
55573
  getHelpTool = {
55536
55574
  name: "cerefox_get_help",
55537
55575
  description: "Retrieve Cerefox's own agent-usage guidance (the AGENT_QUICK_REFERENCE.md content). Call with no arguments to get the full reference + a section index. Call with `topic` to get a single section (case-insensitive substring match against H2 headings). Use this whenever you're uncertain about Cerefox conventions — link forms, project-membership semantics, update workflows, etc.",
55576
+ annotations: {
55577
+ title: "Read Cerefox conventions",
55578
+ readOnlyHint: true,
55579
+ idempotentHint: true,
55580
+ openWorldHint: false
55581
+ },
55538
55582
  inputSchema: {
55539
55583
  type: "object",
55540
55584
  properties: {
@@ -55789,6 +55833,13 @@ var init_ingest = __esm(() => {
55789
55833
  ingestTool = {
55790
55834
  name: "cerefox_ingest",
55791
55835
  description: "Save a note or document to the Cerefox knowledge base.",
55836
+ annotations: {
55837
+ title: "Save or update a document",
55838
+ readOnlyHint: false,
55839
+ destructiveHint: true,
55840
+ idempotentHint: false,
55841
+ openWorldHint: false
55842
+ },
55792
55843
  inputSchema: {
55793
55844
  type: "object",
55794
55845
  required: ["title", "content"],
@@ -55853,6 +55904,12 @@ var init_list_metadata_keys = __esm(() => {
55853
55904
  listMetadataKeysTool = {
55854
55905
  name: "cerefox_list_metadata_keys",
55855
55906
  description: "List all metadata keys currently in use across documents in the Cerefox knowledge base. Returns each key with its document count and up to 5 example values.",
55907
+ annotations: {
55908
+ title: "List metadata keys",
55909
+ readOnlyHint: true,
55910
+ idempotentHint: true,
55911
+ openWorldHint: false
55912
+ },
55856
55913
  inputSchema: {
55857
55914
  type: "object",
55858
55915
  properties: {
@@ -55894,6 +55951,12 @@ var init_list_projects = __esm(() => {
55894
55951
  listProjectsTool = {
55895
55952
  name: "cerefox_list_projects",
55896
55953
  description: "List all projects with their names and IDs. Use this to discover available projects before filtering by project_name in other tools.",
55954
+ annotations: {
55955
+ title: "List projects",
55956
+ readOnlyHint: true,
55957
+ idempotentHint: true,
55958
+ openWorldHint: false
55959
+ },
55897
55960
  inputSchema: {
55898
55961
  type: "object",
55899
55962
  properties: {
@@ -55939,6 +56002,12 @@ var init_list_versions = __esm(() => {
55939
56002
  listVersionsTool = {
55940
56003
  name: "cerefox_list_versions",
55941
56004
  description: "List all archived versions of a document, newest first. Returns version_id (use with cerefox_get_document), version_number, source, chunk_count, total_chars, and created_at.",
56005
+ annotations: {
56006
+ title: "List document versions",
56007
+ readOnlyHint: true,
56008
+ idempotentHint: true,
56009
+ openWorldHint: false
56010
+ },
55942
56011
  inputSchema: {
55943
56012
  type: "object",
55944
56013
  required: ["document_id"],
@@ -56032,6 +56101,12 @@ var init_metadata_search = __esm(() => {
56032
56101
  metadataSearchTool = {
56033
56102
  name: "cerefox_metadata_search",
56034
56103
  description: "Find or list documents by metadata key-value criteria without a text search term. Use to discover documents tagged with specific attributes, browse by taxonomy, retrieve messages/tasks by type and status, or list all documents in a project (pass project_name alone). At least one of metadata_filter, project_name, updated_since, or created_since must be supplied; results are ordered newest-updated first.",
56104
+ annotations: {
56105
+ title: "Find documents by metadata",
56106
+ readOnlyHint: true,
56107
+ idempotentHint: true,
56108
+ openWorldHint: false
56109
+ },
56035
56110
  inputSchema: {
56036
56111
  type: "object",
56037
56112
  properties: {
@@ -56192,6 +56267,12 @@ var init_search = __esm(() => {
56192
56267
  searchTool = {
56193
56268
  name: "cerefox_search",
56194
56269
  description: "Search the Cerefox personal knowledge base. Returns complete documents ranked by hybrid (FTS + semantic) relevance.",
56270
+ annotations: {
56271
+ title: "Search knowledge base",
56272
+ readOnlyHint: true,
56273
+ idempotentHint: true,
56274
+ openWorldHint: false
56275
+ },
56195
56276
  inputSchema: {
56196
56277
  type: "object",
56197
56278
  required: ["query"],
@@ -56277,6 +56358,13 @@ var init_set_document_projects = __esm(() => {
56277
56358
  setDocumentProjectsTool = {
56278
56359
  name: "cerefox_set_document_projects",
56279
56360
  description: "Set the document's project memberships to EXACTLY the given list. Destructive replace: any existing memberships not in this list are removed. Pass an empty list to clear all project memberships. Projects are looked up by name (case-insensitive); missing projects are created. Logged as update-metadata in the audit log — content is untouched. Use cerefox_ingest with project_names if you want to set memberships AND update content in one call. Use this tool when you only need to change project membership without re-writing the document body.",
56361
+ annotations: {
56362
+ title: "Replace project memberships",
56363
+ readOnlyHint: false,
56364
+ destructiveHint: true,
56365
+ idempotentHint: true,
56366
+ openWorldHint: false
56367
+ },
56280
56368
  inputSchema: {
56281
56369
  type: "object",
56282
56370
  required: ["document_id", "project_names"],
@@ -69491,7 +69579,8 @@ function buildServer() {
69491
69579
  tools: (await listEnabledTools(supabase)).map((t) => ({
69492
69580
  name: t.name,
69493
69581
  description: t.description,
69494
- inputSchema: t.inputSchema
69582
+ inputSchema: t.inputSchema,
69583
+ ...t.annotations ? { annotations: t.annotations } : {}
69495
69584
  }))
69496
69585
  }));
69497
69586
  server.setRequestHandler(CallToolRequestSchema, async (req) => {
@@ -75610,8 +75699,8 @@ import { homedir as homedir6 } from "node:os";
75610
75699
  import { join as join9 } from "node:path";
75611
75700
 
75612
75701
  // ../../_shared/ef-meta/index.ts
75613
- var EF_VERSION = "1.1.0";
75614
- var EF_LAST_CHANGED = "1.1.0-beta.7";
75702
+ var EF_VERSION = "1.2.0";
75703
+ var EF_LAST_CHANGED = "1.2.0";
75615
75704
 
75616
75705
  // src/cli/util/checks.ts
75617
75706
  init_config();
@@ -79020,6 +79109,7 @@ init_sync_self_docs();
79020
79109
 
79021
79110
  // src/cli/commands/web.ts
79022
79111
  init_cli_core();
79112
+ import { readFileSync as readFileSync19 } from "node:fs";
79023
79113
 
79024
79114
  // ../../node_modules/.bun/@hono+node-server@2.0.12+19b9adbcbc3b652f/node_modules/@hono/node-server/dist/constants-BLSFu_RU.mjs
79025
79115
  var X_ALREADY_SENT = "x-hono-already-sent";
@@ -84462,6 +84552,17 @@ async function runForeground(host, port, watch) {
84462
84552
  process.exit(1);
84463
84553
  }
84464
84554
  }
84555
+ function readStartupRefusal() {
84556
+ try {
84557
+ const tail = readFileSync19(daemonPaths.logFile, "utf8").slice(-4000);
84558
+ const idx = tail.lastIndexOf("Refusing to start:");
84559
+ if (idx === -1)
84560
+ return null;
84561
+ return tail.slice(idx).trim();
84562
+ } catch {
84563
+ return null;
84564
+ }
84565
+ }
84465
84566
  function registerWeb(program2) {
84466
84567
  const web = program2.command("web").description("Start the local web UI / API server (foreground; see `web start` for daemon).").option("--host <host>", "Bind host.", "127.0.0.1").option("--port <port>", "Bind port.", "8000").option("--watch", "Enable hot-reload (dev mode; reserved).").action(async (rawOpts) => {
84467
84568
  await runForeground(rawOpts.host, parsePort(rawOpts.port), rawOpts.watch);
@@ -84492,8 +84593,15 @@ function registerWeb(program2) {
84492
84593
  println(c.dim(` Logs: ${daemonPaths.logFile}`));
84493
84594
  println(c.dim(` Stop: cerefox web stop`));
84494
84595
  } else {
84495
- eprintln(`Started (pid ${outcome.pid}) but it is not responding on :${port} yet.
84596
+ const refusal = readStartupRefusal();
84597
+ if (refusal) {
84598
+ eprintln(refusal);
84599
+ eprintln(`
84600
+ Full log: ${daemonPaths.logFile}`);
84601
+ } else {
84602
+ eprintln(`Started (pid ${outcome.pid}) but it is not responding on :${port} yet.
84496
84603
  ` + `Check the log for errors: ${daemonPaths.logFile}`);
84604
+ }
84497
84605
  process.exit(1);
84498
84606
  }
84499
84607
  break;