deepline 0.3.579 → 0.3.581

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 (179) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +13 -2
  2. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  3. package/dist/bundling-sources/shared_libs/monitors/billing/public-pricing.ts +470 -15
  4. package/dist/bundling-sources/shared_libs/monitors/billing/tamradar.ts +12 -0
  5. package/dist/bundling-sources/shared_libs/monitors/billing/types.ts +59 -0
  6. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts +5 -3
  7. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +42 -2
  8. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox.ts +49 -11
  9. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-lane.ts +13 -4
  10. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +139 -16
  11. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +39 -2
  12. package/dist/bundling-sources/shared_libs/play-runtime/transient-service-error.ts +12 -0
  13. package/dist/bundling-sources/shared_libs/plays/sandbox-runtime-limits.ts +20 -0
  14. package/dist/cli/{agents-D5RZEVXQ.js → agents-UDTRMWPA.js} +81 -39
  15. package/dist/cli/{agents-FJTRTYCL.mjs → agents-VDQSVDSM.mjs} +51 -9
  16. package/dist/cli/{auth-OMYIDVXZ.mjs → auth-SRN5FXUQ.mjs} +5 -5
  17. package/dist/cli/auth-UYQHRHYR.js +44 -0
  18. package/dist/cli/{billing-EWFUDLQ7.js → billing-HGHIOFSA.js} +162 -159
  19. package/dist/cli/{billing-XK3LBNYS.mjs → billing-PR2SIEJM.mjs} +69 -66
  20. package/dist/cli/{chunk-I2TSRLOI.mjs → chunk-2MIJMDGF.mjs} +1 -1
  21. package/dist/cli/{chunk-TVAFWAOQ.js → chunk-2RLMHWXW.js} +3 -3
  22. package/dist/cli/{chunk-OSRATALX.mjs → chunk-3FMGBMT3.mjs} +1 -1
  23. package/dist/cli/{chunk-KIIOKQFY.mjs → chunk-3I6GA5QW.mjs} +7 -3
  24. package/dist/cli/{chunk-UYCBG75H.js → chunk-3LP7J63L.js} +5 -5
  25. package/dist/cli/{chunk-QA55PGJH.js → chunk-3S5KFHQH.js} +7 -7
  26. package/dist/cli/{chunk-SZIWFQI2.mjs → chunk-46EBSUZF.mjs} +3 -3
  27. package/dist/cli/{chunk-7HOYKXVY.js → chunk-5XVDZVCR.js} +217 -213
  28. package/dist/cli/{chunk-PLWZ3NB7.js → chunk-6U3THMRI.js} +5 -5
  29. package/dist/cli/{chunk-LRZGS6RZ.mjs → chunk-7MMEW2WU.mjs} +1 -1
  30. package/dist/cli/{chunk-KWQHQG53.js → chunk-7VOSQARZ.js} +6 -6
  31. package/dist/cli/{chunk-72TWLORR.js → chunk-A4IOPFEJ.js} +3 -3
  32. package/dist/cli/{chunk-S2OXA7QS.mjs → chunk-ALXIC5U5.mjs} +7 -7
  33. package/dist/cli/{chunk-6EVVUVU3.mjs → chunk-BDNQDWGI.mjs} +2 -2
  34. package/dist/cli/{chunk-HEZW2IDK.js → chunk-BQL34VOQ.js} +279 -276
  35. package/dist/cli/{chunk-FKXSIIR4.js → chunk-BULUFFST.js} +15 -15
  36. package/dist/cli/{chunk-NONMY5CY.mjs → chunk-CDIMI54H.mjs} +2 -2
  37. package/dist/cli/{chunk-NWZU6HL4.js → chunk-CN4MXBZ3.js} +13 -13
  38. package/dist/cli/{chunk-XTM6NOJ6.js → chunk-CNRPE3AE.js} +53 -53
  39. package/dist/cli/{chunk-LYBZLA6F.mjs → chunk-DZMQV5FL.mjs} +2 -2
  40. package/dist/cli/{chunk-NKUXW4WB.js → chunk-E2EGQNOS.js} +2 -2
  41. package/dist/cli/{chunk-BLEYV4BJ.js → chunk-E5ITZIWK.js} +21 -21
  42. package/dist/cli/{chunk-N6X2UKYQ.mjs → chunk-E5O4CMHZ.mjs} +2 -2
  43. package/dist/cli/{chunk-X6LPC3SU.mjs → chunk-EHTD65FE.mjs} +1 -1
  44. package/dist/cli/{chunk-E2G2DNAB.js → chunk-EP3GZAHK.js} +7 -7
  45. package/dist/cli/{chunk-NOMO5GPI.js → chunk-FXSDDEAR.js} +1 -1
  46. package/dist/cli/{chunk-AP7PIGL5.js → chunk-INRXX4SX.js} +41 -41
  47. package/dist/cli/{chunk-XQYBBCFI.mjs → chunk-INXRW5AF.mjs} +2 -2
  48. package/dist/cli/{chunk-7JMCRYXU.js → chunk-IT3F7P6O.js} +10 -10
  49. package/dist/cli/{chunk-LYJ2NSHD.js → chunk-J6ITN2X6.js} +13 -13
  50. package/dist/cli/{chunk-LCPJR3IY.js → chunk-JQK42HZQ.js} +2 -2
  51. package/dist/cli/{chunk-HGUFTSB5.mjs → chunk-KDITCSPN.mjs} +27 -1
  52. package/dist/cli/{chunk-VFIIRK7S.mjs → chunk-KLBIHDZB.mjs} +2 -2
  53. package/dist/cli/{chunk-Y2ND6PPW.js → chunk-KO6OLYSD.js} +48 -48
  54. package/dist/cli/{chunk-K2BU67UC.js → chunk-LJZESBNY.js} +2 -2
  55. package/dist/cli/{chunk-PGRRMVQ5.js → chunk-MOZDEYQC.js} +2 -1
  56. package/dist/cli/{chunk-DH736ASH.js → chunk-MSCYYFLY.js} +20 -20
  57. package/dist/cli/{chunk-JFS4KHA3.mjs → chunk-N5VJVVVV.mjs} +5 -5
  58. package/dist/cli/{chunk-G5CZDRY3.js → chunk-O5FIWG2O.js} +26 -26
  59. package/dist/cli/{chunk-YCWRKSLB.mjs → chunk-OVJWDFIL.mjs} +2 -2
  60. package/dist/cli/{chunk-WQQQP3FH.mjs → chunk-P5ZZY4RM.mjs} +4 -4
  61. package/dist/cli/{chunk-WWSGXX6U.js → chunk-PLGJG5FX.js} +5 -5
  62. package/dist/cli/{chunk-BZ4M7OFO.mjs → chunk-QXQBTTRD.mjs} +1 -1
  63. package/dist/cli/{chunk-F57NDSKT.mjs → chunk-RA3BWUTD.mjs} +5 -5
  64. package/dist/cli/{chunk-Q4VKMF3B.js → chunk-S2YKIWCD.js} +17 -17
  65. package/dist/cli/{chunk-DTQBQSUU.mjs → chunk-SECFDB27.mjs} +1 -0
  66. package/dist/cli/{chunk-6MIEJJSO.js → chunk-SNYH4QY2.js} +4 -4
  67. package/dist/cli/{chunk-6GON36H3.mjs → chunk-SZ76UE7C.mjs} +17 -14
  68. package/dist/cli/{chunk-6DMGKAWO.mjs → chunk-ULU4MEXN.mjs} +2 -2
  69. package/dist/cli/{chunk-ABH6PUDZ.js → chunk-VJR4CKYJ.js} +23 -23
  70. package/dist/cli/{chunk-TFNDOH4W.mjs → chunk-VNW454PP.mjs} +1 -1
  71. package/dist/cli/{chunk-7SZCJC4R.mjs → chunk-VTPMBOHZ.mjs} +2 -2
  72. package/dist/cli/{chunk-6NYHMXC7.mjs → chunk-VVENTTSA.mjs} +1 -1
  73. package/dist/cli/{chunk-OOGP737I.js → chunk-VWPM4OIC.js} +20 -20
  74. package/dist/cli/{chunk-27ZYRIQC.mjs → chunk-WCNJSZHC.mjs} +5 -5
  75. package/dist/cli/{chunk-KQAEXBVQ.mjs → chunk-WS5ZX4RB.mjs} +3 -3
  76. package/dist/cli/{chunk-SUHCW7U5.mjs → chunk-WVFDPC4K.mjs} +3 -3
  77. package/dist/cli/{chunk-44NTNNKC.js → chunk-Y36SQMSN.js} +28 -2
  78. package/dist/cli/{chunk-LV2LGW2Q.mjs → chunk-YTPXKG4C.mjs} +1 -1
  79. package/dist/cli/{chunk-3Z4TVZE7.mjs → chunk-Z3MJX3PP.mjs} +1 -1
  80. package/dist/cli/{chunk-LQ45LCH7.js → chunk-ZAKNDIK7.js} +9 -9
  81. package/dist/cli/{chunk-M4YWN5BT.mjs → chunk-ZTKLJADJ.mjs} +4 -4
  82. package/dist/cli/command-docs.js +4 -4
  83. package/dist/cli/command-docs.mjs +3 -3
  84. package/dist/cli/concurrent-runs-help-QWDTLZUX.js +22 -0
  85. package/dist/cli/{concurrent-runs-help-IQBZBTD5.mjs → concurrent-runs-help-Z27MIIH3.mjs} +6 -6
  86. package/dist/cli/{csv-T7TWLIGD.js → csv-4TP36F5O.js} +13 -13
  87. package/dist/cli/{csv-6BEOWTGM.mjs → csv-4YFTMVWQ.mjs} +4 -4
  88. package/dist/cli/{db-MFTUN3DF.js → db-L5EGGO72.js} +27 -27
  89. package/dist/cli/{db-FA5QGXZ7.mjs → db-U5KR6SYI.mjs} +6 -6
  90. package/dist/cli/describe-G3SUS76P.js +50 -0
  91. package/dist/cli/{describe-TITEQNVE.mjs → describe-LZXXSQ26.mjs} +21 -21
  92. package/dist/cli/describe-core.d.mts +2 -2
  93. package/dist/cli/describe-core.d.ts +2 -2
  94. package/dist/cli/describe-core.js +4 -4
  95. package/dist/cli/describe-core.mjs +3 -3
  96. package/dist/cli/{executions-QW3L7G7J.js → executions-VZKRFDGM.js} +8 -8
  97. package/dist/cli/{executions-DMYJJIRB.mjs → executions-ZWEC5DDR.mjs} +6 -6
  98. package/dist/cli/{feedback-6JZGE7OQ.js → feedback-BTJIJCQF.js} +14 -14
  99. package/dist/cli/{feedback-WPSNSFRC.mjs → feedback-HXQTHXEZ.mjs} +6 -6
  100. package/dist/cli/{git-GO65XRM3.mjs → git-P6A45MMT.mjs} +5 -5
  101. package/dist/cli/git-QU673DBV.js +26 -0
  102. package/dist/cli/index.js +150 -150
  103. package/dist/cli/index.mjs +49 -49
  104. package/dist/cli/{integrations-EEBPETH2.mjs → integrations-4POM2CJ3.mjs} +7 -7
  105. package/dist/cli/{integrations-T5JPSZXN.js → integrations-VSJQBRFS.js} +29 -29
  106. package/dist/cli/{legacy-noops-XDNZ46IR.mjs → legacy-noops-I65MIKH2.mjs} +6 -6
  107. package/dist/cli/{legacy-noops-B55OMNH7.js → legacy-noops-QOJGSGVO.js} +9 -9
  108. package/dist/cli/{mcp-4QIUAAWS.mjs → mcp-TGY6SRAC.mjs} +4 -4
  109. package/dist/cli/{mcp-3YA333TQ.js → mcp-WTKBSLSD.js} +24 -24
  110. package/dist/cli/{monitors-BVUPS4CE.mjs → monitors-E2ENT4RY.mjs} +16 -11
  111. package/dist/cli/{monitors-FOS7MWZO.js → monitors-TLWVEXW6.js} +109 -104
  112. package/dist/cli/{org-TCMRRVFC.mjs → org-J2LGW5ZR.mjs} +6 -6
  113. package/dist/cli/{org-CYM7HFLN.js → org-PZPJJU7K.js} +121 -121
  114. package/dist/cli/{outcomes-2JSWXWQ3.mjs → outcomes-TMJDASU5.mjs} +6 -6
  115. package/dist/cli/{outcomes-VDJVP5YC.js → outcomes-Z6ZNBJ3U.js} +14 -14
  116. package/dist/cli/{play-CPP4EBYF.mjs → play-S3Z24HUS.mjs} +22 -22
  117. package/dist/cli/{play-U3G73VIR.js → play-ZOOC57X4.js} +355 -355
  118. package/dist/cli/{providers-RVMIX5ED.mjs → providers-ETD6YLFL.mjs} +6 -6
  119. package/dist/cli/{providers-2ZB67TK7.js → providers-O4Y2YBS7.js} +9 -9
  120. package/dist/cli/{quickstart-V3Y7XZ47.js → quickstart-NZALIRBP.js} +6 -6
  121. package/dist/cli/{quickstart-L3YO3OWZ.mjs → quickstart-QZX32Y5T.mjs} +4 -4
  122. package/dist/cli/{run-M2CADJ6E.js → run-5UXSWJ7N.js} +48 -48
  123. package/dist/cli/{run-PQ3Z2GOF.mjs → run-HCVBRE2P.mjs} +26 -26
  124. package/dist/cli/search-T3SLR55O.js +32 -0
  125. package/dist/cli/{search-QVLGI7SZ.mjs → search-Z247K76U.mjs} +7 -7
  126. package/dist/cli/{search-output-PN3V7MSO.mjs → search-output-XCJI3XRA.mjs} +5 -5
  127. package/dist/cli/{search-output-IUANVHWU.js → search-output-XFKEGUJA.js} +8 -8
  128. package/dist/cli/{secrets-HK25G4K2.mjs → secrets-7JZXHLRU.mjs} +6 -6
  129. package/dist/cli/{secrets-AOW6F67J.js → secrets-VUQLTUTM.js} +15 -15
  130. package/dist/cli/sessions-GHW2H7N2.js +23 -0
  131. package/dist/cli/{sessions-YN2OIAGR.mjs → sessions-UNGJ342N.mjs} +6 -6
  132. package/dist/cli/{settings-7UW5TWSM.mjs → settings-67TIT4MZ.mjs} +12 -12
  133. package/dist/cli/{settings-6EV2FPGF.js → settings-WG5YNHC5.js} +85 -85
  134. package/dist/cli/{setup-ZQPD2R5K.js → setup-IYUNW5ZP.js} +49 -49
  135. package/dist/cli/{setup-BG56SHKH.mjs → setup-KMAAJOZM.mjs} +9 -9
  136. package/dist/cli/skills-JVLCEUBF.js +37 -0
  137. package/dist/cli/{skills-MQV2TNUZ.mjs → skills-UVS4DODN.mjs} +7 -7
  138. package/dist/cli/{tools-RGI4OE5T.mjs → tools-B42JY4BX.mjs} +19 -19
  139. package/dist/cli/tools-ETA3BJNM.js +57 -0
  140. package/dist/cli/{update-SQKGHQKF.mjs → update-EBYZZ7BW.mjs} +9 -9
  141. package/dist/cli/update-XZEBQCEY.js +37 -0
  142. package/dist/cli/{views-BUKVHCRD.js → views-DOUEKLEV.js} +37 -24
  143. package/dist/cli/{views-734T2CXF.mjs → views-QK3AFD2D.mjs} +21 -8
  144. package/dist/cli/{workflow-LPJC6RHP.js → workflow-TAKT2T7A.js} +17 -17
  145. package/dist/cli/{workflow-JNRRBMEK.mjs → workflow-UBJPGRKF.mjs} +7 -7
  146. package/dist/{client-CNYctEBh.d.mts → client-CmG8MT0x.d.mts} +1 -1
  147. package/dist/{client-C1AubrWJ.d.ts → client-QznpkWrk.d.ts} +1 -1
  148. package/dist/{client-core-D6zAE46g.d.ts → client-core-CXDqfeiB.d.ts} +5 -1
  149. package/dist/{client-core-Bb06TCx5.d.mts → client-core-CY0jNW0e.d.mts} +5 -1
  150. package/dist/index.d.mts +3 -3
  151. package/dist/index.d.ts +3 -3
  152. package/dist/index.js +9 -9
  153. package/dist/index.mjs +6 -6
  154. package/dist/install-integrity.json +130 -130
  155. package/dist/plays/bundle-play-file.mjs +1 -1
  156. package/dist/plays/play-description.d.mts +1 -1
  157. package/dist/plays/play-description.d.ts +1 -1
  158. package/dist/plays/run-request.d.mts +1 -1
  159. package/dist/plays/run-request.d.ts +1 -1
  160. package/dist/release.d.mts +1 -1
  161. package/dist/release.d.ts +1 -1
  162. package/dist/release.js +2 -2
  163. package/dist/release.mjs +1 -1
  164. package/dist/server.d.mts +2 -2
  165. package/dist/server.d.ts +2 -2
  166. package/dist/server.js +5 -5
  167. package/dist/server.mjs +3 -3
  168. package/package.json +1 -1
  169. package/dist/cli/auth-Q4O7MJU4.js +0 -44
  170. package/dist/cli/concurrent-runs-help-D6XH3FY5.js +0 -22
  171. package/dist/cli/describe-TYZ5YH3V.js +0 -50
  172. package/dist/cli/git-UGGRLGTQ.js +0 -26
  173. package/dist/cli/search-RHPPZZFG.js +0 -32
  174. package/dist/cli/sessions-AEGGTZ3K.js +0 -23
  175. package/dist/cli/skills-C6ZEZWBE.js +0 -37
  176. package/dist/cli/tools-PM3MC3RR.js +0 -57
  177. package/dist/cli/update-ZHUPF2HT.js +0 -37
  178. /package/dist/cli/{chunk-YGCKMI5P.js → chunk-2M3VVGMZ.js} +0 -0
  179. /package/dist/cli/{chunk-7I4B6V2S.mjs → chunk-VMGJIFSB.mjs} +0 -0
