agents-inc 0.161.0 → 0.162.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 (129) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/{chunk-ADDYIMWN.js → chunk-2IMHZEIK.js} +3 -3
  3. package/dist/{chunk-DHRW3MDM.js → chunk-33ZKIYJM.js} +3 -3
  4. package/dist/{chunk-DTCUZL7S.js → chunk-3JDVBHWO.js} +2 -2
  5. package/dist/{chunk-BLGETWYI.js → chunk-3QBOVV6A.js} +2 -2
  6. package/dist/{chunk-ODUACQLV.js → chunk-4KVJJJG2.js} +6 -6
  7. package/dist/{chunk-5MML3K36.js → chunk-4NAWM4OQ.js} +2 -2
  8. package/dist/{chunk-EY7Z34Y4.js → chunk-53XPSAJ4.js} +14 -14
  9. package/dist/chunk-53XPSAJ4.js.map +1 -0
  10. package/dist/{chunk-ZQZHDYHQ.js → chunk-57YWAMNT.js} +7 -7
  11. package/dist/{chunk-3M75HVIM.js → chunk-5J6DO4VW.js} +3 -3
  12. package/dist/{chunk-UMYEY6BA.js → chunk-77YZFVQD.js} +2 -2
  13. package/dist/{chunk-SX57ZIGM.js → chunk-AQSMNUKJ.js} +4 -4
  14. package/dist/{chunk-B7YTQVAF.js → chunk-BR3TNSO3.js} +4 -4
  15. package/dist/{chunk-MED6GNV3.js → chunk-C53RJ7AA.js} +9 -9
  16. package/dist/{chunk-EEFTUZHZ.js → chunk-EN5MEPAS.js} +5 -5
  17. package/dist/{chunk-B3YSTZZC.js → chunk-ES7WGE32.js} +3 -3
  18. package/dist/{chunk-BRHU6J3C.js → chunk-FL2CJ5T5.js} +3 -3
  19. package/dist/{chunk-3TM4FHTG.js → chunk-FXL63LDL.js} +2 -2
  20. package/dist/{chunk-5DWDT6GM.js → chunk-GFO55TMY.js} +10 -5
  21. package/dist/chunk-GFO55TMY.js.map +1 -0
  22. package/dist/{chunk-2MPXMJ2O.js → chunk-H2MDPOLG.js} +5 -5
  23. package/dist/{chunk-A2NA377T.js → chunk-HRVPZMKK.js} +6 -6
  24. package/dist/{chunk-6PVWDTEM.js → chunk-IMTWWA3N.js} +12 -12
  25. package/dist/{chunk-AMZO4YJK.js → chunk-IV42Z63R.js} +2 -2
  26. package/dist/{chunk-AMZO4YJK.js.map → chunk-IV42Z63R.js.map} +1 -1
  27. package/dist/{chunk-XA4SWA2Z.js → chunk-J2YG7P7L.js} +32 -6
  28. package/dist/{chunk-XA4SWA2Z.js.map → chunk-J2YG7P7L.js.map} +1 -1
  29. package/dist/{chunk-YOVUXONB.js → chunk-K26SBQLO.js} +4 -4
  30. package/dist/{chunk-EQSMVZGS.js → chunk-L65XGQKR.js} +8 -8
  31. package/dist/{chunk-264XDRU7.js → chunk-MI7LKLD7.js} +2 -2
  32. package/dist/{chunk-HB3YIAFD.js → chunk-MSUTHS2V.js} +2 -2
  33. package/dist/{chunk-W2RXRWDB.js → chunk-QM3ZNOWJ.js} +2 -2
  34. package/dist/{chunk-3H42U56X.js → chunk-RMMEYCEA.js} +2 -2
  35. package/dist/{chunk-LZPRLHUE.js → chunk-S6GX7IJ2.js} +6 -6
  36. package/dist/{chunk-T4RVCFWN.js → chunk-T2RPUNYP.js} +3 -3
  37. package/dist/{chunk-YSQ76LWG.js → chunk-UNASGGW2.js} +46 -27
  38. package/dist/chunk-UNASGGW2.js.map +1 -0
  39. package/dist/{chunk-WVCF7KFV.js → chunk-VEBEGZUV.js} +5 -5
  40. package/dist/{chunk-AO6DXJUK.js → chunk-VEONZFTL.js} +3 -3
  41. package/dist/{chunk-DGXW2ZFY.js → chunk-VFZF7LVY.js} +3 -3
  42. package/dist/{chunk-N6CILY5A.js → chunk-WIJM6BX6.js} +2 -2
  43. package/dist/{chunk-EERGAAGE.js → chunk-X6KXPRKI.js} +4 -4
  44. package/dist/{chunk-QKMT6OOP.js → chunk-XSM3IBMG.js} +2 -2
  45. package/dist/{chunk-F6LS2BQD.js → chunk-ZFPQM63K.js} +71 -9
  46. package/dist/{chunk-F6LS2BQD.js.map → chunk-ZFPQM63K.js.map} +1 -1
  47. package/dist/commands/build/marketplace.js +7 -7
  48. package/dist/commands/build/plugins.js +7 -7
  49. package/dist/commands/compile.js +10 -10
  50. package/dist/commands/doctor.js +10 -10
  51. package/dist/commands/edit.js +37 -37
  52. package/dist/commands/edit.js.map +1 -1
  53. package/dist/commands/eject.js +10 -10
  54. package/dist/commands/init.js +36 -36
  55. package/dist/commands/list.js +8 -8
  56. package/dist/commands/new/marketplace.js +7 -7
  57. package/dist/commands/search.js +15 -14
  58. package/dist/commands/search.js.map +1 -1
  59. package/dist/commands/share.js +22 -16
  60. package/dist/commands/share.js.map +1 -1
  61. package/dist/commands/uninstall.js +11 -11
  62. package/dist/commands/update.js +6 -6
  63. package/dist/components/common/removal-plan-confirm.js +2 -2
  64. package/dist/components/common/select-list.js +2 -2
  65. package/dist/components/wizard/category-grid.js +4 -4
  66. package/dist/components/wizard/checkbox-grid.js +4 -4
  67. package/dist/components/wizard/domain-selection.js +9 -9
  68. package/dist/components/wizard/run-wizard-session.js +26 -26
  69. package/dist/components/wizard/scroll-affordance.js +2 -2
  70. package/dist/components/wizard/skill-agent-summary.js +5 -5
  71. package/dist/components/wizard/source-grid.js +5 -5
  72. package/dist/components/wizard/stack-selection.js +7 -7
  73. package/dist/components/wizard/step-agents.js +8 -8
  74. package/dist/components/wizard/step-build.js +7 -7
  75. package/dist/components/wizard/step-confirm.js +9 -9
  76. package/dist/components/wizard/step-sources.js +8 -8
  77. package/dist/components/wizard/step-stack.js +8 -8
  78. package/dist/components/wizard/summary-panel.js +8 -8
  79. package/dist/components/wizard/toast.js +2 -2
  80. package/dist/components/wizard/wizard-layout.js +12 -12
  81. package/dist/components/wizard/wizard-tabs.js +2 -2
  82. package/dist/components/wizard/wizard.js +25 -25
  83. package/dist/hooks/init.js +36 -36
  84. package/dist/load-agent-defs-57YKPVQW.js +13 -0
  85. package/dist/recompile-project-agents-IQD3HRRS.js +17 -0
  86. package/dist/{source-loader-TSF5VS6V.js → source-loader-KAWB76OH.js} +4 -4
  87. package/dist/stores/wizard-store.js +4 -4
  88. package/package.json +2 -2
  89. package/dist/chunk-5DWDT6GM.js.map +0 -1
  90. package/dist/chunk-EY7Z34Y4.js.map +0 -1
  91. package/dist/chunk-YSQ76LWG.js.map +0 -1
  92. package/dist/load-agent-defs-LDSND43G.js +0 -13
  93. package/dist/recompile-project-agents-GQLODH24.js +0 -17
  94. /package/dist/{chunk-ADDYIMWN.js.map → chunk-2IMHZEIK.js.map} +0 -0
  95. /package/dist/{chunk-DHRW3MDM.js.map → chunk-33ZKIYJM.js.map} +0 -0
  96. /package/dist/{chunk-DTCUZL7S.js.map → chunk-3JDVBHWO.js.map} +0 -0
  97. /package/dist/{chunk-BLGETWYI.js.map → chunk-3QBOVV6A.js.map} +0 -0
  98. /package/dist/{chunk-ODUACQLV.js.map → chunk-4KVJJJG2.js.map} +0 -0
  99. /package/dist/{chunk-5MML3K36.js.map → chunk-4NAWM4OQ.js.map} +0 -0
  100. /package/dist/{chunk-ZQZHDYHQ.js.map → chunk-57YWAMNT.js.map} +0 -0
  101. /package/dist/{chunk-3M75HVIM.js.map → chunk-5J6DO4VW.js.map} +0 -0
  102. /package/dist/{chunk-UMYEY6BA.js.map → chunk-77YZFVQD.js.map} +0 -0
  103. /package/dist/{chunk-SX57ZIGM.js.map → chunk-AQSMNUKJ.js.map} +0 -0
  104. /package/dist/{chunk-B7YTQVAF.js.map → chunk-BR3TNSO3.js.map} +0 -0
  105. /package/dist/{chunk-MED6GNV3.js.map → chunk-C53RJ7AA.js.map} +0 -0
  106. /package/dist/{chunk-EEFTUZHZ.js.map → chunk-EN5MEPAS.js.map} +0 -0
  107. /package/dist/{chunk-B3YSTZZC.js.map → chunk-ES7WGE32.js.map} +0 -0
  108. /package/dist/{chunk-BRHU6J3C.js.map → chunk-FL2CJ5T5.js.map} +0 -0
  109. /package/dist/{chunk-3TM4FHTG.js.map → chunk-FXL63LDL.js.map} +0 -0
  110. /package/dist/{chunk-2MPXMJ2O.js.map → chunk-H2MDPOLG.js.map} +0 -0
  111. /package/dist/{chunk-A2NA377T.js.map → chunk-HRVPZMKK.js.map} +0 -0
  112. /package/dist/{chunk-6PVWDTEM.js.map → chunk-IMTWWA3N.js.map} +0 -0
  113. /package/dist/{chunk-YOVUXONB.js.map → chunk-K26SBQLO.js.map} +0 -0
  114. /package/dist/{chunk-EQSMVZGS.js.map → chunk-L65XGQKR.js.map} +0 -0
  115. /package/dist/{chunk-264XDRU7.js.map → chunk-MI7LKLD7.js.map} +0 -0
  116. /package/dist/{chunk-HB3YIAFD.js.map → chunk-MSUTHS2V.js.map} +0 -0
  117. /package/dist/{chunk-W2RXRWDB.js.map → chunk-QM3ZNOWJ.js.map} +0 -0
  118. /package/dist/{chunk-3H42U56X.js.map → chunk-RMMEYCEA.js.map} +0 -0
  119. /package/dist/{chunk-LZPRLHUE.js.map → chunk-S6GX7IJ2.js.map} +0 -0
  120. /package/dist/{chunk-T4RVCFWN.js.map → chunk-T2RPUNYP.js.map} +0 -0
  121. /package/dist/{chunk-WVCF7KFV.js.map → chunk-VEBEGZUV.js.map} +0 -0
  122. /package/dist/{chunk-AO6DXJUK.js.map → chunk-VEONZFTL.js.map} +0 -0
  123. /package/dist/{chunk-DGXW2ZFY.js.map → chunk-VFZF7LVY.js.map} +0 -0
  124. /package/dist/{chunk-N6CILY5A.js.map → chunk-WIJM6BX6.js.map} +0 -0
  125. /package/dist/{chunk-EERGAAGE.js.map → chunk-X6KXPRKI.js.map} +0 -0
  126. /package/dist/{chunk-QKMT6OOP.js.map → chunk-XSM3IBMG.js.map} +0 -0
  127. /package/dist/{load-agent-defs-LDSND43G.js.map → load-agent-defs-57YKPVQW.js.map} +0 -0
  128. /package/dist/{recompile-project-agents-GQLODH24.js.map → recompile-project-agents-IQD3HRRS.js.map} +0 -0
  129. /package/dist/{source-loader-TSF5VS6V.js.map → source-loader-KAWB76OH.js.map} +0 -0
