agentix-cli 0.79.4 → 0.80.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/dist/{App-PFMTQ7J5.js → App-KVH5POXZ.js} +2 -2
  2. package/dist/{ChatApp-ZBSU2F6J.js → ChatApp-LD4TXJWP.js} +2 -2
  3. package/dist/{agent-AMU6E27Z.js → agent-FUMJM6OW.js} +2 -2
  4. package/dist/{board-dashboard-OJSOA4OL.js → board-dashboard-OS5J3F73.js} +340 -215
  5. package/dist/board-dashboard-OS5J3F73.js.map +1 -0
  6. package/dist/{chunk-LPDQ2KK4.js → chunk-3UN6CXRL.js} +2 -2
  7. package/dist/chunk-42Y3BXXS.js +15 -0
  8. package/dist/{chunk-YKPISR5J.js.map → chunk-42Y3BXXS.js.map} +1 -1
  9. package/dist/chunk-6JJ3GODZ.js +57 -0
  10. package/dist/chunk-6JJ3GODZ.js.map +1 -0
  11. package/dist/{chunk-LNQOJC57.js → chunk-7IGSJGXI.js} +2 -2
  12. package/dist/{chunk-ROIPXJ6L.js → chunk-AF46YOLU.js} +192 -191
  13. package/dist/chunk-AF46YOLU.js.map +1 -0
  14. package/dist/chunk-API4IZZG.js +2 -0
  15. package/dist/chunk-API4IZZG.js.map +1 -0
  16. package/dist/{chunk-T7GFKM63.js → chunk-BEHC3X42.js} +191 -195
  17. package/dist/chunk-BEHC3X42.js.map +1 -0
  18. package/dist/{chunk-EAYHYAF3.js → chunk-BJPIRNP6.js} +2 -2
  19. package/dist/{chunk-2ZQ42Q4L.js → chunk-BVZFYBBP.js} +2 -2
  20. package/dist/chunk-GTJIKXDB.js +2 -0
  21. package/dist/chunk-GTJIKXDB.js.map +1 -0
  22. package/dist/{chunk-M4XUZA3O.js → chunk-H7253EHW.js} +2 -2
  23. package/dist/{chunk-EUVMKZUC.js → chunk-MOQNLS5Z.js} +2 -2
  24. package/dist/{chunk-XFCSJUGY.js → chunk-MYRSNJJ4.js} +2 -2
  25. package/dist/{chunk-X6WZ54UJ.js → chunk-NOAAK2XI.js} +79 -79
  26. package/dist/chunk-NOAAK2XI.js.map +1 -0
  27. package/dist/chunk-OVN5LVJY.js +11 -0
  28. package/dist/chunk-OVN5LVJY.js.map +1 -0
  29. package/dist/{chunk-7QRCAHPX.js → chunk-PE55MMLK.js} +2 -2
  30. package/dist/{chunk-6SJTBTDG.js → chunk-R42S57G6.js} +2 -2
  31. package/dist/chunk-SHEUCITK.js +2 -0
  32. package/dist/chunk-SHEUCITK.js.map +1 -0
  33. package/dist/{chunk-WVYOXM45.js → chunk-TEFMZY6B.js} +2 -2
  34. package/dist/{chunk-WNI2P7S6.js → chunk-UB63NQQL.js} +2 -2
  35. package/dist/{chunk-HTKSZZXK.js → chunk-UR3ZIDMA.js} +2 -2
  36. package/dist/{chunk-MGCTX2BB.js → chunk-UXSYVMPK.js} +2 -2
  37. package/dist/{chunk-5RRORS5S.js → chunk-XESESMKN.js} +57 -57
  38. package/dist/chunk-XESESMKN.js.map +1 -0
  39. package/dist/{chunk-CNSPC4BZ.js → chunk-YCI3KUYF.js} +2 -2
  40. package/dist/{chunk-R7WZUUYO.js → chunk-Z3XUGXPD.js} +2 -2
  41. package/dist/{chunk-RD5EKHGZ.js → chunk-ZR3NZLJL.js} +2 -2
  42. package/dist/cli.js +1 -1
  43. package/dist/cli.js.map +1 -1
  44. package/dist/client-TJ5YZOEE.js +2 -0
  45. package/dist/config-4WZ7Y34V.js +2 -0
  46. package/dist/config-mutator-5Z7EEB5N.js +2 -0
  47. package/dist/{doctor-DST4SVW4.js → doctor-7K3NRBNN.js} +2 -2
  48. package/dist/{facts-2K6UX5GD.js → facts-U7BUYRXN.js} +2 -2
  49. package/dist/{facts-2K6UX5GD.js.map → facts-U7BUYRXN.js.map} +1 -1
  50. package/dist/index.d.ts +82 -12
  51. package/dist/index.js +1 -1
  52. package/dist/index.js.map +1 -1
  53. package/dist/program-KMQNX6YK.js +2 -0
  54. package/dist/{promote-CQCRZCYB.js → promote-NDC3X54P.js} +2 -2
  55. package/dist/query-F7BD3JPE.js +2 -0
  56. package/dist/registry-5NBHBVY3.js +2 -0
  57. package/dist/{request-planner-TNDIQMHS.js → request-planner-H74KHFGJ.js} +2 -2
  58. package/dist/{review-candidates-SXVIYCVE.js → review-candidates-IPJWEXR2.js} +2 -2
  59. package/dist/routing-3RSG7SKW.js +2 -0
  60. package/dist/schedule-tool-7NYAK43U.js +2 -0
  61. package/dist/scheduler-24O7PADJ.js +2 -0
  62. package/dist/seat-TOM2WHQR.js +2 -0
  63. package/dist/{select-WKMMUWLU.js → select-BUWOD47K.js} +2 -2
  64. package/dist/{set-enabled-RIE3PLNJ.js → set-enabled-XWSFTICB.js} +2 -2
  65. package/dist/tool-GUINJ2BQ.js +4 -0
  66. package/dist/tool-GUINJ2BQ.js.map +1 -0
  67. package/dist/tool-VOA4HSVP.js +4 -0
  68. package/dist/tool-VOA4HSVP.js.map +1 -0
  69. package/dist/wiki-VFME4T2H.js +2 -0
  70. package/package.json +1 -1
  71. package/dist/board-dashboard-OJSOA4OL.js.map +0 -1
  72. package/dist/chunk-2ACZWM7F.js +0 -22
  73. package/dist/chunk-2ACZWM7F.js.map +0 -1
  74. package/dist/chunk-5RRORS5S.js.map +0 -1
  75. package/dist/chunk-7XB2CVC3.js +0 -2
  76. package/dist/chunk-7XB2CVC3.js.map +0 -1
  77. package/dist/chunk-ROIPXJ6L.js.map +0 -1
  78. package/dist/chunk-T7GFKM63.js.map +0 -1
  79. package/dist/chunk-X6WZ54UJ.js.map +0 -1
  80. package/dist/chunk-YKPISR5J.js +0 -15
  81. package/dist/client-XAE7NLE2.js +0 -2
  82. package/dist/config-5HAWFIEL.js +0 -2
  83. package/dist/config-mutator-Y7KAC4AC.js +0 -2
  84. package/dist/program-SSCPEHTW.js +0 -2
  85. package/dist/query-WSLKGCQN.js +0 -2
  86. package/dist/registry-6HKQKIBD.js +0 -2
  87. package/dist/routing-GQWG65DQ.js +0 -2
  88. package/dist/schedule-tool-WXRMJMW6.js +0 -2
  89. package/dist/scheduler-YW6JFH3Z.js +0 -2
  90. package/dist/seat-K2JSQIZ4.js +0 -2
  91. package/dist/tool-TAMRBONN.js +0 -4
  92. package/dist/tool-TAMRBONN.js.map +0 -1
  93. package/dist/wiki-WBRXHY7J.js +0 -2
  94. /package/dist/{App-PFMTQ7J5.js.map → App-KVH5POXZ.js.map} +0 -0
  95. /package/dist/{ChatApp-ZBSU2F6J.js.map → ChatApp-LD4TXJWP.js.map} +0 -0
  96. /package/dist/{agent-AMU6E27Z.js.map → agent-FUMJM6OW.js.map} +0 -0
  97. /package/dist/{chunk-LPDQ2KK4.js.map → chunk-3UN6CXRL.js.map} +0 -0
  98. /package/dist/{chunk-LNQOJC57.js.map → chunk-7IGSJGXI.js.map} +0 -0
  99. /package/dist/{chunk-EAYHYAF3.js.map → chunk-BJPIRNP6.js.map} +0 -0
  100. /package/dist/{chunk-2ZQ42Q4L.js.map → chunk-BVZFYBBP.js.map} +0 -0
  101. /package/dist/{chunk-M4XUZA3O.js.map → chunk-H7253EHW.js.map} +0 -0
  102. /package/dist/{chunk-EUVMKZUC.js.map → chunk-MOQNLS5Z.js.map} +0 -0
  103. /package/dist/{chunk-XFCSJUGY.js.map → chunk-MYRSNJJ4.js.map} +0 -0
  104. /package/dist/{chunk-7QRCAHPX.js.map → chunk-PE55MMLK.js.map} +0 -0
  105. /package/dist/{chunk-6SJTBTDG.js.map → chunk-R42S57G6.js.map} +0 -0
  106. /package/dist/{chunk-WVYOXM45.js.map → chunk-TEFMZY6B.js.map} +0 -0
  107. /package/dist/{chunk-WNI2P7S6.js.map → chunk-UB63NQQL.js.map} +0 -0
  108. /package/dist/{chunk-HTKSZZXK.js.map → chunk-UR3ZIDMA.js.map} +0 -0
  109. /package/dist/{chunk-MGCTX2BB.js.map → chunk-UXSYVMPK.js.map} +0 -0
  110. /package/dist/{chunk-CNSPC4BZ.js.map → chunk-YCI3KUYF.js.map} +0 -0
  111. /package/dist/{chunk-R7WZUUYO.js.map → chunk-Z3XUGXPD.js.map} +0 -0
  112. /package/dist/{chunk-RD5EKHGZ.js.map → chunk-ZR3NZLJL.js.map} +0 -0
  113. /package/dist/{client-XAE7NLE2.js.map → client-TJ5YZOEE.js.map} +0 -0
  114. /package/dist/{config-5HAWFIEL.js.map → config-4WZ7Y34V.js.map} +0 -0
  115. /package/dist/{config-mutator-Y7KAC4AC.js.map → config-mutator-5Z7EEB5N.js.map} +0 -0
  116. /package/dist/{doctor-DST4SVW4.js.map → doctor-7K3NRBNN.js.map} +0 -0
  117. /package/dist/{program-SSCPEHTW.js.map → program-KMQNX6YK.js.map} +0 -0
  118. /package/dist/{promote-CQCRZCYB.js.map → promote-NDC3X54P.js.map} +0 -0
  119. /package/dist/{query-WSLKGCQN.js.map → query-F7BD3JPE.js.map} +0 -0
  120. /package/dist/{registry-6HKQKIBD.js.map → registry-5NBHBVY3.js.map} +0 -0
  121. /package/dist/{request-planner-TNDIQMHS.js.map → request-planner-H74KHFGJ.js.map} +0 -0
  122. /package/dist/{review-candidates-SXVIYCVE.js.map → review-candidates-IPJWEXR2.js.map} +0 -0
  123. /package/dist/{routing-GQWG65DQ.js.map → routing-3RSG7SKW.js.map} +0 -0
  124. /package/dist/{schedule-tool-WXRMJMW6.js.map → schedule-tool-7NYAK43U.js.map} +0 -0
  125. /package/dist/{scheduler-YW6JFH3Z.js.map → scheduler-24O7PADJ.js.map} +0 -0
  126. /package/dist/{seat-K2JSQIZ4.js.map → seat-TOM2WHQR.js.map} +0 -0
  127. /package/dist/{select-WKMMUWLU.js.map → select-BUWOD47K.js.map} +0 -0
  128. /package/dist/{set-enabled-RIE3PLNJ.js.map → set-enabled-XWSFTICB.js.map} +0 -0
  129. /package/dist/{wiki-WBRXHY7J.js.map → wiki-VFME4T2H.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -4675,6 +4675,37 @@ declare const daemonConfigSchema: z.ZodObject<{
4675
4675
  windowMinutes?: number | undefined;
4676
4676
  } | undefined;
4677
4677
  }>>;
