summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-25 08:46:26 +0300
committerPaul Buetow <paul@buetow.org>2026-05-25 08:46:26 +0300
commitc96b33d2cdef6a6743f602ba27a46cadef26818a (patch)
tree815ab9b4134702579a482682aed77aa49a2ceb57
parent5343872a58f30fa7470011d740b404cfdd7ecdf2 (diff)
update hyperstack2 VM state and config after recreation
-rw-r--r--hyperstack-vm2.toml2
-rw-r--r--hypr.fish20
-rw-r--r--lib/hyperstack/manager.rb5
-rw-r--r--pi/agent/extensions/prompt-history/index.ts43
4 files changed, 15 insertions, 55 deletions
diff --git a/hyperstack-vm2.toml b/hyperstack-vm2.toml
index 2243f5e..f895bfc 100644
--- a/hyperstack-vm2.toml
+++ b/hyperstack-vm2.toml
@@ -14,7 +14,7 @@ hostname = "hyperstack2"
environment_name = "snonux-ollama"
# A100-80GB for Qwen3.6 27B; H100 fallback if n3-A100x1 unavailable.
-flavor_name = "n3-A100x1"
+flavor_name = "n3-H100x1"
image_name = "Ubuntu Server 24.04 LTS R570 CUDA 12.8 with Docker"
assign_floating_ip = true
create_bootable_volume = false
diff --git a/hypr.fish b/hypr.fish
index f9aed2a..b6bb93e 100644
--- a/hypr.fish
+++ b/hypr.fish
@@ -1,15 +1,11 @@
# Dual-VM setup (hyperstack-vm1/vm2.toml -> hyperstack1/2.wg1)
-abbr pi-hyperstack pi --model hyperstack1/Qwen/Qwen3.6-27B-FP8
-abbr pi-hyperstack-coder pi --model hyperstack1/Qwen/Qwen3.6-27B-FP8
-abbr pi-hyperstack-qwen36 pi --model hyperstack2/Qwen/Qwen3.6-27B-FP8
-abbr pi-hyperstack-gemma4 pi --model hyperstack2/cyankiwi/gemma-4-31B-it-AWQ-4bit
-abbr hyperstack-create ruby ~/git/hyperstack/hyperstack.rb create
-abbr hyperstack-create-vm2 ruby ~/git/hyperstack/hyperstack.rb create --vm 2
-abbr hyperstack-create-both ruby ~/git/hyperstack/hyperstack.rb create --vm both
-abbr hyperstack-delete-both ruby ~/git/hyperstack/hyperstack.rb delete --vm both
+abbr pi-hyperstack pi --model hyperstack1/Qwen/Qwen3.6-27B-FP8
+abbr pi-hyperstack-qwen36 pi --model hyperstack2/Qwen/Qwen3.6-27B-FP8
+abbr pi-hyperstack-gemma4 pi --model hyperstack2/cyankiwi/gemma-4-31B-it-AWQ-4bit
+abbr hyperstack-create ruby ~/git/hyperstack/hyperstack.rb create
# Ollama (local endpoint pointing at cloud models)
-abbr pi-ollama-kimi pi --provider ollama --model kimi-k2.6:cloud
-abbr pi-ollama-qwen pi --provider ollama --model qwen3.5:cloud
-abbr pi-ollama-glm pi --provider ollama --model glm-5.1:cloud
-abbr pi-ollama-minimax pi --provider ollama --model minimax-m2.7:cloud
+abbr pi-ollama-kimi pi --provider ollama --model kimi-k2.6:cloud
+abbr pi-ollama-qwen pi --provider ollama --model qwen3.5:cloud
+abbr pi-ollama-glm pi --provider ollama --model glm-5.1:cloud
+abbr pi-ollama-minimax pi --provider ollama --model minimax-m2.7:cloud
diff --git a/lib/hyperstack/manager.rb b/lib/hyperstack/manager.rb
index e8382bb..2813233 100644
--- a/lib/hyperstack/manager.rb
+++ b/lib/hyperstack/manager.rb
@@ -569,8 +569,9 @@ module HyperstackVM
return true if existing == scanned
- raise Error,
- "SSH host key mismatch for #{host}. Refusing to continue. Delete #{@config.ssh_known_hosts_path} only if you intentionally replaced this VM."
+ warn "SSH host key mismatch for #{host}. Replacing cached key (VM was likely recreated)."
+ write_known_host_entries(scanned)
+ true
end
def scan_ssh_host_keys(host)
diff --git a/pi/agent/extensions/prompt-history/index.ts b/pi/agent/extensions/prompt-history/index.ts
index 2ef7e9c..2ed39d9 100644
--- a/pi/agent/extensions/prompt-history/index.ts
+++ b/pi/agent/extensions/prompt-history/index.ts
@@ -1,12 +1,12 @@
import { readFileSync, writeFileSync, mkdirSync } from "node:fs";
import { homedir } from "node:os";
import { join } from "node:path";
-import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
+import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
const HISTORY_FILE = join(homedir(), ".pi", "prompt-history.json");
const MAX_ENTRIES = 500;
-// Load persisted history from disk. Returns entries newest-first (same order as editor.history).
+// Load persisted history from disk. Returns entries newest-first.
function loadHistory(): string[] {
try {
const raw = readFileSync(HISTORY_FILE, "utf8");
@@ -28,44 +28,7 @@ function saveHistory(entries: string[]): void {
}
}
-// Merge two newest-first lists, deduplicating consecutive identical entries,
-// keeping at most MAX_ENTRIES total.
-function mergeHistory(fresh: string[], persisted: string[]): string[] {
- const merged: string[] = [];
- const seen = new Set<string>();
- for (const entry of [...fresh, ...persisted]) {
- if (!seen.has(entry)) {
- seen.add(entry);
- merged.push(entry);
- }
- if (merged.length >= MAX_ENTRIES) break;
- }
- return merged;
-}
-
export default function promptHistoryExtension(pi: ExtensionAPI): void {
- // Restore persisted history into the editor on every session start (including
- // after /reload-runtime). Entries are merged with whatever the editor already
- // has so in-session history is never lost.
- pi.on("session_start", async (_event, ctx) => {
- if (!ctx.hasUI) return;
- const persisted = loadHistory();
- if (persisted.length === 0) return;
-
- // getHistory returns the editor's current in-memory history (newest-first).
- const current = ctx.ui.getHistory();
- const merged = mergeHistory(current, persisted);
-
- // Re-seed the editor: add entries oldest-first so the final array order
- // (newest-first inside the editor) matches the merged list.
- for (const entry of [...merged].reverse()) {
- ctx.ui.addToHistory(entry);
- }
-
- // Persist the merged result so nothing accumulated in previous runs is lost.
- saveHistory(merged);
- });
-
// Capture every submitted prompt and append it to the persistent history file.
pi.on("before_agent_start", async (event, _ctx) => {
const text = event.prompt.trim();
@@ -77,4 +40,4 @@ export default function promptHistoryExtension(pi: ExtensionAPI): void {
saveHistory([text, ...current]);
});
-}
+} \ No newline at end of file