@@ -7,49 +7,49 @@ import {
7
7
  getDashboardData,
8
8
  runDashboardFlow,
9
9
  showDashboard
10
- } from "../chunk-EY7Z34Y4.js";
11
- import "../chunk-DTCUZL7S.js";
12
- import "../chunk-N6CILY5A.js";
13
- import "../chunk-B7YTQVAF.js";
14
- import "../chunk-6PVWDTEM.js";
15
- import "../chunk-QKMT6OOP.js";
16
- import "../chunk-DHRW3MDM.js";
17
- import "../chunk-3H42U56X.js";
18
- import "../chunk-EQSMVZGS.js";
19
- import "../chunk-ODUACQLV.js";
20
- import "../chunk-HB3YIAFD.js";
21
- import "../chunk-5MML3K36.js";
22
- import "../chunk-LZPRLHUE.js";
23
- import "../chunk-EEFTUZHZ.js";
24
- import "../chunk-W2RXRWDB.js";
25
- import "../chunk-WVCF7KFV.js";
26
- import "../chunk-ZQZHDYHQ.js";
27
- import "../chunk-3M75HVIM.js";
28
- import "../chunk-T4RVCFWN.js";
10
+ } from "../chunk-53XPSAJ4.js";
11
+ import "../chunk-3JDVBHWO.js";
12
+ import "../chunk-WIJM6BX6.js";
13
+ import "../chunk-BR3TNSO3.js";
14
+ import "../chunk-IMTWWA3N.js";
15
+ import "../chunk-XSM3IBMG.js";
16
+ import "../chunk-33ZKIYJM.js";
17
+ import "../chunk-RMMEYCEA.js";
18
+ import "../chunk-L65XGQKR.js";
19
+ import "../chunk-4KVJJJG2.js";
20
+ import "../chunk-MSUTHS2V.js";
21
+ import "../chunk-4NAWM4OQ.js";
22
+ import "../chunk-S6GX7IJ2.js";
23
+ import "../chunk-EN5MEPAS.js";
24
+ import "../chunk-QM3ZNOWJ.js";
25
+ import "../chunk-VEBEGZUV.js";
26
+ import "../chunk-57YWAMNT.js";
27
+ import "../chunk-5J6DO4VW.js";
28
+ import "../chunk-T2RPUNYP.js";
29
29
  import "../chunk-TSIU7DME.js";
30
30
  import "../chunk-XVAQG2CV.js";
31
31
  import "../chunk-ZBPEFQ4G.js";
32
- import "../chunk-EERGAAGE.js";
32
+ import "../chunk-X6KXPRKI.js";
33
33
  import "../chunk-J27W6TXS.js";
34
- import "../chunk-DGXW2ZFY.js";
35
- import "../chunk-BRHU6J3C.js";
34
+ import "../chunk-VFZF7LVY.js";
35
+ import "../chunk-FL2CJ5T5.js";
36
36
  import "../chunk-WTJ3AY33.js";
37
- import "../chunk-264XDRU7.js";
38
- import "../chunk-XA4SWA2Z.js";
37
+ import "../chunk-MI7LKLD7.js";
38
+ import "../chunk-J2YG7P7L.js";
39
39
  import "../chunk-JCPANDNR.js";
40
- import "../chunk-MED6GNV3.js";
41
- import "../chunk-A2NA377T.js";
42
- import "../chunk-B3YSTZZC.js";
43
- import "../chunk-5DWDT6GM.js";
44
- import "../chunk-SX57ZIGM.js";
40
+ import "../chunk-C53RJ7AA.js";
41
+ import "../chunk-HRVPZMKK.js";
42
+ import "../chunk-ES7WGE32.js";
43
+ import "../chunk-GFO55TMY.js";
44
+ import "../chunk-AQSMNUKJ.js";
45
45
  import "../chunk-JFLVEFFP.js";
46
- import "../chunk-YOVUXONB.js";
47
- import "../chunk-2MPXMJ2O.js";
48
- import "../chunk-ADDYIMWN.js";
49
- import "../chunk-UMYEY6BA.js";
50
- import "../chunk-YSQ76LWG.js";
51
- import "../chunk-BLGETWYI.js";
52
- import "../chunk-AMZO4YJK.js";
46
+ import "../chunk-K26SBQLO.js";
47
+ import "../chunk-H2MDPOLG.js";
48
+ import "../chunk-2IMHZEIK.js";
49
+ import "../chunk-77YZFVQD.js";
50
+ import "../chunk-UNASGGW2.js";
51
+ import "../chunk-3QBOVV6A.js";
52
+ import "../chunk-IV42Z63R.js";
53
53
  import "../chunk-OI2H6M5I.js";
54
54
  export {
55
55
  Dashboard,
@@ -1,31 +1,31 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  SkillAgentSummary
4
- } from "../chunk-SX57ZIGM.js";
4
+ } from "../chunk-AQSMNUKJ.js";
5
5
  import {
6
6
  render
7
7
  } from "../chunk-JFLVEFFP.js";
