klyro 0.1.31 → 0.1.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.
Files changed (2) hide show
  1. package/dist/index.js +19 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -223,6 +223,25 @@ async function main() {
223
223
  program
224
224
  .action(async (promptArg) => {
225
225
  const opts = program.opts();
226
+ // 9.2 — --continue / --resume handling
227
+ if (opts.continue || typeof opts.resume === 'string') {
228
+ const { getDefaultSessionStore } = await import('./persistence/session.js');
229
+ const store = getDefaultSessionStore();
230
+ const all = (await store.list()).filter((r) => r.cwd === process.cwd()).sort((a, b) => b.updatedAt - a.updatedAt);
231
+ const target = typeof opts.resume === 'string' ? all.find((r) => r.id.startsWith(opts.resume)) ?? all[0] : all[0];
232
+ if (!target) {
233
+ process.stderr.write('klyro: no session to continue in this cwd (try klyro session list)\n');
234
+ process.exit(2);
235
+ }
236
+ process.stderr.write(`klyro: continuing session ${target.id.slice(0, 8)} — ${target.task}\n`);
237
+ const model = process.env.KLYRO_MODEL ?? target.config.model;
238
+ if (!model) {
239
+ process.stderr.write('klyro: KLYRO_MODEL not set\n');
240
+ process.exit(2);
241
+ }
242
+ const code = await runOnce({ task: target.task, cwd: target.cwd, model, maxSteps: target.config.maxSteps, sessionId: target.id });
243
+ process.exit(code);
244
+ }
226
245
  // Headless via -p / --print or positional prompt
227
246
  const headlessPrompt = opts.print ?? promptArg;
228
247
  if (headlessPrompt) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "klyro",
3
- "version": "0.1.31",
3
+ "version": "0.1.33",
4
4
  "description": "Klyro — autonomous coding harness CLI that streams from any OpenAI-compatible or Anthropic LLM endpoint.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",