@drisp/cli 0.6.5 → 0.6.7

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.
@@ -1048,7 +1048,6 @@ function hasProjectWorkflow(projectDir) {
1048
1048
  }
1049
1049
 
1050
1050
  // src/core/workflows/types.ts
1051
- var DEFAULT_MAX_TURN_TOKEN_COUNT = 13e4;
1052
1051
  var DEFAULT_NUDGE_CAP = 3;
1053
1052
  var DEFAULT_RETRY_CAP = 3;
1054
1053
  var DEFAULT_RETRY_BACKOFF_MS = 1e4;
@@ -3391,7 +3390,10 @@ function terminalPhaseToStatus(phase) {
3391
3390
  }
3392
3391
  }
3393
3392
  function createWorkflowRunner(input) {
3394
- const runId = input.resumeRunId ?? crypto3.randomUUID();
3393
+ if (input.runId && input.resumeRunId && input.runId !== input.resumeRunId) {
3394
+ throw new Error("Run identity does not match continuation");
3395
+ }
3396
+ const runId = input.resumeRunId ?? input.runId ?? crypto3.randomUUID();
3395
3397
  let cancelled = false;
3396
3398
  let status = "running";
3397
3399
  let cumulativeTokens = {
@@ -3582,9 +3584,11 @@ function createWorkflowRunner(input) {
3582
3584
  stop(limit);
3583
3585
  return;
3584
3586
  }
3585
- if (!openingChecked && turn.continuation.mode === "fresh" && usage.openingContextSize != null) {
3587
+ const previous = memory.contextKey === cfg.contextKey ? memory.lastBoundedTurn : null;
3588
+ const measured = previous?.lastContextTokens ?? null;
3589
+ const ceiling = measured ?? usage.contextWindowSize ?? null;
3590
+ if (!openingChecked && turn.continuation.mode === "fresh" && usage.openingContextSize != null && ceiling != null) {
3586
3591
  openingChecked = true;
3587
- const previous = memory.contextKey === cfg.contextKey ? memory.lastBoundedTurn : null;
3588
3592
  const required = memory.checkpoint ? 0 : estimateTokenCount(
3589
3593
  journalAbsPath ? readJournal(journalAbsPath) : ""
3590
3594
  );
@@ -3595,8 +3599,8 @@ function createWorkflowRunner(input) {
3595
3599
  context: {
3596
3600
  opening: usage.openingContextSize,
3597
3601
  required,
3598
- ceiling: previous?.lastContextTokens ?? loop?.maxTurnTokenCount ?? DEFAULT_MAX_TURN_TOKEN_COUNT,
3599
- source: previous ? "conservative prior API occupancy" : "configured ceiling estimate; actual compaction point unknown"
3602
+ ceiling,
3603
+ source: measured !== null ? "conservative prior API occupancy" : "model context window estimate; actual compaction point unknown"
3600
3604
  }
3601
3605
  });
3602
3606
  if (decision) stop(decision);
@@ -3969,13 +3973,16 @@ function collectMcpServersWithOptions(pluginDirs) {
3969
3973
  }
3970
3974
 
3971
3975
  export {
3972
- DEFAULT_MAX_TURN_TOKEN_COUNT,
3973
- DEFAULT_PERMISSION_GRACE_MS,
3974
3976
  createSteerQueue,
3977
+ DEFAULT_PERMISSION_GRACE_MS,
3978
+ serializeRunMemory,
3975
3979
  deserializeRunMemory,
3976
3980
  wakesFreshAfterHandover,
3977
3981
  createWorkflowRunner,
3982
+ refreshMarketplaceRepo,
3978
3983
  isMarketplaceRef,
3984
+ resolveWorkflowManifestPath,
3985
+ listWorkflowEntriesFromManifest,
3979
3986
  findMarketplaceRepoDir,
3980
3987
  resolveWorkflowMarketplaceSource,
3981
3988
  listMarketplaceWorkflows,
@@ -4006,4 +4013,4 @@ export {
4006
4013
  compileWorkflowPlan,
4007
4014
  collectMcpServersWithOptions
4008
4015
  };
4009
- //# sourceMappingURL=chunk-QVRTU2MM.js.map
4016
+ //# sourceMappingURL=chunk-CIPO2P2Q.js.map
@@ -0,0 +1,36 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __commonJS = (cb, mod) => function __require() {
8
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
+ };
10
+ var __export = (target, all) => {
11
+ for (var name in all)
12
+ __defProp(target, name, { get: all[name], enumerable: true });
13
+ };
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from))
17
+ if (!__hasOwnProp.call(to, key) && key !== except)
18
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
+ // If the importer is in node compatibility mode or this is not an ESM
24
+ // file that has been converted to a CommonJS file using a Babel-
25
+ // compatible transform (i.e. "__esModule" has not been set), then set
26
+ // "default" to the CommonJS "module.exports" for node compatibility.
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
28
+ mod
29
+ ));
30
+
31
+ export {
32
+ __commonJS,
33
+ __export,
34
+ __toESM
35
+ };
36
+ //# sourceMappingURL=chunk-G3PMV62Z.js.map
@@ -0,0 +1,16 @@
1
+ import {
2
+ runMachineRunners
3
+ } from "./chunk-7SNGX25Q.js";
4
+
5
+ // src/app/entry/runnerDaemon.ts
6
+ if (process.argv.includes("--help")) {
7
+ process.stdout.write(
8
+ "Usage: drisp-runner\nRuns this machine's Runner for every Team drisp runner connect joined, or the one installation DRISP_RUNNER_CONFIG names.\n"
9
+ );
10
+ } else {
11
+ runMachineRunners().catch((error) => {
12
+ console.error(error);
13
+ process.exitCode = 1;
14
+ });
15
+ }
16
+ //# sourceMappingURL=chunk-PNVYS2JZ.js.map
@@ -157,4 +157,4 @@ export {
157
157
  createStopBlockResult,
158
158
  createCompactBlockResult
159
159
  };
160
- //# sourceMappingURL=chunk-USK5VSQ7.js.map
160
+ //# sourceMappingURL=chunk-PQIB66SG.js.map