8
8
  import {
9
9
  hydrateWizardStore
10
- } from "../chunk-YOVUXONB.js";
10
+ } from "../chunk-K26SBQLO.js";
11
11
  import {
12
12
  BaseCommand
13
- } from "../chunk-2MPXMJ2O.js";
14
- import "../chunk-ADDYIMWN.js";
15
- import "../chunk-UMYEY6BA.js";
13
+ } from "../chunk-H2MDPOLG.js";
14
+ import "../chunk-2IMHZEIK.js";
15
+ import "../chunk-77YZFVQD.js";
16
16
  import {
17
17
  INSTALL_MODE_LABELS,
18
18
  detectInstallation,
19
19
  formatInstallationDisplay,
20
20
  getInstallationInfo,
21
21
  loadProjectConfig
22
- } from "../chunk-YSQ76LWG.js";
23
- import "../chunk-BLGETWYI.js";
22
+ } from "../chunk-UNASGGW2.js";
23
+ import "../chunk-3QBOVV6A.js";
24
24
  import {
25
25
  CLI_COLORS,
26
26
  CLI_INVOKE_COMMAND,
27
27
  DEFAULT_BRANDING
28
- } from "../chunk-AMZO4YJK.js";
28
+ } from "../chunk-IV42Z63R.js";
29
29
  import "../chunk-OI2H6M5I.js";
30
30
 
31
31
  // src/cli/commands/list.tsx
@@ -1,19 +1,19 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  validateMarketplaceName
4
- } from "../../chunk-AO6DXJUK.js";
4
+ } from "../../chunk-VEONZFTL.js";
5
5
  import {
6
6
  BaseCommand,
7
7
  EXIT_CODES
8
- } from "../../chunk-2MPXMJ2O.js";
9
- import "../../chunk-ADDYIMWN.js";
10
- import "../../chunk-UMYEY6BA.js";
8
+ } from "../../chunk-H2MDPOLG.js";
9
+ import "../../chunk-2IMHZEIK.js";
10
+ import "../../chunk-77YZFVQD.js";
11
11
  import {
12
12
  isDirectoryEmpty,
13
13
  validateKebabCaseName,
14
14
  writeFile
15
- } from "../../chunk-YSQ76LWG.js";
16
- import "../../chunk-BLGETWYI.js";
15
+ } from "../../chunk-UNASGGW2.js";
16
+ import "../../chunk-3QBOVV6A.js";
17
17
  import {
18
18
  CLI_INVOKE_COMMAND,
19
19
  DEFAULT_VERSION,
@@ -22,7 +22,7 @@ import {
22
22
  SKILL_RULES_PATH,
23
23
  STACKS_FILE_PATH,
24
24
  STANDARD_FILES
25
- } from "../../chunk-AMZO4YJK.js";
25
+ } from "../../chunk-IV42Z63R.js";
26
26
  import "../../chunk-OI2H6M5I.js";
27
27
 
28
28
  // src/cli/commands/new/marketplace.ts
@@ -1,23 +1,24 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  loadSource
4
- } from "../chunk-MED6GNV3.js";
5
- import "../chunk-A2NA377T.js";
6
- import "../chunk-B3YSTZZC.js";
7
- import "../chunk-5DWDT6GM.js";
4
+ } from "../chunk-C53RJ7AA.js";
5
+ import "../chunk-HRVPZMKK.js";
6
+ import "../chunk-ES7WGE32.js";
7
+ import "../chunk-GFO55TMY.js";
8
8
  import {
9
9
  BaseCommand
10
- } from "../chunk-2MPXMJ2O.js";
11
- import "../chunk-ADDYIMWN.js";
12
- import "../chunk-UMYEY6BA.js";
10
+ } from "../chunk-H2MDPOLG.js";
11
+ import "../chunk-2IMHZEIK.js";
12
+ import "../chunk-77YZFVQD.js";
13
13
  import {
14
14
  STATUS_MESSAGES,
15
+ stripTerminalControls,
15
16
  truncateText
16
- } from "../chunk-YSQ76LWG.js";
17
+ } from "../chunk-UNASGGW2.js";
17
18
  import {
18
19
  typedValues
19
- } from "../chunk-BLGETWYI.js";
20
- import "../chunk-AMZO4YJK.js";
20
+ } from "../chunk-3QBOVV6A.js";
21
+ import "../chunk-IV42Z63R.js";
21
22
  import "../chunk-OI2H6M5I.js";
22
23
 
23
24
  // src/cli/commands/search.ts
@@ -89,10 +90,10 @@ async function loadSearchableSkills() {
89
90
  }
