@harness-nexus/cli 0.1.0-alpha.3 → 0.1.0-alpha.4
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/dist/daemon/acp/agent-connection.d.ts +37 -3
- package/dist/daemon/acp/agent-connection.d.ts.map +1 -1
- package/dist/daemon/acp/agent-connection.js +57 -6
- package/dist/daemon/acp/agent-connection.js.map +1 -1
- package/dist/daemon/adapter-ledger.d.ts +62 -0
- package/dist/daemon/adapter-ledger.d.ts.map +1 -0
- package/dist/daemon/adapter-ledger.js +207 -0
- package/dist/daemon/adapter-ledger.js.map +1 -0
- package/dist/daemon/chat.d.ts +24 -1
- package/dist/daemon/chat.d.ts.map +1 -1
- package/dist/daemon/chat.js +321 -12
- package/dist/daemon/chat.js.map +1 -1
- package/dist/daemon/client.d.ts +3 -2
- package/dist/daemon/client.d.ts.map +1 -1
- package/dist/daemon/client.js +27 -5
- package/dist/daemon/client.js.map +1 -1
- package/dist/daemon/runtime-config.d.ts.map +1 -1
- package/dist/daemon/runtime-config.js +5 -1
- package/dist/daemon/runtime-config.js.map +1 -1
- package/dist/daemon/sessions.d.ts +5 -0
- package/dist/daemon/sessions.d.ts.map +1 -1
- package/dist/daemon/sessions.js +92 -48
- package/dist/daemon/sessions.js.map +1 -1
- package/dist/daemon/workspace.d.ts +3 -1
- package/dist/daemon/workspace.d.ts.map +1 -1
- package/dist/daemon/workspace.js +25 -8
- package/dist/daemon/workspace.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import type { WorkspaceDirectory } from '@harness-nexus/shared';
|
|
1
|
+
import type { WorkspaceDirectory, WorkspaceFile } from '@harness-nexus/shared';
|
|
2
2
|
export declare function listDirectories(path: string): Promise<WorkspaceDirectory[]>;
|
|
3
|
+
/** 9 W9 C — regular files at one level, for the @-reference picker. */
|
|
4
|
+
export declare function listFiles(path: string): Promise<WorkspaceFile[]>;
|
|
3
5
|
//# sourceMappingURL=workspace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/daemon/workspace.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/daemon/workspace.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAc/E,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAWjF;AAED,uEAAuE;AACvE,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAWtE"}
|
package/dist/daemon/workspace.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { readdir } from 'node:fs/promises';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
/**
|
|
4
|
-
* Workspace directory listing (Phase 9 W6) — one level of
|
|
5
|
-
* the chat session picker
|
|
6
|
-
* against the machine's
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
4
|
+
* Workspace directory listing (Phase 9 W6; 9 W9 C adds files) — one level of
|
|
5
|
+
* entries for the chat session picker and the composer's @-reference picker.
|
|
6
|
+
* The server has ALREADY validated containment against the machine's
|
|
7
|
+
* baseWorkspace before emitting `workspace:list`; this module keeps the
|
|
8
|
+
* listing itself honest and bounded: directories and regular files only
|
|
9
|
+
* (symlinks are excluded — `Dirent.isDirectory()` / `isFile()` are false for
|
|
10
|
+
* them), hidden `.*` entries skipped, name-sorted, capped at 512 each.
|
|
10
11
|
*/
|
|
11
|
-
const
|
|
12
|
+
const MAX_ENTRIES = 512;
|
|
12
13
|
export async function listDirectories(path) {
|
|
13
14
|
const entries = await readdir(path, { withFileTypes: true });
|
|
14
15
|
const out = [];
|
|
@@ -18,7 +19,23 @@ export async function listDirectories(path) {
|
|
|
18
19
|
if (entry.name.startsWith('.'))
|
|
19
20
|
continue;
|
|
20
21
|
out.push({ name: entry.name, path: join(path, entry.name) });
|
|
21
|
-
if (out.length >=
|
|
22
|
+
if (out.length >= MAX_ENTRIES)
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
out.sort((a, b) => a.name.localeCompare(b.name));
|
|
26
|
+
return out;
|
|
27
|
+
}
|
|
28
|
+
/** 9 W9 C — regular files at one level, for the @-reference picker. */
|
|
29
|
+
export async function listFiles(path) {
|
|
30
|
+
const entries = await readdir(path, { withFileTypes: true });
|
|
31
|
+
const out = [];
|
|
32
|
+
for (const entry of entries) {
|
|
33
|
+
if (!entry.isFile())
|
|
34
|
+
continue; // skips dirs AND symlinks-to-files
|
|
35
|
+
if (entry.name.startsWith('.'))
|
|
36
|
+
continue;
|
|
37
|
+
out.push({ name: entry.name, path: join(path, entry.name) });
|
|
38
|
+
if (out.length >= MAX_ENTRIES)
|
|
22
39
|
break;
|
|
23
40
|
}
|
|
24
41
|
out.sort((a, b) => a.name.localeCompare(b.name));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../src/daemon/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC
|
|
1
|
+
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../src/daemon/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC;;;;;;;;GAQG;AAEH,MAAM,WAAW,GAAG,GAAG,CAAC;AAExB,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,IAAY;IAChD,MAAM,OAAO,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C,CAAC;QAC7D,IAAI,GAAG,CAAC,MAAM,IAAI,WAAW;YAAE,MAAM;IACvC,CAAC;IACD,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IACjD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@harness-nexus/cli",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.4",
|
|
4
4
|
"description": "Harness Nexus one-click install CLI — pulls profiles/resources and writes them into a target Agent tool.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
13
13
|
"js-yaml": "^4.1.0",
|
|
14
14
|
"socket.io-client": "^4.8.3",
|
|
15
|
-
"@harness-nexus/
|
|
16
|
-
"@harness-nexus/shared": "0.1.0-alpha.
|
|
17
|
-
"@harness-nexus/
|
|
18
|
-
"@harness-nexus/sdk": "0.1.0-alpha.
|
|
15
|
+
"@harness-nexus/mcp-runtime": "^0.1.0-alpha.4",
|
|
16
|
+
"@harness-nexus/shared": "0.1.0-alpha.4",
|
|
17
|
+
"@harness-nexus/core": "0.1.0-alpha.4",
|
|
18
|
+
"@harness-nexus/sdk": "0.1.0-alpha.4"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/js-yaml": "^4.0.9",
|