ticlawk 0.1.16-dev.31 → 0.1.16-dev.33
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/package.json +1 -1
- package/src/core/runtime-contract.mjs +0 -1
- package/src/runtimes/_shared/handbook/COMMUNICATION.md +1 -1
- package/src/runtimes/claude-code/index.mjs +0 -18
- package/src/runtimes/codex/index.mjs +0 -18
- package/src/runtimes/openclaw/index.mjs +0 -15
- package/src/runtimes/opencode/index.mjs +0 -18
- package/src/runtimes/pi/index.mjs +0 -18
- package/ticlawk.mjs +0 -30
package/package.json
CHANGED
|
@@ -55,7 +55,6 @@ import { normalizeServiceType } from './runtime-registry.mjs';
|
|
|
55
55
|
* @property {(inbound: any, ctx: RuntimeDeliveryContext) => Promise<boolean>} deliverTurn
|
|
56
56
|
* @property {(binding: any, ctx: { adapter: any, logger: any }) => (Promise<void>|void)} [onBindingUpdated]
|
|
57
57
|
* @property {(ctx: { adapter: any, getBinding: (bindingId: string) => any }) => (Promise<number>|number)} [recoverInFlight]
|
|
58
|
-
* @property {(binding: any, ctx: { adapter: any, logger: any }) => (Promise<number>|number)} [reconcileAfterRestart]
|
|
59
58
|
*/
|
|
60
59
|
|
|
61
60
|
/**
|
|
@@ -19,7 +19,7 @@ The reply target is the precise chat destination for this message. Treat it as a
|
|
|
19
19
|
|
|
20
20
|
- To reply, copy the reply target from the current incoming message exactly.
|
|
21
21
|
- Do not infer or rewrite the destination.
|
|
22
|
-
- Send chat replies with `ticlawk message send --target <target>`.
|
|
22
|
+
- Send chat replies with `ticlawk message send --target <target>`. Write the message body in natural language with normal paragraph breaks; do not use Markdown formatting.
|
|
23
23
|
- Use `--attach <path>` on `message send` when the user or group should receive a file.
|
|
24
24
|
- When reporting a result to a human, first decide whether the result itself is a file or artifact. If it is, attach it. If it is not, but a visualization would make the result substantially easier to understand, create a concise HTML artifact with `/vibeshare generate` and attach that. Do not create artifacts for ordinary text answers.
|
|
25
25
|
- Keep external messages clean and actionable: answer, instruction, blocker, decision request, or final result.
|
|
@@ -230,24 +230,6 @@ export const claudeCodeRuntime = {
|
|
|
230
230
|
}
|
|
231
231
|
},
|
|
232
232
|
|
|
233
|
-
async reconcileAfterRestart(binding, ctx) {
|
|
234
|
-
const meta = binding.runtimeMeta || {};
|
|
235
|
-
emitWorkerEventBestEffort({
|
|
236
|
-
adapter: ctx.adapter,
|
|
237
|
-
binding,
|
|
238
|
-
agent: this.name,
|
|
239
|
-
sessionId: meta.sessionId || binding.id,
|
|
240
|
-
cwd: ensureAgentHome(binding.id) || '',
|
|
241
|
-
event: {
|
|
242
|
-
hook_event_name: 'Stop',
|
|
243
|
-
worker_event_name: 'worker.turn.complete',
|
|
244
|
-
reason: 'connector.restart.reconcile',
|
|
245
|
-
},
|
|
246
|
-
logger: ctx.logger,
|
|
247
|
-
});
|
|
248
|
-
return 1;
|
|
249
|
-
},
|
|
250
|
-
|
|
251
233
|
// Friendly display name for a CC session (encoded project path →
|
|
252
234
|
// last meaningful segment). Used when materializing a binding.
|
|
253
235
|
formatDisplayName(session) {
|
|
@@ -339,24 +339,6 @@ export const codexRuntime = {
|
|
|
339
339
|
}
|
|
340
340
|
},
|
|
341
341
|
|
|
342
|
-
async reconcileAfterRestart(binding, ctx) {
|
|
343
|
-
const meta = binding.runtimeMeta || {};
|
|
344
|
-
emitWorkerEventBestEffort({
|
|
345
|
-
adapter: ctx.adapter,
|
|
346
|
-
binding,
|
|
347
|
-
agent: this.name,
|
|
348
|
-
sessionId: meta.sessionId || binding.id,
|
|
349
|
-
cwd: ensureAgentHome(binding.id) || '',
|
|
350
|
-
event: {
|
|
351
|
-
hook_event_name: 'Stop',
|
|
352
|
-
worker_event_name: 'worker.turn.complete',
|
|
353
|
-
reason: 'connector.restart.reconcile',
|
|
354
|
-
},
|
|
355
|
-
logger: ctx.logger,
|
|
356
|
-
});
|
|
357
|
-
return 1;
|
|
358
|
-
},
|
|
359
|
-
|
|
360
342
|
sessionsDir: CODEX_SESSIONS_DIR,
|
|
361
343
|
maxAgeMs: CODEX_MAX_AGE_MS,
|
|
362
344
|
};
|
|
@@ -238,21 +238,6 @@ export const openClawRuntime = {
|
|
|
238
238
|
return entries.length;
|
|
239
239
|
},
|
|
240
240
|
|
|
241
|
-
async reconcileAfterRestart(binding, ctx) {
|
|
242
|
-
const meta = binding.runtimeMeta || {};
|
|
243
|
-
if (typeof ctx.adapter.emitEvent === 'function') {
|
|
244
|
-
await ctx.adapter.emitEvent(binding, {
|
|
245
|
-
agent: this.name,
|
|
246
|
-
sessionId: String(meta.sessionKey || buildOpenClawSessionKey(meta.agentId || binding.id)).trim(),
|
|
247
|
-
cwd: '',
|
|
248
|
-
event: {
|
|
249
|
-
hook_event_name: 'agent.run.end',
|
|
250
|
-
reason: 'connector.restart.reconcile',
|
|
251
|
-
},
|
|
252
|
-
});
|
|
253
|
-
}
|
|
254
|
-
return 1;
|
|
255
|
-
},
|
|
256
241
|
};
|
|
257
242
|
|
|
258
243
|
export default openClawRuntime;
|
|
@@ -267,24 +267,6 @@ export const openCodeRuntime = {
|
|
|
267
267
|
}
|
|
268
268
|
},
|
|
269
269
|
|
|
270
|
-
async reconcileAfterRestart(binding, ctx) {
|
|
271
|
-
const meta = binding.runtimeMeta || {};
|
|
272
|
-
emitWorkerEventBestEffort({
|
|
273
|
-
adapter: ctx.adapter,
|
|
274
|
-
binding,
|
|
275
|
-
agent: this.name,
|
|
276
|
-
sessionId: meta.sessionId || binding.id,
|
|
277
|
-
cwd: ensureAgentHome(binding.id) || '',
|
|
278
|
-
event: {
|
|
279
|
-
hook_event_name: 'Stop',
|
|
280
|
-
worker_event_name: 'worker.turn.complete',
|
|
281
|
-
reason: 'connector.restart.reconcile',
|
|
282
|
-
},
|
|
283
|
-
logger: ctx.logger,
|
|
284
|
-
});
|
|
285
|
-
return 1;
|
|
286
|
-
},
|
|
287
|
-
|
|
288
270
|
dataDir: OPENCODE_DATA_DIR,
|
|
289
271
|
maxAgeMs: OPENCODE_MAX_AGE_MS,
|
|
290
272
|
};
|
|
@@ -238,24 +238,6 @@ export const piRuntime = {
|
|
|
238
238
|
}
|
|
239
239
|
},
|
|
240
240
|
|
|
241
|
-
async reconcileAfterRestart(binding, ctx) {
|
|
242
|
-
const meta = binding.runtimeMeta || {};
|
|
243
|
-
emitWorkerEventBestEffort({
|
|
244
|
-
adapter: ctx.adapter,
|
|
245
|
-
binding,
|
|
246
|
-
agent: this.name,
|
|
247
|
-
sessionId: meta.sessionId || binding.id,
|
|
248
|
-
cwd: ensureAgentHome(binding.id) || '',
|
|
249
|
-
event: {
|
|
250
|
-
hook_event_name: 'Stop',
|
|
251
|
-
worker_event_name: 'worker.turn.complete',
|
|
252
|
-
reason: 'connector.restart.reconcile',
|
|
253
|
-
},
|
|
254
|
-
logger: ctx.logger,
|
|
255
|
-
});
|
|
256
|
-
return 1;
|
|
257
|
-
},
|
|
258
|
-
|
|
259
241
|
sessionsDir: PI_SESSIONS_DIR,
|
|
260
242
|
maxAgeMs: PI_MAX_AGE_MS,
|
|
261
243
|
};
|
package/ticlawk.mjs
CHANGED
|
@@ -211,35 +211,6 @@ async function recoverAllRuntimes(runtimeList, adapter) {
|
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
-
async function reconcileBindingsAfterRestart(runtimes, adapter) {
|
|
215
|
-
const hostId = getHostId();
|
|
216
|
-
for (const binding of listBindings({ adapter: adapter.id })) {
|
|
217
|
-
if (!belongsToRuntimeHost(binding, hostId)) {
|
|
218
|
-
logger.debugError('core', 'binding.reconcile-host-mismatch', {
|
|
219
|
-
bindingId: binding.id,
|
|
220
|
-
adapter: binding.adapter,
|
|
221
|
-
hostId,
|
|
222
|
-
runtime_host_id: getBindingRuntimeHostId(binding),
|
|
223
|
-
});
|
|
224
|
-
continue;
|
|
225
|
-
}
|
|
226
|
-
const runtime = binding.runtime ? runtimes[binding.runtime] : null;
|
|
227
|
-
if (typeof runtime?.reconcileAfterRestart !== 'function') continue;
|
|
228
|
-
try {
|
|
229
|
-
await runtime.reconcileAfterRestart(binding, {
|
|
230
|
-
adapter,
|
|
231
|
-
logger,
|
|
232
|
-
});
|
|
233
|
-
} catch (err) {
|
|
234
|
-
logger.debugError('startup', 'reconcileAfterRestart.failed', {
|
|
235
|
-
runtime: binding.runtime,
|
|
236
|
-
bindingId: binding.id,
|
|
237
|
-
error: err?.message || String(err),
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
|
|
243
214
|
export async function startTiclawk() {
|
|
244
215
|
if (started) return;
|
|
245
216
|
started = true;
|
|
@@ -278,7 +249,6 @@ export async function startTiclawk() {
|
|
|
278
249
|
});
|
|
279
250
|
startReminderTicker();
|
|
280
251
|
await recoverAllRuntimes(runtimeList, adapter);
|
|
281
|
-
await reconcileBindingsAfterRestart(runtimes, adapter);
|
|
282
252
|
await adapter.start();
|
|
283
253
|
}
|
|
284
254
|
|