aui-agent-builder 0.1.13 → 0.1.15
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 +82 -7
- package/dist/api-client/rag-client.d.ts +150 -0
- package/dist/api-client/rag-client.d.ts.map +1 -0
- package/dist/api-client/rag-client.js +190 -0
- package/dist/api-client/rag-client.js.map +1 -0
- package/dist/commands/add-integration.js +55 -34
- package/dist/commands/add-integration.js.map +1 -1
- package/dist/commands/diff.d.ts.map +1 -1
- package/dist/commands/diff.js +49 -0
- package/dist/commands/diff.js.map +1 -1
- package/dist/commands/google-auth.d.ts +16 -0
- package/dist/commands/google-auth.d.ts.map +1 -0
- package/dist/commands/google-auth.js +217 -0
- package/dist/commands/google-auth.js.map +1 -0
- package/dist/commands/import-agent.js +8 -2
- package/dist/commands/import-agent.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +11 -5
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/push.d.ts.map +1 -1
- package/dist/commands/push.js +116 -24
- package/dist/commands/push.js.map +1 -1
- package/dist/commands/rag.d.ts +3 -5
- package/dist/commands/rag.d.ts.map +1 -1
- package/dist/commands/rag.js +375 -182
- package/dist/commands/rag.js.map +1 -1
- package/dist/config/index.d.ts +4 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +22 -1
- package/dist/config/index.js.map +1 -1
- package/dist/mock-data/agent.aui.json +11 -0
- package/dist/utils/git.d.ts +66 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/utils/git.js +262 -0
- package/dist/utils/git.js.map +1 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -113,7 +113,7 @@ Session is stored in `~/.aui/session.json`.
|
|
|
113
113
|
| Command | Description |
|
|
114
114
|
|---------|-------------|
|
|
115
115
|
| `aui add-integration` | Add an integration (API, RAG, or MCP) |
|
|
116
|
-
| `aui rag` |
|
|
116
|
+
| `aui rag` | Manage RAG knowledge bases — upload, export, update |
|
|
117
117
|
| `aui chat` | Interactive conversation with an agent |
|
|
118
118
|
|
|
119
119
|
### Aliases
|
|
@@ -224,7 +224,7 @@ After `aui import-agent` or `aui create-agent`, your project folder looks like:
|
|
|
224
224
|
|
|
225
225
|
```
|
|
226
226
|
my-agent/
|
|
227
|
-
├──
|
|
227
|
+
├── agent.aui.json Agent name, objective, tone, guardrails
|
|
228
228
|
├── parameters.aui.json Data the agent collects and outputs
|
|
229
229
|
├── entities.aui.json Groups of related parameters
|
|
230
230
|
├── integrations.aui.json API, RAG, and MCP connections
|
|
@@ -239,7 +239,7 @@ my-agent/
|
|
|
239
239
|
|
|
240
240
|
### File Reference
|
|
241
241
|
|
|
242
|
-
**`
|
|
242
|
+
**`agent.aui.json`** — The agent's identity. Define its name, objective (what it does), guardrails (what it should not do), tone of voice, and brevity preference.
|
|
243
243
|
|
|
244
244
|
**`parameters.aui.json`** — Data units the agent works with. Each parameter has a code (kebab-case), type (string, numeric, date, boolean, object), usage (input from user, output from API, or both), and a description that guides the LLM on how to extract it.
|
|
245
245
|
|
|
@@ -267,14 +267,75 @@ Select the integration type, provide a code name, and the command scaffolds the
|
|
|
267
267
|
|
|
268
268
|
## RAG Knowledge Bases
|
|
269
269
|
|
|
270
|
-
Manage RAG knowledge bases
|
|
270
|
+
Manage RAG knowledge bases — list, upload files/URLs, export, and update:
|
|
271
271
|
|
|
272
272
|
```bash
|
|
273
|
-
aui rag #
|
|
274
|
-
aui rag --add-file #
|
|
273
|
+
aui rag # Interactive menu
|
|
274
|
+
aui rag --add-file # Quick shortcut to upload files or URLs
|
|
275
275
|
```
|
|
276
276
|
|
|
277
|
-
|
|
277
|
+
### First-Time Setup
|
|
278
|
+
|
|
279
|
+
The first time you run `aui rag`, you'll be prompted to paste your RAG API key. The key is saved securely to `~/.aui/kbm-key` (file permission 600) and reused automatically on future runs. You can also set it via the `AUI_KBM_API_KEY` environment variable.
|
|
280
|
+
|
|
281
|
+
### Interactive Menu
|
|
282
|
+
|
|
283
|
+
Running `aui rag` opens an interactive menu:
|
|
284
|
+
|
|
285
|
+
| Option | What it does |
|
|
286
|
+
|--------|-------------|
|
|
287
|
+
| **List knowledge bases** | Shows all KBs for the current agent with IDs and scope |
|
|
288
|
+
| **Upload files to a knowledge base** | Upload local files (PDF, CSV, TXT, etc.) to a new or existing KB |
|
|
289
|
+
| **Upload URLs to a knowledge base** | Scrape web pages into a new or existing KB |
|
|
290
|
+
| **Export knowledge bases** | Download all KB data to `aui.rag.json` in the current directory |
|
|
291
|
+
| **Update from file** | Push an edited `aui.rag.json` back to the server (diff-based sync) |
|
|
292
|
+
|
|
293
|
+
### Uploading Files
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
aui rag
|
|
297
|
+
# → Upload files to a knowledge base
|
|
298
|
+
# → Select an existing KB or create a new one
|
|
299
|
+
# → Drag/paste file path(s)
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
Supported file types include PDF, CSV, TXT, and other text-based formats. Multiple files can be added in a single session.
|
|
303
|
+
|
|
304
|
+
### Uploading URLs
|
|
305
|
+
|
|
306
|
+
```bash
|
|
307
|
+
aui rag
|
|
308
|
+
# → Upload URLs to a knowledge base
|
|
309
|
+
# → Select an existing KB or create a new one
|
|
310
|
+
# → Paste URL(s) to scrape
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### Export and Update Workflow
|
|
314
|
+
|
|
315
|
+
The export/update flow lets you bulk-edit knowledge base content:
|
|
316
|
+
|
|
317
|
+
```bash
|
|
318
|
+
# 1. Export all KB data to a local JSON file
|
|
319
|
+
aui rag
|
|
320
|
+
# → Export knowledge bases
|
|
321
|
+
# → Saves aui.rag.json
|
|
322
|
+
|
|
323
|
+
# 2. Edit the JSON file — add, modify, or remove vectors
|
|
324
|
+
|
|
325
|
+
# 3. Push changes back
|
|
326
|
+
aui rag
|
|
327
|
+
# → Update from file
|
|
328
|
+
# → Select aui.rag.json
|
|
329
|
+
# → Server applies changes (creates new, updates changed, deletes removed)
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### Quick Upload Shortcut
|
|
333
|
+
|
|
334
|
+
```bash
|
|
335
|
+
aui rag --add-file
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
Skips the menu and goes straight to uploading. Choose between files or URLs, select a knowledge base, and upload.
|
|
278
339
|
|
|
279
340
|
## Validating Changes
|
|
280
341
|
|
|
@@ -379,6 +440,19 @@ aui chat --rest # REST only, no streaming
|
|
|
379
440
|
|
|
380
441
|
`.auirc` — created by `aui import-agent` or `aui create-agent`. Links the project to a backend agent. Also stores the network API key for `aui chat`.
|
|
381
442
|
|
|
443
|
+
### RAG API Key
|
|
444
|
+
|
|
445
|
+
`~/.aui/kbm-key` — created automatically the first time you run `aui rag` and paste the API key. The key is stored with file permission 600 (readable only by you). You can also set it via the `AUI_KBM_API_KEY` environment variable, which takes priority over the saved file.
|
|
446
|
+
|
|
447
|
+
### Stored Files
|
|
448
|
+
|
|
449
|
+
| File | Purpose |
|
|
450
|
+
|------|---------|
|
|
451
|
+
| `~/.aui/session.json` | Auth token, org, account, agent, environment |
|
|
452
|
+
| `~/.aui/kbm-key` | RAG API key (auto-saved on first use) |
|
|
453
|
+
| `.auirc` | Project config — links folder to a backend agent |
|
|
454
|
+
| `aui.rag.json` | Exported RAG knowledge base data |
|
|
455
|
+
|
|
382
456
|
### Environment Variables
|
|
383
457
|
|
|
384
458
|
| Variable | Description |
|
|
@@ -389,6 +463,7 @@ aui chat --rest # REST only, no streaming
|
|
|
389
463
|
| `AUI_ACCOUNT_ID` | Account ID |
|
|
390
464
|
| `AUI_ORGANIZATION_ID` | Organization ID |
|
|
391
465
|
| `AUI_AGENT_CODE` | Agent code |
|
|
466
|
+
| `AUI_KBM_API_KEY` | RAG API key (overrides saved key in `~/.aui/kbm-key`) |
|
|
392
467
|
|
|
393
468
|
## License
|
|
394
469
|
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RAG API Client — Knowledge Base Manager
|
|
3
|
+
*
|
|
4
|
+
* Handles all communication with the knowledge-base-manager service.
|
|
5
|
+
* Base URL: https://api-staging.internal-aui.io/knowledge-base-manager/v1
|
|
6
|
+
*
|
|
7
|
+
* Auth: x-api-key header (NOT the same as the outer-bridge x-access-token)
|
|
8
|
+
*/
|
|
9
|
+
export interface KnowledgeBase {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
scope_id: string;
|
|
13
|
+
scope: {
|
|
14
|
+
type: string;
|
|
15
|
+
network_id: string | null;
|
|
16
|
+
account_id: string | null;
|
|
17
|
+
seed_id: string | null;
|
|
18
|
+
network_category_id: string | null;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export interface BulkFileResult {
|
|
22
|
+
resource_id?: string;
|
|
23
|
+
resource_name: string;
|
|
24
|
+
status: string;
|
|
25
|
+
error?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface BulkFileResponse {
|
|
28
|
+
knowledge_base_id: string;
|
|
29
|
+
knowledge_base_name: string;
|
|
30
|
+
knowledge_base_created: boolean;
|
|
31
|
+
results: BulkFileResult[];
|
|
32
|
+
total_files: number;
|
|
33
|
+
files_accepted: number;
|
|
34
|
+
files_failed: number;
|
|
35
|
+
}
|
|
36
|
+
export interface BulkWebsiteResponse {
|
|
37
|
+
knowledge_base_id: string;
|
|
38
|
+
knowledge_base_name: string;
|
|
39
|
+
knowledge_base_created: boolean;
|
|
40
|
+
results: BulkFileResult[];
|
|
41
|
+
total_urls: number;
|
|
42
|
+
urls_accepted: number;
|
|
43
|
+
urls_failed: number;
|
|
44
|
+
}
|
|
45
|
+
export interface ExportVector {
|
|
46
|
+
title: string;
|
|
47
|
+
content: string;
|
|
48
|
+
category?: string;
|
|
49
|
+
sub_category?: string;
|
|
50
|
+
tags?: string[];
|
|
51
|
+
source_url?: string;
|
|
52
|
+
}
|
|
53
|
+
export interface ExportResource {
|
|
54
|
+
file_name: string;
|
|
55
|
+
resource_type: string;
|
|
56
|
+
vectors: ExportVector[];
|
|
57
|
+
}
|
|
58
|
+
export interface ExportKnowledgeBase {
|
|
59
|
+
name: string;
|
|
60
|
+
description?: string;
|
|
61
|
+
resources: ExportResource[];
|
|
62
|
+
}
|
|
63
|
+
export interface ExportScopeLevel {
|
|
64
|
+
scope_level: string;
|
|
65
|
+
scope: Record<string, unknown>;
|
|
66
|
+
knowledge_bases: ExportKnowledgeBase[];
|
|
67
|
+
}
|
|
68
|
+
export interface ExportResponse {
|
|
69
|
+
scope_levels: ExportScopeLevel[];
|
|
70
|
+
}
|
|
71
|
+
export interface ImportResult {
|
|
72
|
+
scope_level: string;
|
|
73
|
+
knowledge_bases_created: number;
|
|
74
|
+
knowledge_bases_found: number;
|
|
75
|
+
resources_created: number;
|
|
76
|
+
resources_updated: number;
|
|
77
|
+
vectors_created: number;
|
|
78
|
+
vectors_updated: number;
|
|
79
|
+
vectors_deleted: number;
|
|
80
|
+
vectors_unchanged: number;
|
|
81
|
+
}
|
|
82
|
+
export interface ImportResponse {
|
|
83
|
+
results: ImportResult[];
|
|
84
|
+
}
|
|
85
|
+
export declare class RAGClient {
|
|
86
|
+
private baseUrl;
|
|
87
|
+
private apiKey;
|
|
88
|
+
constructor(apiKey?: string);
|
|
89
|
+
private getHeaders;
|
|
90
|
+
/**
|
|
91
|
+
* List knowledge bases for a scope
|
|
92
|
+
*/
|
|
93
|
+
listKnowledgeBases(opts: {
|
|
94
|
+
scopeType: string;
|
|
95
|
+
networkId?: string;
|
|
96
|
+
accountId?: string;
|
|
97
|
+
seedId?: string;
|
|
98
|
+
includeHierarchy?: boolean;
|
|
99
|
+
}): Promise<KnowledgeBase[]>;
|
|
100
|
+
/**
|
|
101
|
+
* Upload files to a knowledge base (multipart form)
|
|
102
|
+
*/
|
|
103
|
+
uploadFiles(opts: {
|
|
104
|
+
filePaths: string[];
|
|
105
|
+
createdBy: string;
|
|
106
|
+
scopeType: string;
|
|
107
|
+
networkId?: string;
|
|
108
|
+
accountId?: string;
|
|
109
|
+
seedId?: string;
|
|
110
|
+
knowledgeBaseId?: string;
|
|
111
|
+
knowledgeBaseName?: string;
|
|
112
|
+
knowledgeBaseDescription?: string;
|
|
113
|
+
}): Promise<BulkFileResponse>;
|
|
114
|
+
/**
|
|
115
|
+
* Scrape URLs into a knowledge base
|
|
116
|
+
*/
|
|
117
|
+
uploadWebsites(opts: {
|
|
118
|
+
urls: Array<{
|
|
119
|
+
url: string;
|
|
120
|
+
resource_name?: string;
|
|
121
|
+
description?: string;
|
|
122
|
+
}>;
|
|
123
|
+
createdBy: string;
|
|
124
|
+
scopeType: string;
|
|
125
|
+
networkId?: string;
|
|
126
|
+
accountId?: string;
|
|
127
|
+
seedId?: string;
|
|
128
|
+
knowledgeBaseId?: string;
|
|
129
|
+
knowledgeBaseName?: string;
|
|
130
|
+
knowledgeBaseDescription?: string;
|
|
131
|
+
}): Promise<BulkWebsiteResponse>;
|
|
132
|
+
/**
|
|
133
|
+
* Export knowledge bases and vectors for a scope
|
|
134
|
+
*/
|
|
135
|
+
exportKnowledgeBases(scope: {
|
|
136
|
+
type: string;
|
|
137
|
+
network_id?: string;
|
|
138
|
+
account_id?: string;
|
|
139
|
+
seed_id?: string;
|
|
140
|
+
network_category_id?: string;
|
|
141
|
+
}): Promise<ExportResponse>;
|
|
142
|
+
/**
|
|
143
|
+
* Import knowledge bases and vectors (diff-based sync)
|
|
144
|
+
*/
|
|
145
|
+
importKnowledgeBases(data: {
|
|
146
|
+
scope_levels: ExportScopeLevel[];
|
|
147
|
+
created_by: string;
|
|
148
|
+
}): Promise<ImportResponse>;
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=rag-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rag-client.d.ts","sourceRoot":"","sources":["../../src/api-client/rag-client.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAQH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAA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IAAI,EAAE;QAC/B,YAAY,EAAE,gBAAgB,EAAE,CAAC;QACjC,UAAU,EAAE,MAAM,CAAC;KACpB,GAAG,OAAO,CAAC,cAAc,CAAC;CAc5B"}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* RAG API Client — Knowledge Base Manager
|
|
4
|
+
*
|
|
5
|
+
* Handles all communication with the knowledge-base-manager service.
|
|
6
|
+
* Base URL: https://api-staging.internal-aui.io/knowledge-base-manager/v1
|
|
7
|
+
*
|
|
8
|
+
* Auth: x-api-key header (NOT the same as the outer-bridge x-access-token)
|
|
9
|
+
*/
|
|
10
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
13
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
14
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
15
|
+
}
|
|
16
|
+
Object.defineProperty(o, k2, desc);
|
|
17
|
+
}) : (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
o[k2] = m[k];
|
|
20
|
+
}));
|
|
21
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
22
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
23
|
+
}) : function(o, v) {
|
|
24
|
+
o["default"] = v;
|
|
25
|
+
});
|
|
26
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
27
|
+
var ownKeys = function(o) {
|
|
28
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
29
|
+
var ar = [];
|
|
30
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
31
|
+
return ar;
|
|
32
|
+
};
|
|
33
|
+
return ownKeys(o);
|
|
34
|
+
};
|
|
35
|
+
return function (mod) {
|
|
36
|
+
if (mod && mod.__esModule) return mod;
|
|
37
|
+
var result = {};
|
|
38
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
39
|
+
__setModuleDefault(result, mod);
|
|
40
|
+
return result;
|
|
41
|
+
};
|
|
42
|
+
})();
|
|
43
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
44
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
45
|
+
};
|
|
46
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
+
exports.RAGClient = void 0;
|
|
48
|
+
const node_fetch_1 = __importDefault(require("node-fetch"));
|
|
49
|
+
const form_data_1 = __importDefault(require("form-data"));
|
|
50
|
+
const fs = __importStar(require("fs"));
|
|
51
|
+
const path = __importStar(require("path"));
|
|
52
|
+
const config_1 = require("../config");
|
|
53
|
+
class RAGClient {
|
|
54
|
+
constructor(apiKey) {
|
|
55
|
+
this.baseUrl = config_1.KBM_BASE_URL;
|
|
56
|
+
this.apiKey = apiKey || config_1.KBM_API_KEY;
|
|
57
|
+
}
|
|
58
|
+
getHeaders() {
|
|
59
|
+
return {
|
|
60
|
+
'x-api-key': this.apiKey,
|
|
61
|
+
'Content-Type': 'application/json'
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* List knowledge bases for a scope
|
|
66
|
+
*/
|
|
67
|
+
async listKnowledgeBases(opts) {
|
|
68
|
+
const params = new URLSearchParams();
|
|
69
|
+
params.set('scope_type', opts.scopeType);
|
|
70
|
+
if (opts.networkId)
|
|
71
|
+
params.set('network_id', opts.networkId);
|
|
72
|
+
if (opts.accountId)
|
|
73
|
+
params.set('account_id', opts.accountId);
|
|
74
|
+
if (opts.seedId)
|
|
75
|
+
params.set('seed_id', opts.seedId);
|
|
76
|
+
if (opts.includeHierarchy)
|
|
77
|
+
params.set('include_hierarchy', 'True');
|
|
78
|
+
const resp = await (0, node_fetch_1.default)(`${this.baseUrl}/knowledge-bases?${params.toString()}`, {
|
|
79
|
+
method: 'GET',
|
|
80
|
+
headers: { 'x-api-key': this.apiKey }
|
|
81
|
+
});
|
|
82
|
+
if (!resp.ok) {
|
|
83
|
+
const body = await resp.text();
|
|
84
|
+
throw new Error(`Failed to list knowledge bases: ${resp.status} ${body}`);
|
|
85
|
+
}
|
|
86
|
+
return resp.json();
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Upload files to a knowledge base (multipart form)
|
|
90
|
+
*/
|
|
91
|
+
async uploadFiles(opts) {
|
|
92
|
+
const formData = new form_data_1.default();
|
|
93
|
+
for (const filePath of opts.filePaths) {
|
|
94
|
+
const fileName = path.basename(filePath);
|
|
95
|
+
formData.append('files', fs.createReadStream(filePath), fileName);
|
|
96
|
+
}
|
|
97
|
+
formData.append('created_by', opts.createdBy);
|
|
98
|
+
formData.append('scope_type', opts.scopeType);
|
|
99
|
+
if (opts.networkId)
|
|
100
|
+
formData.append('network_id', opts.networkId);
|
|
101
|
+
if (opts.accountId)
|
|
102
|
+
formData.append('account_id', opts.accountId);
|
|
103
|
+
if (opts.seedId)
|
|
104
|
+
formData.append('seed_id', opts.seedId);
|
|
105
|
+
if (opts.knowledgeBaseId)
|
|
106
|
+
formData.append('knowledge_base_id', opts.knowledgeBaseId);
|
|
107
|
+
if (opts.knowledgeBaseName)
|
|
108
|
+
formData.append('knowledge_base_name', opts.knowledgeBaseName);
|
|
109
|
+
if (opts.knowledgeBaseDescription)
|
|
110
|
+
formData.append('knowledge_base_description', opts.knowledgeBaseDescription);
|
|
111
|
+
const resp = await (0, node_fetch_1.default)(`${this.baseUrl}/bulk/files`, {
|
|
112
|
+
method: 'POST',
|
|
113
|
+
headers: {
|
|
114
|
+
'x-api-key': this.apiKey,
|
|
115
|
+
...formData.getHeaders()
|
|
116
|
+
},
|
|
117
|
+
body: formData
|
|
118
|
+
});
|
|
119
|
+
if (!resp.ok) {
|
|
120
|
+
const errBody = await resp.text();
|
|
121
|
+
throw new Error(`File upload failed: ${resp.status} ${errBody}`);
|
|
122
|
+
}
|
|
123
|
+
return resp.json();
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Scrape URLs into a knowledge base
|
|
127
|
+
*/
|
|
128
|
+
async uploadWebsites(opts) {
|
|
129
|
+
const scope = { type: opts.scopeType };
|
|
130
|
+
if (opts.networkId)
|
|
131
|
+
scope.network_id = opts.networkId;
|
|
132
|
+
if (opts.accountId)
|
|
133
|
+
scope.account_id = opts.accountId;
|
|
134
|
+
if (opts.seedId)
|
|
135
|
+
scope.seed_id = opts.seedId;
|
|
136
|
+
const body = {
|
|
137
|
+
urls: opts.urls,
|
|
138
|
+
scope,
|
|
139
|
+
created_by: opts.createdBy
|
|
140
|
+
};
|
|
141
|
+
if (opts.knowledgeBaseId)
|
|
142
|
+
body.knowledge_base_id = opts.knowledgeBaseId;
|
|
143
|
+
if (opts.knowledgeBaseName)
|
|
144
|
+
body.knowledge_base_name = opts.knowledgeBaseName;
|
|
145
|
+
if (opts.knowledgeBaseDescription)
|
|
146
|
+
body.knowledge_base_description = opts.knowledgeBaseDescription;
|
|
147
|
+
const resp = await (0, node_fetch_1.default)(`${this.baseUrl}/bulk/websites`, {
|
|
148
|
+
method: 'POST',
|
|
149
|
+
headers: this.getHeaders(),
|
|
150
|
+
body: JSON.stringify(body)
|
|
151
|
+
});
|
|
152
|
+
if (!resp.ok) {
|
|
153
|
+
const errBody = await resp.text();
|
|
154
|
+
throw new Error(`Website scrape failed: ${resp.status} ${errBody}`);
|
|
155
|
+
}
|
|
156
|
+
return resp.json();
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Export knowledge bases and vectors for a scope
|
|
160
|
+
*/
|
|
161
|
+
async exportKnowledgeBases(scope) {
|
|
162
|
+
const resp = await (0, node_fetch_1.default)(`${this.baseUrl}/bulk/export`, {
|
|
163
|
+
method: 'POST',
|
|
164
|
+
headers: this.getHeaders(),
|
|
165
|
+
body: JSON.stringify({ scope })
|
|
166
|
+
});
|
|
167
|
+
if (!resp.ok) {
|
|
168
|
+
const errBody = await resp.text();
|
|
169
|
+
throw new Error(`Export failed: ${resp.status} ${errBody}`);
|
|
170
|
+
}
|
|
171
|
+
return resp.json();
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Import knowledge bases and vectors (diff-based sync)
|
|
175
|
+
*/
|
|
176
|
+
async importKnowledgeBases(data) {
|
|
177
|
+
const resp = await (0, node_fetch_1.default)(`${this.baseUrl}/bulk/import`, {
|
|
178
|
+
method: 'POST',
|
|
179
|
+
headers: this.getHeaders(),
|
|
180
|
+
body: JSON.stringify(data)
|
|
181
|
+
});
|
|
182
|
+
if (!resp.ok) {
|
|
183
|
+
const errBody = await resp.text();
|
|
184
|
+
throw new Error(`Import failed: ${resp.status} ${errBody}`);
|
|
185
|
+
}
|
|
186
|
+
return resp.json();
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
exports.RAGClient = RAGClient;
|
|
190
|
+
//# sourceMappingURL=rag-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rag-client.js","sourceRoot":"","sources":["../../src/api-client/rag-client.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4DAAgD;AAChD,0DAAiC;AACjC,uCAAyB;AACzB,2CAA6B;AAC7B,sCAAsD;AAyFtD,MAAa,SAAS;IAIpB,YAAY,MAAe;QACzB,IAAI,CAAC,OAAO,GAAG,qBAAY,CAAC;QAC5B,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI,oBAAW,CAAC;IACtC,CAAC;IAEO,UAAU;QAChB,OAAO;YACL,WAAW,EAAE,IAAI,CAAC,MAAM;YACxB,cAAc,EAAE,kBAAkB;SACnC,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,kBAAkB,CAA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AC;QAC9D,CAAC;QAED,OAAO,IAAI,CAAC,IAAI,EAA6B,CAAC;IAChD,CAAC;CACF;AAnLD,8BAmLC"}
|
|
@@ -138,34 +138,56 @@ function scaffoldAPI(code) {
|
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
140
|
async function scaffoldRAG(code) {
|
|
141
|
-
|
|
142
|
-
const {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
choices: [
|
|
147
|
-
{ name: 'Create a new knowledge hub', value: 'new' },
|
|
148
|
-
{ name: 'Use an existing knowledge hub (enter ID)', value: 'existing' }
|
|
149
|
-
]
|
|
150
|
-
}]);
|
|
151
|
-
let knowledgeHub;
|
|
141
|
+
const { getConfig, loadSession, KBM_API_KEY } = await Promise.resolve().then(() => __importStar(require('../config')));
|
|
142
|
+
const { RAGClient } = await Promise.resolve().then(() => __importStar(require('../api-client/rag-client')));
|
|
143
|
+
const config = getConfig();
|
|
144
|
+
const session = loadSession();
|
|
145
|
+
const networkId = session?.network_id;
|
|
152
146
|
let knowledgeBaseId = '';
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
147
|
+
let knowledgeHubName = '';
|
|
148
|
+
let knowledgeHubScope = 'network';
|
|
149
|
+
// Try to fetch existing KBs from the API
|
|
150
|
+
if (networkId && KBM_API_KEY) {
|
|
151
|
+
const client = new RAGClient(KBM_API_KEY);
|
|
152
|
+
try {
|
|
153
|
+
const kbs = await client.listKnowledgeBases({
|
|
154
|
+
scopeType: 'NETWORK',
|
|
155
|
+
networkId,
|
|
156
|
+
includeHierarchy: true
|
|
157
|
+
});
|
|
158
|
+
if (kbs.length > 0) {
|
|
159
|
+
const choices = [
|
|
160
|
+
...kbs.map(kb => ({
|
|
161
|
+
name: `${kb.name} ${chalk_1.default.gray(`(${kb.id})`)}`,
|
|
162
|
+
value: { id: kb.id, name: kb.name, scope: kb.scope?.type?.toLowerCase() || 'network' }
|
|
163
|
+
})),
|
|
164
|
+
new inquirer_1.default.Separator(),
|
|
165
|
+
{ name: chalk_1.default.cyan('+ Create a new knowledge base'), value: 'new' }
|
|
166
|
+
];
|
|
167
|
+
const { selected } = await inquirer_1.default.prompt([{
|
|
168
|
+
type: 'list',
|
|
169
|
+
name: 'selected',
|
|
170
|
+
message: 'Knowledge base:',
|
|
171
|
+
choices,
|
|
172
|
+
pageSize: 15
|
|
173
|
+
}]);
|
|
174
|
+
if (selected !== 'new') {
|
|
175
|
+
knowledgeBaseId = selected.id;
|
|
176
|
+
knowledgeHubName = selected.name;
|
|
177
|
+
knowledgeHubScope = selected.scope;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
catch {
|
|
182
|
+
// API unavailable, fall through to manual entry
|
|
183
|
+
}
|
|
162
184
|
}
|
|
163
|
-
|
|
185
|
+
if (!knowledgeBaseId) {
|
|
164
186
|
const khAnswers = await inquirer_1.default.prompt([
|
|
165
187
|
{
|
|
166
188
|
type: 'input',
|
|
167
189
|
name: 'name',
|
|
168
|
-
message: 'Knowledge
|
|
190
|
+
message: 'Knowledge base name:',
|
|
169
191
|
validate: (input) => input.trim().length > 0 || 'Name is required'
|
|
170
192
|
},
|
|
171
193
|
{
|
|
@@ -173,22 +195,21 @@ async function scaffoldRAG(code) {
|
|
|
173
195
|
name: 'scope',
|
|
174
196
|
message: 'Scope:',
|
|
175
197
|
choices: [
|
|
176
|
-
{ name: '
|
|
198
|
+
{ name: 'Network — specific to this agent only', value: 'network' },
|
|
177
199
|
{ name: 'Account — shared within this account', value: 'account' },
|
|
178
|
-
{ name: '
|
|
200
|
+
{ name: 'Organization — shared across all accounts and agents', value: 'organization' }
|
|
179
201
|
]
|
|
180
202
|
}
|
|
181
203
|
]);
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
scope: khAnswers.scope,
|
|
185
|
-
files: []
|
|
186
|
-
};
|
|
187
|
-
// TODO: When knowledge hub creation endpoint is ready:
|
|
188
|
-
// POST /knowledge-hub with { name, scope }
|
|
189
|
-
// Response includes the knowledge_base_id
|
|
190
|
-
knowledgeBaseId = `kh-${code}-pending`;
|
|
204
|
+
knowledgeHubName = khAnswers.name.trim();
|
|
205
|
+
knowledgeHubScope = khAnswers.scope;
|
|
191
206
|
}
|
|
207
|
+
const knowledgeHub = {
|
|
208
|
+
name: knowledgeHubName,
|
|
209
|
+
scope: knowledgeHubScope,
|
|
210
|
+
files: [],
|
|
211
|
+
...(knowledgeBaseId ? { id: knowledgeBaseId } : {})
|
|
212
|
+
};
|
|
192
213
|
return {
|
|
193
214
|
type: 'RAG',
|
|
194
215
|
code,
|
|
@@ -198,7 +219,7 @@ async function scaffoldRAG(code) {
|
|
|
198
219
|
ranker_top_k: 3,
|
|
199
220
|
ranker_model: null,
|
|
200
221
|
confidence_threshold: 0.3,
|
|
201
|
-
knowledge_base_id: knowledgeBaseId,
|
|
222
|
+
knowledge_base_id: knowledgeBaseId || '',
|
|
202
223
|
parent_knowledge_base_ids: [],
|
|
203
224
|
allow_multiple_calls: false,
|
|
204
225
|
placeholders: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-integration.js","sourceRoot":"","sources":["../../src/commands/add-integration.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBH,wCAuDC;AAtED,uCAAyB;AACzB,2CAA6B;AAC7B,kDAA0B;AAC1B,wDAAgC;AAChC,sCAA4C;AAQ5C;;GAEG;AACI,KAAK,UAAU,cAAc,CAAC,WAAkC,EAAE;IACvE,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,sDAAsD,CAAC,CAAC,CAAC;IAC/E,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,eAAK,CAAC,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,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../src/commands/diff.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAQH;;GAEG;AACH,wBAAsB,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../src/commands/diff.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAQH;;GAEG;AACH,wBAAsB,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA4H5E"}
|