90
91
  function toResultRow(skill) {
91
92
  return {
92
- id: skill.id,
93
- name: skill.displayName,
94
- source: activeSourceName(skill),
95
- category: skill.category,
93
+ id: stripTerminalControls(skill.id),
94
+ name: stripTerminalControls(skill.displayName),
95
+ source: stripTerminalControls(activeSourceName(skill)),
96
+ category: stripTerminalControls(skill.category),
96
97
  description: truncateText(skill.description, MAX_DESCRIPTION_WIDTH)
97
98
  };
98
99
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/cli/commands/search.ts"],"sourcesContent":["import { Args } from \"@oclif/core\";\nimport { printTable } from \"@oclif/table\";\nimport { sortBy } from \"remeda\";\n\nimport { BaseCommand } from \"../base-command.js\";\nimport { loadSource } from \"../lib/operations/index.js\";\nimport type { ResolvedSkill } from \"../types/index.js\";\nimport { STATUS_MESSAGES } from \"../utils/messages.js\";\nimport { truncateText } from \"../utils/string.js\";\nimport { typedValues } from \"../utils/typed-object.js\";\n\nconst MAX_DESCRIPTION_WIDTH = 50;\n\n/**\n * One row of the results table. `id` and `category` are the skill's own values; `name`, `source`\n * and `description` are rendered for the cell, so they are plain strings.\n */\ntype ResultRow = Pick<ResolvedSkill, \"id\" | \"category\"> & {\n name: string;\n source: string;\n description: string;\n};\n\nexport default class Search extends BaseCommand {\n static summary = \"Search the catalog of available skills\";\n static description =\n \"Read-only catalog browse. Searches the marketplace this installation reads from, \" +\n \"plus the local skills already on disk, by id, displayName, slug, description, or \" +\n \"category. Use `edit` to install what it finds.\";\n\n static examples = [\n {\n description: \"Search for React skills\",\n command: \"<%= config.bin %> search react\",\n },\n {\n description: \"Search by any keyword (matches id, name, description, category)\",\n command: \"<%= config.bin %> search state\",\n },\n ];\n\n static args = {\n query: Args.string({\n description: \"Search query (matches id, displayName, slug, description, category)\",\n required: true,\n }),\n };\n\n static flags = {};\n\n async run(): Promise<void> {\n const { args } = await this.parse(Search);\n await this.runSearch(args.query);\n }\n\n private async runSearch(query: string): Promise<void> {\n try {\n this.log(STATUS_MESSAGES.LOADING_SKILLS);\n\n const allSkills = await loadSearchableSkills();\n\n const results = sortBy(\n allSkills.filter((skill) => matchesQuery(skill, query)),\n (r) => r.displayName.toLowerCase(),\n );\n\n this.log(\"\");\n if (results.length === 0) {\n this.warn(`No skills found matching \"${query}\"`);\n return;\n }\n\n this.logInfo(\n `Found ${results.length} skill${results.length === 1 ? \"\" : \"s\"} matching \"${query}\"`,\n );\n this.log(\"\");\n\n printTable({\n data: results.map(toResultRow),\n columns: [\n { key: \"id\", name: \"ID\" },\n { key: \"name\", name: \"Name\" },\n { key: \"source\", name: \"Origin\" },\n { key: \"category\", name: \"Category\" },\n { key: \"description\", name: \"Description\" },\n ],\n headerOptions: { bold: true },\n });\n this.log(\"\");\n } catch (error) {\n this.handleError(error);\n }\n }\n}\n\n/**\n * Every skill the catalog can offer: the marketplace matrix, which `loadSource` has already\n * merged the on-disk local skills into. There is no second source to reach for — the\n * registered-extras array this used to fan out over was withdrawn with the marketplace axis\n * itself, so the read is one load and no network beyond it.\n */\nasync function loadSearchableSkills(): Promise<ResolvedSkill[]> {\n const { sourceResult } = await loadSource({ projectDir: process.cwd() });\n\n return typedValues(sourceResult.matrix.skills);\n}\n\n/**\n * The machine id and the display name are different answers and get a column each — `edit`\n * takes the id, a human reads the name.\n */\nfunction toResultRow(skill: ResolvedSkill): ResultRow {\n return {\n id: skill.id,\n name: skill.displayName,\n source: activeSourceName(skill),\n category: skill.category,\n description: truncateText(skill.description, MAX_DESCRIPTION_WIDTH),\n };\n}\n\n/**\n * Where this installation reads the skill from: the local copy when one is on disk, otherwise\n * the marketplace the load resolved. Both names are written by the tagging pass\n * (`loadSkillsFromAllSources`), which `loadSource` always runs — a skill that reached the table\n * untagged would have no origin to report, so say so rather than name one it might not have.\n */\nfunction activeSourceName(skill: ResolvedSkill): string {\n const { activeSource } = skill;\n if (!activeSource) {\n throw new Error(\n `Skill \"${skill.id}\" was loaded with no origin, so where it comes from is unknown`,\n );\n }\n return activeSource.name;\n}\n\nfunction matchesQuery(skill: ResolvedSkill, query: string): boolean {\n const lowerQuery = query.toLowerCase();\n return [skill.id, skill.displayName, skill.slug, skill.description, skill.category].some(\n (field) => field.toLowerCase().includes(lowerQuery),\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAC3B,SAAS,cAAc;AASvB,IAAM,wBA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W;AAAA,UACpC,EAAE,KAAK,eAAe,MAAM,cAAc;AAAA,QAC5C;AAAA,QACA,eAAe,EAAE,MAAM,KAAK;AAAA,MAC9B,CAAC;AACD,WAAK,IAAI,EAAE;AAAA,IACb,SAAS,OAAO;AACd,WAAK,YAAY,KAAK;AAAA,IACxB;AAAA,EACF;AACF;AAQA,eAAe,uBAAiD;AAC9D,QAAM,EAAE,aAAa,IAAI,MAAM,WAAW,EAAE,YAAY,QAAQ,IAAI,EAAE,CAAC;AAEvE,SAAO,YAAY,aAAa,OAAO,MAAM;AAC/C;AAMA,SAAS,YAAY,OAAiC;AACpD,SAAO;AAAA,IACL,IAAI,MAAM;AAAA,IACV,MAAM,MAAM;AAAA,IACZ,QAAQ,iBAAiB,KAAK;AAAA,IAC9B,UAAU,MAAM;AAAA,IAChB,aAAa,aAAa,MAAM,aAAa,qBAAqB;AAAA,EACpE;AACF;AAQA,SAAS,iBAAiB,OAA8B;AACtD,QAAM,EAAE,aAAa,IAAI;AACzB,MAAI,CAAC,cAAc;AACjB,UAAM,IAAI;AAAA,MACR,UAAU,MAAM,EAAE;AAAA,IACpB;AAAA,EACF;AACA,SAAO,aAAa;AACtB;AAEA,SAAS,aAAa,OAAsB,OAAwB;AAClE,QAAM,aAAa,MAAM,YAAY;AACrC,SAAO,CAAC,MAAM,IAAI,MAAM,aAAa,MAAM,MAAM,MAAM,aAAa,MAAM,QAAQ,EAAE;AAAA,IAClF,CAAC,UAAU,MAAM,YAAY,EAAE,SAAS,UAAU;AAAA,EACpD;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/cli/commands/search.ts"],"sourcesContent":["import { Args } from \"@oclif/core\";\nimport { printTable } from \"@oclif/table\";\nimport { sortBy } from \"remeda\";\n\nimport { BaseCommand } from \"../base-command.js\";\nimport { loadSource } from \"../lib/operations/index.js\";\nimport type { ResolvedSkill } from \"../types/index.js\";\nimport { STATUS_MESSAGES } from \"../utils/messages.js\";\nimport { stripTerminalControls, truncateText } from \"../utils/string.js\";\nimport { typedValues } from \"../utils/typed-object.js\";\n\nconst MAX_DESCRIPTION_WIDTH = 50;\n\n/**\n * One row of the results table. Every column is rendered for its cell, so all five are plain\n * strings — including the two that used to be carried through as the skill's own `SkillId` and\n * `CategoryPath`.\n *\n * They stopped being the skill's own values when they started being sanitised, and the type says\n * so rather than casting the sanitised string back into a union it is no longer known to be in.\n * Nothing downstream of this looks a row up by id: it is five strings and a table.\n */\ntype ResultRow = {\n id: string;\n name: string;\n source: string;\n category: string;\n description: string;\n};\n\nexport default class Search extends BaseCommand {\n static summary = \"Search the catalog of available skills\";\n static description =\n \"Read-only catalog browse. Searches the marketplace this installation reads from, \" +\n \"plus the local skills already on disk, by id, displayName, slug, description, or \" +\n \"category. Use `edit` to install what it finds.\";\n\n static examples = [\n {\n description: \"Search for React skills\",\n command: \"<%= config.bin %> search react\",\n },\n {\n description: \"Search by any keyword (matches id, name, description, category)\",\n command: \"<%= config.bin %> search state\",\n },\n ];\n\n static args = {\n query: Args.string({\n description: \"Search query (matches id, displayName, slug, description, category)\",\n required: true,\n }),\n };\n\n static flags = {};\n\n async run(): Promise<void> {\n const { args } = await this.parse(Search);\n await this.runSearch(args.query);\n }\n\n private async runSearch(query: string): Promise<void> {\n try {\n this.log(STATUS_MESSAGES.LOADING_SKILLS);\n\n const allSkills = await loadSearchableSkills();\n\n const results = sortBy(\n allSkills.filter((skill) => matchesQuery(skill, query)),\n (r) => r.displayName.toLowerCase(),\n );\n\n this.log(\"\");\n if (results.length === 0) {\n this.warn(`No skills found matching \"${query}\"`);\n return;\n }\n\n this.logInfo(\n `Found ${results.length} skill${results.length === 1 ? \"\" : \"s\"} matching \"${query}\"`,\n );\n this.log(\"\");\n\n printTable({\n data: results.map(toResultRow),\n columns: [\n { key: \"id\", name: \"ID\" },\n { key: \"name\", name: \"Name\" },\n { key: \"source\", name: \"Origin\" },\n { key: \"category\", name: \"Category\" },\n { key: \"description\", name: \"Description\" },\n ],\n headerOptions: { bold: true },\n });\n this.log(\"\");\n } catch (error) {\n this.handleError(error);\n }\n }\n}\n\n/**\n * Every skill the catalog can offer: the marketplace matrix, which `loadSource` has already\n * merged the on-disk local skills into. There is no second source to reach for — the\n * registered-extras array this used to fan out over was withdrawn with the marketplace axis\n * itself, so the read is one load and no network beyond it.\n */\nasync function loadSearchableSkills(): Promise<ResolvedSkill[]> {\n const { sourceResult } = await loadSource({ projectDir: process.cwd() });\n\n return typedValues(sourceResult.matrix.skills);\n}\n\n/**\n * The machine id and the display name are different answers and get a column each — `edit`\n * takes the id, a human reads the name.\n *\n * Every one of the five is a string a catalogue author wrote, and this is where they stop being\n * that and become cells. `--marketplace` is a supported input, so a stranger's repository reaches\n * this table by the product's advertised route: an unsanitised `displayName` carrying an\n * erase-line and a carriage return repaints the row, and `@oclif/table` sizes the column on the\n * escape bytes as well, so the border moves too. Only `description` carries a budget, because\n * only `description` is prose; the other four are identifiers and are shown whole.\n */\nfunction toResultRow(skill: ResolvedSkill): ResultRow {\n return {\n id: stripTerminalControls(skill.id),\n name: stripTerminalControls(skill.displayName),\n source: stripTerminalControls(activeSourceName(skill)),\n category: stripTerminalControls(skill.category),\n description: truncateText(skill.description, MAX_DESCRIPTION_WIDTH),\n };\n}\n\n/**\n * Where this installation reads the skill from: the local copy when one is on disk, otherwise\n * the marketplace the load resolved. Both names are written by the tagging pass\n * (`loadSkillsFromAllSources`), which `loadSource` always runs — a skill that reached the table\n * untagged would have no origin to report, so say so rather than name one it might not have.\n */\nfunction activeSourceName(skill: ResolvedSkill): string {\n const { activeSource } = skill;\n if (!activeSource) {\n throw new Error(\n `Skill \"${skill.id}\" was loaded with no origin, so where it comes from is unknown`,\n );\n }\n return activeSource.name;\n}\n\nfunction matchesQuery(skill: ResolvedSkill, query: string): boolean {\n const lowerQuery = query.toLowerCase();\n return [skill.id, skill.displayName, skill.slug, skill.description, skill.category].some(\n (field) => field.toLowerCase().includes(lowerQuery),\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAA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PQM63K.js";
6
+ import "../chunk-J2YG7P7L.js";
7
7
  import {
8
8
  BaseCommand,
9
9
  EXIT_CODES
10
- } from "../chunk-2MPXMJ2O.js";
11
- import "../chunk-ADDYIMWN.js";
12
- import "../chunk-UMYEY6BA.js";
10
+ } from "../chunk-H2MDPOLG.js";
11
+ import "../chunk-2IMHZEIK.js";
12
+ import "../chunk-77YZFVQD.js";
13
13
  import {
14
14
  formatZodErrors,
15
15
  getErrorMessage,
16
- sharedConfigDestinations
17
- } from "../chunk-YSQ76LWG.js";
18
- import "../chunk-BLGETWYI.js";
16
+ sharedConfigDestinations,
17
+ stripTerminalControls,
18
+ truncateText
19
+ } from "../chunk-UNASGGW2.js";
20
+ import "../chunk-3QBOVV6A.js";
19
21
  import {
20
- seedPayloadSchema
21
- } from "../chunk-AMZO4YJK.js";
22
+ installableSeedPayloadSchema
23
+ } from "../chunk-IV42Z63R.js";
22
24
  import "../chunk-OI2H6M5I.js";
