@exellix/ai-skills 5.8.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 (251) hide show
  1. package/README.md +600 -0
  2. package/dist/analysis/analyze-skill-request.d.ts +12 -0
  3. package/dist/analysis/analyze-skill-request.d.ts.map +1 -0
  4. package/dist/analysis/analyze-skill-request.js +201 -0
  5. package/dist/analysis/analyze-skill-request.js.map +1 -0
  6. package/dist/analysis/build-skill-request-analysis-packet.d.ts +14 -0
  7. package/dist/analysis/build-skill-request-analysis-packet.d.ts.map +1 -0
  8. package/dist/analysis/build-skill-request-analysis-packet.js +106 -0
  9. package/dist/analysis/build-skill-request-analysis-packet.js.map +1 -0
  10. package/dist/analysis/collect-deterministic-findings.d.ts +14 -0
  11. package/dist/analysis/collect-deterministic-findings.d.ts.map +1 -0
  12. package/dist/analysis/collect-deterministic-findings.js +221 -0
  13. package/dist/analysis/collect-deterministic-findings.js.map +1 -0
  14. package/dist/analysis/constants.d.ts +5 -0
  15. package/dist/analysis/constants.d.ts.map +1 -0
  16. package/dist/analysis/constants.js +5 -0
  17. package/dist/analysis/constants.js.map +1 -0
  18. package/dist/analysis/format-skill-request-analysis-markdown.d.ts +8 -0
  19. package/dist/analysis/format-skill-request-analysis-markdown.d.ts.map +1 -0
  20. package/dist/analysis/format-skill-request-analysis-markdown.js +121 -0
  21. package/dist/analysis/format-skill-request-analysis-markdown.js.map +1 -0
  22. package/dist/analysis/path-utils.d.ts +11 -0
  23. package/dist/analysis/path-utils.d.ts.map +1 -0
  24. package/dist/analysis/path-utils.js +69 -0
  25. package/dist/analysis/path-utils.js.map +1 -0
  26. package/dist/analysis/sanitize-for-packet.d.ts +28 -0
  27. package/dist/analysis/sanitize-for-packet.d.ts.map +1 -0
  28. package/dist/analysis/sanitize-for-packet.js +107 -0
  29. package/dist/analysis/sanitize-for-packet.js.map +1 -0
  30. package/dist/analysis/types.d.ts +139 -0
  31. package/dist/analysis/types.d.ts.map +1 -0
  32. package/dist/analysis/types.js +2 -0
  33. package/dist/analysis/types.js.map +1 -0
  34. package/dist/catalog/canonical-skill-key.d.ts +5 -0
  35. package/dist/catalog/canonical-skill-key.d.ts.map +1 -0
  36. package/dist/catalog/canonical-skill-key.js +16 -0
  37. package/dist/catalog/canonical-skill-key.js.map +1 -0
  38. package/dist/catalog/constants.d.ts +7 -0
  39. package/dist/catalog/constants.d.ts.map +1 -0
  40. package/dist/catalog/constants.js +7 -0
  41. package/dist/catalog/constants.js.map +1 -0
  42. package/dist/catalog/env.d.ts +4 -0
  43. package/dist/catalog/env.d.ts.map +1 -0
  44. package/dist/catalog/env.js +15 -0
  45. package/dist/catalog/env.js.map +1 -0
  46. package/dist/catalog/gateway-template.d.ts +6 -0
  47. package/dist/catalog/gateway-template.d.ts.map +1 -0
  48. package/dist/catalog/gateway-template.js +15 -0
  49. package/dist/catalog/gateway-template.js.map +1 -0
  50. package/dist/catalog/index.d.ts +3 -0
  51. package/dist/catalog/index.d.ts.map +1 -0
  52. package/dist/catalog/index.js +3 -0
  53. package/dist/catalog/index.js.map +1 -0
  54. package/dist/catalog/seed.d.ts +12 -0
  55. package/dist/catalog/seed.d.ts.map +1 -0
  56. package/dist/catalog/seed.js +45 -0
  57. package/dist/catalog/seed.js.map +1 -0
  58. package/dist/catalog/skill-catalog.d.ts +28 -0
  59. package/dist/catalog/skill-catalog.d.ts.map +1 -0
  60. package/dist/catalog/skill-catalog.js +139 -0
  61. package/dist/catalog/skill-catalog.js.map +1 -0
  62. package/dist/catalog/store-factory.d.ts +18 -0
  63. package/dist/catalog/store-factory.d.ts.map +1 -0
  64. package/dist/catalog/store-factory.js +36 -0
  65. package/dist/catalog/store-factory.js.map +1 -0
  66. package/dist/catalog/types.d.ts +61 -0
  67. package/dist/catalog/types.d.ts.map +1 -0
  68. package/dist/catalog/types.js +22 -0
  69. package/dist/catalog/types.js.map +1 -0
  70. package/dist/catalox/ai-engines-catalog.d.ts +24 -0
  71. package/dist/catalox/ai-engines-catalog.d.ts.map +1 -0
  72. package/dist/catalox/ai-engines-catalog.js +89 -0
  73. package/dist/catalox/ai-engines-catalog.js.map +1 -0
  74. package/dist/catalox/ai-skills-catalog.d.ts +32 -0
  75. package/dist/catalox/ai-skills-catalog.d.ts.map +1 -0
  76. package/dist/catalox/ai-skills-catalog.js +202 -0
  77. package/dist/catalox/ai-skills-catalog.js.map +1 -0
  78. package/dist/catalox/catalox-skill-errors.d.ts +15 -0
  79. package/dist/catalox/catalox-skill-errors.d.ts.map +1 -0
  80. package/dist/catalox/catalox-skill-errors.js +29 -0
  81. package/dist/catalox/catalox-skill-errors.js.map +1 -0
  82. package/dist/catalox/index.d.ts +10 -0
  83. package/dist/catalox/index.d.ts.map +1 -0
  84. package/dist/catalox/index.js +10 -0
  85. package/dist/catalox/index.js.map +1 -0
  86. package/dist/catalox/init-firebase-and-catalox.d.ts +8 -0
  87. package/dist/catalox/init-firebase-and-catalox.d.ts.map +1 -0
  88. package/dist/catalox/init-firebase-and-catalox.js +48 -0
  89. package/dist/catalox/init-firebase-and-catalox.js.map +1 -0
  90. package/dist/catalox/list-ai-skills-catalog.d.ts +24 -0
  91. package/dist/catalox/list-ai-skills-catalog.d.ts.map +1 -0
  92. package/dist/catalox/list-ai-skills-catalog.js +38 -0
  93. package/dist/catalox/list-ai-skills-catalog.js.map +1 -0
  94. package/dist/catalox/skill-gateway-template-utils.d.ts +11 -0
  95. package/dist/catalox/skill-gateway-template-utils.d.ts.map +1 -0
  96. package/dist/catalox/skill-gateway-template-utils.js +31 -0
  97. package/dist/catalox/skill-gateway-template-utils.js.map +1 -0
  98. package/dist/catalox/skill-template-catalog-mutations.d.ts +143 -0
  99. package/dist/catalox/skill-template-catalog-mutations.d.ts.map +1 -0
  100. package/dist/catalox/skill-template-catalog-mutations.js +470 -0
  101. package/dist/catalox/skill-template-catalog-mutations.js.map +1 -0
  102. package/dist/catalox/skill-template-markdown.d.ts +34 -0
  103. package/dist/catalox/skill-template-markdown.d.ts.map +1 -0
  104. package/dist/catalox/skill-template-markdown.js +106 -0
  105. package/dist/catalox/skill-template-markdown.js.map +1 -0
  106. package/dist/catalox/skill-templates.d.ts +72 -0
  107. package/dist/catalox/skill-templates.d.ts.map +1 -0
  108. package/dist/catalox/skill-templates.js +80 -0
  109. package/dist/catalox/skill-templates.js.map +1 -0
  110. package/dist/client/audit-manager.d.ts +27 -0
  111. package/dist/client/audit-manager.d.ts.map +1 -0
  112. package/dist/client/audit-manager.js +260 -0
  113. package/dist/client/audit-manager.js.map +1 -0
  114. package/dist/client/base-client.d.ts +19 -0
  115. package/dist/client/base-client.d.ts.map +1 -0
  116. package/dist/client/base-client.js +20 -0
  117. package/dist/client/base-client.js.map +1 -0
  118. package/dist/client/build-gateway-invoke-request.d.ts +32 -0
  119. package/dist/client/build-gateway-invoke-request.d.ts.map +1 -0
  120. package/dist/client/build-gateway-invoke-request.js +135 -0
  121. package/dist/client/build-gateway-invoke-request.js.map +1 -0
  122. package/dist/client/invoke-skill-via-funcx.d.ts +11 -0
  123. package/dist/client/invoke-skill-via-funcx.d.ts.map +1 -0
  124. package/dist/client/invoke-skill-via-funcx.js +51 -0
  125. package/dist/client/invoke-skill-via-funcx.js.map +1 -0
  126. package/dist/client/registry-manager.d.ts +94 -0
  127. package/dist/client/registry-manager.d.ts.map +1 -0
  128. package/dist/client/registry-manager.js +287 -0
  129. package/dist/client/registry-manager.js.map +1 -0
  130. package/dist/client/skill-executor.d.ts +35 -0
  131. package/dist/client/skill-executor.d.ts.map +1 -0
  132. package/dist/client/skill-executor.js +316 -0
  133. package/dist/client/skill-executor.js.map +1 -0
  134. package/dist/client/task-executor.d.ts +21 -0
  135. package/dist/client/task-executor.d.ts.map +1 -0
  136. package/dist/client/task-executor.js +50 -0
  137. package/dist/client/task-executor.js.map +1 -0
  138. package/dist/client.d.ts +116 -0
  139. package/dist/client.d.ts.map +1 -0
  140. package/dist/client.js +406 -0
  141. package/dist/client.js.map +1 -0
  142. package/dist/diagnostics/gateway-usage.d.ts +3 -0
  143. package/dist/diagnostics/gateway-usage.d.ts.map +1 -0
  144. package/dist/diagnostics/gateway-usage.js +26 -0
  145. package/dist/diagnostics/gateway-usage.js.map +1 -0
  146. package/dist/diagnostics/map-gateway-trace.d.ts +43 -0
  147. package/dist/diagnostics/map-gateway-trace.d.ts.map +1 -0
  148. package/dist/diagnostics/map-gateway-trace.js +243 -0
  149. package/dist/diagnostics/map-gateway-trace.js.map +1 -0
  150. package/dist/diagnostics/trace-mode.d.ts +9 -0
  151. package/dist/diagnostics/trace-mode.d.ts.map +1 -0
  152. package/dist/diagnostics/trace-mode.js +8 -0
  153. package/dist/diagnostics/trace-mode.js.map +1 -0
  154. package/dist/index.d.ts +34 -0
  155. package/dist/index.d.ts.map +1 -0
  156. package/dist/index.js +28 -0
  157. package/dist/index.js.map +1 -0
  158. package/dist/metadata.d.ts +7 -0
  159. package/dist/metadata.d.ts.map +1 -0
  160. package/dist/metadata.js +65 -0
  161. package/dist/metadata.js.map +1 -0
  162. package/dist/parsers/context-parser.d.ts +2 -0
  163. package/dist/parsers/context-parser.d.ts.map +1 -0
  164. package/dist/parsers/context-parser.js +5 -0
  165. package/dist/parsers/context-parser.js.map +1 -0
  166. package/dist/parsers/input-parser.d.ts +2 -0
  167. package/dist/parsers/input-parser.d.ts.map +1 -0
  168. package/dist/parsers/input-parser.js +5 -0
  169. package/dist/parsers/input-parser.js.map +1 -0
  170. package/dist/runtime-objects.d.ts +11 -0
  171. package/dist/runtime-objects.d.ts.map +1 -0
  172. package/dist/runtime-objects.js +21 -0
  173. package/dist/runtime-objects.js.map +1 -0
  174. package/dist/skill-execution-trace-error.d.ts +20 -0
  175. package/dist/skill-execution-trace-error.d.ts.map +1 -0
  176. package/dist/skill-execution-trace-error.js +21 -0
  177. package/dist/skill-execution-trace-error.js.map +1 -0
  178. package/dist/types.d.ts +534 -0
  179. package/dist/types.d.ts.map +1 -0
  180. package/dist/types.js +2 -0
  181. package/dist/types.js.map +1 -0
  182. package/dist/utils/build-activix-billing-patch.d.ts +24 -0
  183. package/dist/utils/build-activix-billing-patch.d.ts.map +1 -0
  184. package/dist/utils/build-activix-billing-patch.js +70 -0
  185. package/dist/utils/build-activix-billing-patch.js.map +1 -0
  186. package/dist/utils/enrich-activix-identity.d.ts +30 -0
  187. package/dist/utils/enrich-activix-identity.d.ts.map +1 -0
  188. package/dist/utils/enrich-activix-identity.js +34 -0
  189. package/dist/utils/enrich-activix-identity.js.map +1 -0
  190. package/dist/utils/exellix-skills-logxer-defaults.d.ts +16 -0
  191. package/dist/utils/exellix-skills-logxer-defaults.d.ts.map +1 -0
  192. package/dist/utils/exellix-skills-logxer-defaults.js +37 -0
  193. package/dist/utils/exellix-skills-logxer-defaults.js.map +1 -0
  194. package/dist/utils/flex-md-parser.d.ts +23 -0
  195. package/dist/utils/flex-md-parser.d.ts.map +1 -0
  196. package/dist/utils/flex-md-parser.js +98 -0
  197. package/dist/utils/flex-md-parser.js.map +1 -0
  198. package/dist/utils/gateway-execution-summary.d.ts +18 -0
  199. package/dist/utils/gateway-execution-summary.d.ts.map +1 -0
  200. package/dist/utils/gateway-execution-summary.js +42 -0
  201. package/dist/utils/gateway-execution-summary.js.map +1 -0
  202. package/dist/utils/gateway-invoke-rejection.d.ts +9 -0
  203. package/dist/utils/gateway-invoke-rejection.d.ts.map +1 -0
  204. package/dist/utils/gateway-invoke-rejection.js +28 -0
  205. package/dist/utils/gateway-invoke-rejection.js.map +1 -0
  206. package/dist/utils/normalize-billing-metadata.d.ts +17 -0
  207. package/dist/utils/normalize-billing-metadata.d.ts.map +1 -0
  208. package/dist/utils/normalize-billing-metadata.js +75 -0
  209. package/dist/utils/normalize-billing-metadata.js.map +1 -0
  210. package/dist/utils/normalize-output-parsed.d.ts +25 -0
  211. package/dist/utils/normalize-output-parsed.d.ts.map +1 -0
  212. package/dist/utils/normalize-output-parsed.js +128 -0
  213. package/dist/utils/normalize-output-parsed.js.map +1 -0
  214. package/dist/utils/patch-activix-activity-after-skill.d.ts +19 -0
  215. package/dist/utils/patch-activix-activity-after-skill.d.ts.map +1 -0
  216. package/dist/utils/patch-activix-activity-after-skill.js +81 -0
  217. package/dist/utils/patch-activix-activity-after-skill.js.map +1 -0
  218. package/dist/utils/rendrix-render-skill-templates.d.ts +14 -0
  219. package/dist/utils/rendrix-render-skill-templates.d.ts.map +1 -0
  220. package/dist/utils/rendrix-render-skill-templates.js +25 -0
  221. package/dist/utils/rendrix-render-skill-templates.js.map +1 -0
  222. package/dist/utils/resolve-activity-id.d.ts +9 -0
  223. package/dist/utils/resolve-activity-id.d.ts.map +1 -0
  224. package/dist/utils/resolve-activity-id.js +27 -0
  225. package/dist/utils/resolve-activity-id.js.map +1 -0
  226. package/dist/utils/resolve-gateway-job-task-ids.d.ts +19 -0
  227. package/dist/utils/resolve-gateway-job-task-ids.d.ts.map +1 -0
  228. package/dist/utils/resolve-gateway-job-task-ids.js +21 -0
  229. package/dist/utils/resolve-gateway-job-task-ids.js.map +1 -0
  230. package/dist/utils/resolve-identity.d.ts +12 -0
  231. package/dist/utils/resolve-identity.d.ts.map +1 -0
  232. package/dist/utils/resolve-identity.js +36 -0
  233. package/dist/utils/resolve-identity.js.map +1 -0
  234. package/dist/utils/resolve-run-skill-ai-engine.d.ts +8 -0
  235. package/dist/utils/resolve-run-skill-ai-engine.d.ts.map +1 -0
  236. package/dist/utils/resolve-run-skill-ai-engine.js +20 -0
  237. package/dist/utils/resolve-run-skill-ai-engine.js.map +1 -0
  238. package/dist/utils/run-skill-request.d.ts +11 -0
  239. package/dist/utils/run-skill-request.d.ts.map +1 -0
  240. package/dist/utils/run-skill-request.js +44 -0
  241. package/dist/utils/run-skill-request.js.map +1 -0
  242. package/dist/utils/validate-mandatory-activix-invoke-fields.d.ts +7 -0
  243. package/dist/utils/validate-mandatory-activix-invoke-fields.d.ts.map +1 -0
  244. package/dist/utils/validate-mandatory-activix-invoke-fields.js +16 -0
  245. package/dist/utils/validate-mandatory-activix-invoke-fields.js.map +1 -0
  246. package/dist/utils/validate-session-id.d.ts +6 -0
  247. package/dist/utils/validate-session-id.d.ts.map +1 -0
  248. package/dist/utils/validate-session-id.js +18 -0
  249. package/dist/utils/validate-session-id.js.map +1 -0
  250. package/erc-manifest.json +11 -0
  251. package/package.json +76 -0
