@kb-labs/mind-entry 2.14.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.
package/README.md ADDED
@@ -0,0 +1,218 @@
1
+ # @kb-labs/mind-cli
2
+
3
+ CLI commands for KB Labs Mind.
4
+
5
+ ## Vision & Purpose
6
+
7
+ **@kb-labs/mind-cli** provides CLI commands for KB Labs Mind. It includes commands for indexing, querying, packing, and verifying Mind indexes, plus REST handlers and Studio widgets.
8
+
9
+ ### Core Goals
10
+
11
+ - **Indexing Commands**: Index codebase and update indexes
12
+ - **Query Commands**: Query Mind indexes
13
+ - **Pack Commands**: Build context packs
14
+ - **Verify Commands**: Verify Mind indexes
15
+ - **REST Handlers**: REST API handlers
16
+ - **Studio Widgets**: Studio widget implementations
17
+
18
+ ## Package Status
19
+
20
+ - **Version**: 0.1.0
21
+ - **Stage**: Stable
22
+ - **Status**: Production Ready ✅
23
+
24
+ ## Architecture
25
+
26
+ ### High-Level Overview
27
+
28
+ ```
29
+ Mind CLI
30
+
31
+ ├──► CLI Commands
32
+ ├──► Application Layer
33
+ ├──► Domain Layer
34
+ ├──► Infrastructure Layer
35
+ ├──► REST Handlers
36
+ └──► Studio Widgets
37
+ ```
38
+
39
+ ### Key Components
40
+
41
+ 1. **CLI Commands** (`cli/`): CLI command implementations
42
+ 2. **Application Layer** (`application/`): Use cases and services
43
+ 3. **Domain Layer** (`domain/`): Domain logic
44
+ 4. **Infrastructure Layer** (`infra/`): Adapters and infrastructure
45
+ 5. **REST Handlers** (`rest/`): REST API handlers
46
+ 6. **Studio Widgets** (`studio/`): Studio widget implementations
47
+
48
+ ## ✨ Features
49
+
50
+ - **Indexing Commands**: Index codebase and update indexes
51
+ - **Query Commands**: Query Mind indexes
52
+ - **Pack Commands**: Build context packs
53
+ - **Verify Commands**: Verify Mind indexes
54
+ - **REST Handlers**: REST API handlers
55
+ - **Studio Widgets**: Query and verify widgets for Studio
56
+
57
+ ## 📦 API Reference
58
+
59
+ ### Main Exports
60
+
61
+ #### CLI Commands
62
+
63
+ - `index`: Index codebase command
64
+ - `query`: Query Mind index command
65
+ - `pack`: Build context pack command
66
+ - `verify`: Verify Mind index command
67
+
68
+ #### Manifest
69
+
70
+ - `manifest`: Plugin manifest V2
71
+
72
+ ## 🔧 Configuration
73
+
74
+ ### Configuration Options
75
+
76
+ All configuration via CLI flags and kb-labs.config.json.
77
+
78
+ ### CLI Flags
79
+
80
+ - `--json`: Output JSON format
81
+ - `--quiet`: Quiet mode
82
+ - `--verbose`: Verbose output
83
+
84
+ ## 🔗 Dependencies
85
+
86
+ ### Runtime Dependencies
87
+
88
+ - `@byjohann/toon` (`0.4.0`): Terminal UI library
89
+ - `@kb-labs/analytics-sdk-node` (`link:../../../kb-labs-analytics/packages/analytics-sdk-node`): Analytics SDK
90
+ - `@kb-labs/core` (`link:../../../kb-labs-core`): Core package
91
+ - `@kb-labs/plugin-manifest` (`link:../../../kb-labs-plugin/packages/manifest`): Plugin manifest
92
+ - `@kb-labs/plugin-adapter-studio` (`link:../../../kb-labs-plugin/packages/adapters/studio`): Studio adapter
93
+ - `@kb-labs/mind-contracts` (`link:../contracts`): Mind contracts
94
+ - `@kb-labs/mind-gateway` (`link:../mind-gateway`): Mind gateway
95
+ - `@kb-labs/mind-core` (`link:../mind-core`): Mind core
96
+ - `@kb-labs/mind-indexer` (`link:../mind-indexer`): Mind indexer
97
+ - `@kb-labs/mind-pack` (`link:../mind-pack`): Mind pack
98
+ - `@kb-labs/mind-query` (`link:../mind-query`): Mind query
99
+ - `@kb-labs/mind-types` (`link:../mind-types`): Mind types
100
+ - `@kb-labs/shared-cli-ui` (`link:../../../kb-labs-shared/packages/cli-ui`): Shared CLI UI
101
+ - `@tanstack/react-query` (`^5.0.0`): React Query
102
+ - `@aws-sdk/client-s3` (`^3.929.0`): AWS S3 client
103
+ - `ajv` (`^8.17.1`): JSON schema validation
104
+ - `ajv-formats` (`^3.0.1`): AJV formats
105
+ - `glob` (`^11.0.0`): File globbing
106
+ - `react` (`^18.0.0`): React
107
+ - `uuidv7` (`^1.0.0`): UUID v7 generation
108
+ - `yaml` (`^2.8.0`): YAML parsing
109
+ - `zod` (`^3.23.8`): Schema validation
110
+
111
+ ### Development Dependencies
112
+
113
+ - `@kb-labs/devkit` (`link:../../../kb-labs-devkit`): DevKit presets
114
+ - `@types/node` (`^24.7.0`): Node.js types
115
+ - `@types/react` (`^18.3.18`): React types
116
+ - `tsup` (`^8.5.0`): TypeScript bundler
117
+ - `typescript` (`^5.6.3`): TypeScript compiler
118
+ - `vitest` (`^3.2.4`): Test runner
119
+
120
+ ## 🧪 Testing
121
+
122
+ ### Test Structure
123
+
124
+ ```
125
+ src/__tests__/
126
+ └── (13 test files)
127
+ ```
128
+
129
+ ### Test Coverage
130
+
131
+ - **Current Coverage**: ~75%
132
+ - **Target Coverage**: 90%
133
+
134
+ ## 📈 Performance
135
+
136
+ ### Performance Characteristics
137
+
138
+ - **Time Complexity**: O(1) for command registration, O(n) for command execution
139
+ - **Space Complexity**: O(1)
140
+ - **Bottlenecks**: Indexing and query operations
141
+
142
+ ## 🔒 Security
143
+
144
+ ### Security Considerations
145
+
146
+ - **Input Validation**: Command input validation
147
+ - **Path Validation**: Path validation for file operations
148
+
149
+ ### Known Vulnerabilities
150
+
151
+ - None
152
+
153
+ ## 🐛 Known Issues & Limitations
154
+
155
+ ### Known Issues
156
+
157
+ - None currently
158
+
159
+ ### Limitations
160
+
161
+ ## Breaking changes (no legacy compatibility)
162
+
163
+ - `runRagQuery` response field `knowledge` renamed to `result`.
164
+ - Runtime wrappers `createKnowledgeService/createKnowledgeEngineRegistry` removed from `mind-cli`.
165
+ - Config resolution now supports only `.kb/kb.config.json` and `kb.config.json` with `profiles[].products.mind` (or root `mind`).
166
+ - Legacy `knowledge.json` and top-level `knowledge` config are rejected.
167
+
168
+ - **Command Types**: Fixed command types
169
+ - **Output Formats**: Fixed output formats
170
+
171
+ ### Future Improvements
172
+
173
+ - **More Commands**: Additional commands
174
+ - **Custom Output Formats**: Custom output format support
175
+
176
+ ## 🔄 Migration & Breaking Changes
177
+
178
+ ### Migration from Previous Versions
179
+
180
+ No breaking changes in current version (0.1.0).
181
+
182
+ ### Breaking Changes in Future Versions
183
+
184
+ - None planned
185
+
186
+ ## 📚 Examples
187
+
188
+ ### Example 1: Index Codebase
189
+
190
+ ```bash
191
+ kb mind:index
192
+ ```
193
+
194
+ ### Example 2: Query Mind Index
195
+
196
+ ```bash
197
+ kb mind:query --query impact --params '{"symbol":"MyFunction"}'
198
+ ```
199
+
200
+ ### Example 3: Build Context Pack
201
+
202
+ ```bash
203
+ kb mind:pack --intent "Review this code change"
204
+ ```
205
+
206
+ ### Example 4: Verify Index
207
+
208
+ ```bash
209
+ kb mind:verify
210
+ ```
211
+
212
+ ## 🤝 Contributing
213
+
214
+ See [CONTRIBUTING.md](../../CONTRIBUTING.md) for development guidelines.
215
+
216
+ ## 📄 License
217
+
218
+ MIT © KB Labs
@@ -0,0 +1,24 @@
1
+ import * as _kb_labs_shared_command_kit from '@kb-labs/shared-command-kit';
2
+
3
+ /**
4
+ * Mind init command (V3)
5
+ *
6
+ * V3 Migration:
7
+ * - Default export with defineCommand
8
+ * - handler: { execute(ctx, input) }
9
+ * - NO permissions (inherited from manifest)
10
+ * - ctx.ui, ctx.logger, ctx.state (flat structure)
11
+ */
12
+ interface InitInput {
13
+ argv: string[];
14
+ flags: {
15
+ cwd?: string;
16
+ force?: boolean;
17
+ json?: boolean;
18
+ verbose?: boolean;
19
+ quiet?: boolean;
20
+ };
21
+ }
22
+ declare const _default: _kb_labs_shared_command_kit.CommandHandlerV3<unknown, InitInput, unknown>;
23
+
24
+ export { _default as default };
@@ -0,0 +1,114 @@
1
+ import { defineCommand } from '@kb-labs/sdk';
2
+ import { initMindStructure } from '@kb-labs/mind-indexer';
3
+ import { join } from 'path';
4
+ import { promises } from 'fs';
5
+
6
+ // src/cli/commands/init.ts
7
+ var init_default = defineCommand({
8
+ id: "mind:init",
9
+ description: "Initialize mind workspace",
10
+ // ❌ NO permissions here - they are in manifest.v3.ts!
11
+ // Permissions are manifest-wide in V3
12
+ handler: {
13
+ async execute(ctx, input) {
14
+ const startTime = Date.now();
15
+ const { flags } = input;
16
+ const cwd = flags.cwd || ctx.cwd;
17
+ ctx.trace?.addEvent?.("mind.init.start", {
18
+ cwd,
19
+ command: "mind:init",
20
+ force: flags.force
21
+ });
22
+ ctx.trace?.addEvent?.("mind.init.initializing", { cwd, force: flags.force });
23
+ const mindDir = await initMindStructure({
24
+ cwd,
25
+ force: flags.force,
26
+ log: (entry) => {
27
+ if (!flags.quiet && !flags.json) {
28
+ ctx.ui.info(`Init: ${entry.msg || entry}`);
29
+ }
30
+ ctx.trace?.addEvent?.("mind.init.step", { msg: entry.msg || entry });
31
+ }
32
+ });
33
+ ctx.trace?.addEvent?.("mind.init.complete", {
34
+ mindDir,
35
+ cwd
36
+ });
37
+ const artifacts = [];
38
+ const artifactPatterns = [
39
+ { name: "Index", pattern: "index.json", description: "Main Mind index" },
40
+ { name: "API Index", pattern: "api-index.json", description: "API index" },
41
+ { name: "Dependencies", pattern: "deps.json", description: "Dependencies graph" },
42
+ { name: "Recent Diff", pattern: "recent-diff.json", description: "Recent changes diff" }
43
+ ];
44
+ for (const { name, pattern, description } of artifactPatterns) {
45
+ const artifactPath = join(mindDir, pattern);
46
+ try {
47
+ const stats = await promises.stat(artifactPath);
48
+ artifacts.push({
49
+ name,
50
+ path: artifactPath,
51
+ size: stats.size,
52
+ modified: stats.mtime,
53
+ description
54
+ });
55
+ } catch {
56
+ }
57
+ }
58
+ ctx.trace?.addEvent?.("mind.init.artifacts", {
59
+ mindDir,
60
+ artifactsCount: artifacts.length
61
+ });
62
+ const timing = Date.now() - startTime;
63
+ if (flags.json) {
64
+ ctx.ui.info(JSON.stringify({
65
+ ok: true,
66
+ summary: {
67
+ Workspace: mindDir,
68
+ Status: "Initialized"
69
+ },
70
+ artifacts,
71
+ timingMs: timing,
72
+ data: {
73
+ mindDir,
74
+ cwd
75
+ }
76
+ }));
77
+ } else if (!flags.quiet) {
78
+ const artifactItems = [];
79
+ for (const artifact of artifacts) {
80
+ artifactItems.push(`\u2713 ${artifact.name}: ${artifact.description}`);
81
+ }
82
+ const sections = [
83
+ {
84
+ header: "Summary",
85
+ items: [
86
+ `Workspace: ${mindDir}`,
87
+ `Status: Initialized`
88
+ ]
89
+ }
90
+ ];
91
+ if (artifacts.length > 0) {
92
+ sections.push({
93
+ header: "Created Artifacts",
94
+ items: artifactItems
95
+ });
96
+ }
97
+ ctx.ui.success("Mind workspace initialized", {
98
+ title: "Mind Init",
99
+ sections,
100
+ timing
101
+ });
102
+ }
103
+ return {
104
+ exitCode: 0,
105
+ mindDir,
106
+ artifacts
107
+ };
108
+ }
109
+ }
110
+ });
111
+
112
+ export { init_default as default };
113
+ //# sourceMappingURL=init.js.map
114
+ //# sourceMappingURL=init.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/cli/commands/init.ts"],"names":["fsp"],"mappings":";;;;;;AAuCA,IAAO,eAAQ,aAAA,CAAc;AAAA,EAC3B,EAAA,EAAI,WAAA;AAAA,EACJ,WAAA,EAAa,2BAAA;AAAA;AAAA;AAAA,EAKb,OAAA,EAAS;AAAA,IACP,MAAM,OAAA,CAAQ,GAAA,EAAsB,KAAA,EAAuC;AACzE,MAAA,MAAM,SAAA,GAAY,KAAK,GAAA,EAAI;AAC3B,MAAA,MAAM,EAAE,OAAM,GAAI,KAAA;AAElB,MAAA,MAAM,GAAA,GAAM,KAAA,CAAM,GAAA,IAAO,GAAA,CAAI,GAAA;AAG7B,MAAA,GAAA,CAAI,KAAA,EAAO,WAAW,iBAAA,EAAmB;AAAA,QACvC,GAAA;AAAA,QACA,OAAA,EAAS,WAAA;AAAA,QACT,OAAO,KAAA,CAAM;AAAA,OACd,CAAA;AAED,MAAA,GAAA,CAAI,KAAA,EAAO,WAAW,wBAAA,EAA0B,EAAE,KAAK,KAAA,EAAO,KAAA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A;AACF;AACF,SACF;AAEA,QAAA,IAAI,SAAA,CAAU,SAAS,CAAA,EAAG;AACxB,UAAA,QAAA,CAAS,IAAA,CAAK;AAAA,YACZ,MAAA,EAAQ,mBAAA;AAAA,YACR,KAAA,EAAO;AAAA,WACR,CAAA;AAAA,QACH;AAGA,QAAA,GAAA,CAAI,EAAA,CAAG,QAAQ,4BAAA,EAA8B;AAAA,UAC3C,KAAA,EAAO,WAAA;AAAA,UACP,QAAA;AAAA,UACA;AAAA,SACD,CAAA;AAAA,MACH;AAGA,MAAA,OAAO;AAAA,QACL,QAAA,EAAU,CAAA;AAAA,QACV,OAAA;AAAA,QACA;AAAA,OACF;AAAA,IACF;AAAA;AAEJ,CAAC","file":"init.js","sourcesContent":["/**\n * Mind init command (V3)\n *\n * V3 Migration:\n * - Default export with defineCommand\n * - handler: { execute(ctx, input) }\n * - NO permissions (inherited from manifest)\n * - ctx.ui, ctx.logger, ctx.state (flat structure)\n */\n\nimport { defineCommand, type PluginContextV3 } from '@kb-labs/sdk';\nimport { initMindStructure } from '@kb-labs/mind-indexer';\nimport { join } from 'node:path';\nimport { promises as fsp } from 'node:fs';\n\ninterface InitInput {\n argv: string[];\n flags: {\n cwd?: string;\n force?: boolean;\n json?: boolean;\n verbose?: boolean;\n quiet?: boolean;\n };\n}\n\ninterface InitResult {\n exitCode: number;\n mindDir?: string;\n artifacts?: Array<{\n name: string;\n path: string;\n size: number;\n modified: Date;\n description: string;\n }>;\n}\n\n// V3: Default export - REQUIRED\nexport default defineCommand({\n id: 'mind:init',\n description: 'Initialize mind workspace',\n\n // ❌ NO permissions here - they are in manifest.v3.ts!\n // Permissions are manifest-wide in V3\n\n handler: {\n async execute(ctx: PluginContextV3, input: InitInput): Promise<InitResult> {\n const startTime = Date.now();\n const { flags } = input;\n\n const cwd = flags.cwd || ctx.cwd;\n\n // V3 API: Use trace for logging (logger not yet in runtime)\n ctx.trace?.addEvent?.('mind.init.start', {\n cwd,\n command: 'mind:init',\n force: flags.force,\n });\n\n ctx.trace?.addEvent?.('mind.init.initializing', { cwd, force: flags.force });\n\n // Initialize Mind structure\n const mindDir = await initMindStructure({\n cwd,\n force: flags.force,\n log: (entry: any) => {\n if (!flags.quiet && !flags.json) {\n // V3 API: ctx.ui (not ctx.output.ui)\n ctx.ui.info(`Init: ${entry.msg || entry}`);\n }\n ctx.trace?.addEvent?.('mind.init.step', { msg: entry.msg || entry });\n },\n });\n\n ctx.trace?.addEvent?.('mind.init.complete', {\n mindDir,\n cwd,\n });\n\n // Discover created artifacts\n const artifacts: InitResult['artifacts'] = [];\n\n const artifactPatterns = [\n { name: 'Index', pattern: 'index.json', description: 'Main Mind index' },\n { name: 'API Index', pattern: 'api-index.json', description: 'API index' },\n { name: 'Dependencies', pattern: 'deps.json', description: 'Dependencies graph' },\n { name: 'Recent Diff', pattern: 'recent-diff.json', description: 'Recent changes diff' },\n ];\n\n for (const { name, pattern, description } of artifactPatterns) {\n const artifactPath = join(mindDir, pattern);\n try {\n const stats = await fsp.stat(artifactPath);\n artifacts.push({\n name,\n path: artifactPath,\n size: stats.size,\n modified: stats.mtime,\n description,\n });\n } catch {\n // Artifact doesn't exist, skip\n }\n }\n\n ctx.trace?.addEvent?.('mind.init.artifacts', {\n mindDir,\n artifactsCount: artifacts.length,\n });\n\n const timing = Date.now() - startTime;\n\n // Output result\n if (flags.json) {\n // V3 API: Write JSON to stdout directly\n ctx.ui.info(JSON.stringify({\n ok: true,\n summary: {\n Workspace: mindDir,\n Status: 'Initialized',\n },\n artifacts,\n timingMs: timing,\n data: {\n mindDir,\n cwd,\n },\n }));\n } else if (!flags.quiet) {\n // V3 API: Enhanced UI with MessageOptions\n const artifactItems: string[] = [];\n for (const artifact of artifacts) {\n artifactItems.push(`✓ ${artifact.name}: ${artifact.description}`);\n }\n\n const sections: Array<{ header?: string; items: string[] }> = [\n {\n header: 'Summary',\n items: [\n `Workspace: ${mindDir}`,\n `Status: Initialized`,\n ],\n },\n ];\n\n if (artifacts.length > 0) {\n sections.push({\n header: 'Created Artifacts',\n items: artifactItems,\n });\n }\n\n // V3 API: ctx.ui.success with MessageOptions (enhanced UI)\n ctx.ui.success('Mind workspace initialized', {\n title: 'Mind Init',\n sections,\n timing,\n });\n }\n\n // V3: Return structured result with exitCode\n return {\n exitCode: 0,\n mindDir,\n artifacts,\n };\n },\n },\n});\n"]}
@@ -0,0 +1,20 @@
1
+ import * as _kb_labs_shared_command_kit from '@kb-labs/shared-command-kit';
2
+
3
+ /**
4
+ * Mind rag-index command - build Mind indexes (V3)
5
+ */
6
+ interface RagIndexInput {
7
+ argv: string[];
8
+ flags: {
9
+ cwd?: string;
10
+ scope?: string;
11
+ include?: string;
12
+ exclude?: string;
13
+ skipDeduplication?: boolean;
14
+ json?: boolean;
15
+ quiet?: boolean;
16
+ };
17
+ }
18
+ declare const _default: _kb_labs_shared_command_kit.CommandHandlerV3<unknown, RagIndexInput, unknown>;
19
+
20
+ export { _default as default };