@@ -1,18 +1,18 @@
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; } var _class; var _class2;
2
2
 
3
3
 
4
- var _chunkOOGP737Ijs = require('./chunk-OOGP737I.js');
4
+ var _chunkVWPM4OICjs = require('./chunk-VWPM4OIC.js');
5
5
 
6
6
 
7
- var _chunkTVAFWAOQjs = require('./chunk-TVAFWAOQ.js');
8
- require('./chunk-6MIEJJSO.js');
7
+ var _chunk2RLMHWXWjs = require('./chunk-2RLMHWXW.js');
8
+ require('./chunk-SNYH4QY2.js');
9
9
  require('./chunk-6VLFQZK6.js');
10
10
  require('./chunk-XNYIZMNQ.js');
11
11
 
12
12
 
13
13
  var _chunkLFQJW4S2js = require('./chunk-LFQJW4S2.js');
14
14
  require('./chunk-CFJFUVX2.js');
15
- require('./chunk-NOMO5GPI.js');
15
+ require('./chunk-FXSDDEAR.js');
16
16
  require('./chunk-OG64RBAC.js');
17
17
  require('./chunk-COGTRVWW.js');
18
18
 
@@ -105,9 +105,42 @@ function describeOutcomeChange(change) {
105
105
  return [
106
106
  role === "home" ? `${where} is the home of outcome ${slug}: ${change.agentName} works toward it there.` : `${where} is linked to outcome ${slug}: ${change.agentName} answers there with it in view.`,
107
107
  role === "linked" ? "It is woken in the outcome\u2019s home channel, not here." : change.woken ? "It is woken when something on the outcome concerns it: a schedule firing, a task for it, an answered ask." : "It is not woken between mentions here: this deployment\u2019s app cannot be rung.",
108
+ ..._optionalChain([change, 'access', _ => _.sync, 'optionalAccess', _2 => _2.on]) ? [
109
+ `${where} and the outcome's feed are copied into each other: what members post there goes on the feed, and what is posted on the outcome appears there. Everyone who can see the outcome reads that channel, even a private one, and guests in that channel read everything copied from the outcome. Turn it off with: deepline agents channels set ${conversation.conversationId} --sync off`
110
+ ] : [],
108
111
  `See the outcome with: deepline outcomes describe ${slug}`
109
112
  ];
110
113
  }
