@igorjpimenta/winch-opencode 2026.11.13-beta.1 → 2026.11.19-beta.1
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/dispatch.js +228 -0
- package/hooks.js +2 -2
- package/identity.js +6 -2
- package/index.js +85 -9
- package/package.json +4 -3
package/dispatch.js
ADDED
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
// dispatch.js — local HTTP receiver plus recovery reconciliation for OpenCode.
|
|
2
|
+
//
|
|
3
|
+
// Winch POSTs a wake to this plugin's loopback listener and gets 202. The
|
|
4
|
+
// listener only starts a turn; the MCP claim is the work guard, so duplicate
|
|
5
|
+
// delivery is harmless. The reconciler handles restarts.
|
|
6
|
+
|
|
7
|
+
import http from "node:http";
|
|
8
|
+
|
|
9
|
+
export const DEFAULT_DISPATCH_URL = "http://127.0.0.1:38293";
|
|
10
|
+
const MAX_BODY_BYTES = 1024 * 1024;
|
|
11
|
+
const INFLIGHT_TTL_MS = 35 * 60 * 1000;
|
|
12
|
+
|
|
13
|
+
function readJson(req, res) {
|
|
14
|
+
return (async () => {
|
|
15
|
+
let size = 0;
|
|
16
|
+
let raw = "";
|
|
17
|
+
for await (const chunk of req) {
|
|
18
|
+
size += chunk.length;
|
|
19
|
+
if (size > MAX_BODY_BYTES) {
|
|
20
|
+
res.statusCode = 413;
|
|
21
|
+
res.end(JSON.stringify({ error: "body too large" }));
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
raw += chunk;
|
|
25
|
+
}
|
|
26
|
+
if (!raw) return {};
|
|
27
|
+
try {
|
|
28
|
+
return JSON.parse(raw);
|
|
29
|
+
} catch {
|
|
30
|
+
res.statusCode = 400;
|
|
31
|
+
res.end(JSON.stringify({ error: "invalid json body" }));
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
})();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function json(res, status, body) {
|
|
38
|
+
res.statusCode = status;
|
|
39
|
+
res.setHeader("content-type", "application/json");
|
|
40
|
+
res.end(JSON.stringify(body));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function dispatchAuthHeaders() {
|
|
44
|
+
const headers = { "content-type": "application/json" };
|
|
45
|
+
const token = String(process.env.WINCH_DISPATCH_TOKEN ?? "").trim();
|
|
46
|
+
if (token) headers.authorization = `Bearer ${token}`;
|
|
47
|
+
return headers;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function wakeMessage({ itemId, kind, admissionId, attemptNo, leaseEpoch }) {
|
|
51
|
+
if (kind === "story" || kind === "append" || kind === "review") {
|
|
52
|
+
return `Call backlog_accept_wake with admissionId "${admissionId}", attemptNo ${attemptNo}, and leaseEpoch ${leaseEpoch ?? 0} before working on ${itemId}.`;
|
|
53
|
+
}
|
|
54
|
+
return itemId;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export async function registerExecutor({ baseUrl, harness, consumerId, executorId, url, bearer, fresh = false, timeoutMs = 5000 }) {
|
|
58
|
+
const res = await fetch(`${String(baseUrl).replace(/\/+$/, "")}/dispatch/register`, {
|
|
59
|
+
method: "POST",
|
|
60
|
+
headers: dispatchAuthHeaders(),
|
|
61
|
+
body: JSON.stringify({ harness, consumerId, executorId, instanceId: executorId, url, bearer, fresh }),
|
|
62
|
+
signal: AbortSignal.timeout(timeoutMs),
|
|
63
|
+
});
|
|
64
|
+
if (!res.ok) throw new Error(`dispatch register ${res.status}`);
|
|
65
|
+
return res.json();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export async function recoverOnce({ baseUrl, harness, consumerId, executorId, wake, started, logger = console, timeoutMs = 5000 }) {
|
|
69
|
+
const res = await fetch(`${String(baseUrl).replace(/\/+$/, "")}/dispatch/recover`, {
|
|
70
|
+
method: "POST",
|
|
71
|
+
headers: dispatchAuthHeaders(),
|
|
72
|
+
body: JSON.stringify({ harness, consumerId, executorId }),
|
|
73
|
+
signal: AbortSignal.timeout(timeoutMs),
|
|
74
|
+
});
|
|
75
|
+
if (!res.ok) throw new Error(`dispatch recover ${res.status}`);
|
|
76
|
+
const body = await res.json();
|
|
77
|
+
const now = Date.now();
|
|
78
|
+
for (const [key, at] of started) if (now - at > INFLIGHT_TTL_MS) started.delete(key);
|
|
79
|
+
|
|
80
|
+
for (const row of body?.resume ?? []) {
|
|
81
|
+
if (!row?.task?.id) continue;
|
|
82
|
+
const key = `resume:${row.task.id}:${row.attemptId ?? "none"}`;
|
|
83
|
+
if (started.has(key)) continue;
|
|
84
|
+
started.set(key, now);
|
|
85
|
+
Promise.resolve(wake({
|
|
86
|
+
agent: row.task.assignee_agent,
|
|
87
|
+
message: resumePrompt(row),
|
|
88
|
+
sessionKey: row.task.id,
|
|
89
|
+
kind: "resume",
|
|
90
|
+
attemptId: row.attemptId,
|
|
91
|
+
})).catch((err) => {
|
|
92
|
+
started.delete(key);
|
|
93
|
+
logger?.warn?.(`winch: resume ${row.task.id} failed: ${err?.message ?? err}`);
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
for (const row of body?.start ?? []) {
|
|
98
|
+
if (!row?.admissionId || !row?.itemId) continue;
|
|
99
|
+
const key = `start:${row.admissionId}:${row.attemptNo ?? "none"}`;
|
|
100
|
+
if (started.has(key)) continue;
|
|
101
|
+
started.set(key, now);
|
|
102
|
+
Promise.resolve(wake({
|
|
103
|
+
agent: row.agent,
|
|
104
|
+
message: wakeMessage(row),
|
|
105
|
+
kind: row.kind,
|
|
106
|
+
admissionId: row.admissionId,
|
|
107
|
+
attemptNo: row.attemptNo,
|
|
108
|
+
leaseEpoch: row.leaseEpoch ?? 0,
|
|
109
|
+
})).catch((err) => {
|
|
110
|
+
started.delete(key);
|
|
111
|
+
logger?.warn?.(`winch: wake ${row.itemId} failed: ${err?.message ?? err}`);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
return body;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function resumePrompt(row) {
|
|
118
|
+
const taskId = row?.task?.id ?? "(unknown)";
|
|
119
|
+
const attemptId = row?.attemptId ?? null;
|
|
120
|
+
const leaseEpoch = row?.leaseEpoch ?? 0;
|
|
121
|
+
if (!attemptId) {
|
|
122
|
+
return `Repair ${taskId}. The task is in_progress but has no live attempt. Do not call backlog_claim. Call backlog_update with taskId "${taskId}", heartbeat true, and no attemptId so the store repairs the missing attempt. If it returns stale_claim, stop. Then continue from the existing brief.`;
|
|
123
|
+
}
|
|
124
|
+
return `Resume ${taskId} attempt ${attemptId} leaseEpoch ${leaseEpoch}. You already own this task. Do not call backlog_claim. Call backlog_update with taskId "${taskId}", attemptId "${attemptId}", leaseEpoch ${leaseEpoch}, heartbeat true. If it returns stale_claim, stop. Then continue from the existing brief.`;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function startDispatch({ baseUrl = DEFAULT_DISPATCH_URL, harness, consumerId = null, executorId, bearer, wake, logger = console, host = "127.0.0.1", port = 0, reconcileMs = 30000 } = {}) {
|
|
128
|
+
if (!executorId || !bearer) throw new Error("dispatch needs an executor id and bearer");
|
|
129
|
+
const subscriptionId = consumerId || executorId;
|
|
130
|
+
const started = new Map();
|
|
131
|
+
let closed = false;
|
|
132
|
+
let timer = null;
|
|
133
|
+
let listener = null;
|
|
134
|
+
|
|
135
|
+
const server = http.createServer(async (req, res) => {
|
|
136
|
+
if (req.method !== "POST" || req.url !== "/wake") {
|
|
137
|
+
json(res, 404, { error: "not found" });
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
const auth = req.headers?.authorization ?? "";
|
|
141
|
+
if (!auth.startsWith("Bearer ") || auth.slice(7) !== bearer) {
|
|
142
|
+
json(res, 401, { error: "unauthorized" });
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
const body = await readJson(req, res);
|
|
146
|
+
if (body === undefined) return;
|
|
147
|
+
if (body?.type === "ping") {
|
|
148
|
+
json(res, 200, { ok: true, test: true });
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
if (body?.type !== "wake" || !body.admissionId || !body.itemId || !body.agent) {
|
|
152
|
+
json(res, 400, { error: "wake payload requires admissionId, itemId, agent" });
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
if (body.execution === "standby") {
|
|
156
|
+
json(res, 202, { ok: true, admissionId: body.admissionId, standby: true });
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
const key = `start:${body.admissionId}:${body.attemptNo ?? "none"}`;
|
|
160
|
+
if (started.has(key)) {
|
|
161
|
+
json(res, 202, { ok: true, admissionId: body.admissionId, duplicate: true });
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
started.set(key, Date.now());
|
|
165
|
+
Promise.resolve(wake({
|
|
166
|
+
agent: body.agent,
|
|
167
|
+
message: wakeMessage(body),
|
|
168
|
+
kind: body.kind,
|
|
169
|
+
admissionId: body.admissionId,
|
|
170
|
+
attemptNo: body.attemptNo,
|
|
171
|
+
leaseEpoch: body.leaseEpoch ?? 0,
|
|
172
|
+
})).catch((err) => {
|
|
173
|
+
started.delete(key);
|
|
174
|
+
logger?.warn?.(`winch: wake ${body.itemId} failed: ${err?.message ?? err}`);
|
|
175
|
+
});
|
|
176
|
+
json(res, 202, { ok: true, admissionId: body.admissionId });
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
let fresh = true;
|
|
180
|
+
const run = async () => {
|
|
181
|
+
if (closed) return;
|
|
182
|
+
try {
|
|
183
|
+
await registerExecutor({
|
|
184
|
+
baseUrl,
|
|
185
|
+
harness,
|
|
186
|
+
consumerId: subscriptionId,
|
|
187
|
+
executorId,
|
|
188
|
+
url: `http://${host}:${listener.address().port}/wake`,
|
|
189
|
+
bearer,
|
|
190
|
+
fresh,
|
|
191
|
+
});
|
|
192
|
+
fresh = false;
|
|
193
|
+
} catch (err) {
|
|
194
|
+
logger?.warn?.(`winch: dispatch register failed: ${err?.message ?? err}`);
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
try {
|
|
198
|
+
await recoverOnce({ baseUrl, harness, consumerId: subscriptionId, executorId, wake, started, logger });
|
|
199
|
+
} catch (err) {
|
|
200
|
+
logger?.warn?.(`winch: dispatch recover failed: ${err?.message ?? err}`);
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
const ready = new Promise((resolve, reject) => {
|
|
205
|
+
server.once("error", reject);
|
|
206
|
+
server.listen(port, host, () => {
|
|
207
|
+
listener = server;
|
|
208
|
+
void run();
|
|
209
|
+
if (Number(reconcileMs) > 0) {
|
|
210
|
+
timer = setInterval(() => { void run(); }, Number(reconcileMs));
|
|
211
|
+
timer.unref?.();
|
|
212
|
+
}
|
|
213
|
+
resolve({ port: listener.address().port, executorId, consumerId: subscriptionId });
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
return {
|
|
218
|
+
ready,
|
|
219
|
+
get executorId() { return executorId; },
|
|
220
|
+
get consumerId() { return subscriptionId; },
|
|
221
|
+
get port() { return listener?.address()?.port ?? null; },
|
|
222
|
+
close() {
|
|
223
|
+
closed = true;
|
|
224
|
+
if (timer) clearInterval(timer);
|
|
225
|
+
return new Promise((resolve) => server.close(() => resolve()));
|
|
226
|
+
},
|
|
227
|
+
};
|
|
228
|
+
}
|
package/hooks.js
CHANGED
|
@@ -2,7 +2,7 @@ import { stampWinchIdentity } from "./identity.js";
|
|
|
2
2
|
|
|
3
3
|
// The agent is not on the tool call, only the session: remember it from the
|
|
4
4
|
// chat events that carry both, then stamp the pair on every winch call.
|
|
5
|
-
export function createWinchHooks() {
|
|
5
|
+
export function createWinchHooks({ consumerId = null, instanceId = null } = {}) {
|
|
6
6
|
const agents = new Map();
|
|
7
7
|
|
|
8
8
|
return {
|
|
@@ -16,7 +16,7 @@ export function createWinchHooks() {
|
|
|
16
16
|
// Unconditional: when the agent is unknown the slot is blanked, so a
|
|
17
17
|
// model-supplied pair can never ride through as identity. Blank means
|
|
18
18
|
// unstamped, and the server refuses that rather than trusting it.
|
|
19
|
-
stampWinchIdentity(input, output, { agent: agents.get(input?.sessionID) ?? process.env.WINCH_AGENT ?? null });
|
|
19
|
+
stampWinchIdentity(input, output, { agent: agents.get(input?.sessionID) ?? process.env.WINCH_AGENT ?? null, consumerId, instanceId });
|
|
20
20
|
},
|
|
21
21
|
};
|
|
22
22
|
}
|
package/identity.js
CHANGED
|
@@ -7,7 +7,7 @@ export function isWinchTool(name) {
|
|
|
7
7
|
return typeof name === "string" && name.includes("winch");
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
export function stampWinchIdentity(input, output, { agent = null } = {}) {
|
|
10
|
+
export function stampWinchIdentity(input, output, { agent = null, consumerId = null, instanceId = null } = {}) {
|
|
11
11
|
if (!isWinchTool(input?.tool)) return false;
|
|
12
12
|
output.args = output.args ?? {};
|
|
13
13
|
// Overwrite, never merge: an unknown agent blanks the slot (unstamped),
|
|
@@ -15,16 +15,20 @@ export function stampWinchIdentity(input, output, { agent = null } = {}) {
|
|
|
15
15
|
// model-supplied identity never survives.
|
|
16
16
|
output.args.winch_agent = agent ?? "";
|
|
17
17
|
output.args.winch_session = input?.sessionID ?? "";
|
|
18
|
+
output.args.winch_consumer = consumerId ?? "";
|
|
19
|
+
output.args.winch_instance = instanceId ?? "";
|
|
18
20
|
return true;
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
// V2: the tool hook hands one mutable event instead of (input, output). Same
|
|
22
24
|
// rule — the pair is stamped unconditionally.
|
|
23
|
-
export function stampWinchEvent(event, agent) {
|
|
25
|
+
export function stampWinchEvent(event, agent, consumerId = null, instanceId = null) {
|
|
24
26
|
if (!isWinchTool(event?.tool)) return false;
|
|
25
27
|
const input = event.input && typeof event.input === "object" ? event.input : {};
|
|
26
28
|
event.input = input;
|
|
27
29
|
input.winch_agent = agent ?? "";
|
|
28
30
|
input.winch_session = event.sessionID ?? "";
|
|
31
|
+
input.winch_consumer = consumerId ?? "";
|
|
32
|
+
input.winch_instance = instanceId ?? "";
|
|
29
33
|
return true;
|
|
30
34
|
}
|
package/index.js
CHANGED
|
@@ -1,28 +1,104 @@
|
|
|
1
1
|
import { createWinchHooks } from "./hooks.js";
|
|
2
2
|
import { stampWinchEvent } from "./identity.js";
|
|
3
|
+
import { startDispatch, DEFAULT_DISPATCH_URL } from "./dispatch.js";
|
|
4
|
+
import { spawn } from "node:child_process";
|
|
5
|
+
import { hostname } from "node:os";
|
|
6
|
+
|
|
7
|
+
function opencodeWake({ agent, message }) {
|
|
8
|
+
return new Promise((resolve, reject) => {
|
|
9
|
+
const bin = process.env.OPENCODE_BIN || "opencode";
|
|
10
|
+
const child = spawn(bin, ["run", "--agent", agent, message], {
|
|
11
|
+
detached: true,
|
|
12
|
+
stdio: ["ignore", "ignore", "pipe"],
|
|
13
|
+
});
|
|
14
|
+
let stderr = "";
|
|
15
|
+
child.stderr?.on("data", (d) => { stderr = (stderr + d.toString()).slice(-2000); });
|
|
16
|
+
child.on("error", reject);
|
|
17
|
+
child.on("exit", (code) =>
|
|
18
|
+
code === 0 ? resolve() : reject(new Error(`exit ${code}${stderr ? `: ${stderr.trim().split("\n").slice(-2).join(" | ")}` : ""}`))
|
|
19
|
+
);
|
|
20
|
+
child.unref();
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function consumerIdFor(harness, cfg = {}) {
|
|
25
|
+
return cfg.winchConsumerId ?? process.env.WINCH_CONSUMER_ID ?? `${harness}:${hostname()}`;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function start({ cfg = {}, harness, logger }) {
|
|
29
|
+
const executorId = cfg.winchExecutorId ?? process.env.WINCH_EXECUTOR_ID;
|
|
30
|
+
const consumerId = consumerIdFor(harness, cfg);
|
|
31
|
+
const bearer = process.env.WINCH_WEBHOOK_BEARER;
|
|
32
|
+
if (!executorId || !bearer) {
|
|
33
|
+
logger?.warn?.("winch: dispatch needs WINCH_EXECUTOR_ID and WINCH_WEBHOOK_BEARER; receiver disabled");
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
const dispatch = startDispatch({
|
|
37
|
+
baseUrl: process.env.WINCH_DISPATCH_URL ?? DEFAULT_DISPATCH_URL,
|
|
38
|
+
harness,
|
|
39
|
+
consumerId,
|
|
40
|
+
executorId,
|
|
41
|
+
bearer,
|
|
42
|
+
wake: opencodeWake,
|
|
43
|
+
port: Number(cfg.dispatchPort ?? process.env.WINCH_DISPATCH_PORT ?? 0),
|
|
44
|
+
reconcileMs: Number(cfg.dispatchReconcileMs ?? process.env.WINCH_DISPATCH_RECONCILE_MS ?? 30000),
|
|
45
|
+
logger,
|
|
46
|
+
});
|
|
47
|
+
dispatch.ready.catch((err) => logger?.warn?.(`winch: dispatch listener failed: ${err?.message ?? err}`));
|
|
48
|
+
return dispatch;
|
|
49
|
+
}
|
|
3
50
|
|
|
4
51
|
// One package, two hosts: V1 calls server() and gets the object hooks; V2
|
|
5
|
-
// reads id/setup() and gets the domain hooks.
|
|
6
|
-
// separate — V1 mutates (input, output), V2 mutates one event — but both
|
|
7
|
-
// stamp the same unconditional identity pair.
|
|
52
|
+
// reads id/setup() and gets the domain hooks. Both stamp the same identity pair.
|
|
8
53
|
export default {
|
|
9
54
|
id: "winch-opencode",
|
|
10
55
|
async setup(ctx) {
|
|
11
56
|
// SessionContext (the "context" hook event) carries both sessionID and
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
57
|
+
// the session's agent; session.get() in this beta returns a projection
|
|
58
|
+
// without agent, so the request hook is the reliable source.
|
|
59
|
+
const cfg = ctx.options ?? {};
|
|
60
|
+
const harness = cfg.winchHarness ?? process.env.WINCH_HARNESS ?? "opencode";
|
|
61
|
+
const consumerId = consumerIdFor(harness, cfg);
|
|
62
|
+
const executorId = cfg.winchExecutorId ?? process.env.WINCH_EXECUTOR_ID ?? null;
|
|
63
|
+
const agents = new Map();
|
|
64
|
+
let dispatch = null;
|
|
65
|
+
const ensureDispatch = () => {
|
|
66
|
+
if (dispatch) return;
|
|
67
|
+
if (cfg.dispatchEnabled === false || process.env.WINCH_DISPATCH_ENABLED === "0") return;
|
|
68
|
+
dispatch = start({ cfg, harness, logger: console });
|
|
69
|
+
};
|
|
70
|
+
await ctx.session.hook("context", (event) => {
|
|
16
71
|
if (event?.sessionID && event.agent) agents.set(event.sessionID, event.agent);
|
|
72
|
+
ensureDispatch();
|
|
17
73
|
});
|
|
18
74
|
await ctx.tool.hook("execute.before", (event) => {
|
|
19
75
|
const agent = agents.get(event.sessionID) ?? process.env.WINCH_AGENT ?? null;
|
|
20
76
|
// Unconditional: unknown agent blanks the slot, the server refuses
|
|
21
77
|
// rather than trusting whatever the model wrote there.
|
|
22
|
-
stampWinchEvent(event, agent);
|
|
78
|
+
stampWinchEvent(event, agent, consumerId, executorId);
|
|
23
79
|
});
|
|
24
80
|
},
|
|
25
81
|
async server() {
|
|
26
|
-
|
|
82
|
+
const harness = process.env.WINCH_HARNESS ?? "opencode";
|
|
83
|
+
const consumerId = consumerIdFor(harness);
|
|
84
|
+
const executorId = process.env.WINCH_EXECUTOR_ID ?? null;
|
|
85
|
+
const hooks = createWinchHooks({ consumerId, instanceId: executorId });
|
|
86
|
+
let dispatch = null;
|
|
87
|
+
const ensureDispatch = () => {
|
|
88
|
+
if (dispatch) return;
|
|
89
|
+
if (process.env.WINCH_DISPATCH_ENABLED === "0") return;
|
|
90
|
+
dispatch = start({ cfg: {}, harness, logger: console });
|
|
91
|
+
};
|
|
92
|
+
const origMessage = hooks["chat.message"];
|
|
93
|
+
hooks["chat.message"] = async (input) => {
|
|
94
|
+
if (typeof origMessage === "function") await origMessage(input);
|
|
95
|
+
ensureDispatch();
|
|
96
|
+
};
|
|
97
|
+
const origParams = hooks["chat.params"];
|
|
98
|
+
hooks["chat.params"] = async (input) => {
|
|
99
|
+
if (typeof origParams === "function") await origParams(input);
|
|
100
|
+
ensureDispatch();
|
|
101
|
+
};
|
|
102
|
+
return hooks;
|
|
27
103
|
},
|
|
28
104
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@igorjpimenta/winch-opencode",
|
|
3
|
-
"version": "2026.11.
|
|
4
|
-
"description": "OpenCode companion for winch: stamps agent and session identity on winch tool calls
|
|
3
|
+
"version": "2026.11.19-beta.1",
|
|
4
|
+
"description": "OpenCode companion for winch: stamps agent and session identity on winch tool calls, receives HTTP dispatch wakes, and reconciles assigned in-progress work. No SDK dependency — a plain id/setup/server export.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"repository": {
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
"files": [
|
|
20
20
|
"index.js",
|
|
21
21
|
"hooks.js",
|
|
22
|
-
"identity.js"
|
|
22
|
+
"identity.js",
|
|
23
|
+
"dispatch.js"
|
|
23
24
|
],
|
|
24
25
|
"main": "index.js"
|
|
25
26
|
}
|