@whittlelabs/sifter 0.40.0 → 0.40.1

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 (3) hide show
  1. package/bin.js +18 -6
  2. package/bin.js.map +2 -2
  3. package/package.json +1 -1
package/bin.js CHANGED
@@ -12045,10 +12045,12 @@ var require_copilot = __commonJS({
12045
12045
  var json_answer_1 = require_json_answer();
12046
12046
  var models_1 = require_models();
12047
12047
  var workspace_telemetry_1 = require_workspace_telemetry();
12048
+ var cli_version_1 = require_cli_version();
12049
+ var version_check_1 = require_version_check();
12048
12050
  var apply_1 = require_apply();
12049
12051
  var REVIEW_TOOLS = ["view", "grep", "glob"];
12050
12052
  var DENIED_TOOLS = ["shell", "write"];
12051
- function copilotReviewArgs(outputDir) {
12053
+ function copilotReviewArgs(version, outputDir) {
12052
12054
  const permissions = outputDir ? [
12053
12055
  `--available-tools=${[...REVIEW_TOOLS, "create"].join(",")}`,
12054
12056
  ...REVIEW_TOOLS.map((t) => `--allow-tool=${t}`),
@@ -12068,9 +12070,18 @@ var require_copilot = __commonJS({
12068
12070
  "--disallow-temp-dir",
12069
12071
  "--no-ask-user",
12070
12072
  "--no-auto-update",
12071
- "--no-remote"
12073
+ ...sessionStaysLocal(version)
12072
12074
  ];
12073
12075
  }
12076
+ var REMOTE_FLAG_RETIRED = "1.0.103";
12077
+ function sessionStaysLocal(version) {
12078
+ if (version === null)
12079
+ return [];
12080
+ return (0, version_check_1.compareSemver)(version, REMOTE_FLAG_RETIRED) >= 0 ? ["--sync-session=off"] : ["--no-remote"];
12081
+ }
12082
+ function copilotVersion(home) {
12083
+ return (0, cli_version_1.cliVersion)("copilot", runEnv(home));
12084
+ }
12074
12085
  var RUN_SETTINGS = { disableAllHooks: true, autoUpdate: false };
12075
12086
  var COPILOT_FAULTS = {
12076
12087
  installRemedy: "install GitHub Copilot CLI (brew install --cask copilot-cli, or npm install -g @github/copilot) where this process can find it on PATH",
@@ -12130,7 +12141,7 @@ var require_copilot = __commonJS({
12130
12141
  const sessionId = (0, crypto_1.randomUUID)();
12131
12142
  const outputDir = ctx?.outputDir ? await fs_1.promises.realpath(ctx.outputDir) : void 0;
12132
12143
  const { response, reads, toolInputs } = await this.runCopilot({
12133
- args: [...copilotReviewArgs(outputDir), `--session-id=${sessionId}`, "-C", runCwd],
12144
+ args: [...copilotReviewArgs(await copilotVersion(home), outputDir), `--session-id=${sessionId}`, "-C", runCwd],
12134
12145
  prompt: withSchema(prompt, spec),
12135
12146
  spec,
12136
12147
  cwd: runCwd,
@@ -12177,7 +12188,7 @@ var require_copilot = __commonJS({
12177
12188
  outputSchema: handle.outputSchema
12178
12189
  };
12179
12190
  const { response } = await this.runCopilot({
12180
- args: [...copilotReviewArgs(), `--resume=${handle.sessionId}`, "-C", cwd],
12191
+ args: [...copilotReviewArgs(await copilotVersion(handle.home)), `--resume=${handle.sessionId}`, "-C", cwd],
12181
12192
  prompt: followUp,
12182
12193
  spec,
12183
12194
  cwd,
@@ -12197,11 +12208,12 @@ var require_copilot = __commonJS({
12197
12208
  const scratch = await fs_1.promises.mkdtemp(path_1.default.join(this.tmpBase(), "shuttle-copilot-ready-"));
12198
12209
  try {
12199
12210
  const home = await makeRunHome(scratch);
12211
+ const version = await copilotVersion(home);
12200
12212
  let run;
12201
12213
  try {
12202
12214
  run = await withOperatorLogin(home, () => (0, agent_process_1.runAgentProcess)({
12203
12215
  bin: "copilot",
12204
- args: [...copilotReviewArgs(), "-C", scratch, "-p", READINESS_PROMPT],
12216
+ args: [...copilotReviewArgs(version), "-C", scratch, "-p", READINESS_PROMPT],
12205
12217
  cwd: scratch,
12206
12218
  env: runEnv(home),
12207
12219
  idleTimeoutMs: READINESS_TIMEOUT_MS,
@@ -29633,7 +29645,7 @@ var import_path = require("path");
29633
29645
  var import_promises = require("fs/promises");
29634
29646
  var import_yaml = __toESM(require_dist3());
29635
29647
  var import_shuttle = __toESM(require_dist5());
29636
- var buildVersion = true ? "0.40.0" : pkg.version;
29648
+ var buildVersion = true ? "0.40.1" : pkg.version;
29637
29649
  var AGENT_EXECUTORS = ["claude-code", "codex", "copilot"];
29638
29650
  var sifterBrand = {
29639
29651
  product: {