@jpcasabiancai/cayenne 0.5.20 → 0.5.22

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/cli.js +22 -5
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -614,7 +614,9 @@ var init_flows = __esm({
614
614
  FlowVisibility = z6.enum(["private", "workspace"]);
615
615
  SESSION_OUTPUTS = ["sessionId", "branch", "prUrl", "resultText"];
616
616
  later = { status: "later" };
617
- session = { optional: ["permission_mode", "timeout_min"] };
617
+ session = {
618
+ optional: ["permission_mode", "model", "effort", "timeout_min", "autopilot"]
619
+ };
618
620
  STEP_CATALOG = {
619
621
  "trigger.clickup": entry(
620
622
  "ClickUp task moved",
@@ -729,7 +731,8 @@ var init_flows = __esm({
729
731
  "needs_setup",
730
732
  "integration_not_owned",
731
733
  "github_account_missing",
732
- "runner_refused"
734
+ "runner_refused",
735
+ "plan_feature_autopilot"
733
736
  ]);
734
737
  FlowProblem = z6.object({
735
738
  stepId: z6.string().nullable(),
@@ -2601,6 +2604,13 @@ var init_runner = __esm({
2601
2604
  * say. Optional so an older row parses.
2602
2605
  */
2603
2606
  flowAuto: z23.boolean().optional().catch(void 0),
2607
+ /**
2608
+ * The runner's local config `allowAutoPilot`, reported by a build that applies an Auto Pilot
2609
+ * answer on a flow step (D89, protocol §2.13). The engine and `flow_start_session` require it
2610
+ * true before a step that sets `autopilot` starts. Absent on an older runner, which would refuse
2611
+ * every such answer. Optional so an older row parses.
2612
+ */
2613
+ flowAutoPilot: z23.boolean().optional().catch(void 0),
2604
2614
  /**
2605
2615
  * The raw Ed25519 public key of the running process (32 bytes, unpadded base64url), which signs
2606
2616
  * the local server's `hello` (protocol §6.2). New on every start, republished by every capabilities refresh that changes the row;
@@ -21448,7 +21458,7 @@ var init_manager = __esm({
21448
21458
  let decision = p.result;
21449
21459
  let refusal = null;
21450
21460
  try {
21451
- this.assertAutopilotOrigin(sessionId, createdBy, origin);
21461
+ this.assertAutopilotOrigin(sessionId, createdBy, origin, true);
21452
21462
  await this.assertAutopilotShellConfig(live, origin);
21453
21463
  this.assertAutopilotLiveMode(live, origin);
21454
21464
  if (decision.behavior === "allow") {
@@ -22650,9 +22660,10 @@ var init_manager = __esm({
22650
22660
  * only where this machine's owner set `allowAutoPilot`. `created_by` on such a row is the session
22651
22661
  * owner, so a missing one is not the runner owner and is refused like a member.
22652
22662
  */
22653
- assertAutopilotOrigin(sessionId, createdBy, origin) {
22663
+ assertAutopilotOrigin(sessionId, createdBy, origin, answer2 = false) {
22654
22664
  if (origin !== "autopilot") return;
22655
22665
  if (this.isTaskSession(sessionId)) {
22666
+ if (answer2 && this.flows.has(sessionId) && this.deps.allowAutoPilot === true) return;
22656
22667
  throw new Error("VALIDATION: a task session cannot run Auto Pilot");
22657
22668
  }
22658
22669
  if (createdBy !== this.deps.runnerUserId && this.deps.allowAutoPilot !== true) {
@@ -27705,6 +27716,8 @@ async function compose(cfg, lock, host, preflight) {
27705
27716
  contextAssembly: true,
27706
27717
  // D62, protocol §2.12: what the start RPC reads before a member's chat runs Auto Pilot here.
27707
27718
  autoPilot: cfg.allowAutoPilot,
27719
+ // D89, protocol §2.13: this build takes an Auto Pilot answer on a running flow step.
27720
+ flowAutoPilot: cfg.allowAutoPilot,
27708
27721
  // D79 amendment, protocol §2.13: shown by the automation builder; the manager still decides.
27709
27722
  flowAuto: cfg.allowFlowAuto,
27710
27723
  // D50: this build opens repository chats; present only when the value passes its schema.
@@ -27714,7 +27727,11 @@ async function compose(cfg, lock, host, preflight) {
27714
27727
  let loggedCodex = null;
27715
27728
  let loggedClaude = null;
27716
27729
  const refresh = async () => {
27717
- providers = await detect();
27730
+ const found = await detect();
27731
+ if (found.claude.available && found.claude.models.length === 0 && providers.claude.available && providers.claude.models.length > 0) {
27732
+ found.claude = { ...providers.claude, ...found.claude, models: providers.claude.models };
27733
+ }
27734
+ providers = found;
27718
27735
  const line = JSON.stringify(providers.codex);
27719
27736
  if (line !== loggedCodex) {
27720
27737
  loggedCodex = line;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jpcasabiancai/cayenne",
3
- "version": "0.5.20",
3
+ "version": "0.5.22",
4
4
  "files": [
5
5
  "dist/cli.js"
6
6
  ],