heyio 1.0.3 → 1.0.5
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 +6 -3
- package/dist/copilot/system-message.js +1 -0
- package/dist/copilot/tools.js +1 -1
- package/dist/store/db.js +13 -0
- package/dist/store/squads.js +2 -1
- package/package.json +1 -1
package/dist/api/server.js
CHANGED
|
@@ -159,7 +159,8 @@ export async function startApiServer(config) {
|
|
|
159
159
|
});
|
|
160
160
|
app.get("/api/wiki/page/*path", async (req, res) => {
|
|
161
161
|
try {
|
|
162
|
-
const
|
|
162
|
+
const raw = req.params.path;
|
|
163
|
+
const pagePath = Array.isArray(raw) ? raw.join("/") : raw;
|
|
163
164
|
const content = await readPage(pagePath);
|
|
164
165
|
res.json({ path: pagePath, content });
|
|
165
166
|
}
|
|
@@ -168,14 +169,16 @@ export async function startApiServer(config) {
|
|
|
168
169
|
}
|
|
169
170
|
});
|
|
170
171
|
app.put("/api/wiki/page/*path", async (req, res) => {
|
|
171
|
-
const
|
|
172
|
+
const raw = req.params.path;
|
|
173
|
+
const pagePath = Array.isArray(raw) ? raw.join("/") : raw;
|
|
172
174
|
const { content } = req.body;
|
|
173
175
|
await writePage(pagePath, content);
|
|
174
176
|
res.json({ ok: true });
|
|
175
177
|
});
|
|
176
178
|
app.delete("/api/wiki/page/*path", async (req, res) => {
|
|
177
179
|
try {
|
|
178
|
-
const
|
|
180
|
+
const raw = req.params.path;
|
|
181
|
+
const pagePath = Array.isArray(raw) ? raw.join("/") : raw;
|
|
179
182
|
await deletePage(pagePath);
|
|
180
183
|
res.json({ ok: true });
|
|
181
184
|
}
|
|
@@ -13,6 +13,7 @@ You are IO, a personal AI assistant daemon. You run 24/7 on the user's machine,
|
|
|
13
13
|
## Core Capabilities
|
|
14
14
|
- Manage project squads (teams of AI agents themed after pop culture universes)
|
|
15
15
|
- Read and write to a persistent wiki knowledge base at ~/.io/wiki/
|
|
16
|
+
- Each squad has its own wiki at ~/.io/wiki/squads/{squad-slug}/ (use the slug, never the UUID)
|
|
16
17
|
- Delegate complex tasks to squad team leads
|
|
17
18
|
- Track deliverables in a unified feed
|
|
18
19
|
- Schedule recurring tasks and stand-ups
|
package/dist/copilot/tools.js
CHANGED
|
@@ -67,7 +67,7 @@ export function createTools() {
|
|
|
67
67
|
handler: async ({ name, universe, repo_url }) => {
|
|
68
68
|
const { createSquad } = await import("../store/squads.js");
|
|
69
69
|
const squad = createSquad(name, universe, repo_url);
|
|
70
|
-
return `Squad "${name}" created with universe "${universe}". ID: ${squad.id}
|
|
70
|
+
return `Squad "${name}" created with universe "${universe}". ID: ${squad.id}, Slug: ${squad.slug}. Wiki path: ~/.io/wiki/squads/${squad.slug}/`;
|
|
71
71
|
},
|
|
72
72
|
}),
|
|
73
73
|
defineTool("squad_add_agent", {
|
package/dist/store/db.js
CHANGED
|
@@ -115,6 +115,19 @@ function runMigrations(db) {
|
|
|
115
115
|
`);
|
|
116
116
|
setSchemaVersion(db, 1);
|
|
117
117
|
}
|
|
118
|
+
if (version < 2) {
|
|
119
|
+
db.exec(`
|
|
120
|
+
ALTER TABLE squads ADD COLUMN slug TEXT;
|
|
121
|
+
`);
|
|
122
|
+
// Backfill slugs for existing squads
|
|
123
|
+
const squads = db.prepare("SELECT id, name FROM squads WHERE slug IS NULL").all();
|
|
124
|
+
const update = db.prepare("UPDATE squads SET slug = ? WHERE id = ?");
|
|
125
|
+
for (const s of squads) {
|
|
126
|
+
const slug = s.name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
127
|
+
update.run(slug || s.id, s.id);
|
|
128
|
+
}
|
|
129
|
+
setSchemaVersion(db, 2);
|
|
130
|
+
}
|
|
118
131
|
}
|
|
119
132
|
function getSchemaVersion(db) {
|
|
120
133
|
const row = db.prepare("SELECT value FROM meta WHERE key = 'schema_version'").get();
|
package/dist/store/squads.js
CHANGED
|
@@ -3,7 +3,8 @@ import { getDb } from "./db.js";
|
|
|
3
3
|
export function createSquad(name, universe, repoUrl) {
|
|
4
4
|
const db = getDb();
|
|
5
5
|
const id = randomUUID();
|
|
6
|
-
|
|
6
|
+
const slug = name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
7
|
+
db.prepare("INSERT INTO squads (id, name, slug, universe, repo_url) VALUES (?, ?, ?, ?, ?)").run(id, name, slug, universe, repoUrl ?? null);
|
|
7
8
|
return db.prepare("SELECT * FROM squads WHERE id = ?").get(id);
|
|
8
9
|
}
|
|
9
10
|
export function getSquad(id) {
|