114
+ var SYNC_OFF_REASONS = {
115
+ turned_off: "it is not turned on",
116
+ not_home: "the channel is not an outcome\u2019s home",
117
+ not_slack: "the channel is not in Slack",
118
+ other_workspace: "its outcome is in another workspace",
119
+ agent_name_taken: "its agent is named slack-sync, the name sync writes under",
120
+ agents_off: "agents are off in this workspace",
121
+ not_enabled: "agents or outcomes are not enabled for this workspace",
122
+ no_outcome: "its outcome no longer exists",
123
+ not_installed: "the agent is not installed in that Slack workspace",
124
+ unbound: "the channel is not bound"
125
+ };
126
+ function describeSyncChange(id, change) {
127
+ if (change.sync === "off") {
128
+ return [
129
+ `Sync is off for ${id}: its messages are not copied to the outcome, and entries are not posted there.`
130
+ ];
131
+ }
132
+ if (!change.active) {
133
+ return [
134
+ `Sync is on for ${id}, but nothing is copied while ${_nullishCoalesce(_nullishCoalesce(SYNC_OFF_REASONS[_nullishCoalesce(change.why, () => ( ""))], () => ( change.why)), () => ( "it does not apply"))}.`
135
+ ];
136
+ }
137
+ return [
138
+ `Sync is on for ${id}: people\u2019s messages there go on the outcome\u2019s feed (under their linked Deepline name, else their Slack name), and entries posted on the outcome anywhere else are posted there.`,
139
+ ...change.feedToSlack ? [] : [
140
+ change.refusal ? `Entries are not posted in the channel: ${change.refusal}` : "Entries are not posted in the channel from this deployment: its app cannot be rung."
141
+ ]
142
+ ];
143
+ }
111
144
  function describeAgentLine(agent) {
112
145
  const channels = agent.conversations.length ? agent.conversations.map(describeConversation).join(", ") : "no channels";
113
146
  const skills = agent.skillNames.length ? `skills: ${agent.skillNames.join(", ")}` : "no skills";
@@ -150,7 +183,7 @@ function describeOverview(overview) {
150
183
  ];
151
184
  }