@@ -0,0 +1,202 @@
1
+ /** Catalox `catalogId` and default `appId` for published skill discovery. */
2
+ export const AI_SKILLS_CATALOG_ID = "ai-skills";
3
+ export const AI_SKILLS_APP_ID = "ai-skills";
4
+ /** Descriptor version written by {@link scripts/provision-ai-skills-catalog}. */
5
+ export const AI_SKILLS_DESCRIPTOR_VERSION = "1";
6
+ /**
7
+ * Authoritative in-repo list for Catalox provisioning and package docs.
8
+ * Downstream consumers should call Catalox `listCatalogItems` for the live list.
9
+ */
10
+ export const AI_SKILLS_CATALOG_ITEMS = [
11
+ {
12
+ skillKey: "professional-answer",
13
+ title: "Professional answer",
14
+ description: "Structured professional answer with FlexMD payloads (shortAnswer, fullAnswer, assumptions, unknowns, evidence).",
15
+ isLocal: true,
16
+ catalogReleaseStatus: "published",
17
+ },
18
+ {
19
+ skillKey: "scoped-data-reader",
20
+ title: "Scoped data reader",
21
+ description: "Reads and normalizes scoped datasets for downstream reasoning and assembly.",
22
+ isLocal: false,
23
+ },
24
+ {
25
+ skillKey: "scoped-answer-writer",
26
+ title: "Scoped answer writer",
27
+ description: "Writes scoped narrative or structured answers from prepared context and constraints.",
28
+ isLocal: false,
29
+ },
30
+ {
31
+ skillKey: "scoped-answer-assembler",
32
+ title: "Scoped answer assembler",
33
+ description: "Assembles multi-part scoped answers from fragments while preserving scope boundaries.",
34
+ isLocal: false,
35
+ },
36
+ {
37
+ skillKey: "deterministic-rule",
38
+ title: "Deterministic rule",
39
+ description: "Applies explicit deterministic rules and policies over inputs without open-ended generation.",
40
+ isLocal: false,
41
+ },
42
+ {
43
+ skillKey: "professional-decision",
44
+ title: "Professional decision",
45
+ description: "Structured decision output (decision, score, rationale, risks).",
46
+ isLocal: true,
47
+ catalogReleaseStatus: "published",
48
+ },
49
+ ];
50
+ export function buildAiSkillsCatalogDescriptor() {
51
+ return {
52
+ catalogId: AI_SKILLS_CATALOG_ID,
53
+ label: "AI Skills",
54
+ description: "Skill registry and template bodies for @exellix/ai-skills (Catalox native).",
55
+ itemLabel: "Skill",
56
+ sourceMode: "native",
57
+ status: "active",
58
+ visibility: "visible",
59
+ defaultSort: { field: "skillKey", direction: "asc" },
60
+ capabilities: {
61
+ canList: true,
62
+ canGet: true,
63
+ canCreate: true,
64
+ canEdit: true,
65
+ canDelete: true,
66
+ canImport: true,
67
+ canExport: true,
68
+ canValidate: true,
69
+ canViewReferences: true,
70
+ },
71
+ queryableFields: [
72
+ {
73
+ key: "skillKey",
74
+ label: "Skill key",
75
+ type: "string",
76
+ path: "skillKey",
77
+ indexed: true,
78
+ filterable: true,
79
+ sortable: true,
80
+ listVisible: true,
81
+ detailVisible: true,
82
+ required: true,
83
+ },
84
+ {
85
+ key: "title",
86
+ label: "Title",
87
+ type: "string",
88
+ path: "title",
89
+ indexed: false,
90
+ filterable: false,
91
+ sortable: true,
92
+ listVisible: true,
93
+ detailVisible: true,
94
+ required: true,
95
+ },
96
+ {
97
+ key: "description",
98
+ label: "Description",
99
+ type: "string",
100
+ path: "description",
101
+ indexed: false,
102
+ filterable: false,
103
+ sortable: false,
104
+ listVisible: true,
105
+ detailVisible: true,
106
+ required: true,
107
+ },
108
+ {
109
+ key: "isLocal",
110
+ label: "Local templates",
111
+ type: "boolean",
112
+ path: "isLocal",
113
+ indexed: true,
114
+ filterable: true,
115
+ sortable: true,
116
+ listVisible: true,
117
+ detailVisible: true,
118
+ required: true,
119
+ },
120
+ {
121
+ key: "status",
122
+ label: "Status",
123
+ type: "enum",
124
+ path: "status",
125
+ enumValues: ["planned", "draft", "published"],
126
+ indexed: true,
127
+ filterable: true,
128
+ sortable: true,
129
+ listVisible: true,
130
+ detailVisible: true,
131
+ required: true,
132
+ },
133
+ {
134
+ key: "parentSkillKey",
135
+ label: "Parent skill (sub-skill)",
136
+ type: "string",
137
+ path: "parentSkillKey",
138
+ indexed: false,
139
+ filterable: true,
140
+ sortable: false,
141
+ listVisible: true,
142
+ detailVisible: true,
143
+ required: false,
144
+ },
145
+ {
146
+ key: "instructionsText",
147
+ label: "Instructions",
148
+ type: "string",
149
+ path: "instructionsText",
150
+ listVisible: false,
151
+ detailVisible: true,
152
+ required: false,
153
+ },
154
+ {
155
+ key: "promptText",
156
+ label: "Prompt",
157
+ type: "string",
158
+ path: "promptText",
159
+ listVisible: false,
160
+ detailVisible: true,
161
+ required: false,
162
+ },
163
+ {
164
+ key: "auditInstructionsText",
165
+ label: "Audit instructions",
166
+ type: "string",
167
+ path: "auditInstructionsText",
168
+ listVisible: false,
169
+ detailVisible: true,
170
+ required: false,
171
+ },
172
+ {
173
+ key: "auditPromptText",
174
+ label: "Audit prompt",
175
+ type: "string",
176
+ path: "auditPromptText",
177
+ listVisible: false,
178
+ detailVisible: true,
179
+ required: false,
180
+ },
181
+ ],
182
+ identity: {
183
+ itemIdStrategy: "natural",
184
+ itemIdField: "skillKey",
185
+ titleField: "title",
186
+ statusField: "status",
187
+ },
188
+ };
189
+ }
190
+ /**
191
+ * Computes Catalox `data.status` after template bodies are merged.
192
+ */
193
+ export function computeSkillRowStatus(instructionsText, promptText, catalogReleaseStatus) {
194
+ const ins = instructionsText?.trim() ?? "";
195
+ const pr = promptText?.trim() ?? "";
196
+ if (!ins || !pr)
197
+ return "planned";
198
+ if (catalogReleaseStatus === "published")
199
+ return "published";
200
+ return "draft";
201
+ }
202
+ //# sourceMappingURL=ai-skills-catalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-skills-catalog.js","sourceRoot":"","sources":["../../src/catalox/ai-skills-catalog.ts"],"names":[],"mappings":"AAEA,6EAA6E;AAC7E,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAoB,CAAC;AACzD,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAoB,CAAC;AAErD,iFA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AI,EAAE,QAAQ;gBACd,IAAI,EAAE,iBAAiB;gBACvB,WAAW,EAAE,KAAK;gBAClB,aAAa,EAAE,IAAI;gBACnB,QAAQ,EAAE,KAAK;aAClB;SACJ;QACD,QAAQ,EAAE;YACN,cAAc,EAAE,SAAS;YACzB,WAAW,EAAE,UAAU;YACvB,UAAU,EAAE,OAAO;YACnB,WAAW,EAAE,QAAQ;SACxB;KACJ,CAAC;AACN,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CACjC,gBAAoC,EACpC,UAA8B,EAC9B,oBAAsD;IAEtD,MAAM,GAAG,GAAG,gBAAgB,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC3C,MAAM,EAAE,GAAG,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACpC,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE;QAAE,OAAO,SAAS,CAAC;IAClC,IAAI,oBAAoB,KAAK,WAAW;QAAE,OAAO,WAAW,CAAC;IAC7D,OAAO,OAAO,CAAC;AACnB,CAAC"}
@@ -0,0 +1,15 @@
1
+ export declare class CataloxSkillNotFoundError extends Error {
2
+ readonly skillKey: string;
3
+ readonly itemId: string;
4
+ constructor(skillKey: string, itemId: string);
5
+ }
6
+ export declare class CataloxSkillAlreadyExistsError extends Error {
7
+ readonly skillKey: string;
8
+ readonly itemId: string;
9
+ constructor(skillKey: string, itemId: string);
10
+ }
11
+ export declare class CataloxSkillNotRunnableError extends Error {
12
+ readonly skillKey: string;
13
+ constructor(skillKey: string, message: string);
14
+ }
15
+ //# sourceMappingURL=catalox-skill-errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalox-skill-errors.d.ts","sourceRoot":"","sources":["../../src/catalox/catalox-skill-errors.ts"],"names":[],"mappings":"AAAA,qBAAa,yBAA0B,SAAQ,KAAK;IAChD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBACZ,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAM/C;AAED,qBAAa,8BAA+B,SAAQ,KAAK;IACrD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBACZ,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAM/C;AAED,qBAAa,4BAA6B,SAAQ,KAAK;IACnD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;gBACd,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAKhD"}
@@ -0,0 +1,29 @@
1
+ export class CataloxSkillNotFoundError extends Error {
2
+ skillKey;
3
+ itemId;
4
+ constructor(skillKey, itemId) {
5
+ super(`[AI-SKILLS] No Catalox catalog item for skillKey=${skillKey} (itemId=${itemId})`);
6
+ this.name = "CataloxSkillNotFoundError";
7
+ this.skillKey = skillKey;
8
+ this.itemId = itemId;
9
+ }
10
+ }
11
+ export class CataloxSkillAlreadyExistsError extends Error {
12
+ skillKey;
13
+ itemId;
14
+ constructor(skillKey, itemId) {
15
+ super(`[AI-SKILLS] Catalox catalog item already exists for skillKey=${skillKey} (itemId=${itemId})`);
16
+ this.name = "CataloxSkillAlreadyExistsError";
17
+ this.skillKey = skillKey;
18
+ this.itemId = itemId;
19
+ }
20
+ }
21
+ export class CataloxSkillNotRunnableError extends Error {
22
+ skillKey;
23
+ constructor(skillKey, message) {
24
+ super(`[AI-SKILLS] ${message} (skillKey=${skillKey})`);
25
+ this.name = "CataloxSkillNotRunnableError";
26
+ this.skillKey = skillKey;
27
+ }
28
+ }
29
+ //# sourceMappingURL=catalox-skill-errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalox-skill-errors.js","sourceRoot":"","sources":["../../src/catalox/catalox-skill-errors.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,yBAA0B,SAAQ,KAAK;IACvC,QAAQ,CAAS;IACjB,MAAM,CAAS;IACxB,YAAY,QAAgB,EAAE,MAAc;QACxC,KAAK,CAAC,oDAAoD,QAAQ,YAAY,MAAM,GAAG,CAAC,CAAC;QACzF,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;QACxC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;CACJ;AAED,MAAM,OAAO,8BAA+B,SAAQ,KAAK;IAC5C,QAAQ,CAAS;IACjB,MAAM,CAAS;IACxB,YAAY,QAAgB,EAAE,MAAc;QACxC,KAAK,CAAC,gEAAgE,QAAQ,YAAY,MAAM,GAAG,CAAC,CAAC;QACrG,IAAI,CAAC,IAAI,GAAG,gCAAgC,CAAC;QAC7C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;CACJ;AAED,MAAM,OAAO,4BAA6B,SAAQ,KAAK;IAC1C,QAAQ,CAAS;IAC1B,YAAY,QAAgB,EAAE,OAAe;QACzC,KAAK,CAAC,eAAe,OAAO,cAAc,QAAQ,GAAG,CAAC,CAAC;QACvD,IAAI,CAAC,IAAI,GAAG,8BAA8B,CAAC;QAC3C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;CACJ"}
@@ -0,0 +1,10 @@
1
+ export { canonicalSkillKey, ensureGatewayTreatsAsTemplateText } from "./skill-gateway-template-utils.js";
2
+ export { AI_SKILLS_APP_ID, AI_SKILLS_CATALOG_ID, AI_SKILLS_DESCRIPTOR_VERSION, AI_SKILLS_CATALOG_ITEMS, buildAiSkillsCatalogDescriptor, computeSkillRowStatus, type AiSkillsCatalogItemSpec, type CatalogReleaseStatus, } from "./ai-skills-catalog.js";
3
+ export { AI_ENGINES_APP_ID, AI_ENGINES_CATALOG_ID, AI_ENGINES_DESCRIPTOR_VERSION, AI_ENGINES_CATALOG_ITEMS, AI_ENGINE_CATALOG_ITEM_IDS, DEFAULT_AI_ENGINE_CATALOG_ITEM_ID, buildAiEnginesCatalogDescriptor, type AiEngineCatalogItemId, type AiEnginesCatalogItemSpec, } from "./ai-engines-catalog.js";
4
+ export { listAiSkillsCatalogItems, catalogSkillKeyToRunSkillKey, type AiSkillsPublishedItem, type ListAiSkillsCatalogItemsResult, } from "./list-ai-skills-catalog.js";
5
+ export { catalogItemIdFromSkillKey, extractRunnableTemplateBodiesFromAiSkillsCatalogData, fetchSkillTemplatesFromCatalox, defaultAiSkillsCataloxContext, type SkillCatalogStatus, type FetchSkillTemplatesMode, type AiSkillsCatalogItemDataFields, type RunnableTemplateBodiesFromCatalogData, } from "./skill-templates.js";
6
+ export { CataloxSkillNotFoundError, CataloxSkillAlreadyExistsError, CataloxSkillNotRunnableError, } from "./catalox-skill-errors.js";
7
+ export { initFirebaseAdminFromEnv, createCataloxFromEnv } from "./init-firebase-and-catalox.js";
8
+ export { normalizeForStorage, toPresentationMarkdown, extractTemplateTokensFromTexts, extractTokenNamesFromStrings, type ExtractedTemplateInputs, } from "./skill-template-markdown.js";
9
+ export { SKILL_TEMPLATE_ROLES_ORDER, getSkillContent, getSkillTokens, modifySkillContent, createSubSkill, deleteSubSkill, getSkillTemplatesForPresentation, updateSkillTemplatesFromPresentation, getSkillTemplateInputs, upsertSkillCatalogItem, softDeleteSkillCatalogItem, type SkillTemplateRole, type SkillContentPart, type ModifySkillContentResult, type CreateSubSkillOverrides, type CreateSubSkillInput, type CreateSubSkillResult, type DeleteSubSkillResult, type SkillTemplatesPresentation, type SkillTemplatePresentationPatch, type UpdateSkillTemplatesFromPresentationOptions, type UpsertSkillCatalogItemInput, type UpsertSkillCatalogItemOptions, } from "./skill-template-catalog-mutations.js";
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/catalox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,iCAAiC,EAAE,MA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AoB,EACzB,KAAK,0BAA0B,EAC/B,KAAK,8BAA8B,EACnC,KAAK,2CAA2C,EAChD,KAAK,2BAA2B,EAChC,KAAK,6BAA6B,GACrC,MAAM,uCAAuC,CAAC"}
@@ -0,0 +1,10 @@
1
+ export { canonicalSkillKey, ensureGatewayTreatsAsTemplateText } from "./skill-gateway-template-utils.js";
2
+ export { AI_SKILLS_APP_ID, AI_SKILLS_CATALOG_ID, AI_SKILLS_DESCRIPTOR_VERSION, AI_SKILLS_CATALOG_ITEMS, buildAiSkillsCatalogDescriptor, computeSkillRowStatus, } from "./ai-skills-catalog.js";
3
+ export { AI_ENGINES_APP_ID, AI_ENGINES_CATALOG_ID, AI_ENGINES_DESCRIPTOR_VERSION, AI_ENGINES_CATALOG_ITEMS, AI_ENGINE_CATALOG_ITEM_IDS, DEFAULT_AI_ENGINE_CATALOG_ITEM_ID, buildAiEnginesCatalogDescriptor, } from "./ai-engines-catalog.js";
4
+ export { listAiSkillsCatalogItems, catalogSkillKeyToRunSkillKey, } from "./list-ai-skills-catalog.js";
5
+ export { catalogItemIdFromSkillKey, extractRunnableTemplateBodiesFromAiSkillsCatalogData, fetchSkillTemplatesFromCatalox, defaultAiSkillsCataloxContext, } from "./skill-templates.js";
6
+ export { CataloxSkillNotFoundError, CataloxSkillAlreadyExistsError, CataloxSkillNotRunnableError, } from "./catalox-skill-errors.js";
7
+ export { initFirebaseAdminFromEnv, createCataloxFromEnv } from "./init-firebase-and-catalox.js";
8
+ export { normalizeForStorage, toPresentationMarkdown, extractTemplateTokensFromTexts, extractTokenNamesFromStrings, } from "./skill-template-markdown.js";
9
+ export { SKILL_TEMPLATE_ROLES_ORDER, getSkillContent, getSkillTokens, modifySkillContent, createSubSkill, deleteSubSkill, getSkillTemplatesForPresentation, updateSkillTemplatesFromPresentation, getSkillTemplateInputs, upsertSkillCatalogItem, softDeleteSkillCatalogItem, } from "./skill-template-catalog-mutations.js";
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/catalox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,iCAAiC,EAAE,MAAM,mCAAmC,CAAC;AACzG,OAAO,EACH,gBAAgB,EAChB,oBAAoB,EACpB,4BAA4B,EAC5B,uBAAuB,EACvB,8BAA8B,EAC9B,qBAAqB,GAGxB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACH,iBAAiB,EACjB,qBAAqB,EACrB,6BAA6B,EAC7B,wBAAwB,EACxB,0BAA0B,EAC1B,iCAAiC,EACjC,+BAA+B,GAGlC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACH,wBAAwB,EACxB,4BAA4B,GAG/B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACH,yBAAyB,EACzB,oDAAoD,EACpD,8BAA8B,EAC9B,6BAA6B,GAKhC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACH,yBAAyB,EACzB,8BAA8B,EAC9B,4BAA4B,GAC/B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAChG,OAAO,EACH,mBAAmB,EACnB,sBAAsB,EACtB,8BAA8B,EAC9B,4BAA4B,GAE/B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACH,0BAA0B,EAC1B,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,gCAAgC,EAChC,oCAAoC,EACpC,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,GAa7B,MAAM,uCAAuC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { Catalox } from "@x12i/catalox";
2
+ /**
3
+ * Idempotent Firebase Admin initialization from env (same rules as {@link createCataloxFromEnv}).
4
+ */
5
+ export declare function initFirebaseAdminFromEnv(): void;
6
+ /** Firestore-backed Catalox client (uses `FIRESTORE_DATABASE_ID` when set). */
7
+ export declare function createCataloxFromEnv(): Catalox;
8
+ //# sourceMappingURL=init-firebase-and-catalox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-firebase-and-catalox.d.ts","sourceRoot":"","sources":["../../src/catalox/init-firebase-and-catalox.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAc7C;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAG/C;AAED,+EAA+E;AAC/E,wBAAgB,oBAAoB,IAAI,OAAO,CAkB9C"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Shared Firebase Admin + Catalox wiring for apps, demos, and tests that read the `ai-skills` catalog.
3
+ *
4
+ * Delegates credential resolution to **`@x12i/catalox/firebase`** (Catalox **v4**): precedence is
5
+ * **`GOOGLE_SERVICE_ACCOUNT_BASE64`**, then optional **`serviceAccountPath` supplied only in code**
6
+ * (there is **no** env var for a service-account file path), then Application Default Credentials.
7
+ *
8
+ * **Project id:** only **`FIREBASE_PROJECT_ID`** (e.g. in `.env`). No implicit default from
9
+ * **`GCLOUD_PROJECT`**, **`GOOGLE_CLOUD_PROJECT`**, or **`project_id`** inside service-account JSON —
10
+ * the Firebase/GCP project for Catalox must be chosen explicitly.
11
+ */
12
+ import { createCataloxFromEnv as cataloxCreateCataloxFromEnv, createCataloxFromFirebaseApp, createFirebaseAdminAppFromEnv, } from "@x12i/catalox/firebase";
13
+ import { getApps } from "firebase-admin/app";
14
+ /** Firebase Admin default app name (see firebase-admin lifecycle). */
15
+ const FIREBASE_DEFAULT_APP_NAME = "[DEFAULT]";
16
+ function resolveProjectId() {
17
+ const pid = process.env.FIREBASE_PROJECT_ID?.trim();
18
+ if (pid)
19
+ return pid;
20
+ throw new Error("[AI-SKILLS] Set FIREBASE_PROJECT_ID in your environment (e.g. .env). Implicit project id from gcloud or service-account JSON is not used.");
21
+ }
22
+ /**
23
+ * Idempotent Firebase Admin initialization from env (same rules as {@link createCataloxFromEnv}).
24
+ */
25
+ export function initFirebaseAdminFromEnv() {
26
+ if (getApps().some((a) => a.name === FIREBASE_DEFAULT_APP_NAME))
27
+ return;
28
+ createFirebaseAdminAppFromEnv({ projectId: resolveProjectId() });
29
+ }
30
+ /** Firestore-backed Catalox client (uses `FIRESTORE_DATABASE_ID` when set). */
31
+ export function createCataloxFromEnv() {
32
+ const dbId = process.env.FIRESTORE_DATABASE_ID?.trim();
33
+ const databaseId = dbId || undefined;
34
+ const existingDefault = getApps().find((a) => a.name === FIREBASE_DEFAULT_APP_NAME);
35
+ if (existingDefault) {
36
+ const { catalox } = createCataloxFromFirebaseApp({
37
+ app: existingDefault,
38
+ databaseId,
39
+ });
40
+ return catalox;
41
+ }
42
+ const { catalox } = cataloxCreateCataloxFromEnv({
43
+ projectId: resolveProjectId(),
44
+ databaseId,
45
+ });
46
+ return catalox;
47
+ }
48
+ //# sourceMappingURL=init-firebase-and-catalox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-firebase-and-catalox.js","sourceRoot":"","sources":["../../src/catalox/init-firebase-and-catalox.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EACH,oBAAoB,IAAI,2BAA2B,EACnD,4BAA4B,EAC5B,6BAA6B,GAChC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,sEAAsE;AACtE,MAAM,yBAAyB,GAAG,WAAW,CAAC;AAE9C,SAAS,gBAAgB;IACrB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,EAAE,CAAC;IACpD,IAAI,GAAG;QAAE,OAAO,GAAG,CAAC;IACpB,MAAM,IAAI,KAAK,CACX,2IAA2I,CAC9I,CAAC;AACN,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,wBAAwB;IACpC,IAAI,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,yBAAyB,CAAC;QAAE,OAAO;IACxE,6BAA6B,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,EAAE,CAAC,CAAC;AACrE,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,oBAAoB;IAChC,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,IAAI,EAAE,CAAC;IACvD,MAAM,UAAU,GAAG,IAAI,IAAI,SAAS,CAAC;IAErC,MAAM,eAAe,GAAG,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,yBAAyB,CAAC,CAAC;IACpF,IAAI,eAAe,EAAE,CAAC;QAClB,MAAM,EAAE,OAAO,EAAE,GAAG,4BAA4B,CAAC;YAC7C,GAAG,EAAE,eAAe;YACpB,UAAU;SACb,CAAC,CAAC;QACH,OAAO,OAAO,CAAC;IACnB,CAAC;IAED,MAAM,EAAE,OAAO,EAAE,GAAG,2BAA2B,CAAC;QAC5C,SAAS,EAAE,gBAAgB,EAAE;QAC7B,UAAU;KACb,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACnB,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { Catalox, CatalogQueryOptions } from "@x12i/catalox";
2
+ export type SkillRowStatus = "planned" | "draft" | "published";
3
+ export type AiSkillsPublishedItem = {
4
+ skillKey: string;
5
+ title: string;
6
+ description: string;
7
+ isLocal: boolean;
8
+ status: SkillRowStatus;
9
+ };
10
+ export type ListAiSkillsCatalogItemsResult = {
11
+ listOutcome: "ok" | "mapping_blocked";
12
+ items: AiSkillsPublishedItem[];
13
+ issues?: unknown[];
14
+ };
15
+ /**
16
+ * Lists skills from the Catalox native catalog {@link AI_SKILLS_CATALOG_ID}
17
+ * for {@link AI_SKILLS_APP_ID} (override `appId` when your binding uses another tenant id).
18
+ */
19
+ export declare function listAiSkillsCatalogItems(catalox: Catalox, options?: CatalogQueryOptions & {
20
+ appId?: string;
21
+ }): Promise<ListAiSkillsCatalogItemsResult>;
22
+ /** Maps a short Catalox `skillKey` to the canonical `skills/<id>` form used in `runSkill`. */
23
+ export declare function catalogSkillKeyToRunSkillKey(skillKey: string): string;
24
+ //# sourceMappingURL=list-ai-skills-catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-ai-skills-catalog.d.ts","sourceRoot":"","sources":["../../src/catalox/list-ai-skills-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAIlE,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,CAAC;AAE/D,MAAM,MAAM,qBAAqB,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG;IACzC,WAAW,EAAE,IAAI,GAAG,iBAAiB,CAAC;IACtC,KAAK,EAAE,qBAAqB,EAAE,CAAC;IAC/B,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC;CACtB,CAAC;AAcF;;;GAGG;AACH,wBAAsB,wBAAwB,CAC1C,OAAO,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE,mBAAmB,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GACnD,OAAO,CAAC,8BAA8B,CAAC,CAczC;AAED,8FAA8F;AAC9F,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAErE"}
@@ -0,0 +1,38 @@
1
+ import { canonicalSkillKey } from "./skill-gateway-template-utils.js";
2
+ import { AI_SKILLS_APP_ID, AI_SKILLS_CATALOG_ID } from "./ai-skills-catalog.js";
3
+ function asItem(data) {
4
+ const skillKey = typeof data.skillKey === "string" ? data.skillKey : "";
5
+ const title = typeof data.title === "string" ? data.title : "";
6
+ const description = typeof data.description === "string" ? data.description : "";
7
+ const isLocal = data.isLocal === true;
8
+ const statusRaw = data.status;
9
+ const status = statusRaw === "draft" || statusRaw === "published" || statusRaw === "planned" ? statusRaw : "planned";
10
+ if (!skillKey || !title)
11
+ return null;
12
+ return { skillKey, title, description, isLocal, status };
13
+ }
14
+ /**
15
+ * Lists skills from the Catalox native catalog {@link AI_SKILLS_CATALOG_ID}
16
+ * for {@link AI_SKILLS_APP_ID} (override `appId` when your binding uses another tenant id).
17
+ */
18
+ export async function listAiSkillsCatalogItems(catalox, options) {
19
+ const { appId, ...query } = options ?? {};
20
+ const ctx = { appId: appId ?? AI_SKILLS_APP_ID };
21
+ const res = await catalox.listCatalogItems(ctx, AI_SKILLS_CATALOG_ID, query);
22
+ const items = [];
23
+ for (const it of res.items) {
24
+ const row = asItem((it.data ?? {}));
25
+ if (row)
26
+ items.push(row);
27
+ }
28
+ return {
29
+ listOutcome: res.listOutcome,
30
+ items,
31
+ ...(res.issues ? { issues: res.issues } : {}),
32
+ };
33
+ }
34
+ /** Maps a short Catalox `skillKey` to the canonical `skills/<id>` form used in `runSkill`. */
35
+ export function catalogSkillKeyToRunSkillKey(skillKey) {
36
+ return canonicalSkillKey(skillKey);
37
+ }
38
+ //# sourceMappingURL=list-ai-skills-catalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-ai-skills-catalog.js","sourceRoot":"","sources":["../../src/catalox/list-ai-skills-catalog.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAkBhF,SAAS,MAAM,CAAC,IAA6B;IACzC,MAAM,QAAQ,GAAG,OAAO,IAAI,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;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CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;IACD,OAAO;QACH,WAAW,EAAE,GAAG,CAAC,WAAW;QAC5B,KAAK;QACL,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAChD,CAAC;AACN,CAAC;AAED,8FAA8F;AAC9F,MAAM,UAAU,4BAA4B,CAAC,QAAgB;IACzD,OAAO,iBAAiB,CAAC,QAAQ,CAAC,CAAC;AACvC,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Normalize caller `skillKey` to canonical form `skills/<id>` (no `.instructions` / `.prompt` suffix).
3
+ * Used when resolving Catalox catalog item ids and gateway invoke keys.
4
+ */
5
+ export declare function canonicalSkillKey(skillKey: string): string;
6
+ /**
7
+ * nx-content / ai-gateway treat strings with **no whitespace** as registry keys.
8
+ * Ensure Catalox-sourced template bodies are always parsed as literal template text.
9
+ */
10
+ export declare function ensureGatewayTreatsAsTemplateText(text: string): string;
11
+ //# sourceMappingURL=skill-gateway-template-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-gateway-template-utils.d.ts","sourceRoot":"","sources":["../../src/catalox/skill-gateway-template-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAS1D;AAED;;;GAGG;AACH,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMtE"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Normalize caller `skillKey` to canonical form `skills/<id>` (no `.instructions` / `.prompt` suffix).
3
+ * Used when resolving Catalox catalog item ids and gateway invoke keys.
4
+ */
5
+ export function canonicalSkillKey(skillKey) {
6
+ let s = skillKey.trim().replace(/\\/g, "/");
7
+ if (s.startsWith("./"))
8
+ s = s.slice(2);
9
+ if (s.startsWith("/"))
10
+ s = s.slice(1);
11
+ s = s.replace(/\.(instructions|prompt)(\.md)?$/i, "");
12
+ if (!s.startsWith("skills/")) {
13
+ s = `skills/${s}`;
14
+ }
15
+ return s;
16
+ }
17
+ /**
18
+ * nx-content / ai-gateway treat strings with **no whitespace** as registry keys.
19
+ * Ensure Catalox-sourced template bodies are always parsed as literal template text.
20
+ */
21
+ export function ensureGatewayTreatsAsTemplateText(text) {
22
+ if (typeof text !== "string")
23
+ return text;
24
+ const t = text.trim();
25
+ if (t.length === 0)
26
+ return text;
27
+ if (/\s/.test(t))
28
+ return text;
29
+ return `${text}\n`;
30
+ }
31
+ //# sourceMappingURL=skill-gateway-template-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-gateway-template-utils.js","sourceRoot":"","sources":["../../src/catalox/skill-gateway-template-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,QAAgB;IAC9C,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC5C,IAAI,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACvC,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACtC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,kCAAkC,EAAE,EAAE,CAAC,CAAC;IACtD,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC3B,CAAC,GAAG,UAAU,CAAC,EAAE,CAAC;IACtB,CAAC;IACD,OAAO,CAAC,CAAC;AACb,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iCAAiC,CAAC,IAAY;IAC1D,IAAI,OAAO,IAAI,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC1C,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IACtB,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAChC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IAC9B,OAAO,GAAG,IAAI,IAAI,CAAC;AACvB,CAAC"}
@@ -0,0 +1,143 @@
1
+ import type { Catalox, CataloxContext } from "@x12i/catalox";
2
+ import type { CatalogReleaseStatus } from "./ai-skills-catalog.js";
3
+ import type { SkillCatalogStatus } from "./skill-templates.js";
4
+ import { type ExtractedTemplateInputs } from "./skill-template-markdown.js";
5
+ export type { ExtractedTemplateInputs } from "./skill-template-markdown.js";
6
+ export type SkillTemplatesPresentation = {
7
+ /** Short catalog key (e.g. `professional-answer`). */
8
+ skillKey: string;
9
+ catalogItemId: string;
10
+ status: SkillCatalogStatus;
11
+ title: string;
12
+ description: string;
13
+ isLocal: boolean;
14
+ /** Always strings; empty when not stored. */
15
+ instructionsMarkdown: string;
16
+ promptMarkdown: string;
17
+ auditInstructionsMarkdown?: string;
18
+ auditPromptMarkdown?: string;
19
+ };
20
+ export type SkillTemplatePresentationPatch = {
21
+ instructionsMarkdown?: string;
22
+ promptMarkdown?: string;
23
+ auditInstructionsMarkdown?: string;
24
+ auditPromptMarkdown?: string;
25
+ };
26
+ export type UpsertSkillCatalogItemInput = {
27
+ skillKey: string;
28
+ title: string;
29
+ description: string;
30
+ isLocal: boolean;
31
+ instructionsMarkdown?: string;
32
+ promptMarkdown?: string;
33
+ auditInstructionsMarkdown?: string;
34
+ auditPromptMarkdown?: string;
35
+ catalogReleaseStatus?: CatalogReleaseStatus;
36
+ };
37
+ export type UpsertSkillCatalogItemOptions = {
38
+ /**
39
+ * When true, throws {@link CataloxSkillAlreadyExistsError} if the catalog row already exists.
40
+ */
41
+ ifNotExists?: boolean;
42
+ };
43
+ export type UpdateSkillTemplatesFromPresentationOptions = {
44
+ /**
45
+ * When set, drives `published` vs `draft` together with body completeness (see {@link computeSkillRowStatus}).
46
+ * When omitted: if the item was already `published`, it stays publishable (`published`); otherwise treated as `draft` path.
47
+ */
48
+ catalogReleaseStatus?: CatalogReleaseStatus;
49
+ };
50
+ /** Stable role ids for template bodies (matches Catalox `*Text` fields). */
51
+ export declare const SKILL_TEMPLATE_ROLES_ORDER: readonly ["instructions", "prompt", "auditInstructions", "auditPrompt"];
52
+ export type SkillTemplateRole = (typeof SKILL_TEMPLATE_ROLES_ORDER)[number];
53
+ export type SkillContentPart = {
54
+ role: SkillTemplateRole;
55
+ content: string;
56
+ };
57
+ export type ModifySkillContentResult = {
58
+ success: true;
59
+ } | {
60
+ success: false;
61
+ error: string;
62
+ };
63
+ export type CreateSubSkillOverrides = {
64
+ title?: string;
65
+ description?: string;
66
+ isLocal?: boolean;
67
+ instructionsMarkdown?: string;
68
+ promptMarkdown?: string;
69
+ auditInstructionsMarkdown?: string;
70
+ auditPromptMarkdown?: string;
71
+ catalogReleaseStatus?: CatalogReleaseStatus;
72
+ };
73
+ export type CreateSubSkillInput = {
74
+ sourceSkillKey: string;
75
+ newSkillKey: string;
76
+ overrides?: CreateSubSkillOverrides;
77
+ };
78
+ export type CreateSubSkillResult = {
79
+ success: true;
80
+ } | {
81
+ success: false;
82
+ error: string;
83
+ };
84
+ export type DeleteSubSkillResult = {
85
+ success: true;
86
+ } | {
87
+ success: false;
88
+ error: string;
89
+ };
90
+ /**
91
+ * Loads skill template bodies from Catalox and returns markdown formatted for editors / presentation.
92
+ * Requires Catalox read access for `appId` + catalog binding.
93
+ */
94
+ export declare function getSkillTemplatesForPresentation(catalox: Catalox, context: CataloxContext, skillKey: string, options?: {
95
+ includeAudit?: boolean;
96
+ }): Promise<SkillTemplatesPresentation>;
97
+ /**
98
+ * Template bodies as `{ role, content }[]` (presentation markdown). Always four entries in stable order.
99
+ */
100
+ export declare function getSkillContent(catalox: Catalox, context: CataloxContext, skillKey: string): Promise<SkillContentPart[]>;
101
+ /**
102
+ * Unique `{{token}}` names across all template bodies (same presentation strings as {@link getSkillContent}).
103
+ */
104
+ export declare function getSkillTokens(catalox: Catalox, context: CataloxContext, skillKey: string): Promise<string[]>;
105
+ /**
106
+ * Partial template update by role. Returns structured success/failure (including Catalox/not-found errors).
107
+ */
108
+ export declare function modifySkillContent(catalox: Catalox, context: CataloxContext, skillKey: string, parts: SkillContentPart[], options?: UpdateSkillTemplatesFromPresentationOptions): Promise<ModifySkillContentResult>;
109
+ /**
110
+ * Merges edited markdown into the native catalog item and upserts the full row.
111
+ * Requires Catalox **write** access (e.g. god-mode or app binding with write).
112
+ *
113
+ * @throws CataloxSkillNotFoundError when the item does not exist.
114
+ */
115
+ export declare function updateSkillTemplatesFromPresentation(catalox: Catalox, context: CataloxContext, skillKey: string, patch: SkillTemplatePresentationPatch, options?: UpdateSkillTemplatesFromPresentationOptions): Promise<void>;
116
+ /**
117
+ * Creates or updates a full skill catalog row (metadata + optional template markdown).
118
+ * Uses read–merge–write when the item exists; otherwise writes a new row.
119
+ * Requires Catalox **write** access.
120
+ *
121
+ * @throws CataloxSkillAlreadyExistsError when `options.ifNotExists` is true and the item exists.
122
+ */
123
+ export declare function upsertSkillCatalogItem(catalox: Catalox, context: CataloxContext, input: UpsertSkillCatalogItemInput, options?: UpsertSkillCatalogItemOptions): Promise<void>;
124
+ /**
125
+ * Soft-deletes a skill: clears template bodies and audit fields and sets status to `planned`.
126
+ * Requires Catalox **write** access.
127
+ *
128
+ * @throws CataloxSkillNotFoundError when the item does not exist.
129
+ */
130
+ export declare function softDeleteSkillCatalogItem(catalox: Catalox, context: CataloxContext, skillKey: string): Promise<void>;
131
+ /**
132
+ * Duplicates a catalog skill into a new key, marking it with `parentSkillKey`. Structured success/failure.
133
+ */
134
+ export declare function createSubSkill(catalox: Catalox, context: CataloxContext, input: CreateSubSkillInput): Promise<CreateSubSkillResult>;
135
+ /**
136
+ * Deletes a native catalog row only when it is a sub-skill (`parentSkillKey` set).
137
+ */
138
+ export declare function deleteSubSkill(catalox: Catalox, context: CataloxContext, subSkillKey: string): Promise<DeleteSubSkillResult>;
139
+ /**
140
+ * Returns unique `{{token}}` names from raw Catalox template strings (before presentation transforms).
141
+ */
142
+ export declare function getSkillTemplateInputs(catalox: Catalox, context: CataloxContext, skillKey: string): Promise<ExtractedTemplateInputs>;
143
+ //# sourceMappingURL=skill-template-catalog-mutations.d.ts.map