@heretek-ai/epistemic-swarm 1.0.4 → 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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/server.ts +8 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heretek-ai/epistemic-swarm",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Epistemic Swarm: an AI build factory for OpenCode v2 — grill, research, spec, build, QA and release, gated mechanically.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -41,7 +41,7 @@
41
41
  "test": "bun test"
42
42
  },
43
43
  "dependencies": {
44
- "@heretek-ai/es-core": "1.0.4",
44
+ "@heretek-ai/es-core": "1.0.5",
45
45
  "@opencode/plugin": "2.0.24"
46
46
  },
47
47
  "devDependencies": {
package/src/server.ts CHANGED
@@ -170,8 +170,15 @@ export default Plugin.define({
170
170
  name: "factory",
171
171
  description: "Drive the build factory from its current stage (Epistemic Swarm)",
172
172
  execute: async ({ sessionID, prompt, delivery }) => {
173
- await ctx.session.switchAgent({ sessionID, agent: "factory" } as any)
174
173
  const state = await runtime.factory.read()
174
+ if (!state) {
175
+ await ctx.session.synthetic({
176
+ sessionID,
177
+ text: "No factory run here yet — run /grill first.",
178
+ } as any)
179
+ return
180
+ }
181
+ await ctx.session.switchAgent({ sessionID, agent: "factory" } as any)
175
182
  await ctx.session.prompt({
176
183
  ...prompt,
177
184
  sessionID,