@pikku/cli 0.12.15 → 0.12.16

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 (160) hide show
  1. package/cli.schema.json +1 -1
  2. package/console-app/assets/index-CzMWJFqj.js +700 -0
  3. package/console-app/index.html +1 -1
  4. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +1 -1
  5. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
  6. package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
  7. package/dist/.pikku/cli/pikku-cli-channel.js +16 -1
  8. package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
  9. package/dist/.pikku/cli/pikku-cli-client.gen.js +1 -1
  10. package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +1 -1
  11. package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
  12. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +1 -1
  13. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +68 -5
  14. package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
  15. package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
  16. package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
  17. package/dist/.pikku/cli/pikku-cli.gen.js +1 -1
  18. package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
  19. package/dist/.pikku/function/pikku-function-types.gen.d.ts +16 -19
  20. package/dist/.pikku/function/pikku-function-types.gen.js +15 -19
  21. package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
  22. package/dist/.pikku/function/pikku-functions-meta.gen.json +190 -107
  23. package/dist/.pikku/function/pikku-functions.gen.js +6 -2
  24. package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
  25. package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
  26. package/dist/.pikku/http/pikku-http-wirings-meta.gen.js +1 -1
  27. package/dist/.pikku/http/pikku-http-wirings-meta.gen.json +18 -1
  28. package/dist/.pikku/http/pikku-http-wirings.gen.d.ts +2 -2
  29. package/dist/.pikku/http/pikku-http-wirings.gen.js +3 -3
  30. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
  31. package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
  32. package/dist/.pikku/pikku-bootstrap.gen.d.ts +3 -10
  33. package/dist/.pikku/pikku-bootstrap.gen.js +1 -18
  34. package/dist/.pikku/pikku-meta-service.gen.d.ts +7 -0
  35. package/dist/.pikku/pikku-meta-service.gen.js +9 -0
  36. package/dist/.pikku/pikku-services.gen.d.ts +2 -1
  37. package/dist/.pikku/pikku-services.gen.js +1 -0
  38. package/dist/.pikku/pikku-types.gen.d.ts +1 -1
  39. package/dist/.pikku/pikku-types.gen.js +1 -1
  40. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
  41. package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
  42. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
  43. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +5 -1
  44. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
  45. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
  46. package/dist/.pikku/schemas/register.gen.js +15 -7
  47. package/dist/.pikku/schemas/schemas/DeployApplyInput.schema.json +1 -0
  48. package/dist/.pikku/schemas/schemas/DeployPlanInput.schema.json +1 -0
  49. package/dist/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
  50. package/dist/.pikku/schemas/schemas/PikkuNewAddonInput.schema.json +1 -1
  51. package/dist/.pikku/schemas/schemas/PikkuWorkflowRoutesOutput.schema.json +1 -0
  52. package/dist/.pikku/schemas/schemas/RemoteRPCHandlerInput.schema.json +1 -0
  53. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
  54. package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
  55. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
  56. package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
  57. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
  58. package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
  59. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
  60. package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
  61. package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
  62. package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
  63. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +3 -24
  64. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -14
  65. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
  66. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +1 -1
  67. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
  68. package/dist/src/cli.wiring.js +63 -4
  69. package/dist/src/deploy/analyzer/analyzer.d.ts +16 -0
  70. package/dist/src/deploy/analyzer/analyzer.js +557 -0
  71. package/dist/src/deploy/analyzer/index.d.ts +3 -0
  72. package/dist/src/deploy/analyzer/index.js +1 -0
  73. package/dist/src/deploy/analyzer/manifest.d.ts +112 -0
  74. package/dist/src/deploy/analyzer/manifest.js +8 -0
  75. package/dist/src/deploy/build-pipeline.d.ts +39 -0
  76. package/dist/src/deploy/build-pipeline.js +209 -0
  77. package/dist/src/deploy/bundler/bundler.d.ts +30 -0
  78. package/dist/src/deploy/bundler/bundler.js +196 -0
  79. package/dist/src/deploy/bundler/dep-extractor.d.ts +35 -0
  80. package/dist/src/deploy/bundler/dep-extractor.js +213 -0
  81. package/dist/src/deploy/bundler/index.d.ts +3 -0
  82. package/dist/src/deploy/bundler/index.js +2 -0
  83. package/dist/src/deploy/bundler/types.d.ts +21 -0
  84. package/dist/src/deploy/bundler/types.js +5 -0
  85. package/dist/src/deploy/codegen/index.d.ts +2 -0
  86. package/dist/src/deploy/codegen/index.js +1 -0
  87. package/dist/src/deploy/codegen/per-unit-codegen.d.ts +44 -0
  88. package/dist/src/deploy/codegen/per-unit-codegen.js +216 -0
  89. package/dist/src/deploy/plan/executor.d.ts +9 -0
  90. package/dist/src/deploy/plan/executor.js +49 -0
  91. package/dist/src/deploy/plan/formatter.d.ts +4 -0
  92. package/dist/src/deploy/plan/formatter.js +114 -0
  93. package/dist/src/deploy/plan/index.d.ts +5 -0
  94. package/dist/src/deploy/plan/index.js +3 -0
  95. package/dist/src/deploy/plan/planner.d.ts +4 -0
  96. package/dist/src/deploy/plan/planner.js +220 -0
  97. package/dist/src/deploy/plan/provider.d.ts +30 -0
  98. package/dist/src/deploy/plan/provider.js +1 -0
  99. package/dist/src/deploy/plan/types.d.ts +29 -0
  100. package/dist/src/deploy/plan/types.js +1 -0
  101. package/dist/src/deploy/provider-adapter.d.ts +111 -0
  102. package/dist/src/deploy/provider-adapter.js +10 -0
  103. package/dist/src/functions/commands/all.js +6 -2
  104. package/dist/src/functions/commands/deploy-apply.d.ts +22 -0
  105. package/dist/src/functions/commands/deploy-apply.js +206 -0
  106. package/dist/src/functions/commands/deploy-info.d.ts +1 -0
  107. package/dist/src/functions/commands/deploy-info.js +122 -0
  108. package/dist/src/functions/commands/deploy-plan.d.ts +10 -0
  109. package/dist/src/functions/commands/deploy-plan.js +96 -0
  110. package/dist/src/functions/commands/enable.js +1 -1
  111. package/dist/src/functions/commands/new-addon.d.ts +3 -0
  112. package/dist/src/functions/commands/new-addon.js +68 -2
  113. package/dist/src/functions/commands/pikku-command-bootstrap.js +30 -20
  114. package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.js +7 -3
  115. package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent.js +7 -5
  116. package/dist/src/functions/wirings/channels/pikku-channels.js +3 -0
  117. package/dist/src/functions/wirings/channels/pikku-command-channels.js +3 -0
  118. package/dist/src/functions/wirings/cli/pikku-command-cli.js +3 -0
  119. package/dist/src/functions/wirings/cli/serialize-channel-cli.js +2 -2
  120. package/dist/src/functions/wirings/console/serialize-console-functions.js +2 -2
  121. package/dist/src/functions/wirings/functions/pikku-command-services.d.ts +1 -1
  122. package/dist/src/functions/wirings/functions/pikku-command-services.js +9 -2
  123. package/dist/src/functions/wirings/functions/serialize-function-imports.js +5 -3
  124. package/dist/src/functions/wirings/functions/serialize-function-types.js +17 -19
  125. package/dist/src/functions/wirings/http/pikku-command-http-routes.js +3 -0
  126. package/dist/src/functions/wirings/http/pikku-http-routes.js +3 -0
  127. package/dist/src/functions/wirings/mcp/pikku-command-mcp.js +6 -0
  128. package/dist/src/functions/wirings/package/pikku-command-package.js +1 -1
  129. package/dist/src/functions/wirings/package/serialize-package.d.ts +1 -1
  130. package/dist/src/functions/wirings/package/serialize-package.js +5 -2
  131. package/dist/src/functions/wirings/queue/pikku-command-queue.js +4 -0
  132. package/dist/src/functions/wirings/queue/pikku-queue.js +4 -0
  133. package/dist/src/functions/wirings/queue/serialize-queue-map.js +4 -1
  134. package/dist/src/functions/wirings/rpc/pikku-command-rpc.js +10 -3
  135. package/dist/src/functions/wirings/rpc/serialize-public-rpc.js +5 -27
  136. package/dist/src/functions/wirings/rpc/serialize-remote-rpc.js +11 -14
  137. package/dist/src/functions/wirings/rpc/serialize-rpc-wrapper.js +28 -3
  138. package/dist/src/functions/wirings/rpc/serialize-typed-rpc-map.js +15 -5
  139. package/dist/src/functions/wirings/scheduler/pikku-command-scheduler.js +4 -0
  140. package/dist/src/functions/wirings/workflow/pikku-command-workflow-routes.d.ts +1 -0
  141. package/dist/src/functions/wirings/workflow/pikku-command-workflow-routes.js +21 -0
  142. package/dist/src/functions/wirings/workflow/pikku-command-workflow.js +10 -9
  143. package/dist/src/functions/wirings/workflow/serialize-workflow-map.d.ts +6 -1
  144. package/dist/src/functions/wirings/workflow/serialize-workflow-map.js +42 -5
  145. package/dist/src/functions/wirings/workflow/serialize-workflow-registration.d.ts +1 -1
  146. package/dist/src/functions/wirings/workflow/serialize-workflow-registration.js +3 -2
  147. package/dist/src/functions/wirings/workflow/serialize-workflow-routes.d.ts +4 -0
  148. package/dist/src/functions/wirings/workflow/serialize-workflow-routes.js +139 -0
  149. package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +4 -51
  150. package/dist/src/scaffold/rpc-remote.gen.d.ts +10 -0
  151. package/dist/src/scaffold/rpc-remote.gen.js +22 -0
  152. package/dist/src/services.js +12 -7
  153. package/dist/src/utils/pikku-cli-config.d.ts +1 -1
  154. package/dist/src/utils/pikku-cli-config.js +30 -28
  155. package/dist/src/utils/strip-verbose-meta.js +2 -0
  156. package/dist/tsconfig.tsbuildinfo +1 -1
  157. package/package.json +8 -4
  158. package/console-app/assets/index-robZPL3O.js +0 -672
  159. package/dist/src/functions/wirings/workflow/serialize-workflow-workers.d.ts +0 -4
  160. package/dist/src/functions/wirings/workflow/serialize-workflow-workers.js +0 -47
