summaryrefslogtreecommitdiff
path: root/pi
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-24 23:35:00 +0200
committerPaul Buetow <paul@buetow.org>2026-03-24 23:35:00 +0200
commitf50d8dcb7515e7f12cf80d04fed93f15b87c4102 (patch)
tree0e297a85f518d0dc01c5d214c8f5146a45b83363 /pi
parent4de5835e2b437f0450b571006e96f5a663d59966 (diff)
hyperstack: gpt-oss-120b + qwen3-coder-next dual-VM pair on A100x1
- Add hyperstack-vm1-gptoss.toml: A100x1 config for gpt-oss-120b (VM1) and qwen3-coder-next (VM2) pair, replacing the H100x2 default - Fix pi/agent/models.json: hyperstack provider URL was pointing at hyperstack.wg1 (unresolvable); corrected to hyperstack1.wg1 (192.168.3.1) - Update hyperstack.rb, hypr.fish: reference vm1-gptoss.toml for create-both and pair commands; update fish abbrs for the new pair setup - Update ask-mode/utils.ts: allow read-only 'ask' commands in ask-mode - Update agent-plan-mode/utils.ts: tighten isAskCommand check - Add state files for provisioned vm1/vm2 instances Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'pi')
-rw-r--r--pi/agent/extensions/agent-plan-mode/utils.ts6
-rw-r--r--pi/agent/extensions/ask-mode/utils.ts25
-rw-r--r--pi/agent/models.json2
-rw-r--r--pi/agent/settings.json3
4 files changed, 33 insertions, 3 deletions
diff --git a/pi/agent/extensions/agent-plan-mode/utils.ts b/pi/agent/extensions/agent-plan-mode/utils.ts
index 3f945e3..c7f66de 100644
--- a/pi/agent/extensions/agent-plan-mode/utils.ts
+++ b/pi/agent/extensions/agent-plan-mode/utils.ts
@@ -151,9 +151,13 @@ export function isSafeAskCommand(command: string): boolean {
return !MUTATING_TASK_PATTERNS.some((pattern) => pattern.test(trimmed));
}
+function isAskCommand(command: string): boolean {
+ return command.trim().startsWith("ask ") || command.trim() === "ask";
+}
+
export function isSafePlanCommand(command: string): boolean {
if (containsRawTaskCommand(command)) return false;
- if (isSafeAskCommand(command)) return true;
+ if (isAskCommand(command)) return true;
const isDestructive = DESTRUCTIVE_PATTERNS.some((pattern) => pattern.test(command));
const isSafe = SAFE_PATTERNS.some((pattern) => pattern.test(command));
diff --git a/pi/agent/extensions/ask-mode/utils.ts b/pi/agent/extensions/ask-mode/utils.ts
index db8c889..835549e 100644
--- a/pi/agent/extensions/ask-mode/utils.ts
+++ b/pi/agent/extensions/ask-mode/utils.ts
@@ -87,7 +87,32 @@ const SAFE_PATTERNS = [
/^\s*exa\b/,
];
+const MUTATING_ASK_PATTERNS = [
+ /\badd\b/i,
+ /\bannotate\b/i,
+ /\bappend\b/i,
+ /\bdelete\b/i,
+ /\bdenotate\b/i,
+ /\bdone\b/i,
+ /\blog\b/i,
+ /\bmodify\b/i,
+ /\bprepend\b/i,
+ /\bstart\b/i,
+ /\bstop\b/i,
+ /\bundo\b/i,
+ /\bpriority\b/i,
+ /\btag\b/i,
+];
+
+function isReadOnlyAskCommand(command: string): boolean {
+ const trimmed = command.trim();
+ if (!trimmed.startsWith("ask ") && trimmed !== "ask") return false;
+ if (/[;&]/.test(trimmed) || /(^|[^|])\|([^|]|$)/.test(trimmed)) return false;
+ return !MUTATING_ASK_PATTERNS.some((pattern) => pattern.test(trimmed));
+}
+
export function isSafeAskModeCommand(command: string): boolean {
+ if (isReadOnlyAskCommand(command)) return true;
const isDestructive = DESTRUCTIVE_PATTERNS.some((pattern) => pattern.test(command));
const isSafe = SAFE_PATTERNS.some((pattern) => pattern.test(command));
return !isDestructive && isSafe;
diff --git a/pi/agent/models.json b/pi/agent/models.json
index 76e37ab..3dfd72d 100644
--- a/pi/agent/models.json
+++ b/pi/agent/models.json
@@ -1,7 +1,7 @@
{
"providers": {
"hyperstack": {
- "baseUrl": "http://hyperstack.wg1:11434/v1",
+ "baseUrl": "http://hyperstack1.wg1:11434/v1",
"apiKey": "EMPTY",
"api": "openai-completions",
"compat": {
diff --git a/pi/agent/settings.json b/pi/agent/settings.json
index fbb3874..d8ea9a3 100644
--- a/pi/agent/settings.json
+++ b/pi/agent/settings.json
@@ -1,5 +1,6 @@
{
"lastChangelogVersion": "0.62.0",
"defaultProvider": "openai",
- "defaultModel": "gpt-4.1"
+ "defaultModel": "gpt-4.1",
+ "defaultThinkingLevel": "high"
} \ No newline at end of file