@pikku/inspector 0.11.2 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/CHANGELOG.md +36 -1
  2. package/OPTIMIZATION-PLAN.md +195 -0
  3. package/dist/add/add-ai-agent.d.ts +2 -0
  4. package/dist/add/add-ai-agent.js +314 -0
  5. package/dist/add/add-channel.js +81 -61
  6. package/dist/add/add-cli.d.ts +1 -1
  7. package/dist/add/add-cli.js +42 -19
  8. package/dist/add/add-file-extends-core-type.d.ts +1 -1
  9. package/dist/add/add-file-with-config.d.ts +1 -1
  10. package/dist/add/add-file-with-factory.d.ts +1 -1
  11. package/dist/add/add-file-with-factory.js +2 -0
  12. package/dist/add/add-functions.d.ts +1 -1
  13. package/dist/add/add-functions.js +256 -82
  14. package/dist/add/add-http-route.d.ts +20 -10
  15. package/dist/add/add-http-route.js +156 -66
  16. package/dist/add/add-http-routes.d.ts +5 -0
  17. package/dist/add/add-http-routes.js +160 -0
  18. package/dist/add/add-keyed-wiring.d.ts +12 -0
  19. package/dist/add/add-keyed-wiring.js +97 -0
  20. package/dist/add/add-mcp-prompt.d.ts +1 -1
  21. package/dist/add/add-mcp-prompt.js +14 -9
  22. package/dist/add/add-mcp-resource.d.ts +1 -1
  23. package/dist/add/add-mcp-resource.js +14 -9
  24. package/dist/add/add-middleware.d.ts +1 -4
  25. package/dist/add/add-middleware.js +364 -79
  26. package/dist/add/add-permission.d.ts +1 -1
  27. package/dist/add/add-permission.js +152 -40
  28. package/dist/add/add-queue-worker.d.ts +1 -1
  29. package/dist/add/add-queue-worker.js +18 -12
  30. package/dist/add/add-rpc-invocations.d.ts +3 -3
  31. package/dist/add/add-rpc-invocations.js +24 -10
  32. package/dist/add/add-schedule.d.ts +1 -1
  33. package/dist/add/add-schedule.js +11 -5
  34. package/dist/add/add-secret.d.ts +3 -0
  35. package/dist/add/add-secret.js +82 -0
  36. package/dist/add/add-trigger.d.ts +2 -0
  37. package/dist/add/add-trigger.js +87 -0
  38. package/dist/add/add-variable.d.ts +1 -0
  39. package/dist/add/add-variable.js +8 -0
  40. package/dist/add/add-wire-addon.d.ts +7 -0
  41. package/dist/add/add-wire-addon.js +70 -0
  42. package/dist/add/add-workflow-graph.d.ts +3 -2
  43. package/dist/add/add-workflow-graph.js +143 -406
  44. package/dist/add/add-workflow.d.ts +1 -1
  45. package/dist/add/add-workflow.js +6 -4
  46. package/dist/error-codes.d.ts +15 -1
  47. package/dist/error-codes.js +20 -1
  48. package/dist/index.d.ts +9 -8
  49. package/dist/index.js +5 -4
  50. package/dist/inspector.d.ts +2 -2
  51. package/dist/inspector.js +95 -15
  52. package/dist/schema-generator.d.ts +1 -0
  53. package/dist/schema-generator.js +1 -0
  54. package/dist/types-map.js +10 -1
  55. package/dist/types.d.ts +180 -50
  56. package/dist/utils/compute-required-schemas.d.ts +4 -0
  57. package/dist/utils/compute-required-schemas.js +40 -0
  58. package/dist/utils/contract-hashes.d.ts +52 -0
  59. package/dist/utils/contract-hashes.js +269 -0
  60. package/dist/utils/custom-types-generator.d.ts +9 -0
  61. package/dist/utils/custom-types-generator.js +71 -0
  62. package/dist/utils/detect-schema-vendor.d.ts +22 -0
  63. package/dist/utils/detect-schema-vendor.js +76 -0
  64. package/dist/utils/does-type-extend-core-type.d.ts +1 -1
  65. package/dist/utils/ensure-function-metadata.d.ts +6 -3
  66. package/dist/utils/ensure-function-metadata.js +220 -6
  67. package/dist/utils/extract-function-name.d.ts +5 -16
  68. package/dist/utils/extract-function-name.js +86 -291
  69. package/dist/utils/extract-services.d.ts +2 -1
  70. package/dist/utils/extract-services.js +25 -1
  71. package/dist/utils/filter-inspector-state.d.ts +1 -1
  72. package/dist/utils/filter-inspector-state.js +107 -23
  73. package/dist/utils/filter-utils.d.ts +2 -2
  74. package/dist/utils/get-files-and-methods.d.ts +1 -1
  75. package/dist/utils/get-property-value.d.ts +6 -1
  76. package/dist/utils/get-property-value.js +28 -3
  77. package/dist/utils/hash.d.ts +2 -0
  78. package/dist/utils/hash.js +23 -0
  79. package/dist/utils/middleware.d.ts +9 -32
  80. package/dist/utils/middleware.js +80 -66
  81. package/dist/utils/permissions.d.ts +4 -4
  82. package/dist/utils/permissions.js +10 -10
  83. package/dist/utils/post-process.d.ts +11 -11
  84. package/dist/utils/post-process.js +247 -24
  85. package/dist/utils/resolve-addon-package.d.ts +16 -0
  86. package/dist/utils/resolve-addon-package.js +34 -0
  87. package/dist/utils/resolve-function-types.d.ts +6 -0
  88. package/dist/utils/resolve-function-types.js +29 -0
  89. package/dist/utils/resolve-identifier.d.ts +10 -0
  90. package/dist/utils/resolve-identifier.js +36 -0
  91. package/dist/utils/resolve-versions.d.ts +2 -0
  92. package/dist/utils/resolve-versions.js +78 -0
  93. package/dist/utils/schema-generator.d.ts +9 -0
  94. package/dist/utils/schema-generator.js +209 -0
  95. package/dist/utils/serialize-inspector-state.d.ts +70 -23
  96. package/dist/utils/serialize-inspector-state.js +98 -22
  97. package/dist/utils/serialize-mcp-json.d.ts +2 -0
  98. package/dist/utils/serialize-mcp-json.js +99 -0
  99. package/dist/utils/serialize-middleware-groups-meta.d.ts +12 -0
  100. package/dist/utils/serialize-middleware-groups-meta.js +28 -0
  101. package/dist/utils/serialize-openapi-json.d.ts +85 -0
  102. package/dist/utils/serialize-openapi-json.js +151 -0
  103. package/dist/utils/serialize-permissions-groups-meta.d.ts +6 -0
  104. package/dist/utils/serialize-permissions-groups-meta.js +31 -0
  105. package/dist/utils/validate-auth-sessionless.d.ts +3 -0
  106. package/dist/utils/validate-auth-sessionless.js +14 -0
  107. package/dist/utils/workflow/dsl/deserialize-dsl-workflow.js +34 -102
  108. package/dist/utils/workflow/dsl/extract-dsl-workflow.d.ts +1 -1
  109. package/dist/utils/workflow/dsl/extract-dsl-workflow.js +23 -4
  110. package/dist/utils/workflow/graph/convert-dsl-to-graph.js +12 -10
  111. package/dist/utils/workflow/graph/finalize-workflow-wires.d.ts +3 -0
  112. package/dist/utils/workflow/graph/finalize-workflow-wires.js +276 -0
  113. package/dist/utils/workflow/graph/finalize-workflows.d.ts +2 -0
  114. package/dist/utils/workflow/graph/finalize-workflows.js +75 -0
  115. package/dist/utils/workflow/graph/index.d.ts +2 -0
  116. package/dist/utils/workflow/graph/index.js +2 -0
  117. package/dist/utils/workflow/graph/serialize-workflow-graph.d.ts +0 -8
  118. package/dist/utils/workflow/graph/serialize-workflow-graph.js +1 -3
  119. package/dist/utils/workflow/graph/workflow-graph.types.d.ts +53 -79
  120. package/dist/utils/workflow/graph/workflow-graph.types.js +1 -1
  121. package/dist/visit.d.ts +1 -1
  122. package/dist/visit.js +13 -6
  123. package/package.json +14 -4
  124. package/src/add/add-ai-agent.ts +468 -0
  125. package/src/add/add-channel.ts +103 -79
  126. package/src/add/add-cli.ts +68 -24
  127. package/src/add/add-file-extends-core-type.ts +1 -1
  128. package/src/add/add-file-with-config.ts +1 -1
  129. package/src/add/add-file-with-factory.ts +3 -1
  130. package/src/add/add-functions.ts +349 -103
  131. package/src/add/add-http-route.ts +263 -89
  132. package/src/add/add-http-routes.ts +229 -0
  133. package/src/add/add-keyed-wiring.ts +151 -0
  134. package/src/add/add-mcp-prompt.ts +27 -16
  135. package/src/add/add-mcp-resource.ts +28 -16
  136. package/src/add/add-middleware.ts +482 -80
  137. package/src/add/add-permission.ts +199 -40
  138. package/src/add/add-queue-worker.ts +25 -20
  139. package/src/add/add-rpc-invocations.ts +28 -11
  140. package/src/add/add-schedule.ts +17 -12
  141. package/src/add/add-secret.ts +140 -0
  142. package/src/add/add-trigger.ts +154 -0
  143. package/src/add/add-variable.ts +9 -0
  144. package/src/add/add-wire-addon.ts +80 -0
  145. package/src/add/add-workflow-graph.ts +180 -522
  146. package/src/add/add-workflow.ts +7 -6
  147. package/src/error-codes.ts +25 -1
  148. package/src/index.ts +23 -13
  149. package/src/inspector.ts +139 -19
  150. package/src/schema-generator.ts +1 -0
  151. package/src/types-map.ts +12 -1
  152. package/src/types.ts +199 -69
  153. package/src/utils/compute-required-schemas.ts +48 -0
  154. package/src/utils/contract-hashes.test.ts +553 -0
  155. package/src/utils/contract-hashes.ts +386 -0
  156. package/src/utils/custom-types-generator.ts +88 -0
  157. package/src/utils/detect-schema-vendor.ts +90 -0
  158. package/src/utils/does-type-extend-core-type.ts +1 -1
  159. package/src/utils/ensure-function-metadata.ts +325 -8
  160. package/src/utils/extract-function-name.ts +101 -351
  161. package/src/utils/extract-services.ts +35 -2
  162. package/src/utils/filter-inspector-state.test.ts +37 -25
  163. package/src/utils/filter-inspector-state.ts +146 -32
  164. package/src/utils/filter-utils.test.ts +1 -1
  165. package/src/utils/filter-utils.ts +2 -2
  166. package/src/utils/get-files-and-methods.ts +1 -1
  167. package/src/utils/get-property-value.ts +42 -4
  168. package/src/utils/hash.ts +26 -0
  169. package/src/utils/middleware.test.ts +204 -0
  170. package/src/utils/middleware.ts +131 -69
  171. package/src/utils/permissions.test.ts +35 -12
  172. package/src/utils/permissions.ts +12 -12
  173. package/src/utils/post-process.ts +306 -44
  174. package/src/utils/resolve-addon-package.ts +49 -0
  175. package/src/utils/resolve-function-types.ts +42 -0
  176. package/src/utils/resolve-identifier.ts +46 -0
  177. package/src/utils/resolve-versions.test.ts +249 -0
  178. package/src/utils/resolve-versions.ts +105 -0
  179. package/src/utils/schema-generator.ts +329 -0
  180. package/src/utils/serialize-inspector-state.ts +184 -43
  181. package/src/utils/serialize-mcp-json.ts +145 -0
  182. package/src/utils/serialize-middleware-groups-meta.ts +33 -0
  183. package/src/utils/serialize-openapi-json.ts +277 -0
  184. package/src/utils/serialize-permissions-groups-meta.ts +35 -0
  185. package/src/utils/test-data/inspector-state.json +69 -66
  186. package/src/utils/validate-auth-sessionless.ts +29 -0
  187. package/src/utils/workflow/dsl/deserialize-dsl-workflow.ts +43 -119
  188. package/src/utils/workflow/dsl/extract-dsl-workflow.ts +26 -6
  189. package/src/utils/workflow/graph/convert-dsl-to-graph.ts +17 -10
  190. package/src/utils/workflow/graph/finalize-workflow-wires.ts +310 -0
  191. package/src/utils/workflow/graph/finalize-workflows.ts +100 -0
  192. package/src/utils/workflow/graph/index.ts +5 -0
  193. package/src/utils/workflow/graph/serialize-workflow-graph.ts +1 -8
  194. package/src/utils/workflow/graph/workflow-graph.types.ts +29 -78
  195. package/src/visit.ts +19 -7
  196. package/tsconfig.tsbuildinfo +1 -1
  197. package/dist/add/add-forge-credential.d.ts +0 -8
  198. package/dist/add/add-forge-credential.js +0 -77
  199. package/dist/add/add-forge-node.d.ts +0 -7
  200. package/dist/add/add-forge-node.js +0 -77
  201. package/dist/add/add-mcp-tool.d.ts +0 -2
  202. package/dist/add/add-mcp-tool.js +0 -81
  203. package/dist/utils/extract-service-metadata.d.ts +0 -19
  204. package/dist/utils/extract-service-metadata.js +0 -244
  205. package/dist/utils/write-service-metadata.d.ts +0 -13
  206. package/dist/utils/write-service-metadata.js +0 -37
  207. package/src/add/add-forge-credential.ts +0 -119
  208. package/src/add/add-forge-node.ts +0 -132
  209. package/src/add/add-mcp-tool.ts +0 -141
  210. package/src/utils/extract-service-metadata.ts +0 -353
  211. package/src/utils/write-service-metadata.ts +0 -51
