@dinoxx/dinox-cli 1.0.18 → 1.0.19

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 (111) hide show
  1. package/README.md +72 -34
  2. package/dist/cli.js +15 -1
  3. package/dist/commands/auth/index.d.ts +2 -0
  4. package/dist/commands/auth/index.js +209 -163
  5. package/dist/commands/boxes/index.d.ts +2 -0
  6. package/dist/commands/boxes/index.js +119 -75
  7. package/dist/commands/boxes/repo.d.ts +8 -0
  8. package/dist/commands/boxes/repo.js +41 -0
  9. package/dist/commands/config/index.d.ts +2 -0
  10. package/dist/commands/config/index.js +85 -36
  11. package/dist/commands/descriptor/register.d.ts +8 -0
  12. package/dist/commands/descriptor/register.js +113 -0
  13. package/dist/commands/descriptor/types.d.ts +37 -0
  14. package/dist/commands/descriptor/types.js +17 -0
  15. package/dist/commands/graph/index.d.ts +2 -0
  16. package/dist/commands/graph/index.js +143 -73
  17. package/dist/commands/info/index.d.ts +2 -0
  18. package/dist/commands/info/index.js +41 -14
  19. package/dist/commands/mcp/index.js +11 -10
  20. package/dist/commands/mcp/server.js +6 -3
  21. package/dist/commands/mcp/tools.js +30 -104
  22. package/dist/commands/mcp/types.d.ts +8 -1
  23. package/dist/commands/meta/index.d.ts +2 -0
  24. package/dist/commands/meta/index.js +64 -33
  25. package/dist/commands/meta/repo.d.ts +6 -0
  26. package/dist/commands/meta/repo.js +6 -0
  27. package/dist/commands/notes/actions.d.ts +10 -0
  28. package/dist/commands/notes/actions.js +403 -0
  29. package/dist/commands/notes/descriptors.d.ts +4 -0
  30. package/dist/commands/notes/descriptors.js +250 -0
  31. package/dist/commands/notes/dryRun.d.ts +31 -0
  32. package/dist/commands/notes/dryRun.js +130 -0
  33. package/dist/commands/notes/index.d.ts +2 -51
  34. package/dist/commands/notes/index.js +2 -581
  35. package/dist/commands/notes/repo.d.ts +9 -0
  36. package/dist/commands/notes/repo.js +56 -10
  37. package/dist/commands/notes/runtime.d.ts +28 -0
  38. package/dist/commands/notes/runtime.js +185 -0
  39. package/dist/commands/notes/searchOutput.d.ts +10 -2
  40. package/dist/commands/notes/searchOutput.js +14 -2
  41. package/dist/commands/notes/searchResponse.d.ts +51 -0
  42. package/dist/commands/notes/searchResponse.js +56 -0
  43. package/dist/commands/notes/searchSql.js +2 -0
  44. package/dist/commands/prompt/index.d.ts +2 -0
  45. package/dist/commands/prompt/index.js +122 -72
  46. package/dist/commands/prompt/repo.d.ts +7 -0
  47. package/dist/commands/prompt/repo.js +46 -0
  48. package/dist/commands/schema/commandMetadata.d.ts +2 -0
  49. package/dist/commands/schema/commandMetadata.js +18 -0
  50. package/dist/commands/schema/globalOptions.d.ts +3 -0
  51. package/dist/commands/schema/globalOptions.js +3 -0
  52. package/dist/commands/schema/index.d.ts +4 -0
  53. package/dist/commands/schema/index.js +109 -0
  54. package/dist/commands/schema/renderSkills.d.ts +6 -0
  55. package/dist/commands/schema/renderSkills.js +216 -0
  56. package/dist/commands/schema/spec.d.ts +6 -0
  57. package/dist/commands/schema/spec.js +40 -0
  58. package/dist/commands/schema/types.d.ts +47 -0
  59. package/dist/commands/schema/types.js +1 -0
  60. package/dist/commands/storage/index.d.ts +4 -0
  61. package/dist/commands/storage/index.js +292 -0
  62. package/dist/commands/storage/repo.d.ts +162 -0
  63. package/dist/commands/storage/repo.js +751 -0
  64. package/dist/commands/sync.d.ts +2 -0
  65. package/dist/commands/sync.js +41 -27
  66. package/dist/commands/tags/index.d.ts +2 -0
  67. package/dist/commands/tags/index.js +121 -79
  68. package/dist/commands/tags/repo.d.ts +7 -0
  69. package/dist/commands/tags/repo.js +52 -0
  70. package/dist/commands/todo/dryRun.d.ts +23 -0
  71. package/dist/commands/todo/dryRun.js +133 -0
  72. package/dist/commands/todo/index.d.ts +2 -0
  73. package/dist/commands/todo/index.js +285 -135
  74. package/dist/commands/todo/repo.d.ts +11 -0
  75. package/dist/commands/todo/repo.js +37 -9
  76. package/dist/commands/update.d.ts +3 -0
  77. package/dist/commands/update.js +35 -13
  78. package/dist/commands/writeDryRun.d.ts +62 -0
  79. package/dist/commands/writeDryRun.js +131 -0
  80. package/dist/constants/links.d.ts +1 -1
  81. package/dist/constants/links.js +1 -1
  82. package/dist/daemon/ensure.js +3 -2
  83. package/dist/daemon/index.js +17 -15
  84. package/dist/dinox.js +9 -13
  85. package/dist/powersync/schema/index.d.ts +27 -0
  86. package/dist/powersync/schema/index.js +2 -0
  87. package/dist/powersync/schema/note.d.ts +1 -0
  88. package/dist/powersync/schema/note.js +1 -0
  89. package/dist/powersync/schema/projects.d.ts +3 -0
  90. package/dist/powersync/schema/projects.js +3 -0
  91. package/dist/powersync/schema/storage.d.ts +24 -0
  92. package/dist/powersync/schema/storage.js +24 -0
  93. package/dist/skills/check.d.ts +6 -0
  94. package/dist/skills/check.js +254 -0
  95. package/dist/utils/bidlinkCanonicalization.d.ts +2 -0
  96. package/dist/utils/bidlinkCanonicalization.js +161 -0
  97. package/dist/utils/dryRun.d.ts +13 -0
  98. package/dist/utils/dryRun.js +69 -0
  99. package/dist/utils/output.d.ts +19 -0
  100. package/dist/utils/output.js +155 -1
  101. package/dist/utils/terminalSanitization.d.ts +2 -0
  102. package/dist/utils/terminalSanitization.js +33 -0
  103. package/dist/utils/tiptapMarkdown.d.ts +4 -1
  104. package/dist/utils/tiptapMarkdown.js +285 -113
  105. package/dist/utils/tiptapMarkdownSchema.d.ts +37 -0
  106. package/dist/utils/tiptapMarkdownSchema.js +577 -0
  107. package/dist/utils/tiptapMarkdownSchemaUtils.d.ts +74 -0
  108. package/dist/utils/tiptapMarkdownSchemaUtils.js +394 -0
  109. package/dist/utils/updateNotice.d.ts +7 -0
  110. package/dist/utils/updateNotice.js +64 -0
  111. package/package.json +25 -3
