deepline 0.3.394 → 0.3.396

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 (110) hide show
  1. package/dist/bundling-sources/sdk/src/client.ts +30 -162
  2. package/dist/bundling-sources/sdk/src/index.ts +1 -0
  3. package/dist/bundling-sources/sdk/src/plays/play-description.ts +167 -0
  4. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  5. package/dist/bundling-sources/sdk/src/types.ts +1 -0
  6. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +1 -1
  7. package/dist/cli/{auth-OSXDAVCF.mjs → auth-3LTD62VL.mjs} +4 -4
  8. package/dist/cli/auth-562JPKOM.js +39 -0
  9. package/dist/cli/{billing-ZNNKX3UR.mjs → billing-DP7ZAJBO.mjs} +5 -4
  10. package/dist/cli/{billing-EKLYOXUY.js → billing-PA5OXEM5.js} +76 -75
  11. package/dist/cli/{chunk-BP33SIZF.mjs → chunk-23GAA3YO.mjs} +1 -1
  12. package/dist/cli/{chunk-KI635JN4.js → chunk-2VOLOWYZ.js} +1087 -1056
  13. package/dist/cli/{chunk-XXUDVEXK.mjs → chunk-3T4MCB5R.mjs} +1026 -995
  14. package/dist/cli/{chunk-VB6KECLU.mjs → chunk-5WNJF2T3.mjs} +102 -36
  15. package/dist/cli/{chunk-KIUMEOM5.js → chunk-772W2SAU.js} +8 -8
  16. package/dist/cli/{chunk-2MDDA7A4.js → chunk-7Z66NHUC.js} +26 -26
  17. package/dist/cli/{chunk-M57J2SK4.mjs → chunk-AUYXWELC.mjs} +2 -2
  18. package/dist/cli/{chunk-354JCXA2.js → chunk-AVHLATII.js} +50 -50
  19. package/dist/cli/{chunk-MLPU5SMZ.js → chunk-DC6LTULT.js} +2 -2
  20. package/dist/cli/chunk-EIMG75BT.mjs +130 -0
  21. package/dist/cli/{chunk-6YAUMG27.js → chunk-GNN4MY5X.js} +1 -1
  22. package/dist/cli/{chunk-UXFSWG3Q.mjs → chunk-I4T4XAA2.mjs} +4 -4
  23. package/dist/cli/{chunk-MFB2VKBO.mjs → chunk-JCN4DHF7.mjs} +2 -2
  24. package/dist/cli/{chunk-VK6FYZLP.js → chunk-KAEZNPUM.js} +23 -8
  25. package/dist/cli/chunk-KXMNM4AQ.js +130 -0
  26. package/dist/cli/{chunk-XRQ2AQL7.mjs → chunk-LOGGNW4H.mjs} +2 -2
  27. package/dist/cli/{chunk-RDXFGPJU.js → chunk-LWERJUKN.js} +218 -218
  28. package/dist/cli/{chunk-QIQBYKLB.js → chunk-ME6XRFLY.js} +15 -15
  29. package/dist/cli/{chunk-JHIJIHFB.mjs → chunk-MR6XCBQJ.mjs} +23 -131
  30. package/dist/cli/{chunk-TJI2EN6K.mjs → chunk-NHB5YUCS.mjs} +1 -1
  31. package/dist/cli/{chunk-ZMVJSS6N.js → chunk-NSOTASOP.js} +101 -35
  32. package/dist/cli/{chunk-ZYBGA4AR.mjs → chunk-QHGPA362.mjs} +18 -3
  33. package/dist/cli/{chunk-4P27AXEA.js → chunk-RMTASUAK.js} +65 -65
  34. package/dist/cli/{chunk-KGNTKMRG.js → chunk-RTO5QZWT.js} +6 -6
  35. package/dist/cli/{chunk-X63FDZJZ.mjs → chunk-TLQ3FZOC.mjs} +3 -3
  36. package/dist/cli/{chunk-CS6RAIVY.js → chunk-V7UP2F4U.js} +4 -4
  37. package/dist/cli/{chunk-FJGW5GXU.mjs → chunk-VE3U3SQC.mjs} +1 -1
  38. package/dist/cli/{chunk-E23BQ5SC.js → chunk-WQJJNIMQ.js} +241 -349
  39. package/dist/cli/{chunk-NR3DFKNF.mjs → chunk-XKZXO7D3.mjs} +1 -1
  40. package/dist/cli/{csv-5AXRB35H.mjs → csv-RLRR74RQ.mjs} +3 -3
  41. package/dist/cli/{csv-LU7O75WE.js → csv-TF576S77.js} +12 -12
  42. package/dist/cli/{db-F7YTFKVM.js → db-FDBJUTFO.js} +30 -29
  43. package/dist/cli/{db-7XP5UWEW.mjs → db-XORGNBIC.mjs} +5 -4
  44. package/dist/cli/{describe-K4ES5LIL.mjs → describe-6O2ENKTP.mjs} +86 -67
  45. package/dist/cli/{describe-FRH32RDV.js → describe-EFWNECHI.js} +100 -81
  46. package/dist/cli/{executions-RZV5XPT2.js → executions-SFYAXPF4.js} +7 -6
  47. package/dist/cli/{executions-IEHEHJUO.mjs → executions-YPP7WR77.mjs} +5 -4
  48. package/dist/cli/{feedback-3P65QTX3.js → feedback-5UZFYMGB.js} +7 -7
  49. package/dist/cli/{feedback-FPUVZBAN.mjs → feedback-RBGA5ARU.mjs} +3 -3
  50. package/dist/cli/git-5LDY5ZID.js +23 -0
  51. package/dist/cli/{git-GLVVP7TY.mjs → git-IRSAJEK2.mjs} +4 -4
  52. package/dist/cli/index.js +93 -93
  53. package/dist/cli/index.mjs +42 -42
  54. package/dist/cli/{legacy-noops-XKSGZR7Q.js → legacy-noops-CVAOQY2F.js} +7 -7
  55. package/dist/cli/{legacy-noops-3MOI6NBM.mjs → legacy-noops-NA7N6ZOU.mjs} +4 -4
  56. package/dist/cli/{monitors-NZ2DYNST.js → monitors-4OMRXCXP.js} +86 -85
  57. package/dist/cli/{monitors-FTBGNEFG.mjs → monitors-ILZ2XHYG.mjs} +5 -4
  58. package/dist/cli/{org-V2J5RBCN.mjs → org-QDDXAE3J.mjs} +5 -4
  59. package/dist/cli/{org-MCKDQXIV.js → org-YGNJDD2X.js} +65 -64
  60. package/dist/cli/{chunk-RBJYWRCF.js → play-L535H26U.js} +270 -325
  61. package/dist/cli/{chunk-5BB2RGAX.mjs → play-VT6OHB2D.mjs} +77 -132
  62. package/dist/cli/{providers-2JEZ2264.js → providers-GPZ6PQAL.js} +8 -7
  63. package/dist/cli/{providers-I6RQJZFZ.mjs → providers-KG4W5MPK.mjs} +5 -4
  64. package/dist/cli/{quickstart-BIDQDMO4.mjs → quickstart-2JDGTXIG.mjs} +3 -3
  65. package/dist/cli/{quickstart-GJ2RPDU3.js → quickstart-UI27S5LO.js} +5 -5
  66. package/dist/cli/search-MGWROZ33.js +28 -0
  67. package/dist/cli/{search-ELRXFWG5.mjs → search-PW3RAUX7.mjs} +6 -5
  68. package/dist/cli/{secrets-SQXGZXIC.mjs → secrets-HNOMK5A2.mjs} +5 -4
  69. package/dist/cli/{secrets-53IT6VXD.js → secrets-WFAXOUZE.js} +14 -13
  70. package/dist/cli/{sessions-CAV5M77Y.js → sessions-366KROUA.js} +5 -5
  71. package/dist/cli/{sessions-2X5QF7SL.mjs → sessions-XLX3E5UO.mjs} +4 -4
  72. package/dist/cli/{settings-532WNAZO.js → settings-GADAG2UK.js} +75 -74
  73. package/dist/cli/{settings-7P67VGCJ.mjs → settings-YNZ4YKCH.mjs} +8 -7
  74. package/dist/cli/{setup-QGGBV2LE.mjs → setup-PSEHIUXO.mjs} +6 -6
  75. package/dist/cli/{setup-6L2VSUWJ.js → setup-R5YO7GT6.js} +41 -41
  76. package/dist/cli/skills-JF2LPEGM.js +28 -0
  77. package/dist/cli/{skills-3FE62WBG.mjs → skills-LTQBP6CZ.mjs} +4 -4
  78. package/dist/cli/tools-CP2PEFRN.js +34 -0
  79. package/dist/cli/{tools-DMR25DEF.mjs → tools-UAXDWU63.mjs} +11 -18
  80. package/dist/cli/update-HZHZOU6C.js +28 -0
  81. package/dist/cli/{update-6RZMHJZP.mjs → update-SMNIBIMS.mjs} +6 -6
  82. package/dist/cli/{workflow-TX4F2PIX.js → workflow-AOQVZHMD.js} +16 -15
  83. package/dist/cli/{workflow-L2DQRE6R.mjs → workflow-IKGMBGF6.mjs} +6 -5
  84. package/dist/{client-C3O1Ipf3.d.ts → client-Bgis7F6-.d.ts} +22 -12
  85. package/dist/{client-BktIPdIj.d.mts → client-DiGl8ska.d.mts} +22 -12
  86. package/dist/index.d.mts +2 -2
  87. package/dist/index.d.ts +2 -2
  88. package/dist/index.js +11 -10
  89. package/dist/index.mjs +9 -8
  90. package/dist/install-integrity.json +83 -78
  91. package/dist/plays/play-description.d.mts +6 -0
  92. package/dist/plays/play-description.d.ts +6 -0
  93. package/dist/plays/play-description.js +11 -0
  94. package/dist/plays/play-description.mjs +11 -0
  95. package/dist/plays/run-request.d.mts +1 -1
  96. package/dist/plays/run-request.d.ts +1 -1
  97. package/dist/release.d.mts +1 -1
  98. package/dist/release.d.ts +1 -1
  99. package/dist/release.js +2 -2
  100. package/dist/release.mjs +1 -1
  101. package/package.json +6 -1
  102. package/dist/cli/auth-IHKISLJQ.js +0 -39
  103. package/dist/cli/git-MFFAWVVX.js +0 -23
  104. package/dist/cli/play-AJFGME3B.mjs +0 -158
  105. package/dist/cli/play-WLSN2EO2.js +0 -158
  106. package/dist/cli/search-5VN4YD4I.js +0 -27
  107. package/dist/cli/skills-S6NPZAN7.js +0 -28
  108. package/dist/cli/tools-647RLXQS.js +0 -41
  109. package/dist/cli/update-WVTSC3EM.js +0 -28
  110. package/dist/cli/{chunk-KZZC33PY.mjs → chunk-H5KLUGY7.mjs} +214 -214
