nolo-cli 0.1.5 → 0.1.6
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 +8 -0
- package/package.json +1 -1
- package/tui/session.ts +35 -5
package/README.md
CHANGED
|
@@ -21,6 +21,12 @@ Inside `nolo`, normal text continues the current dialog after the first agent
|
|
|
21
21
|
reply. Use `/new` when you want a clean dialog. Response token details stay
|
|
22
22
|
hidden by default; set `NOLO_SHOW_USAGE=1` when debugging usage.
|
|
23
23
|
|
|
24
|
+
Nolo is intentionally not trying to copy coding-only CLIs one-for-one. Claude
|
|
25
|
+
Code, Codex CLI, and Copilot CLI are strongest when a developer is already
|
|
26
|
+
inside a codebase. Nolo's CLI should sit between ordinary users and developers:
|
|
27
|
+
one assistant by default, with specialist agents, docs, tables, dialogs, and
|
|
28
|
+
synced workspace data one slash command away.
|
|
29
|
+
|
|
24
30
|
## Usage
|
|
25
31
|
|
|
26
32
|
```bash
|
|
@@ -85,6 +91,8 @@ Inside the future TUI, the same actions should be available as slash commands:
|
|
|
85
91
|
```text
|
|
86
92
|
/agent list
|
|
87
93
|
/agent switch ops
|
|
94
|
+
/agents
|
|
95
|
+
/switch 2
|
|
88
96
|
/dialog open latest
|
|
89
97
|
/doc list
|
|
90
98
|
/table query builtin-dialog-probe-runs
|
package/package.json
CHANGED
package/tui/session.ts
CHANGED
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
export const DEFAULT_TUI_AGENT_KEY = "agent-pub-01NOLOAPPBLD000000019KCKT0";
|
|
2
2
|
export const DEFAULT_TUI_SERVER_URL = "http://127.0.0.1:38123";
|
|
3
3
|
|
|
4
|
-
const
|
|
5
|
-
|
|
4
|
+
const KNOWN_AGENTS: Array<{
|
|
5
|
+
name: string;
|
|
6
|
+
key: string;
|
|
7
|
+
description: string;
|
|
8
|
+
}> = [
|
|
9
|
+
{
|
|
6
10
|
name: "nolo",
|
|
7
11
|
key: "agent-pub-01NOLOAPPBLD000000019KCKT0",
|
|
12
|
+
description: "one assistant that routes work across your agents and data",
|
|
8
13
|
},
|
|
9
|
-
|
|
14
|
+
{
|
|
10
15
|
name: "app-builder",
|
|
11
16
|
key: "agent-pub-01APPBUILDER00000001YAII3I",
|
|
17
|
+
description: "builds web apps, tools, charts, and product prototypes",
|
|
12
18
|
},
|
|
13
|
-
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
const KNOWN_AGENT_ALIASES: Record<string, { name: string; key: string }> =
|
|
22
|
+
Object.fromEntries(KNOWN_AGENTS.map((agent) => [agent.name, agent]));
|
|
14
23
|
|
|
15
24
|
function shortenDialogId(dialogId: string) {
|
|
16
25
|
return dialogId.length > 12
|
|
@@ -109,6 +118,7 @@ export function renderTuiHelp() {
|
|
|
109
118
|
" /help Show this help",
|
|
110
119
|
" /new Start a fresh dialog",
|
|
111
120
|
" /agent Show the current agent",
|
|
121
|
+
" /agents List built-in agent shortcuts",
|
|
112
122
|
" /switch <agent> Switch the current agent",
|
|
113
123
|
" /dialog Show the current dialog",
|
|
114
124
|
" /doc List attached docs",
|
|
@@ -123,11 +133,26 @@ export function renderTuiHelp() {
|
|
|
123
133
|
].join("\n");
|
|
124
134
|
}
|
|
125
135
|
|
|
136
|
+
export function renderKnownAgents() {
|
|
137
|
+
return [
|
|
138
|
+
"Agents:",
|
|
139
|
+
...KNOWN_AGENTS.map(
|
|
140
|
+
(agent, index) =>
|
|
141
|
+
` ${index + 1} ${agent.name.padEnd(11)} ${agent.description}`
|
|
142
|
+
),
|
|
143
|
+
"",
|
|
144
|
+
"Tip: stay on nolo for the one-assistant feel; switch only when you want a specialist directly.",
|
|
145
|
+
].join("\n");
|
|
146
|
+
}
|
|
147
|
+
|
|
126
148
|
function resolveSwitchTarget(rawTarget: string) {
|
|
127
149
|
const target = rawTarget.trim();
|
|
150
|
+
if (/^\d+$/.test(target)) {
|
|
151
|
+
const agent = KNOWN_AGENTS[Number(target) - 1];
|
|
152
|
+
return agent ? { name: agent.name, key: agent.key } : null;
|
|
153
|
+
}
|
|
128
154
|
const alias = KNOWN_AGENT_ALIASES[target.toLowerCase()];
|
|
129
155
|
if (alias) return alias;
|
|
130
|
-
if (/^\d+$/.test(target)) return null;
|
|
131
156
|
if (target.startsWith("agent-") || target.startsWith("agent-pub-")) {
|
|
132
157
|
return { name: target, key: target };
|
|
133
158
|
}
|
|
@@ -177,6 +202,11 @@ export function handleTuiInput(input: string, state: TuiState): TuiInputResult {
|
|
|
177
202
|
nextState: state,
|
|
178
203
|
output: `Current agent: ${state.agentName} (${state.agentKey})`,
|
|
179
204
|
};
|
|
205
|
+
case "/agents":
|
|
206
|
+
return {
|
|
207
|
+
nextState: state,
|
|
208
|
+
output: renderKnownAgents(),
|
|
209
|
+
};
|
|
180
210
|
case "/switch": {
|
|
181
211
|
if (!argText) {
|
|
182
212
|
return {
|