@@ -1,23 +1,50 @@
1
+ import { registerStandaloneCommand } from '../descriptor/register.js';
2
+ import { FORMAT_OPTIONS } from '../schema/globalOptions.js';
1
3
  import { SKILLS_REPO_URL } from '../../constants/links.js';
2
- import { printYaml } from '../../utils/output.js';
4
+ import { clearPendingStructuredNoticeProvider, getRequestedStructuredOutputFormat, printHumanReadableLine, printSuccess, setPendingStructuredNoticeProvider, } from '../../utils/output.js';
5
+ import { getUpdateNotice } from '../../utils/updateNotice.js';
3
6
  import { getPackageVersion } from '../../utils/version.js';
4
- export function registerInfoCommand(program) {
5
- program
6
- .command('info')
7
- .description('Show CLI version info')
8
- .action((_options, command) => {
9
- const globals = command.optsWithGlobals?.() ?? {};
10
- const jsonOutput = Boolean(globals.json);
7
+ export const infoCommandDescriptor = {
8
+ name: 'info',
9
+ description: 'Show CLI version and bundled skills location',
10
+ schema: {
11
+ path: 'info',
12
+ risk: 'read',
13
+ auth: 'none',
14
+ globalOptions: FORMAT_OPTIONS,
15
+ output: {
16
+ type: 'structured',
17
+ summary: 'CLI version metadata',
18
+ fields: ['name', 'version', 'skills_repo'],
19
+ },
20
+ examples: ['dino info', 'dino info --format json'],
21
+ },
22
+ action: async (_context) => {
23
+ const version = getPackageVersion();
11
24
  const payload = {
12
25
  name: 'dino',
13
- version: getPackageVersion(),
26
+ version,
14
27
  skills_repo: SKILLS_REPO_URL,
15
28
  };
16
- if (jsonOutput) {
17
- printYaml(payload);
29
+ if (getRequestedStructuredOutputFormat()) {
30
+ const updateNotice = await getUpdateNotice(version);
31
+ setPendingStructuredNoticeProvider(() => updateNotice
32
+ ? {
33
+ update: updateNotice,
34
+ }
35
+ : null);
36
+ try {
37
+ printSuccess(payload);
38
+ }
39
+ finally {
40
+ clearPendingStructuredNoticeProvider();
41
+ }
18
42
  return;
19
43
  }
20
- console.log(payload.version);
21
- console.log(`skills repo: ${payload.skills_repo}`);
22
- });
44
+ printHumanReadableLine(payload.version);
45
+ printHumanReadableLine(`skills repo: ${payload.skills_repo}`);
46
+ },
47
+ };
48
+ export function registerInfoCommand(program) {
49
+ registerStandaloneCommand(program, infoCommandDescriptor);
23
50
  }
@@ -3,6 +3,7 @@ import { mcpTools } from './tools.js';
3
3
  import { isLoopbackHost, resolveMCPAuthToken } from './auth.js';
4
4
  import { DEFAULT_MCP_PORT } from './types.js';
5
5
  import { DinoxError } from '../../utils/errors.js';
6
+ import { printHumanReadableLine } from '../../utils/output.js';
6
7
  function parsePort(value) {
7
8
  if (value === undefined || value === null || value === '') {
8
9
  return DEFAULT_MCP_PORT;
@@ -49,20 +50,20 @@ export function registerMCPCommands(program) {
49
50
  if (!loopback && !token) {
50
51
  throw new DinoxError('--token (or DINOX_MCP_TOKEN) is required when --host is non-loopback');
51
52
  }
52
- console.log('Starting Dinox MCP server...');
53
- console.log(`Host: ${host}`);
54
- console.log(`Port: ${port}`);
55
- console.log(`Auth: ${token ? 'enabled' : 'disabled (loopback only)'}`);
56
- console.log('Protocol: Model Context Protocol (MCP)');
53
+ printHumanReadableLine('Starting Dinox MCP server...');
54
+ printHumanReadableLine(`Host: ${host}`);
55
+ printHumanReadableLine(`Port: ${port}`);
56
+ printHumanReadableLine(`Auth: ${token ? 'enabled' : 'disabled (loopback only)'}`);
57
+ printHumanReadableLine('Protocol: Model Context Protocol (MCP)');
57
58
  if (!loopback) {
58
- console.log('warning: binding to a non-loopback host may expose your local data; use firewall/auth as needed');
59
+ printHumanReadableLine('warning: binding to a non-loopback host may expose your local data; use firewall/auth as needed');
59
60
  }
60
- console.log('');
61
- console.log('Available tools:');
61
+ printHumanReadableLine('');
62
+ printHumanReadableLine('Available tools:');
62
63
  for (const tool of mcpTools) {
63
- console.log(` - ${tool.name}`);
64
+ printHumanReadableLine(` - ${tool.name}`);
64
65
  }
65
- console.log('');
66
+ printHumanReadableLine('');
66
67
  const { server, mcpServer } = await startMCPServer(port, host, token);
67
68
  let shuttingDown = false;
68
69
  const shutdown = async () => {
@@ -6,6 +6,7 @@ import { resolveAuthIdentity } from '../../auth/userInfo.js';
6
6
  import { loadConfig } from '../../config/store.js';
7
7
  import { resolveConfig } from '../../config/resolve.js';
8
8
  import { connectPowerSync } from '../../powersync/runtime.js';
9
+ import { canonicalizeBidlinksInMarkdown } from '../../utils/bidlinkCanonicalization.js';
9
10
  import { parseCreatedAtRange } from '../notes/searchTime.js';
10
11
  import { parseNoteSearchFields, projectNoteSearchFields } from '../notes/searchOutput.js';
11
12
  import { createNote, getNoteDetails, resolveZettelBoxIdsForCreate, resolveZettelBoxIdsForSearch, searchNotes, validateTagsForCreate, } from '../notes/repo.js';
@@ -13,6 +14,7 @@ import { getBacklinks, getGraphStats, getOutlinks, getRelatedNotes } from '../gr
13
14
  import { searchTodoTasks } from '../todo/repo.js';
14
15
  import { convertMarkdownToNoteContent } from '../../utils/tiptapMarkdown.js';
15
16
  import { generateId } from '../../utils/id.js';
17
+ import { printHumanReadableLine } from '../../utils/output.js';
16
18
  import { getPackageVersion } from '../../utils/version.js';
17
19
  const MAX_MCP_REQUEST_BYTES = 1 * 1024 * 1024;
18
20
  const DEFAULT_SEARCH_LIMIT = 50;
@@ -269,7 +271,8 @@ export class MCPServer {
269
271
  const rawConfig = await loadConfig();
270
272
  const config = resolveConfig(rawConfig);
271
273
  const identity = await resolveAuthIdentity(rawConfig, config);
272
- const { contentJson, contentText } = convertMarkdownToNoteContent(contentMd);
274
+ const canonicalContentMd = await canonicalizeBidlinksInMarkdown(this.db, contentMd, identity.userId);
275
+ const { contentJson, contentText } = convertMarkdownToNoteContent(canonicalContentMd);
273
276
  const tags = await validateTagsForCreate(this.db, normalizeStringArray(args.tags));
274
277
  const zettelBoxIds = await resolveZettelBoxIdsForCreate(this.db, normalizeStringArray(args.boxes));
275
278
  const id = generateId();
@@ -277,7 +280,7 @@ export class MCPServer {
277
280
  id,
278
281
  title,
279
282
  noteType: 'crawl',
280
- contentMd,
283
+ contentMd: canonicalContentMd,
281
284
  contentText,
282
285
  contentJson,
283
286
  tags,
@@ -386,7 +389,7 @@ export async function startMCPServer(port = DEFAULT_MCP_PORT, host = '127.0.0.1'
386
389
  server.headersTimeout = 5_000;
387
390
  server.requestTimeout = 10_000;
388
391
  server.listen(port, host, () => {
389
- console.log(`MCP server listening on http://${host}:${port}`);
392
+ printHumanReadableLine(`MCP server listening on http://${host}:${port}`);
390
393
  });
391
394
  return { server, mcpServer };
392
395
  }
@@ -1,104 +1,30 @@
1
- export const mcpTools = [
2
- {
3
- name: 'dinox_search_notes',
4
- description: 'Search notes by keyword, tags, date range, or SQL expression',
5
- inputSchema: {
6
- type: 'object',
7
- properties: {
8
- query: { type: 'string', description: 'Search keyword' },
9
- tags: { type: 'string', description: 'Tag expression (AND/OR/NOT)' },
10
- from: { type: 'string', description: 'Start date (YYYY-MM-DD)' },
11
- to: { type: 'string', description: 'End date (YYYY-MM-DD)' },
12
- days: { type: 'number', description: 'Recent N days' },
13
- box: { type: 'string', description: 'Zettel box name' },
14
- limit: { type: 'number', description: 'Max results (default: 50)' },
15
- offset: { type: 'number', description: 'Result offset (default: 0)' },
16
- fields: {
17
- type: 'array',
18
- items: { type: 'string' },
19
- description: 'Returned fields: id,title,summary,tags,created_at,zettel_boxes',
20
- },
21
- },
22
- },
23
- },
24
- {
25
- name: 'dinox_get_note',
26
- description: 'Get note details by ID',
27
- inputSchema: {
28
- type: 'object',
29
- properties: {
30
- id: { type: 'string', description: 'Note ID' },
31
- },
32
- required: ['id'],
33
- },
34
- },
35
- {
36
- name: 'dinox_create_note',
37
- description: 'Create a new note',
38
- inputSchema: {
39
- type: 'object',
40
- properties: {
41
- title: { type: 'string', description: 'Note title' },
42
- content: { type: 'string', description: 'Markdown content' },
43
- tags: { type: 'array', items: { type: 'string' }, description: 'Tags' },
44
- boxes: { type: 'array', items: { type: 'string' }, description: 'Zettel boxes' },
45
- },
46
- required: ['title', 'content'],
47
- },
48
- },
49
- {
50
- name: 'dinox_graph_backlinks',
51
- description: 'Get notes that link to this note',
52
- inputSchema: {
53
- type: 'object',
54
- properties: {
55
- id: { type: 'string', description: 'Note ID' },
56
- },
57
- required: ['id'],
58
- },
59
- },
60
- {
61
- name: 'dinox_graph_outlinks',
62
- description: 'Get notes that this note links to',
63
- inputSchema: {
64
- type: 'object',
65
- properties: {
66
- id: { type: 'string', description: 'Note ID' },
67
- },
68
- required: ['id'],
69
- },
70
- },
71
- {
72
- name: 'dinox_graph_related',
73
- description: 'Get related notes within N degrees',
74
- inputSchema: {
75
- type: 'object',
76
- properties: {
77
- id: { type: 'string', description: 'Note ID' },
78
- depth: { type: 'number', description: 'Degrees (1-5, default: 2)' },
79
- },
80
- required: ['id'],
81
- },
82
- },
83
- {
84
- name: 'dinox_graph_stats',
85
- description: 'Get graph statistics for notes and links',
86
- inputSchema: {
87
- type: 'object',
88
- properties: {},
89
- },
90
- },
91
- {
92
- name: 'dinox_search_todos',
93
- description: 'Search todo tasks',
94
- inputSchema: {
95
- type: 'object',
96
- properties: {
97
- query: { type: 'string', description: 'Task text query' },
98
- status: { type: 'string', enum: ['all', 'completed', 'uncompleted'], description: 'Task status' },
99
- tags: { type: 'array', items: { type: 'string' }, description: 'Task tags' },
100
- limit: { type: 'number', description: 'Max results (default: 50)' },
101
- },
102
- },
103
- },
104
- ];
1
+ import { listMcpCommandSchemas } from '../schema/spec.js';
2
+ function toMcpProperty(property) {
3
+ if (property.type === 'string[]') {
4
+ return {
5
+ type: 'array',
6
+ items: { type: 'string' },
7
+ ...(property.description ? { description: property.description } : {}),
8
+ ...(property.enum ? { enum: property.enum } : {}),
9
+ };
10
+ }
11
+ return {
12
+ type: property.type,
13
+ ...(property.description ? { description: property.description } : {}),
14
+ ...(property.enum ? { enum: property.enum } : {}),
15
+ };
16
+ }
17
+ export const mcpTools = listMcpCommandSchemas().map((schema) => {
18
+ const mcp = schema.mcp;
19
+ const properties = Object.fromEntries(mcp.properties.map((property) => [property.name, toMcpProperty(property)]));
20
+ const required = mcp.properties.filter((property) => property.required).map((property) => property.name);
21
+ return {
22
+ name: mcp.toolName,
23
+ description: mcp.description,
24
+ inputSchema: {
25
+ type: 'object',
26
+ properties,
27
+ ...(required.length > 0 ? { required } : {}),
28
+ },
29
+ };
30
+ });
@@ -3,7 +3,14 @@ export type MCPTool = {
3
3
  description: string;
4
4
  inputSchema: {
5
5
  type: 'object';
6
- properties: Record<string, any>;
6
+ properties: Record<string, {
7
+ type: 'string' | 'number' | 'boolean' | 'array';
8
+ description?: string;
9
+ enum?: string[];
10
+ items?: {
11
+ type: 'string';
12
+ };
13
+ }>;
7
14
  required?: string[];
8
15
  };
9
16
  };
@@ -1,2 +1,4 @@
1
1
  import { Command } from 'commander';
2
+ import type { CommandGroupDescriptor } from '../descriptor/types.js';
3
+ export declare const metaCommandGroup: CommandGroupDescriptor;
2
4
  export declare function registerMetaCommands(program: Command): void;
@@ -1,8 +1,10 @@
1
1
  import { loadConfig } from '../../config/store.js';
2
2
  import { resolveConfig } from '../../config/resolve.js';
3
- import { printYaml } from '../../utils/output.js';
4
- import { parseSyncTimeoutMs } from '../../utils/syncTimeout.js';
5
3
  import { connectPowerSync, waitForIdleDataFlow } from '../../powersync/runtime.js';
4
+ import { registerCommandGroup } from '../descriptor/register.js';
5
+ import { OFFLINE_OPTIONS, SYNC_TIMEOUT_OPTIONS } from '../schema/globalOptions.js';
6
+ import { printSuccess } from '../../utils/output.js';
7
+ import { parseSyncTimeoutMs } from '../../utils/syncTimeout.js';
6
8
  import { getMetaSchema, getMetaStats } from './repo.js';
7
9
  async function syncBeforeMetaCommand(db, offline, timeoutMs) {
8
10
  if (offline) {
@@ -10,36 +12,65 @@ async function syncBeforeMetaCommand(db, offline, timeoutMs) {
10
12
  }
11
13
  await waitForIdleDataFlow(db, Math.min(timeoutMs, 10_000));
12
14
  }
15
+ async function runMetaStats(context) {
16
+ const config = resolveConfig(await loadConfig());
17
+ const offline = Boolean(context.globals.offline);
18
+ const timeoutMs = parseSyncTimeoutMs(context.globals.syncTimeout) ?? config.sync.timeoutMs;
19
+ const { db, stale } = await connectPowerSync({ config, offline, timeoutMs });
20
+ try {
21
+ await syncBeforeMetaCommand(db, offline, timeoutMs);
22
+ printSuccess({
23
+ stale: offline ? true : stale,
24
+ stats: await getMetaStats(db),
25
+ });
26
+ }
27
+ finally {
28
+ await db.close().catch(() => undefined);
29
+ }
30
+ }
31
+ async function runMetaSchema() {
32
+ printSuccess(getMetaSchema());
33
+ }
34
+ export const metaCommandGroup = {
35
+ name: 'meta',
36
+ description: 'Query Dinox metadata',
37
+ commands: [
38
+ {
39
+ name: 'stats',
40
+ description: 'Get metadata stats (notes/tags/boxes)',
41
+ schema: {
42
+ path: 'meta.stats',
43
+ risk: 'read',
44
+ auth: 'required',
45
+ globalOptions: [...OFFLINE_OPTIONS, ...SYNC_TIMEOUT_OPTIONS],
46
+ output: {
47
+ type: 'structured',
48
+ summary: 'Metadata stats payload',
49
+ fields: ['stale', 'stats'],
50
+ },
51
+ examples: ['dino meta stats --format json'],
52
+ },
53
+ action: runMetaStats,
54
+ },
55
+ {
56
+ name: 'schema',
57
+ description: 'Get structured Dinox data schema for AI integrations',
58
+ schema: {
59
+ path: 'meta.schema',
60
+ risk: 'read',
61
+ auth: 'none',
62
+ globalOptions: [],
63
+ output: {
64
+ type: 'structured',
65
+ summary: 'Structured Dinox data schema payload',
66
+ fields: ['tables', 'relations', 'command_schema'],
67
+ },
68
+ examples: ['dino meta schema --format json'],
69
+ },
70
+ action: runMetaSchema,
71
+ },
72
+ ],
73
+ };
13
74
  export function registerMetaCommands(program) {
14
- const meta = program.command('meta').description('Query Dinox metadata');
15
- meta
16
- .command('stats')
17
- .description('Get metadata stats (notes/tags/boxes)')
18
- .action(async (_options, command) => {
19
- const globals = command.optsWithGlobals?.() ?? {};
20
- const offline = Boolean(globals.offline);
21
- const config = resolveConfig(await loadConfig());
22
- const timeoutMs = parseSyncTimeoutMs(globals.syncTimeout) ?? config.sync.timeoutMs;
23
- const { db, stale } = await connectPowerSync({ config, offline, timeoutMs });
24
- try {
25
- await syncBeforeMetaCommand(db, offline, timeoutMs);
26
- const stats = await getMetaStats(db);
27
- printYaml({
28
- stale: offline ? true : stale,
29
- stats,
30
- });
31
- }
32
- finally {
33
- await db.close().catch(() => undefined);
34
- }
35
- });
36
- meta
37
- .command('schema')
38
- .description('Get structured Dinox data schema for AI integrations')
39
- .action(() => {
40
- printYaml(getMetaSchema());
41
- });
42
- meta.action((_options, command) => {
43
- command.outputHelp();
44
- });
75
+ registerCommandGroup(program, metaCommandGroup);
45
76
  }
@@ -21,6 +21,12 @@ export type MetaSchema = {
21
21
  meta_stats: {
22
22
  fields: string[];
23
23
  };
24
+ command_schema: {
25
+ fields: string[];
26
+ };
27
+ mcp_tool: {
28
+ fields: string[];
29
+ };
24
30
  };
25
31
  };
26
32
  export declare function getMetaStats(db: AbstractPowerSyncDatabase): Promise<MetaStats>;
@@ -66,6 +66,12 @@ export function getMetaSchema() {
66
66
  meta_stats: {
67
67
  fields: ['notes_count', 'tags_count', 'boxes_count', 'latest_note_updated_at'],
68
68
  },
69
+ command_schema: {
70
+ fields: ['path', 'command', 'summary', 'risk', 'auth', 'globalOptions', 'arguments', 'options', 'output', 'examples', 'mcp'],
71
+ },
72
+ mcp_tool: {
73
+ fields: ['name', 'description', 'inputSchema'],
74
+ },
69
75
  },
70
76
  };
71
77
  }
@@ -0,0 +1,10 @@
1
+ import type { CommandExecutionContext } from '../descriptor/types.js';
2
+ export declare function runNoteSearch({ command, options, args }: CommandExecutionContext): Promise<void>;
3
+ export declare function runNoteGet({ command, options, args }: CommandExecutionContext): Promise<void>;
4
+ export declare function runNotePreview({ command, options, args }: CommandExecutionContext): Promise<void>;
5
+ export declare function runNoteDetail({ command, options, args }: CommandExecutionContext): Promise<void>;
6
+ export declare function runNoteCreate({ command, options }: CommandExecutionContext): Promise<void>;
7
+ export declare function runNoteDelete({ command, options, args }: CommandExecutionContext): Promise<void>;
8
+ export declare function runNoteUpdate({ command, options, args }: CommandExecutionContext): Promise<void>;
9
+ export declare function runNoteStar({ command, options, args }: CommandExecutionContext): Promise<void>;
10
+ export declare function runNoteUnstar({ command, options, args }: CommandExecutionContext): Promise<void>;