@@ -0,0 +1,100 @@
1
+ import type { FunctionsMeta } from '@pikku/core'
2
+ import { isVersionedId, formatVersionedId, parseVersionedId } from '@pikku/core'
3
+ import type { SerializedWorkflowGraph } from './workflow-graph.types.js'
4
+ import { canonicalJSON, hashString } from '../../hash.js'
5
+ import { convertDslToGraph } from './convert-dsl-to-graph.js'
6
+ import type { InspectorState } from '../../../types.js'
7
+
8
+ export function finalizeWorkflows(state: InspectorState): void {
9
+ const { workflows, functions } = state
10
+ const functionsMeta = functions.meta
11
+
12
+ for (const [name, meta] of Object.entries(workflows.meta)) {
13
+ const graph = convertDslToGraph(name, meta)
14
+ stampVersionsOnGraph(graph, functionsMeta)
15
+ computeStepHashes(graph, functionsMeta)
16
+ graph.graphHash = computeGraphHash(graph)
17
+ workflows.graphMeta[name] = graph
18
+ }
19
+
20
+ for (const graph of Object.values(workflows.graphMeta)) {
21
+ if (graph.graphHash) {
22
+ continue
23
+ }
24
+ stampVersionsOnGraph(graph, functionsMeta)
25
+ computeStepHashes(graph, functionsMeta)
26
+ graph.graphHash = computeGraphHash(graph)
27
+ }
28
+ }
29
+
30
+ function stampVersionsOnGraph(
31
+ graph: SerializedWorkflowGraph,
32
+ functionsMeta: FunctionsMeta
33
+ ): void {
34
+ for (const node of Object.values(graph.nodes)) {
35
+ if (!('rpcName' in node) || typeof node.rpcName !== 'string') {
36
+ continue
37
+ }
38
+
39
+ if (isVersionedId(node.rpcName)) {
40
+ continue
41
+ }
42
+
43
+ const meta = functionsMeta[node.rpcName]
44
+ if (meta?.version !== undefined) {
45
+ node.rpcName = formatVersionedId(node.rpcName, meta.version)
46
+ } else {
47
+ const latestVersion = findLatestVersion(node.rpcName, functionsMeta)
48
+ if (latestVersion > 0) {
49
+ node.rpcName = formatVersionedId(node.rpcName, latestVersion)
50
+ }
51
+ }
52
+ }
53
+ }
54
+
55
+ function findLatestVersion(
56
+ baseName: string,
57
+ functionsMeta: FunctionsMeta
58
+ ): number {
59
+ let max = 0
60
+ for (const id of Object.keys(functionsMeta)) {
61
+ const parsed = parseVersionedId(id)
62
+ if (parsed.baseName === baseName && parsed.version !== null) {
63
+ max = Math.max(max, parsed.version)
64
+ }
65
+ }
66
+ return max
67
+ }
68
+
69
+ function computeStepHashes(
70
+ graph: SerializedWorkflowGraph,
71
+ functionsMeta: FunctionsMeta
72
+ ): void {
73
+ for (const node of Object.values(graph.nodes)) {
74
+ if (!('rpcName' in node) || typeof node.rpcName !== 'string') {
75
+ continue
76
+ }
77
+ const rpcName: string = node.rpcName
78
+ let meta = functionsMeta[rpcName]
79
+ if (!meta) {
80
+ const { baseName } = parseVersionedId(rpcName)
81
+ meta = functionsMeta[baseName]
82
+ }
83
+ ;(node as Record<string, unknown>).stepHash = hashString(
84
+ `${node.nodeId}:${meta?.contractHash ?? ''}`,
85
+ 12
86
+ )
87
+ }
88
+ }
89
+
90
+ function computeGraphHash(graph: SerializedWorkflowGraph): string {
91
+ return hashString(
92
+ canonicalJSON({
93
+ source: graph.source,
94
+ context: graph.context,
95
+ nodes: graph.nodes,
96
+ entryNodeIds: graph.entryNodeIds,
97
+ }),
98
+ 12
99
+ )
100
+ }
@@ -4,3 +4,8 @@
4
4
  export * from './workflow-graph.types.js'