4678
+ /** Open requests (src/requests, #356): what a person asked an agent for
4679
+ * is recorded and followed until it is done, declined or dropped. Off
4680
+ * by default. */
4681
+ requests: z.ZodDefault<z.ZodObject<{
4682
+ enabled: z.ZodDefault<z.ZodBoolean>;
4683
+ /** Channels to capture on. Empty: every channel a person writes on
4684
+ * (telegram, whatsapp, slack, discord, gitlab, github, app, voice,
4685
+ * dashboard, webrtc). */
4686
+ channels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4687
+ /** Who counts as the owner on channels other people can reach, as
4688
+ * "channel:id": the login on GitLab and GitHub, the sender id elsewhere.
4689
+ * Usernames beside an id and display names are not matched. Empty: only
4690
+ * this node's own surfaces (voice, app, dashboard, webrtc) are captured. */
4691
+ from: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4692
+ /** An open request with no activity for this long comes back to the owner. */
4693
+ staleAfterHours: z.ZodDefault<z.ZodNumber>;
4694
+ /** Closed requests are deleted after this many days. Open ones never are. */
4695
+ retentionDays: z.ZodDefault<z.ZodNumber>;
4696
+ }, "strip", z.ZodTypeAny, {
4697
+ enabled: boolean;
4698
+ from: string[];
4699
+ retentionDays: number;
4700
+ channels: string[];
4701
+ staleAfterHours: number;
4702
+ }, {
4703
+ enabled?: boolean | undefined;
4704
+ from?: string[] | undefined;
4705
+ retentionDays?: number | undefined;
4706
+ channels?: string[] | undefined;
4707
+ staleAfterHours?: number | undefined;
4708
+ }>>;
4678
4709
  /** Hand due Apple Reminders back to the agent that created them
4679
4710
  * (src/reminders). macOS only; reads reminders whose notes end with the
4680
4711
  * mac-pim skill's `agentx: agent=<id>` trailer. */
