agentix-cli 0.212.0 → 0.213.0

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 (143) hide show
  1. package/dist/{App-WS5BTNNP.js → App-5CLRBC3C.js} +2 -2
  2. package/dist/{ChatApp-DRMZZ3RJ.js → ChatApp-LDNQVD2C.js} +2 -2
  3. package/dist/{absorb-eval-IZOPUQE7.js → absorb-eval-JWQPGUJS.js} +2 -2
  4. package/dist/{adapter-3JMPFQ25.js → adapter-AOKK2LFM.js} +2 -2
  5. package/dist/{agent-YA2EBSW4.js → agent-TF6XQQGV.js} +2 -2
  6. package/dist/{board-dashboard-KFEVHD3Z.js → board-dashboard-LDMIS7MM.js} +4 -4
  7. package/dist/{chunk-4FL6B3B7.js → chunk-36RIIHPS.js} +106 -105
  8. package/dist/chunk-36RIIHPS.js.map +1 -0
  9. package/dist/{chunk-EJXHHFZJ.js → chunk-4W5KRZTT.js} +2 -2
  10. package/dist/chunk-7JWMLYOA.js +115 -0
  11. package/dist/chunk-7JWMLYOA.js.map +1 -0
  12. package/dist/{chunk-ZD2DD7I2.js → chunk-BERSMN6Y.js} +2 -2
  13. package/dist/{chunk-5E6JVFHV.js → chunk-BU6V75KD.js} +2 -2
  14. package/dist/{chunk-UZEH2A2F.js → chunk-CUCIMPFI.js} +2 -2
  15. package/dist/{chunk-DD4YKQGF.js → chunk-D3FIIEDR.js} +2 -2
  16. package/dist/{chunk-XUOFCIAE.js → chunk-D6H4DH32.js} +2 -2
  17. package/dist/{chunk-6LOXNAZD.js → chunk-DGCYMSXU.js} +2 -2
  18. package/dist/{chunk-BITJXYHB.js → chunk-DNPPPUDP.js} +2 -2
  19. package/dist/{chunk-27DVJFFR.js → chunk-DPA3IOMU.js} +2 -2
  20. package/dist/{chunk-EGKAE6VD.js → chunk-DSUL5L3T.js} +2 -2
  21. package/dist/{chunk-SYEC2RCV.js → chunk-EE5RZDQE.js} +2 -2
  22. package/dist/{chunk-KUB5F67E.js → chunk-ERKK22QV.js} +2 -2
  23. package/dist/{chunk-ETDYJ52Z.js → chunk-FCF47R4W.js} +3 -3
  24. package/dist/{chunk-RFMBLJN3.js → chunk-G3GFE3GK.js} +2 -2
  25. package/dist/{chunk-W7D2N55Y.js → chunk-I722PWJE.js} +2 -2
  26. package/dist/{chunk-QDZWSALI.js → chunk-IXV3BPUZ.js} +2 -2
  27. package/dist/{chunk-2PYRRBLW.js → chunk-KU3ZF3WO.js} +2 -2
  28. package/dist/{chunk-6UVU47FA.js → chunk-MOATCFT5.js} +2 -2
  29. package/dist/{chunk-6KAP6IHP.js → chunk-N7IX77SL.js} +2 -2
  30. package/dist/{chunk-YXGYLWD5.js → chunk-NWE3B245.js} +2 -2
  31. package/dist/{chunk-PJHJFZJ4.js → chunk-NZFWW2YG.js} +270 -270
  32. package/dist/chunk-NZFWW2YG.js.map +1 -0
  33. package/dist/{chunk-VZFFEGVQ.js → chunk-O4WFPH6H.js} +2 -2
  34. package/dist/{chunk-X5UWEMFI.js → chunk-UWDDVDU6.js} +2 -2
  35. package/dist/{chunk-X5UWEMFI.js.map → chunk-UWDDVDU6.js.map} +1 -1
  36. package/dist/{chunk-DZ3Z3ZAK.js → chunk-VKLTCUD7.js} +2 -2
  37. package/dist/{chunk-OHZ2ETAY.js → chunk-WKBGQGVL.js} +2 -2
  38. package/dist/{chunk-MVDB76JV.js → chunk-X7UEV4O2.js} +2 -2
  39. package/dist/{chunk-UODNQNDK.js → chunk-XBFXSSHA.js} +2 -2
  40. package/dist/{chunk-PAOXBAYJ.js → chunk-Z6N7POAU.js} +2 -2
  41. package/dist/cli.js +1 -1
  42. package/dist/{client-NSZL7HQZ.js → client-2TFSAO3Y.js} +2 -2
  43. package/dist/{config-LE57YRFQ.js → config-LTXRWDRK.js} +2 -2
  44. package/dist/{config-mutate-XWOE7TCY.js → config-mutate-UFVJUJQO.js} +2 -2
  45. package/dist/{config-mutator-RZB5O7ES.js → config-mutator-RRKU33OL.js} +2 -2
  46. package/dist/{contributions-REWGLEPA.js → contributions-5XUEOSLT.js} +2 -2
  47. package/dist/{doctor-JNQHNUSO.js → doctor-L675OBBF.js} +2 -2
  48. package/dist/{follow-up-tool-WJ5MHV3O.js → follow-up-tool-2OEZMPPQ.js} +2 -2
  49. package/dist/{hub-LWUTWLBA.js → hub-VJZYQXKB.js} +2 -2
  50. package/dist/index.d.ts +262 -208
  51. package/dist/index.js +1 -1
  52. package/dist/{org-tool-R6U5LUUB.js → org-tool-QBLKCMY3.js} +2 -2
  53. package/dist/{program-OT7WYMVD.js → program-4WR4ZYXQ.js} +27 -27
  54. package/dist/{promote-DYDETYJ4.js → promote-Z6KL6GOL.js} +2 -2
  55. package/dist/{query-JF3BQNUR.js → query-SZA6UMHA.js} +2 -2
  56. package/dist/{query-settings-2FPH2NQ7.js → query-settings-BALRO5J4.js} +2 -2
  57. package/dist/{registry-FX4C6RHG.js → registry-LD2IYY7L.js} +2 -2
  58. package/dist/{request-planner-NKP7YFUN.js → request-planner-Y5HG5DQ4.js} +2 -2
  59. package/dist/{review-candidates-YL7QGFP2.js → review-candidates-BZJOFMFO.js} +2 -2
  60. package/dist/{routing-KW42OGIW.js → routing-3JDN3Z6L.js} +2 -2
  61. package/dist/schedule-tool-VM5OJ7XB.js +2 -0
  62. package/dist/{scheduler-LYSUXKAB.js → scheduler-JJOO2ODF.js} +2 -2
  63. package/dist/{seat-HCXOUS5H.js → seat-5FTOWN5J.js} +2 -2
  64. package/dist/{select-KTQNUTOG.js → select-BRQQP7OP.js} +2 -2
  65. package/dist/{set-enabled-PAQ7ZXFL.js → set-enabled-EZLQFASM.js} +2 -2
  66. package/dist/{sprint-tool-YGOAJSZQ.js → sprint-tool-YJ4WT3AD.js} +2 -2
  67. package/dist/{tool-7FFPIOO5.js → tool-BFKCGAD6.js} +2 -2
  68. package/dist/{tool-IJIYPMOA.js → tool-CXJHLIHJ.js} +2 -2
  69. package/dist/{tool-OWGDFDVG.js → tool-MT5YQ7F3.js} +2 -2
  70. package/dist/{tool-UNSJJ4MO.js → tool-RCEOKPES.js} +2 -2
  71. package/dist/{wiki-PYWKCJ2Y.js → wiki-F3LZSBN3.js} +2 -2
  72. package/dist/wiki-enrich-KIONW7SB.js +2 -0
  73. package/dist/workspace-setup-VLLF37SJ.js +2 -0
  74. package/package.json +1 -1
  75. package/dist/chunk-3AHYZLGE.js +0 -115
  76. package/dist/chunk-3AHYZLGE.js.map +0 -1
  77. package/dist/chunk-4FL6B3B7.js.map +0 -1
  78. package/dist/chunk-PJHJFZJ4.js.map +0 -1
  79. package/dist/schedule-tool-B3PPRW6J.js +0 -2
  80. package/dist/wiki-enrich-JFVS7NYY.js +0 -2
  81. package/dist/workspace-setup-GTSXWYU4.js +0 -2
  82. /package/dist/{App-WS5BTNNP.js.map → App-5CLRBC3C.js.map} +0 -0
  83. /package/dist/{ChatApp-DRMZZ3RJ.js.map → ChatApp-LDNQVD2C.js.map} +0 -0
  84. /package/dist/{absorb-eval-IZOPUQE7.js.map → absorb-eval-JWQPGUJS.js.map} +0 -0
  85. /package/dist/{adapter-3JMPFQ25.js.map → adapter-AOKK2LFM.js.map} +0 -0
  86. /package/dist/{agent-YA2EBSW4.js.map → agent-TF6XQQGV.js.map} +0 -0
  87. /package/dist/{board-dashboard-KFEVHD3Z.js.map → board-dashboard-LDMIS7MM.js.map} +0 -0
  88. /package/dist/{chunk-EJXHHFZJ.js.map → chunk-4W5KRZTT.js.map} +0 -0
  89. /package/dist/{chunk-ZD2DD7I2.js.map → chunk-BERSMN6Y.js.map} +0 -0
  90. /package/dist/{chunk-5E6JVFHV.js.map → chunk-BU6V75KD.js.map} +0 -0
  91. /package/dist/{chunk-UZEH2A2F.js.map → chunk-CUCIMPFI.js.map} +0 -0
  92. /package/dist/{chunk-DD4YKQGF.js.map → chunk-D3FIIEDR.js.map} +0 -0
  93. /package/dist/{chunk-XUOFCIAE.js.map → chunk-D6H4DH32.js.map} +0 -0
  94. /package/dist/{chunk-6LOXNAZD.js.map → chunk-DGCYMSXU.js.map} +0 -0
  95. /package/dist/{chunk-BITJXYHB.js.map → chunk-DNPPPUDP.js.map} +0 -0
  96. /package/dist/{chunk-27DVJFFR.js.map → chunk-DPA3IOMU.js.map} +0 -0
  97. /package/dist/{chunk-EGKAE6VD.js.map → chunk-DSUL5L3T.js.map} +0 -0
  98. /package/dist/{chunk-SYEC2RCV.js.map → chunk-EE5RZDQE.js.map} +0 -0
  99. /package/dist/{chunk-KUB5F67E.js.map → chunk-ERKK22QV.js.map} +0 -0
  100. /package/dist/{chunk-ETDYJ52Z.js.map → chunk-FCF47R4W.js.map} +0 -0
  101. /package/dist/{chunk-RFMBLJN3.js.map → chunk-G3GFE3GK.js.map} +0 -0
  102. /package/dist/{chunk-W7D2N55Y.js.map → chunk-I722PWJE.js.map} +0 -0
  103. /package/dist/{chunk-QDZWSALI.js.map → chunk-IXV3BPUZ.js.map} +0 -0
  104. /package/dist/{chunk-2PYRRBLW.js.map → chunk-KU3ZF3WO.js.map} +0 -0
  105. /package/dist/{chunk-6UVU47FA.js.map → chunk-MOATCFT5.js.map} +0 -0
  106. /package/dist/{chunk-6KAP6IHP.js.map → chunk-N7IX77SL.js.map} +0 -0
  107. /package/dist/{chunk-YXGYLWD5.js.map → chunk-NWE3B245.js.map} +0 -0
  108. /package/dist/{chunk-VZFFEGVQ.js.map → chunk-O4WFPH6H.js.map} +0 -0
  109. /package/dist/{chunk-DZ3Z3ZAK.js.map → chunk-VKLTCUD7.js.map} +0 -0
  110. /package/dist/{chunk-OHZ2ETAY.js.map → chunk-WKBGQGVL.js.map} +0 -0
  111. /package/dist/{chunk-MVDB76JV.js.map → chunk-X7UEV4O2.js.map} +0 -0
  112. /package/dist/{chunk-UODNQNDK.js.map → chunk-XBFXSSHA.js.map} +0 -0
  113. /package/dist/{chunk-PAOXBAYJ.js.map → chunk-Z6N7POAU.js.map} +0 -0
  114. /package/dist/{client-NSZL7HQZ.js.map → client-2TFSAO3Y.js.map} +0 -0
  115. /package/dist/{config-LE57YRFQ.js.map → config-LTXRWDRK.js.map} +0 -0
  116. /package/dist/{config-mutate-XWOE7TCY.js.map → config-mutate-UFVJUJQO.js.map} +0 -0
  117. /package/dist/{config-mutator-RZB5O7ES.js.map → config-mutator-RRKU33OL.js.map} +0 -0
  118. /package/dist/{contributions-REWGLEPA.js.map → contributions-5XUEOSLT.js.map} +0 -0
  119. /package/dist/{doctor-JNQHNUSO.js.map → doctor-L675OBBF.js.map} +0 -0
  120. /package/dist/{follow-up-tool-WJ5MHV3O.js.map → follow-up-tool-2OEZMPPQ.js.map} +0 -0
  121. /package/dist/{hub-LWUTWLBA.js.map → hub-VJZYQXKB.js.map} +0 -0
  122. /package/dist/{org-tool-R6U5LUUB.js.map → org-tool-QBLKCMY3.js.map} +0 -0
  123. /package/dist/{program-OT7WYMVD.js.map → program-4WR4ZYXQ.js.map} +0 -0
  124. /package/dist/{promote-DYDETYJ4.js.map → promote-Z6KL6GOL.js.map} +0 -0
  125. /package/dist/{query-JF3BQNUR.js.map → query-SZA6UMHA.js.map} +0 -0
  126. /package/dist/{query-settings-2FPH2NQ7.js.map → query-settings-BALRO5J4.js.map} +0 -0
  127. /package/dist/{registry-FX4C6RHG.js.map → registry-LD2IYY7L.js.map} +0 -0
  128. /package/dist/{request-planner-NKP7YFUN.js.map → request-planner-Y5HG5DQ4.js.map} +0 -0
  129. /package/dist/{review-candidates-YL7QGFP2.js.map → review-candidates-BZJOFMFO.js.map} +0 -0
  130. /package/dist/{routing-KW42OGIW.js.map → routing-3JDN3Z6L.js.map} +0 -0
  131. /package/dist/{schedule-tool-B3PPRW6J.js.map → schedule-tool-VM5OJ7XB.js.map} +0 -0
  132. /package/dist/{scheduler-LYSUXKAB.js.map → scheduler-JJOO2ODF.js.map} +0 -0
  133. /package/dist/{seat-HCXOUS5H.js.map → seat-5FTOWN5J.js.map} +0 -0
  134. /package/dist/{select-KTQNUTOG.js.map → select-BRQQP7OP.js.map} +0 -0
  135. /package/dist/{set-enabled-PAQ7ZXFL.js.map → set-enabled-EZLQFASM.js.map} +0 -0
  136. /package/dist/{sprint-tool-YGOAJSZQ.js.map → sprint-tool-YJ4WT3AD.js.map} +0 -0
  137. /package/dist/{tool-7FFPIOO5.js.map → tool-BFKCGAD6.js.map} +0 -0
  138. /package/dist/{tool-IJIYPMOA.js.map → tool-CXJHLIHJ.js.map} +0 -0
  139. /package/dist/{tool-OWGDFDVG.js.map → tool-MT5YQ7F3.js.map} +0 -0
  140. /package/dist/{tool-UNSJJ4MO.js.map → tool-RCEOKPES.js.map} +0 -0
  141. /package/dist/{wiki-PYWKCJ2Y.js.map → wiki-F3LZSBN3.js.map} +0 -0
  142. /package/dist/{wiki-enrich-JFVS7NYY.js.map → wiki-enrich-KIONW7SB.js.map} +0 -0
  143. /package/dist/{workspace-setup-GTSXWYU4.js.map → workspace-setup-VLLF37SJ.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -11102,6 +11102,10 @@ declare const daemonConfigSchema: z.ZodObject<{
11102
11102
  * per REQUEST — 180K leaves headroom. NOT the cumulative turn total:
11103
11103
  * that sums cache reads across every call and reads 10-20× too high. */
11104
11104
  session: z.ZodDefault<z.ZodObject<{
11105
+ /** A message that arrives for an agent while it works in the same chat
11106
+ * is read by that run after its next tool call, as in interactive
11107
+ * Claude Code (src/agents/mid-turn.ts). claude-code agents only. */
11108
+ midTurnMessages: z.ZodDefault<z.ZodBoolean>;
11105
11109
  staleMinutes: z.ZodDefault<z.ZodNumber>;
11106
11110
  maxTurnsPerSession: z.ZodDefault<z.ZodNumber>;
11107
11111
  tierTwoThresholdTokens: z.ZodDefault<z.ZodNumber>;
@@ -11324,6 +11328,7 @@ declare const daemonConfigSchema: z.ZodObject<{
11324
11328
  }>>;
11325
11329
  }, "strip", z.ZodTypeAny, {
11326
11330
  contextStrategy: "layered" | "planner";
11331
+ midTurnMessages: boolean;
11327
11332
  staleMinutes: number;
11328
11333
  maxTurnsPerSession: number;
11329
11334
  tierTwoThresholdTokens: number;
@@ -11366,6 +11371,7 @@ declare const daemonConfigSchema: z.ZodObject<{
11366
11371
  maxClaudeCodeDispatchesPer5h?: number | undefined;
11367
11372
  }, {
11368
11373
  contextStrategy?: "layered" | "planner" | undefined;
11374
+ midTurnMessages?: boolean | undefined;
11369
11375
  staleMinutes?: number | undefined;
11370
11376
  maxTurnsPerSession?: number | undefined;
11371
11377
  tierTwoThresholdTokens?: number | undefined;
@@ -11621,6 +11627,110 @@ declare const daemonConfigSchema: z.ZodObject<{
11621
11627
  skipTypes: string[];
11622
11628
  };
11623
11629
  };
11630
+ requests: {
11631
+ enabled: boolean;
11632
+ from: string[];
11633
+ ownerCheck: {
11634
+ provider: string;
11635
+ model: string;
11636
+ enabled: boolean;
11637
+ timeoutSeconds: number;
11638
+ perCheck: number;
11639
+ maxAgeHours: number;
11640
+ };
11641
+ plans: {
11642
+ enabled: boolean;
11643
+ stallMinutes: number;
11644
+ maxNudges: number;
11645
+ approveKinds: string[];
11646
+ disabledAgents: string[];
11647
+ requireForWork: string[];
11648
+ requireOverMinutes: number;
11649
+ continue: {
11650
+ enabled: boolean;
11651
+ only: string[];
11652
+ maxTurnsPerDay: number;
11653
+ maxCostUsdPerDay: number;
11654
+ };
11655
+ };
11656
+ channels: string[];
11657
+ staleAfterHours: number;
11658
+ retentionDays: number;
11659
+ checkers: {
11660
+ enabled: ("reply" | "url" | "issue" | "git-ancestor")[];
11661
+ repos: Record<string, string>;
11662
+ checkEveryMinutes: number;
11663
+ gitlab?: {
11664
+ token?: string | undefined;
11665
+ url?: string | undefined;
11666
+ } | undefined;
11667
+ github?: {
11668
+ apiUrl: string;
11669
+ token?: string | undefined;
11670
+ } | undefined;
11671
+ };
11672
+ headlines: {
11673
+ provider: string;
11674
+ model: string;
11675
+ enabled: boolean;
11676
+ timeoutSeconds: number;
11677
+ };
11678
+ settleHandedBack: boolean;
11679
+ homeCloses: boolean;
11680
+ releaseOnOwnerTurn: boolean;
11681
+ statusDrift: {
11682
+ enabled: boolean;
11683
+ projects: {
11684
+ provider: "gitlab" | "github";
11685
+ project: string;
11686
+ live: string[];
11687
+ repo?: string | undefined;
11688
+ }[];
11689
+ labels: {
11690
+ done: string[];
11691
+ todo: string[];
11692
+ doing: string[];
11693
+ review: string[];
11694
+ };
11695
+ write: boolean;
11696
+ checkEveryMinutes: number;
11697
+ lookbackDays: number;
11698
+ liveField: string;
11699
+ doneNotLiveAfterHours: number;
11700
+ writeProjects: string[];
11701
+ };
11702
+ promises: {
11703
+ facts: boolean;
11704
+ watchers: boolean;
11705
+ requireProof: boolean;
11706
+ factTtlDays: number;
11707
+ cards: boolean;
11708
+ };
11709
+ catchPromises: {
11710
+ provider: string;
11711
+ model: string;
11712
+ enabled: boolean;
11713
+ dailyCap: number;
11714
+ waitingOwner: boolean;
11715
+ timeoutSeconds: number;
11716
+ };
11717
+ autoResend: {
11718
+ enabled: boolean;
11719
+ afterMinutes: number;
11720
+ holdMaxHours: number;
11721
+ };
11722
+ flow: {
11723
+ days: number;
11724
+ timeZone: string;
11725
+ };
11726
+ sprints: {
11727
+ enabled: boolean;
11728
+ idleMinutes: number;
11729
+ };
11730
+ };
11731
+ events: {
11732
+ ringSize: number;
11733
+ };
11624
11734
  people: {
11625
11735
  agents: string[];
11626
11736
  id: string;
@@ -11829,9 +11939,6 @@ declare const daemonConfigSchema: z.ZodObject<{
11829
11939
  token?: string | undefined;
11830
11940
  draftAgent?: string | undefined;
11831
11941
  };
11832
- events: {
11833
- ringSize: number;
11834
- };
11835
11942
  node: {
11836
11943
  id: string;
11837
11944
  name: string;
@@ -11874,107 +11981,6 @@ declare const daemonConfigSchema: z.ZodObject<{
11874
11981
  yesAt: number;
11875
11982
  doneSignal: "result" | "explicit";
11876
11983
  };
11877
- requests: {
11878
- enabled: boolean;
11879
- from: string[];
11880
- ownerCheck: {
11881
- provider: string;
11882
- model: string;
11883
- enabled: boolean;
11884
- timeoutSeconds: number;
11885
- perCheck: number;
11886
- maxAgeHours: number;
11887
- };
11888
- plans: {
11889
- enabled: boolean;
11890
- stallMinutes: number;
11891
- maxNudges: number;
11892
- approveKinds: string[];
11893
- disabledAgents: string[];
11894
- requireForWork: string[];
11895
- requireOverMinutes: number;
11896
- continue: {
11897
- enabled: boolean;
11898
- only: string[];
11899
- maxTurnsPerDay: number;
11900
- maxCostUsdPerDay: number;
11901
- };
11902
- };
11903
- channels: string[];
11904
- staleAfterHours: number;
11905
- retentionDays: number;
11906
- checkers: {
11907
- enabled: ("reply" | "url" | "issue" | "git-ancestor")[];
11908
- repos: Record<string, string>;
11909
- checkEveryMinutes: number;
11910
- gitlab?: {
11911
- token?: string | undefined;
11912
- url?: string | undefined;
11913
- } | undefined;
11914
- github?: {
11915
- apiUrl: string;
11916
- token?: string | undefined;
11917
- } | undefined;
11918
- };
11919
- headlines: {
11920
- provider: string;
11921
- model: string;
11922
- enabled: boolean;
11923
- timeoutSeconds: number;
11924
- };
11925
- settleHandedBack: boolean;
11926
- homeCloses: boolean;
11927
- releaseOnOwnerTurn: boolean;
11928
- statusDrift: {
11929
- enabled: boolean;
11930
- projects: {
11931
- provider: "gitlab" | "github";
11932
- project: string;
11933
- live: string[];
11934
- repo?: string | undefined;
11935
- }[];
11936
- labels: {
11937
- done: string[];
11938
- todo: string[];
11939
- doing: string[];
11940
- review: string[];
11941
- };
11942
- write: boolean;
11943
- checkEveryMinutes: number;
11944
- lookbackDays: number;
11945
- liveField: string;
11946
- doneNotLiveAfterHours: number;
11947
- writeProjects: string[];
11948
- };
11949
- promises: {
11950
- facts: boolean;
11951
- watchers: boolean;
11952
- requireProof: boolean;
11953
- factTtlDays: number;
11954
- cards: boolean;
11955
- };
11956
- catchPromises: {
11957
- provider: string;
11958
- model: string;
11959
- enabled: boolean;
11960
- dailyCap: number;
11961
- waitingOwner: boolean;
11962
- timeoutSeconds: number;
11963
- };
11964
- autoResend: {
11965
- enabled: boolean;
11966
- afterMinutes: number;
11967
- holdMaxHours: number;
11968
- };
11969
- flow: {
11970
- days: number;
11971
- timeZone: string;
11972
- };
11973
- sprints: {
11974
- enabled: boolean;
11975
- idleMinutes: number;
11976
- };
11977
- };
11978
11984
  approvals: {
11979
11985
  popup: {
11980
11986
  enabled: boolean;
@@ -12731,6 +12737,7 @@ declare const daemonConfigSchema: z.ZodObject<{
12731
12737
  }[];
12732
12738
  session: {
12733
12739
  contextStrategy: "layered" | "planner";
12740
+ midTurnMessages: boolean;
12734
12741
  staleMinutes: number;
12735
12742
  maxTurnsPerSession: number;
12736
12743
  tierTwoThresholdTokens: number;
@@ -13050,6 +13057,110 @@ declare const daemonConfigSchema: z.ZodObject<{
13050
13057
  skipTypes?: string[] | undefined;
13051
13058
  } | undefined;
13052
13059
  } | undefined;
13060
+ requests?: {
13061
+ enabled?: boolean | undefined;
13062
+ from?: string[] | undefined;
13063
+ ownerCheck?: {
13064
+ provider?: string | undefined;
13065
+ model?: string | undefined;
13066
+ enabled?: boolean | undefined;
13067
+ timeoutSeconds?: number | undefined;
13068
+ perCheck?: number | undefined;
13069
+ maxAgeHours?: number | undefined;
13070
+ } | undefined;
13071
+ plans?: {
13072
+ enabled?: boolean | undefined;
13073
+ stallMinutes?: number | undefined;
13074
+ maxNudges?: number | undefined;
13075
+ approveKinds?: string[] | undefined;
13076
+ disabledAgents?: string[] | undefined;
13077
+ requireForWork?: string[] | undefined;
13078
+ requireOverMinutes?: number | undefined;
13079
+ continue?: {
13080
+ enabled?: boolean | undefined;
13081
+ only?: string[] | undefined;
13082
+ maxTurnsPerDay?: number | undefined;
13083
+ maxCostUsdPerDay?: number | undefined;
13084
+ } | undefined;
13085
+ } | undefined;
13086
+ channels?: string[] | undefined;
13087
+ staleAfterHours?: number | undefined;
13088
+ retentionDays?: number | undefined;
13089
+ checkers?: {
13090
+ enabled?: ("reply" | "url" | "issue" | "git-ancestor")[] | undefined;
13091
+ gitlab?: {
13092
+ token?: string | undefined;
13093
+ url?: string | undefined;
13094
+ } | undefined;
13095
+ repos?: Record<string, string> | undefined;
13096
+ github?: {
13097
+ token?: string | undefined;
13098
+ apiUrl?: string | undefined;
13099
+ } | undefined;
13100
+ checkEveryMinutes?: number | undefined;
13101
+ } | undefined;
13102
+ headlines?: {
13103
+ provider?: string | undefined;
13104
+ model?: string | undefined;
13105
+ enabled?: boolean | undefined;
13106
+ timeoutSeconds?: number | undefined;
13107
+ } | undefined;
13108
+ settleHandedBack?: boolean | undefined;
13109
+ homeCloses?: boolean | undefined;
13110
+ releaseOnOwnerTurn?: boolean | undefined;
13111
+ statusDrift?: {
13112
+ enabled?: boolean | undefined;
13113
+ projects?: {
13114
+ provider: "gitlab" | "github";
13115
+ project: string;
13116
+ repo?: string | undefined;
13117
+ live?: string[] | undefined;
13118
+ }[] | undefined;
13119
+ labels?: {
13120
+ done?: string[] | undefined;
13121
+ todo?: string[] | undefined;
13122
+ doing?: string[] | undefined;
13123
+ review?: string[] | undefined;
13124
+ } | undefined;
13125
+ write?: boolean | undefined;
13126
+ checkEveryMinutes?: number | undefined;
13127
+ lookbackDays?: number | undefined;
13128
+ liveField?: string | undefined;
13129
+ doneNotLiveAfterHours?: number | undefined;
13130
+ writeProjects?: string[] | undefined;
13131
+ } | undefined;
13132
+ promises?: {
13133
+ facts?: boolean | undefined;
13134
+ watchers?: boolean | undefined;
13135
+ requireProof?: boolean | undefined;
13136
+ factTtlDays?: number | undefined;
13137
+ cards?: boolean | undefined;
13138
+ } | undefined;
13139
+ catchPromises?: {
13140
+ provider?: string | undefined;
13141
+ model?: string | undefined;
13142
+ enabled?: boolean | undefined;
13143
+ dailyCap?: number | undefined;
13144
+ waitingOwner?: boolean | undefined;
13145
+ timeoutSeconds?: number | undefined;
13146
+ } | undefined;
13147
+ autoResend?: {
13148
+ enabled?: boolean | undefined;
13149
+ afterMinutes?: number | undefined;
13150
+ holdMaxHours?: number | undefined;
13151
+ } | undefined;
13152
+ flow?: {
13153
+ days?: number | undefined;
13154
+ timeZone?: string | undefined;
13155
+ } | undefined;
13156
+ sprints?: {
13157
+ enabled?: boolean | undefined;
13158
+ idleMinutes?: number | undefined;
13159
+ } | undefined;
13160
+ } | undefined;
13161
+ events?: {
13162
+ ringSize?: number | undefined;
13163
+ } | undefined;
13053
13164
  business?: {
13054
13165
  enabled?: boolean | undefined;
13055
13166
  orgChart?: Record<string, {
@@ -13347,9 +13458,6 @@ declare const daemonConfigSchema: z.ZodObject<{
13347
13458
  } | undefined;
13348
13459
  } | undefined;
13349
13460
  } | undefined;
13350
- events?: {
13351
- ringSize?: number | undefined;
13352
- } | undefined;
13353
13461
  native?: {
13354
13462
  notes?: {
13355
13463
  enabled?: boolean | undefined;
@@ -13385,107 +13493,6 @@ declare const daemonConfigSchema: z.ZodObject<{
13385
13493
  yesAt?: number | undefined;
13386
13494
  doneSignal?: "result" | "explicit" | undefined;
13387
13495
  } | undefined;
13388
- requests?: {
13389
- enabled?: boolean | undefined;
13390
- from?: string[] | undefined;
13391
- ownerCheck?: {
13392
- provider?: string | undefined;
13393
- model?: string | undefined;
13394
- enabled?: boolean | undefined;
13395
- timeoutSeconds?: number | undefined;
13396
- perCheck?: number | undefined;
13397
- maxAgeHours?: number | undefined;
13398
- } | undefined;
13399
- plans?: {
13400
- enabled?: boolean | undefined;
13401
- stallMinutes?: number | undefined;
13402
- maxNudges?: number | undefined;
13403
- approveKinds?: string[] | undefined;
13404
- disabledAgents?: string[] | undefined;
13405
- requireForWork?: string[] | undefined;
13406
- requireOverMinutes?: number | undefined;
13407
- continue?: {
13408
- enabled?: boolean | undefined;
13409
- only?: string[] | undefined;
13410
- maxTurnsPerDay?: number | undefined;
13411
- maxCostUsdPerDay?: number | undefined;
13412
- } | undefined;
13413
- } | undefined;
13414
- channels?: string[] | undefined;
13415
- staleAfterHours?: number | undefined;
13416
- retentionDays?: number | undefined;
13417
- checkers?: {
13418
- enabled?: ("reply" | "url" | "issue" | "git-ancestor")[] | undefined;
13419
- gitlab?: {
13420
- token?: string | undefined;
13421
- url?: string | undefined;
13422
- } | undefined;
13423
- repos?: Record<string, string> | undefined;
13424
- github?: {
13425
- token?: string | undefined;
13426
- apiUrl?: string | undefined;
13427
- } | undefined;
13428
- checkEveryMinutes?: number | undefined;
13429
- } | undefined;
13430
- headlines?: {
13431
- provider?: string | undefined;
13432
- model?: string | undefined;
13433
- enabled?: boolean | undefined;
13434
- timeoutSeconds?: number | undefined;
13435
- } | undefined;
13436
- settleHandedBack?: boolean | undefined;
13437
- homeCloses?: boolean | undefined;
13438
- releaseOnOwnerTurn?: boolean | undefined;
13439
- statusDrift?: {
13440
- enabled?: boolean | undefined;
13441
- projects?: {
13442
- provider: "gitlab" | "github";
13443
- project: string;
13444
- repo?: string | undefined;
13445
- live?: string[] | undefined;
13446
- }[] | undefined;
13447
- labels?: {
13448
- done?: string[] | undefined;
13449
- todo?: string[] | undefined;
13450
- doing?: string[] | undefined;
13451
- review?: string[] | undefined;
13452
- } | undefined;
13453
- write?: boolean | undefined;
13454
- checkEveryMinutes?: number | undefined;
13455
- lookbackDays?: number | undefined;
13456
- liveField?: string | undefined;
13457
- doneNotLiveAfterHours?: number | undefined;
13458
- writeProjects?: string[] | undefined;
13459
- } | undefined;
13460
- promises?: {
13461
- facts?: boolean | undefined;
13462
- watchers?: boolean | undefined;
13463
- requireProof?: boolean | undefined;
13464
- factTtlDays?: number | undefined;
13465
- cards?: boolean | undefined;
13466
- } | undefined;
13467
- catchPromises?: {
13468
- provider?: string | undefined;
13469
- model?: string | undefined;
13470
- enabled?: boolean | undefined;
13471
- dailyCap?: number | undefined;
13472
- waitingOwner?: boolean | undefined;
13473
- timeoutSeconds?: number | undefined;
13474
- } | undefined;
13475
- autoResend?: {
13476
- enabled?: boolean | undefined;
13477
- afterMinutes?: number | undefined;
13478
- holdMaxHours?: number | undefined;
13479
- } | undefined;
13480
- flow?: {
13481
- days?: number | undefined;
13482
- timeZone?: string | undefined;
13483
- } | undefined;
13484
- sprints?: {
13485
- enabled?: boolean | undefined;
13486
- idleMinutes?: number | undefined;
13487
- } | undefined;
13488
- } | undefined;
13489
13496
  approvals?: {
13490
13497
  popup?: {
13491
13498
  enabled?: boolean | undefined;
@@ -14242,6 +14249,7 @@ declare const daemonConfigSchema: z.ZodObject<{
14242
14249
  }[] | undefined;
14243
14250
  session?: {
14244
14251
  contextStrategy?: "layered" | "planner" | undefined;
14252
+ midTurnMessages?: boolean | undefined;
14245
14253
  staleMinutes?: number | undefined;
14246
14254
  maxTurnsPerSession?: number | undefined;
14247
14255
  tierTwoThresholdTokens?: number | undefined;
@@ -15759,6 +15767,38 @@ declare class TokenTracker {
15759
15767
  private save;
15760
15768
  }
15761
15769
 
15770
+ interface MidTurnEntry {
15771
+ id: string;
15772
+ key: string;
15773
+ runId: string;
15774
+ text: string;
15775
+ from: string;
15776
+ at: number;
15777
+ }
15778
+ declare class MidTurnInbox {
15779
+ private readonly opts;
15780
+ private byKey;
15781
+ private taken;
15782
+ private seq;
15783
+ constructor(opts?: {
15784
+ now?: () => number;
15785
+ });
15786
+ private now;
15787
+ /** Offer a message to the run `runId` going in this chat. */
15788
+ offer(key: string, runId: string, text: string, from: string): MidTurnEntry;
15789
+ /** The hook's call: every message waiting for this chat, oldest first,
15790
+ * marked taken. */
15791
+ take(key: string): MidTurnEntry[];
15792
+ isTaken(id: string | undefined): boolean;
15793
+ /** The run ended: what it never took goes on its usual way. */
15794
+ endRun(runId: string): void;
15795
+ /** The run in this chat ended: what it never took goes on its usual way
15796
+ * (the queue or the waiting caller), never to a later run. */
15797
+ endChat(key: string): void;
15798
+ pending(key: string): number;
15799
+ private prune;
15800
+ }
15801
+
15762
15802
  type InitiatorKind = "human" | "agent";
15763
15803
  /** The root of a chain, carried in `context.initiator` on every hop after
15764
15804
  * the first. Only small identifying fields: it crosses the mesh. */
@@ -16138,6 +16178,8 @@ interface AgentTask {
16138
16178
  /** Set on the one automatic retry of a run whose preparation steps hit
16139
16179
  * the pre-spawn deadline (#340). A retry that hits it again is reported. */
16140
16180
  preSpawnRetry?: number;
16181
+ /** Offered to the run already going in this chat (mid-turn.ts). */
16182
+ midTurnId?: string;
16141
16183
  /** Set on a run that continues one stopped at its agent's time limit
16142
16184
  * (#1257): how many continuations this request has had, and when its
16143
16185
  * first run started (a caller's deadline counts from there). */
@@ -16254,6 +16296,9 @@ interface AgentTask {
16254
16296
  };
16255
16297
  }
16256
16298
  interface AgentResponse {
16299
+ /** The message was read by the run already going in its chat, which
16300
+ * answers it; no turn of its own ran (mid-turn.ts). */
16301
+ midTurnDelivered?: boolean;
16257
16302
  content: string;
16258
16303
  error?: string;
16259
16304
  /** Typed discriminator on `error`. Lets dispatchers and workflow nodes
@@ -19842,6 +19887,8 @@ declare class AgentRegistry {
19842
19887
  * free and run at once.
19843
19888
  */
19844
19889
  private voiceClaims;
19890
+ /** Messages for a run already going in their chat (mid-turn.ts). */
19891
+ readonly midTurn: MidTurnInbox;
19845
19892
  /** One run at a time per agent and owner's request (work-lane.ts). */
19846
19893
  private workLanes;
19847
19894
  /** Notices for an agent's next run (notices.ts, /send/agent notice:true). */
@@ -20253,6 +20300,13 @@ declare class AgentRegistry {
20253
20300
  * conversation leaves a turn the phone started there alone (#1455).
20254
20301
  * Returns how many it aborted. */
20255
20302
  cancelChatTasks(agentId: string, channel: string, chatId: string, reason?: string, sender?: string): number;
20303
+ /** Offer `task` to the run of its agent already going in its chat, when
20304
+ * that run can hear it (claude-code, whose workspace hook reads the
20305
+ * inbox) and the message is a person's or an agent's words. */
20306
+ private offerMidTurn;
20307
+ /** The hook's call after a tool call (GET /runs/inbox): messages for the
20308
+ * run going in this chat, marked taken. */
20309
+ takeMidTurn(agentId: string, channel: string, chatId: string): MidTurnEntry[];
20256
20310
  /**
20257
20311
  * Queue a follow-up correction/update for an in-flight task. The message
20258
20312
  * lands in the per-session MessageQueue and is dispatched after the
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import{Oa as Tt,Pa as Mt,a as St,b as kt,c as vt,d as xt,e as $t,f as Ct,g as Pt,h as bt}from"./chunk-PJHJFZJ4.js";import"./chunk-PAOXBAYJ.js";import"./chunk-GTJIKXDB.js";import"./chunk-YXGYLWD5.js";import"./chunk-SYEC2RCV.js";import"./chunk-IMLAPB7G.js";import"./chunk-ZVP6GB4G.js";import"./chunk-PPUN7YHA.js";import"./chunk-VZLIBDLH.js";import"./chunk-EKJG63EJ.js";import"./chunk-5E6JVFHV.js";import"./chunk-3Q6MRG3P.js";import"./chunk-2VDO2HEK.js";import"./chunk-2P5NP4H6.js";import"./chunk-B4KQC3DG.js";import"./chunk-LQE73AZR.js";import"./chunk-2D3RYIDU.js";import"./chunk-OHZ2ETAY.js";import"./chunk-MRIVENBY.js";import"./chunk-GJOKXP5D.js";import"./chunk-A5GYG56I.js";import"./chunk-EGKAE6VD.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-UKUH662W.js";import"./chunk-JWDJMFU6.js";import"./chunk-RX5O5637.js";import"./chunk-5ELIX7BQ.js";import"./chunk-X7UQY7CH.js";import"./chunk-27DVJFFR.js";import"./chunk-QPABR72X.js";import"./chunk-IFUAP7UD.js";import"./chunk-KP7KDLZ2.js";import{Ha as yt,q as lt,r as ct,s as dt,t as mt,u as pt}from"./chunk-4FL6B3B7.js";import"./chunk-6KAP6IHP.js";import"./chunk-MEFPXHQJ.js";import"./chunk-7AB3QUGH.js";import{a as L}from"./chunk-BAXGL6TY.js";import{A as D,B as z,C as V,a as ye,b as we,c as Se,d as Ae,e as Ie,f as Oe,g as Ne,h as He,i as je,j as Ue,k as _e,l as I,m as q,n as Be,o as qe,p as Ye,q as O,r as ze,s as Ve,t as Xe,u as x,v as Y,w as Qe,x as Ze,y as et,z as wt}from"./chunk-MVDB76JV.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-6TTGRTDO.js";import"./chunk-UZEH2A2F.js";import"./chunk-VE3SSOQX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-IH65GDJR.js";import{u as ut}from"./chunk-KUB5F67E.js";import"./chunk-RFMBLJN3.js";import"./chunk-3UOTLMXD.js";import"./chunk-XVV7ZZ77.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-X5C5W3E4.js";import"./chunk-KWWBDLE6.js";import"./chunk-LIY5CHUV.js";import"./chunk-GV7S5BAX.js";import"./chunk-GSX4NK2N.js";import"./chunk-SZDACK6O.js";import"./chunk-VWTBHLMX.js";import"./chunk-ETDYJ52Z.js";import"./chunk-JTFCU5LH.js";import"./chunk-LUOW2YHY.js";import"./chunk-4LWFJ4MZ.js";import"./chunk-BIJHMWXK.js";import"./chunk-BE64IJWM.js";import"./chunk-5ONH4ITT.js";import"./chunk-JRAG37V5.js";import"./chunk-ILEC3IAV.js";import"./chunk-MYVHVJWZ.js";import"./chunk-3AHYZLGE.js";import"./chunk-XL7UWG36.js";import"./chunk-MNG2AMKZ.js";import"./chunk-LY4G7PCW.js";import"./chunk-DPG6VHPX.js";import"./chunk-BERWTVG2.js";import"./chunk-A7JSRDJL.js";import"./chunk-HPRLRD4P.js";import"./chunk-UODNQNDK.js";import{a as ht}from"./chunk-6LOXNAZD.js";import{f as gt,g as ft}from"./chunk-W7D2N55Y.js";import"./chunk-WPNRDEHW.js";import"./chunk-OWNQ2FD4.js";import"./chunk-AHWWJ7AF.js";import"./chunk-KEXBEUSU.js";import"./chunk-ROLSSYXE.js";import"./chunk-DD4YKQGF.js";import{j as it,k as rt,l as at}from"./chunk-QDZWSALI.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-7IW25T4K.js";import"./chunk-Q3A5P373.js";import"./chunk-JLBRNYKY.js";import"./chunk-BYEL7KKR.js";import"./chunk-QUFIUXMQ.js";import{a as ke,b as ve,c as xe,d as $e,e as Ce,f as Pe,g as be,h as Te,i as Me,j as Re,l as Ee,m as Ge,o as T,p as W}from"./chunk-DCIYOPJF.js";import{a as m,b as G}from"./chunk-7I7IEX4S.js";import{b as Fe,c as Le,d as A,e as De}from"./chunk-JHCI6XCJ.js";import{a as Ke,b as Je,e as We}from"./chunk-DSYKYZMT.js";import{Ob as tt,Qb as st,Tb as ot,_b as nt}from"./chunk-X5UWEMFI.js";import"./chunk-KEUW6YLL.js";import"./chunk-N47Y5ADQ.js";import"./chunk-YSCT6DPR.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";W();G();import{execa as Rt}from"execa";import{existsSync as se,promises as X}from"fs";import S from"path";import ie from"node-fetch";async function Et(o,e){let t=o.split("/");if(t.length<2)throw new Error(`Invalid skill package ID: ${o}. Expected format: owner/repo`);let s=t[0],i=t[1],n=t[2];try{let a=n?`${s}/${i}/${n}`:`${s}/${i}`;await Rt("npx",["-y","skills","add",a],{cwd:e,stdio:"pipe"}),m.success(`Installed skill package: ${o}`);let r=S.resolve(e,".skills",`${s}_${i}`);if(se(r))return await ne(r,o);let d=S.resolve(e,".skills");return se(d)?await ne(d,o):[]}catch{return m.info(`Fetching skills directly from GitHub: ${s}/${i}`),await Gt(s,i,n,e)}}async function Gt(o,e,t,s){let i=[];try{let n=`https://api.github.com/repos/${o}/${e}/git/trees/main?recursive=1`,a=await ie(n);if(!a.ok)throw new Error(`GitHub API error: ${a.status}`);let d=(await a.json()).tree.filter(p=>p.type==="blob"&&p.path.endsWith("SKILL.md"));if(t){let p=d.find(f=>f.path.includes(`/${t}/`)||f.path===`${t}/SKILL.md`);if(p){let f=await oe(o,e,p.path,s);f&&i.push(f)}}else for(let p of d){let f=await oe(o,e,p.path,s);f&&i.push(f)}}catch(n){m.error(`Failed to fetch skills from GitHub: ${n.message}`)}return i}async function oe(o,e,t,s){try{let i=`https://raw.githubusercontent.com/${o}/${e}/main/${t}`,n=await ie(i);if(!n.ok)return null;let a=await n.text(),r=A(a);if(r){r.source="remote",r.packageId=`${o}/${e}`;let d=S.dirname(t),p=S.resolve(s,".skills",`${o}_${e}`,d);await X.mkdir(p,{recursive:!0}),await X.writeFile(S.resolve(p,"SKILL.md"),a),r.path=S.resolve(p,"SKILL.md")}return r}catch{return null}}async function ne(o,e){let t=[],{default:s}=await import("fast-glob"),i=await s.glob("**/SKILL.md",{cwd:o,deep:5});for(let n of i)try{let a=S.resolve(o,n),r=await X.readFile(a,"utf8"),d=A(r);d&&(d.source="remote",d.path=a,d.packageId=e,t.push(d))}catch{}return t}async function At(o,e,t,s,i){let n=["---",`name: ${o}`,`description: ${e}`];if(s?.length){n.push("tags:");for(let a of s)n.push(` - ${a}`)}if(i?.length){n.push("globs:");for(let a of i)n.push(` - ${a}`)}return n.push("---"),`${n.join(`
1
+ import{Oa as Tt,Pa as Mt,a as St,b as kt,c as vt,d as xt,e as $t,f as Ct,g as Pt,h as bt}from"./chunk-NZFWW2YG.js";import"./chunk-Z6N7POAU.js";import"./chunk-GTJIKXDB.js";import"./chunk-NWE3B245.js";import"./chunk-EE5RZDQE.js";import"./chunk-IMLAPB7G.js";import"./chunk-ZVP6GB4G.js";import"./chunk-PPUN7YHA.js";import"./chunk-VZLIBDLH.js";import"./chunk-EKJG63EJ.js";import"./chunk-BU6V75KD.js";import"./chunk-3Q6MRG3P.js";import"./chunk-2VDO2HEK.js";import"./chunk-2P5NP4H6.js";import"./chunk-B4KQC3DG.js";import"./chunk-LQE73AZR.js";import"./chunk-2D3RYIDU.js";import"./chunk-WKBGQGVL.js";import"./chunk-MRIVENBY.js";import"./chunk-GJOKXP5D.js";import"./chunk-A5GYG56I.js";import"./chunk-DSUL5L3T.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-UKUH662W.js";import"./chunk-JWDJMFU6.js";import"./chunk-RX5O5637.js";import"./chunk-5ELIX7BQ.js";import"./chunk-X7UQY7CH.js";import"./chunk-DPA3IOMU.js";import"./chunk-QPABR72X.js";import"./chunk-IFUAP7UD.js";import"./chunk-KP7KDLZ2.js";import{Ia as yt,r as lt,s as ct,t as dt,u as mt,v as pt}from"./chunk-36RIIHPS.js";import"./chunk-N7IX77SL.js";import"./chunk-MEFPXHQJ.js";import"./chunk-7AB3QUGH.js";import{a as L}from"./chunk-BAXGL6TY.js";import{A as D,B as z,C as V,a as ye,b as we,c as Se,d as Ae,e as Ie,f as Oe,g as Ne,h as He,i as je,j as Ue,k as _e,l as I,m as q,n as Be,o as qe,p as Ye,q as O,r as ze,s as Ve,t as Xe,u as x,v as Y,w as Qe,x as Ze,y as et,z as wt}from"./chunk-X7UEV4O2.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-6TTGRTDO.js";import"./chunk-CUCIMPFI.js";import"./chunk-VE3SSOQX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-IH65GDJR.js";import{u as ut}from"./chunk-ERKK22QV.js";import"./chunk-G3GFE3GK.js";import"./chunk-3UOTLMXD.js";import"./chunk-XVV7ZZ77.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-X5C5W3E4.js";import"./chunk-KWWBDLE6.js";import"./chunk-LIY5CHUV.js";import"./chunk-GV7S5BAX.js";import"./chunk-GSX4NK2N.js";import"./chunk-SZDACK6O.js";import"./chunk-VWTBHLMX.js";import"./chunk-FCF47R4W.js";import"./chunk-JTFCU5LH.js";import"./chunk-LUOW2YHY.js";import"./chunk-4LWFJ4MZ.js";import"./chunk-BIJHMWXK.js";import"./chunk-BE64IJWM.js";import"./chunk-5ONH4ITT.js";import"./chunk-JRAG37V5.js";import"./chunk-ILEC3IAV.js";import"./chunk-MYVHVJWZ.js";import"./chunk-7JWMLYOA.js";import"./chunk-XL7UWG36.js";import"./chunk-MNG2AMKZ.js";import"./chunk-LY4G7PCW.js";import"./chunk-DPG6VHPX.js";import"./chunk-BERWTVG2.js";import"./chunk-A7JSRDJL.js";import"./chunk-HPRLRD4P.js";import"./chunk-XBFXSSHA.js";import{a as ht}from"./chunk-DGCYMSXU.js";import{f as gt,g as ft}from"./chunk-I722PWJE.js";import"./chunk-WPNRDEHW.js";import"./chunk-OWNQ2FD4.js";import"./chunk-AHWWJ7AF.js";import"./chunk-KEXBEUSU.js";import"./chunk-ROLSSYXE.js";import"./chunk-D3FIIEDR.js";import{j as it,k as rt,l as at}from"./chunk-IXV3BPUZ.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-7IW25T4K.js";import"./chunk-Q3A5P373.js";import"./chunk-JLBRNYKY.js";import"./chunk-BYEL7KKR.js";import"./chunk-QUFIUXMQ.js";import{a as ke,b as ve,c as xe,d as $e,e as Ce,f as Pe,g as be,h as Te,i as Me,j as Re,l as Ee,m as Ge,o as T,p as W}from"./chunk-DCIYOPJF.js";import{a as m,b as G}from"./chunk-7I7IEX4S.js";import{b as Fe,c as Le,d as A,e as De}from"./chunk-JHCI6XCJ.js";import{a as Ke,b as Je,e as We}from"./chunk-DSYKYZMT.js";import{Ob as tt,Qb as st,Tb as ot,_b as nt}from"./chunk-UWDDVDU6.js";import"./chunk-KEUW6YLL.js";import"./chunk-N47Y5ADQ.js";import"./chunk-YSCT6DPR.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";W();G();import{execa as Rt}from"execa";import{existsSync as se,promises as X}from"fs";import S from"path";import ie from"node-fetch";async function Et(o,e){let t=o.split("/");if(t.length<2)throw new Error(`Invalid skill package ID: ${o}. Expected format: owner/repo`);let s=t[0],i=t[1],n=t[2];try{let a=n?`${s}/${i}/${n}`:`${s}/${i}`;await Rt("npx",["-y","skills","add",a],{cwd:e,stdio:"pipe"}),m.success(`Installed skill package: ${o}`);let r=S.resolve(e,".skills",`${s}_${i}`);if(se(r))return await ne(r,o);let d=S.resolve(e,".skills");return se(d)?await ne(d,o):[]}catch{return m.info(`Fetching skills directly from GitHub: ${s}/${i}`),await Gt(s,i,n,e)}}async function Gt(o,e,t,s){let i=[];try{let n=`https://api.github.com/repos/${o}/${e}/git/trees/main?recursive=1`,a=await ie(n);if(!a.ok)throw new Error(`GitHub API error: ${a.status}`);let d=(await a.json()).tree.filter(p=>p.type==="blob"&&p.path.endsWith("SKILL.md"));if(t){let p=d.find(f=>f.path.includes(`/${t}/`)||f.path===`${t}/SKILL.md`);if(p){let f=await oe(o,e,p.path,s);f&&i.push(f)}}else for(let p of d){let f=await oe(o,e,p.path,s);f&&i.push(f)}}catch(n){m.error(`Failed to fetch skills from GitHub: ${n.message}`)}return i}async function oe(o,e,t,s){try{let i=`https://raw.githubusercontent.com/${o}/${e}/main/${t}`,n=await ie(i);if(!n.ok)return null;let a=await n.text(),r=A(a);if(r){r.source="remote",r.packageId=`${o}/${e}`;let d=S.dirname(t),p=S.resolve(s,".skills",`${o}_${e}`,d);await X.mkdir(p,{recursive:!0}),await X.writeFile(S.resolve(p,"SKILL.md"),a),r.path=S.resolve(p,"SKILL.md")}return r}catch{return null}}async function ne(o,e){let t=[],{default:s}=await import("fast-glob"),i=await s.glob("**/SKILL.md",{cwd:o,deep:5});for(let n of i)try{let a=S.resolve(o,n),r=await X.readFile(a,"utf8"),d=A(r);d&&(d.source="remote",d.path=a,d.packageId=e,t.push(d))}catch{}return t}async function At(o,e,t,s,i){let n=["---",`name: ${o}`,`description: ${e}`];if(s?.length){n.push("tags:");for(let a of s)n.push(` - ${a}`)}if(i?.length){n.push("globs:");for(let a of i)n.push(` - ${a}`)}return n.push("---"),`${n.join(`
2
2
  `)}
3
3
 
4
4
  ${t}`}async function It(o){let{loadLocalSkills:e}=await import("./loader-YFVSSYSL.js");return e(o)}async function Ot(o,e,t,s,i){let a=[{role:"system",content:`You are a skill author for the Agent Skills ecosystem (skills.sh).
@@ -1,2 +1,2 @@
1
- import{b as d}from"./chunk-2PYRRBLW.js";import"./chunk-RKPAVWXF.js";import{b as c}from"./chunk-IFUAP7UD.js";import"./chunk-KP7KDLZ2.js";import"./chunk-UZEH2A2F.js";import"./chunk-KUB5F67E.js";import"./chunk-RFMBLJN3.js";import"./chunk-3UOTLMXD.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-X5UWEMFI.js";import"./chunk-KEUW6YLL.js";import"./chunk-N47Y5ADQ.js";import"./chunk-YSCT6DPR.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";var u=new Set(["cron","heartbeat","api","a2a","mesh","approvals","requests"]);function p(n){return typeof n=="string"?n.trim():""}async function y(n,o){let i=o.fetch??fetch,h=o.daemonUrl.replace(/\/$/,""),a=o.env??process.env,s=(p(n.action)||"show").toLowerCase();if(s==="show")try{let e=await i(`${h}/api/org`,{headers:c(a),signal:AbortSignal.timeout(1e4)}),r=await e.json().catch(()=>({}));return e.ok?String(r.text??""):`Error: ${r?.error||`HTTP ${e.status}`}`}catch(e){return`Error: couldn't reach the daemon (${e?.message??e}).`}if(s!=="propose")return`Error: unknown action "${s}". Use show or propose.`;let t=d(n,a);if(!t)return"Error: couldn't tell which agent you are. Pass callerAgentId.";let l=t.channel&&t.chatId&&!u.has(t.channel)?{channel:t.channel,chatId:t.chatId,...t.accountId?{accountId:t.accountId}:{}}:void 0;try{let e=await i(`${h}/api/org/proposals`,{method:"POST",headers:{"Content-Type":"application/json",...c(a)},body:JSON.stringify({changes:n.changes,newAgent:n.newAgent,why:n.why,raised_by:t.agentId,...l?{reply:l}:{}}),signal:AbortSignal.timeout(1e4)}),r=await e.json().catch(()=>({}));return e.ok?[`Card ${r.card.id} is in the owner's Approvals inbox: "${r.text}"`,"Nothing is changed yet. On the owner's yes the daemon applies it and you get a message with the result; do not edit the org chart yourself.","Tell the owner it is waiting for their yes."].join(" "):`Not proposed: ${r?.error||`HTTP ${e.status}`}`}catch(e){return`Error: couldn't reach the daemon (${e?.message??e}).`}}export{y as runOrgTool};
2
- //# sourceMappingURL=org-tool-R6U5LUUB.js.map
1
+ import{b as d}from"./chunk-KU3ZF3WO.js";import"./chunk-RKPAVWXF.js";import{b as c}from"./chunk-IFUAP7UD.js";import"./chunk-KP7KDLZ2.js";import"./chunk-CUCIMPFI.js";import"./chunk-ERKK22QV.js";import"./chunk-G3GFE3GK.js";import"./chunk-3UOTLMXD.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-UWDDVDU6.js";import"./chunk-KEUW6YLL.js";import"./chunk-N47Y5ADQ.js";import"./chunk-YSCT6DPR.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";var u=new Set(["cron","heartbeat","api","a2a","mesh","approvals","requests"]);function p(n){return typeof n=="string"?n.trim():""}async function y(n,o){let i=o.fetch??fetch,h=o.daemonUrl.replace(/\/$/,""),a=o.env??process.env,s=(p(n.action)||"show").toLowerCase();if(s==="show")try{let e=await i(`${h}/api/org`,{headers:c(a),signal:AbortSignal.timeout(1e4)}),r=await e.json().catch(()=>({}));return e.ok?String(r.text??""):`Error: ${r?.error||`HTTP ${e.status}`}`}catch(e){return`Error: couldn't reach the daemon (${e?.message??e}).`}if(s!=="propose")return`Error: unknown action "${s}". Use show or propose.`;let t=d(n,a);if(!t)return"Error: couldn't tell which agent you are. Pass callerAgentId.";let l=t.channel&&t.chatId&&!u.has(t.channel)?{channel:t.channel,chatId:t.chatId,...t.accountId?{accountId:t.accountId}:{}}:void 0;try{let e=await i(`${h}/api/org/proposals`,{method:"POST",headers:{"Content-Type":"application/json",...c(a)},body:JSON.stringify({changes:n.changes,newAgent:n.newAgent,why:n.why,raised_by:t.agentId,...l?{reply:l}:{}}),signal:AbortSignal.timeout(1e4)}),r=await e.json().catch(()=>({}));return e.ok?[`Card ${r.card.id} is in the owner's Approvals inbox: "${r.text}"`,"Nothing is changed yet. On the owner's yes the daemon applies it and you get a message with the result; do not edit the org chart yourself.","Tell the owner it is waiting for their yes."].join(" "):`Not proposed: ${r?.error||`HTTP ${e.status}`}`}catch(e){return`Error: couldn't reach the daemon (${e?.message??e}).`}}export{y as runOrgTool};
2
+ //# sourceMappingURL=org-tool-QBLKCMY3.js.map