nolo-cli 0.1.32 → 0.1.34
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 +4 -10
- package/agent-runtime/agentRecordConfig.ts +10 -0
- package/agent-runtime/hostAdapter.ts +10 -1
- package/agent-runtime/index.ts +9 -20
- package/agent-runtime/localLoop.ts +49 -2
- package/agent-runtime/localToolPolicy.ts +76 -34
- package/agent-runtime/localWorkspaceTools.ts +30 -333
- package/agent-runtime/openAiCompatibleProvider.ts +7 -3
- package/agent-runtime/openAiCompatibleProviderConfig.ts +15 -26
- package/agent-runtime/platformChatProvider.ts +47 -73
- package/agent-runtime/providerResolution.ts +244 -0
- package/agent-runtime/runtimeToolPolicy.ts +77 -29
- package/agent-runtime/shellCommandPolicy.ts +120 -0
- package/agentAliases.ts +14 -83
- package/agentCommandSupport.ts +3 -6
- package/agentInternalCommandEntries.ts +4 -13
- package/agentListCommands.ts +18 -27
- package/agentMachineCommands.ts +40 -336
- package/agentPullCommand.ts +30 -55
- package/agentRecordCommands.ts +84 -1
- package/agentRecordHelpers.ts +102 -186
- package/agentRunCommand.ts +438 -107
- package/agentRuntimeLocal.ts +2 -9
- package/ai/agent/cliExecutor.ts +19 -323
- package/ai/tools/toolNameAliases.ts +70 -0
- package/authCommands.ts +2 -36
- package/cli/agentAliases.ts +14 -83
- package/cli/agentCommandSupport.ts +3 -6
- package/cli/agentInternalCommandEntries.ts +4 -13
- package/cli/agentListCommands.ts +18 -27
- package/cli/agentMachineCommands.ts +40 -336
- package/cli/agentPullCommand.ts +30 -55
- package/cli/agentRecordCommands.ts +84 -1
- package/cli/agentRecordHelpers.ts +102 -186
- package/cli/agentRunCommand.ts +438 -107
- package/cli/agentRuntimeLocal.ts +2 -9
- package/cli/authCommands.ts +2 -36
- package/cli/cliCommandDispatch.ts +2 -2
- package/cli/cliEnvHelpers.ts +34 -107
- package/cli/client/agentRun.ts +854 -57
- package/cli/client/localRuntimeAdapter.ts +59 -159
- package/cli/client/streamingOutput.ts +3 -1
- package/cli/client/taskRunPrompt.ts +24 -7
- package/cli/commandRegistry.ts +4 -5
- package/cli/connectorRunArtifact.ts +10 -34
- package/cli/connectorWebSocketTarget.ts +6 -10
- package/cli/internalCommandEntries.ts +0 -8
- package/cli/localRuntimeDb.ts +2 -39
- package/cli/machineCommands.ts +189 -190
- package/cli/machineDaemonCommands.ts +165 -9
- package/cli/machineHeartbeatCommands.ts +2 -1
- package/cli/machineStatusCommands.ts +13 -5
- package/cli/machineWatchCommands.ts +1 -1
- package/cli/machineWsRunDispatch.ts +30 -44
- package/cli/machineWsSession.ts +0 -2
- package/cli/offlineMarxistsAgentCommand.ts +314 -0
- package/cli/runtimeDoctorCommands.ts +72 -15
- package/cli/scriptCommandEntries.ts +45 -5
- package/cli/tableCommands.ts +133 -33
- package/cli/taskRunCommand.ts +211 -16
- package/cli/tui/session.ts +372 -43
- package/cli/workflowInternalCommandEntries.ts +0 -20
- package/cliCommandDispatch.ts +2 -2
- package/cliEnvHelpers.ts +34 -107
- package/client/agentConfigResolver.test.ts +2 -0
- package/client/agentRun.test.ts +12 -208
- package/client/agentRun.ts +854 -57
- package/client/localProviderResolver.test.ts +26 -2
- package/client/localRuntimeAdapter.test.ts +296 -171
- package/client/localRuntimeAdapter.ts +59 -159
- package/client/localToolPolicy.test.ts +4 -28
- package/client/streamingOutput.ts +3 -1
- package/client/taskRunPrompt.ts +24 -7
- package/commandRegistry.ts +4 -5
- package/connectorRunArtifact.ts +10 -34
- package/connectorWebSocketTarget.ts +6 -10
- package/database/server/serverStoreFactory.ts +2 -8
- package/internalCommandEntries.ts +0 -8
- package/localRuntimeDb.ts +2 -39
- package/machineCommands.ts +189 -190
- package/machineDaemonCommands.ts +165 -9
- package/machineHeartbeatCommands.ts +2 -1
- package/machineStatusCommands.ts +13 -5
- package/machineWatchCommands.ts +1 -1
- package/machineWsRunDispatch.ts +30 -44
- package/machineWsSession.ts +0 -2
- package/offlineMarxistsAgentCommand.ts +314 -0
- package/package.json +52 -188
- package/runtimeDoctorCommands.ts +72 -15
- package/scriptCommandEntries.ts +45 -5
- package/tableCommands.ts +133 -33
- package/taskRunCommand.ts +211 -16
- package/tui/session.ts +372 -43
- package/workflowInternalCommandEntries.ts +0 -20
- package/agent-runtime/dialogStatus.ts +0 -139
- package/agent-runtime/hostRuntimeConfig.ts +0 -86
- package/agentCreateCustomCommands.ts +0 -278
- package/agentDialogsCommands.ts +0 -227
- package/agentDoctorCommands.ts +0 -203
- package/agentRunLocalWorkspace.ts +0 -182
- package/agentRunParsing.ts +0 -298
- package/agentSuperviseCommands.ts +0 -8
- package/agentUnpublishCommands.ts +0 -113
- package/ai/agent/agentRunDialogLineage.ts +0 -56
- package/ai/policy/types.ts +0 -64
- package/ai/skills/skillSummaryMarker.ts +0 -26
- package/app/types.ts +0 -358
- package/build.ts +0 -16
- package/buildPublish.ts +0 -138
- package/buildPublishArtifactAssembly.ts +0 -724
- package/buildPublishImportAnalysis.ts +0 -242
- package/chat/messages/fetchMessages.ts +0 -84
- package/chat/messages/types.ts +0 -185
- package/cli/agentCreateCustomCommands.ts +0 -278
- package/cli/agentDialogsCommands.ts +0 -227
- package/cli/agentDoctorCommands.ts +0 -203
- package/cli/agentRunLocalWorkspace.ts +0 -182
- package/cli/agentRunParsing.ts +0 -298
- package/cli/agentSuperviseCommands.ts +0 -8
- package/cli/agentUnpublishCommands.ts +0 -113
- package/cli/buildPublish.ts +0 -138
- package/cli/buildPublishArtifactAssembly.ts +0 -724
- package/cli/buildPublishImportAnalysis.ts +0 -242
- package/cli/cliIoTypes.ts +0 -3
- package/cli/cliRuntimeDoctorReport.ts +0 -193
- package/cli/client/agentRunInput.ts +0 -10
- package/cli/client/agentRunLocalExecution.ts +0 -124
- package/cli/client/agentRunLocalExecutor.ts +0 -179
- package/cli/client/agentRunRuntimeSelection.ts +0 -145
- package/cli/client/agentRunServerTransport.ts +0 -397
- package/cli/client/agentRunTaskRunRecorder.ts +0 -176
- package/cli/customCodingAgentFlow.ts +0 -208
- package/cli/customCodingAgentRecord.ts +0 -179
- package/cli/dialogDataAccess.ts +0 -186
- package/cli/dialogInternalCommandEntries.ts +0 -11
- package/cli/dialogReadCommands.ts +0 -180
- package/cli/dialogReadHelpers.ts +0 -226
- package/cli/dialogStatusCommands.ts +0 -123
- package/cli/docInternalCommandEntries.ts +0 -20
- package/cli/hybridReadHelpers.ts +0 -109
- package/cli/machineCommandPrompts.ts +0 -79
- package/cli/machineCommandResolution.ts +0 -43
- package/cli/noloReadBridgePrompt.ts +0 -16
- package/cli/pageCreateCommands.ts +0 -219
- package/cli/pageDeleteCommands.ts +0 -167
- package/cli/pageReadCommands.ts +0 -151
- package/cli/pageUpdateCommands.ts +0 -249
- package/cli/pageWriteHelpers.ts +0 -209
- package/cli/publishPackage.ts +0 -36
- package/cli/runtimeInternalCommandEntries.ts +0 -15
- package/cli/runtimePassthroughCommands.ts +0 -22
- package/cli/scriptPassthroughHelpers.ts +0 -28
- package/cli/secretScanHelpers.ts +0 -31
- package/cli/spaceAttachCommands.ts +0 -134
- package/cli/spaceCategoryCommands.ts +0 -263
- package/cli/spaceCommands.ts +0 -295
- package/cli/spaceDeleteCommands.ts +0 -312
- package/cli/spaceInternalCommandEntries.ts +0 -21
- package/cli/spaceMutationHelpers.ts +0 -135
- package/cli/spaceReadCommands.ts +0 -323
- package/cli/tableDataOutput.ts +0 -41
- package/cli/tableDataSafety.ts +0 -26
- package/cli/tableMetaCommands.ts +0 -307
- package/cli/tableMutationCommands.ts +0 -266
- package/cli/tableQueryParsing.ts +0 -90
- package/cli/tableQueryRequest.ts +0 -53
- package/cli/taskRunActions.ts +0 -122
- package/cli/taskRunParsing.ts +0 -86
- package/cli/taskRunPromptShared.ts +0 -55
- package/cli/tui/tuiCatalog.ts +0 -22
- package/cli/tui/tuiCommandInterpreter.ts +0 -253
- package/cli/tui/tuiPresentation.ts +0 -146
- package/cliIoTypes.ts +0 -3
- package/cliRuntimeDoctorReport.ts +0 -193
- package/client/agentRunInput.ts +0 -10
- package/client/agentRunLocalExecution.test.ts +0 -123
- package/client/agentRunLocalExecution.ts +0 -124
- package/client/agentRunLocalExecutor.ts +0 -179
- package/client/agentRunRuntimeSelection.test.ts +0 -159
- package/client/agentRunRuntimeSelection.ts +0 -145
- package/client/agentRunServerTransport.ts +0 -397
- package/client/agentRunTaskRunRecorder.ts +0 -176
- package/connector-experimental/daemonLauncher.ts +0 -223
- package/create/space/spaceKeys.ts +0 -65
- package/create/types.ts +0 -21
- package/customCodingAgentFlow.ts +0 -208
- package/customCodingAgentRecord.ts +0 -179
- package/database/keys.ts +0 -765
- package/database/tombstones.ts +0 -52
- package/database/utils/ulid.ts +0 -1
- package/dialogDataAccess.ts +0 -186
- package/dialogInternalCommandEntries.ts +0 -11
- package/dialogReadCommands.ts +0 -180
- package/dialogReadHelpers.ts +0 -226
- package/dialogStatusCommands.ts +0 -123
- package/docInternalCommandEntries.ts +0 -20
- package/hybridReadHelpers.ts +0 -109
- package/machineCommandPrompts.ts +0 -79
- package/machineCommandResolution.ts +0 -43
- package/noloReadBridgePrompt.ts +0 -16
- package/pageCreateCommands.ts +0 -219
- package/pageDeleteCommands.ts +0 -167
- package/pageReadCommands.ts +0 -151
- package/pageUpdateCommands.ts +0 -249
- package/pageWriteHelpers.ts +0 -209
- package/publishPackage.ts +0 -36
- package/runtimeInternalCommandEntries.ts +0 -15
- package/runtimePassthroughCommands.ts +0 -22
- package/scriptPassthroughHelpers.ts +0 -28
- package/secretScanHelpers.ts +0 -31
- package/share/helpers.ts +0 -302
- package/share/keys.ts +0 -243
- package/share/types.ts +0 -100
- package/spaceAttachCommands.ts +0 -134
- package/spaceCategoryCommands.ts +0 -263
- package/spaceCommands.ts +0 -295
- package/spaceDeleteCommands.ts +0 -312
- package/spaceInternalCommandEntries.ts +0 -21
- package/spaceMutationHelpers.ts +0 -135
- package/spaceReadCommands.ts +0 -323
- package/tableDataOutput.ts +0 -41
- package/tableDataSafety.ts +0 -26
- package/tableMetaCommands.ts +0 -307
- package/tableMutationCommands.ts +0 -266
- package/tableQueryParsing.ts +0 -90
- package/tableQueryRequest.ts +0 -53
- package/taskRunActions.ts +0 -122
- package/taskRunParsing.ts +0 -86
- package/taskRunPromptShared.ts +0 -55
- package/tui/tuiCatalog.ts +0 -22
- package/tui/tuiCommandInterpreter.test.ts +0 -169
- package/tui/tuiCommandInterpreter.ts +0 -253
- package/tui/tuiPresentation.test.ts +0 -154
- package/tui/tuiPresentation.ts +0 -146
package/tui/tuiPresentation.ts
DELETED
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import { DEFAULT_NOLO_SERVER_URL } from "../defaultServer";
|
|
2
|
-
import type { AgentRuntimeRequestedMode } from "../agentRuntimeLocal";
|
|
3
|
-
import type { EnvLike } from "../cliEnvHelpers";
|
|
4
|
-
import { DEFAULT_TUI_AGENT_KEY, KNOWN_AGENTS } from "./tuiCatalog";
|
|
5
|
-
|
|
6
|
-
export const DEFAULT_TUI_SERVER_URL = DEFAULT_NOLO_SERVER_URL;
|
|
7
|
-
|
|
8
|
-
export type TuiState = {
|
|
9
|
-
agentKey: string;
|
|
10
|
-
agentName: string;
|
|
11
|
-
dialogId?: string;
|
|
12
|
-
dialogLabel: string;
|
|
13
|
-
profileName: string;
|
|
14
|
-
serverUrl: string;
|
|
15
|
-
cliVersion?: string;
|
|
16
|
-
attachedDocs: string[];
|
|
17
|
-
runtimeMode: AgentRuntimeRequestedMode;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export function shortenDialogId(dialogId: string) {
|
|
21
|
-
return dialogId.length > 12
|
|
22
|
-
? `${dialogId.slice(0, 6)}...${dialogId.slice(-4)}`
|
|
23
|
-
: dialogId;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export function resolveDialogLabel(
|
|
27
|
-
state: Pick<TuiState, "dialogId" | "dialogLabel">
|
|
28
|
-
) {
|
|
29
|
-
return state.dialogId ? shortenDialogId(state.dialogId) : state.dialogLabel;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export function createInitialTuiState(env: EnvLike): TuiState {
|
|
33
|
-
const agentKey = env.NOLO_AGENT?.trim() || DEFAULT_TUI_AGENT_KEY;
|
|
34
|
-
const agentName = env.NOLO_AGENT_NAME?.trim() || "nolo";
|
|
35
|
-
|
|
36
|
-
return {
|
|
37
|
-
agentKey,
|
|
38
|
-
agentName,
|
|
39
|
-
dialogId: env.NOLO_DIALOG_ID?.trim() || undefined,
|
|
40
|
-
dialogLabel: env.NOLO_DIALOG?.trim() || "new",
|
|
41
|
-
profileName: env.NOLO_PROFILE?.trim() || "local",
|
|
42
|
-
serverUrl: (env.NOLO_SERVER || env.BASE_URL || DEFAULT_TUI_SERVER_URL).replace(
|
|
43
|
-
/\/+$/,
|
|
44
|
-
""
|
|
45
|
-
),
|
|
46
|
-
cliVersion: env.NOLO_CLI_VERSION?.trim() || undefined,
|
|
47
|
-
attachedDocs: [],
|
|
48
|
-
runtimeMode:
|
|
49
|
-
env.NOLO_RUNTIME_MODE === "local" || env.NOLO_RUNTIME_MODE === "server"
|
|
50
|
-
? env.NOLO_RUNTIME_MODE
|
|
51
|
-
: "auto",
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export function renderStatusLine(state: TuiState) {
|
|
56
|
-
const docs =
|
|
57
|
-
state.attachedDocs.length > 0
|
|
58
|
-
? String(state.attachedDocs.length)
|
|
59
|
-
: "0";
|
|
60
|
-
|
|
61
|
-
return [
|
|
62
|
-
`agent ${state.agentName}`,
|
|
63
|
-
`dialog ${resolveDialogLabel(state)}`,
|
|
64
|
-
`docs ${docs}`,
|
|
65
|
-
`runtime ${state.runtimeMode}`,
|
|
66
|
-
`profile ${state.profileName}`,
|
|
67
|
-
].join(" | ");
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export function renderWelcome(state: TuiState) {
|
|
71
|
-
const docs =
|
|
72
|
-
state.attachedDocs.length > 0
|
|
73
|
-
? `${state.attachedDocs.length} attached`
|
|
74
|
-
: "none";
|
|
75
|
-
return [
|
|
76
|
-
"",
|
|
77
|
-
`Nolo workspace${state.cliVersion ? ` nolo ${state.cliVersion}` : ""}`,
|
|
78
|
-
`agent ${state.agentName} | dialog ${resolveDialogLabel(state)} | docs ${docs} | profile ${state.profileName}`,
|
|
79
|
-
`server ${state.serverUrl}`,
|
|
80
|
-
"",
|
|
81
|
-
"Tell nolo what you want. Use /help for commands. Use /version if this install feels stale.",
|
|
82
|
-
"",
|
|
83
|
-
].join("\n");
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export function renderPrompt(_state: TuiState) {
|
|
87
|
-
return "you > ";
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export function renderTuiHelp() {
|
|
91
|
-
return [
|
|
92
|
-
"Commands:",
|
|
93
|
-
" /help Show this help",
|
|
94
|
-
" /new Start a fresh dialog",
|
|
95
|
-
" /compact Compact current dialog and fork a new one",
|
|
96
|
-
" /context Show workspace context and next actions",
|
|
97
|
-
" /runtime <mode> Use auto, local, or server runtime",
|
|
98
|
-
" /agent Show the current agent",
|
|
99
|
-
" /agents List built-in agent shortcuts",
|
|
100
|
-
" /switch <agent> Switch the current agent",
|
|
101
|
-
" /dialog Show the current dialog",
|
|
102
|
-
" /doc List attached docs",
|
|
103
|
-
" /doc attach <doc> Attach a doc to this workspace",
|
|
104
|
-
" /customize Describe how you want to tune nolo",
|
|
105
|
-
" /login Show login/profile hint",
|
|
106
|
-
" /profile Show active profile",
|
|
107
|
-
" /update Update the global nolo install",
|
|
108
|
-
" /version Show version/update hint",
|
|
109
|
-
" /exit Leave the workspace",
|
|
110
|
-
"",
|
|
111
|
-
"You can also type normally. nolo will send it to the current agent.",
|
|
112
|
-
].join("\n");
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export function renderContextPanel(state: TuiState) {
|
|
116
|
-
const docs = state.attachedDocs.length
|
|
117
|
-
? state.attachedDocs.join(", ")
|
|
118
|
-
: "none";
|
|
119
|
-
return [
|
|
120
|
-
"Workspace context",
|
|
121
|
-
"-----------------",
|
|
122
|
-
`agent ${state.agentName}`,
|
|
123
|
-
`dialog ${resolveDialogLabel(state)}`,
|
|
124
|
-
`docs ${docs}`,
|
|
125
|
-
`profile ${state.profileName}`,
|
|
126
|
-
`runtime ${state.runtimeMode}`,
|
|
127
|
-
`server ${state.serverUrl}`,
|
|
128
|
-
"",
|
|
129
|
-
"Next:",
|
|
130
|
-
" /agents see specialist shortcuts",
|
|
131
|
-
" /doc attach <doc> add working context",
|
|
132
|
-
" /new start a clean dialog",
|
|
133
|
-
].join("\n");
|
|
134
|
-
}
|
|
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
|
-
}
|