@@ -6550,12 +6581,6 @@ declare const daemonConfigSchema: z.ZodObject<{
6550
6581
  region: string;
6551
6582
  };
6552
6583
  };
6553
- providers: Record<string, {
6554
- apiKey?: string | undefined;
6555
- thinking?: boolean | undefined;
6556
- defaultModel?: string | undefined;
6557
- baseUrl?: string | undefined;
6558
- }>;
6559
6584
  channels: {
6560
6585
  push: {
6561
6586
  enabled: boolean;
@@ -6700,6 +6725,12 @@ declare const daemonConfigSchema: z.ZodObject<{
6700
6725
  callUrlBase?: string | undefined;
6701
6726
  };
6702
6727
  };
6728
+ providers: Record<string, {
6729
+ apiKey?: string | undefined;
6730
+ thinking?: boolean | undefined;
6731
+ defaultModel?: string | undefined;
6732
+ baseUrl?: string | undefined;
6733
+ }>;
6703
6734
  crons: Record<string, {
6704
6735
  enabled: boolean;
6705
6736
  agent: string;
@@ -6843,6 +6874,13 @@ declare const daemonConfigSchema: z.ZodObject<{
6843
6874
  };
6844
6875
  drainTimeoutSeconds?: number | undefined;
6845
6876
  };
6877
+ requests: {
6878
+ enabled: boolean;
6879
+ from: string[];
6880
+ retentionDays: number;
6881
+ channels: string[];
6882
+ staleAfterHours: number;
6883
+ };
6846
6884
  reminders: {
6847
6885
  enabled: boolean;
6848
6886
  command: string;
@@ -7284,12 +7322,6 @@ declare const daemonConfigSchema: z.ZodObject<{
7284
7322
  region?: string | undefined;
7285
7323
  } | undefined;
7286
7324
  } | undefined;
7287
- providers?: Record<string, {
7288
- apiKey?: string | undefined;
7289
- thinking?: boolean | undefined;
7290
- defaultModel?: string | undefined;
7291
- baseUrl?: string | undefined;
7292
- }> | undefined;
7293
7325
  channels?: {
7294
7326
  push?: {
7295
7327
  enabled?: boolean | undefined;
@@ -7434,6 +7466,12 @@ declare const daemonConfigSchema: z.ZodObject<{
7434
7466
  } | undefined;
7435
7467
  } | undefined;
7436
7468
  } | undefined;
7469
+ providers?: Record<string, {
7470
+ apiKey?: string | undefined;
7471
+ thinking?: boolean | undefined;
7472
+ defaultModel?: string | undefined;
7473
+ baseUrl?: string | undefined;
7474
+ }> | undefined;
7437
7475
  crons?: Record<string, {
7438
7476
  agent: string;
7439
7477
  schedule: string;
@@ -7577,6 +7615,13 @@ declare const daemonConfigSchema: z.ZodObject<{
7577
7615
  } | undefined;
7578
7616
  drainTimeoutSeconds?: number | undefined;
7579
7617
  } | undefined;
7618
+ requests?: {
7619
+ enabled?: boolean | undefined;
7620
+ from?: string[] | undefined;
7621
+ retentionDays?: number | undefined;
7622
+ channels?: string[] | undefined;
7623
+ staleAfterHours?: number | undefined;
7624
+ } | undefined;
7580
7625
  reminders?: {
7581
7626
  enabled?: boolean | undefined;
7582
7627
  command?: string | undefined;
@@ -8149,6 +8194,18 @@ interface AgentXEvents {
8149
8194
  resumeOrigin?: string | null;
8150
8195
  resumeAttempt?: number;
8151
8196
  resumedFrom?: string;
8197
+ /** Who sent the message, when the channel knows (requests, #356). */
8198
+ sender?: {
8199
+ name?: string;
8200
+ id?: string;
8201
+ username?: string;
8202
+ };
8203
+ /** True for the turn that talks to the person: not a delegated hop,
8204
+ * not a callback (a2a/initiator isHumanFacingTurn). */
8205
+ humanRoot?: boolean;
8206
+ /** True for the turn the daemon starts to hand a request back to its
8207
+ * agent (requests/tracker pickupContext). */
8208
+ pickup?: boolean;
8152
8209
  };
8153
8210
  /** A single step inside an in-flight task — typically a tool call or
8154
8211
  * tool result inside the Claude streaming response. Producer is the
@@ -8194,6 +8251,8 @@ interface AgentXEvents {
8194
8251
  chatId: string;
8195
8252
  durationMs: number;
8196
8253
  error?: string;
8254
+ /** The kind of error, when the runtime named one ("cancelled", …). */
8255
+ errorKind?: string;
8197
8256
  /** A daemon shutdown stopped the run. Its trace stays in flight so the
8198
8257
  * next boot can resume it. */
8199
8258
  interrupted?: boolean;
@@ -8537,11 +8596,17 @@ declare class AgentXDaemon {
8537
8596
  restartRequired: string[];
8538
8597
  error?: string;
8539
8598
  }>;
8599
+ /** Open requests (src/requests); null when the database is unavailable. */
8600
+ private requests;
8601
+ private requestsSweeping;
8540
8602
  private approvalsTimer?;
8541
8603
  private approvalsSweeping;
8542
8604
  /** Every minute: expire decision cards, tell agents their results, and
8543
8605
  * send the day's digest when due (src/approvals/sweep.ts). */
8544
8606
  private startApprovalsSweep;
8607
+ /** Requests that went quiet come back, each is raised once, and old
8608
+ * closed ones are deleted (src/requests/sweep.ts). */
8609
+ private sweepRequests;
8545
8610
  /** A check-in pass when one is due, or `force` now. macOS only. */
8546
8611
  runCheckin(force?: PassKind): Promise<PassResult | null>;
8547
8612
  private stopReminders?;
@@ -8625,6 +8690,11 @@ declare class AgentXDaemon {
8625
8690
  /** Wraps decideMeshAuth (daemon/mesh-auth.ts) with token collection,
8626
8691
  * logging, and the 401 response. */
8627
8692
  private checkMeshAuth;
8693
+ /** The running turn a call names, as its X-AgentX-* headers give it. */
8694
+ private callerProof;
8695
+ /** The channel and chat of the running turn of `agentId` that `proof`
8696
+ * names, as the registry files the run. Null when it names none. */
8697
+ private provenTurn;
8628
8698
  private handleHttp;
8629
8699
  /**
8630
8700
  * OpenAI-compatible chat completions endpoint.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import{a as L}from"./chunk-C245D4BZ.js";import{b as St,c as kt,d as vt,da as Tt,e as xt,ea as Mt,f as $t,g as Ct,h as Pt,i as bt}from"./chunk-T7GFKM63.js";import"./chunk-5RRORS5S.js";import"./chunk-R7WZUUYO.js";import"./chunk-S2GAEH2F.js";import"./chunk-7XB2CVC3.js";import"./chunk-CL53UVOF.js";import"./chunk-ZVP6GB4G.js";import"./chunk-2ZQ42Q4L.js";import"./chunk-AQASR6KR.js";import"./chunk-2D3RYIDU.js";import"./chunk-EKJG63EJ.js";import{T as yt,k as lt,l as ct,m as dt,n as mt,o as pt}from"./chunk-X6WZ54UJ.js";import"./chunk-2ACZWM7F.js";import"./chunk-WP6KLXTP.js";import"./chunk-N6EWZGIX.js";import"./chunk-DP7RTNDM.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-XFCSJUGY.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-Y4CYQV7G.js";import"./chunk-WVYOXM45.js";import"./chunk-2AXFYDWF.js";import"./chunk-SZDACK6O.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import{s as ut}from"./chunk-6SJTBTDG.js";import"./chunk-HTKSZZXK.js";import"./chunk-VWTBHLMX.js";import"./chunk-M4XUZA3O.js";import{a as ht}from"./chunk-RD5EKHGZ.js";import"./chunk-KA2UIZXG.js";import"./chunk-GQ76J72O.js";import"./chunk-ILEC3IAV.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-X5C5W3E4.js";import"./chunk-GV7S5BAX.js";import"./chunk-GSX4NK2N.js";import"./chunk-EAYHYAF3.js";import"./chunk-MYVHVJWZ.js";import"./chunk-DWADWDMU.js";import"./chunk-23A5K5UW.js";import"./chunk-QD6IICK7.js";import"./chunk-CECHWYJ2.js";import"./chunk-MGCTX2BB.js";import{f as gt,g as ft}from"./chunk-WNI2P7S6.js";import"./chunk-WPNRDEHW.js";import"./chunk-2GIDVZ4H.js";import{j as it,k as rt,l as at}from"./chunk-7QRCAHPX.js";import"./chunk-FX3D7YON.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.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-5MUJZODV.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{C as tt,E as st,F as ot,H as nt}from"./chunk-YKPISR5J.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{a as L}from"./chunk-C245D4BZ.js";import{a as St,b as kt,c as vt,ca as Tt,d as xt,da as Mt,e as $t,f as Ct,g as Pt,h as bt}from"./chunk-BEHC3X42.js";import"./chunk-XESESMKN.js";import"./chunk-GTJIKXDB.js";import"./chunk-Z3XUGXPD.js";import"./chunk-S2GAEH2F.js";import"./chunk-CL53UVOF.js";import"./chunk-ZVP6GB4G.js";import"./chunk-BVZFYBBP.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-2D3RYIDU.js";import"./chunk-EKJG63EJ.js";import{V as yt,k as lt,l as ct,m as dt,n as mt,o as pt}from"./chunk-NOAAK2XI.js";import"./chunk-6JJ3GODZ.js";import"./chunk-API4IZZG.js";import"./chunk-WP6KLXTP.js";import"./chunk-N6EWZGIX.js";import"./chunk-DP7RTNDM.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-MYRSNJJ4.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-Y4CYQV7G.js";import"./chunk-OVN5LVJY.js";import"./chunk-SHEUCITK.js";import"./chunk-TEFMZY6B.js";import"./chunk-SZDACK6O.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import{s as ut}from"./chunk-R42S57G6.js";import"./chunk-UR3ZIDMA.js";import"./chunk-VWTBHLMX.js";import"./chunk-H7253EHW.js";import{a as ht}from"./chunk-ZR3NZLJL.js";import"./chunk-KA2UIZXG.js";import"./chunk-GQ76J72O.js";import"./chunk-ILEC3IAV.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-X5C5W3E4.js";import"./chunk-GV7S5BAX.js";import"./chunk-GSX4NK2N.js";import"./chunk-BJPIRNP6.js";import"./chunk-MYVHVJWZ.js";import"./chunk-DWADWDMU.js";import"./chunk-23A5K5UW.js";import"./chunk-QD6IICK7.js";import"./chunk-CECHWYJ2.js";import"./chunk-UXSYVMPK.js";import{f as gt,g as ft}from"./chunk-UB63NQQL.js";import"./chunk-WPNRDEHW.js";import"./chunk-2GIDVZ4H.js";import{j as it,k as rt,l as at}from"./chunk-PE55MMLK.js";import"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.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-5MUJZODV.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{D as tt,F as st,G as ot,I as nt}from"./chunk-42Y3BXXS.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).