@pikku/addon-meta-conversions 0.1.2 → 0.1.3

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 (218) hide show
  1. package/.pikku/addon/pikku-addon-types.gen.ts +1 -1
  2. package/.pikku/addon/pikku-package.gen.ts +1 -1
  3. package/.pikku/agent/pikku-agent-map.gen.d.ts +1 -1
  4. package/.pikku/agent/pikku-agent-types.gen.ts +4 -2
  5. package/.pikku/channel/pikku-channel-types.gen.ts +1 -1
  6. package/.pikku/console/pikku-addon-meta.gen.json +4 -1
  7. package/.pikku/console/pikku-node-types.gen.ts +1 -1
  8. package/.pikku/function/pikku-function-types.gen.ts +117 -74
  9. package/.pikku/function/pikku-functions-meta-verbose.gen.json +2 -0
  10. package/.pikku/function/pikku-functions-meta.gen.json +7 -1
  11. package/.pikku/function/pikku-functions-meta.gen.ts +1 -1
  12. package/.pikku/function/pikku-functions.gen.ts +1 -1
  13. package/.pikku/http/pikku-http-types.gen.ts +3 -31
  14. package/.pikku/mcp/pikku-mcp-types.gen.ts +1 -1
  15. package/.pikku/pikku-bootstrap-scenarios.gen.ts +9 -0
  16. package/.pikku/pikku-bootstrap.gen.ts +1 -1
  17. package/.pikku/pikku-meta-service.gen.ts +1 -1
  18. package/.pikku/pikku-services.gen.ts +6 -1
  19. package/.pikku/pikku-types.gen.ts +4 -1
  20. package/.pikku/queue/pikku-queue-types.gen.ts +1 -1
  21. package/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +2 -1
  22. package/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +2 -1
  23. package/.pikku/rpc/pikku-rpc-wirings-map.remote.gen.d.ts +135 -0
  24. package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +1 -1
  25. package/.pikku/scenarios/features.gen.json +1 -0
  26. package/.pikku/scenarios/pikku-scenario-functions-meta.gen.json +1 -0
  27. package/.pikku/scenarios/pikku-scenario-functions-meta.gen.ts +12 -0
  28. package/.pikku/scenarios/pikku-scenario-functions.gen.ts +4 -0
  29. package/.pikku/scenarios/pikku-scenario-wirings-meta.gen.ts +15 -0
  30. package/.pikku/scenarios/pikku-scenario-wirings.gen.ts +4 -0
  31. package/.pikku/scenarios/schemas/register.gen.ts +4 -0
  32. package/.pikku/scheduler/pikku-scheduler-types.gen.ts +1 -1
  33. package/.pikku/schemas/register.gen.ts +1 -1
  34. package/.pikku/scopes/pikku-personas-meta.gen.json +1 -0
  35. package/.pikku/scopes/pikku-personas.gen.ts +52 -0
  36. package/.pikku/scopes/pikku-roles-meta.gen.json +1 -0
  37. package/.pikku/scopes/pikku-roles.gen.ts +41 -0
  38. package/.pikku/scopes/pikku-scope-types.gen.ts +7 -0
  39. package/.pikku/scopes/pikku-scopes-meta.gen.json +1 -0
  40. package/.pikku/scopes/pikku-scopes.gen.ts +58 -0
  41. package/.pikku/secrets/pikku-secret-types.gen.ts +2 -2
  42. package/.pikku/secrets/pikku-secrets.gen.ts +15 -2
  43. package/.pikku/trigger/pikku-trigger-types.gen.ts +1 -1
  44. package/.pikku/variables/pikku-variable-types.gen.ts +2 -2
  45. package/.pikku/variables/pikku-variables.gen.ts +16 -3
  46. package/.pikku/workflow/personas.gen.json +1 -0
  47. package/.pikku/workflow/pikku-personas.gen.ts +38 -0
  48. package/.pikku/workflow/pikku-scenario-step-map.gen.d.ts +18 -0
  49. package/.pikku/workflow/pikku-workflow-map.gen.d.ts +1 -1
  50. package/.pikku/workflow/pikku-workflow-types.gen.ts +429 -5
  51. package/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +3 -3
  52. package/.pikku/workflow/pikku-workflow-wirings.gen.ts +1 -1
  53. package/dist/.pikku/addon/pikku-addon-types.gen.d.ts +1 -1
  54. package/dist/.pikku/addon/pikku-addon-types.gen.js +1 -1
  55. package/dist/.pikku/addon/pikku-addon-types.gen.ts +1 -1
  56. package/dist/.pikku/addon/pikku-package.gen.js +1 -1
  57. package/dist/.pikku/addon/pikku-package.gen.ts +1 -1
  58. package/dist/.pikku/agent/pikku-agent-map.gen.d.ts +1 -1
  59. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +4 -2
  60. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts.map +1 -1
  61. package/dist/.pikku/agent/pikku-agent-types.gen.js.map +1 -1
  62. package/dist/.pikku/agent/pikku-agent-types.gen.ts +4 -2
  63. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
  64. package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
  65. package/dist/.pikku/channel/pikku-channel-types.gen.ts +1 -1
  66. package/dist/.pikku/console/pikku-addon-meta.gen.json +4 -1
  67. package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
  68. package/dist/.pikku/console/pikku-node-types.gen.ts +1 -1
  69. package/dist/.pikku/function/pikku-function-types.gen.d.ts +77 -61
  70. package/dist/.pikku/function/pikku-function-types.gen.d.ts.map +1 -1
  71. package/dist/.pikku/function/pikku-function-types.gen.js +29 -12
  72. package/dist/.pikku/function/pikku-function-types.gen.js.map +1 -1
  73. package/dist/.pikku/function/pikku-function-types.gen.ts +117 -74
  74. package/dist/.pikku/function/pikku-functions-meta-verbose.gen.json +2 -0
  75. package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
  76. package/dist/.pikku/function/pikku-functions-meta.gen.json +7 -1
  77. package/dist/.pikku/function/pikku-functions-meta.gen.ts +1 -1
  78. package/dist/.pikku/function/pikku-functions.gen.js +1 -1
  79. package/dist/.pikku/function/pikku-functions.gen.ts +1 -1
  80. package/dist/.pikku/http/pikku-http-types.gen.d.ts +2 -24
  81. package/dist/.pikku/http/pikku-http-types.gen.d.ts.map +1 -1
  82. package/dist/.pikku/http/pikku-http-types.gen.js +2 -24
  83. package/dist/.pikku/http/pikku-http-types.gen.js.map +1 -1
  84. package/dist/.pikku/http/pikku-http-types.gen.ts +3 -31
  85. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
  86. package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
  87. package/dist/.pikku/mcp/pikku-mcp-types.gen.ts +1 -1
  88. package/dist/.pikku/pikku-bootstrap-scenarios.gen.d.ts +10 -0
  89. package/dist/.pikku/pikku-bootstrap-scenarios.gen.d.ts.map +1 -0
  90. package/dist/.pikku/pikku-bootstrap-scenarios.gen.js +10 -0
  91. package/dist/.pikku/pikku-bootstrap-scenarios.gen.js.map +1 -0
  92. package/dist/.pikku/pikku-bootstrap-scenarios.gen.ts +9 -0
  93. package/dist/.pikku/pikku-bootstrap.gen.d.ts +1 -1
  94. package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
  95. package/dist/.pikku/pikku-bootstrap.gen.ts +1 -1
  96. package/dist/.pikku/pikku-meta-service.gen.d.ts +1 -1
  97. package/dist/.pikku/pikku-meta-service.gen.js +1 -1
  98. package/dist/.pikku/pikku-meta-service.gen.ts +1 -1
  99. package/dist/.pikku/pikku-services.gen.d.ts +6 -1
  100. package/dist/.pikku/pikku-services.gen.d.ts.map +1 -1
  101. package/dist/.pikku/pikku-services.gen.js +5 -0
  102. package/dist/.pikku/pikku-services.gen.js.map +1 -1
  103. package/dist/.pikku/pikku-services.gen.ts +6 -1
  104. package/dist/.pikku/pikku-types.gen.d.ts +2 -1
  105. package/dist/.pikku/pikku-types.gen.d.ts.map +1 -1
  106. package/dist/.pikku/pikku-types.gen.js +3 -1
  107. package/dist/.pikku/pikku-types.gen.js.map +1 -1
  108. package/dist/.pikku/pikku-types.gen.ts +4 -1
  109. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
  110. package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
  111. package/dist/.pikku/queue/pikku-queue-types.gen.ts +1 -1
  112. package/dist/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +2 -1
  113. package/dist/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +2 -1
  114. package/dist/.pikku/rpc/pikku-rpc-wirings-map.remote.gen.d.ts +135 -0
  115. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
  116. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +1 -1
  117. package/dist/.pikku/scenarios/features.gen.json +1 -0
  118. package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.d.ts +2 -0
  119. package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.d.ts.map +1 -0
  120. package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.js +11 -0
  121. package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.js.map +1 -0
  122. package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.json +1 -0
  123. package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.ts +12 -0
  124. package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts +5 -0
  125. package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts.map +1 -0
  126. package/dist/.pikku/scenarios/pikku-scenario-functions.gen.js +2 -0
  127. package/dist/.pikku/scenarios/pikku-scenario-functions.gen.js.map +1 -0
  128. package/dist/.pikku/scenarios/pikku-scenario-functions.gen.ts +4 -0
  129. package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.d.ts +2 -0
  130. package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.d.ts.map +1 -0
  131. package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.js +11 -0
  132. package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.js.map +1 -0
  133. package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.ts +15 -0
  134. package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.d.ts +5 -0
  135. package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.d.ts.map +1 -0
  136. package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.js +2 -0
  137. package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.js.map +1 -0
  138. package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.ts +4 -0
  139. package/dist/.pikku/scenarios/schemas/register.gen.d.ts +5 -0
  140. package/dist/.pikku/scenarios/schemas/register.gen.d.ts.map +1 -0
  141. package/dist/.pikku/scenarios/schemas/register.gen.js +5 -0
  142. package/dist/.pikku/scenarios/schemas/register.gen.js.map +1 -0
  143. package/dist/.pikku/scenarios/schemas/register.gen.ts +4 -0
  144. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
  145. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
  146. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.ts +1 -1
  147. package/dist/.pikku/schemas/register.gen.js +1 -1
  148. package/dist/.pikku/schemas/register.gen.ts +1 -1
  149. package/dist/.pikku/scopes/pikku-personas-meta.gen.json +1 -0
  150. package/dist/.pikku/scopes/pikku-personas.gen.d.ts +37 -0
  151. package/dist/.pikku/scopes/pikku-personas.gen.d.ts.map +1 -0
  152. package/dist/.pikku/scopes/pikku-personas.gen.js +18 -0
  153. package/dist/.pikku/scopes/pikku-personas.gen.js.map +1 -0
  154. package/dist/.pikku/scopes/pikku-personas.gen.ts +52 -0
  155. package/dist/.pikku/scopes/pikku-roles-meta.gen.json +1 -0
  156. package/dist/.pikku/scopes/pikku-roles.gen.d.ts +31 -0
  157. package/dist/.pikku/scopes/pikku-roles.gen.d.ts.map +1 -0
  158. package/dist/.pikku/scopes/pikku-roles.gen.js +19 -0
  159. package/dist/.pikku/scopes/pikku-roles.gen.js.map +1 -0
  160. package/dist/.pikku/scopes/pikku-roles.gen.ts +41 -0
  161. package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +8 -0
  162. package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts.map +1 -0
  163. package/dist/.pikku/scopes/pikku-scope-types.gen.js +6 -0
  164. package/dist/.pikku/scopes/pikku-scope-types.gen.js.map +1 -0
  165. package/dist/.pikku/scopes/pikku-scope-types.gen.ts +7 -0
  166. package/dist/.pikku/scopes/pikku-scopes-meta.gen.json +1 -0
  167. package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +36 -0
  168. package/dist/.pikku/scopes/pikku-scopes.gen.d.ts.map +1 -0
  169. package/dist/.pikku/scopes/pikku-scopes.gen.js +28 -0
  170. package/dist/.pikku/scopes/pikku-scopes.gen.js.map +1 -0
  171. package/dist/.pikku/scopes/pikku-scopes.gen.ts +58 -0
  172. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +2 -2
  173. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts.map +1 -1
  174. package/dist/.pikku/secrets/pikku-secret-types.gen.js +2 -2
  175. package/dist/.pikku/secrets/pikku-secret-types.gen.js.map +1 -1
  176. package/dist/.pikku/secrets/pikku-secret-types.gen.ts +2 -2
  177. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +11 -1
  178. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts.map +1 -1
  179. package/dist/.pikku/secrets/pikku-secrets.gen.js +12 -2
  180. package/dist/.pikku/secrets/pikku-secrets.gen.js.map +1 -1
  181. package/dist/.pikku/secrets/pikku-secrets.gen.ts +15 -2
  182. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
  183. package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
  184. package/dist/.pikku/trigger/pikku-trigger-types.gen.ts +1 -1
  185. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +2 -2
  186. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts.map +1 -1
  187. package/dist/.pikku/variables/pikku-variable-types.gen.js +2 -2
  188. package/dist/.pikku/variables/pikku-variable-types.gen.js.map +1 -1
  189. package/dist/.pikku/variables/pikku-variable-types.gen.ts +2 -2
  190. package/dist/.pikku/variables/pikku-variables.gen.d.ts +11 -1
  191. package/dist/.pikku/variables/pikku-variables.gen.d.ts.map +1 -1
  192. package/dist/.pikku/variables/pikku-variables.gen.js +13 -3
  193. package/dist/.pikku/variables/pikku-variables.gen.js.map +1 -1
  194. package/dist/.pikku/variables/pikku-variables.gen.ts +16 -3
  195. package/dist/.pikku/workflow/personas.gen.json +1 -0
  196. package/dist/.pikku/workflow/pikku-personas.gen.d.ts +16 -0
  197. package/dist/.pikku/workflow/pikku-personas.gen.d.ts.map +1 -0
  198. package/dist/.pikku/workflow/pikku-personas.gen.js +18 -0
  199. package/dist/.pikku/workflow/pikku-personas.gen.js.map +1 -0
  200. package/dist/.pikku/workflow/pikku-personas.gen.ts +38 -0
  201. package/dist/.pikku/workflow/pikku-scenario-step-map.gen.d.ts +18 -0
  202. package/dist/.pikku/workflow/pikku-workflow-map.gen.d.ts +1 -1
  203. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +254 -5
  204. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts.map +1 -1
  205. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +62 -1
  206. package/dist/.pikku/workflow/pikku-workflow-types.gen.js.map +1 -1
  207. package/dist/.pikku/workflow/pikku-workflow-types.gen.ts +429 -5
  208. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
  209. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js.map +1 -1
  210. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +3 -3
  211. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +1 -1
  212. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
  213. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.ts +1 -1
  214. package/dist/src/functions/events/send.function.d.ts +2 -2
  215. package/dist/src/functions/events/send.function.d.ts.map +1 -1
  216. package/dist/src/meta-conversions.secret.js +2 -2
  217. package/dist/src/meta-conversions.secret.js.map +1 -1
  218. package/package.json +4 -4
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.55
2
+ * This file was generated by @pikku/cli@0.12.96
3
3
  */
