nextclaw 0.6.3 → 0.6.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/cli/index.js +20 -6
- package/package.json +2 -2
- package/templates/USAGE.md +1 -0
package/dist/cli/index.js
CHANGED
|
@@ -1991,6 +1991,7 @@ var ConfigReloader = class {
|
|
|
1991
1991
|
return;
|
|
1992
1992
|
}
|
|
1993
1993
|
this.currentConfig = nextConfig;
|
|
1994
|
+
this.options.providerManager?.setConfig(nextConfig);
|
|
1994
1995
|
const plan = buildReloadPlan2(changedPaths);
|
|
1995
1996
|
if (plan.restartChannels) {
|
|
1996
1997
|
await this.reloadChannels(nextConfig);
|
|
@@ -2078,6 +2079,7 @@ var ConfigReloader = class {
|
|
|
2078
2079
|
console.warn("Provider reload skipped: missing API key.");
|
|
2079
2080
|
return;
|
|
2080
2081
|
}
|
|
2082
|
+
this.options.providerManager?.setConfig(nextConfig);
|
|
2081
2083
|
this.options.providerManager?.set(nextProvider);
|
|
2082
2084
|
})();
|
|
2083
2085
|
try {
|
|
@@ -2119,7 +2121,10 @@ var ServiceCommands = class {
|
|
|
2119
2121
|
logPluginDiagnostics(pluginRegistry);
|
|
2120
2122
|
const bus = new MessageBus();
|
|
2121
2123
|
const provider = options.allowMissingProvider === true ? this.makeProvider(config2, { allowMissing: true }) : this.makeProvider(config2);
|
|
2122
|
-
const providerManager = new ProviderManager(
|
|
2124
|
+
const providerManager = new ProviderManager({
|
|
2125
|
+
defaultProvider: provider ?? this.makeMissingProvider(config2),
|
|
2126
|
+
config: config2
|
|
2127
|
+
});
|
|
2123
2128
|
const sessionManager = new SessionManager(workspace);
|
|
2124
2129
|
const cronStorePath = join4(getDataDir4(), "cron", "jobs.json");
|
|
2125
2130
|
const cron2 = new CronService2(cronStorePath);
|
|
@@ -2207,13 +2212,17 @@ var ServiceCommands = class {
|
|
|
2207
2212
|
const sessionKey = typeof ctx.SessionKey === "string" && ctx.SessionKey.trim().length > 0 ? ctx.SessionKey : `plugin:${typeof ctx.OriginatingChannel === "string" ? ctx.OriginatingChannel : "channel"}:${typeof ctx.SenderId === "string" ? ctx.SenderId : "unknown"}`;
|
|
2208
2213
|
const channel = typeof ctx.OriginatingChannel === "string" && ctx.OriginatingChannel.trim().length > 0 ? ctx.OriginatingChannel : "cli";
|
|
2209
2214
|
const chatId = typeof ctx.OriginatingTo === "string" && ctx.OriginatingTo.trim().length > 0 ? ctx.OriginatingTo : typeof ctx.SenderId === "string" && ctx.SenderId.trim().length > 0 ? ctx.SenderId : "direct";
|
|
2215
|
+
const modelOverride = typeof ctx.Model === "string" && ctx.Model?.trim().length ? ctx.Model.trim() : typeof ctx.AgentModel === "string" && ctx.AgentModel?.trim().length ? ctx.AgentModel.trim() : void 0;
|
|
2210
2216
|
try {
|
|
2211
2217
|
const response = await agent.processDirect({
|
|
2212
2218
|
content,
|
|
2213
2219
|
sessionKey,
|
|
2214
2220
|
channel,
|
|
2215
2221
|
chatId,
|
|
2216
|
-
metadata:
|
|
2222
|
+
metadata: {
|
|
2223
|
+
...typeof ctx.AccountId === "string" && ctx.AccountId.trim().length > 0 ? { account_id: ctx.AccountId } : {},
|
|
2224
|
+
...modelOverride ? { model: modelOverride } : {}
|
|
2225
|
+
}
|
|
2217
2226
|
});
|
|
2218
2227
|
const replyText = typeof response === "string" ? response : String(response ?? "");
|
|
2219
2228
|
if (replyText.trim()) {
|
|
@@ -3030,7 +3039,10 @@ ${this.logo} ${APP_NAME4} is ready! (${source})`);
|
|
|
3030
3039
|
logPluginDiagnostics(pluginRegistry);
|
|
3031
3040
|
const bus = new MessageBus2();
|
|
3032
3041
|
const provider = this.serviceCommands.createProvider(config2) ?? this.serviceCommands.createMissingProvider(config2);
|
|
3033
|
-
const providerManager = new ProviderManager2(
|
|
3042
|
+
const providerManager = new ProviderManager2({
|
|
3043
|
+
defaultProvider: provider,
|
|
3044
|
+
config: config2
|
|
3045
|
+
});
|
|
3034
3046
|
const agentLoop = new AgentLoop2({
|
|
3035
3047
|
bus,
|
|
3036
3048
|
providerManager,
|
|
@@ -3057,7 +3069,8 @@ ${this.logo} ${APP_NAME4} is ready! (${source})`);
|
|
|
3057
3069
|
content: opts.message,
|
|
3058
3070
|
sessionKey: opts.session ?? "cli:default",
|
|
3059
3071
|
channel: "cli",
|
|
3060
|
-
chatId: "direct"
|
|
3072
|
+
chatId: "direct",
|
|
3073
|
+
metadata: typeof opts.model === "string" && opts.model.trim() ? { model: opts.model.trim() } : {}
|
|
3061
3074
|
});
|
|
3062
3075
|
printAgentResponse(response);
|
|
3063
3076
|
return;
|
|
@@ -3088,7 +3101,8 @@ ${this.logo} ${APP_NAME4} is ready! (${source})`);
|
|
|
3088
3101
|
}
|
|
3089
3102
|
const response = await agentLoop.processDirect({
|
|
3090
3103
|
content: trimmed,
|
|
3091
|
-
sessionKey: opts.session ?? "cli:default"
|
|
3104
|
+
sessionKey: opts.session ?? "cli:default",
|
|
3105
|
+
metadata: typeof opts.model === "string" && opts.model.trim() ? { model: opts.model.trim() } : {}
|
|
3092
3106
|
});
|
|
3093
3107
|
printAgentResponse(response);
|
|
3094
3108
|
}
|
|
@@ -3223,7 +3237,7 @@ program.command("start").description(`Start the ${APP_NAME5} gateway + UI in the
|
|
|
3223
3237
|
program.command("restart").description(`Restart the ${APP_NAME5} background service`).option("--ui-port <port>", "UI port").option("--open", "Open browser after restart", false).action(async (opts) => runtime.restart(opts));
|
|
3224
3238
|
program.command("serve").description(`Run the ${APP_NAME5} gateway + UI in the foreground`).option("--ui-port <port>", "UI port").option("--open", "Open browser after start", false).action(async (opts) => runtime.serve(opts));
|
|
3225
3239
|
program.command("stop").description(`Stop the ${APP_NAME5} background service`).action(async () => runtime.stop());
|
|
3226
|
-
program.command("agent").description("Interact with the agent directly").option("-m, --message <message>", "Message to send to the agent").option("-s, --session <session>", "Session ID", "cli:default").option("--no-markdown", "Disable Markdown rendering").action(async (opts) => runtime.agent(opts));
|
|
3240
|
+
program.command("agent").description("Interact with the agent directly").option("-m, --message <message>", "Message to send to the agent").option("-s, --session <session>", "Session ID", "cli:default").option("--model <model>", "Session model override for this run").option("--no-markdown", "Disable Markdown rendering").action(async (opts) => runtime.agent(opts));
|
|
3227
3241
|
program.command("update").description(`Update ${APP_NAME5}`).option("--timeout <ms>", "Update command timeout in milliseconds").action(async (opts) => runtime.update(opts));
|
|
3228
3242
|
var registerClawHubInstall = (cmd) => {
|
|
3229
3243
|
cmd.command("install <slug>").description("Install a skill from ClawHub").option("--version <version>", "Skill version (default: latest)").option("--registry <url>", "ClawHub registry base URL").option("--workdir <dir>", "Workspace directory to install into").option("--dir <dir>", "Skills directory name (default: skills)").option("-f, --force", "Overwrite existing skill files", false).action(async (slug, opts) => runtime.skillsInstall({ slug, ...opts }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nextclaw",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.4",
|
|
4
4
|
"description": "Lightweight personal AI assistant with CLI, multi-provider routing, and channel integrations.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"chokidar": "^3.6.0",
|
|
40
40
|
"commander": "^12.1.0",
|
|
41
|
-
"@nextclaw/core": "^0.6.
|
|
41
|
+
"@nextclaw/core": "^0.6.4",
|
|
42
42
|
"@nextclaw/server": "^0.4.1",
|
|
43
43
|
"@nextclaw/openclaw-compat": "^0.1.5"
|
|
44
44
|
},
|
package/templates/USAGE.md
CHANGED
|
@@ -193,6 +193,7 @@ Created under the workspace:
|
|
|
193
193
|
| `nextclaw serve` | Run gateway + UI in the foreground (no background) |
|
|
194
194
|
| `nextclaw agent -m "message"` | Send a one-off message to the agent |
|
|
195
195
|
| `nextclaw agent` | Interactive chat in the terminal |
|
|
196
|
+
| `nextclaw agent --session <id> --model <model>` | Use a session-specific model/provider route (sticky for that session) |
|
|
196
197
|
| `nextclaw status` | Show runtime process/health/config status (`--json`, `--verbose`, `--fix`) |
|
|
197
198
|
| `nextclaw init` | Initialize workspace and template files |
|
|
198
199
|
| `nextclaw init --force` | Re-run init and overwrite templates |
|