opencode-swarm-plugin 0.54.0 → 0.55.0
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/README.md +14 -12
- package/bin/swarm.ts +3 -15
- package/dist/bin/swarm.js +194 -111
- package/dist/examples/plugin-wrapper-template.ts +18 -3
- package/dist/hooks/atomic-write.d.ts +21 -0
- package/dist/hooks/atomic-write.d.ts.map +1 -0
- package/dist/hooks/constants.d.ts +28 -0
- package/dist/hooks/constants.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +16 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/session-start.d.ts +30 -0
- package/dist/hooks/session-start.d.ts.map +1 -0
- package/dist/hooks/tool-complete.d.ts +54 -0
- package/dist/hooks/tool-complete.d.ts.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +68 -30
- package/dist/output-guardrails.d.ts.map +1 -1
- package/dist/plugin.js +68 -30
- package/dist/swarm-mail.d.ts +34 -0
- package/dist/swarm-mail.d.ts.map +1 -1
- package/dist/swarm-orchestrate.d.ts +1 -1
- package/dist/swarm-orchestrate.d.ts.map +1 -1
- package/dist/swarm-prompts.d.ts +1 -1
- package/dist/swarm-prompts.d.ts.map +1 -1
- package/dist/swarm-prompts.js +1 -30
- package/dist/tool-availability.d.ts +1 -2
- package/dist/tool-availability.d.ts.map +1 -1
- package/examples/plugin-wrapper-template.ts +18 -3
- package/global-skills/swarm-coordination/SKILL.md +1 -1
- package/package.json +2 -2
package/dist/bin/swarm.js
CHANGED
|
@@ -61,7 +61,9 @@ __export(exports_dist, {
|
|
|
61
61
|
resolvePartialId: () => resolvePartialId,
|
|
62
62
|
reserveSwarmFiles: () => reserveSwarmFiles,
|
|
63
63
|
replayCellEvents: () => replayCellEvents,
|
|
64
|
+
releaseSwarmFilesForAgent: () => releaseSwarmFilesForAgent,
|
|
64
65
|
releaseSwarmFiles: () => releaseSwarmFiles,
|
|
66
|
+
releaseAllSwarmFiles: () => releaseAllSwarmFiles,
|
|
65
67
|
recoverySuccess: () => recoverySuccess,
|
|
66
68
|
rebuildBeadBlockedCache: () => rebuildBeadBlockedCache,
|
|
67
69
|
rebuildAllBlockedCaches: () => rebuildAllBlockedCaches,
|
|
@@ -11194,8 +11196,10 @@ async function createLibSQLAdapter(config2) {
|
|
|
11194
11196
|
};
|
|
11195
11197
|
const client = createClient(clientConfig);
|
|
11196
11198
|
await client.execute("SELECT 1");
|
|
11199
|
+
await client.execute("PRAGMA auto_vacuum = INCREMENTAL");
|
|
11197
11200
|
await client.execute("PRAGMA foreign_keys = ON");
|
|
11198
11201
|
await client.execute("PRAGMA busy_timeout = 5000");
|
|
11202
|
+
await client.execute("PRAGMA journal_mode = WAL");
|
|
11199
11203
|
return new LibSQLAdapter(client);
|
|
11200
11204
|
}
|
|
11201
11205
|
async function createLibSQLMemorySchema(db) {
|
|
@@ -11927,8 +11931,7 @@ async function createLibSQLStreamsSchema(db) {
|
|
|
11927
11931
|
project_key TEXT NOT NULL,
|
|
11928
11932
|
timestamp INTEGER NOT NULL,
|
|
11929
11933
|
sequence INTEGER GENERATED ALWAYS AS (id) STORED,
|
|
11930
|
-
data TEXT NOT NULL
|
|
11931
|
-
created_at TEXT DEFAULT (datetime('now'))
|
|
11934
|
+
data TEXT NOT NULL
|
|
11932
11935
|
)
|
|
11933
11936
|
`);
|
|
11934
11937
|
await db.exec(`
|
|
@@ -11947,6 +11950,10 @@ async function createLibSQLStreamsSchema(db) {
|
|
|
11947
11950
|
CREATE INDEX IF NOT EXISTS idx_events_project_type
|
|
11948
11951
|
ON events(project_key, type)
|
|
11949
11952
|
`);
|
|
11953
|
+
await db.exec(`
|
|
11954
|
+
CREATE INDEX IF NOT EXISTS idx_events_project_timestamp
|
|
11955
|
+
ON events(project_key, timestamp)
|
|
11956
|
+
`);
|
|
11950
11957
|
await db.exec(`
|
|
11951
11958
|
CREATE TABLE IF NOT EXISTS agents (
|
|
11952
11959
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
@@ -12138,8 +12145,7 @@ async function createLibSQLStreamsSchema(db) {
|
|
|
12138
12145
|
precedent_cited TEXT,
|
|
12139
12146
|
outcome_event_id INTEGER,
|
|
12140
12147
|
quality_score REAL,
|
|
12141
|
-
timestamp INTEGER NOT NULL
|
|
12142
|
-
created_at TEXT DEFAULT (datetime('now'))
|
|
12148
|
+
timestamp INTEGER NOT NULL
|
|
12143
12149
|
)
|
|
12144
12150
|
`);
|
|
12145
12151
|
await db.exec(`
|
|
@@ -12166,8 +12172,7 @@ async function createLibSQLStreamsSchema(db) {
|
|
|
12166
12172
|
target_entity_id TEXT NOT NULL,
|
|
12167
12173
|
link_type TEXT NOT NULL,
|
|
12168
12174
|
strength REAL DEFAULT 1.0,
|
|
12169
|
-
context TEXT
|
|
12170
|
-
created_at TEXT DEFAULT (datetime('now'))
|
|
12175
|
+
context TEXT
|
|
12171
12176
|
)
|
|
12172
12177
|
`);
|
|
12173
12178
|
await db.exec(`
|
|
@@ -12208,7 +12213,7 @@ async function validateLibSQLStreamsSchema(db) {
|
|
|
12208
12213
|
PRAGMA table_xinfo('events')
|
|
12209
12214
|
`);
|
|
12210
12215
|
const eventsColNames = eventsCols.rows.map((r) => r.name);
|
|
12211
|
-
const requiredEventsCols = ["id", "type", "project_key", "timestamp", "sequence", "data"
|
|
12216
|
+
const requiredEventsCols = ["id", "type", "project_key", "timestamp", "sequence", "data"];
|
|
12212
12217
|
for (const col of requiredEventsCols) {
|
|
12213
12218
|
if (!eventsColNames.includes(col))
|
|
12214
12219
|
return false;
|
|
@@ -15778,12 +15783,15 @@ async function handleFileReservedDrizzle(db2, event) {
|
|
|
15778
15783
|
async function handleFileReleasedDrizzle(db2, event) {
|
|
15779
15784
|
if (event.type !== "file_released")
|
|
15780
15785
|
return;
|
|
15786
|
+
const targetAgent = event.target_agent ?? event.agent_name;
|
|
15781
15787
|
if (event.reservation_ids && event.reservation_ids.length > 0) {
|
|
15782
15788
|
await db2.update(reservationsTable).set({ released_at: event.timestamp }).where(inArray(reservationsTable.id, event.reservation_ids));
|
|
15783
15789
|
} else if (event.paths && event.paths.length > 0) {
|
|
15784
|
-
await db2.update(reservationsTable).set({ released_at: event.timestamp }).where(and3(eq(reservationsTable.project_key, event.project_key), eq(reservationsTable.agent_name,
|
|
15790
|
+
await db2.update(reservationsTable).set({ released_at: event.timestamp }).where(and3(eq(reservationsTable.project_key, event.project_key), eq(reservationsTable.agent_name, targetAgent), inArray(reservationsTable.path_pattern, event.paths), sql`${reservationsTable.released_at} IS NULL`));
|
|
15791
|
+
} else if (event.release_all) {
|
|
15792
|
+
await db2.update(reservationsTable).set({ released_at: event.timestamp }).where(and3(eq(reservationsTable.project_key, event.project_key), sql`${reservationsTable.released_at} IS NULL`));
|
|
15785
15793
|
} else {
|
|
15786
|
-
await db2.update(reservationsTable).set({ released_at: event.timestamp }).where(and3(eq(reservationsTable.project_key, event.project_key), eq(reservationsTable.agent_name,
|
|
15794
|
+
await db2.update(reservationsTable).set({ released_at: event.timestamp }).where(and3(eq(reservationsTable.project_key, event.project_key), eq(reservationsTable.agent_name, targetAgent), sql`${reservationsTable.released_at} IS NULL`));
|
|
15787
15795
|
}
|
|
15788
15796
|
}
|
|
15789
15797
|
async function handleDecompositionGeneratedDrizzle(db2, event) {
|
|
@@ -16187,6 +16195,36 @@ async function releaseSwarmFiles(options2) {
|
|
|
16187
16195
|
releasedAt: Date.now()
|
|
16188
16196
|
};
|
|
16189
16197
|
}
|
|
16198
|
+
async function releaseAllSwarmFiles(options2) {
|
|
16199
|
+
const { projectPath, actorName, dbOverride } = options2;
|
|
16200
|
+
const currentReservations = await getActiveReservations2(projectPath, projectPath, undefined, dbOverride);
|
|
16201
|
+
const releaseCount = currentReservations.length;
|
|
16202
|
+
await appendEvent(createEvent("file_released", {
|
|
16203
|
+
project_key: projectPath,
|
|
16204
|
+
agent_name: actorName,
|
|
16205
|
+
release_all: true,
|
|
16206
|
+
file_count: releaseCount
|
|
16207
|
+
}), projectPath, dbOverride);
|
|
16208
|
+
return {
|
|
16209
|
+
released: releaseCount,
|
|
16210
|
+
releasedAt: Date.now()
|
|
16211
|
+
};
|
|
16212
|
+
}
|
|
16213
|
+
async function releaseSwarmFilesForAgent(options2) {
|
|
16214
|
+
const { projectPath, actorName, targetAgent, dbOverride } = options2;
|
|
16215
|
+
const currentReservations = await getActiveReservations2(projectPath, projectPath, targetAgent, dbOverride);
|
|
16216
|
+
const releaseCount = currentReservations.length;
|
|
16217
|
+
await appendEvent(createEvent("file_released", {
|
|
16218
|
+
project_key: projectPath,
|
|
16219
|
+
agent_name: actorName,
|
|
16220
|
+
target_agent: targetAgent,
|
|
16221
|
+
file_count: releaseCount
|
|
16222
|
+
}), projectPath, dbOverride);
|
|
16223
|
+
return {
|
|
16224
|
+
released: releaseCount,
|
|
16225
|
+
releasedAt: Date.now()
|
|
16226
|
+
};
|
|
16227
|
+
}
|
|
16190
16228
|
async function acknowledgeSwarmMessage(options2) {
|
|
16191
16229
|
const { projectPath, messageId, agentName, dbOverride } = options2;
|
|
16192
16230
|
const timestamp = Date.now();
|
|
@@ -17191,14 +17229,18 @@ async function handleFileReserved(db2, event) {
|
|
|
17191
17229
|
async function handleFileReleased(db2, event) {
|
|
17192
17230
|
if (event.type !== "file_released")
|
|
17193
17231
|
return;
|
|
17232
|
+
const targetAgent = event.target_agent ?? event.agent_name;
|
|
17194
17233
|
if (event.reservation_ids && event.reservation_ids.length > 0) {
|
|
17195
17234
|
await db2.query(`UPDATE reservations SET released_at = $1 WHERE id = ANY($2)`, [event.timestamp, event.reservation_ids]);
|
|
17196
17235
|
} else if (event.paths && event.paths.length > 0) {
|
|
17197
17236
|
await db2.query(`UPDATE reservations SET released_at = $1
|
|
17198
|
-
WHERE project_key = $2 AND agent_name = $3 AND path_pattern = ANY($4) AND released_at IS NULL`, [event.timestamp, event.project_key,
|
|
17237
|
+
WHERE project_key = $2 AND agent_name = $3 AND path_pattern = ANY($4) AND released_at IS NULL`, [event.timestamp, event.project_key, targetAgent, event.paths]);
|
|
17238
|
+
} else if (event.release_all) {
|
|
17239
|
+
await db2.query(`UPDATE reservations SET released_at = $1
|
|
17240
|
+
WHERE project_key = $2 AND released_at IS NULL`, [event.timestamp, event.project_key]);
|
|
17199
17241
|
} else {
|
|
17200
17242
|
await db2.query(`UPDATE reservations SET released_at = $1
|
|
17201
|
-
WHERE project_key = $2 AND agent_name = $3 AND released_at IS NULL`, [event.timestamp, event.project_key,
|
|
17243
|
+
WHERE project_key = $2 AND agent_name = $3 AND released_at IS NULL`, [event.timestamp, event.project_key, targetAgent]);
|
|
17202
17244
|
}
|
|
17203
17245
|
}
|
|
17204
17246
|
async function handleDecompositionGenerated(db2, event) {
|
|
@@ -94021,6 +94063,8 @@ ${stack.split(`
|
|
|
94021
94063
|
FileReleasedEventSchema = BaseEventSchema.extend({
|
|
94022
94064
|
type: exports_external.literal("file_released"),
|
|
94023
94065
|
agent_name: exports_external.string(),
|
|
94066
|
+
target_agent: exports_external.string().optional(),
|
|
94067
|
+
release_all: exports_external.boolean().optional(),
|
|
94024
94068
|
paths: exports_external.array(exports_external.string()).optional(),
|
|
94025
94069
|
reservation_ids: exports_external.array(exports_external.number()).optional(),
|
|
94026
94070
|
lock_holder_ids: exports_external.array(exports_external.string()).optional(),
|
|
@@ -98119,8 +98163,7 @@ ${stack.split(`
|
|
|
98119
98163
|
project_key: text("project_key").notNull(),
|
|
98120
98164
|
timestamp: integer4("timestamp").notNull(),
|
|
98121
98165
|
sequence: integer4("sequence").generatedAlwaysAs(sql`id`),
|
|
98122
|
-
data: text("data").notNull()
|
|
98123
|
-
created_at: text("created_at").default("datetime('now')")
|
|
98166
|
+
data: text("data").notNull()
|
|
98124
98167
|
}, (table5) => ({
|
|
98125
98168
|
projectKeyIdx: index("idx_events_project_key").on(table5.project_key),
|
|
98126
98169
|
typeIdx: index("idx_events_type").on(table5.type),
|
|
@@ -98251,8 +98294,7 @@ ${stack.split(`
|
|
|
98251
98294
|
precedent_cited: text("precedent_cited"),
|
|
98252
98295
|
outcome_event_id: integer4("outcome_event_id"),
|
|
98253
98296
|
quality_score: real("quality_score"),
|
|
98254
|
-
timestamp: integer4("timestamp").notNull()
|
|
98255
|
-
created_at: text("created_at").default("(datetime('now'))")
|
|
98297
|
+
timestamp: integer4("timestamp").notNull()
|
|
98256
98298
|
}, (table5) => ({
|
|
98257
98299
|
epicIdx: index("idx_decision_traces_epic").on(table5.epic_id),
|
|
98258
98300
|
typeIdx: index("idx_decision_traces_type").on(table5.decision_type),
|
|
@@ -98266,8 +98308,7 @@ ${stack.split(`
|
|
|
98266
98308
|
target_entity_id: text("target_entity_id").notNull(),
|
|
98267
98309
|
link_type: text("link_type").notNull(),
|
|
98268
98310
|
strength: real("strength").default(1),
|
|
98269
|
-
context: text("context")
|
|
98270
|
-
created_at: text("created_at").default("(datetime('now'))")
|
|
98311
|
+
context: text("context")
|
|
98271
98312
|
}, (table5) => ({
|
|
98272
98313
|
sourceIdx: index("idx_entity_links_source").on(table5.source_decision_id),
|
|
98273
98314
|
targetIdx: index("idx_entity_links_target").on(table5.target_entity_type, table5.target_entity_id),
|
|
@@ -107031,7 +107072,9 @@ ${stack.split(`
|
|
|
107031
107072
|
__export2(exports_swarm_mail, {
|
|
107032
107073
|
sendSwarmMessage: () => sendSwarmMessage,
|
|
107033
107074
|
reserveSwarmFiles: () => reserveSwarmFiles,
|
|
107075
|
+
releaseSwarmFilesForAgent: () => releaseSwarmFilesForAgent,
|
|
107034
107076
|
releaseSwarmFiles: () => releaseSwarmFiles,
|
|
107077
|
+
releaseAllSwarmFiles: () => releaseAllSwarmFiles,
|
|
107035
107078
|
readSwarmMessage: () => readSwarmMessage,
|
|
107036
107079
|
initSwarmAgent: () => initSwarmAgent,
|
|
107037
107080
|
getSwarmInbox: () => getSwarmInbox,
|
|
@@ -108037,7 +108080,9 @@ ${stack.split(`
|
|
|
108037
108080
|
rollbackTo: () => rollbackTo,
|
|
108038
108081
|
reserveSwarmFiles: () => reserveSwarmFiles,
|
|
108039
108082
|
reserveAgentFiles: () => reserveAgentFiles,
|
|
108083
|
+
releaseSwarmFilesForAgent: () => releaseSwarmFilesForAgent,
|
|
108040
108084
|
releaseSwarmFiles: () => releaseSwarmFiles,
|
|
108085
|
+
releaseAllSwarmFiles: () => releaseAllSwarmFiles,
|
|
108041
108086
|
releaseAgentFiles: () => releaseAgentFiles,
|
|
108042
108087
|
readSwarmMessage: () => readSwarmMessage,
|
|
108043
108088
|
readEvents: () => readEvents,
|
|
@@ -115459,7 +115504,7 @@ Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the toke
|
|
|
115459
115504
|
init_schema();
|
|
115460
115505
|
init_worktree();
|
|
115461
115506
|
TABLE_COLUMNS = {
|
|
115462
|
-
events: "type, project_key, timestamp, data
|
|
115507
|
+
events: "type, project_key, timestamp, data",
|
|
115463
115508
|
agents: "project_key, name, program, model, task_description, registered_at, last_active_at",
|
|
115464
115509
|
messages: "project_key, from_agent, subject, body, thread_id, importance, ack_required, created_at",
|
|
115465
115510
|
message_recipients: "message_id, agent_name, read_at, acked_at",
|
|
@@ -116537,7 +116582,9 @@ __export(exports_dist2, {
|
|
|
116537
116582
|
resolvePartialId: () => resolvePartialId2,
|
|
116538
116583
|
reserveSwarmFiles: () => reserveSwarmFiles2,
|
|
116539
116584
|
replayCellEvents: () => replayCellEvents2,
|
|
116585
|
+
releaseSwarmFilesForAgent: () => releaseSwarmFilesForAgent2,
|
|
116540
116586
|
releaseSwarmFiles: () => releaseSwarmFiles2,
|
|
116587
|
+
releaseAllSwarmFiles: () => releaseAllSwarmFiles2,
|
|
116541
116588
|
recoverySuccess: () => recoverySuccess2,
|
|
116542
116589
|
rebuildBeadBlockedCache: () => rebuildBeadBlockedCache2,
|
|
116543
116590
|
rebuildAllBlockedCaches: () => rebuildAllBlockedCaches2,
|
|
@@ -127670,8 +127717,10 @@ async function createLibSQLAdapter2(config22) {
|
|
|
127670
127717
|
};
|
|
127671
127718
|
const client = createClient8(clientConfig);
|
|
127672
127719
|
await client.execute("SELECT 1");
|
|
127720
|
+
await client.execute("PRAGMA auto_vacuum = INCREMENTAL");
|
|
127673
127721
|
await client.execute("PRAGMA foreign_keys = ON");
|
|
127674
127722
|
await client.execute("PRAGMA busy_timeout = 5000");
|
|
127723
|
+
await client.execute("PRAGMA journal_mode = WAL");
|
|
127675
127724
|
return new LibSQLAdapter2(client);
|
|
127676
127725
|
}
|
|
127677
127726
|
async function createLibSQLMemorySchema2(db) {
|
|
@@ -128403,8 +128452,7 @@ async function createLibSQLStreamsSchema2(db) {
|
|
|
128403
128452
|
project_key TEXT NOT NULL,
|
|
128404
128453
|
timestamp INTEGER NOT NULL,
|
|
128405
128454
|
sequence INTEGER GENERATED ALWAYS AS (id) STORED,
|
|
128406
|
-
data TEXT NOT NULL
|
|
128407
|
-
created_at TEXT DEFAULT (datetime('now'))
|
|
128455
|
+
data TEXT NOT NULL
|
|
128408
128456
|
)
|
|
128409
128457
|
`);
|
|
128410
128458
|
await db.exec(`
|
|
@@ -128423,6 +128471,10 @@ async function createLibSQLStreamsSchema2(db) {
|
|
|
128423
128471
|
CREATE INDEX IF NOT EXISTS idx_events_project_type
|
|
128424
128472
|
ON events(project_key, type)
|
|
128425
128473
|
`);
|
|
128474
|
+
await db.exec(`
|
|
128475
|
+
CREATE INDEX IF NOT EXISTS idx_events_project_timestamp
|
|
128476
|
+
ON events(project_key, timestamp)
|
|
128477
|
+
`);
|
|
128426
128478
|
await db.exec(`
|
|
128427
128479
|
CREATE TABLE IF NOT EXISTS agents (
|
|
128428
128480
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
@@ -128614,8 +128666,7 @@ async function createLibSQLStreamsSchema2(db) {
|
|
|
128614
128666
|
precedent_cited TEXT,
|
|
128615
128667
|
outcome_event_id INTEGER,
|
|
128616
128668
|
quality_score REAL,
|
|
128617
|
-
timestamp INTEGER NOT NULL
|
|
128618
|
-
created_at TEXT DEFAULT (datetime('now'))
|
|
128669
|
+
timestamp INTEGER NOT NULL
|
|
128619
128670
|
)
|
|
128620
128671
|
`);
|
|
128621
128672
|
await db.exec(`
|
|
@@ -128642,8 +128693,7 @@ async function createLibSQLStreamsSchema2(db) {
|
|
|
128642
128693
|
target_entity_id TEXT NOT NULL,
|
|
128643
128694
|
link_type TEXT NOT NULL,
|
|
128644
128695
|
strength REAL DEFAULT 1.0,
|
|
128645
|
-
context TEXT
|
|
128646
|
-
created_at TEXT DEFAULT (datetime('now'))
|
|
128696
|
+
context TEXT
|
|
128647
128697
|
)
|
|
128648
128698
|
`);
|
|
128649
128699
|
await db.exec(`
|
|
@@ -128684,7 +128734,7 @@ async function validateLibSQLStreamsSchema2(db) {
|
|
|
128684
128734
|
PRAGMA table_xinfo('events')
|
|
128685
128735
|
`);
|
|
128686
128736
|
const eventsColNames = eventsCols.rows.map((r) => r.name);
|
|
128687
|
-
const requiredEventsCols = ["id", "type", "project_key", "timestamp", "sequence", "data"
|
|
128737
|
+
const requiredEventsCols = ["id", "type", "project_key", "timestamp", "sequence", "data"];
|
|
128688
128738
|
for (const col of requiredEventsCols) {
|
|
128689
128739
|
if (!eventsColNames.includes(col))
|
|
128690
128740
|
return false;
|
|
@@ -132254,12 +132304,15 @@ async function handleFileReservedDrizzle2(db2, event) {
|
|
|
132254
132304
|
async function handleFileReleasedDrizzle2(db2, event) {
|
|
132255
132305
|
if (event.type !== "file_released")
|
|
132256
132306
|
return;
|
|
132307
|
+
const targetAgent = event.target_agent ?? event.agent_name;
|
|
132257
132308
|
if (event.reservation_ids && event.reservation_ids.length > 0) {
|
|
132258
132309
|
await db2.update(reservationsTable2).set({ released_at: event.timestamp }).where(inArray2(reservationsTable2.id, event.reservation_ids));
|
|
132259
132310
|
} else if (event.paths && event.paths.length > 0) {
|
|
132260
|
-
await db2.update(reservationsTable2).set({ released_at: event.timestamp }).where(and32(eq2(reservationsTable2.project_key, event.project_key), eq2(reservationsTable2.agent_name,
|
|
132311
|
+
await db2.update(reservationsTable2).set({ released_at: event.timestamp }).where(and32(eq2(reservationsTable2.project_key, event.project_key), eq2(reservationsTable2.agent_name, targetAgent), inArray2(reservationsTable2.path_pattern, event.paths), sql2`${reservationsTable2.released_at} IS NULL`));
|
|
132312
|
+
} else if (event.release_all) {
|
|
132313
|
+
await db2.update(reservationsTable2).set({ released_at: event.timestamp }).where(and32(eq2(reservationsTable2.project_key, event.project_key), sql2`${reservationsTable2.released_at} IS NULL`));
|
|
132261
132314
|
} else {
|
|
132262
|
-
await db2.update(reservationsTable2).set({ released_at: event.timestamp }).where(and32(eq2(reservationsTable2.project_key, event.project_key), eq2(reservationsTable2.agent_name,
|
|
132315
|
+
await db2.update(reservationsTable2).set({ released_at: event.timestamp }).where(and32(eq2(reservationsTable2.project_key, event.project_key), eq2(reservationsTable2.agent_name, targetAgent), sql2`${reservationsTable2.released_at} IS NULL`));
|
|
132263
132316
|
}
|
|
132264
132317
|
}
|
|
132265
132318
|
async function handleDecompositionGeneratedDrizzle2(db2, event) {
|
|
@@ -132663,6 +132716,36 @@ async function releaseSwarmFiles2(options2) {
|
|
|
132663
132716
|
releasedAt: Date.now()
|
|
132664
132717
|
};
|
|
132665
132718
|
}
|
|
132719
|
+
async function releaseAllSwarmFiles2(options2) {
|
|
132720
|
+
const { projectPath, actorName, dbOverride } = options2;
|
|
132721
|
+
const currentReservations = await getActiveReservations22(projectPath, projectPath, undefined, dbOverride);
|
|
132722
|
+
const releaseCount = currentReservations.length;
|
|
132723
|
+
await appendEvent3(createEvent2("file_released", {
|
|
132724
|
+
project_key: projectPath,
|
|
132725
|
+
agent_name: actorName,
|
|
132726
|
+
release_all: true,
|
|
132727
|
+
file_count: releaseCount
|
|
132728
|
+
}), projectPath, dbOverride);
|
|
132729
|
+
return {
|
|
132730
|
+
released: releaseCount,
|
|
132731
|
+
releasedAt: Date.now()
|
|
132732
|
+
};
|
|
132733
|
+
}
|
|
132734
|
+
async function releaseSwarmFilesForAgent2(options2) {
|
|
132735
|
+
const { projectPath, actorName, targetAgent, dbOverride } = options2;
|
|
132736
|
+
const currentReservations = await getActiveReservations22(projectPath, projectPath, targetAgent, dbOverride);
|
|
132737
|
+
const releaseCount = currentReservations.length;
|
|
132738
|
+
await appendEvent3(createEvent2("file_released", {
|
|
132739
|
+
project_key: projectPath,
|
|
132740
|
+
agent_name: actorName,
|
|
132741
|
+
target_agent: targetAgent,
|
|
132742
|
+
file_count: releaseCount
|
|
132743
|
+
}), projectPath, dbOverride);
|
|
132744
|
+
return {
|
|
132745
|
+
released: releaseCount,
|
|
132746
|
+
releasedAt: Date.now()
|
|
132747
|
+
};
|
|
132748
|
+
}
|
|
132666
132749
|
async function acknowledgeSwarmMessage2(options2) {
|
|
132667
132750
|
const { projectPath, messageId, agentName, dbOverride } = options2;
|
|
132668
132751
|
const timestamp = Date.now();
|
|
@@ -133667,14 +133750,18 @@ async function handleFileReserved2(db2, event) {
|
|
|
133667
133750
|
async function handleFileReleased2(db2, event) {
|
|
133668
133751
|
if (event.type !== "file_released")
|
|
133669
133752
|
return;
|
|
133753
|
+
const targetAgent = event.target_agent ?? event.agent_name;
|
|
133670
133754
|
if (event.reservation_ids && event.reservation_ids.length > 0) {
|
|
133671
133755
|
await db2.query(`UPDATE reservations SET released_at = $1 WHERE id = ANY($2)`, [event.timestamp, event.reservation_ids]);
|
|
133672
133756
|
} else if (event.paths && event.paths.length > 0) {
|
|
133673
133757
|
await db2.query(`UPDATE reservations SET released_at = $1
|
|
133674
|
-
WHERE project_key = $2 AND agent_name = $3 AND path_pattern = ANY($4) AND released_at IS NULL`, [event.timestamp, event.project_key,
|
|
133758
|
+
WHERE project_key = $2 AND agent_name = $3 AND path_pattern = ANY($4) AND released_at IS NULL`, [event.timestamp, event.project_key, targetAgent, event.paths]);
|
|
133759
|
+
} else if (event.release_all) {
|
|
133760
|
+
await db2.query(`UPDATE reservations SET released_at = $1
|
|
133761
|
+
WHERE project_key = $2 AND released_at IS NULL`, [event.timestamp, event.project_key]);
|
|
133675
133762
|
} else {
|
|
133676
133763
|
await db2.query(`UPDATE reservations SET released_at = $1
|
|
133677
|
-
WHERE project_key = $2 AND agent_name = $3 AND released_at IS NULL`, [event.timestamp, event.project_key,
|
|
133764
|
+
WHERE project_key = $2 AND agent_name = $3 AND released_at IS NULL`, [event.timestamp, event.project_key, targetAgent]);
|
|
133678
133765
|
}
|
|
133679
133766
|
}
|
|
133680
133767
|
async function handleDecompositionGenerated2(db2, event) {
|
|
@@ -210497,6 +210584,8 @@ ${stack.split(`
|
|
|
210497
210584
|
FileReleasedEventSchema2 = BaseEventSchema2.extend({
|
|
210498
210585
|
type: exports_external6.literal("file_released"),
|
|
210499
210586
|
agent_name: exports_external6.string(),
|
|
210587
|
+
target_agent: exports_external6.string().optional(),
|
|
210588
|
+
release_all: exports_external6.boolean().optional(),
|
|
210500
210589
|
paths: exports_external6.array(exports_external6.string()).optional(),
|
|
210501
210590
|
reservation_ids: exports_external6.array(exports_external6.number()).optional(),
|
|
210502
210591
|
lock_holder_ids: exports_external6.array(exports_external6.string()).optional(),
|
|
@@ -214595,8 +214684,7 @@ ${stack.split(`
|
|
|
214595
214684
|
project_key: text2("project_key").notNull(),
|
|
214596
214685
|
timestamp: integer42("timestamp").notNull(),
|
|
214597
214686
|
sequence: integer42("sequence").generatedAlwaysAs(sql2`id`),
|
|
214598
|
-
data: text2("data").notNull()
|
|
214599
|
-
created_at: text2("created_at").default("datetime('now')")
|
|
214687
|
+
data: text2("data").notNull()
|
|
214600
214688
|
}, (table5) => ({
|
|
214601
214689
|
projectKeyIdx: index2("idx_events_project_key").on(table5.project_key),
|
|
214602
214690
|
typeIdx: index2("idx_events_type").on(table5.type),
|
|
@@ -214727,8 +214815,7 @@ ${stack.split(`
|
|
|
214727
214815
|
precedent_cited: text2("precedent_cited"),
|
|
214728
214816
|
outcome_event_id: integer42("outcome_event_id"),
|
|
214729
214817
|
quality_score: real2("quality_score"),
|
|
214730
|
-
timestamp: integer42("timestamp").notNull()
|
|
214731
|
-
created_at: text2("created_at").default("(datetime('now'))")
|
|
214818
|
+
timestamp: integer42("timestamp").notNull()
|
|
214732
214819
|
}, (table5) => ({
|
|
214733
214820
|
epicIdx: index2("idx_decision_traces_epic").on(table5.epic_id),
|
|
214734
214821
|
typeIdx: index2("idx_decision_traces_type").on(table5.decision_type),
|
|
@@ -214742,8 +214829,7 @@ ${stack.split(`
|
|
|
214742
214829
|
target_entity_id: text2("target_entity_id").notNull(),
|
|
214743
214830
|
link_type: text2("link_type").notNull(),
|
|
214744
214831
|
strength: real2("strength").default(1),
|
|
214745
|
-
context: text2("context")
|
|
214746
|
-
created_at: text2("created_at").default("(datetime('now'))")
|
|
214832
|
+
context: text2("context")
|
|
214747
214833
|
}, (table5) => ({
|
|
214748
214834
|
sourceIdx: index2("idx_entity_links_source").on(table5.source_decision_id),
|
|
214749
214835
|
targetIdx: index2("idx_entity_links_target").on(table5.target_entity_type, table5.target_entity_id),
|
|
@@ -223507,7 +223593,9 @@ ${stack.split(`
|
|
|
223507
223593
|
__export5(exports_swarm_mail2, {
|
|
223508
223594
|
sendSwarmMessage: () => sendSwarmMessage2,
|
|
223509
223595
|
reserveSwarmFiles: () => reserveSwarmFiles2,
|
|
223596
|
+
releaseSwarmFilesForAgent: () => releaseSwarmFilesForAgent2,
|
|
223510
223597
|
releaseSwarmFiles: () => releaseSwarmFiles2,
|
|
223598
|
+
releaseAllSwarmFiles: () => releaseAllSwarmFiles2,
|
|
223511
223599
|
readSwarmMessage: () => readSwarmMessage2,
|
|
223512
223600
|
initSwarmAgent: () => initSwarmAgent2,
|
|
223513
223601
|
getSwarmInbox: () => getSwarmInbox2,
|
|
@@ -224513,7 +224601,9 @@ ${stack.split(`
|
|
|
224513
224601
|
rollbackTo: () => rollbackTo2,
|
|
224514
224602
|
reserveSwarmFiles: () => reserveSwarmFiles2,
|
|
224515
224603
|
reserveAgentFiles: () => reserveAgentFiles2,
|
|
224604
|
+
releaseSwarmFilesForAgent: () => releaseSwarmFilesForAgent2,
|
|
224516
224605
|
releaseSwarmFiles: () => releaseSwarmFiles2,
|
|
224606
|
+
releaseAllSwarmFiles: () => releaseAllSwarmFiles2,
|
|
224517
224607
|
releaseAgentFiles: () => releaseAgentFiles2,
|
|
224518
224608
|
readSwarmMessage: () => readSwarmMessage2,
|
|
224519
224609
|
readEvents: () => readEvents3,
|
|
@@ -231935,7 +232025,7 @@ Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the toke
|
|
|
231935
232025
|
init_schema2();
|
|
231936
232026
|
init_worktree2();
|
|
231937
232027
|
TABLE_COLUMNS2 = {
|
|
231938
|
-
events: "type, project_key, timestamp, data
|
|
232028
|
+
events: "type, project_key, timestamp, data",
|
|
231939
232029
|
agents: "project_key, name, program, model, task_description, registered_at, last_active_at",
|
|
231940
232030
|
messages: "project_key, from_agent, subject, body, thread_id, importance, ack_required, created_at",
|
|
231941
232031
|
message_recipients: "message_id, agent_name, read_at, acked_at",
|
|
@@ -347573,29 +347663,6 @@ var toolCheckers = {
|
|
|
347573
347663
|
};
|
|
347574
347664
|
}
|
|
347575
347665
|
},
|
|
347576
|
-
ubs: async () => {
|
|
347577
|
-
const exists9 = await commandExists("ubs");
|
|
347578
|
-
if (!exists9) {
|
|
347579
|
-
return {
|
|
347580
|
-
available: false,
|
|
347581
|
-
checkedAt: new Date().toISOString(),
|
|
347582
|
-
error: "ubs command not found"
|
|
347583
|
-
};
|
|
347584
|
-
}
|
|
347585
|
-
try {
|
|
347586
|
-
const result = await Bun.$`ubs doctor`.quiet().nothrow();
|
|
347587
|
-
return {
|
|
347588
|
-
available: result.exitCode === 0,
|
|
347589
|
-
checkedAt: new Date().toISOString()
|
|
347590
|
-
};
|
|
347591
|
-
} catch (e) {
|
|
347592
|
-
return {
|
|
347593
|
-
available: false,
|
|
347594
|
-
checkedAt: new Date().toISOString(),
|
|
347595
|
-
error: String(e)
|
|
347596
|
-
};
|
|
347597
|
-
}
|
|
347598
|
-
},
|
|
347599
347666
|
hive: async () => {
|
|
347600
347667
|
const exists9 = await commandExists("hive");
|
|
347601
347668
|
if (!exists9) {
|
|
@@ -347656,7 +347723,6 @@ var fallbackBehaviors = {
|
|
|
347656
347723
|
"semantic-memory": "Learning data stored in-memory only (lost on session end)",
|
|
347657
347724
|
cass: "Decomposition proceeds without historical context from past sessions",
|
|
347658
347725
|
hivemind: "Unified memory unavailable - learnings stored in-memory only, no session history search",
|
|
347659
|
-
ubs: "Subtask completion skips bug scanning - manual review recommended",
|
|
347660
347726
|
hive: "Swarm cannot track issues - task coordination will be less reliable",
|
|
347661
347727
|
beads: "DEPRECATED: Use hive instead. Swarm cannot track issues - task coordination will be less reliable",
|
|
347662
347728
|
"swarm-mail": "Multi-agent coordination disabled - file conflicts possible if multiple agents active",
|
|
@@ -347689,7 +347755,6 @@ async function checkAllTools() {
|
|
|
347689
347755
|
"semantic-memory",
|
|
347690
347756
|
"cass",
|
|
347691
347757
|
"hivemind",
|
|
347692
|
-
"ubs",
|
|
347693
347758
|
"hive",
|
|
347694
347759
|
"beads",
|
|
347695
347760
|
"swarm-mail",
|
|
@@ -349759,9 +349824,6 @@ var swarm_init = tool2({
|
|
|
349759
349824
|
if (!availability.get("cass")?.status.available) {
|
|
349760
349825
|
degradedFeatures.push("historical context from past sessions");
|
|
349761
349826
|
}
|
|
349762
|
-
if (!availability.get("ubs")?.status.available) {
|
|
349763
|
-
degradedFeatures.push("pre-completion bug scanning");
|
|
349764
|
-
}
|
|
349765
349827
|
if (!availability.get("hivemind")?.status.available) {
|
|
349766
349828
|
degradedFeatures.push("persistent learning (using in-memory fallback)");
|
|
349767
349829
|
}
|
|
@@ -350575,7 +350637,7 @@ ${errorStack.slice(0, 1000)}
|
|
|
350575
350637
|
"",
|
|
350576
350638
|
`### Recovery Actions`,
|
|
350577
350639
|
"1. Check error message for specific issue",
|
|
350578
|
-
"2. Review failed step (
|
|
350640
|
+
"2. Review failed step (typecheck, tests, cell close, etc.)",
|
|
350579
350641
|
"3. Fix underlying issue or use skip flags if appropriate",
|
|
350580
350642
|
"4. Retry swarm_complete after fixing"
|
|
350581
350643
|
].filter(Boolean).join(`
|
|
@@ -351635,7 +351697,6 @@ swarm_complete(
|
|
|
351635
351697
|
\`\`\`
|
|
351636
351698
|
|
|
351637
351699
|
**This automatically:**
|
|
351638
|
-
- Runs UBS bug scan
|
|
351639
351700
|
- Releases file reservations
|
|
351640
351701
|
- Records learning signals
|
|
351641
351702
|
- Notifies coordinator
|
|
@@ -357394,29 +357455,6 @@ var toolCheckers2 = {
|
|
|
357394
357455
|
};
|
|
357395
357456
|
}
|
|
357396
357457
|
},
|
|
357397
|
-
ubs: async () => {
|
|
357398
|
-
const exists9 = await commandExists2("ubs");
|
|
357399
|
-
if (!exists9) {
|
|
357400
|
-
return {
|
|
357401
|
-
available: false,
|
|
357402
|
-
checkedAt: new Date().toISOString(),
|
|
357403
|
-
error: "ubs command not found"
|
|
357404
|
-
};
|
|
357405
|
-
}
|
|
357406
|
-
try {
|
|
357407
|
-
const result = await Bun.$`ubs doctor`.quiet().nothrow();
|
|
357408
|
-
return {
|
|
357409
|
-
available: result.exitCode === 0,
|
|
357410
|
-
checkedAt: new Date().toISOString()
|
|
357411
|
-
};
|
|
357412
|
-
} catch (e) {
|
|
357413
|
-
return {
|
|
357414
|
-
available: false,
|
|
357415
|
-
checkedAt: new Date().toISOString(),
|
|
357416
|
-
error: String(e)
|
|
357417
|
-
};
|
|
357418
|
-
}
|
|
357419
|
-
},
|
|
357420
357458
|
hive: async () => {
|
|
357421
357459
|
const exists9 = await commandExists2("hive");
|
|
357422
357460
|
if (!exists9) {
|
|
@@ -357477,7 +357515,6 @@ var fallbackBehaviors2 = {
|
|
|
357477
357515
|
"semantic-memory": "Learning data stored in-memory only (lost on session end)",
|
|
357478
357516
|
cass: "Decomposition proceeds without historical context from past sessions",
|
|
357479
357517
|
hivemind: "Unified memory unavailable - learnings stored in-memory only, no session history search",
|
|
357480
|
-
ubs: "Subtask completion skips bug scanning - manual review recommended",
|
|
357481
357518
|
hive: "Swarm cannot track issues - task coordination will be less reliable",
|
|
357482
357519
|
beads: "DEPRECATED: Use hive instead. Swarm cannot track issues - task coordination will be less reliable",
|
|
357483
357520
|
"swarm-mail": "Multi-agent coordination disabled - file conflicts possible if multiple agents active",
|
|
@@ -357510,7 +357547,6 @@ async function checkAllTools2() {
|
|
|
357510
357547
|
"semantic-memory",
|
|
357511
357548
|
"cass",
|
|
357512
357549
|
"hivemind",
|
|
357513
|
-
"ubs",
|
|
357514
357550
|
"hive",
|
|
357515
357551
|
"beads",
|
|
357516
357552
|
"swarm-mail",
|
|
@@ -358882,6 +358918,67 @@ var swarmmail_release = tool3({
|
|
|
358882
358918
|
}
|
|
358883
358919
|
}
|
|
358884
358920
|
});
|
|
358921
|
+
var swarmmail_release_all = tool3({
|
|
358922
|
+
description: "Release all file reservations in the project (coordinator override)",
|
|
358923
|
+
args: {},
|
|
358924
|
+
async execute(_args, ctx) {
|
|
358925
|
+
const sessionID = ctx.sessionID || "default";
|
|
358926
|
+
const state = loadSessionState2(sessionID);
|
|
358927
|
+
if (!state) {
|
|
358928
|
+
return JSON.stringify({ error: "Session not initialized. Call swarmmail_init first." }, null, 2);
|
|
358929
|
+
}
|
|
358930
|
+
try {
|
|
358931
|
+
const result = await releaseAllSwarmFiles({
|
|
358932
|
+
projectPath: state.projectKey,
|
|
358933
|
+
actorName: state.agentName
|
|
358934
|
+
});
|
|
358935
|
+
state.reservations = [];
|
|
358936
|
+
saveSessionState2(sessionID, state);
|
|
358937
|
+
return JSON.stringify({
|
|
358938
|
+
released: result.released,
|
|
358939
|
+
released_at: result.releasedAt,
|
|
358940
|
+
release_all: true
|
|
358941
|
+
}, null, 2);
|
|
358942
|
+
} catch (error56) {
|
|
358943
|
+
return JSON.stringify({
|
|
358944
|
+
error: `Failed to release all files: ${error56 instanceof Error ? error56.message : String(error56)}`
|
|
358945
|
+
}, null, 2);
|
|
358946
|
+
}
|
|
358947
|
+
}
|
|
358948
|
+
});
|
|
358949
|
+
var swarmmail_release_agent = tool3({
|
|
358950
|
+
description: "Release all file reservations for a specific agent (coordinator override)",
|
|
358951
|
+
args: {
|
|
358952
|
+
agent_name: tool3.schema.string().describe("Target agent name")
|
|
358953
|
+
},
|
|
358954
|
+
async execute(args5, ctx) {
|
|
358955
|
+
const sessionID = ctx.sessionID || "default";
|
|
358956
|
+
const state = loadSessionState2(sessionID);
|
|
358957
|
+
if (!state) {
|
|
358958
|
+
return JSON.stringify({ error: "Session not initialized. Call swarmmail_init first." }, null, 2);
|
|
358959
|
+
}
|
|
358960
|
+
try {
|
|
358961
|
+
const result = await releaseSwarmFilesForAgent({
|
|
358962
|
+
projectPath: state.projectKey,
|
|
358963
|
+
actorName: state.agentName,
|
|
358964
|
+
targetAgent: args5.agent_name
|
|
358965
|
+
});
|
|
358966
|
+
if (args5.agent_name === state.agentName) {
|
|
358967
|
+
state.reservations = [];
|
|
358968
|
+
saveSessionState2(sessionID, state);
|
|
358969
|
+
}
|
|
358970
|
+
return JSON.stringify({
|
|
358971
|
+
released: result.released,
|
|
358972
|
+
released_at: result.releasedAt,
|
|
358973
|
+
target_agent: args5.agent_name
|
|
358974
|
+
}, null, 2);
|
|
358975
|
+
} catch (error56) {
|
|
358976
|
+
return JSON.stringify({
|
|
358977
|
+
error: `Failed to release files for agent: ${error56 instanceof Error ? error56.message : String(error56)}`
|
|
358978
|
+
}, null, 2);
|
|
358979
|
+
}
|
|
358980
|
+
}
|
|
358981
|
+
});
|
|
358885
358982
|
var swarmmail_ack = tool3({
|
|
358886
358983
|
description: "Acknowledge a message (for messages that require acknowledgement)",
|
|
358887
358984
|
args: {
|
|
@@ -358944,6 +359041,8 @@ var swarmMailTools = {
|
|
|
358944
359041
|
swarmmail_read_message,
|
|
358945
359042
|
swarmmail_reserve,
|
|
358946
359043
|
swarmmail_release,
|
|
359044
|
+
swarmmail_release_all,
|
|
359045
|
+
swarmmail_release_agent,
|
|
358947
359046
|
swarmmail_ack,
|
|
358948
359047
|
swarmmail_health
|
|
358949
359048
|
};
|
|
@@ -362767,9 +362866,6 @@ var swarm_init2 = tool3({
|
|
|
362767
362866
|
if (!availability.get("cass")?.status.available) {
|
|
362768
362867
|
degradedFeatures.push("historical context from past sessions");
|
|
362769
362868
|
}
|
|
362770
|
-
if (!availability.get("ubs")?.status.available) {
|
|
362771
|
-
degradedFeatures.push("pre-completion bug scanning");
|
|
362772
|
-
}
|
|
362773
362869
|
if (!availability.get("hivemind")?.status.available) {
|
|
362774
362870
|
degradedFeatures.push("persistent learning (using in-memory fallback)");
|
|
362775
362871
|
}
|
|
@@ -363583,7 +363679,7 @@ ${errorStack.slice(0, 1000)}
|
|
|
363583
363679
|
"",
|
|
363584
363680
|
`### Recovery Actions`,
|
|
363585
363681
|
"1. Check error message for specific issue",
|
|
363586
|
-
"2. Review failed step (
|
|
363682
|
+
"2. Review failed step (typecheck, tests, cell close, etc.)",
|
|
363587
363683
|
"3. Fix underlying issue or use skip flags if appropriate",
|
|
363588
363684
|
"4. Retry swarm_complete after fixing"
|
|
363589
363685
|
].filter(Boolean).join(`
|
|
@@ -364594,7 +364690,6 @@ swarm_complete(
|
|
|
364594
364690
|
\`\`\`
|
|
364595
364691
|
|
|
364596
364692
|
**This automatically:**
|
|
364597
|
-
- Runs UBS bug scan
|
|
364598
364693
|
- Releases file reservations
|
|
364599
364694
|
- Records learning signals
|
|
364600
364695
|
- Notifies coordinator
|
|
@@ -368266,15 +368361,6 @@ var DEPENDENCIES = [
|
|
|
368266
368361
|
installType: "manual",
|
|
368267
368362
|
description: "Indexes and searches AI coding agent history for context"
|
|
368268
368363
|
},
|
|
368269
|
-
{
|
|
368270
|
-
name: "UBS (Ultimate Bug Scanner)",
|
|
368271
|
-
command: "ubs",
|
|
368272
|
-
checkArgs: ["--help"],
|
|
368273
|
-
required: false,
|
|
368274
|
-
install: "https://github.com/Dicklesworthstone/ultimate_bug_scanner",
|
|
368275
|
-
installType: "manual",
|
|
368276
|
-
description: "AI-powered static analysis for pre-completion bug scanning"
|
|
368277
|
-
},
|
|
368278
368364
|
{
|
|
368279
368365
|
name: "Ollama",
|
|
368280
368366
|
command: "ollama",
|
|
@@ -368986,7 +369072,7 @@ skills_list()
|
|
|
368986
369072
|
# Check what MCP servers are available (look for context7, pdf-brain, fetch, etc.)
|
|
368987
369073
|
# Note: No direct MCP listing tool - infer from task context or ask coordinator
|
|
368988
369074
|
|
|
368989
|
-
# Check for CLI tools if relevant (bd, cass,
|
|
369075
|
+
# Check for CLI tools if relevant (bd, cass, ollama)
|
|
368990
369076
|
# Use Bash tool to check: which <tool-name>
|
|
368991
369077
|
\`\`\`
|
|
368992
369078
|
|
|
@@ -369115,7 +369201,6 @@ bash("which <tool>", description="Check if <tool> is available")
|
|
|
369115
369201
|
|
|
369116
369202
|
# Examples:
|
|
369117
369203
|
bash("which cass", description="Check CASS availability")
|
|
369118
|
-
bash("which ubs", description="Check UBS availability")
|
|
369119
369204
|
bash("ollama --version", description="Check Ollama availability")
|
|
369120
369205
|
\`\`\`
|
|
369121
369206
|
|
|
@@ -369178,8 +369263,6 @@ function getFixCommand(dep) {
|
|
|
369178
369263
|
return "brew install redis && brew services start redis";
|
|
369179
369264
|
case "CASS (Coding Agent Session Search)":
|
|
369180
369265
|
return "See: https://github.com/Dicklesworthstone/coding_agent_session_search";
|
|
369181
|
-
case "UBS (Ultimate Bug Scanner)":
|
|
369182
|
-
return "See: https://github.com/Dicklesworthstone/ultimate_bug_scanner";
|
|
369183
369266
|
default:
|
|
369184
369267
|
return dep.installType !== "manual" ? dep.install : null;
|
|
369185
369268
|
}
|
|
@@ -369236,7 +369319,7 @@ async function doctor(debug = false) {
|
|
|
369236
369319
|
const optionalMissing = optional4.filter((r) => !r.available);
|
|
369237
369320
|
p4.log.step("Skills:");
|
|
369238
369321
|
const configDir = join57(homedir16(), ".config", "opencode");
|
|
369239
|
-
const globalSkillsPath = join57(configDir, "
|
|
369322
|
+
const globalSkillsPath = join57(configDir, "skill");
|
|
369240
369323
|
const bundledSkillsPath = join57(__dirname2, "..", "global-skills");
|
|
369241
369324
|
if (existsSync37(globalSkillsPath)) {
|
|
369242
369325
|
try {
|
|
@@ -370073,7 +370156,7 @@ function config8() {
|
|
|
370073
370156
|
const plannerAgentPath = join57(agentDir, "swarm-planner.md");
|
|
370074
370157
|
const workerAgentPath = join57(agentDir, "swarm-worker.md");
|
|
370075
370158
|
const researcherAgentPath = join57(agentDir, "swarm-researcher.md");
|
|
370076
|
-
const globalSkillsPath = join57(configDir, "
|
|
370159
|
+
const globalSkillsPath = join57(configDir, "skill");
|
|
370077
370160
|
console.log(yellow3(BANNER));
|
|
370078
370161
|
console.log(dim4(" " + TAGLINE + " v" + VERSION6));
|
|
370079
370162
|
console.log();
|