@h-rig/runtime 0.0.6-alpha.33 → 0.0.6-alpha.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/dist/bin/rig-agent.js +1 -1
- package/dist/src/control-plane/harness-main.js +1 -1
- package/dist/src/control-plane/native/git-ops.js +1 -1
- package/dist/src/control-plane/native/harness-cli.js +1 -1
- package/dist/src/control-plane/pi-sessiond/bin.js +62 -0
- package/dist/src/control-plane/pi-sessiond/server.js +62 -0
- package/dist/src/control-plane/pi-sessiond/session-service.js +62 -0
- package/package.json +8 -8
package/dist/bin/rig-agent.js
CHANGED
|
@@ -7024,7 +7024,7 @@ function shouldScopeGitCommit(args, hasTaskContext) {
|
|
|
7024
7024
|
if (!hasTaskContext) {
|
|
7025
7025
|
return false;
|
|
7026
7026
|
}
|
|
7027
|
-
return
|
|
7027
|
+
return args.includes("--scoped");
|
|
7028
7028
|
}
|
|
7029
7029
|
function gitStatus(projectRoot, taskId) {
|
|
7030
7030
|
const monorepoRoot = resolveOptionalMonorepoRoot(projectRoot);
|
|
@@ -7294,7 +7294,7 @@ function shouldScopeGitCommit(args, hasTaskContext) {
|
|
|
7294
7294
|
if (!hasTaskContext) {
|
|
7295
7295
|
return false;
|
|
7296
7296
|
}
|
|
7297
|
-
return
|
|
7297
|
+
return args.includes("--scoped");
|
|
7298
7298
|
}
|
|
7299
7299
|
function gitStatus(projectRoot, taskId) {
|
|
7300
7300
|
const monorepoRoot = resolveOptionalMonorepoRoot(projectRoot);
|
|
@@ -1587,7 +1587,7 @@ function shouldScopeGitCommit(args, hasTaskContext) {
|
|
|
1587
1587
|
if (!hasTaskContext) {
|
|
1588
1588
|
return false;
|
|
1589
1589
|
}
|
|
1590
|
-
return
|
|
1590
|
+
return args.includes("--scoped");
|
|
1591
1591
|
}
|
|
1592
1592
|
function gitStatus(projectRoot, taskId) {
|
|
1593
1593
|
const monorepoRoot = resolveOptionalMonorepoRoot(projectRoot);
|
|
@@ -7288,7 +7288,7 @@ function shouldScopeGitCommit(args, hasTaskContext) {
|
|
|
7288
7288
|
if (!hasTaskContext) {
|
|
7289
7289
|
return false;
|
|
7290
7290
|
}
|
|
7291
|
-
return
|
|
7291
|
+
return args.includes("--scoped");
|
|
7292
7292
|
}
|
|
7293
7293
|
function gitStatus(projectRoot, taskId) {
|
|
7294
7294
|
const monorepoRoot = resolveOptionalMonorepoRoot(projectRoot);
|
|
@@ -273,11 +273,15 @@ function normalizeResponse(value) {
|
|
|
273
273
|
// packages/runtime/src/control-plane/pi-sessiond/session-service.ts
|
|
274
274
|
var BUILTIN_COMMANDS = [
|
|
275
275
|
{ name: "session", description: "Show session info and stats", source: "builtin" },
|
|
276
|
+
{ name: "settings", description: "Show worker session settings (model, thinking, name, cwd)", source: "builtin" },
|
|
277
|
+
{ name: "model", description: "Show or set the worker model: /model [provider/id]", source: "builtin" },
|
|
278
|
+
{ name: "thinking", description: "Set the worker thinking level: /thinking <off|minimal|low|medium|high|xhigh>", source: "builtin" },
|
|
276
279
|
{ name: "name", description: "Set session display name", source: "builtin" },
|
|
277
280
|
{ name: "compact", description: "Manually compact session context", source: "builtin" },
|
|
278
281
|
{ name: "reload", description: "Reload keybindings, extensions, skills, prompts, and themes", source: "builtin" },
|
|
279
282
|
{ name: "quit", description: "Detach from the current local Pi frontend", source: "builtin" }
|
|
280
283
|
];
|
|
284
|
+
var THINKING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh"];
|
|
281
285
|
|
|
282
286
|
class RigPiSessionService {
|
|
283
287
|
hub;
|
|
@@ -440,6 +444,64 @@ class RigPiSessionService {
|
|
|
440
444
|
const rest = args.join(" ").trim();
|
|
441
445
|
if (rawName === "session")
|
|
442
446
|
return { type: "done", message: formatSessionStats(active.runtime.session) };
|
|
447
|
+
if (rawName === "settings") {
|
|
448
|
+
const session = active.runtime.session;
|
|
449
|
+
const model = session.model;
|
|
450
|
+
return {
|
|
451
|
+
type: "done",
|
|
452
|
+
message: [
|
|
453
|
+
"Worker session settings:",
|
|
454
|
+
` model ${model ? `${model.provider}/${model.id}` : "(none)"} \u2014 change with /model <provider/id>`,
|
|
455
|
+
` thinking ${session.thinkingLevel} \u2014 change with /thinking <${THINKING_LEVELS.join("|")}>`,
|
|
456
|
+
` name ${session.sessionName || "(unnamed)"} \u2014 change with /name <name>`,
|
|
457
|
+
` cwd ${active.runtime.cwd}`,
|
|
458
|
+
` messages ${session.messages.length}`
|
|
459
|
+
].join(`
|
|
460
|
+
`)
|
|
461
|
+
};
|
|
462
|
+
}
|
|
463
|
+
if (rawName === "model") {
|
|
464
|
+
const session = active.runtime.session;
|
|
465
|
+
if (!rest) {
|
|
466
|
+
const available = session.modelRegistry.getAvailable().map((m) => `${m.provider}/${m.id}`);
|
|
467
|
+
const current = session.model ? `${session.model.provider}/${session.model.id}` : "(none)";
|
|
468
|
+
return {
|
|
469
|
+
type: "done",
|
|
470
|
+
message: [
|
|
471
|
+
`Current model: ${current}`,
|
|
472
|
+
available.length > 0 ? `Available: ${available.join(", ")}` : "No models with configured auth.",
|
|
473
|
+
"Switch with /model <provider/id>."
|
|
474
|
+
].join(`
|
|
475
|
+
`)
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
const [provider, ...idParts] = rest.split("/");
|
|
479
|
+
const id = idParts.join("/");
|
|
480
|
+
const target = provider && id ? session.modelRegistry.find(provider, id) : session.modelRegistry.getAvailable().find((m) => m.id === rest);
|
|
481
|
+
if (!target) {
|
|
482
|
+
return { type: "unsupported", message: `Unknown model "${rest}". Use /model to list available models.` };
|
|
483
|
+
}
|
|
484
|
+
try {
|
|
485
|
+
await session.setModel(target);
|
|
486
|
+
} catch (error) {
|
|
487
|
+
return { type: "unsupported", message: error instanceof Error ? error.message : String(error) };
|
|
488
|
+
}
|
|
489
|
+
this.publishStatus(active);
|
|
490
|
+
return { type: "done", message: `Model set to ${target.provider}/${target.id}.` };
|
|
491
|
+
}
|
|
492
|
+
if (rawName === "thinking") {
|
|
493
|
+
const session = active.runtime.session;
|
|
494
|
+
const level = rest.toLowerCase();
|
|
495
|
+
if (!THINKING_LEVELS.includes(level)) {
|
|
496
|
+
return {
|
|
497
|
+
type: "unsupported",
|
|
498
|
+
message: `Current thinking level: ${session.thinkingLevel}. Usage: /thinking <${THINKING_LEVELS.join("|")}>`
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
session.setThinkingLevel(level);
|
|
502
|
+
this.publishStatus(active);
|
|
503
|
+
return { type: "done", message: `Thinking level set to ${session.thinkingLevel}.` };
|
|
504
|
+
}
|
|
443
505
|
if (rawName === "name") {
|
|
444
506
|
if (!rest)
|
|
445
507
|
return { type: "unsupported", message: "Usage: /name <session name>" };
|
|
@@ -271,11 +271,15 @@ function normalizeResponse(value) {
|
|
|
271
271
|
// packages/runtime/src/control-plane/pi-sessiond/session-service.ts
|
|
272
272
|
var BUILTIN_COMMANDS = [
|
|
273
273
|
{ name: "session", description: "Show session info and stats", source: "builtin" },
|
|
274
|
+
{ name: "settings", description: "Show worker session settings (model, thinking, name, cwd)", source: "builtin" },
|
|
275
|
+
{ name: "model", description: "Show or set the worker model: /model [provider/id]", source: "builtin" },
|
|
276
|
+
{ name: "thinking", description: "Set the worker thinking level: /thinking <off|minimal|low|medium|high|xhigh>", source: "builtin" },
|
|
274
277
|
{ name: "name", description: "Set session display name", source: "builtin" },
|
|
275
278
|
{ name: "compact", description: "Manually compact session context", source: "builtin" },
|
|
276
279
|
{ name: "reload", description: "Reload keybindings, extensions, skills, prompts, and themes", source: "builtin" },
|
|
277
280
|
{ name: "quit", description: "Detach from the current local Pi frontend", source: "builtin" }
|
|
278
281
|
];
|
|
282
|
+
var THINKING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh"];
|
|
279
283
|
|
|
280
284
|
class RigPiSessionService {
|
|
281
285
|
hub;
|
|
@@ -438,6 +442,64 @@ class RigPiSessionService {
|
|
|
438
442
|
const rest = args.join(" ").trim();
|
|
439
443
|
if (rawName === "session")
|
|
440
444
|
return { type: "done", message: formatSessionStats(active.runtime.session) };
|
|
445
|
+
if (rawName === "settings") {
|
|
446
|
+
const session = active.runtime.session;
|
|
447
|
+
const model = session.model;
|
|
448
|
+
return {
|
|
449
|
+
type: "done",
|
|
450
|
+
message: [
|
|
451
|
+
"Worker session settings:",
|
|
452
|
+
` model ${model ? `${model.provider}/${model.id}` : "(none)"} \u2014 change with /model <provider/id>`,
|
|
453
|
+
` thinking ${session.thinkingLevel} \u2014 change with /thinking <${THINKING_LEVELS.join("|")}>`,
|
|
454
|
+
` name ${session.sessionName || "(unnamed)"} \u2014 change with /name <name>`,
|
|
455
|
+
` cwd ${active.runtime.cwd}`,
|
|
456
|
+
` messages ${session.messages.length}`
|
|
457
|
+
].join(`
|
|
458
|
+
`)
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
if (rawName === "model") {
|
|
462
|
+
const session = active.runtime.session;
|
|
463
|
+
if (!rest) {
|
|
464
|
+
const available = session.modelRegistry.getAvailable().map((m) => `${m.provider}/${m.id}`);
|
|
465
|
+
const current = session.model ? `${session.model.provider}/${session.model.id}` : "(none)";
|
|
466
|
+
return {
|
|
467
|
+
type: "done",
|
|
468
|
+
message: [
|
|
469
|
+
`Current model: ${current}`,
|
|
470
|
+
available.length > 0 ? `Available: ${available.join(", ")}` : "No models with configured auth.",
|
|
471
|
+
"Switch with /model <provider/id>."
|
|
472
|
+
].join(`
|
|
473
|
+
`)
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
const [provider, ...idParts] = rest.split("/");
|
|
477
|
+
const id = idParts.join("/");
|
|
478
|
+
const target = provider && id ? session.modelRegistry.find(provider, id) : session.modelRegistry.getAvailable().find((m) => m.id === rest);
|
|
479
|
+
if (!target) {
|
|
480
|
+
return { type: "unsupported", message: `Unknown model "${rest}". Use /model to list available models.` };
|
|
481
|
+
}
|
|
482
|
+
try {
|
|
483
|
+
await session.setModel(target);
|
|
484
|
+
} catch (error) {
|
|
485
|
+
return { type: "unsupported", message: error instanceof Error ? error.message : String(error) };
|
|
486
|
+
}
|
|
487
|
+
this.publishStatus(active);
|
|
488
|
+
return { type: "done", message: `Model set to ${target.provider}/${target.id}.` };
|
|
489
|
+
}
|
|
490
|
+
if (rawName === "thinking") {
|
|
491
|
+
const session = active.runtime.session;
|
|
492
|
+
const level = rest.toLowerCase();
|
|
493
|
+
if (!THINKING_LEVELS.includes(level)) {
|
|
494
|
+
return {
|
|
495
|
+
type: "unsupported",
|
|
496
|
+
message: `Current thinking level: ${session.thinkingLevel}. Usage: /thinking <${THINKING_LEVELS.join("|")}>`
|
|
497
|
+
};
|
|
498
|
+
}
|
|
499
|
+
session.setThinkingLevel(level);
|
|
500
|
+
this.publishStatus(active);
|
|
501
|
+
return { type: "done", message: `Thinking level set to ${session.thinkingLevel}.` };
|
|
502
|
+
}
|
|
441
503
|
if (rawName === "name") {
|
|
442
504
|
if (!rest)
|
|
443
505
|
return { type: "unsupported", message: "Usage: /name <session name>" };
|
|
@@ -210,11 +210,15 @@ function normalizeResponse(value) {
|
|
|
210
210
|
// packages/runtime/src/control-plane/pi-sessiond/session-service.ts
|
|
211
211
|
var BUILTIN_COMMANDS = [
|
|
212
212
|
{ name: "session", description: "Show session info and stats", source: "builtin" },
|
|
213
|
+
{ name: "settings", description: "Show worker session settings (model, thinking, name, cwd)", source: "builtin" },
|
|
214
|
+
{ name: "model", description: "Show or set the worker model: /model [provider/id]", source: "builtin" },
|
|
215
|
+
{ name: "thinking", description: "Set the worker thinking level: /thinking <off|minimal|low|medium|high|xhigh>", source: "builtin" },
|
|
213
216
|
{ name: "name", description: "Set session display name", source: "builtin" },
|
|
214
217
|
{ name: "compact", description: "Manually compact session context", source: "builtin" },
|
|
215
218
|
{ name: "reload", description: "Reload keybindings, extensions, skills, prompts, and themes", source: "builtin" },
|
|
216
219
|
{ name: "quit", description: "Detach from the current local Pi frontend", source: "builtin" }
|
|
217
220
|
];
|
|
221
|
+
var THINKING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh"];
|
|
218
222
|
|
|
219
223
|
class RigPiSessionService {
|
|
220
224
|
hub;
|
|
@@ -377,6 +381,64 @@ class RigPiSessionService {
|
|
|
377
381
|
const rest = args.join(" ").trim();
|
|
378
382
|
if (rawName === "session")
|
|
379
383
|
return { type: "done", message: formatSessionStats(active.runtime.session) };
|
|
384
|
+
if (rawName === "settings") {
|
|
385
|
+
const session = active.runtime.session;
|
|
386
|
+
const model = session.model;
|
|
387
|
+
return {
|
|
388
|
+
type: "done",
|
|
389
|
+
message: [
|
|
390
|
+
"Worker session settings:",
|
|
391
|
+
` model ${model ? `${model.provider}/${model.id}` : "(none)"} \u2014 change with /model <provider/id>`,
|
|
392
|
+
` thinking ${session.thinkingLevel} \u2014 change with /thinking <${THINKING_LEVELS.join("|")}>`,
|
|
393
|
+
` name ${session.sessionName || "(unnamed)"} \u2014 change with /name <name>`,
|
|
394
|
+
` cwd ${active.runtime.cwd}`,
|
|
395
|
+
` messages ${session.messages.length}`
|
|
396
|
+
].join(`
|
|
397
|
+
`)
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
if (rawName === "model") {
|
|
401
|
+
const session = active.runtime.session;
|
|
402
|
+
if (!rest) {
|
|
403
|
+
const available = session.modelRegistry.getAvailable().map((m) => `${m.provider}/${m.id}`);
|
|
404
|
+
const current = session.model ? `${session.model.provider}/${session.model.id}` : "(none)";
|
|
405
|
+
return {
|
|
406
|
+
type: "done",
|
|
407
|
+
message: [
|
|
408
|
+
`Current model: ${current}`,
|
|
409
|
+
available.length > 0 ? `Available: ${available.join(", ")}` : "No models with configured auth.",
|
|
410
|
+
"Switch with /model <provider/id>."
|
|
411
|
+
].join(`
|
|
412
|
+
`)
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
const [provider, ...idParts] = rest.split("/");
|
|
416
|
+
const id = idParts.join("/");
|
|
417
|
+
const target = provider && id ? session.modelRegistry.find(provider, id) : session.modelRegistry.getAvailable().find((m) => m.id === rest);
|
|
418
|
+
if (!target) {
|
|
419
|
+
return { type: "unsupported", message: `Unknown model "${rest}". Use /model to list available models.` };
|
|
420
|
+
}
|
|
421
|
+
try {
|
|
422
|
+
await session.setModel(target);
|
|
423
|
+
} catch (error) {
|
|
424
|
+
return { type: "unsupported", message: error instanceof Error ? error.message : String(error) };
|
|
425
|
+
}
|
|
426
|
+
this.publishStatus(active);
|
|
427
|
+
return { type: "done", message: `Model set to ${target.provider}/${target.id}.` };
|
|
428
|
+
}
|
|
429
|
+
if (rawName === "thinking") {
|
|
430
|
+
const session = active.runtime.session;
|
|
431
|
+
const level = rest.toLowerCase();
|
|
432
|
+
if (!THINKING_LEVELS.includes(level)) {
|
|
433
|
+
return {
|
|
434
|
+
type: "unsupported",
|
|
435
|
+
message: `Current thinking level: ${session.thinkingLevel}. Usage: /thinking <${THINKING_LEVELS.join("|")}>`
|
|
436
|
+
};
|
|
437
|
+
}
|
|
438
|
+
session.setThinkingLevel(level);
|
|
439
|
+
this.publishStatus(active);
|
|
440
|
+
return { type: "done", message: `Thinking level set to ${session.thinkingLevel}.` };
|
|
441
|
+
}
|
|
380
442
|
if (rawName === "name") {
|
|
381
443
|
if (!rest)
|
|
382
444
|
return { type: "unsupported", message: "Usage: /name <session name>" };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@h-rig/runtime",
|
|
3
|
-
"version": "0.0.6-alpha.
|
|
3
|
+
"version": "0.0.6-alpha.34",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Rig package",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -63,14 +63,14 @@
|
|
|
63
63
|
"main": "./dist/src/index.js",
|
|
64
64
|
"module": "./dist/src/index.js",
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@earendil-works/pi-coding-agent": "npm:@h-rig/pi-coding-agent@0.0.6-alpha.
|
|
66
|
+
"@earendil-works/pi-coding-agent": "npm:@h-rig/pi-coding-agent@0.0.6-alpha.34",
|
|
67
67
|
"@libsql/client": "^0.17.2",
|
|
68
|
-
"@rig/contracts": "npm:@h-rig/contracts@0.0.6-alpha.
|
|
69
|
-
"@rig/core": "npm:@h-rig/core@0.0.6-alpha.
|
|
70
|
-
"@rig/hook-kit": "npm:@h-rig/hook-kit@0.0.6-alpha.
|
|
71
|
-
"@rig/shared": "npm:@h-rig/shared@0.0.6-alpha.
|
|
72
|
-
"@rig/skill-loader": "npm:@h-rig/skill-loader@0.0.6-alpha.
|
|
73
|
-
"@rig/validator-kit": "npm:@h-rig/validator-kit@0.0.6-alpha.
|
|
68
|
+
"@rig/contracts": "npm:@h-rig/contracts@0.0.6-alpha.34",
|
|
69
|
+
"@rig/core": "npm:@h-rig/core@0.0.6-alpha.34",
|
|
70
|
+
"@rig/hook-kit": "npm:@h-rig/hook-kit@0.0.6-alpha.34",
|
|
71
|
+
"@rig/shared": "npm:@h-rig/shared@0.0.6-alpha.34",
|
|
72
|
+
"@rig/skill-loader": "npm:@h-rig/skill-loader@0.0.6-alpha.34",
|
|
73
|
+
"@rig/validator-kit": "npm:@h-rig/validator-kit@0.0.6-alpha.34",
|
|
74
74
|
"effect": "4.0.0-beta.78",
|
|
75
75
|
"smol-toml": "^1.6.0"
|
|
76
76
|
}
|