23
25
 
24
26
  // src/cli/commands/share.ts
@@ -28,11 +30,12 @@ import { Flags } from "@oclif/core";
28
30
  var NOTHING_PIPED = "--stdin expects a configuration on standard input and none arrived. Pipe one in, as 'cat proposal.json | agents-inc share --stdin'.";
29
31
  var STDIN_IS_A_TERMINAL = "--stdin expects a configuration on standard input, but standard input is a terminal. Pipe one in rather than typing it.";
30
32
  var EXCERPT = 80;
33
+ var PROBLEMS_NAMED = 4;
31
34
  function readPipedPayload(body) {
32
35
  if (body.trim() === "") return { ok: false, error: NOTHING_PIPED };
33
36
  const read = readJson(body);
34
37
  if (!read.parsed) return { ok: false, error: notJsonMessage(body, read.reason) };
35
- const result = seedPayloadSchema.safeParse(read.value);
38
+ const result = installableSeedPayloadSchema.safeParse(read.value);
36
39
  if (!result.success) {
37
40
  return { ok: false, error: refusedByContract(formatZodErrors(result.error)) };
38
41
  }
@@ -46,14 +49,17 @@ function readJson(body) {
46
49
  }
47
50
  }
48
51
  function notJsonMessage(body, reason) {
49
- return `What arrived on standard input is not JSON: ${reason}. It began: ${excerptOf(body)}`;
52
+ const opening = truncateText(body.trim(), EXCERPT);
53
+ const said = stripTerminalControls(reason);
54
+ return `What arrived on standard input is not JSON: ${said}. It began: ${opening}`;
50
55
  }
51
56
  function refusedByContract(problems) {
52
- return `The configuration on standard input is not one this store accepts: ${problems.join("; ")}`;
57
+ return `The configuration on standard input is not one this store accepts: ${namedProblems(problems)}`;
53
58
  }
