@robota-sdk/agent-cli 3.0.0-beta.1
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/LICENSE +21 -0
- package/README.md +254 -0
- package/dist/node/bin.cjs +1185 -0
- package/dist/node/bin.d.cts +1 -0
- package/dist/node/bin.d.ts +1 -0
- package/dist/node/bin.js +11 -0
- package/dist/node/chunk-C56WFH5S.js +1163 -0
- package/dist/node/index.cjs +1202 -0
- package/dist/node/index.d.cts +49 -0
- package/dist/node/index.d.ts +49 -0
- package/dist/node/index.js +13 -0
- package/package.json +63 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export { IQueryOptions, ISessionOptions, ISessionRecord, Session, SessionStore, TPermissionDecision, TPermissionHandler, TPermissionMode, TRUST_TO_MODE, TToolResult, TTrustLevel, query } from '@robota-sdk/agent-sdk';
|
|
2
|
+
export { TToolArgs } from '@robota-sdk/agent-core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* CLI-specific types for terminal I/O abstraction.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Spinner handle returned by ITerminalOutput.spinner()
|
|
9
|
+
*/
|
|
10
|
+
interface ISpinner {
|
|
11
|
+
stop(): void;
|
|
12
|
+
update(message: string): void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Terminal output abstraction — injected into all components that need I/O
|
|
16
|
+
*/
|
|
17
|
+
interface ITerminalOutput {
|
|
18
|
+
write(text: string): void;
|
|
19
|
+
writeLine(text: string): void;
|
|
20
|
+
writeMarkdown(md: string): void;
|
|
21
|
+
writeError(text: string): void;
|
|
22
|
+
prompt(question: string): Promise<string>;
|
|
23
|
+
/** Arrow-key selector. Returns the index of the chosen option. */
|
|
24
|
+
select(options: string[], initialIndex?: number): Promise<number>;
|
|
25
|
+
spinner(message: string): ISpinner;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* CLI entry point — parses arguments, loads config/context, and starts the
|
|
30
|
+
* Ink TUI or runs in print mode.
|
|
31
|
+
*
|
|
32
|
+
* CLI flags:
|
|
33
|
+
* robota Interactive TUI mode
|
|
34
|
+
* robota "prompt" TUI with initial prompt (future)
|
|
35
|
+
* robota -p "prompt" Print mode (one-shot, exit after response)
|
|
36
|
+
* robota -c Continue last session
|
|
37
|
+
* robota -r <id> Resume session by ID
|
|
38
|
+
* robota --model <model> Model override
|
|
39
|
+
* robota --permission-mode <m> plan|default|acceptEdits|bypassPermissions
|
|
40
|
+
* robota --max-turns <n> Limit agentic turns
|
|
41
|
+
* robota --version Print package version and exit
|
|
42
|
+
*/
|
|
43
|
+
/**
|
|
44
|
+
* Main CLI orchestration function.
|
|
45
|
+
* Called from bin.ts as the top-level entry.
|
|
46
|
+
*/
|
|
47
|
+
declare function startCli(): Promise<void>;
|
|
48
|
+
|
|
49
|
+
export { type ISpinner, type ITerminalOutput, startCli };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export { IQueryOptions, ISessionOptions, ISessionRecord, Session, SessionStore, TPermissionDecision, TPermissionHandler, TPermissionMode, TRUST_TO_MODE, TToolResult, TTrustLevel, query } from '@robota-sdk/agent-sdk';
|
|
2
|
+
export { TToolArgs } from '@robota-sdk/agent-core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* CLI-specific types for terminal I/O abstraction.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Spinner handle returned by ITerminalOutput.spinner()
|
|
9
|
+
*/
|
|
10
|
+
interface ISpinner {
|
|
11
|
+
stop(): void;
|
|
12
|
+
update(message: string): void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Terminal output abstraction — injected into all components that need I/O
|
|
16
|
+
*/
|
|
17
|
+
interface ITerminalOutput {
|
|
18
|
+
write(text: string): void;
|
|
19
|
+
writeLine(text: string): void;
|
|
20
|
+
writeMarkdown(md: string): void;
|
|
21
|
+
writeError(text: string): void;
|
|
22
|
+
prompt(question: string): Promise<string>;
|
|
23
|
+
/** Arrow-key selector. Returns the index of the chosen option. */
|
|
24
|
+
select(options: string[], initialIndex?: number): Promise<number>;
|
|
25
|
+
spinner(message: string): ISpinner;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* CLI entry point — parses arguments, loads config/context, and starts the
|
|
30
|
+
* Ink TUI or runs in print mode.
|
|
31
|
+
*
|
|
32
|
+
* CLI flags:
|
|
33
|
+
* robota Interactive TUI mode
|
|
34
|
+
* robota "prompt" TUI with initial prompt (future)
|
|
35
|
+
* robota -p "prompt" Print mode (one-shot, exit after response)
|
|
36
|
+
* robota -c Continue last session
|
|
37
|
+
* robota -r <id> Resume session by ID
|
|
38
|
+
* robota --model <model> Model override
|
|
39
|
+
* robota --permission-mode <m> plan|default|acceptEdits|bypassPermissions
|
|
40
|
+
* robota --max-turns <n> Limit agentic turns
|
|
41
|
+
* robota --version Print package version and exit
|
|
42
|
+
*/
|
|
43
|
+
/**
|
|
44
|
+
* Main CLI orchestration function.
|
|
45
|
+
* Called from bin.ts as the top-level entry.
|
|
46
|
+
*/
|
|
47
|
+
declare function startCli(): Promise<void>;
|
|
48
|
+
|
|
49
|
+
export { type ISpinner, type ITerminalOutput, startCli };
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@robota-sdk/agent-cli",
|
|
3
|
+
"version": "3.0.0-beta.1",
|
|
4
|
+
"description": "AI coding assistant CLI built on Robota SDK",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"robota": "./dist/node/bin.js"
|
|
8
|
+
},
|
|
9
|
+
"main": "dist/node/index.js",
|
|
10
|
+
"types": "dist/node/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/node/index.d.ts",
|
|
14
|
+
"node": {
|
|
15
|
+
"import": "./dist/node/index.js",
|
|
16
|
+
"require": "./dist/node/index.cjs"
|
|
17
|
+
},
|
|
18
|
+
"default": {
|
|
19
|
+
"import": "./dist/node/index.js",
|
|
20
|
+
"require": "./dist/node/index.cjs"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"chalk": "^5.3.0",
|
|
29
|
+
"cli-highlight": "^2.1.0",
|
|
30
|
+
"ink": "^6.8.0",
|
|
31
|
+
"ink-select-input": "^6.2.0",
|
|
32
|
+
"ink-spinner": "^5.0.0",
|
|
33
|
+
"ink-text-input": "^6.0.0",
|
|
34
|
+
"marked": "^9.1.5",
|
|
35
|
+
"marked-terminal": "^7.3.0",
|
|
36
|
+
"react": "19.2.4",
|
|
37
|
+
"string-width": "^8.2.0",
|
|
38
|
+
"@robota-sdk/agent-core": "3.0.0-beta.1",
|
|
39
|
+
"@robota-sdk/agent-sdk": "3.0.0-beta.1"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@types/marked": "^6.0.0",
|
|
43
|
+
"@types/react": "^19.2.14",
|
|
44
|
+
"rimraf": "^5.0.5",
|
|
45
|
+
"tsup": "^8.0.1",
|
|
46
|
+
"tsx": "^4.7.0",
|
|
47
|
+
"typescript": "^5.3.3",
|
|
48
|
+
"vitest": "^1.6.1"
|
|
49
|
+
},
|
|
50
|
+
"license": "MIT",
|
|
51
|
+
"publishConfig": {
|
|
52
|
+
"access": "public"
|
|
53
|
+
},
|
|
54
|
+
"scripts": {
|
|
55
|
+
"build": "tsup src/index.ts src/bin.ts --format esm,cjs --dts --out-dir dist/node --clean",
|
|
56
|
+
"dev": "tsx --env-file=.env src/bin.ts",
|
|
57
|
+
"start": "node --env-file=.env dist/node/bin.js",
|
|
58
|
+
"test": "vitest run --passWithNoTests",
|
|
59
|
+
"typecheck": "tsc --noEmit",
|
|
60
|
+
"lint": "eslint src/ --ext .ts,.tsx",
|
|
61
|
+
"clean": "rimraf dist"
|
|
62
|
+
}
|
|
63
|
+
}
|