5
5
  export { serializeWorkflowGraph } from './serialize-workflow-graph.js'
6
6
  export { convertDslToGraph } from './convert-dsl-to-graph.js'
7
+ export { finalizeWorkflows } from './finalize-workflows.js'
8
+ export {
9
+ finalizeWorkflowHelperTypes,
10
+ finalizeWorkflowWires,
11
+ } from './finalize-workflow-wires.js'
@@ -82,10 +82,6 @@ function serializeNext(
82
82
  export function serializeWorkflowGraph(
83
83
  definition: {
84
84
  name: string
85
- wires: {
86
- http?: { route: string; method: string }
87
- queue?: string
88
- }
89
85
  graph: Record<
90
86
  string,
91
87
  {
@@ -163,11 +159,10 @@ export function serializeWorkflowGraph(
163
159
 
164
160
  return {
165
161
  name: definition.name,
166
- pikkuFuncName: definition.name, // For graph workflows, pikkuFuncName is the workflow name
162
+ pikkuFuncId: definition.name, // For graph workflows, pikkuFuncId is the workflow name
167
163
  source: 'graph' as const,
168
164
  description: options?.description,
169
165
  tags: options?.tags,
170
- wires: definition.wires as SerializedWorkflowGraph['wires'],
171
166
  nodes,
172
167
  entryNodeIds,
173
168
  }
@@ -179,7 +174,6 @@ export function serializeWorkflowGraph(
179
174
  */
180
175
  export function deserializeWorkflowGraph(serialized: SerializedWorkflowGraph): {
181
176
  name: string
182
- wires: SerializedWorkflowGraph['wires']
183
177
  graph: Record<
184
178
  string,
185
179
  {
@@ -216,7 +210,6 @@ export function deserializeWorkflowGraph(serialized: SerializedWorkflowGraph): {
216
210
 
217
211
  return {
218
212
  name: serialized.name,
219
- wires: serialized.wires,
220
213
  graph,
221
214
  entryNodeIds: serialized.entryNodeIds,
222
215
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Serialized types for workflow graphs
3
3
  * These are extracted by the inspector and stored as JSON
4
- * Can be created from code (wireWorkflow) or UI
4
+ * Can be created from code (pikkuWorkflowGraph) or UI
5
5
  */
6
6
 
7
7
  /**
@@ -138,6 +138,8 @@ export interface FunctionNode extends BaseNode {
138
138
  input?: Record<string, unknown | DataRef>
139
139
  /** Output variable name for storing result */
140
140
  outputVar?: string
141
+ /** Hash of nodeId + RPC input/output schemas for version detection */
142
+ stepHash?: string
141
143
  }
142
144
 
143
145
  /**
@@ -168,80 +170,6 @@ export const isFunctionNode = (
168
170
  export const isFlowNode = (node: SerializedGraphNode): node is FlowNode =>
169
171
  'flow' in node
170
172
 
171
- /**
172
- * HTTP wire configuration with startNode
173
- */
174
- export interface HttpWire {
175
- route: string
176
- method: 'get' | 'post' | 'put' | 'patch' | 'delete'
177
- startNode: string
178
- }
179
-
180
- /**
181
- * Channel wire configuration
182
- */
183
- export interface ChannelWire {
184
- name: string
185
- onConnect?: string
186
- onDisconnect?: string
187
- onMessage?: string
188
- }
189
-
190
- /**
191
- * Queue wire configuration
192
- */
193
- export interface QueueWire {
194
- name: string
195
- startNode: string
196
- }
197
-
198
- /**
199
- * CLI wire configuration
200
- */
201
- export interface CliWire {
202
- command: string
203
- startNode: string
204
- }
205
-
206
- /**
207
- * MCP wire configurations
208
- */
209
- export interface McpWires {
210
- tool?: Array<{ name: string; startNode: string }>
211
- prompt?: Array<{ name: string; startNode: string }>
212
- resource?: Array<{ uri: string; startNode: string }>
213
- }
214
-
215
- /**
216
- * Schedule wire configuration
217
- */
218
- export interface ScheduleWire {
219
- cron?: string
220
- interval?: string
221
- startNode: string
222
- }
223
-
224
- /**
225
- * Trigger wire configuration
226
- */
227
- export interface TriggerWire {
228
- name: string
229
- startNode: string
230
- }
231
-
232
- /**
233
- * All wire configurations for workflows
234
- */
235
- export interface WorkflowWiresConfig {
236
- http?: HttpWire[]
237
- channel?: ChannelWire[]
238
- queue?: QueueWire[]
239
- cli?: CliWire[]
240
- mcp?: McpWires
241
- schedule?: ScheduleWire[]
242
- trigger?: TriggerWire[]
243
- }
244
-
245
173
  /**
246
174
  * Workflow source type
247
175
  * - 'dsl': Pure DSL workflow (pikkuWorkflowFunc) - can be round-tripped to code
@@ -257,7 +185,7 @@ export interface SerializedWorkflowGraph {
257
185
  /** Workflow name */
258
186
  name: string
259
187
  /** Pikku function name (for runtime registration) */
260
- pikkuFuncName: string
188
+ pikkuFuncId: string
261
189
  /** Source type: 'dsl' for pikkuWorkflowFunc, 'graph' for pikkuWorkflowGraph */
262
190
  source: WorkflowSourceType
263
191
  /** Optional description */
@@ -266,12 +194,35 @@ export interface SerializedWorkflowGraph {
266
194
  tags?: string[]
267
195
  /** Workflow context/state variables (from Zod schema) */
268
196
  context?: WorkflowContext
269
- /** Wires - how the workflow is triggered */
270
- wires: WorkflowWiresConfig
271
197
  /** Serialized nodes */
272
198
  nodes: Record<string, SerializedGraphNode>
273
199
  /** Entry node(s) - first nodes to execute */
274
200
  entryNodeIds: string[]
201
+ /** Hash of graph topology (nodes, edges, input mappings) */
202
+ graphHash?: string
203
+ /** Wire entry points (HTTP, channel, queue, etc.) that trigger this workflow */
204
+ wires?: WorkflowWires
205
+ }
206
+
207
+ export interface WorkflowWires {
208
+ http?: Array<{ route: string; method: string; startNode: string }>
209
+ channel?: Array<{
210
+ name: string
211
+ route: string
212
+ onConnect?: string
213
+ onMessage?: string
214
+ onDisconnect?: string
215
+ onMessageRoute?: Record<string, string>
216
+ }>
217
+ queue?: Array<{ name: string; startNode: string }>
218
+ cli?: Array<{ command: string; startNode: string }>
219
+ mcp?: {
220
+ tool?: Array<{ name: string; startNode: string }>
221
+ prompt?: Array<{ name: string; startNode: string }>
222
+ resource?: Array<{ uri: string; startNode: string }>
223
+ }
224
+ schedule?: Array<{ cron: string; startNode: string }>
225
+ trigger?: Array<{ name: string; startNode: string }>
275
226
  }
276
227
 
277
228
  /**
package/src/visit.ts CHANGED
@@ -2,22 +2,29 @@ import * as ts from 'typescript'
2
2
  import { addFileWithFactory } from './add/add-file-with-factory.js'
3
3
  import { addFileExtendsCoreType } from './add/add-file-extends-core-type.js'
4
4
  import { addHTTPRoute } from './add/add-http-route.js'
5
+ import { addHTTPRoutes } from './add/add-http-routes.js'
5
6
  import { addSchedule } from './add/add-schedule.js'
7
+ import { addTrigger } from './add/add-trigger.js'
6
8
  import { addQueueWorker } from './add/add-queue-worker.js'
7
9
  import { addWorkflow } from './add/add-workflow.js'
8
10
  import { addMCPResource } from './add/add-mcp-resource.js'
9
- import { addMCPTool } from './add/add-mcp-tool.js'
10
11
  import { addMCPPrompt } from './add/add-mcp-prompt.js'
11
- import { InspectorState, InspectorLogger, InspectorOptions } from './types.js'
12
+ import type {
13
+ InspectorState,
14
+ InspectorLogger,
15
+ InspectorOptions,
16
+ } from './types.js'
12
17
  import { addFunctions } from './add/add-functions.js'
13
18
  import { addChannel } from './add/add-channel.js'
14
19
  import { addRPCInvocations } from './add/add-rpc-invocations.js'
20
+ import { addWireAddon } from './add/add-wire-addon.js'
15
21
  import { addMiddleware } from './add/add-middleware.js'
16
22
  import { addPermission } from './add/add-permission.js'
17
23
  import { addCLI, addCLIRenderers } from './add/add-cli.js'
18
- import { addForgeNode } from './add/add-forge-node.js'
19
- import { addForgeCredential } from './add/add-forge-credential.js'
24
+ import { addSecret, addOAuth2Credential } from './add/add-secret.js'
25
+ import { addVariable } from './add/add-variable.js'
20
26
  import { addWorkflowGraph } from './add/add-workflow-graph.js'
27
+ import { addAIAgent } from './add/add-ai-agent.js'
21
28
 
22
29
  export const visitSetup = (
23
30
  logger: InspectorLogger,
@@ -76,6 +83,7 @@ export const visitSetup = (
76
83
  addFileWithFactory(node, checker, state.configFactories, 'CreateConfig')
77
84
 
78
85
  addRPCInvocations(node, state, logger)
86
+ addWireAddon(node, state, logger)
79
87
  addMiddleware(logger, node, checker, state, options)
80
88
  addPermission(logger, node, checker, state, options)
81
89
  addWorkflow(logger, node, checker, state, options)
@@ -93,18 +101,22 @@ export const visitRoutes = (
93
101
  options: InspectorOptions
94
102
  ) => {
95
103
  addFunctions(logger, node, checker, state, options)
104
+ addSecret(logger, node, checker, state, options)
105
+ addOAuth2Credential(logger, node, checker, state, options)
106
+ addVariable(logger, node, checker, state, options)
107
+
96
108
  addHTTPRoute(logger, node, checker, state, options)
109
+ addHTTPRoutes(logger, node, checker, state, options)
97
110
  addSchedule(logger, node, checker, state, options)
111
+ addTrigger(logger, node, checker, state, options)
98
112
  addQueueWorker(logger, node, checker, state, options)
99
113
  addChannel(logger, node, checker, state, options)
100
114
  addCLI(logger, node, checker, state, options)
101
115
  addCLIRenderers(logger, node, checker, state, options)
102
116
  addMCPResource(logger, node, checker, state, options)
103
- addMCPTool(logger, node, checker, state, options)
104
117
  addMCPPrompt(logger, node, checker, state, options)
105
- addForgeNode(logger, node, checker, state, options)
106
- addForgeCredential(logger, node, checker, state, options)
107
118
  addWorkflowGraph(logger, node, checker, state, options)
119
+ addAIAgent(logger, node, checker, state, options)
108
120
 
109
121
  ts.forEachChild(node, (child) =>
110
122
  visitRoutes(logger, checker, child, state, options)