54
- function excerptOf(body) {
55
- const opening = body.trim().slice(0, EXCERPT);
56
- return body.trim().length > EXCERPT ? `${opening}\u2026` : opening;
59
+ function namedProblems(problems) {
60
+ const named = problems.slice(0, PROBLEMS_NAMED).join("; ");
61
+ const elided = problems.length - PROBLEMS_NAMED;
62
+ return elided > 0 ? `${named} (and ${elided} more)` : named;
57
63
  }
58
64
 
59
65
  // src/cli/utils/read-stream.ts
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/cli/commands/share.ts","../../src/cli/lib/seed/read-piped-payload.ts","../../src/cli/utils/read-stream.ts"],"sourcesContent":["import { Flags } from \"@oclif/core\";\n\nimport { BaseCommand } from \"../base-command.js\";\nimport { EXIT_CODES } from \"../lib/exit-codes.js\";\nimport { seedPayloadForInstallation } from \"../lib/seed/installation-payload.js\";\nimport { publishSeedConfig } from \"../lib/seed/publish-seed.js\";\nimport {\n readPipedPayload,\n STDIN_IS_A_TERMINAL,\n type PipedPayload,\n} from \"../lib/seed/read-piped-payload.js\";\nimport { readAllOf } from \"../utils/read-stream.js\";\nimport { sharedConfigDestinations } from \"../utils/messages.js\";\nimport type { SeedPayload } from \"@workspace/matrix/seed\";\n\nexport default class Share extends BaseCommand {\n static summary = \"Share this installation as an id anyone can install\";\n\n static description =\n \"Turns the skills, sub-agents and per-agent curation installed here into a configuration the agentsinc.sh store holds, and prints the id it was given. Install it elsewhere with 'init --from <id>', or open it in the editor. The id is the configuration's own hash, so sharing an unchanged installation returns the id it already had.\";\n\n static flags = {\n stdin: Flags.boolean({\n description:\n \"Share a configuration piped in on standard input instead of the one installed here\",\n default: false,\n }),\n };\n\n static examples = [\n \"<%= config.bin %> <%= command.id %>\",\n \"cat proposal.json | <%= config.bin %> <%= command.id %> --stdin\",\n ];\n\n /**\n * Read, map, refuse, publish.\n *\n * Everything that can fail locally fails before the POST. The store's free tier allows a\n * thousand writes a day and reads a hundred times that, so a write is the scarce half — and one\n * spent on a configuration that cannot be installed buys a dead link.\n *\n * The first three steps are `seedPayloadForInstallation`, shared with `edit --ui`: the two\n * commands mint the same id from the same directory and differ only in what they do with it.\n */\n async run(): Promise<void> {\n const { flags } = await this.parse(Share);\n\n const payload = flags.stdin\n ? await this.payloadFromPipe()\n : await this.payloadFromInstallation();\n\n const published = await publishSeedConfig(payload);\n if (!published.ok) {\n this.error(published.error, { exit: EXIT_CODES.ERROR });\n }\n\n this.reportShared(published.id);\n }\n\n /** The installation in this directory, mapped and announced. */\n private async payloadFromInstallation(): Promise<SeedPayload> {\n const prepared = await seedPayloadForInstallation(process.cwd());\n if (!prepared.ok) {\n this.error(prepared.error, { exit: EXIT_CODES.ERROR });\n }\n\n this.log(`Sharing ${prepared.skills} skill(s) across ${prepared.agents} sub-agent(s)...`);\n\n return prepared.payload;\n }\n\n /**\n * A configuration the CALLER holds, which is why nothing here reads an installation.\n *\n * That is the whole distinction the flag draws, and it is not cosmetic: a bare `share` resolves\n * an installation the way every other command does — this project, then the global one — so\n * without this branch, sharing a piped payload from a directory with nothing in it would\n * publish whatever the machine happens to have installed globally.\n *\n * The producer this exists for is not this CLI. `meta-config-stack-detect` walks a repository\n * and emits a `SeedPayload` it is forbidden to write or apply, and an id is the only door into\n * the editor, which reads `?fromId=` and nothing else. Publishing from here rather than from\n * the producer keeps `SEED_VERSION`, the `AGENTS_INC_API_URL` override and the caller's\n * user-agent in the one place that owns them.\n */\n private async payloadFromPipe(): Promise<SeedPayload> {\n if (process.stdin.isTTY) {\n this.error(STDIN_IS_A_TERMINAL, { exit: EXIT_CODES.ERROR });\n }\n\n const read: PipedPayload = readPipedPayload(await readAllOf(process.stdin));\n if (!read.ok) {\n this.error(read.error, { exit: EXIT_CODES.ERROR });\n }\n\n return read.payload;\n }\n\n /**\n * Both destinations, because an id nobody can act on is not a share and there are exactly two\n * things that read one: this CLI, and the editor the configuration can be reopened in. The\n * lines themselves are `sharedConfigDestinations`, shared with `edit --ui` for the same reason\n * the mint above is.\n */\n private reportShared(id: string): void {\n this.logSuccess(`Shared as ${id}`);\n for (const destination of sharedConfigDestinations(id)) {\n this.log(destination);\n }\n }\n}\n","import { seedPayloadSchema, type SeedPayload } from \"@workspace/matrix/seed\";\n\nimport { formatZodErrors } from \"../schema-validator.js\";\nimport { getErrorMessage } from \"../../utils/errors.js\";\n\n/** A payload read from a pipe, or the reason it could not be. */\nexport type PipedPayload =\n | { readonly ok: true; readonly payload: SeedPayload }\n | { readonly ok: false; readonly error: string };\n\nexport const NOTHING_PIPED =\n \"--stdin expects a configuration on standard input and none arrived. Pipe one in, as 'cat proposal.json | agents-inc share --stdin'.\";\n\nexport const STDIN_IS_A_TERMINAL =\n \"--stdin expects a configuration on standard input, but standard input is a terminal. Pipe one in rather than typing it.\";\n\n/** How much of a body to quote back when it is not JSON, so a refusal names what it read. */\nconst EXCERPT = 80;\n\n/**\n * Everything that can fail locally, failing before the caller spends a write.\n *\n * The store's free tier allows a thousand writes a day against a hundred times that in reads, so\n * a write is the scarce half — and one spent on a payload the decoder cannot read buys a dead\n * link. Each of the three refusals below is a different mistake and says which: nothing arrived,\n * what arrived is not JSON, or it is JSON the contract does not accept.\n *\n * `seedPayloadSchema` rather than a shape written here, and that is the point of publishing from\n * the CLI at all. `SEED_VERSION` is a `z.literal`, so a producer that hardcodes the wire format\n * emits payloads the store refuses the day it moves; the schema travels with the code that posts.\n */\nexport function readPipedPayload(body: string): PipedPayload {\n if (body.trim() === \"\") return { ok: false, error: NOTHING_PIPED };\n\n const read = readJson(body);\n if (!read.parsed) return { ok: false, error: notJsonMessage(body, read.reason) };\n\n const result = seedPayloadSchema.safeParse(read.value);\n if (!result.success) {\n return { ok: false, error: refusedByContract(formatZodErrors(result.error)) };\n }\n\n return { ok: true, payload: result.data };\n}\n\n/** Whether a body is JSON at all, separated from whether it is a payload. */\ntype JsonRead =\n | { readonly parsed: true; readonly value: unknown }\n | { readonly parsed: false; readonly reason: string };\n\n/**\n * `JSON.parse` behind a verdict, so the caller reads as three guards rather than as a `let`\n * assigned inside a `try`. The same shape `readYaml` takes in `lib/skills/skill-metadata.ts`,\n * for the same reason: the failure is one of several a reader has to tell apart, and a thrown\n * exception is the one form that cannot sit beside the others.\n */\nfunction readJson(body: string): JsonRead {\n try {\n return { parsed: true, value: JSON.parse(body) };\n } catch (error) {\n return { parsed: false, reason: getErrorMessage(error) };\n }\n}\n\nfunction notJsonMessage(body: string, reason: string): string {\n return `What arrived on standard input is not JSON: ${reason}. It began: ${excerptOf(body)}`;\n}\n\nfunction refusedByContract(problems: string[]): string {\n return `The configuration on standard input is not one this store accepts: ${problems.join(\"; \")}`;\n}\n\nfunction excerptOf(body: string): string {\n const opening = body.trim().slice(0, EXCERPT);\n return body.trim().length > EXCERPT ? `${opening}…` : opening;\n}\n","import type { Readable } from \"node:stream\";\n\n/**\n * Every chunk of a readable, as text.\n *\n * A stream rather than `readFileSync(\"/dev/stdin\")`: that path does not exist on every platform\n * this CLI runs on, and it reads a pipe the operating system may still be filling. Async\n * iteration is the one form that is correct on all of them.\n */\nexport async function readAllOf(stream: Readable): Promise<string> {\n const chunks: Buffer[] = [];\n for await (const chunk of stream) {\n chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(String(chunk)));\n }\n\n return Buffer.concat(chunks).toString(\"utf-8\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,aAAa;;;ACUf,IAAM,gBACX;AAEK,IAAM,sBACX;AAGF,IAAM,UAAU;AAcT,SAAS,iBAAiB,MAA4B;AAC3D,MAAI,KAAK,KAAK,MAAM,GAAI,QAAO,EAAE,IAAI,OAAO,OAAO,cAAc;AAE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AA;AAAA;AAAA;AAAA,EAQQ,aAAa,IAAkB;AACrC,SAAK,WAAW,aAAa,EAAE,EAAE;AACjC,eAAW,eAAe,yBAAyB,EAAE,GAAG;AACtD,WAAK,IAAI,WAAW;AAAA,IACtB;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/cli/commands/share.ts","../../src/cli/lib/seed/read-piped-payload.ts","../../src/cli/utils/read-stream.ts"],"sourcesContent":["import { Flags } from \"@oclif/core\";\n\nimport { BaseCommand } from \"../base-command.js\";\nimport { EXIT_CODES } from \"../lib/exit-codes.js\";\nimport { seedPayloadForInstallation } from \"../lib/seed/installation-payload.js\";\nimport { publishSeedConfig } from \"../lib/seed/publish-seed.js\";\nimport {\n readPipedPayload,\n STDIN_IS_A_TERMINAL,\n type PipedPayload,\n} from \"../lib/seed/read-piped-payload.js\";\nimport { readAllOf } from \"../utils/read-stream.js\";\nimport { sharedConfigDestinations } from \"../utils/messages.js\";\nimport type { SeedPayload } from \"@workspace/matrix/seed\";\n\nexport default class Share extends BaseCommand {\n static summary = \"Share this installation as an id anyone can install\";\n\n static description =\n \"Turns the skills, sub-agents and per-agent curation installed here into a configuration the agentsinc.sh store holds, and prints the id it was given. Install it elsewhere with 'init --from <id>', or open it in the editor. The id is the configuration's own hash, so sharing an unchanged installation returns the id it already had.\";\n\n static flags = {\n stdin: Flags.boolean({\n description:\n \"Share a configuration piped in on standard input instead of the one installed here\",\n default: false,\n }),\n };\n\n static examples = [\n \"<%= config.bin %> <%= command.id %>\",\n \"cat proposal.json | <%= config.bin %> <%= command.id %> --stdin\",\n ];\n\n /**\n * Read, map, refuse, publish.\n *\n * Everything that can fail locally fails before the POST. The store's free tier allows a\n * thousand writes a day and reads a hundred times that, so a write is the scarce half — and one\n * spent on a configuration that cannot be installed buys a dead link.\n *\n * The first three steps are `seedPayloadForInstallation`, shared with `edit --ui`: the two\n * commands mint the same id from the same directory and differ only in what they do with it.\n */\n async run(): Promise<void> {\n const { flags } = await this.parse(Share);\n\n const payload = flags.stdin\n ? await this.payloadFromPipe()\n : await this.payloadFromInstallation();\n\n const published = await publishSeedConfig(payload);\n if (!published.ok) {\n this.error(published.error, { exit: EXIT_CODES.ERROR });\n }\n\n this.reportShared(published.id);\n }\n\n /** The installation in this directory, mapped and announced. */\n private async payloadFromInstallation(): Promise<SeedPayload> {\n const prepared = await seedPayloadForInstallation(process.cwd());\n if (!prepared.ok) {\n this.error(prepared.error, { exit: EXIT_CODES.ERROR });\n }\n\n this.log(`Sharing ${prepared.skills} skill(s) across ${prepared.agents} sub-agent(s)...`);\n\n return prepared.payload;\n }\n\n /**\n * A configuration the CALLER holds, which is why nothing here reads an installation.\n *\n * That is the whole distinction the flag draws, and it is not cosmetic: a bare `share` resolves\n * an installation the way every other command does — this project, then the global one — so\n * without this branch, sharing a piped payload from a directory with nothing in it would\n * publish whatever the machine happens to have installed globally.\n *\n * The producer this exists for is not this CLI. `meta-config-stack-detect` walks a repository\n * and emits a `SeedPayload` it is forbidden to write or apply, and an id is the only door into\n * the editor, which reads `?fromId=` and nothing else. Publishing from here rather than from\n * the producer keeps `SEED_VERSION`, the `AGENTS_INC_API_URL` override and the caller's\n * user-agent in the one place that owns them.\n */\n private async payloadFromPipe(): Promise<SeedPayload> {\n if (process.stdin.isTTY) {\n this.error(STDIN_IS_A_TERMINAL, { exit: EXIT_CODES.ERROR });\n }\n\n const read: PipedPayload = readPipedPayload(await readAllOf(process.stdin));\n if (!read.ok) {\n this.error(read.error, { exit: EXIT_CODES.ERROR });\n }\n\n return read.payload;\n }\n\n /**\n * Both destinations, because an id nobody can act on is not a share and there are exactly two\n * things that read one: this CLI, and the editor the configuration can be reopened in. The\n * lines themselves are `sharedConfigDestinations`, shared with `edit --ui` for the same reason\n * the mint above is.\n */\n private reportShared(id: string): void {\n this.logSuccess(`Shared as ${id}`);\n for (const destination of sharedConfigDestinations(id)) {\n this.log(destination);\n }\n }\n}\n","import { installableSeedPayloadSchema, type SeedPayload } from \"@workspace/matrix/seed\";\n\nimport { formatZodErrors } from \"../schema-validator.js\";\nimport { getErrorMessage } from \"../../utils/errors.js\";\nimport { stripTerminalControls, truncateText } from \"../../utils/string.js\";\n\n/** A payload read from a pipe, or the reason it could not be. */\nexport type PipedPayload =\n | { readonly ok: true; readonly payload: SeedPayload }\n | { readonly ok: false; readonly error: string };\n\nexport const NOTHING_PIPED =\n \"--stdin expects a configuration on standard input and none arrived. Pipe one in, as 'cat proposal.json | agents-inc share --stdin'.\";\n\nexport const STDIN_IS_A_TERMINAL =\n \"--stdin expects a configuration on standard input, but standard input is a terminal. Pipe one in rather than typing it.\";\n\n/**\n * How much of a body to quote back when it is not JSON, so a refusal names what it read.\n *\n * A CHARACTER bound, because what it clips is arbitrary bytes a producer piped by mistake: any\n * cut is as good as any other, and the point is only that the caller recognises what they sent.\n */\nconst EXCERPT = 80;\n\n/**\n * How many problems to name before the rest are counted instead.\n *\n * The scope rule raises one issue per (skill, sub-agent) PAIR rather than one per payload, and\n * each renders at roughly 150 characters — the same sentence every time, with two names changed.\n * A repository scan is 20-40 skills across 3-6 sub-agents, so an unbounded list is 60-240 of them\n * and hundreds of lines: the refusal becomes the wall of text it is complaining about.\n *\n * Four, so the whole message lands near twice the 300-character `EXPLANATION_BUDGET` in\n * `publish-seed.ts`, which bounds the store's account of this same refusal arriving over the\n * wire. Twice, because that one quotes back a remote explanation of a payload already sent, where\n * these are the caller's own pairs and each name is somewhere they have to go and edit — and four\n * of them is enough to show the mistake is a pattern rather than a one-off.\n *\n * A COUNT rather than a `truncateText` over the joined list, which is the one place this file's\n * two bounds differ. A character cut lands mid-sentence, and mid-sentence here means a half-named\n * skill or sub-agent — worse than one left out and counted, because it reads as a name.\n */\nconst PROBLEMS_NAMED = 4;\n\n/**\n * Everything that can fail locally, failing before the caller spends a write.\n *\n * The store's free tier allows a thousand writes a day against a hundred times that in reads, so\n * a write is the scarce half — and one spent on a payload the decoder cannot read buys a dead\n * link. Each of the three refusals below is a different mistake and says which: nothing arrived,\n * what arrived is not JSON, or it is JSON the contract does not accept.\n *\n * `installableSeedPayloadSchema` rather than a shape written here, and that is the point of\n * publishing from the CLI at all. `SEED_VERSION` is a `z.literal`, so a producer that hardcodes\n * the wire format emits payloads the store refuses the day it moves; the schema travels with the\n * code that posts.\n *\n * THE *INSTALLABLE* SCHEMA, AND THE DIFFERENCE IS THE WHOLE BUG THIS CLOSED. The worker validates\n * a POST with `installableSeedPayloadSchema` and a GET with the base `seedPayloadSchema` — write\n * strict, read lenient, deliberately, so links already in the wild stay repairable in the editor.\n * This gate read the BASE schema, so the one rule the two differ by — a project-scoped skill\n * assigned to a sub-agent resting at global, which has nowhere to be written — was the single\n * payload that passed locally and failed at the edge. It arrived as a bare `HTTP 400`.\n *\n * That was not an exotic shape. `agents` is sparse and an absent entry rests on the shared default\n * of `global`, so \"assign a skill and say nothing else\" is already the unwritable pair;\n * `meta-config-stack-detect` emitted it on every run. Reading the same schema the store writes\n * with is what makes this file's promise — everything that can fail locally, failing before the\n * caller spends a write — true rather than nearly true.\n */\nexport function readPipedPayload(body: string): PipedPayload {\n if (body.trim() === \"\") return { ok: false, error: NOTHING_PIPED };\n\n const read = readJson(body);\n if (!read.parsed) return { ok: false, error: notJsonMessage(body, read.reason) };\n\n const result = installableSeedPayloadSchema.safeParse(read.value);\n if (!result.success) {\n return { ok: false, error: refusedByContract(formatZodErrors(result.error)) };\n }\n\n return { ok: true, payload: result.data };\n}\n\n/** Whether a body is JSON at all, separated from whether it is a payload. */\ntype JsonRead =\n | { readonly parsed: true; readonly value: unknown }\n | { readonly parsed: false; readonly reason: string };\n\n/**\n * `JSON.parse` behind a verdict, so the caller reads as three guards rather than as a `let`\n * assigned inside a `try`. The same shape `readYaml` takes in `lib/skills/skill-metadata.ts`,\n * for the same reason: the failure is one of several a reader has to tell apart, and a thrown\n * exception is the one form that cannot sit beside the others.\n */\nfunction readJson(body: string): JsonRead {\n try {\n return { parsed: true, value: JSON.parse(body) };\n } catch (error) {\n return { parsed: false, reason: getErrorMessage(error) };\n }\n}\n\n/**\n * Two quotes of the same untrusted body, and both have to be made inert.\n *\n * The excerpt is the obvious one. The REASON is not, and it is the one that got through: V8 writes\n * `Unexpected token 'h', \"here is...\" is not valid JSON`, quoting the offending input verbatim, so\n * a parser's own account of a failure carries whatever caused it. `truncateText` covers the\n * excerpt; nothing covered the reason, because nothing looked like it came from outside.\n */\nfunction notJsonMessage(body: string, reason: string): string {\n const opening = truncateText(body.trim(), EXCERPT);\n const said = stripTerminalControls(reason);\n return `What arrived on standard input is not JSON: ${said}. It began: ${opening}`;\n}\n\nfunction refusedByContract(problems: string[]): string {\n return `The configuration on standard input is not one this store accepts: ${namedProblems(problems)}`;\n}\n\n/**\n * The first few problems in full, and a count of however many were left out.\n *\n * The count is what keeps a clipped list honest. Without it a caller who fixed the pairs named\n * here and ran again would have no way to tell this from a complete list — so the second refusal\n * would read as a new fault rather than as the rest of the one they were already fixing.\n */\nfunction namedProblems(problems: string[]): string {\n const named = problems.slice(0, PROBLEMS_NAMED).join(\"; \");\n const elided = problems.length - PROBLEMS_NAMED;\n return elided > 0 ? `${named} (and ${elided} more)` : named;\n}\n","import type { Readable } from \"node:stream\";\n\n/**\n * Every chunk of a readable, as text.\n *\n * A stream rather than `readFileSync(\"/dev/stdin\")`: that path does not exist on every platform\n * this CLI runs on, and it reads a pipe the operating system may still be filling. Async\n * iteration is the one form that is correct on all of them.\n */\nexport async function readAllOf(stream: Readable): Promise<string> {\n const chunks: Buffer[] = [];\n for await (const chunk of stream) {\n chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(String(chunk)));\n }\n\n return Buffer.concat(chunks).toString(\"utf-8\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,aAAa;;;ACWf,IAAM,gBACX;AAEK,IAAM,sBACX;AAQF,IAAM,UAAU;AAoBhB,IAAM,iBAAiB;AA4BhB,SAAS,iBAAiB,MAA4B;AAC3D,MAAI,KAAK,KAAK,MAAM,GAA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,KAAK,IAAI;AACZ,WAAK,MAAM,KAAK,OAAO,EAAE,MAAM,WAAW,MAAM,CAAC;AAAA,IACnD;AAEA,WAAO,KAAK;AAAA,EACd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQQ,aAAa,IAAkB;AACrC,SAAK,WAAW,aAAa,EAAE,EAAE;AACjC,eAAW,eAAe,yBAAyB,EAAE,GAAG;AACtD,WAAK,IAAI,WAAW;AAAA,IACtB;AAAA,EACF;AACF;","names":[]}
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  RemovalPlanConfirm
4
- } from "../chunk-3TM4FHTG.js";
4
+ } from "../chunk-FXL63LDL.js";
5
5
  import "../chunk-OZXAJNLA.js";
