clisbot 0.1.42 → 0.1.43

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
- "schemaVersion": "0.1.42",
3
+ "schemaVersion": "0.1.43",
4
4
  "lastTouchedAt": "2026-04-18T10:10:00Z"
5
5
  },
6
6
  "app": {
package/dist/main.js CHANGED
@@ -60332,10 +60332,10 @@ var agentsDefaultsSchema = exports_external.object({
60332
60332
  });
60333
60333
  var clisbotConfigSchema = exports_external.object({
60334
60334
  meta: exports_external.object({
60335
- schemaVersion: exports_external.string().min(1).default("0.1.42"),
60335
+ schemaVersion: exports_external.string().min(1).default("0.1.43"),
60336
60336
  lastTouchedAt: exports_external.string().optional()
60337
60337
  }).default({
60338
- schemaVersion: "0.1.42"
60338
+ schemaVersion: "0.1.43"
60339
60339
  }),
60340
60340
  app: exports_external.object({
60341
60341
  session: appSessionSchema.default({
@@ -61174,7 +61174,7 @@ function renderDefaultConfigTemplate(options = {}) {
61174
61174
  const defaultRuntimeMonitorRestartBackoff2 = getDefaultRuntimeMonitorRestartBackoff();
61175
61175
  return JSON.stringify({
61176
61176
  meta: {
61177
- schemaVersion: "0.1.42",
61177
+ schemaVersion: "0.1.43",
61178
61178
  lastTouchedAt: new Date().toISOString()
61179
61179
  },
61180
61180
  app: {
@@ -63435,11 +63435,14 @@ function shellQuote2(value) {
63435
63435
  }
63436
63436
  return `'${value.replaceAll("'", `'"'"'`)}'`;
63437
63437
  }
63438
- function getClisbotMainScriptPath() {
63439
- return fileURLToPath3(new URL(isPackagedRuntime() ? "../main.js" : "../main.ts", import.meta.url));
63438
+ function getClisbotMainScriptPath(moduleUrl = import.meta.url) {
63439
+ if (isPackagedRuntime(moduleUrl)) {
63440
+ return fileURLToPath3(moduleUrl);
63441
+ }
63442
+ return fileURLToPath3(new URL("../main.ts", moduleUrl));
63440
63443
  }
63441
- function isPackagedRuntime() {
63442
- const currentModulePath = fileURLToPath3(import.meta.url);
63444
+ function isPackagedRuntime(moduleUrl = import.meta.url) {
63445
+ const currentModulePath = fileURLToPath3(moduleUrl);
63443
63446
  return currentModulePath.includes(`${sep}dist${sep}`);
63444
63447
  }
63445
63448
  function getClisbotWrapperPath() {
@@ -63454,9 +63457,9 @@ function getClisbotPromptCommand() {
63454
63457
  function getClisbotWrapperDir() {
63455
63458
  return dirname8(getClisbotWrapperPath());
63456
63459
  }
63457
- function renderClisbotWrapperScript() {
63460
+ function renderClisbotWrapperScript(options = {}) {
63458
63461
  const execPath = process.execPath;
63459
- const mainScriptPath = getClisbotMainScriptPath();
63462
+ const mainScriptPath = getClisbotMainScriptPath(options.moduleUrl);
63460
63463
  const cliName = getRenderedCliName();
63461
63464
  return [
63462
63465
  "#!/usr/bin/env bash",
@@ -66891,12 +66894,13 @@ async function submitTmuxSessionInput(params) {
66891
66894
  throw new TmuxPasteUnconfirmedError(pasteDelivery.attempts);
66892
66895
  }
66893
66896
  const preSubmitState = pasteDelivery.state;
66897
+ const preSubmitSnapshot = normalizePaneText(await params.tmux.capturePane(params.sessionName, captureLines));
66894
66898
  await params.tmux.sendKey(params.sessionName, "Enter");
66895
66899
  if (await waitForPaneSubmitConfirmation({
66896
66900
  tmux: params.tmux,
66897
66901
  sessionName: params.sessionName,
66898
66902
  baseline: preSubmitState,
66899
- baselineSnapshot: prePasteSnapshot,
66903
+ baselineSnapshot: preSubmitSnapshot,
66900
66904
  captureLines
66901
66905
  })) {
66902
66906
  return;
@@ -66909,7 +66913,7 @@ async function submitTmuxSessionInput(params) {
66909
66913
  tmux: params.tmux,
66910
66914
  sessionName: params.sessionName,
66911
66915
  baseline: preSubmitState,
66912
- baselineSnapshot: prePasteSnapshot,
66916
+ baselineSnapshot: preSubmitSnapshot,
66913
66917
  captureLines
66914
66918
  })) {
66915
66919
  return;
@@ -67467,7 +67471,7 @@ function isRecoverableStartupSessionLoss(error) {
67467
67471
  return isMissingTmuxSessionError(error) || isTmuxServerUnavailableError(error) || isBootstrapSessionLostError(error);
67468
67472
  }
67469
67473
  function isFreshStartRetryablePromptDeliveryError(error) {
67470
- return error instanceof TmuxPasteUnconfirmedError;
67474
+ return error instanceof TmuxPasteUnconfirmedError || error instanceof TmuxSubmitUnconfirmedError;
67471
67475
  }
67472
67476
 
67473
67477
  class RunnerService {
@@ -67540,7 +67544,15 @@ class RunnerService {
67540
67544
  runnerCommand: resolved.runner.command
67541
67545
  });
67542
67546
  }
67543
- const sessionId = await this.captureSessionIdentity(resolved);
67547
+ let sessionId;
67548
+ try {
67549
+ sessionId = await this.captureSessionIdentity(resolved);
67550
+ } catch (error) {
67551
+ if (isFreshStartRetryablePromptDeliveryError(error)) {
67552
+ this.sessionIdentityCaptureRetryAt.set(resolved.sessionKey, Date.now() + SESSION_ID_CAPTURE_FAILURE_COOLDOWN_MS);
67553
+ }
67554
+ throw error;
67555
+ }
67544
67556
  if (sessionId) {
67545
67557
  this.sessionIdentityCaptureRetryAt.delete(resolved.sessionKey);
67546
67558
  } else {
@@ -67713,7 +67725,6 @@ class RunnerService {
67713
67725
  sessionName: resolved.sessionName,
67714
67726
  stateDir: this.loadedConfig.stateDir
67715
67727
  });
67716
- this.sessionIdentityCaptureRetryAt.delete(resolved.sessionKey);
67717
67728
  try {
67718
67729
  await this.tmux.newSession({
67719
67730
  sessionName: resolved.sessionName,
@@ -70187,9 +70198,6 @@ async function executePromptDelivery(params) {
70187
70198
  observerId: params.observerId,
70188
70199
  timingContext: params.timingContext,
70189
70200
  onUpdate: async (update) => {
70190
- if (!update.forceVisible && !paneManagedDelivery && !messageToolPreview) {
70191
- return;
70192
- }
70193
70201
  if (update.status === "running" && !loggedFirstRunningUpdate) {
70194
70202
  loggedFirstRunningUpdate = true;
70195
70203
  logLatencyDebug("channel-first-running-update", params.timingContext, {
@@ -70205,6 +70213,9 @@ async function executePromptDelivery(params) {
70205
70213
  if (update.status === "running") {
70206
70214
  renderedQueueStart = await maybeRenderQueueStartNotification();
70207
70215
  }
70216
+ if (!update.forceVisible && !paneManagedDelivery && !messageToolPreview) {
70217
+ return;
70218
+ }
70208
70219
  if (params.route.streaming === "off" && update.status === "running" && !update.forceVisible) {
70209
70220
  return;
70210
70221
  }
@@ -72144,9 +72155,6 @@ async function resolveSlackFiles(params) {
72144
72155
  if (currentFiles.length > 0) {
72145
72156
  return currentFiles;
72146
72157
  }
72147
- if (params.threadTs && params.messageTs && params.threadTs !== params.messageTs) {
72148
- return fetchSlackMessageFiles(params.client, params.channelId, params.threadTs);
72149
- }
72150
72158
  return [];
72151
72159
  }
72152
72160
  async function fetchSlackMessageFiles(client, channelId, messageTs) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clisbot",
3
- "version": "0.1.42",
3
+ "version": "0.1.43",
4
4
  "private": false,
5
5
  "description": "Chat surfaces for durable AI coding agents running in tmux",
6
6
  "license": "MIT",