@@ -24,7 +24,7 @@
24
24
  }
25
25
  } catch (e) {}
26
26
  </script>
27
- <script type="module" crossorigin src="/assets/index-robZPL3O.js"></script>
27
+ <script type="module" crossorigin src="/assets/index-CzMWJFqj.js"></script>
28
28
  <link rel="stylesheet" crossorigin href="/assets/index-DvrDbftC.css">
29
29
  </head>
30
30
  <body>
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.15
2
+ * This file was generated by @pikku/cli@0.12.16
3
3
  */
4
4
  import { CoreAIAgent, PikkuAIMiddlewareHooks } from '@pikku/core/ai-agent';
5
5
  import type { PikkuPermission, PikkuMiddleware, Services, PikkuFunctionConfig } from '../function/pikku-function-types.gen.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.15
2
+ * This file was generated by @pikku/cli@0.12.16
3
3
  */
4
4
  /**
5
5
  * Channel-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.15
2
+ * This file was generated by @pikku/cli@0.12.16
3
3
  */
4
4
  /**
5
5
  * Channel-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.15
2
+ * This file was generated by @pikku/cli@0.12.16
3
3
  */
4
4
  /**
5
5
  * WebSocket channel backend for 'pikku' CLI commands
@@ -32,6 +32,9 @@ import { pikkuNewAddon } from '../../src/functions/commands/new-addon.js';
32
32
  import { pikkuVersionsInit } from '../../src/functions/commands/versions-init.js';
33
33
  import { pikkuVersionsCheck } from '../../src/functions/commands/versions-check.js';
34
34
  import { pikkuVersionsUpdate } from '../../src/functions/commands/versions-update.js';
35
+ import { deployPlan } from '../../src/functions/commands/deploy-plan.js';
36
+ import { deployApply } from '../../src/functions/commands/deploy-apply.js';
37
+ import { deployInfo } from '../../src/functions/commands/deploy-info.js';
35
38
  import { pikkuInfoFunctions } from '../../src/functions/commands/info.js';
36
39
  import { pikkuInfoTags } from '../../src/functions/commands/info.js';
37
40
  import { pikkuInfoMiddleware } from '../../src/functions/commands/info.js';
@@ -184,6 +187,18 @@ wireChannel({
184
187
  func: pikkuVersionsUpdate,
185
188
  middleware: [cliCloseOnComplete],
186
189
  },
190
+ 'deploy.plan': {
191
+ func: deployPlan,
192
+ middleware: [cliCloseOnComplete],
193
+ },
194
+ 'deploy.apply': {
195
+ func: deployApply,
196
+ middleware: [cliCloseOnComplete],
197
+ },
198
+ 'deploy.info': {
199
+ func: deployInfo,
200
+ middleware: [cliCloseOnComplete],
201
+ },
187
202
  'info': {
188
203
  func: pikkuInfoFunctions,
189
204
  middleware: [cliCloseOnComplete],
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.15
2
+ * This file was generated by @pikku/cli@0.12.16
3
3
  */