6
6
  import {
7
7
  promptConfirm
@@ -10,22 +10,22 @@ import {
10
10
  lazyGateDeps,
11
11
  mutateGlobal,
12
12
  propagateGlobalRemoval
13
- } from "../chunk-MED6GNV3.js";
14
- import "../chunk-A2NA377T.js";
13
+ } from "../chunk-C53RJ7AA.js";
14
+ import "../chunk-HRVPZMKK.js";
15
15
  import {
16
16
  loadAgentDefs
17
- } from "../chunk-B3YSTZZC.js";
17
+ } from "../chunk-ES7WGE32.js";
18
18
  import {
19
19
  listAgentMdFiles,
20
20
  splitAgentsByProvenance
21
- } from "../chunk-5DWDT6GM.js";
21
+ } from "../chunk-GFO55TMY.js";
22
22
  import "../chunk-JFLVEFFP.js";
23
23
  import {
24
24
  BaseCommand,
25
25
  EXIT_CODES
26
- } from "../chunk-2MPXMJ2O.js";
27
- import "../chunk-ADDYIMWN.js";
28
- import "../chunk-UMYEY6BA.js";
26
+ } from "../chunk-H2MDPOLG.js";
27
+ import "../chunk-2IMHZEIK.js";
28
+ import "../chunk-77YZFVQD.js";
29
29
  import {
30
30
  ConfigLoadError,
31
31
  INFO_MESSAGES,
@@ -56,15 +56,15 @@ import {
56
56
  resolveInstallPaths,
57
57
  toClaudePluginScope,
58
58
  unmarkedAgentsKept
59
- } from "../chunk-YSQ76LWG.js";
60
- import "../chunk-BLGETWYI.js";
59
+ } from "../chunk-UNASGGW2.js";
60
+ import "../chunk-3QBOVV6A.js";
61
61
  import {
62
62
  CLAUDE_DIR,
63
63
  CLAUDE_SRC_DIR,
64
64
  DEFAULT_BRANDING,
65
65
  EJECT_SOURCE,
66
66
  STANDARD_FILES
67
- } from "../chunk-AMZO4YJK.js";
67
+ } from "../chunk-IV42Z63R.js";
68
68
  import "../chunk-OI2H6M5I.js";