@@ -1,6 +1,9 @@
1
1
  import {
2
2
  shellQuote
3
3
  } from "./chunk-OVDNJAJN.mjs";
4
+ import {
5
+ cloneEditStarter
6
+ } from "./chunk-EIMG75BT.mjs";
4
7
 
5
8
  // src/cli/described.ts
6
9
  var SHAPE = "{}";
@@ -617,42 +620,66 @@ function describedJson(described, view) {
617
620
  ...hidden.length ? { hidden } : {}
618
621
  };
619
622
  }
620
-
621
- // src/cli/execution-observation.ts
622
- import { writeFileSync, renameSync } from "fs";
623
- function writeObservation(observation) {
624
- const path = process.env.DEEPLINE_EXECUTION_OBSERVATION_PATH;
625
- const invocationId = process.env.DEEPLINE_EXECUTION_OBSERVATION_ID;
626
- if (!path || !invocationId) return;
627
- const pending = `${path}.pending`;
628
- writeFileSync(
629
- pending,
630
- JSON.stringify({
631
- schema_version: 1,
632
- invocation_id: invocationId,
633
- ...observation
634
- }),
635
- { mode: 384 }
636
- );
637
- renameSync(pending, path);
638
- }
639
- function recordApiResponse(observation) {
640
- writeObservation({
641
- kind: "api_response",
642
- received_at_ms: observation.receivedAtMs,
643
- state: observation.state,
644
- http_status: observation.httpStatus
645
- });
623
+ function buildPlayDashboardUrl(baseUrl, playName) {
624
+ const trimmedBase = baseUrl.replace(/\/$/, "");
625
+ const encodedPlayName = encodeURIComponent(playName);
626
+ return `${trimmedBase}/dashboard/plays/${encodedPlayName}`;
646
627
  }
647
- function recordPlayTermination(run) {
648
- if (typeof run.id !== "string" || !["completed", "failed", "cancelled", "canceled"].includes(
649
- String(run.status)
650
- ) || typeof run.finishedAt !== "number" || !Number.isSafeInteger(run.finishedAt) || run.finishedAt <= 0)
651
- return;
652
- writeObservation({
653
- kind: "play_terminal",
654
- run: { id: run.id, status: run.status, finishedAt: run.finishedAt }
628
+ function describedPlay(play) {
629
+ const reference = play.reference || play.name;
630
+ const starter = play.cloneEditStarter ?? cloneEditStarter(play);
631
+ const csv = play.csvInput ?? {};
632
+ const csvField = typeof csv.inputField === "string" ? csv.inputField : "csv";
633
+ const alongside = /* @__PURE__ */ new Set([
634
+ csvField,
635
+ "columns",
636
+ ...Array.isArray(csv.runLevelControlFields) ? csv.runLevelControlFields.map(String) : []
637
+ ]);
638
+ const declared = schemaFields(play.inputSchema).map((field) => field.name);
639
+ const rowNames = schemaFields(csv.rowInputSchema).map((field) => field.name);
640
+ const replaced = play.csvInput ? (rowNames.length > 0 ? rowNames : declared).filter(
641
+ (name) => declared.includes(name) && !alongside.has(name)
642
+ ) : [];
643
+ const exclusive = replaced.length ? { field: csvField, with: replaced } : void 0;
644
+ const headers = isRecord(csv.defaultColumns) ? csv.defaultColumns : {};
645
+ const rowInputs = schemaFields(csv.rowInputSchema).map((field) => {
646
+ const header = [headers[field.name]].flat().filter((name) => name && name !== field.name).join(" or ");
647
+ return header ? {
648
+ ...field,
649
+ description: [field.description, `CSV header: ${header}`].filter(Boolean).join(" - ")
650
+ } : field;
655
651
  });
652
+ const rowOutput = play.rowOutputSchema ?? {};
653
+ const added = isRecord(rowOutput.addedColumns) ? rowOutput.addedColumns : {};
654
+ const rowOutputs = schemaFields(
655
+ Object.keys(added).length ? { properties: added } : rowOutput
656
+ ).map((field) => ({ ...field, required: true }));
657
+ return {
658
+ kind: play.ownerType === "deepline" ? "prebuilt_play" : "custom_play",
659
+ id: reference,
660
+ ...play.displayName && play.displayName !== play.name ? { displayName: play.displayName } : {},
661
+ ...play.description ? { description: play.description } : {},
662
+ ...play.observedCost ? { cost: play.observedCost.displayText } : {},
663
+ guidance: [],
664
+ inputs: schemaFields(play.inputSchema),
665
+ outputs: schemaFields(play.outputSchema),
666
+ ...rowInputs.length ? { rowInputs } : {},
667
+ ...typeof csv.inputField === "string" ? { csvInput: csv.inputField } : {},
668
+ ...rowOutputs.length ? {
669
+ rowOutputs,
670
+ rowOutputsAddToSource: Object.keys(added).length > 0 || rowOutput.preservesSourceColumns === true
671
+ } : {},
672
+ runner: {
673
+ via: "play",
674
+ reference,
675
+ // A CSV play's run command is built by the server around its columns.
676
+ ...play.csvInput ? { cli: play.runCommand } : {}
677
+ },
678
+ ...starter ? { source: starter.command } : {},
679
+ ...exclusive ? { exclusive } : {},
680
+ // A prebuilt's cost is what its recent runs were charged; there is no rate.
681
+ ...play.observedCost?.displayText ? { cost: play.observedCost.displayText } : {}
682
+ };
656
683
  }
657
684
 
658
685
  // src/cli/describe-options.ts
@@ -697,6 +724,43 @@ function addDescribeOptions(command, options = {}) {
697
724
  return command;
698
725
  }
699
726
 
727
+ // src/cli/execution-observation.ts
728
+ import { writeFileSync, renameSync } from "fs";
729
+ function writeObservation(observation) {
730
+ const path = process.env.DEEPLINE_EXECUTION_OBSERVATION_PATH;
731
+ const invocationId = process.env.DEEPLINE_EXECUTION_OBSERVATION_ID;
732
+ if (!path || !invocationId) return;
733
+ const pending = `${path}.pending`;
734
+ writeFileSync(
735
+ pending,
736
+ JSON.stringify({
737
+ schema_version: 1,
738
+ invocation_id: invocationId,
739
+ ...observation
740
+ }),
741
+ { mode: 384 }
742
+ );
743
+ renameSync(pending, path);
744
+ }
745
+ function recordApiResponse(observation) {
746
+ writeObservation({
747
+ kind: "api_response",
748
+ received_at_ms: observation.receivedAtMs,
749
+ state: observation.state,
750
+ http_status: observation.httpStatus
751
+ });
752
+ }
753
+ function recordPlayTermination(run) {
754
+ if (typeof run.id !== "string" || !["completed", "failed", "cancelled", "canceled"].includes(
755
+ String(run.status)
756
+ ) || typeof run.finishedAt !== "number" || !Number.isSafeInteger(run.finishedAt) || run.finishedAt <= 0)
757
+ return;
758
+ writeObservation({
759
+ kind: "play_terminal",
760
+ run: { id: run.id, status: run.status, finishedAt: run.finishedAt }
761
+ });
762
+ }
763
+
700
764
  export {
701
765
  byokLines,
702
766
  SCHEMA_LINE_LIMIT,
@@ -708,7 +772,9 @@ export {
708
772
  describedLines,
709
773
  topLevelField,
710
774
  describedJson,
775
+ buildPlayDashboardUrl,
776
+ describedPlay,
777
+ addDescribeOptions,
711
778
  recordApiResponse,
712
- recordPlayTermination,
713
- addDescribeOptions
779
+ recordPlayTermination
714
780
  };
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkKGNTKMRGjs = require('./chunk-KGNTKMRG.js');
4
+ var _chunkRTO5QZWTjs = require('./chunk-RTO5QZWT.js');
5
5
 
6
6
 
7
- var _chunkCS6RAIVYjs = require('./chunk-CS6RAIVY.js');
7
+ var _chunkV7UP2F4Ujs = require('./chunk-V7UP2F4U.js');
8
8
 
9
9
  // src/cli/commands/sessions.ts
10
10
 
@@ -139,7 +139,7 @@ function currentSessionFile(agent) {
139
139
  const newestFirst = listSessionFiles(agent).sort(
140
140
  (a, b) => b.mtimeMs - a.mtimeMs
141
141
  );
142
- const sessionId = _chunkCS6RAIVYjs.agentSessionIdFromEnvironment.call(void 0, );
142
+ const sessionId = _chunkV7UP2F4Ujs.agentSessionIdFromEnvironment.call(void 0, );
143
143
  const cwd = process.cwd();
144
144
  return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(newestFirst.find((candidate) => candidate.sessionId === sessionId), () => ( newestFirst.find(
145
145
  (candidate) => sessionStartedInDirectory(candidate, cwd)
@@ -448,7 +448,7 @@ function buildSessionUploadContent(raw) {
448
448
  return { encodedContent: encoded, needsChunking: true };
449
449
  }
450
450
  async function uploadPayload(path, payload) {
451
- const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
451
+ const { http } = _chunkRTO5QZWTjs.getAuthedHttpClient.call(void 0, );
452
452
  return await http.post(path, payload);
453
453
  }
454
454
  async function uploadChunkedSessions(sessions, options) {
@@ -481,7 +481,7 @@ async function uploadChunkedSessions(sessions, options) {
481
481
  ...options.rating ? { rating: options.rating } : {}
482
482
  });
483
483
  const sessionIds = sessions.map((session) => session.sessionId);
484
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
484
+ _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
485
485
  {
486
486
  ...response,
487
487
  ok: true,
@@ -513,7 +513,7 @@ async function handleSessionsSend(options) {
513
513
  filename: _path.basename.call(void 0, filePath),
514
514
  ...rating ? { rating } : {}
515
515
  });
516
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
516
+ _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
517
517
  {
518
518
  ...response2,
519
519
  ok: true,
@@ -563,7 +563,7 @@ async function handleSessionsSend(options) {
563
563
  ...rating ? { rating } : {}
564
564
  });
565
565
  const sessionIds = built.map((session) => session.sessionId);
566
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
566
+ _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
567
567
  {
568
568
  ...response,
569
569
  ok: true,
@@ -671,7 +671,7 @@ ${refreshMeta}
671
671
  </body>
672
672
  </html>`;
673
673
  _fs.writeFileSync.call(void 0, outputPath, html, "utf8");
674
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
674
+ _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
675
675
  {
676
676
  ok: true,
677
677
  file: outputPath,
@@ -2,10 +2,10 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkKGNTKMRGjs = require('./chunk-KGNTKMRG.js');
5
+ var _chunkRTO5QZWTjs = require('./chunk-RTO5QZWT.js');
6
6
 
7
7
 
8
- var _chunkCS6RAIVYjs = require('./chunk-CS6RAIVY.js');
8
+ var _chunkV7UP2F4Ujs = require('./chunk-V7UP2F4U.js');
9
9
 
10
10
  // src/cli/commands/git.ts
11
11
  function shellQuote(value) {
@@ -32,11 +32,11 @@ function renderDeployment(deployment) {
32
32
  return `${deployment.id} ${source} (${kind}) - ${deployment.status}${suffix}`;
33
33
  }
34
34
  async function handleList(options) {
35
- const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
35
+ const { http } = _chunkRTO5QZWTjs.getAuthedHttpClient.call(void 0, );
36
36
  const payload = await http.get(
37
37
  `/api/v2/play-projects${options.all ? "?includeDisabled=1" : ""}`
38
38
  );
39
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
39
+ _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
40
40
  {
41
41
  projects: payload.projects,
42
42
  count: payload.projects.length,
@@ -73,7 +73,7 @@ function describeInstallationStatus(installation) {
73
73
  }
74
74
  }
75
75
  async function handleStatus(options) {
76
- const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
76
+ const { http } = _chunkRTO5QZWTjs.getAuthedHttpClient.call(void 0, );
77
77
  const payload = await http.get("/api/v2/github/installation");
78
78
  const installation = payload.installation;
79
79
  const others = (_nullishCoalesce(payload.installations, () => ( []))).filter(
@@ -136,7 +136,7 @@ async function handleStatus(options) {
136
136
  )
137
137
  );
138
138
  }
139
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
139
+ _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
140
140
  {
141
141
  installation,
142
142
  installations: _nullishCoalesce(payload.installations, () => ( [])),
@@ -147,10 +147,10 @@ async function handleStatus(options) {
147
147
  );
148
148
  }
149
149
  async function handleRepos(options) {
150
- const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
150
+ const { http } = _chunkRTO5QZWTjs.getAuthedHttpClient.call(void 0, );
151
151
  const query = options.installation ? `?installationId=${encodeURIComponent(options.installation)}` : "";
152
152
  const payload = await http.get(`/api/v2/github/repos${query}`);
153
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
153
+ _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
154
154
  {
155
155
  installation: payload.installation,
156
156
  repositories: payload.repositories,
@@ -171,7 +171,7 @@ async function handleRepos(options) {
171
171
  }
172
172
  async function resolveRepoId(repo, installation) {
173
173
  if (/^\d+$/.test(repo)) return Number(repo);
174
- const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
174
+ const { http } = _chunkRTO5QZWTjs.getAuthedHttpClient.call(void 0, );
175
175
  const query = installation ? `?installationId=${encodeURIComponent(installation)}` : "";
176
176
  const payload = await http.get(
177
177
  `/api/v2/github/repos${query}`
@@ -188,7 +188,7 @@ async function resolveRepoId(repo, installation) {
188
188
  }
189
189
  async function handleLink(repo, options) {
190
190
  const repoId = await resolveRepoId(repo, options.installation);
191
- const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
191
+ const { http } = _chunkRTO5QZWTjs.getAuthedHttpClient.call(void 0, );
192
192
  const payload = await http.post("/api/v2/play-projects", {
193
193
  repoId,
194
194
  ...options.installation !== void 0 ? { installationId: options.installation } : {},
@@ -197,7 +197,7 @@ async function handleLink(repo, options) {
197
197
  ...options.branch !== void 0 ? { productionBranch: options.branch } : {},
198
198
  ...options.prChecks !== void 0 ? { checkOnPullRequest: options.prChecks } : {}
199
199
  });
200
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
200
+ _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
201
201
  {
202
202
  project: payload.project,
203
203
  render: {
@@ -220,11 +220,11 @@ async function handleLink(repo, options) {
220
220
  );
221
221
  }
222
222
  async function handleGet(id, options) {
223
- const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
223
+ const { http } = _chunkRTO5QZWTjs.getAuthedHttpClient.call(void 0, );
224
224
  const payload = await http.get(
225
225
  `/api/v2/play-projects/${encodeURIComponent(id)}`
226
226
  );
227
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
227
+ _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
228
228
  {
229
229
  project: payload.project,
230
230
  render: {
@@ -240,7 +240,7 @@ async function handleGet(id, options) {
240
240
  );
241
241
  }
242
242
  async function handleSet(id, options) {
243
- const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
243
+ const { http } = _chunkRTO5QZWTjs.getAuthedHttpClient.call(void 0, );
244
244
  const payload = await http.patch(
245
245
  `/api/v2/play-projects/${encodeURIComponent(id)}`,
246
246
  {
@@ -251,7 +251,7 @@ async function handleSet(id, options) {
251
251
  ...options.disabled !== void 0 ? { disabled: options.disabled } : {}
252
252
  }
253
253
  );
254
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
254
+ _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
255
255
  {
256
256
  project: payload.project,
257
257
  render: {
@@ -264,9 +264,9 @@ async function handleSet(id, options) {
264
264
  );
265
265
  }
266
266
  async function handleUnlink(id, options) {
267
- const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
267
+ const { http } = _chunkRTO5QZWTjs.getAuthedHttpClient.call(void 0, );
268
268
  await http.delete(`/api/v2/play-projects/${encodeURIComponent(id)}`);
269
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
269
+ _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
270
270
  {
271
271
  ok: true,
272
272
  id,
@@ -286,10 +286,10 @@ async function handleUnlink(id, options) {
286
286
  );
287
287
  }
288
288
  async function handleConnect(options) {
289
- const baseUrl = _chunkCS6RAIVYjs.resolveBaseUrlOnly.call(void 0, );
289
+ const baseUrl = _chunkV7UP2F4Ujs.resolveBaseUrlOnly.call(void 0, );
290
290
  const connectUrl = `${baseUrl.replace(/\/$/, "")}/api/v2/github/connect`;
291
- const opened = _chunkKGNTKMRGjs.openInBrowser.call(void 0, connectUrl);
292
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
291
+ const opened = _chunkRTO5QZWTjs.openInBrowser.call(void 0, connectUrl);
292
+ _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
293
293
  {
294
294
  connectUrl,
295
295
  browser: opened,
@@ -311,7 +311,7 @@ async function handleConnect(options) {
311
311
  );
312
312
  }
313
313
  async function handleDeploymentsList(options) {
314
- const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
314
+ const { http } = _chunkRTO5QZWTjs.getAuthedHttpClient.call(void 0, );
315
315
  const query = new URLSearchParams();
316
316
  if (options.repo) query.set("projectId", options.repo);
317
317
  if (options.limit) query.set("limit", options.limit);
@@ -319,7 +319,7 @@ async function handleDeploymentsList(options) {
319
319
  const payload = await http.get(
320
320
  `/api/v2/deployments${suffix}`
321
321
  );
322
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
322
+ _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
323
323
  {
324
324
  deployments: payload.deployments,
325
325
  count: payload.deployments.length,
@@ -363,12 +363,12 @@ function renderDeploymentMonitorLines(results) {
363
363
  ]);
364
364
  }
365
365
  async function handleDeploymentGet(id, options) {
366
- const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
366
+ const { http } = _chunkRTO5QZWTjs.getAuthedHttpClient.call(void 0, );
367
367
  const payload = await http.get(`/api/v2/deployments/${encodeURIComponent(id)}`);
368
368
  const playLines = renderDeploymentPlayLines(payload.deployment.results);
369
369
  const monitorLines = renderDeploymentMonitorLines(payload.deployment.results);
370
370
  const repository = _nullishCoalesce(_optionalChain([payload, 'access', _10 => _10.project, 'optionalAccess', _11 => _11.repoFullName]), () => ( payload.deployment.repoFullName));
371
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
371
+ _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
372
372
  {
373
373
  deployment: payload.deployment,
374
374
  project: payload.project,
@@ -387,9 +387,9 @@ async function handleDeploymentGet(id, options) {
387
387
  );
388
388
  }
389
389
  async function handleDeploymentCancel(id, options) {
390
- const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
390
+ const { http } = _chunkRTO5QZWTjs.getAuthedHttpClient.call(void 0, );
391
391
  const payload = await http.post(`/api/v2/deployments/${encodeURIComponent(id)}/cancel`, {});
392
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
392
+ _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
393
393
  {
394
394
  cancelled: payload.cancelled,
395
395
  deployment: payload.deployment,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  getAuthedHttpClient,
3
3
  printCommandEnvelope
4
- } from "./chunk-NR3DFKNF.mjs";
4
+ } from "./chunk-XKZXO7D3.mjs";
5
5
  import {
6
6
  agentSessionIdFromEnvironment
7
- } from "./chunk-FJGW5GXU.mjs";
7
+ } from "./chunk-VE3U3SQC.mjs";
8
8
 
9
9
  // src/cli/commands/sessions.ts
10
10
  import {