@funnycode/myclaude 0.1.186 → 0.1.188

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/dist/myclaude.js CHANGED
@@ -4,8 +4,8 @@
4
4
  // MACRO - build-time constants (injected by build.ts)
5
5
  // MACRO injected by build script
6
6
  globalThis.MACRO = {
7
- VERSION: "0.1.186",
8
- BUILD_TIME: "2026-08-10T04:16:05.099Z",
7
+ VERSION: "0.1.188",
8
+ BUILD_TIME: "2026-08-10T04:46:10.739Z",
9
9
  PACKAGE_URL: "@funnycode/myclaude",
10
10
  NATIVE_PACKAGE_URL: "@funnycode/myclaude",
11
11
  VERSION_CHANGELOG: '',
@@ -117152,7 +117152,7 @@ var package_default;
117152
117152
  var init_package = __esm(() => {
117153
117153
  package_default = {
117154
117154
  name: "@funnycode/myclaude",
117155
- version: "0.1.186",
117155
+ version: "0.1.188",
117156
117156
  private: false,
117157
117157
  description: "An open-source AI coding assistant in your terminal - powered by Claude",
117158
117158
  license: "MIT",
@@ -481391,16 +481391,117 @@ var exports_rewind = {};
481391
481391
  __export(exports_rewind, {
481392
481392
  call: () => call53
481393
481393
  });
481394
- async function call53(_args, context2) {
481395
- if (context2.openMessageSelector) {
481396
- context2.openMessageSelector();
481394
+ async function call53(args, _context) {
481395
+ const isGit = await getIsGit();
481396
+ if (!isGit) {
481397
+ return {
481398
+ type: "text",
481399
+ value: "Checkpoint requires a git repository. Run `git init` first, or use this command inside a git worktree."
481400
+ };
481401
+ }
481402
+ const trimmed = args.trim();
481403
+ if (trimmed === "" || trimmed === "list") {
481404
+ return listCheckpoints();
481405
+ }
481406
+ if (trimmed === "restore" || trimmed === "undo") {
481407
+ return {
481408
+ type: "text",
481409
+ value: "Usage: /checkpoint restore <n> — restore checkpoint #n (see /checkpoint list)."
481410
+ };
481411
+ }
481412
+ const restoreMatch = trimmed.match(/^(?:restore|undo)\s+(\d+)$/);
481413
+ if (restoreMatch) {
481414
+ return restoreCheckpoint(Number(restoreMatch[1]));
481415
+ }
481416
+ return createCheckpoint(trimmed);
481417
+ }
481418
+ async function getCheckpointListRaw() {
481419
+ const { stdout } = await execFileNoThrow(gitExe(), ["--no-optional-locks", "stash", "list"], { preserveOutputOnError: false });
481420
+ return stdout;
481421
+ }
481422
+ async function createCheckpoint(description) {
481423
+ const cwd2 = getCwd();
481424
+ const label = `myclaude-checkpoint: ${description}`;
481425
+ const { stderr } = await execFileNoThrow(gitExe(), ["--no-optional-locks", "stash", "push", "-m", label], { cwd: cwd2, preserveOutputOnError: true });
481426
+ const status2 = await getCheckpointListRaw();
481427
+ if (status2 === "") {
481428
+ return {
481429
+ type: "text",
481430
+ value: "No changes to checkpoint — the workspace is already clean."
481431
+ };
481432
+ }
481433
+ return {
481434
+ type: "text",
481435
+ value: `Checkpoint created: ${label}
481436
+ ${stderr.trim() || ""}
481437
+
481438
+ Use /checkpoint list to see all checkpoints.`.trim()
481439
+ };
481440
+ }
481441
+ async function listCheckpoints() {
481442
+ const stdout = await getCheckpointListRaw();
481443
+ if (stdout.trim() === "") {
481444
+ return {
481445
+ type: "text",
481446
+ value: `No checkpoints yet.
481447
+
481448
+ Usage:
481449
+ /checkpoint <description> — save current workspace state
481450
+ /checkpoint list — list checkpoints
481451
+ /checkpoint restore <n> — restore checkpoint #n`
481452
+ };
481453
+ }
481454
+ const lines2 = stdout.trim().split(`
481455
+ `);
481456
+ const annotated = lines2.map((line, index) => {
481457
+ const marker = line.includes("myclaude-checkpoint") ? " ← /checkpoint" : "";
481458
+ return ` ${index}: ${line.trim()}${marker}`;
481459
+ }).join(`
481460
+ `);
481461
+ return {
481462
+ type: "text",
481463
+ value: `Saved checkpoints:
481464
+ ${annotated}
481465
+
481466
+ Restore with: /checkpoint restore <n>`
481467
+ };
481468
+ }
481469
+ async function restoreCheckpoint(index) {
481470
+ const listRaw = await getCheckpointListRaw();
481471
+ const lines2 = listRaw.trim().split(`
481472
+ `).filter(Boolean);
481473
+ if (lines2.length === 0) {
481474
+ return { type: "text", value: "No checkpoints to restore." };
481475
+ }
481476
+ if (index < 0 || index >= lines2.length) {
481477
+ return {
481478
+ type: "text",
481479
+ value: `Invalid checkpoint index ${index}. Run /checkpoint list to see valid indices (0–${lines2.length - 1}).`
481480
+ };
481397
481481
  }
481398
- return { type: "skip" };
481482
+ const cwd2 = getCwd();
481483
+ const { stdout, stderr } = await execFileNoThrow(gitExe(), ["--no-optional-locks", "stash", "apply", `stash@{${index}}`], { cwd: cwd2, preserveOutputOnError: true });
481484
+ const detail = `${stdout.trim()}${stderr.trim() ? `
481485
+ ${stderr.trim()}` : ""}`;
481486
+ return {
481487
+ type: "text",
481488
+ value: `Restored checkpoint #${index}:
481489
+ ${lines2[index].trim()}
481490
+ ${detail ? `
481491
+ ${detail}` : ""}
481492
+
481493
+ Use /checkpoint list to review; the stash entry is kept so you can re-apply if needed.`.trim()
481494
+ };
481399
481495
  }
481496
+ var init_rewind = __esm(() => {
481497
+ init_execFileNoThrow();
481498
+ init_cwd2();
481499
+ init_git();
481500
+ });
481400
481501
 
481401
481502
  // src/commands/rewind/index.ts
481402
481503
  var rewind, rewind_default;
481403
- var init_rewind = __esm(() => {
481504
+ var init_rewind2 = __esm(() => {
481404
481505
  rewind = {
481405
481506
  description: `Restore the code and/or conversation to a previous point`,
481406
481507
  name: "rewind",
@@ -481408,7 +481509,7 @@ var init_rewind = __esm(() => {
481408
481509
  argumentHint: "",
481409
481510
  type: "local",
481410
481511
  supportsNonInteractive: false,
481411
- load: () => Promise.resolve().then(() => exports_rewind)
481512
+ load: () => Promise.resolve().then(() => (init_rewind(), exports_rewind))
481412
481513
  };
481413
481514
  rewind_default = rewind;
481414
481515
  });
@@ -493530,7 +493631,7 @@ var init_commands2 = __esm(() => {
493530
493631
  init_agents3();
493531
493632
  init_plugin2();
493532
493633
  init_reload_plugins2();
493533
- init_rewind();
493634
+ init_rewind2();
493534
493635
  init_heapdump2();
493535
493636
  init_mock_limits();
493536
493637
  init_bridge_kick();
package/dist/myclaude.mjs CHANGED
@@ -4,8 +4,8 @@
4
4
  // MACRO - build-time constants (injected by build.ts)
5
5
  // MACRO injected by build script
6
6
  globalThis.MACRO = {
7
- VERSION: "0.1.186",
8
- BUILD_TIME: "2026-08-10T04:16:05.099Z",
7
+ VERSION: "0.1.188",
8
+ BUILD_TIME: "2026-08-10T04:46:10.739Z",
9
9
  PACKAGE_URL: "@funnycode/myclaude",
10
10
  NATIVE_PACKAGE_URL: "@funnycode/myclaude",
11
11
  VERSION_CHANGELOG: '',
@@ -117152,7 +117152,7 @@ var package_default;
117152
117152
  var init_package = __esm(() => {
117153
117153
  package_default = {
117154
117154
  name: "@funnycode/myclaude",
117155
- version: "0.1.186",
117155
+ version: "0.1.188",
117156
117156
  private: false,
117157
117157
  description: "An open-source AI coding assistant in your terminal - powered by Claude",
117158
117158
  license: "MIT",
@@ -481391,16 +481391,117 @@ var exports_rewind = {};
481391
481391
  __export(exports_rewind, {
481392
481392
  call: () => call53
481393
481393
  });
481394
- async function call53(_args, context2) {
481395
- if (context2.openMessageSelector) {
481396
- context2.openMessageSelector();
481394
+ async function call53(args, _context) {
481395
+ const isGit = await getIsGit();
481396
+ if (!isGit) {
481397
+ return {
481398
+ type: "text",
481399
+ value: "Checkpoint requires a git repository. Run `git init` first, or use this command inside a git worktree."
481400
+ };
481401
+ }
481402
+ const trimmed = args.trim();
481403
+ if (trimmed === "" || trimmed === "list") {
481404
+ return listCheckpoints();
481405
+ }
481406
+ if (trimmed === "restore" || trimmed === "undo") {
481407
+ return {
481408
+ type: "text",
481409
+ value: "Usage: /checkpoint restore <n> — restore checkpoint #n (see /checkpoint list)."
481410
+ };
481411
+ }
481412
+ const restoreMatch = trimmed.match(/^(?:restore|undo)\s+(\d+)$/);
481413
+ if (restoreMatch) {
481414
+ return restoreCheckpoint(Number(restoreMatch[1]));
481415
+ }
481416
+ return createCheckpoint(trimmed);
481417
+ }
481418
+ async function getCheckpointListRaw() {
481419
+ const { stdout } = await execFileNoThrow(gitExe(), ["--no-optional-locks", "stash", "list"], { preserveOutputOnError: false });
481420
+ return stdout;
481421
+ }
481422
+ async function createCheckpoint(description) {
481423
+ const cwd2 = getCwd();
481424
+ const label = `myclaude-checkpoint: ${description}`;
481425
+ const { stderr } = await execFileNoThrow(gitExe(), ["--no-optional-locks", "stash", "push", "-m", label], { cwd: cwd2, preserveOutputOnError: true });
481426
+ const status2 = await getCheckpointListRaw();
481427
+ if (status2 === "") {
481428
+ return {
481429
+ type: "text",
481430
+ value: "No changes to checkpoint — the workspace is already clean."
481431
+ };
481432
+ }
481433
+ return {
481434
+ type: "text",
481435
+ value: `Checkpoint created: ${label}
481436
+ ${stderr.trim() || ""}
481437
+
481438
+ Use /checkpoint list to see all checkpoints.`.trim()
481439
+ };
481440
+ }
481441
+ async function listCheckpoints() {
481442
+ const stdout = await getCheckpointListRaw();
481443
+ if (stdout.trim() === "") {
481444
+ return {
481445
+ type: "text",
481446
+ value: `No checkpoints yet.
481447
+
481448
+ Usage:
481449
+ /checkpoint <description> — save current workspace state
481450
+ /checkpoint list — list checkpoints
481451
+ /checkpoint restore <n> — restore checkpoint #n`
481452
+ };
481453
+ }
481454
+ const lines2 = stdout.trim().split(`
481455
+ `);
481456
+ const annotated = lines2.map((line, index) => {
481457
+ const marker = line.includes("myclaude-checkpoint") ? " ← /checkpoint" : "";
481458
+ return ` ${index}: ${line.trim()}${marker}`;
481459
+ }).join(`
481460
+ `);
481461
+ return {
481462
+ type: "text",
481463
+ value: `Saved checkpoints:
481464
+ ${annotated}
481465
+
481466
+ Restore with: /checkpoint restore <n>`
481467
+ };
481468
+ }
481469
+ async function restoreCheckpoint(index) {
481470
+ const listRaw = await getCheckpointListRaw();
481471
+ const lines2 = listRaw.trim().split(`
481472
+ `).filter(Boolean);
481473
+ if (lines2.length === 0) {
481474
+ return { type: "text", value: "No checkpoints to restore." };
481475
+ }
481476
+ if (index < 0 || index >= lines2.length) {
481477
+ return {
481478
+ type: "text",
481479
+ value: `Invalid checkpoint index ${index}. Run /checkpoint list to see valid indices (0–${lines2.length - 1}).`
481480
+ };
481397
481481
  }
481398
- return { type: "skip" };
481482
+ const cwd2 = getCwd();
481483
+ const { stdout, stderr } = await execFileNoThrow(gitExe(), ["--no-optional-locks", "stash", "apply", `stash@{${index}}`], { cwd: cwd2, preserveOutputOnError: true });
481484
+ const detail = `${stdout.trim()}${stderr.trim() ? `
481485
+ ${stderr.trim()}` : ""}`;
481486
+ return {
481487
+ type: "text",
481488
+ value: `Restored checkpoint #${index}:
481489
+ ${lines2[index].trim()}
481490
+ ${detail ? `
481491
+ ${detail}` : ""}
481492
+
481493
+ Use /checkpoint list to review; the stash entry is kept so you can re-apply if needed.`.trim()
481494
+ };
481399
481495
  }
481496
+ var init_rewind = __esm(() => {
481497
+ init_execFileNoThrow();
481498
+ init_cwd2();
481499
+ init_git();
481500
+ });
481400
481501
 
481401
481502
  // src/commands/rewind/index.ts
481402
481503
  var rewind, rewind_default;
481403
- var init_rewind = __esm(() => {
481504
+ var init_rewind2 = __esm(() => {
481404
481505
  rewind = {
481405
481506
  description: `Restore the code and/or conversation to a previous point`,
481406
481507
  name: "rewind",
@@ -481408,7 +481509,7 @@ var init_rewind = __esm(() => {
481408
481509
  argumentHint: "",
481409
481510
  type: "local",
481410
481511
  supportsNonInteractive: false,
481411
- load: () => Promise.resolve().then(() => exports_rewind)
481512
+ load: () => Promise.resolve().then(() => (init_rewind(), exports_rewind))
481412
481513
  };
481413
481514
  rewind_default = rewind;
481414
481515
  });
@@ -493530,7 +493631,7 @@ var init_commands2 = __esm(() => {
493530
493631
  init_agents3();
493531
493632
  init_plugin2();
493532
493633
  init_reload_plugins2();
493533
- init_rewind();
493634
+ init_rewind2();
493534
493635
  init_heapdump2();
493535
493636
  init_mock_limits();
493536
493637
  init_bridge_kick();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnycode/myclaude",
3
- "version": "0.1.186",
3
+ "version": "0.1.188",
4
4
  "private": false,
5
5
  "description": "An open-source AI coding assistant in your terminal - powered by Claude",
6
6
  "license": "MIT",