69
69
 
70
70
  // src/cli/commands/uninstall.tsx
@@ -2,9 +2,9 @@
2
2
  import {
3
3
  BaseCommand,
4
4
  EXIT_CODES
5
- } from "../chunk-2MPXMJ2O.js";
6
- import "../chunk-ADDYIMWN.js";
7
- import "../chunk-UMYEY6BA.js";
5
+ } from "../chunk-H2MDPOLG.js";
6
+ import "../chunk-2IMHZEIK.js";
7
+ import "../chunk-77YZFVQD.js";
8
8
  import {
9
9
  ERROR_MESSAGES,
10
10
  INFO_MESSAGES,
@@ -15,11 +15,11 @@ import {
15
15
  marketplaceRefreshFailed,
16
16
  marketplacesRefreshFailed,
17
17
  marketplacesRefreshed
18
- } from "../chunk-YSQ76LWG.js";
19
- import "../chunk-BLGETWYI.js";
18
+ } from "../chunk-UNASGGW2.js";
19
+ import "../chunk-3QBOVV6A.js";
20
20
  import {
21
21
  EJECT_SOURCE
22
- } from "../chunk-AMZO4YJK.js";
22
+ } from "../chunk-IV42Z63R.js";
23
23
  import "../chunk-OI2H6M5I.js";
24
24
 
25
25
  // src/cli/commands/update.ts
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  RemovalPlanConfirm
4
- } from "../../chunk-3TM4FHTG.js";
4
+ } from "../../chunk-FXL63LDL.js";
5
5
  import "../../chunk-OZXAJNLA.js";
6
- import "../../chunk-AMZO4YJK.js";
6
+ import "../../chunk-IV42Z63R.js";
7
7
  export {
8
8
  RemovalPlanConfirm
9
9
  };
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  SelectList
4
- } from "../../chunk-DTCUZL7S.js";
4
+ } from "../../chunk-3JDVBHWO.js";
5
5
  import "../../chunk-XVAQG2CV.js";
6
- import "../../chunk-AMZO4YJK.js";
6
+ import "../../chunk-IV42Z63R.js";
7
7
  export {
8
8
  SelectList
9
9
  };
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CategoryGrid
4
- } from "../../chunk-EERGAAGE.js";
4
+ } from "../../chunk-X6KXPRKI.js";
5
5
  import "../../chunk-J27W6TXS.js";
6
6
  import "../../chunk-WTJ3AY33.js";
7
- import "../../chunk-264XDRU7.js";
8
- import "../../chunk-BLGETWYI.js";
9
- import "../../chunk-AMZO4YJK.js";
7
+ import "../../chunk-MI7LKLD7.js";
8
+ import "../../chunk-3QBOVV6A.js";
9
+ import "../../chunk-IV42Z63R.js";
10
10
  export {
11
11
  CategoryGrid
12
12
  };
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CheckboxGrid
4
- } from "../../chunk-DGXW2ZFY.js";
5
- import "../../chunk-BRHU6J3C.js";
4
+ } from "../../chunk-VFZF7LVY.js";
5
+ import "../../chunk-FL2CJ5T5.js";
6
6
  import "../../chunk-WTJ3AY33.js";
7
- import "../../chunk-264XDRU7.js";
8
- import "../../chunk-AMZO4YJK.js";
7
+ import "../../chunk-MI7LKLD7.js";
8
+ import "../../chunk-IV42Z63R.js";
9
9
  export {
10
10
  CheckboxGrid
11
11
  };
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  DomainSelection
4
- } from "../../chunk-LZPRLHUE.js";
5
- import "../../chunk-3M75HVIM.js";
6
- import "../../chunk-DGXW2ZFY.js";
7
- import "../../chunk-BRHU6J3C.js";
4
+ } from "../../chunk-S6GX7IJ2.js";
5
+ import "../../chunk-5J6DO4VW.js";
6
+ import "../../chunk-VFZF7LVY.js";
7
+ import "../../chunk-FL2CJ5T5.js";
8
8
  import "../../chunk-WTJ3AY33.js";
9
- import "../../chunk-264XDRU7.js";
10
- import "../../chunk-YOVUXONB.js";
11
- import "../../chunk-YSQ76LWG.js";
12
- import "../../chunk-BLGETWYI.js";
13
- import "../../chunk-AMZO4YJK.js";
9
+ import "../../chunk-MI7LKLD7.js";
10
+ import "../../chunk-K26SBQLO.js";
11
+ import "../../chunk-UNASGGW2.js";
12
+ import "../../chunk-3QBOVV6A.js";
13
+ import "../../chunk-IV42Z63R.js";
14
14
  import "../../chunk-OI2H6M5I.js";
15
15
  export {
16
16
  DomainSelection
@@ -1,38 +1,38 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runWizardSession
4
- } from "../../chunk-B7YTQVAF.js";
5
- import "../../chunk-6PVWDTEM.js";
6
- import "../../chunk-QKMT6OOP.js";
7
- import "../../chunk-DHRW3MDM.js";
8
- import "../../chunk-3H42U56X.js";
9
- import "../../chunk-EQSMVZGS.js";
10
- import "../../chunk-ODUACQLV.js";
11
- import "../../chunk-HB3YIAFD.js";
12
- import "../../chunk-5MML3K36.js";
13
- import "../../chunk-LZPRLHUE.js";
14
- import "../../chunk-EEFTUZHZ.js";
15
- import "../../chunk-W2RXRWDB.js";
16
- import "../../chunk-WVCF7KFV.js";
17
- import "../../chunk-ZQZHDYHQ.js";
18
- import "../../chunk-3M75HVIM.js";
19
- import "../../chunk-T4RVCFWN.js";
4
+ } from "../../chunk-BR3TNSO3.js";
5
+ import "../../chunk-IMTWWA3N.js";
6
+ import "../../chunk-XSM3IBMG.js";
7
+ import "../../chunk-33ZKIYJM.js";
8
+ import "../../chunk-RMMEYCEA.js";
9
+ import "../../chunk-L65XGQKR.js";
10
+ import "../../chunk-4KVJJJG2.js";
11
+ import "../../chunk-MSUTHS2V.js";
12
+ import "../../chunk-4NAWM4OQ.js";
13
+ import "../../chunk-S6GX7IJ2.js";
14
+ import "../../chunk-EN5MEPAS.js";
15
+ import "../../chunk-QM3ZNOWJ.js";
16
+ import "../../chunk-VEBEGZUV.js";
17
+ import "../../chunk-57YWAMNT.js";
18
+ import "../../chunk-5J6DO4VW.js";
19
+ import "../../chunk-T2RPUNYP.js";
20
20
  import "../../chunk-TSIU7DME.js";
21
21
  import "../../chunk-XVAQG2CV.js";
22
- import "../../chunk-EERGAAGE.js";
22
+ import "../../chunk-X6KXPRKI.js";
23
23
  import "../../chunk-J27W6TXS.js";
24
- import "../../chunk-DGXW2ZFY.js";
25
- import "../../chunk-BRHU6J3C.js";
24
+ import "../../chunk-VFZF7LVY.js";
25
+ import "../../chunk-FL2CJ5T5.js";
26
26
  import "../../chunk-WTJ3AY33.js";
27
- import "../../chunk-264XDRU7.js";
27
+ import "../../chunk-MI7LKLD7.js";
28
28
  import "../../chunk-JCPANDNR.js";
29
- import "../../chunk-SX57ZIGM.js";
29
+ import "../../chunk-AQSMNUKJ.js";
30
30
  import "../../chunk-JFLVEFFP.js";
31
- import "../../chunk-YOVUXONB.js";
32
- import "../../chunk-UMYEY6BA.js";
33
- import "../../chunk-YSQ76LWG.js";
34
- import "../../chunk-BLGETWYI.js";
35
- import "../../chunk-AMZO4YJK.js";
31
+ import "../../chunk-K26SBQLO.js";
32
+ import "../../chunk-77YZFVQD.js";
33
+ import "../../chunk-UNASGGW2.js";
34
+ import "../../chunk-3QBOVV6A.js";
35
+ import "../../chunk-IV42Z63R.js";
36
36
  import "../../chunk-OI2H6M5I.js";
37
37
  export {
38
38
  runWizardSession