nolo-cli 0.1.32 → 0.1.33
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 +0 -6
- package/agent-runtime/agentRecordConfig.ts +2 -0
- package/agent-runtime/hostAdapter.ts +1 -0
- package/agent-runtime/index.ts +0 -21
- package/agent-runtime/localToolPolicy.ts +6 -13
- package/agent-runtime/localWorkspaceTools.ts +30 -333
- package/agent-runtime/platformChatProvider.ts +1 -4
- package/agent-runtime/runtimeToolPolicy.ts +47 -32
- package/agentAliases.ts +14 -83
- package/agentCommandSupport.ts +3 -6
- package/agentInternalCommandEntries.ts +2 -13
- package/agentListCommands.ts +19 -28
- package/agentMachineCommands.ts +40 -336
- package/agentPullCommand.ts +36 -56
- package/agentRecordCommands.ts +3 -5
- package/agentRecordHelpers.ts +22 -189
- package/agentRunCommand.ts +438 -107
- package/agentRuntimeLocal.ts +0 -10
- package/ai/agent/cliExecutor.ts +19 -323
- package/authCommands.ts +2 -36
- package/cli/agentAliases.ts +14 -83
- package/cli/agentCommandSupport.ts +3 -6
- package/cli/agentInternalCommandEntries.ts +2 -13
- package/cli/agentListCommands.ts +19 -28
- package/cli/agentMachineCommands.ts +40 -336
- package/cli/agentPullCommand.ts +36 -56
- package/cli/agentRecordCommands.ts +3 -5
- package/cli/agentRecordHelpers.ts +22 -189
- package/cli/agentRunCommand.ts +438 -107
- package/cli/agentRuntimeLocal.ts +0 -10
- package/cli/authCommands.ts +2 -36
- package/cli/cliEnvHelpers.ts +21 -162
- package/cli/client/agentRun.ts +853 -57
- package/cli/client/localRuntimeAdapter.ts +22 -159
- package/cli/client/streamingOutput.ts +3 -1
- package/cli/client/taskRunPrompt.ts +24 -7
- package/cli/commandRegistry.ts +2 -3
- 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 +14 -48
- package/cli/machineWsSession.ts +0 -2
- package/cli/offlineMarxistsAgentCommand.ts +314 -0
- package/cli/runtimeDoctorCommands.ts +69 -18
- 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/cliEnvHelpers.ts +21 -162
- package/client/agentConfigResolver.test.ts +2 -0
- package/client/agentRun.test.ts +12 -208
- package/client/agentRun.ts +853 -57
- package/client/localRuntimeAdapter.test.ts +9 -168
- package/client/localRuntimeAdapter.ts +22 -159
- package/client/localToolPolicy.test.ts +4 -28
- package/client/streamingOutput.ts +3 -1
- package/client/taskRunPrompt.ts +24 -7
- package/commandRegistry.ts +2 -3
- package/connectorRunArtifact.ts +10 -34
- package/connectorWebSocketTarget.ts +6 -10
- package/database/server/db.ts +34 -15
- 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 +14 -48
- package/machineWsSession.ts +0 -2
- package/offlineMarxistsAgentCommand.ts +314 -0
- package/package.json +49 -193
- package/runtimeDoctorCommands.ts +69 -18
- 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/server/authorityStoreTypes.ts +0 -31
- package/database/server/legacyServerDb.ts +0 -58
- package/database/server/levelAuthorityStore.ts +0 -75
- package/database/server/memoryAuthorityStore.ts +0 -133
- package/database/server/serverStoreFactory.ts +0 -124
- 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/README.md
CHANGED
|
@@ -100,7 +100,6 @@ nolo space read 01KKY77TT0DA9NY7TNW3R7255N --content-key page-user-id --brief
|
|
|
100
100
|
nolo agent list --json
|
|
101
101
|
nolo agent bind-current agent-user-1-agent-1
|
|
102
102
|
nolo agent runtime-doctor agent-user-1-agent-1
|
|
103
|
-
nolo agent smoke-bound agent-user-1-agent-1 --msg "ping"
|
|
104
103
|
nolo agent smoke-current agent-user-1-agent-1 --msg "ping"
|
|
105
104
|
nolo chat --agent agent-pub-01APPBUILDER00000001YAII3I --msg "你好"
|
|
106
105
|
```
|
|
@@ -153,7 +152,6 @@ Run a one-command connector smoke test:
|
|
|
153
152
|
|
|
154
153
|
```bash
|
|
155
154
|
nolo agent runtime-doctor <agentKey>
|
|
156
|
-
nolo agent smoke-bound <agentKey> --msg "ping"
|
|
157
155
|
nolo agent smoke-current <agentKey> --msg "ping"
|
|
158
156
|
```
|
|
159
157
|
|
|
@@ -161,10 +159,6 @@ nolo agent smoke-current <agentKey> --msg "ping"
|
|
|
161
159
|
machine has the required CLI capability. `smoke-current` heartbeats the current
|
|
162
160
|
machine, binds the agent to it, opens a temporary connector websocket, calls
|
|
163
161
|
`/api/agent/run`, and prints the returned dialog id/content.
|
|
164
|
-
`smoke-bound` does not start a local connector or rebind anything. It validates
|
|
165
|
-
the agent through its existing runtime binding by calling the real
|
|
166
|
-
`/api/agent/run` path, so it is the safer probe for shared-Space member runs
|
|
167
|
-
that should execute through another owner's online connector.
|
|
168
162
|
|
|
169
163
|
## Product Shape
|
|
170
164
|
|
|
@@ -77,6 +77,7 @@ export function resolveAgentRuntimeConfigFromRecord(
|
|
|
77
77
|
objectField(record, "runtimeToolPolicy") ??
|
|
78
78
|
objectField(runtimeBinding ?? {}, "runtimeToolPolicy");
|
|
79
79
|
const localWorkspaceMode = localWorkspaceModeField(record);
|
|
80
|
+
const delegation = objectField(record, "delegation");
|
|
80
81
|
return {
|
|
81
82
|
key,
|
|
82
83
|
...(name ? { name } : {}),
|
|
@@ -96,6 +97,7 @@ export function resolveAgentRuntimeConfigFromRecord(
|
|
|
96
97
|
...(runtimeBinding ? { runtimeBinding } : {}),
|
|
97
98
|
...(runtimeToolPolicy ? { runtimeToolPolicy } : {}),
|
|
98
99
|
...(localWorkspaceMode ? { localWorkspaceMode } : {}),
|
|
100
|
+
...(delegation ? { delegation } : {}),
|
|
99
101
|
rawRecord: record,
|
|
100
102
|
};
|
|
101
103
|
}
|
|
@@ -24,6 +24,7 @@ export type AgentRuntimeAgentConfig = {
|
|
|
24
24
|
runtimeBinding?: Record<string, unknown>;
|
|
25
25
|
runtimeToolPolicy?: AgentRuntimeToolPolicy;
|
|
26
26
|
localWorkspaceMode?: "current" | "task-worktree";
|
|
27
|
+
delegation?: Record<string, unknown>;
|
|
27
28
|
rawRecord?: Record<string, unknown>;
|
|
28
29
|
};
|
|
29
30
|
|
package/agent-runtime/index.ts
CHANGED
|
@@ -27,11 +27,6 @@ export {
|
|
|
27
27
|
} from "./agentRecordKeys";
|
|
28
28
|
export { resolveAgentRuntimeConfigFromRecord } from "./agentRecordConfig";
|
|
29
29
|
export { dialogMessageRecordToAgentRuntimeMessage } from "./dialogMessageRecord";
|
|
30
|
-
export {
|
|
31
|
-
renderDialogStatus,
|
|
32
|
-
resolveDialogActiveHealth,
|
|
33
|
-
resolveDialogTerminalState,
|
|
34
|
-
} from "./dialogStatus";
|
|
35
30
|
export { buildAgentRuntimeDialogWritePlan } from "./dialogWritePlan";
|
|
36
31
|
export {
|
|
37
32
|
createHybridRecordStore,
|
|
@@ -46,12 +41,6 @@ export {
|
|
|
46
41
|
formatPreparedGitTaskWorkspace,
|
|
47
42
|
prepareGitTaskWorkspace,
|
|
48
43
|
} from "./taskWorkspace";
|
|
49
|
-
export {
|
|
50
|
-
createHostRuntimeConfig,
|
|
51
|
-
createHostRuntimeCapabilities,
|
|
52
|
-
resolveHostRuntimeConfigFromEnv,
|
|
53
|
-
resolveHostRuntimeCapabilitiesFromEnv,
|
|
54
|
-
} from "./hostRuntimeConfig";
|
|
55
44
|
export {
|
|
56
45
|
executeLocalToolWithPolicy,
|
|
57
46
|
resolveLocalToolPolicy,
|
|
@@ -59,7 +48,6 @@ export {
|
|
|
59
48
|
export {
|
|
60
49
|
mergeAgentRuntimeToolPolicies,
|
|
61
50
|
normalizeAgentRuntimeToolPolicy,
|
|
62
|
-
resolveRequestedRuntimeToolNames,
|
|
63
51
|
resolveEffectiveRuntimeToolPolicy,
|
|
64
52
|
} from "./runtimeToolPolicy";
|
|
65
53
|
export {
|
|
@@ -93,12 +81,6 @@ export type {
|
|
|
93
81
|
export type {
|
|
94
82
|
PreparedGitTaskWorkspace,
|
|
95
83
|
} from "./taskWorkspace";
|
|
96
|
-
export type {
|
|
97
|
-
HostRuntimeConfig,
|
|
98
|
-
HostRuntimeCapabilities,
|
|
99
|
-
HostRuntimeSurface,
|
|
100
|
-
HostRuntimeWorkspaceBinding,
|
|
101
|
-
} from "./hostRuntimeConfig";
|
|
102
84
|
export type {
|
|
103
85
|
LocalToolPolicyDecision,
|
|
104
86
|
} from "./localToolPolicy";
|
|
@@ -108,9 +90,6 @@ export type {
|
|
|
108
90
|
export type {
|
|
109
91
|
PlatformChatProviderConfig,
|
|
110
92
|
} from "./platformChatProvider";
|
|
111
|
-
export type {
|
|
112
|
-
DialogStatusSnapshot,
|
|
113
|
-
} from "./dialogStatus";
|
|
114
93
|
export type {
|
|
115
94
|
AgentRuntimeChatMessage,
|
|
116
95
|
AgentRuntimeDecision,
|
|
@@ -2,7 +2,6 @@ import type {
|
|
|
2
2
|
AgentRuntimeToolCallInput,
|
|
3
3
|
AgentRuntimeToolResult,
|
|
4
4
|
} from "./types";
|
|
5
|
-
import type { HostRuntimeConfig } from "./hostRuntimeConfig";
|
|
6
5
|
|
|
7
6
|
type EnvLike = Record<string, string | undefined>;
|
|
8
7
|
|
|
@@ -49,6 +48,10 @@ function parseToolAllowlist(value: string | undefined) {
|
|
|
49
48
|
.filter(Boolean);
|
|
50
49
|
}
|
|
51
50
|
|
|
51
|
+
function isLocalShellModeEnabled(env: EnvLike) {
|
|
52
|
+
return ["worktree", "dangerous", "1", "true"].includes(env.NOLO_LOCAL_SHELL_MODE || "");
|
|
53
|
+
}
|
|
54
|
+
|
|
52
55
|
function isRestrictedLocalToolMode(env: EnvLike) {
|
|
53
56
|
return env.NOLO_LOCAL_TOOL_MODE === "restricted";
|
|
54
57
|
}
|
|
@@ -66,26 +69,18 @@ function isToolDeclaredOrExplicitlyFree(args: {
|
|
|
66
69
|
|
|
67
70
|
export function resolveLocalToolPolicy(args: {
|
|
68
71
|
env: EnvLike;
|
|
69
|
-
hostRuntimeConfig?: HostRuntimeConfig;
|
|
70
72
|
agentToolNames?: string[];
|
|
71
73
|
toolName: string;
|
|
72
74
|
}): LocalToolPolicyDecision {
|
|
73
75
|
const restrictedMode = isRestrictedLocalToolMode(args.env);
|
|
74
76
|
if (args.toolName === "execShell") {
|
|
75
|
-
if (
|
|
76
|
-
return {
|
|
77
|
-
allowed: false,
|
|
78
|
-
toolName: args.toolName,
|
|
79
|
-
reason: "execShell is not requested by this agent runtime.",
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
if (args.hostRuntimeConfig?.capabilities.allowShell === true) {
|
|
77
|
+
if (isLocalShellModeEnabled(args.env)) {
|
|
83
78
|
return { allowed: true, toolName: args.toolName };
|
|
84
79
|
}
|
|
85
80
|
return {
|
|
86
81
|
allowed: false,
|
|
87
82
|
toolName: args.toolName,
|
|
88
|
-
reason: "execShell requires
|
|
83
|
+
reason: "execShell requires NOLO_LOCAL_SHELL_MODE=worktree.",
|
|
89
84
|
};
|
|
90
85
|
}
|
|
91
86
|
|
|
@@ -128,14 +123,12 @@ export function resolveLocalToolPolicy(args: {
|
|
|
128
123
|
|
|
129
124
|
export async function executeLocalToolWithPolicy(args: {
|
|
130
125
|
env: EnvLike;
|
|
131
|
-
hostRuntimeConfig?: HostRuntimeConfig;
|
|
132
126
|
agentToolNames?: string[];
|
|
133
127
|
call: AgentRuntimeToolCallInput;
|
|
134
128
|
executors?: Record<string, (call: AgentRuntimeToolCallInput) => Promise<AgentRuntimeToolResult>>;
|
|
135
129
|
}): Promise<AgentRuntimeToolResult> {
|
|
136
130
|
const decision = resolveLocalToolPolicy({
|
|
137
131
|
env: args.env,
|
|
138
|
-
hostRuntimeConfig: args.hostRuntimeConfig,
|
|
139
132
|
agentToolNames: args.agentToolNames,
|
|
140
133
|
toolName: args.call.name,
|
|
141
134
|
});
|