heyio 0.1.22 → 0.1.24
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/api/server.js +2 -1
- package/dist/copilot/orchestrator.js +4 -4
- package/dist/index.js +2 -1
- package/dist/paths.js +4 -0
- package/package.json +1 -1
package/dist/api/server.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import express from "express";
|
|
2
2
|
import { config } from "../config.js";
|
|
3
|
+
import { IO_VERSION } from "../paths.js";
|
|
3
4
|
let messageHandler;
|
|
4
5
|
const sseConnections = new Set();
|
|
5
6
|
export function setMessageHandler(handler) {
|
|
@@ -24,7 +25,7 @@ export async function startApiServer() {
|
|
|
24
25
|
res.json({ status: "ok" });
|
|
25
26
|
});
|
|
26
27
|
app.get("/status", (_req, res) => {
|
|
27
|
-
res.json({ version:
|
|
28
|
+
res.json({ version: IO_VERSION, uptime: process.uptime() });
|
|
28
29
|
});
|
|
29
30
|
app.post("/message", async (req, res) => {
|
|
30
31
|
const { text } = req.body;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import crypto from "node:crypto";
|
|
2
2
|
import { approveAll, } from "@github/copilot-sdk";
|
|
3
3
|
import { config } from "../config.js";
|
|
4
|
-
import { SESSIONS_DIR } from "../paths.js";
|
|
4
|
+
import { SESSIONS_DIR, IO_VERSION } from "../paths.js";
|
|
5
5
|
import { getState, setState, deleteState, logConversation } from "../store/db.js";
|
|
6
6
|
import { clearStaleTasks, getTask } from "../store/tasks.js";
|
|
7
7
|
import { getSquad, listSquads, createSquad, deleteSquad, logDecision, getDecisionsSummary, updateSquadStatus, } from "../store/squads.js";
|
|
@@ -77,10 +77,10 @@ function getSessionConfig() {
|
|
|
77
77
|
const tools = createTools(getToolDeps());
|
|
78
78
|
return { tools, skillDirectories: getSkillDirectories() };
|
|
79
79
|
}
|
|
80
|
-
/** Hash of tool names — used to detect when tools change across updates. */
|
|
80
|
+
/** Hash of tool names + version — used to detect when tools change across updates. */
|
|
81
81
|
function toolFingerprint(tools) {
|
|
82
82
|
const names = (tools ?? []).map((t) => t.name).sort().join(",");
|
|
83
|
-
return crypto.createHash("sha256").update(names).digest("hex").slice(0, 16);
|
|
83
|
+
return crypto.createHash("sha256").update(`${IO_VERSION}:${names}`).digest("hex").slice(0, 16);
|
|
84
84
|
}
|
|
85
85
|
function buildFullSessionConfig() {
|
|
86
86
|
const { tools, skillDirectories } = getSessionConfig();
|
|
@@ -169,7 +169,7 @@ async function ensureOrchestratorSession() {
|
|
|
169
169
|
const { tools, skillDirectories } = getSessionConfig();
|
|
170
170
|
const currentToolsHash = toolFingerprint(tools);
|
|
171
171
|
if (savedSessionId) {
|
|
172
|
-
if (savedToolsHash
|
|
172
|
+
if (!savedToolsHash || savedToolsHash !== currentToolsHash) {
|
|
173
173
|
console.error("[io] Tool set changed since last session — starting fresh");
|
|
174
174
|
deleteState(SESSION_ID_KEY);
|
|
175
175
|
deleteState(SESSION_TOOLS_KEY);
|
package/dist/index.js
CHANGED
|
@@ -15,11 +15,12 @@ import { startApiServer, setMessageHandler as setApiHandler } from "./api/server
|
|
|
15
15
|
import { listSkills, installSkill, removeSkill, searchSkillsRegistry } from "./copilot/skills.js";
|
|
16
16
|
import { config, saveConfig } from "./config.js";
|
|
17
17
|
import { createInterface } from "readline";
|
|
18
|
+
import { IO_VERSION } from "./paths.js";
|
|
18
19
|
const program = new Command();
|
|
19
20
|
program
|
|
20
21
|
.name("io")
|
|
21
22
|
.description("IO — personal AI assistant daemon")
|
|
22
|
-
.version(
|
|
23
|
+
.version(IO_VERSION);
|
|
23
24
|
program
|
|
24
25
|
.option("--daemon", "Run as a background daemon")
|
|
25
26
|
.option("--self-edit", "Allow IO to modify its own source code")
|
package/dist/paths.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { homedir } from "os";
|
|
2
2
|
import { join } from "path";
|
|
3
|
+
import { createRequire } from "module";
|
|
3
4
|
export const IO_HOME = join(homedir(), ".io");
|
|
4
5
|
export const CONFIG_PATH = join(IO_HOME, "config.json");
|
|
5
6
|
export const DB_PATH = join(IO_HOME, "io.db");
|
|
@@ -7,4 +8,7 @@ export const WIKI_DIR = join(IO_HOME, "wiki");
|
|
|
7
8
|
export const SKILLS_DIR = join(IO_HOME, "skills");
|
|
8
9
|
export const SESSIONS_DIR = join(IO_HOME, "sessions");
|
|
9
10
|
export const LOGS_DIR = join(IO_HOME, "logs");
|
|
11
|
+
const require = createRequire(import.meta.url);
|
|
12
|
+
const pkg = require("../package.json");
|
|
13
|
+
export const IO_VERSION = pkg.version;
|
|
10
14
|
//# sourceMappingURL=paths.js.map
|