152
185
  function print(payload, title, lines, options) {
153
- _chunkOOGP737Ijs.printCommandEnvelope.call(void 0,
186
+ _chunkVWPM4OICjs.printCommandEnvelope.call(void 0,
154
187
  { ...payload, render: { sections: [{ title, lines }] } },
155
188
  { json: options.json }
156
189
  );
@@ -190,7 +223,7 @@ function parseSkills(value) {
190
223
  function parseSkillFile(text) {
191
224
  const match = /^---\r?\n([\s\S]*?)\r?\n---\r?\n?/.exec(text);
192
225
  if (!match) return { markdown: text, description: null };
193
- const line = _nullishCoalesce(_optionalChain([/^description:\s*(.+)$/m, 'access', _ => _.exec, 'call', _2 => _2(match[1]), 'optionalAccess', _3 => _3[1], 'optionalAccess', _4 => _4.trim, 'call', _5 => _5()]), () => ( null));
226
+ const line = _nullishCoalesce(_optionalChain([/^description:\s*(.+)$/m, 'access', _3 => _3.exec, 'call', _4 => _4(match[1]), 'optionalAccess', _5 => _5[1], 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]), () => ( null));
194
227
  const description = line && /^(['"]).*\1$/.test(line) ? line.slice(1, -1) : line;
195
228
  return { markdown: text.slice(match[0].length), description };
196
229
  }
@@ -244,7 +277,7 @@ async function readModelKey() {
244
277
  return Buffer.concat(chunks).toString("utf8").trim();
245
278
  }
246
279
  async function sendTestMessage(input2) {
247
- const { http } = _chunkOOGP737Ijs.getAuthedHttpClient.call(void 0, );
280
+ const { http } = _chunkVWPM4OICjs.getAuthedHttpClient.call(void 0, );
248
281
  return http.post(
249
282
  `${AGENT_PATH}/test`,
250
283
  {
@@ -287,7 +320,7 @@ function describeReply(channelId, reply, inChat = false) {
287
320
  async function handleTest(channelId, words, options) {
288
321
  const message = words.join(" ").trim();
289
322
  if (!message) throw new AgentUsageError("Pass a message to send.");
290
- const speaker = _optionalChain([options, 'access', _6 => _6.as, 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);
323
+ const speaker = _optionalChain([options, 'access', _8 => _8.as, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]);
291
324
  if (options.as !== void 0 && !TEST_SPEAKER.test(_nullishCoalesce(speaker, () => ( "")))) {
292
325
  throw new AgentUsageError(
293
326
  "--as takes a short name: letters, digits, dot, dash or underscore, at most 40 characters."
@@ -335,7 +368,7 @@ async function handleChat(channelId, options) {
335
368
  threadId = reply.threadId;
336
369
  const text = describeReply(channelId, reply, true).map((line2) => `agent> ${line2}
337
370
  `).join("");
338
- _chunkOOGP737Ijs.printCommandEnvelope.call(void 0, reply, { json: false, text });
371
+ _chunkVWPM4OICjs.printCommandEnvelope.call(void 0, reply, { json: false, text });
339
372
  }
340
373
  } finally {
341
374
  rl.close();
@@ -345,7 +378,7 @@ function registerWorkspaceCommands(agents, readKey) {
345
378
  agents.command("list").description(
346
379
  "Show whether agents are on, their model billing, every agent with its channels, and the skill library."
347
380
  ).option("--json", "Emit JSON output").action(async (options) => {
348
- const { http } = _chunkOOGP737Ijs.getAuthedHttpClient.call(void 0, );
381
+ const { http } = _chunkVWPM4OICjs.getAuthedHttpClient.call(void 0, );
349
382
  const overview = await http.get(AGENT_PATH);
350
383
  print(overview, "deepline agents", describeOverview(overview), options);
351
384
  });
@@ -356,7 +389,7 @@ function registerWorkspaceCommands(agents, readKey) {
356
389
  printDryRun("POST", `${AGENT_PATH}/enable`, {}, options);
357
390
  return;
358
391
  }
359
- const { http } = _chunkOOGP737Ijs.getAuthedHttpClient.call(void 0, );
392
+ const { http } = _chunkVWPM4OICjs.getAuthedHttpClient.call(void 0, );
360
393
  const result = await http.post(
361
394
  `${AGENT_PATH}/enable`,
362
395
  {}
@@ -378,7 +411,7 @@ function registerWorkspaceCommands(agents, readKey) {
378
411
  printDryRun("POST", `${AGENT_PATH}/disable`, {}, options);
379
412
  return;
380
413
  }
381
- const { http } = _chunkOOGP737Ijs.getAuthedHttpClient.call(void 0, );
414
+ const { http } = _chunkVWPM4OICjs.getAuthedHttpClient.call(void 0, );
382
415
  const result = await http.post(
383
416
  `${AGENT_PATH}/disable`,
384
417
  {}
@@ -410,7 +443,7 @@ function registerWorkspaceCommands(agents, readKey) {
410
443
  }
411
444
  const apiKey = await readKey();
412
445
  if (!apiKey) throw new AgentUsageError("No key was given.");
413
- const { http } = _chunkOOGP737Ijs.getAuthedHttpClient.call(void 0, );
446
+ const { http } = _chunkVWPM4OICjs.getAuthedHttpClient.call(void 0, );
414
447
  const overview = await http.put(`${AGENT_PATH}/billing`, {
415
448
  mode: "own_key",
416
449
  provider: _nullishCoalesce(options.provider, () => ( keyProvider(apiKey))),
@@ -422,7 +455,7 @@ function registerWorkspaceCommands(agents, readKey) {
422
455
  agents.command("models").description(
423
456
  "List the models an agent or one of its channels can run on, and which your workspace\u2019s key can run."
424
457
  ).option("--json", "Emit JSON output").action(async (options) => {
425
- const { http } = _chunkOOGP737Ijs.getAuthedHttpClient.call(void 0, );
458
+ const { http } = _chunkVWPM4OICjs.getAuthedHttpClient.call(void 0, );
426
459
  const result = await http.get(
427
460
  `${AGENT_PATH}/models`
428
461
  );
@@ -446,7 +479,7 @@ function registerWorkspaceCommands(agents, readKey) {
446
479
  agents.command("outcomes").description(
447
480
  "List the outcomes Bot by Deepline owns by default (those with no home channel), with what woke it last on each."
448
481
  ).option("--json", "Emit JSON output").action(async (options) => {
449
- const { http } = _chunkOOGP737Ijs.getAuthedHttpClient.call(void 0, );
482
+ const { http } = _chunkVWPM4OICjs.getAuthedHttpClient.call(void 0, );
450
483
  const result = await http.get(
451
484
  `${AGENT_PATH}/outcomes`
452
485
  );
@@ -466,7 +499,7 @@ function registerWorkspaceCommands(agents, readKey) {
466
499
  }
467
500
  function registerAgentCommands(agents) {
468
501
  agents.command("get").description("Show one agent: its instructions, skills and channels.").argument("<name>", "Agent name").option("--json", "Emit JSON output").action(async (name, options) => {
469
- const { http } = _chunkOOGP737Ijs.getAuthedHttpClient.call(void 0, );
502
+ const { http } = _chunkVWPM4OICjs.getAuthedHttpClient.call(void 0, );
470
503
  const result = await http.get(
471
504
  `${AGENT_PATH}/agents/${encodeURIComponent(requireArgument(name, "an agent name"))}`
472
505
  );
@@ -496,7 +529,7 @@ function registerAgentCommands(agents) {
496
529
  printDryRun("POST", `${AGENT_PATH}/agents`, body, options);
497
530
  return;
498
531
  }
499
- const { http } = _chunkOOGP737Ijs.getAuthedHttpClient.call(void 0, );
532
+ const { http } = _chunkVWPM4OICjs.getAuthedHttpClient.call(void 0, );
500
533
  const result = await http.post(
501
534
  `${AGENT_PATH}/agents`,
502
535
  body
@@ -540,7 +573,7 @@ function registerAgentCommands(agents) {
540
573
  printDryRun("PATCH", path, body, options);
541
574
  return;
542
575
  }
543
- const { http } = _chunkOOGP737Ijs.getAuthedHttpClient.call(void 0, );
576
+ const { http } = _chunkVWPM4OICjs.getAuthedHttpClient.call(void 0, );
544
577
  const result = await http.patch(path, body);
545
578
  print(result, "agent updated", describeAgent(result.agent), options);
546
579
  }
@@ -553,7 +586,7 @@ function registerAgentCommands(agents) {
553
586
  printDryRun("DELETE", path, null, options);
554
587
  return;
555
588
  }
556
- const { http } = _chunkOOGP737Ijs.getAuthedHttpClient.call(void 0, );
589
+ const { http } = _chunkVWPM4OICjs.getAuthedHttpClient.call(void 0, );
557
590
  const result = await http.delete(path);
558
591
  print(
559
592
  result,
@@ -596,7 +629,7 @@ function registerChannelCommands(agents) {
596
629
  printDryRun("POST", `${AGENT_PATH}/channels`, body, options);
597
630
  return;
598
631
  }
599
- const { http } = _chunkOOGP737Ijs.getAuthedHttpClient.call(void 0, );
632
+ const { http } = _chunkVWPM4OICjs.getAuthedHttpClient.call(void 0, );
600
633
  const result = await http.post(`${AGENT_PATH}/channels`, body);
601
634
  print(
602
635
  result,
@@ -611,7 +644,7 @@ function registerChannelCommands(agents) {
611
644
  }
612
645
  );
613
646
  channels.command("set").description(
614
- "Change what a bound channel\u2019s agent runs on or works toward there (the agent\u2019s creator or an admin)."
647
+ "Change what a bound channel\u2019s agent runs on or works toward there, or its sync with the outcome (the agent\u2019s creator or an admin)."
615
648
  ).argument("<channel-id>", "A bound channel id").option(
616
649
  "--model <model>",
617
650
  'This channel\u2019s own model, over its agent\u2019s, from deepline agents models ("default" follows the agent again)'
@@ -622,6 +655,9 @@ function registerChannelCommands(agents) {
622
655
  "--linked",
623
656
  "With --outcome: link the channel instead of making it the home"
624
657
  ).option("--no-outcome", "The agent works toward no outcome here").option(
658
+ "--sync <on|off>",
659
+ "Copy this home channel and its outcome\u2019s feed into each other (on by default)"
660
+ ).option(
625
661
  "--platform <platform>",
626
662
  "slack or test, when the id is bound on both"
627
663
  ).option("--dry-run", "Print the request without sending it").option("--json", "Emit JSON output").action(
@@ -629,9 +665,13 @@ function registerChannelCommands(agents) {
629
665
  const platform = requirePlatform(options.platform);
630
666
  const model = parseModel(options.model);
631
667
  const outcome = typeof options.outcome === "string" ? requireArgument(options.outcome, "an outcome name") : options.outcome === false ? null : void 0;
632
- if (model === void 0 && outcome === void 0) {
668
+ const sync = options.sync === void 0 ? void 0 : options.sync.trim().toLowerCase();
669
+ if (sync !== void 0 && sync !== "on" && sync !== "off") {
670
+ throw new AgentUsageError("--sync is on or off.");
671
+ }
672
+ if (model === void 0 && outcome === void 0 && sync === void 0) {
633
673
  throw new AgentUsageError(
634
- "Pass --model, --outcome <outcome> or --no-outcome."
674
+ "Pass --model, --outcome <outcome> or --no-outcome. Or turn its sync with the outcome on or off: --sync on|off."
635
675
  );
636
676
  }
637
677
  if (options.linked && typeof outcome !== "string") {
@@ -642,13 +682,14 @@ function registerChannelCommands(agents) {
642
682
  const body = {
643
683
  ...model !== void 0 ? { model } : {},
644
684
  ...outcome !== void 0 ? { outcome } : {},
645
- ...typeof outcome === "string" ? { outcome_role: options.linked ? "linked" : "home" } : {}
685
+ ...typeof outcome === "string" ? { outcome_role: options.linked ? "linked" : "home" } : {},
686
+ ...sync !== void 0 ? { sync } : {}
646
687
  };
647
688
  if (options.dryRun) {
648
689
  printDryRun("PATCH", path, body, options);
649
690
  return;
650
691
  }
651
- const { http } = _chunkOOGP737Ijs.getAuthedHttpClient.call(void 0, );
692
+ const { http } = _chunkVWPM4OICjs.getAuthedHttpClient.call(void 0, );
652
693
  const result = await http.patch(path, body);
653
694
  print(
654
695
  result,
@@ -657,7 +698,8 @@ function registerChannelCommands(agents) {
657
698
  ...result.model ? [
658
699
  result.model.from === "conversation" ? `${id} runs on ${result.model.model.label} (${result.model.model.id}). Its agent\u2019s other channels are unchanged.` : `${id} follows its agent\u2019s model: ${result.model.model.label} (${result.model.model.id}).`
659
700
  ] : [],
660
- ...result.outcome ? describeOutcomeChange(result.outcome) : []
701
+ ...result.outcome ? describeOutcomeChange(result.outcome) : [],
702
+ ...result.sync ? describeSyncChange(id, result.sync) : []
661
703
  ],
662
704
  options
663
705
  );
@@ -676,7 +718,7 @@ function registerChannelCommands(agents) {
676
718
  printDryRun("DELETE", path, null, options);
677
719
  return;
678
720
  }
679
- const { http } = _chunkOOGP737Ijs.getAuthedHttpClient.call(void 0, );
721
+ const { http } = _chunkVWPM4OICjs.getAuthedHttpClient.call(void 0, );
680
722
  const result = await http.delete(path);
681
723
  print(
682
724
  result,
@@ -712,7 +754,7 @@ function registerSlackCommands(agents) {
712
754
  slack.command("install").description(
713
755
  "Print a link that adds the agent to a Slack workspace (owners and admins). Open it, pick the Slack workspace and approve."
714
756
  ).option("--json", "Emit JSON output").action(async (options) => {
715
- const { http } = _chunkOOGP737Ijs.getAuthedHttpClient.call(void 0, );
757
+ const { http } = _chunkVWPM4OICjs.getAuthedHttpClient.call(void 0, );
716
758
  const result = await http.post(
717
759
  `${AGENT_PATH}/slack/install`,
718
760
  {}
@@ -731,7 +773,7 @@ function registerSlackCommands(agents) {
731
773
  slack.command("link").description(
732
774
  "Say which Slack user you are, with the code from the link the agent showed you in Slack. Your clicks there (answering an ask, connecting a channel) are then made as you."
733
775
  ).argument("<code>", "The code from the link, or the whole link").option("--json", "Emit JSON output").action(async (code, options) => {
734
- const { http } = _chunkOOGP737Ijs.getAuthedHttpClient.call(void 0, );
776
+ const { http } = _chunkVWPM4OICjs.getAuthedHttpClient.call(void 0, );
735
777
  const result = await http.post(`${AGENT_PATH}/slack/link`, { code: slackLinkCode(code) });
736
778
  print(
737
779
  result,
@@ -745,7 +787,7 @@ function registerSlackCommands(agents) {
745
787
  slack.command("unlink").description(
746
788
  "Forget which Slack user you are in this workspace. Your clicks in Slack decide nothing until you link again."
747
789
  ).option("--json", "Emit JSON output").action(async (options) => {
748
- const { http } = _chunkOOGP737Ijs.getAuthedHttpClient.call(void 0, );
790
+ const { http } = _chunkVWPM4OICjs.getAuthedHttpClient.call(void 0, );
749
791
  const result = await http.delete(
750
792
  `${AGENT_PATH}/slack/link`
751
793
  );
@@ -761,7 +803,7 @@ function registerSlackCommands(agents) {
761
803
  slack.command("status").description(
762
804
  "List the Slack workspaces this workspace installed the agent in."
763
805
  ).option("--json", "Emit JSON output").action(async (options) => {
764
- const { http } = _chunkOOGP737Ijs.getAuthedHttpClient.call(void 0, );
806
+ const { http } = _chunkVWPM4OICjs.getAuthedHttpClient.call(void 0, );
765
807
  const result = await http.get(
766
808
  `${AGENT_PATH}/slack/installations`
767
809
  );
@@ -780,7 +822,7 @@ function registerSkillCommands(agents) {
780
822
  "The workspace\u2019s skill library: markdown an agent loads when its description matches the task."
781
823
  );
782
824
  skills.command("get").description("Show one library skill with its markdown.").argument("<name>", "Skill name").option("--json", "Emit JSON output").action(async (name, options) => {
783
- const { http } = _chunkOOGP737Ijs.getAuthedHttpClient.call(void 0, );
825
+ const { http } = _chunkVWPM4OICjs.getAuthedHttpClient.call(void 0, );
784
826
  const result = await http.get(
785
827
  `${AGENT_PATH}/skills/${encodeURIComponent(requireArgument(name, "a skill name"))}`
786
828
  );
@@ -807,7 +849,7 @@ function registerSkillCommands(agents) {
807
849
  async (name, options) => {
808
850
  const parsed = parseSkillFile(readFileOption(options.file, "--file"));
809
851
  const description = _nullishCoalesce(options.description, () => ( parsed.description));
810
- if (!_optionalChain([description, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()])) {
852
+ if (!_optionalChain([description, 'optionalAccess', _11 => _11.trim, 'call', _12 => _12()])) {
811
853
  throw new AgentUsageError(
812
854
  'Pass --description "<when to load it>", or give the file a frontmatter description.'
813
855
  );
@@ -818,7 +860,7 @@ function registerSkillCommands(agents) {
818
860
  printDryRun("PUT", path, body, options);
819
861
  return;
820
862
  }
821
- const { http } = _chunkOOGP737Ijs.getAuthedHttpClient.call(void 0, );
863
+ const { http } = _chunkVWPM4OICjs.getAuthedHttpClient.call(void 0, );
822
864
  const result = await http.put(path, body);
823
865
  print(
824
866
  result,
@@ -841,7 +883,7 @@ function registerSkillCommands(agents) {
841
883
  printDryRun("DELETE", path, null, options);
842
884
  return;
843
885
  }
844
- const { http } = _chunkOOGP737Ijs.getAuthedHttpClient.call(void 0, );
886
+ const { http } = _chunkVWPM4OICjs.getAuthedHttpClient.call(void 0, );
845
887
  const result = await http.delete(path);
846
888
  print(
847
889
  result,
@@ -895,7 +937,7 @@ function registerFeedbackCommand(agents) {
895
937
  params.set("cursor", requireArgument(options.cursor, "--cursor"));
896
938
  }
897
939
  const query = params.toString();
898
- const { http } = _chunkOOGP737Ijs.getAuthedHttpClient.call(void 0, );
940
+ const { http } = _chunkVWPM4OICjs.getAuthedHttpClient.call(void 0, );
899
941
  const page = await http.get(
900
942
  `${AGENT_PATH}/feedback${query ? `?${query}` : ""}`
901
943
  ).catch((error) => {
@@ -958,7 +1000,7 @@ function registerRepliesCommand(agents) {
958
1000
  params.set("cursor", requireArgument(options.cursor, "--cursor"));
959
1001
  }
960
1002
  const query = params.toString();
961
- const { http } = _chunkOOGP737Ijs.getAuthedHttpClient.call(void 0, );
1003
+ const { http } = _chunkVWPM4OICjs.getAuthedHttpClient.call(void 0, );
962
1004
  const page = await http.get(`${AGENT_PATH}/replies${query ? `?${query}` : ""}`).catch((error) => {
963
1005
  if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === REPLIES_INVALID_CURSOR) {
964
1006
  throw new AgentUsageError(`--cursor: ${error.message}`);
@@ -984,13 +1026,13 @@ function registerActivityCommand(agents) {
984
1026
  agents.command("activity").description(
985
1027
  "Sum each agent's replies over the last 7 days: how many, how they ended, median time, tokens and the last reply."
986
1028
  ).option("--json", "Emit JSON output").action(async (options) => {
987
- const { http } = _chunkOOGP737Ijs.getAuthedHttpClient.call(void 0, );
1029
+ const { http } = _chunkVWPM4OICjs.getAuthedHttpClient.call(void 0, );
988
1030
  const activity = await http.get(`${AGENT_PATH}/activity`);
989
1031
  print(activity, "agent activity", describeActivity(activity), options);
990
1032
  });
991
1033
  }
992
1034
  function registerAgentsCommands(program, readKey = readModelKey) {
993
- const agents = program.command("agents", { hidden: !_chunkTVAFWAOQjs.cliFeatureEnabled.call(void 0, AGENT_FEATURE) }).description(
1035
+ const agents = program.command("agents", { hidden: !_chunk2RLMHWXWjs.cliFeatureEnabled.call(void 0, AGENT_FEATURE) }).description(
994
1036
  "Deepline agents in Slack: create agents with instructions and skills, bind channels to them, and talk to them."
995
1037
  );
996
1038
  registerWorkspaceCommands(agents, readKey);
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  getAuthedHttpClient,
3
3
  printCommandEnvelope
4
- } from "./chunk-6DMGKAWO.mjs";
4
+ } from "./chunk-ULU4MEXN.mjs";
5
5
  import {
6
6
  cliFeatureEnabled
7
- } from "./chunk-3Z4TVZE7.mjs";
8
- import "./chunk-I2TSRLOI.mjs";
7
+ } from "./chunk-Z3MJX3PP.mjs";
8
+ import "./chunk-2MIJMDGF.mjs";
9
9
  import "./chunk-ASB47RXJ.mjs";
10
10
  import "./chunk-DLIRSHV6.mjs";
11
11
  import {
12
12
  DeeplineError
13
13
  } from "./chunk-Z3A2S3QM.mjs";
14
14
  import "./chunk-2MGZAI54.mjs";
15
- import "./chunk-6NYHMXC7.mjs";
15
+ import "./chunk-VVENTTSA.mjs";
16
16
  import "./chunk-WZYKRD7T.mjs";
17
17
  import "./chunk-KRD6H754.mjs";
18
18
 
@@ -105,9 +105,42 @@ function describeOutcomeChange(change) {
105
105
  return [
106
106
  role === "home" ? `${where} is the home of outcome ${slug}: ${change.agentName} works toward it there.` : `${where} is linked to outcome ${slug}: ${change.agentName} answers there with it in view.`,
107
107
  role === "linked" ? "It is woken in the outcome\u2019s home channel, not here." : change.woken ? "It is woken when something on the outcome concerns it: a schedule firing, a task for it, an answered ask." : "It is not woken between mentions here: this deployment\u2019s app cannot be rung.",
108
+ ...change.sync?.on ? [
109
+ `${where} and the outcome's feed are copied into each other: what members post there goes on the feed, and what is posted on the outcome appears there. Everyone who can see the outcome reads that channel, even a private one, and guests in that channel read everything copied from the outcome. Turn it off with: deepline agents channels set ${conversation.conversationId} --sync off`
110
+ ] : [],
108
111
  `See the outcome with: deepline outcomes describe ${slug}`
109
112
  ];
110
113
  }
114
+ var SYNC_OFF_REASONS = {
115
+ turned_off: "it is not turned on",
116
+ not_home: "the channel is not an outcome\u2019s home",
117
+ not_slack: "the channel is not in Slack",
118
+ other_workspace: "its outcome is in another workspace",
119
+ agent_name_taken: "its agent is named slack-sync, the name sync writes under",
120
+ agents_off: "agents are off in this workspace",
121
+ not_enabled: "agents or outcomes are not enabled for this workspace",
122
+ no_outcome: "its outcome no longer exists",
123
+ not_installed: "the agent is not installed in that Slack workspace",
124
+ unbound: "the channel is not bound"
125
+ };
126
+ function describeSyncChange(id, change) {
127
+ if (change.sync === "off") {
128
+ return [
129
+ `Sync is off for ${id}: its messages are not copied to the outcome, and entries are not posted there.`
130
+ ];
131
+ }
132
+ if (!change.active) {
133
+ return [
134
+ `Sync is on for ${id}, but nothing is copied while ${SYNC_OFF_REASONS[change.why ?? ""] ?? change.why ?? "it does not apply"}.`
135
+ ];
136
+ }
137
+ return [
138
+ `Sync is on for ${id}: people\u2019s messages there go on the outcome\u2019s feed (under their linked Deepline name, else their Slack name), and entries posted on the outcome anywhere else are posted there.`,
139
+ ...change.feedToSlack ? [] : [
140
+ change.refusal ? `Entries are not posted in the channel: ${change.refusal}` : "Entries are not posted in the channel from this deployment: its app cannot be rung."
141
+ ]
142
+ ];
143
+ }
111
144
  function describeAgentLine(agent) {
112
145
  const channels = agent.conversations.length ? agent.conversations.map(describeConversation).join(", ") : "no channels";
113
146
  const skills = agent.skillNames.length ? `skills: ${agent.skillNames.join(", ")}` : "no skills";
@@ -611,7 +644,7 @@ function registerChannelCommands(agents) {
611
644
  }
612
645
  );
613
646
  channels.command("set").description(
614
- "Change what a bound channel\u2019s agent runs on or works toward there (the agent\u2019s creator or an admin)."
647
+ "Change what a bound channel\u2019s agent runs on or works toward there, or its sync with the outcome (the agent\u2019s creator or an admin)."
615
648
  ).argument("<channel-id>", "A bound channel id").option(
616
649
  "--model <model>",
617
650
  'This channel\u2019s own model, over its agent\u2019s, from deepline agents models ("default" follows the agent again)'
@@ -622,6 +655,9 @@ function registerChannelCommands(agents) {
622
655
  "--linked",
623
656
  "With --outcome: link the channel instead of making it the home"
624
657
  ).option("--no-outcome", "The agent works toward no outcome here").option(
658
+ "--sync <on|off>",
659
+ "Copy this home channel and its outcome\u2019s feed into each other (on by default)"
660
+ ).option(
625
661
  "--platform <platform>",
626
662
  "slack or test, when the id is bound on both"
627
663
  ).option("--dry-run", "Print the request without sending it").option("--json", "Emit JSON output").action(
@@ -629,9 +665,13 @@ function registerChannelCommands(agents) {
629
665
  const platform = requirePlatform(options.platform);
630
666
  const model = parseModel(options.model);
631
667
  const outcome = typeof options.outcome === "string" ? requireArgument(options.outcome, "an outcome name") : options.outcome === false ? null : void 0;
632
- if (model === void 0 && outcome === void 0) {
668
+ const sync = options.sync === void 0 ? void 0 : options.sync.trim().toLowerCase();
669
+ if (sync !== void 0 && sync !== "on" && sync !== "off") {
670
+ throw new AgentUsageError("--sync is on or off.");
671
+ }
672
+ if (model === void 0 && outcome === void 0 && sync === void 0) {
633
673
  throw new AgentUsageError(
634
- "Pass --model, --outcome <outcome> or --no-outcome."
674
+ "Pass --model, --outcome <outcome> or --no-outcome. Or turn its sync with the outcome on or off: --sync on|off."
635
675
  );
636
676
  }
637
677
  if (options.linked && typeof outcome !== "string") {
@@ -642,7 +682,8 @@ function registerChannelCommands(agents) {
642
682
  const body = {
643
683
  ...model !== void 0 ? { model } : {},
644
684
  ...outcome !== void 0 ? { outcome } : {},
645
- ...typeof outcome === "string" ? { outcome_role: options.linked ? "linked" : "home" } : {}
685
+ ...typeof outcome === "string" ? { outcome_role: options.linked ? "linked" : "home" } : {},
686
+ ...sync !== void 0 ? { sync } : {}
646
687
  };
647
688
  if (options.dryRun) {
648
689
  printDryRun("PATCH", path, body, options);
@@ -657,7 +698,8 @@ function registerChannelCommands(agents) {
657
698
  ...result.model ? [
658
699
  result.model.from === "conversation" ? `${id} runs on ${result.model.model.label} (${result.model.model.id}). Its agent\u2019s other channels are unchanged.` : `${id} follows its agent\u2019s model: ${result.model.model.label} (${result.model.model.id}).`
659
700
  ] : [],
660
- ...result.outcome ? describeOutcomeChange(result.outcome) : []
701
+ ...result.outcome ? describeOutcomeChange(result.outcome) : [],
702
+ ...result.sync ? describeSyncChange(id, result.sync) : []
661
703
  ],
662
704
  options
663
705
  );
@@ -14,15 +14,15 @@ import {
14
14
  reportSetupCompleted,
15
15
  resolvePendingAuthClaimForResume,
16
16
  statusBannerLine
17
- } from "./chunk-SUHCW7U5.mjs";
18
- import "./chunk-6DMGKAWO.mjs";
19
- import "./chunk-3Z4TVZE7.mjs";
20
- import "./chunk-I2TSRLOI.mjs";
17
+ } from "./chunk-WVFDPC4K.mjs";
18
+ import "./chunk-ULU4MEXN.mjs";
19
+ import "./chunk-Z3MJX3PP.mjs";
20
+ import "./chunk-2MIJMDGF.mjs";
21
21
  import "./chunk-ASB47RXJ.mjs";
22
22
  import "./chunk-DLIRSHV6.mjs";
23
23
  import "./chunk-Z3A2S3QM.mjs";
24
24
  import "./chunk-2MGZAI54.mjs";
25
- import "./chunk-6NYHMXC7.mjs";
25
+ import "./chunk-VVENTTSA.mjs";
26
26
  import "./chunk-WZYKRD7T.mjs";
27
27
  import "./chunk-KRD6H754.mjs";
28
28
  export {
@@ -0,0 +1,44 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+ var _chunkCNRPE3AEjs = require('./chunk-CNRPE3AE.js');
18
+ require('./chunk-VWPM4OIC.js');
19
+ require('./chunk-2RLMHWXW.js');
20
+ require('./chunk-SNYH4QY2.js');
21
+ require('./chunk-6VLFQZK6.js');
22
+ require('./chunk-XNYIZMNQ.js');
23
+ require('./chunk-LFQJW4S2.js');
24
+ require('./chunk-CFJFUVX2.js');
25
+ require('./chunk-FXSDDEAR.js');
26
+ require('./chunk-OG64RBAC.js');
27
+ require('./chunk-COGTRVWW.js');
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+ exports.EXIT_WORKSPACE_MISMATCH = _chunkCNRPE3AEjs.EXIT_WORKSPACE_MISMATCH; exports.authStatusLine = _chunkCNRPE3AEjs.authStatusLine; exports.clearPendingClaim = _chunkCNRPE3AEjs.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkCNRPE3AEjs.clearSatisfiedPendingClaim; exports.handleRegister = _chunkCNRPE3AEjs.handleRegister; exports.handleStatus = _chunkCNRPE3AEjs.handleStatus; exports.handleWait = _chunkCNRPE3AEjs.handleWait; exports.httpJson = _chunkCNRPE3AEjs.httpJson; exports.readPendingAuthClaim = _chunkCNRPE3AEjs.readPendingAuthClaim; exports.readStatusBanner = _chunkCNRPE3AEjs.readStatusBanner; exports.registerAuthCommands = _chunkCNRPE3AEjs.registerAuthCommands; exports.reportApprovalLinkShown = _chunkCNRPE3AEjs.reportApprovalLinkShown; exports.reportSetupCompleted = _chunkCNRPE3AEjs.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkCNRPE3AEjs.resolvePendingAuthClaimForResume; exports.statusBannerLine = _chunkCNRPE3AEjs.statusBannerLine;