4
4
  /**
5
5
  * Addon package types for pikkuAddonConfig and pikkuAddonServices
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.55
2
+ * This file was generated by @pikku/cli@0.12.96
3
3
  */
4
4
  import { pikkuState } from '@pikku/core/internal'
5
5
  import { createSingletonServices as createSingletonServices } from '../../src/services.js'
@@ -1,4 +1,4 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.55
2
+ * This file was generated by @pikku/cli@0.12.96
3
3
  */
4
4
  export type AgentMap = {}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.55
2
+ * This file was generated by @pikku/cli@0.12.96
3
3
  */
4
4
  import {
5
5
  CoreAIAgent,
@@ -15,16 +15,18 @@ import type { PikkuPermission, PikkuMiddleware, Services, PikkuFunctionConfig }
15
15
  import type { StandardSchemaV1 } from '@standard-schema/spec'
16
16
  import type { AIAgentMemoryConfig, AIAgentInput } from '@pikku/core/ai-agent'
17
17
  import type { AgentMap } from './pikku-agent-map.gen.d.js'
18
+ import type { ScopeId } from '../scopes/pikku-scopes.gen.js'
18
19
 
19
20
  type AIAgentConfig<
20
21
  InputSchema extends StandardSchemaV1 | undefined = undefined,
21
22
  OutputSchema extends StandardSchemaV1 | undefined = undefined
22
- > = Omit<CoreAIAgent<PikkuPermission, PikkuMiddleware>, 'tools' | 'agents' | 'memory' | 'input' | 'output'> & {
23
+ > = Omit<CoreAIAgent<PikkuPermission, PikkuMiddleware, ScopeId>, 'tools' | 'agents' | 'workflows' | 'memory' | 'input' | 'output'> & {
23
24
  input?: InputSchema
24
25
  output?: OutputSchema
25
26
  memory?: Omit<AIAgentMemoryConfig, 'workingMemory'> & { workingMemory?: StandardSchemaV1 }
26
27
  tools?: object[]
27
28
  agents?: AIAgentConfig<StandardSchemaV1 | undefined, StandardSchemaV1 | undefined>[]
29
+ workflows?: object[]
28
30
  }
29
31
 
30
32
  export const pikkuAIAgent = <
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.55
2
+ * This file was generated by @pikku/cli@0.12.96
3
3
  */
4
4
  /**
5
5
  * Channel-specific type definitions for tree-shaking optimization
@@ -29,5 +29,8 @@
29
29
  "categories": [
30
30
  "Events"
31
31
  ]
32
- }
32
+ },
33
+ "requiredParentServices": [
34
+ "secrets"
35
+ ]
33
36
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.55
2
+ * This file was generated by @pikku/cli@0.12.96
3
3
  */
4
4
  import type { FlattenedRPCMap } from '../rpc/pikku-rpc-wirings-map.internal.gen.js'
5
5
 
@@ -1,21 +1,21 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.55
2
+ * This file was generated by @pikku/cli@0.12.96
3
3
  */
4
4
  /**
5
5
  * Core function, middleware, and permission types for all wirings
6
6
  */
7
7
 
8
- import type { CorePikkuMiddleware, CorePermissionGroup, ListInput, ListOutput, PikkuWire, PickRequired } from '@pikku/core'
8
+ import type { CorePikkuMiddleware, CorePermissionGroup, ListInput, ListOutput, PikkuWire, PickRequired, SecretlessServices, SecretService } from '@pikku/core'
9
9
  import type { CorePikkuFunctionConfig, CorePikkuAuth, CorePikkuAuthConfig, CorePikkuPermission } from '@pikku/core/function'
10
10
  import { pikkuAuth as pikkuAuthCore } from '@pikku/core/function'
11
11
  import {
12
12
  addTagMiddleware as addTagMiddlewareCore,
13
13
  addGlobalMiddleware as addGlobalMiddlewareCore,
14
- addTagPermission as addTagPermissionCore,
15
14
  addGlobalPermission as addGlobalPermissionCore,
16
15
  } from '@pikku/core/middleware'
17
16
  import { pikkuState as __pikkuState, CreateWireServices } from '@pikku/core/internal'
18
17
  import type { NodeType } from '@pikku/core/node'
18
+ import type { ScopeId } from '../scopes/pikku-scopes.gen.js'
19
19
  import type { StandardSchemaV1 } from '@standard-schema/spec'
20
20
  import { CorePikkuFunction, CorePikkuFunctionSessionless } from '@pikku/core/function'
21
21
 
@@ -25,13 +25,37 @@ import type { Services } from '../../types/application-types.d.js'
25
25
  import type { Config } from '../../types/application-types.d.js'
26
26
  import type { TypedPikkuRPC, FlattenedRPCMap } from '../rpc/pikku-rpc-wirings-map.internal.gen.d.js'
27
27
  import type { RequiredSingletonServices, RequiredWireServices } from '../pikku-services.gen.js'
28
- import type { TypedWorkflow } from '../workflow/pikku-workflow-types.gen.js'
28
+ import type { TypedWorkflow, TypedScenario, TypedPersonas } from '../workflow/pikku-workflow-types.gen.js'
29
29
 
30
30
  export type { SingletonServices as SingletonServices }
31
31
  export type { Services as Services }
32
32
  export type Session = UserSession
33
33
 
34
34
 
35
+ /**
36
+ * The services a wired function actually receives. The inspector records which
37
+ * services each wired `func`, `permissions` and `middleware` destructures and
38
+ * emits them as `RequiredSingletonServices`; intersecting that here makes those
39
+ * services **non-optional** at every call site. A service is optional only when
40
+ * nothing destructures it — in which case it is never created either. This is
41
+ * why an `if (!service)` guard inside a function body is always dead code.
42
+ */
43
+ export type WiredSingletonServices = RequiredSingletonServices & SingletonServices
44
+ export type WiredServices = SecretlessServices<RequiredSingletonServices & Services>
45
+
46
+ /** `WiredSingletonServices` without `secrets`, for auth gates. */
47
+ export type WiredAuthServices = SecretlessServices<WiredSingletonServices>
48
+
49
+ /**
50
+ * `WiredServices` with `secrets` restored, for the console's secret-admin
51
+ * functions. Reached by declaring `secretBroker: true` on a `pikkuFunc` config.
52
+ *
53
+ * Declaring it does not grant the service. The runner hands out the real
54
+ * `SecretService` only to the functions the inspector marks as secret brokers;
55
+ * every other function still receives the throwing accessor.
56
+ */
57
+ export type WiredSecretBrokerServices = WiredServices & { secrets: SecretService }
58
+
35
59
  /**
36
60
  * Inline node configuration for function definitions.
37
61
  */
@@ -49,7 +73,7 @@ export type NodeConfig = {
49
73
  * @template In - The input type that the permission check will receive
50
74
  * @template RequiredServices - The services required for this permission check
51
75
  */
52
- export type PikkuPermission<In = unknown, RequiredServices extends Services = Services> = CorePikkuPermission<In, RequiredServices, PikkuWire<In, never, false, Session>>
76
+ export type PikkuPermission<In = unknown, RequiredServices extends SecretlessServices<Services> = WiredServices> = CorePikkuPermission<In, RequiredServices, PikkuWire<In, never, false, Session>>
53
77
 
54
78
  /**
55
79
  * Type-safe middleware definition that can access your application's services and session.
@@ -57,12 +81,12 @@ export type PikkuPermission<In = unknown, RequiredServices extends Services = Se
57
81
  *
58
82
  * @template RequiredServices - The services required for this middleware
59
83
  */
60
- export type PikkuMiddleware<RequiredServices extends SingletonServices = SingletonServices> = CorePikkuMiddleware<RequiredServices>
84
+ export type PikkuMiddleware<RequiredServices extends SingletonServices = WiredSingletonServices> = CorePikkuMiddleware<RequiredServices>
61
85
 
62
86
  /**
63
87
  * Configuration object for creating a permission with metadata
64
88
  */
65
- export type PikkuPermissionConfig<In = unknown, RequiredServices extends Services = Services> = {
89
+ export type PikkuPermissionConfig<In = unknown, RequiredServices extends SecretlessServices<Services> = WiredServices> = {
66
90
  /** The permission function */
67
91
  func: PikkuPermission<In, RequiredServices>
68
92
  /** Optional human-readable name for the permission */
@@ -107,12 +131,12 @@ export const pikkuPermission = <In>(
107
131
  *
108
132
  * @template RequiredServices - The services required for this auth check
109
133
  */
110
- export type PikkuAuth<RequiredServices extends SingletonServices = SingletonServices> = CorePikkuAuth<RequiredServices, Session>
134
+ export type PikkuAuth<RequiredServices extends SecretlessServices<SingletonServices> = WiredAuthServices> = CorePikkuAuth<RequiredServices, Session>
111
135
 
112
136
  /**
113
137
  * Configuration object for creating an auth permission with metadata
114
138
  */
115
- export type PikkuAuthConfig<RequiredServices extends SingletonServices = SingletonServices> = CorePikkuAuthConfig<RequiredServices, Session>
139
+ export type PikkuAuthConfig<RequiredServices extends SecretlessServices<SingletonServices> = WiredAuthServices> = CorePikkuAuthConfig<RequiredServices, Session>
116
140
 
117
141
  /**
118
142
  * Factory function for creating auth-only permissions with tree-shaking support.
@@ -134,7 +158,7 @@ export type PikkuAuthConfig<RequiredServices extends SingletonServices = Singlet
134
158
  * })
135
159
  * \`\`\`
136
160
  */
137
- export const pikkuAuth = <RequiredServices extends SingletonServices = SingletonServices>(
161
+ export const pikkuAuth = <RequiredServices extends SecretlessServices<SingletonServices> = WiredAuthServices>(
138
162
  auth: PikkuAuth<RequiredServices> | PikkuAuthConfig<RequiredServices>
139
163
  ): PikkuPermission<any, any> => {
140
164
  return pikkuAuthCore(auth as any) as any
@@ -143,7 +167,7 @@ export const pikkuAuth = <RequiredServices extends SingletonServices = Singleton
143
167
  /**
144
168
  * Configuration object for creating middleware with metadata
145
169
  */
146
- export type PikkuMiddlewareConfig<RequiredServices extends SingletonServices = SingletonServices> = {
170
+ export type PikkuMiddlewareConfig<RequiredServices extends SingletonServices = WiredSingletonServices> = {
147
171
  /** The middleware function */
148
172
  func: PikkuMiddleware<RequiredServices>
149
173
  /** Optional human-readable name for the middleware */
@@ -175,7 +199,7 @@ export type PikkuMiddlewareConfig<RequiredServices extends SingletonServices = S
175
199
  * })
176
200
  * ```
177
201
  */
178
- export const pikkuMiddleware = <RequiredServices extends SingletonServices = SingletonServices>(
202
+ export const pikkuMiddleware = <RequiredServices extends SingletonServices = WiredSingletonServices>(
179
203
  middleware: PikkuMiddleware<RequiredServices> | PikkuMiddlewareConfig<RequiredServices>
180
204
  ): PikkuMiddleware<RequiredServices> => {
181
205
  return typeof middleware === 'function' ? middleware : middleware.func
@@ -236,7 +260,7 @@ export const pikkuPermissionFactory = <In = any>(
236
260
  * @template In - The input type (same as the function it describes)
237
261
  * @template RequiredServices - The services required for this description function
238
262
  */
239
- export type PikkuApprovalDescription<In = unknown, RequiredServices extends Services = Services> = (
263
+ export type PikkuApprovalDescription<In = unknown, RequiredServices extends SecretlessServices<Services> = WiredServices> = (
240
264
  services: RequiredServices,
241
265
  data: In
242
266
  ) => Promise<string>
@@ -254,7 +278,7 @@ export type PikkuApprovalDescription<In = unknown, RequiredServices extends Serv
254
278
  * )
255
279
  * ```
256
280
  */
257
- export const pikkuApprovalDescription = <In = unknown, RequiredServices extends Services = Services>(
281
+ export const pikkuApprovalDescription = <In = unknown, RequiredServices extends SecretlessServices<Services> = WiredServices>(
258
282
  fn: PikkuApprovalDescription<In, RequiredServices>
259
283
  ): PikkuApprovalDescription<In, RequiredServices> => {
260
284
  return fn
@@ -272,13 +296,13 @@ export type PikkuFunctionSessionless<
272
296
  In = unknown,
273
297
  Out = never,
274
298
  RequiredWires extends keyof PikkuWire = never,
275
- RequiredServices extends Services = Services
299
+ RequiredServices extends SecretlessServices<Services> = WiredServices
276
300
  > = CorePikkuFunctionSessionless<
277
301
  In,
278
302
  Out,
279
303
  RequiredServices,
280
304
  Session,
281
- PickRequired<PikkuWire<In, Out, false, Session, TypedPikkuRPC, null, any, TypedWorkflow>, RequiredWires>
305
+ PickRequired<PikkuWire<In, Out, false, Session, TypedPikkuRPC, null, any, TypedWorkflow, unknown, TypedScenario, TypedPersonas>, RequiredWires>
282
306
  >
283
307
 
284
308
  /**
@@ -293,13 +317,13 @@ export type PikkuFunction<
293
317
  In = unknown,
294
318
  Out = never,
295
319
  RequiredWires extends keyof PikkuWire = 'session',
296
- RequiredServices extends Services = Services
320
+ RequiredServices extends SecretlessServices<Services> = WiredServices
297
321
  > = CorePikkuFunction<
298
322
  In,
299
323
  Out,
300
324
  RequiredServices,
301
325
  Session,
302
- PickRequired<PikkuWire<In, Out, true, Session, TypedPikkuRPC, null, any, TypedWorkflow>, RequiredWires>
326
+ PickRequired<PikkuWire<In, Out, true, Session, TypedPikkuRPC, null, any, TypedWorkflow, unknown, TypedScenario, TypedPersonas>, RequiredWires>
303
327
  >
304
328
 
305
329
  /**
@@ -319,10 +343,10 @@ export type PikkuFunctionConfig<
319
343
  In = unknown,
320
344
  Out = unknown,
321
345
  RequiredWires extends keyof PikkuWire = never,
322
- PikkuFunc extends PikkuFunction<In, Out, RequiredWires> | PikkuFunctionSessionless<In, Out, RequiredWires> = PikkuFunction<In, Out, RequiredWires> | PikkuFunctionSessionless<In, Out, RequiredWires>,
346
+ PikkuFunc extends PikkuFunction<In, Out, RequiredWires, any> | PikkuFunctionSessionless<In, Out, RequiredWires, any> = PikkuFunction<In, Out, RequiredWires> | PikkuFunctionSessionless<In, Out, RequiredWires>,
323
347
  InputSchema extends StandardSchemaV1 | undefined = undefined,
324
348
  OutputSchema extends StandardSchemaV1 | undefined = undefined
325
- > = CorePikkuFunctionConfig<PikkuFunc, PikkuPermission<In>, PikkuMiddleware, InputSchema, OutputSchema>
349
+ > = CorePikkuFunctionConfig<PikkuFunc, PikkuPermission<In>, PikkuMiddleware, InputSchema, OutputSchema, ScopeId>
326
350
 
327
351
  /**
328
352
  * Configuration object for Pikku functions with Zod schema validation.
@@ -340,17 +364,23 @@ type SchemaInferred<S, Fallback = unknown> = S extends StandardSchemaV1
340
364
  export type PikkuFunctionConfigWithSchema<
341
365
  InputSchema extends StandardSchemaV1 | undefined = undefined,
342
366
  OutputSchema extends StandardSchemaV1 | undefined = undefined,
343
- RequiredWires extends keyof PikkuWire = never
367
+ RequiredWires extends keyof PikkuWire = never,
368
+ RequiredServices extends SecretlessServices<Services> = WiredServices
344
369
  > = Omit<
345
370
  CorePikkuFunctionConfig<
346
- | PikkuFunction<SchemaInferred<InputSchema>, SchemaInferred<OutputSchema>, RequiredWires>
347
- | PikkuFunctionSessionless<SchemaInferred<InputSchema>, SchemaInferred<OutputSchema>, RequiredWires>
371
+ | PikkuFunction<SchemaInferred<InputSchema>, SchemaInferred<OutputSchema>, RequiredWires, RequiredServices>
372
+ | PikkuFunctionSessionless<SchemaInferred<InputSchema>, SchemaInferred<OutputSchema>, RequiredWires, RequiredServices>,
373
+ CorePikkuPermission<any>,
374
+ PikkuMiddleware,
375
+ undefined,
376
+ undefined,
377
+ ScopeId
348
378
  >,
349
379
  'func' | 'input' | 'output' | 'permissions' | 'approvalDescription'
350
380
  > & {
351
381
  func:
352
- | PikkuFunction<SchemaInferred<InputSchema>, SchemaInferred<OutputSchema>, RequiredWires>
353
- | PikkuFunctionSessionless<SchemaInferred<InputSchema>, SchemaInferred<OutputSchema>, RequiredWires>
382
+ | PikkuFunction<SchemaInferred<InputSchema>, SchemaInferred<OutputSchema>, RequiredWires, RequiredServices>
383
+ | PikkuFunctionSessionless<SchemaInferred<InputSchema>, SchemaInferred<OutputSchema>, RequiredWires, RequiredServices>
354
384
  input?: InputSchema
355
385
  output?: OutputSchema
356
386
  permissions?: InputSchema extends StandardSchemaV1
@@ -365,26 +395,14 @@ export type PikkuFunctionConfigWithSchema<
365
395
  * Creates a Pikku function that can be either session-aware or sessionless.
366
396
  * This is the main function wrapper for creating API endpoints.
367
397
  *
368
- * Supports two patterns:
369
- * 1. Generic types: `pikkuFunc<Input, Output>({ func: ... })`
370
- * 2. Zod schemas: `pikkuFunc({ input: z.object(...), output: z.object(...), func: ... })`
398
+ * Define the input and output with Zod schemas — the function's types are
399
+ * inferred from them, and the schemas double as runtime validation.
371
400
  *
372
- * @template In - Input type for the function (inferred from schema if provided)
373
- * @template Out - Output type for the function (inferred from schema if provided)
374
- * @param func - Function definition, either direct function or configuration object
401
+ * @param config - Function definition with `input`/`output` Zod schemas and `func`.
375
402
  * @returns The normalized configuration object
376
403
  *
377
404
  * @example
378
405
  * ```typescript
379
- * // Pattern 1: Using generic types
380
- * const createUser = pikkuFunc<{name: string, email: string}, {id: number}>({
381
- * func: async ({db}, input) => {
382
- * const user = await db.users.create(input)
383
- * return { id: user.id }
384
- * }
385
- * })
386
- *
387
- * // Pattern 2: Using Zod schemas (types inferred automatically)
388
406
  * const createUserInput = z.object({ name: z.string(), email: z.string() })
389
407
  * const createUserOutput = z.object({ id: z.number() })
390
408
  *
@@ -399,6 +417,12 @@ export type PikkuFunctionConfigWithSchema<
399
417
  * })
400
418
  * ```
401
419
  */
420
+ export function pikkuFunc<
421
+ InputSchema extends StandardSchemaV1 | undefined = undefined,
422
+ OutputSchema extends StandardSchemaV1 | undefined = undefined
423
+ >(
424
+ config: PikkuFunctionConfigWithSchema<InputSchema, OutputSchema, 'session' | 'rpc', WiredSecretBrokerServices> & { secretBroker: true }
425
+ ): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'session' | 'rpc'>
402
426
  export function pikkuFunc<
403
427
  InputSchema extends StandardSchemaV1 | undefined = undefined,
404
428
  OutputSchema extends StandardSchemaV1 | undefined = undefined
@@ -450,17 +474,19 @@ export const pikkuListFunc = <
450
474
  export type PikkuFunctionSessionlessConfigWithSchema<
451
475
  InputSchema extends StandardSchemaV1 | undefined = undefined,
452
476
  OutputSchema extends StandardSchemaV1 | undefined = undefined,
453
- RequiredWires extends keyof PikkuWire = never
477
+ RequiredWires extends keyof PikkuWire = never,
478
+ RequiredServices extends SecretlessServices<Services> = WiredServices
454
479
  > = Omit<
455
480
  CorePikkuFunctionConfig<
456
- PikkuFunctionSessionless<SchemaInferred<InputSchema>, SchemaInferred<OutputSchema>, RequiredWires>
481
+ PikkuFunctionSessionless<SchemaInferred<InputSchema>, SchemaInferred<OutputSchema>, RequiredWires, RequiredServices>
457
482
  >,
458
483
  'func' | 'input' | 'output' | 'permissions' | 'approvalDescription'
459
484
  > & {
460
485
  func: PikkuFunctionSessionless<
461
486
  SchemaInferred<InputSchema>,
462
487
  SchemaInferred<OutputSchema>,
463
- RequiredWires
488
+ RequiredWires,
489
+ RequiredServices
464
490
  >
465
491
  input?: InputSchema
466
492
  output?: OutputSchema
@@ -476,25 +502,14 @@ export type PikkuFunctionSessionlessConfigWithSchema<
476
502
  * Creates a sessionless Pikku function that doesn't require user authentication.
477
503
  * Use this for public endpoints, webhooks, or background tasks.
478
504
  *
479
- * Supports two patterns:
480
- * 1. Generic types: `pikkuSessionlessFunc<Input, Output>({ func: ... })`
481
- * 2. Zod schemas: `pikkuSessionlessFunc({ input: z.object(...), func: ... })`
505
+ * Define the input and output with Zod schemas — the function's types are
506
+ * inferred from them, and the schemas double as runtime validation.
482
507
  *
483
- * @template In - Input type for the function (inferred from schema if provided)
484
- * @template Out - Output type for the function (inferred from schema if provided)
485
- * @param func - Function definition, either direct function or configuration object
508
+ * @param config - Function definition with `input`/`output` Zod schemas and `func`.
486
509
  * @returns The normalized configuration object
487
510
  *
488
511
  * @example
489
512
  * ```typescript
490
- * // Pattern 1: Using generic types
491
- * const healthCheck = pikkuSessionlessFunc<void, {status: string}>({
492
- * func: async ({logger}) => {
493
- * return { status: 'healthy' }
494
- * }
495
- * })
496
- *
497
- * // Pattern 2: Using Zod schemas
498
513
  * const greetInput = z.object({ name: z.string() })
499
514
  * const greetOutput = z.object({ message: z.string() })
500
515
  *
@@ -509,14 +524,15 @@ export type PikkuFunctionSessionlessConfigWithSchema<
509
524
  */
510
525
  export function pikkuSessionlessFunc<
511
526
  InputSchema extends StandardSchemaV1 | undefined = undefined,
512
- OutputSchema extends StandardSchemaV1 | undefined = undefined
527
+ OutputSchema extends StandardSchemaV1 | undefined = undefined,
528
+ RequiredServices extends SecretlessServices<Services> = WiredServices
513
529
  >(
514
- config: PikkuFunctionSessionlessConfigWithSchema<InputSchema, OutputSchema, 'session' | 'rpc'>
530
+ config: PikkuFunctionSessionlessConfigWithSchema<InputSchema, OutputSchema, 'session' | 'rpc', RequiredServices>
515
531
  ): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'session' | 'rpc'>
516
- export function pikkuSessionlessFunc<In, Out = unknown>(
532
+ export function pikkuSessionlessFunc<In, Out = unknown, RequiredServices extends SecretlessServices<Services> = WiredServices>(
517
533
  func:
518
- | PikkuFunctionSessionless<In, Out, 'session' | 'rpc'>
519
- | PikkuFunctionConfig<In, Out, 'session' | 'rpc'>
534
+ | PikkuFunctionSessionless<In, Out, 'session' | 'rpc', RequiredServices>
535
+ | PikkuFunctionConfig<In, Out, 'session' | 'rpc', PikkuFunctionSessionless<In, Out, 'session' | 'rpc', RequiredServices>>
520
536
  ): PikkuFunctionConfig<In, Out, 'session' | 'rpc'>
521
537
  export function pikkuSessionlessFunc(func: any) {
522
538
  return typeof func === 'function' ? { func } : func
@@ -581,6 +597,43 @@ export const ref = <Name extends keyof FlattenedRPCMap>(
581
597
  >
582
598
  }
583
599
 
600
+ /**
601
+ * Declares a capability the connected client answers, reachable from any
602
+ * `wireChannel` function as `channel.remote(name, input)`.
603
+ *
604
+ * There is no `func`: this side owns the contract, the client owns the body.
605
+ * The `description` is what a person is shown when asked to approve the call,
606
+ * so write it for them rather than for the caller.
607
+ *
608
+ * @example
609
+ * ```typescript
610
+ * export const localCheckoutOutput = z.object({ sha: z.string(), branch: z.string() })
611
+ *
612
+ * export const localCheckout = pikkuRemoteChannelFunc({
613
+ * description: 'Read the current commit and branch of your working tree',
614
+ * output: localCheckoutOutput,
615
+ * })
616
+ * ```
617
+ */
618
+ export function pikkuRemoteChannelFunc<
619
+ InputSchema extends StandardSchemaV1 | undefined = undefined,
620
+ OutputSchema extends StandardSchemaV1 | undefined = undefined
621
+ >(
622
+ config: Omit<
623
+ PikkuFunctionSessionlessConfigWithSchema<InputSchema, OutputSchema, 'session' | 'rpc'>,
624
+ 'func'
625
+ >
626
+ ): PikkuFunctionConfig<SchemaInferred<InputSchema>, SchemaInferred<OutputSchema>, 'session' | 'rpc'> {
627
+ return {
628
+ ...config,
629
+ func: async (_services: any, _data: any, _wire: any) => {
630
+ throw new Error(
631
+ `${config.title ?? 'This'} is a remote channel capability and has no local implementation — reach it with channel.remote() on the channel whose client exposes it.`
632
+ )
633
+ },
634
+ } as any
635
+ }
636
+
584
637
  /**
585
638
  * Creates a Pikku config factory.
586
639
  * Use this to define your application's configuration factory.
@@ -697,16 +750,6 @@ export const addGlobalMiddleware = (middleware: PikkuMiddleware[]) => {
697
750
  addGlobalMiddlewareCore(middleware as any, '@pikku/addon-meta-conversions')
698
751
  }
699
752
 
700
- /**
701
- * Tag-scoped permissions. Applies to any wiring that carries the matching tag.
702
- *
703
- * @example
704
- * addTagPermission('admin', [adminPermission])
705
- */
706
- export const addTagPermission = <In = unknown>(tag: string, permissions: CorePermissionGroup<PikkuPermission<In>> | PikkuPermission<In>[]) => {
707
- addTagPermissionCore(tag, permissions as any, '@pikku/addon-meta-conversions')
708
- }
709
-
710
753
  /**
711
754
  * Wire-agnostic global permissions. Runs at the top of every wiring's
712
755
  * permission resolution — before wire-, tag-, and function-level entries.
@@ -720,8 +763,8 @@ export const addGlobalPermission = <In = unknown>(permissions: CorePermissionGro
720
763
  addGlobalPermissionCore(permissions as any, '@pikku/addon-meta-conversions')
721
764
  }
722
765
 
723
- export { wireAddon } from '@pikku/core/rpc'
724
- export type { WireAddonConfig } from '@pikku/core/rpc'
766
+ export { wireAddon, wireRemoteAddon } from '@pikku/core/rpc'
767
+ export type { WireAddonConfig, WireRemoteAddonConfig, RemoteAddonAuth } from '@pikku/core/rpc'
725
768
 
726
769
 
727
770
  /**
@@ -24,6 +24,8 @@
24
24
  "isDirectFunction": false,
25
25
  "sourceFile": "/home/runner/work/addons/addons/packages/analytics/meta-conversions/src/functions/events/send.function.ts",
26
26
  "exportedName": "eventSend",
27
+ "bodyStart": 49,
28
+ "bodyEnd": 49,
27
29
  "contractHash": "5864ea42d4379da5",
28
30
  "inputHash": "0030f99c",
29
31
  "outputHash": "39d1f240"
@@ -16,6 +16,12 @@
16
16
  "implementationHash": "289d4066fc71925f",
17
17
  "contractHash": "5864ea42d4379da5",
18
18
  "inputHash": "0030f99c",
19
- "outputHash": "39d1f240"
19
+ "outputHash": "39d1f240",
20
+ "services": {
21
+ "optimized": true,
22
+ "services": [
23
+ "metaConversions"
24
+ ]
25
+ }
20
26
  }
21
27
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.55
2
+ * This file was generated by @pikku/cli@0.12.96
3
3
  */
4
4
  import { pikkuState } from '@pikku/core/internal'
5
5
  import type { FunctionsMeta } from '@pikku/core'
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.55
2
+ * This file was generated by @pikku/cli@0.12.96
3
3
  */
4
4
  /* Import and register functions used by RPCs */
5
5
  import { addFunction } from '@pikku/core/function'
@@ -1,11 +1,11 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.55
2
+ * This file was generated by @pikku/cli@0.12.96
3
3
  */
4
4
  /**
5
5
  * HTTP-specific type definitions for tree-shaking optimization
6
6
  */
7
7
 
8
- import { AssertHTTPWiringParams, wireHTTP as wireHTTPCore, addHTTPMiddleware as addHTTPMiddlewareCore, addHTTPPermission as addHTTPPermissionCore, wireHTTPRoutes as wireHTTPRoutesCore, defineHTTPRoutes as defineHTTPRoutesCore } from '@pikku/core/http'
8
+ import { AssertHTTPWiringParams, wireHTTP as wireHTTPCore, addHTTPMiddleware as addHTTPMiddlewareCore, wireHTTPRoutes as wireHTTPRoutesCore, defineHTTPRoutes as defineHTTPRoutesCore } from '@pikku/core/http'
9
9
  import type { PikkuFunction, PikkuFunctionSessionless, PikkuPermission, PikkuMiddleware, PikkuFunctionConfig } from '../function/pikku-function-types.gen.js'
10
10
  import type { CoreHTTPFunctionWiring, HTTPMethod, HTTPRouteBaseConfig } from '@pikku/core/http'
11
11
 
@@ -59,32 +59,6 @@ export const addHTTPMiddleware = (
59
59
  addHTTPMiddlewareCore(routeOrMiddleware as any, middleware as any)
60
60
  }
61
61
 
62
- /**
63
- * Registers HTTP permissions either globally or for a specific route pattern.
64
- *
65
- * When a string route pattern is provided along with permissions, the permissions
66
- * are applied only to that route. Permissions can be passed as an array or as a
67
- * permission group object.
68
- *
69
- * @param pattern - Route pattern string (e.g., '*' for all routes, '/api/*' for specific routes)
70
- * @param permissions - The permissions to apply for the specified route pattern
71
- *
72
- * @example
73
- * ```typescript
74
- * // Add global HTTP permissions
75
- * addHTTPPermission('*', { global: globalPermission })
76
- *
77
- * // Add route-specific permissions
78
- * addHTTPPermission('/api/admin/*', { admin: adminPermission })
79
- * ```
80
- */
81
- export const addHTTPPermission = <In = unknown>(
82
- pattern: string,
83
- permissions: Record<string, PikkuPermission<In>> | PikkuPermission<In>[]
84
- ) => {
85
- addHTTPPermissionCore(pattern, permissions as any)
86
- }
87
-
88
62
  /**
89
63
  * Route configuration for wireHTTPRoutes with proper typing
90
64
  */
@@ -93,7 +67,6 @@ type HTTPRouteConfig = HTTPRouteBaseConfig & {
93
67
  route: string
94
68
  func: PikkuFunctionConfig<any, any, any, any, any, any>
95
69
  auth?: boolean
96
- permissions?: Record<string, PikkuPermission | PikkuPermission[]>
97
70
  middleware?: PikkuMiddleware[]
98
71
  sse?: boolean
99
72
  }
@@ -113,14 +86,13 @@ type TypedHTTPRouteContract<T extends TypedHTTPRouteMap = TypedHTTPRouteMap> = T
113
86
  }
114
87
 
115
88
  /**
116
- * Group config with typed middleware/permissions
89
+ * Group config with typed middleware
117
90
  */
118
91
  type TypedHTTPRoutesGroupConfig = {
119
92
  basePath?: string
120
93
  tags?: string[]
121
94
  auth?: boolean
122
95
  middleware?: PikkuMiddleware[]
123
- permissions?: Record<string, PikkuPermission | PikkuPermission[]>
124
96
  }
125
97
 
126
98
  /**
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.55
2
+ * This file was generated by @pikku/cli@0.12.96
3
3
  */
4
4
  /**
5
5
  * MCP-specific type definitions for tree-shaking optimization
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was generated by @pikku/cli@0.12.96
3
+ */
4
+ import './pikku-bootstrap.gen.js'
5
+ import './scenarios/schemas/register.gen.js'
6
+ import './scenarios/pikku-scenario-functions-meta.gen.js'
7
+ import './scenarios/pikku-scenario-functions.gen.js'
8
+ import './scenarios/pikku-scenario-wirings-meta.gen.js'
9
+ import './scenarios/pikku-scenario-wirings.gen.js'
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.55
2
+ * This file was generated by @pikku/cli@0.12.96
3
3
  */
4
4
  import './rpc/pikku-rpc-wirings-meta.internal.gen.js'
5
5
  import './function/pikku-functions-meta.gen.js'
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.55
2
+ * This file was generated by @pikku/cli@0.12.96
3
3
  */
4
4
  import { LocalMetaService } from '@pikku/core/services/local-meta'
5
5