4
4
  import '../pikku-bootstrap.gen.js';
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.15
2
+ * This file was generated by @pikku/cli@0.12.16
3
3
  */
4
4
  import { executeCLIViaChannel } from '@pikku/core/cli/channel';
5
5
  import { CorePikkuWebsocket } from '@pikku/websocket';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.15
2
+ * This file was generated by @pikku/cli@0.12.16
3
3
  */
4
4
  /**
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.15
2
+ * This file was generated by @pikku/cli@0.12.16
3
3
  */
4
4
  /**
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.15
2
+ * This file was generated by @pikku/cli@0.12.16
3
3
  */
4
4
  import { pikkuState } from '@pikku/core/internal';
5
5
  import metaData from './pikku-cli-wirings-meta.gen.json' with { type: 'json' };
@@ -122,7 +122,7 @@
122
122
  "pikkuFuncId": "enableRpc",
123
123
  "positionals": [],
124
124
  "options": {
125
- "no-auth": {
125
+ "noAuth": {
126
126
  "description": "Disable auth requirement",
127
127
  "default": false
128
128
  }
@@ -133,7 +133,7 @@
133
133
  "pikkuFuncId": "enableConsole",
134
134
  "positionals": [],
135
135
  "options": {
136
- "no-auth": {
136
+ "noAuth": {
137
137
  "description": "Disable auth requirement",
138
138
  "default": false
139
139
  }
@@ -144,7 +144,7 @@
144
144
  "pikkuFuncId": "enableAgent",
145
145
  "positionals": [],
146
146
  "options": {
147
- "no-auth": {
147
+ "noAuth": {
148
148
  "description": "Disable auth requirement",
149
149
  "default": false
150
150
  }
@@ -155,7 +155,7 @@
155
155
  "pikkuFuncId": "enableWorkflow",
156
156
  "positionals": [],
157
157
  "options": {
158
- "no-auth": {
158
+ "noAuth": {
159
159
  "description": "Disable auth requirement",
160
160
  "default": false
161
161
  }
@@ -290,6 +290,10 @@
290
290
  "mcp": {
291
291
  "description": "Add mcp: true to generated functions (expose as MCP tools)",
292
292
  "default": false
293
+ },
294
+ "camelCase": {
295
+ "description": "Convert snake_case property names to camelCase in generated Zod schemas",
296
+ "default": false
293
297
  }
294
298
  },
295
299
  "description": "Scaffold a new addon package",
@@ -327,6 +331,60 @@
327
331
  }
328
332
  }
329
333
  },
334
+ "deploy": {
335
+ "pikkuFuncId": "",
336
+ "positionals": [],
337
+ "options": {},
338
+ "description": "Deploy Pikku project to cloud infrastructure",
339
+ "subcommands": {
340
+ "plan": {
341
+ "pikkuFuncId": "deployPlan",
342
+ "positionals": [],
343
+ "options": {
344
+ "provider": {
345
+ "description": "Deployment provider (cloudflare, aws)",
346
+ "default": "cloudflare",
347
+ "short": "p"
348
+ },
349
+ "resultFile": {
350
+ "description": "Write structured JSON plan result to this file path"
351
+ }
352
+ },
353
+ "description": "Show deployment plan (what will be created, updated, deleted)"
354
+ },
355
+ "apply": {
356
+ "pikkuFuncId": "deployApply",
357
+ "positionals": [],
358
+ "options": {
359
+ "provider": {
360
+ "description": "Deployment provider (cloudflare, aws)",
361
+ "default": "cloudflare",
362
+ "short": "p"
363
+ },
364
+ "fromPlan": {
365
+ "description": "Skip build pipeline, deploy from existing plan output",
366
+ "default": false
367
+ },
368
+ "resultFile": {
369
+ "description": "Write structured JSON deploy result to this file path"
370
+ }
371
+ },
372
+ "description": "Execute the deployment plan"
373
+ },
374
+ "info": {
375
+ "pikkuFuncId": "deployInfo",
376
+ "positionals": [],
377
+ "options": {
378
+ "provider": {
379
+ "description": "Deployment provider (cloudflare, aws)",
380
+ "default": "cloudflare",
381
+ "short": "p"
382
+ }
383
+ },
384
+ "description": "Show project deployment info (workers, queues, crons, secrets)"
385
+ }
386
+ }
387
+ },
330
388
  "info": {
331
389
  "pikkuFuncId": "pikkuInfoFunctions",
332
390
  "positionals": [],
@@ -436,6 +494,10 @@
436
494
  },
437
495
  "stateInput": {
438
496
  "description": "Load inspector state from JSON file (skips inspection)"
497
+ },
498
+ "outDir": {
499
+ "description": "Override output directory (default: from pikku.config.json)",
500
+ "short": "o"
439
501
  }
440
502
  }
441
503
  }
@@ -464,7 +526,8 @@
464
526
  "aiRunState",
465
527
  "agentRunService",
466
528
  "workflowRunService",
467
- "credentialService"
529
+ "credentialService",
530
+ "metaService"
468
531
  ]
469
532
  },
470
533
  "filePath": "/home/runner/work/pikku/pikku/packages/cli/src/services.ts"
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.15
2
+ * This file was generated by @pikku/cli@0.12.16
3
3
  */
4
4
  import '../../src/cli.wiring.js';
5
5
  import '../../src/services.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.15
2
+ * This file was generated by @pikku/cli@0.12.16
3
3
  */
4
4
  /* The files with an wireCLI function call */
5
5
  import '../../src/cli.wiring.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.15
2
+ * This file was generated by @pikku/cli@0.12.16
3
3
  */
4
4
  import '../pikku-bootstrap.gen.js';
5
5
  export declare function PikkuCLI(args: string[]): Promise<void>;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.15
2
+ * This file was generated by @pikku/cli@0.12.16
3
3
  */
4
4
  import { executeCLI, CLIError } from '@pikku/core/cli';
5
5
  import { createConfig as createConfig } from '../../src/services.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.15
2
+ * This file was generated by @pikku/cli@0.12.16
3
3
  */
4
4
  import type { FlattenedRPCMap } from '../rpc/pikku-rpc-wirings-map.internal.gen.js';
5
5
  export type NodeCategory = never;
@@ -1,10 +1,11 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.15
2
+ * This file was generated by @pikku/cli@0.12.16
3
3
  */
4
4
  /**
5
5
  * Core function, middleware, and permission types for all wirings
6
6
  */
7
- import { CorePikkuFunctionConfig, CorePikkuAuth, CorePikkuAuthConfig, CorePikkuPermission, CorePikkuMiddleware, CorePermissionGroup, PikkuWire, PickRequired } from '@pikku/core';
7
+ import type { CorePikkuMiddleware, CorePermissionGroup, PikkuWire, PickRequired } from '@pikku/core';
8
+ import type { CorePikkuFunctionConfig, CorePikkuAuth, CorePikkuAuthConfig, CorePikkuPermission } from '@pikku/core/function';
8
9
  import { CreateWireServices } from '@pikku/core/internal';
9
10
  import { PikkuError } from '@pikku/core/errors';
10
11
  import type { NodeType } from '@pikku/core/node';
@@ -377,27 +378,23 @@ export declare function pikkuSessionlessFunc<In, Out = unknown>(func: PikkuFunct
377
378
  */
378
379
  export declare const pikkuVoidFunc: (func: PikkuFunctionSessionless<void, void, "session" | "rpc"> | PikkuFunctionConfig<void, void, "session" | "rpc">) => PikkuFunctionConfig<void, void, "session" | "rpc", PikkuFunctionSessionless<void, void, "session" | "rpc", Services> | PikkuFunction<void, void, "session" | "rpc", Services>, undefined, undefined>;
379
380
  /**
380
- * Creates a wrapper function for addon package functions that are exposed via RPC.
381
- * This allows you to wire addon functions to any wiring type (HTTP, queue, etc.)
382
- * without type compatibility issues.
381
+ * References a registered function by name for use in any wiring.
382
+ * Works for both local and addon functions resolves via RPC at runtime.
383
383
  *
384
- * @template Name - The RPC method name (must be a key in FlattenedRPCMap)
385
- * @param rpcName - The name of the RPC method to invoke
386
- * @returns A Pikku function that proxies calls to the addon RPC method
384
+ * @template Name - The function name (must be a key in FlattenedRPCMap)
385
+ * @param rpcName - The name of the function to reference
386
+ * @returns A Pikku function config that proxies calls via RPC
387
387
  *
388
388
  * @example
389
389
  * ```typescript
390
- * // Wire an addon function via HTTP
391
- * wireHTTP({
392
- * auth: false,
393
- * method: 'get',
394
- * route: '/addon/hello',
395
- * func: addon('ext:hello'),
396
- * tags: ['addon'],
397
- * })
390
+ * // Use in agent tools
391
+ * tools: [ref('todos:listTodos'), ref('myLocalFunc')]
392
+ *
393
+ * // Use in HTTP wiring
394
+ * wireHTTP({ route: '/greet', method: 'post', func: ref('greet') })
398
395
  * ```
399
396
  */
400
- export declare const addon: <Name extends keyof FlattenedRPCMap>(rpcName: Name) => PikkuFunctionConfig<FlattenedRPCMap[Name]["input"], FlattenedRPCMap[Name]["output"], "session" | "rpc">;
397
+ export declare const ref: <Name extends keyof FlattenedRPCMap>(rpcName: Name) => PikkuFunctionConfig<FlattenedRPCMap[Name]["input"], FlattenedRPCMap[Name]["output"], "session" | "rpc">;
401
398
  /**
402
399
  * Creates a Pikku config factory.
403
400
  * Use this to define your application's configuration factory.
@@ -501,5 +498,5 @@ export declare const addMiddleware: (tag: string, middleware: PikkuMiddleware[])
501
498
  * ```
502
499
  */
503
500
  export declare const addPermission: <In = unknown>(tag: string, permissions: CorePermissionGroup<PikkuPermission<In>> | PikkuPermission<In>[]) => void;
504
- export { wireAddon } from '@pikku/core';
505
- export type { WireAddonConfig } from '@pikku/core';
501
+ export { wireAddon } from '@pikku/core/rpc';
502
+ export type { WireAddonConfig } from '@pikku/core/rpc';
@@ -1,12 +1,12 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.15
2
+ * This file was generated by @pikku/cli@0.12.16
3
3
  */
4
4
  /**
5
5
  * Core function, middleware, and permission types for all wirings
6
6
  */
7
- import { addMiddleware as addMiddlewareCore, addPermission as addPermissionCore } from '@pikku/core';
7
+ import { pikkuAuth as pikkuAuthCore } from '@pikku/core/function';
8
+ import { addMiddleware as addMiddlewareCore, addPermission as addPermissionCore } from '@pikku/core/middleware';
8
9
  import { pikkuState as __pikkuState } from '@pikku/core/internal';
9
- import { pikkuAuth as pikkuAuthCore } from '@pikku/core';
10
10
  /**
11
11
  * Factory function for creating permissions with tree-shaking support.
12
12
  * Supports both direct function and configuration object syntax.
@@ -166,27 +166,23 @@ export const pikkuVoidFunc = (func) => {
166
166
  return typeof func === 'function' ? { func } : func;
167
167
  };
168
168
  /**
169
- * Creates a wrapper function for addon package functions that are exposed via RPC.
170
- * This allows you to wire addon functions to any wiring type (HTTP, queue, etc.)
171
- * without type compatibility issues.
169
+ * References a registered function by name for use in any wiring.
170
+ * Works for both local and addon functions resolves via RPC at runtime.
172
171
  *
173
- * @template Name - The RPC method name (must be a key in FlattenedRPCMap)
174
- * @param rpcName - The name of the RPC method to invoke
175
- * @returns A Pikku function that proxies calls to the addon RPC method
172
+ * @template Name - The function name (must be a key in FlattenedRPCMap)
173
+ * @param rpcName - The name of the function to reference
174
+ * @returns A Pikku function config that proxies calls via RPC
176
175
  *
177
176
  * @example
178
177
  * ```typescript
179
- * // Wire an addon function via HTTP
180
- * wireHTTP({
181
- * auth: false,
182
- * method: 'get',
183
- * route: '/addon/hello',
184
- * func: addon('ext:hello'),
185
- * tags: ['addon'],
186
- * })
178
+ * // Use in agent tools
179
+ * tools: [ref('todos:listTodos'), ref('myLocalFunc')]
180
+ *
181
+ * // Use in HTTP wiring
182
+ * wireHTTP({ route: '/greet', method: 'post', func: ref('greet') })
187
183
  * ```
188
184
  */
189
- export const addon = (rpcName) => {
185
+ export const ref = (rpcName) => {
190
186
  return {
191
187
  func: async (_services, data, { rpc }) => {
192
188
  return rpc.invoke(rpcName, data);
@@ -310,4 +306,4 @@ export const addMiddleware = (tag, middleware) => {
310
306
  export const addPermission = (tag, permissions) => {
311
307
  addPermissionCore(tag, permissions, null);
312
308
  };
313
- export { wireAddon } from '@pikku/core';
309
+ export { wireAddon } from '@pikku/core/rpc';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.15
2
+ * This file was generated by @pikku/cli@0.12.16
3
3
  */
4
4
  import { pikkuState } from '@pikku/core/internal';
5
5
  import metaData from './pikku-functions-meta.gen.json' with { type: 'json' };