@pikku/addon-execution 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/.pikku/addon/pikku-addon-types.gen.ts +105 -0
  2. package/.pikku/addon/pikku-package.gen.ts +9 -0
  3. package/.pikku/agent/pikku-agent-map.gen.d.ts +4 -0
  4. package/.pikku/agent/pikku-agent-types.gen.ts +82 -0
  5. package/.pikku/channel/pikku-channel-types.gen.ts +177 -0
  6. package/.pikku/console/pikku-addon-meta.gen.json +36 -0
  7. package/.pikku/console/pikku-node-types.gen.ts +8 -0
  8. package/.pikku/function/pikku-function-types.gen.ts +754 -0
  9. package/.pikku/function/pikku-functions-meta-verbose.gen.json +56 -0
  10. package/.pikku/function/pikku-functions-meta.gen.json +40 -0
  11. package/.pikku/function/pikku-functions-meta.gen.ts +7 -0
  12. package/.pikku/function/pikku-functions.gen.ts +10 -0
  13. package/.pikku/http/pikku-http-types.gen.ts +147 -0
  14. package/.pikku/mcp/pikku-mcp-types.gen.ts +183 -0
  15. package/.pikku/pikku-bootstrap.gen.ts +8 -0
  16. package/.pikku/pikku-meta-service.gen.ts +10 -0
  17. package/.pikku/pikku-services.gen.ts +41 -0
  18. package/.pikku/pikku-types.gen.ts +21 -0
  19. package/.pikku/queue/pikku-queue-types.gen.ts +27 -0
  20. package/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +128 -0
  21. package/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +130 -0
  22. package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +4 -0
  23. package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +6 -0
  24. package/.pikku/scheduler/pikku-scheduler-types.gen.ts +25 -0
  25. package/.pikku/schemas/register.gen.ts +19 -0
  26. package/.pikku/schemas/schemas/ExecuteInput.schema.json +1 -0
  27. package/.pikku/schemas/schemas/ExecuteOutput.schema.json +1 -0
  28. package/.pikku/schemas/schemas/SpawnCommandInput.schema.json +1 -0
  29. package/.pikku/schemas/schemas/SpawnCommandOutput.schema.json +1 -0
  30. package/.pikku/secrets/pikku-secret-types.gen.ts +5 -0
  31. package/.pikku/secrets/pikku-secrets-meta.gen.json +1 -0
  32. package/.pikku/secrets/pikku-secrets.gen.ts +21 -0
  33. package/.pikku/trigger/pikku-trigger-types.gen.ts +160 -0
  34. package/.pikku/variables/pikku-variable-types.gen.ts +5 -0
  35. package/.pikku/variables/pikku-variables-meta.gen.json +1 -0
  36. package/.pikku/variables/pikku-variables.gen.ts +21 -0
  37. package/.pikku/workflow/pikku-workflow-map.gen.d.ts +38 -0
  38. package/.pikku/workflow/pikku-workflow-types.gen.ts +167 -0
  39. package/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +9 -0
  40. package/.pikku/workflow/pikku-workflow-wirings.gen.ts +3 -0
  41. package/README.md +16 -0
  42. package/dist/.pikku/addon/pikku-addon-types.gen.d.ts +65 -0
  43. package/dist/.pikku/addon/pikku-addon-types.gen.d.ts.map +1 -0
  44. package/dist/.pikku/addon/pikku-addon-types.gen.js +78 -0
  45. package/dist/.pikku/addon/pikku-addon-types.gen.js.map +1 -0
  46. package/dist/.pikku/addon/pikku-addon-types.gen.ts +105 -0
  47. package/dist/.pikku/addon/pikku-package.gen.d.ts +2 -0
  48. package/dist/.pikku/addon/pikku-package.gen.d.ts.map +1 -0
  49. package/dist/.pikku/addon/pikku-package.gen.js +9 -0
  50. package/dist/.pikku/addon/pikku-package.gen.js.map +1 -0
  51. package/dist/.pikku/addon/pikku-package.gen.ts +9 -0
  52. package/dist/.pikku/agent/pikku-agent-map.gen.d.ts +4 -0
  53. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +47 -0
  54. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts.map +1 -0
  55. package/dist/.pikku/agent/pikku-agent-types.gen.js +18 -0
  56. package/dist/.pikku/agent/pikku-agent-types.gen.js.map +1 -0
  57. package/dist/.pikku/agent/pikku-agent-types.gen.ts +82 -0
  58. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +112 -0
  59. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts.map +1 -0
  60. package/dist/.pikku/channel/pikku-channel-types.gen.js +60 -0
  61. package/dist/.pikku/channel/pikku-channel-types.gen.js.map +1 -0
  62. package/dist/.pikku/channel/pikku-channel-types.gen.ts +177 -0
  63. package/dist/.pikku/console/pikku-addon-meta.gen.json +36 -0
  64. package/dist/.pikku/console/pikku-node-types.gen.d.ts +7 -0
  65. package/dist/.pikku/console/pikku-node-types.gen.d.ts.map +1 -0
  66. package/dist/.pikku/console/pikku-node-types.gen.js +2 -0
  67. package/dist/.pikku/console/pikku-node-types.gen.js.map +1 -0
  68. package/dist/.pikku/console/pikku-node-types.gen.ts +8 -0
  69. package/dist/.pikku/function/pikku-function-types.gen.d.ts +490 -0
  70. package/dist/.pikku/function/pikku-function-types.gen.d.ts.map +1 -0
  71. package/dist/.pikku/function/pikku-function-types.gen.js +334 -0
  72. package/dist/.pikku/function/pikku-function-types.gen.js.map +1 -0
  73. package/dist/.pikku/function/pikku-function-types.gen.ts +754 -0
  74. package/dist/.pikku/function/pikku-functions-meta-verbose.gen.json +56 -0
  75. package/dist/.pikku/function/pikku-functions-meta.gen.d.ts +2 -0
  76. package/dist/.pikku/function/pikku-functions-meta.gen.d.ts.map +1 -0
  77. package/dist/.pikku/function/pikku-functions-meta.gen.js +7 -0
  78. package/dist/.pikku/function/pikku-functions-meta.gen.js.map +1 -0
  79. package/dist/.pikku/function/pikku-functions-meta.gen.json +40 -0
  80. package/dist/.pikku/function/pikku-functions-meta.gen.ts +7 -0
  81. package/dist/.pikku/function/pikku-functions.gen.d.ts +2 -0
  82. package/dist/.pikku/function/pikku-functions.gen.d.ts.map +1 -0
  83. package/dist/.pikku/function/pikku-functions.gen.js +10 -0
  84. package/dist/.pikku/function/pikku-functions.gen.js.map +1 -0
  85. package/dist/.pikku/function/pikku-functions.gen.ts +10 -0
  86. package/dist/.pikku/http/pikku-http-types.gen.d.ts +120 -0
  87. package/dist/.pikku/http/pikku-http-types.gen.d.ts.map +1 -0
  88. package/dist/.pikku/http/pikku-http-types.gen.js +72 -0
  89. package/dist/.pikku/http/pikku-http-types.gen.js.map +1 -0
  90. package/dist/.pikku/http/pikku-http-types.gen.ts +147 -0
  91. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +131 -0
  92. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts.map +1 -0
  93. package/dist/.pikku/mcp/pikku-mcp-types.gen.js +38 -0
  94. package/dist/.pikku/mcp/pikku-mcp-types.gen.js.map +1 -0
  95. package/dist/.pikku/mcp/pikku-mcp-types.gen.ts +183 -0
  96. package/dist/.pikku/pikku-bootstrap.gen.d.ts +9 -0
  97. package/dist/.pikku/pikku-bootstrap.gen.d.ts.map +1 -0
  98. package/dist/.pikku/pikku-bootstrap.gen.js +9 -0
  99. package/dist/.pikku/pikku-bootstrap.gen.js.map +1 -0
  100. package/dist/.pikku/pikku-bootstrap.gen.ts +8 -0
  101. package/dist/.pikku/pikku-meta-service.gen.d.ts +8 -0
  102. package/dist/.pikku/pikku-meta-service.gen.d.ts.map +1 -0
  103. package/dist/.pikku/pikku-meta-service.gen.js +10 -0
  104. package/dist/.pikku/pikku-meta-service.gen.js.map +1 -0
  105. package/dist/.pikku/pikku-meta-service.gen.ts +10 -0
  106. package/dist/.pikku/pikku-services.gen.d.ts +34 -0
  107. package/dist/.pikku/pikku-services.gen.d.ts.map +1 -0
  108. package/dist/.pikku/pikku-services.gen.js +29 -0
  109. package/dist/.pikku/pikku-services.gen.js.map +1 -0
  110. package/dist/.pikku/pikku-services.gen.ts +41 -0
  111. package/dist/.pikku/pikku-types.gen.d.ts +12 -0
  112. package/dist/.pikku/pikku-types.gen.d.ts.map +1 -0
  113. package/dist/.pikku/pikku-types.gen.js +17 -0
  114. package/dist/.pikku/pikku-types.gen.js.map +1 -0
  115. package/dist/.pikku/pikku-types.gen.ts +21 -0
  116. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +24 -0
  117. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts.map +1 -0
  118. package/dist/.pikku/queue/pikku-queue-types.gen.js +17 -0
  119. package/dist/.pikku/queue/pikku-queue-types.gen.js.map +1 -0
  120. package/dist/.pikku/queue/pikku-queue-types.gen.ts +27 -0
  121. package/dist/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +128 -0
  122. package/dist/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +130 -0
  123. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.d.ts +2 -0
  124. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.d.ts.map +1 -0
  125. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +7 -0
  126. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js.map +1 -0
  127. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +4 -0
  128. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +6 -0
  129. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +22 -0
  130. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts.map +1 -0
  131. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +17 -0
  132. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js.map +1 -0
  133. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.ts +25 -0
  134. package/dist/.pikku/schemas/register.gen.d.ts +2 -0
  135. package/dist/.pikku/schemas/register.gen.d.ts.map +1 -0
  136. package/dist/.pikku/schemas/register.gen.js +13 -0
  137. package/dist/.pikku/schemas/register.gen.js.map +1 -0
  138. package/dist/.pikku/schemas/register.gen.ts +19 -0
  139. package/dist/.pikku/schemas/schemas/ExecuteInput.schema.json +1 -0
  140. package/dist/.pikku/schemas/schemas/ExecuteOutput.schema.json +1 -0
  141. package/dist/.pikku/schemas/schemas/SpawnCommandInput.schema.json +1 -0
  142. package/dist/.pikku/schemas/schemas/SpawnCommandOutput.schema.json +1 -0
  143. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +6 -0
  144. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts.map +1 -0
  145. package/dist/.pikku/secrets/pikku-secret-types.gen.js +5 -0
  146. package/dist/.pikku/secrets/pikku-secret-types.gen.js.map +1 -0
  147. package/dist/.pikku/secrets/pikku-secret-types.gen.ts +5 -0
  148. package/dist/.pikku/secrets/pikku-secrets-meta.gen.json +1 -0
  149. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +12 -0
  150. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts.map +1 -0
  151. package/dist/.pikku/secrets/pikku-secrets.gen.js +11 -0
  152. package/dist/.pikku/secrets/pikku-secrets.gen.js.map +1 -0
  153. package/dist/.pikku/secrets/pikku-secrets.gen.ts +21 -0
  154. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +114 -0
  155. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts.map +1 -0
  156. package/dist/.pikku/trigger/pikku-trigger-types.gen.js +34 -0
  157. package/dist/.pikku/trigger/pikku-trigger-types.gen.js.map +1 -0
  158. package/dist/.pikku/trigger/pikku-trigger-types.gen.ts +160 -0
  159. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +6 -0
  160. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts.map +1 -0
  161. package/dist/.pikku/variables/pikku-variable-types.gen.js +5 -0
  162. package/dist/.pikku/variables/pikku-variable-types.gen.js.map +1 -0
  163. package/dist/.pikku/variables/pikku-variable-types.gen.ts +5 -0
  164. package/dist/.pikku/variables/pikku-variables-meta.gen.json +1 -0
  165. package/dist/.pikku/variables/pikku-variables.gen.d.ts +12 -0
  166. package/dist/.pikku/variables/pikku-variables.gen.d.ts.map +1 -0
  167. package/dist/.pikku/variables/pikku-variables.gen.js +11 -0
  168. package/dist/.pikku/variables/pikku-variables.gen.js.map +1 -0
  169. package/dist/.pikku/variables/pikku-variables.gen.ts +21 -0
  170. package/dist/.pikku/workflow/pikku-workflow-map.gen.d.ts +38 -0
  171. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +90 -0
  172. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts.map +1 -0
  173. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +18 -0
  174. package/dist/.pikku/workflow/pikku-workflow-types.gen.js.map +1 -0
  175. package/dist/.pikku/workflow/pikku-workflow-types.gen.ts +167 -0
  176. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.d.ts +2 -0
  177. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.d.ts.map +1 -0
  178. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +7 -0
  179. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js.map +1 -0
  180. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +9 -0
  181. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +5 -0
  182. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts.map +1 -0
  183. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +5 -0
  184. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js.map +1 -0
  185. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.ts +3 -0
  186. package/dist/src/functions/execute.function.d.ts +37 -0
  187. package/dist/src/functions/execute.function.d.ts.map +1 -0
  188. package/dist/src/functions/execute.function.js +31 -0
  189. package/dist/src/functions/execute.function.js.map +1 -0
  190. package/dist/src/functions/spawn.function.d.ts +41 -0
  191. package/dist/src/functions/spawn.function.d.ts.map +1 -0
  192. package/dist/src/functions/spawn.function.js +38 -0
  193. package/dist/src/functions/spawn.function.js.map +1 -0
  194. package/dist/src/index.d.ts +3 -0
  195. package/dist/src/index.d.ts.map +1 -0
  196. package/dist/src/index.js +3 -0
  197. package/dist/src/index.js.map +1 -0
  198. package/dist/src/services.d.ts +2 -0
  199. package/dist/src/services.d.ts.map +1 -0
  200. package/dist/src/services.js +5 -0
  201. package/dist/src/services.js.map +1 -0
  202. package/package.json +39 -0
@@ -0,0 +1,490 @@
1
+ /**
2
+ * This file was generated by @pikku/cli@0.12.55
3
+ */
4
+ /**
5
+ * Core function, middleware, and permission types for all wirings
6
+ */
7
+ import type { CorePikkuMiddleware, CorePermissionGroup, ListInput, ListOutput, PikkuWire, PickRequired } from '@pikku/core';
8
+ import type { CorePikkuFunctionConfig, CorePikkuAuth, CorePikkuAuthConfig, CorePikkuPermission } from '@pikku/core/function';
9
+ import { CreateWireServices } from '@pikku/core/internal';
10
+ import type { NodeType } from '@pikku/core/node';
11
+ import type { StandardSchemaV1 } from '@standard-schema/spec';
12
+ import { CorePikkuFunction, CorePikkuFunctionSessionless } from '@pikku/core/function';
13
+ import type { UserSession } from '../../types/application-types.d.js';
14
+ import type { SingletonServices } from '../../types/application-types.d.js';
15
+ import type { Services } from '../../types/application-types.d.js';
16
+ import type { Config } from '../../types/application-types.d.js';
17
+ import type { TypedPikkuRPC, FlattenedRPCMap } from '../rpc/pikku-rpc-wirings-map.internal.gen.d.js';
18
+ import type { RequiredSingletonServices, RequiredWireServices } from '../pikku-services.gen.js';
19
+ import type { TypedWorkflow } from '../workflow/pikku-workflow-types.gen.js';
20
+ export type { SingletonServices as SingletonServices };
21
+ export type { Services as Services };
22
+ export type Session = UserSession;
23
+ /**
24
+ * Inline node configuration for function definitions.
25
+ */
26
+ export type NodeConfig = {
27
+ displayName: string;
28
+ category: 'Utility' | 'DevOps';
29
+ type: NodeType;
30
+ errorOutput?: boolean;
31
+ };
32
+ /**
33
+ * Type-safe API permission definition that integrates with your application's session type.
34
+ * Use this to define authorization logic for your API endpoints.
35
+ *
36
+ * @template In - The input type that the permission check will receive
37
+ * @template RequiredServices - The services required for this permission check
38
+ */
39
+ export type PikkuPermission<In = unknown, RequiredServices extends Services = Services> = CorePikkuPermission<In, RequiredServices, PikkuWire<In, never, false, Session>>;
40
+ /**
41
+ * Type-safe middleware definition that can access your application's services and session.
42
+ * Use this to define reusable middleware that can be applied to multiple wirings.
43
+ *
44
+ * @template RequiredServices - The services required for this middleware
45
+ */
46
+ export type PikkuMiddleware<RequiredServices extends SingletonServices = SingletonServices> = CorePikkuMiddleware<RequiredServices>;
47
+ /**
48
+ * Configuration object for creating a permission with metadata
49
+ */
50
+ export type PikkuPermissionConfig<In = unknown, RequiredServices extends Services = Services> = {
51
+ /** The permission function */
52
+ func: PikkuPermission<In, RequiredServices>;
53
+ /** Optional human-readable name for the permission */
54
+ name?: string;
55
+ /** Optional description of what the permission checks */
56
+ description?: string;
57
+ };
58
+ /**
59
+ * Factory function for creating permissions with tree-shaking support.
60
+ * Supports both direct function and configuration object syntax.
61
+ *
62
+ * @example
63
+ * ```typescript
64
+ * // Direct function syntax
65
+ * const permission = pikkuPermission(async ({ logger }, data, { session }) => {
66
+ * const session = await session?.get()
67
+ * return session?.role === 'admin'
68
+ * })
69
+ *
70
+ * // Configuration object syntax with metadata
71
+ * const adminPermission = pikkuPermission({
72
+ * name: 'Admin Permission',
73
+ * description: 'Checks if user has admin role',
74
+ * func: async ({ logger }, data, { session }) => {
75
+ * const session = await session?.get()
76
+ * return session?.role === 'admin'
77
+ * }
78
+ * })
79
+ * ```
80
+ */
81
+ export declare const pikkuPermission: <In>(permission: PikkuPermission<In> | PikkuPermissionConfig<In>) => PikkuPermission<In>;
82
+ /**
83
+ * Type-safe auth-only permission that only needs services and session.
84
+ * Use this for upfront authorization gates (MCP tools, AI agents, workflows)
85
+ * where request data isn't available yet.
86
+ *
87
+ * @template RequiredServices - The services required for this auth check
88
+ */
89
+ export type PikkuAuth<RequiredServices extends SingletonServices = SingletonServices> = CorePikkuAuth<RequiredServices, Session>;
90
+ /**
91
+ * Configuration object for creating an auth permission with metadata
92
+ */
93
+ export type PikkuAuthConfig<RequiredServices extends SingletonServices = SingletonServices> = CorePikkuAuthConfig<RequiredServices, Session>;
94
+ /**
95
+ * Factory function for creating auth-only permissions with tree-shaking support.
96
+ * Auth permissions only receive services and session (no request data),
97
+ * making them evaluable before request data is available.
98
+ *
99
+ * @example
100
+ * \`\`\`typescript
101
+ * const isAuthenticated = pikkuAuth(async ({ logger }, session) => {
102
+ * return !!session
103
+ * })
104
+ *
105
+ * const isAdmin = pikkuAuth({
106
+ * name: 'Admin Auth',
107
+ * description: 'Checks if user is an admin',
108
+ * func: async ({ logger }, session) => {
109
+ * return session?.role === 'admin'
110
+ * }
111
+ * })
112
+ * \`\`\`
113
+ */
114
+ export declare const pikkuAuth: <RequiredServices extends SingletonServices = SingletonServices>(auth: PikkuAuth<RequiredServices> | PikkuAuthConfig<RequiredServices>) => PikkuPermission<any, any>;
115
+ /**
116
+ * Configuration object for creating middleware with metadata
117
+ */
118
+ export type PikkuMiddlewareConfig<RequiredServices extends SingletonServices = SingletonServices> = {
119
+ /** The middleware function */
120
+ func: PikkuMiddleware<RequiredServices>;
121
+ /** Optional human-readable name for the middleware */
122
+ name?: string;
123
+ /** Optional description of what the middleware does */
124
+ description?: string;
125
+ };
126
+ /**
127
+ * Factory function for creating middleware with tree-shaking support.
128
+ * Supports both direct function and configuration object syntax.
129
+ *
130
+ * @example
131
+ * ```typescript
132
+ * // Direct function syntax
133
+ * const middleware = pikkuMiddleware(({ logger }, wires, next) => {
134
+ * logger.info('Middleware executed')
135
+ * await next()
136
+ * })
137
+ *
138
+ * // Configuration object syntax with metadata
139
+ * const logMiddleware = pikkuMiddleware({
140
+ * name: 'Request Logger',
141
+ * description: 'Logs all incoming requests',
142
+ * func: async ({ logger }, wires, next) => {
143
+ * logger.info('Request started')
144
+ * await next()
145
+ * }
146
+ * })
147
+ * ```
148
+ */
149
+ export declare const pikkuMiddleware: <RequiredServices extends SingletonServices = SingletonServices>(middleware: PikkuMiddleware<RequiredServices> | PikkuMiddlewareConfig<RequiredServices>) => PikkuMiddleware<RequiredServices>;
150
+ /**
151
+ * Factory function for creating middleware factories
152
+ * Use this when your middleware needs configuration/input parameters
153
+ *
154
+ * @example
155
+ * ```typescript
156
+ * export const logMiddleware = pikkuMiddlewareFactory<LogOptions>(({
157
+ * message,
158
+ * level = 'info'
159
+ * }) => {
160
+ * return pikkuMiddleware(async ({ logger }, next) => {
161
+ * logger[level](message)
162
+ * await next()
163
+ * })
164
+ * })
165
+ * ```
166
+ */
167
+ export declare const pikkuMiddlewareFactory: <In = any>(factory: (input: In) => PikkuMiddleware) => ((input: In) => PikkuMiddleware);
168
+ /**
169
+ * Factory function for creating permission factories
170
+ * Use this when your permission needs configuration/input parameters
171
+ *
172
+ * @example
173
+ * ```typescript
174
+ * export const requireRole = pikkuPermissionFactory<{ role: string }>(({
175
+ * role
176
+ * }) => {
177
+ * return pikkuPermission(async ({ logger }, data, { session }) => {
178
+ * if (!session || session.role !== role) {
179
+ * logger.warn(`Permission denied: required role '${role}'`)
180
+ * return false
181
+ * }
182
+ * return true
183
+ * })
184
+ * })
185
+ * ```
186
+ */
187
+ export declare const pikkuPermissionFactory: <In = any>(factory: (input: In) => PikkuPermission<any>) => ((input: In) => PikkuPermission<any>);
188
+ /**
189
+ * A function that generates a human-readable description of a pending approval action.
190
+ * Used by AI agents to show meaningful approval prompts instead of raw tool arguments.
191
+ *
192
+ * @template In - The input type (same as the function it describes)
193
+ * @template RequiredServices - The services required for this description function
194
+ */
195
+ export type PikkuApprovalDescription<In = unknown, RequiredServices extends Services = Services> = (services: RequiredServices, data: In) => Promise<string>;
196
+ /**
197
+ * Factory function for creating approval description functions with tree-shaking support.
198
+ *
199
+ * @example
200
+ * ```typescript
201
+ * export const deleteTodoApproval = pikkuApprovalDescription(
202
+ * async ({ todoStore }, { id }) => {
203
+ * const todo = await todoStore.get(id)
204
+ * return \`Delete todo: "${todo.title}"\`
205
+ * }
206
+ * )
207
+ * ```
208
+ */
209
+ export declare const pikkuApprovalDescription: <In = unknown, RequiredServices extends Services = Services>(fn: PikkuApprovalDescription<In, RequiredServices>) => PikkuApprovalDescription<In, RequiredServices>;
210
+ /**
211
+ * A sessionless API function that doesn't require user authentication.
212
+ * Use this for public endpoints, health checks, or operations that don't need user context.
213
+ *
214
+ * @template In - The input type
215
+ * @template Out - The output type that the function returns
216
+ * @template RequiredServices - Services required by this function
217
+ */
218
+ export type PikkuFunctionSessionless<In = unknown, Out = never, RequiredWires extends keyof PikkuWire = never, RequiredServices extends Services = Services> = CorePikkuFunctionSessionless<In, Out, RequiredServices, Session, PickRequired<PikkuWire<In, Out, false, Session, TypedPikkuRPC, null, any, TypedWorkflow>, RequiredWires>>;
219
+ /**
220
+ * A session-aware API function that requires user authentication.
221
+ * Use this for protected endpoints that need access to user session data.
222
+ *
223
+ * @template In - The input type
224
+ * @template Out - The output type that the function returns
225
+ * @template RequiredServices - Services required by this function
226
+ */
227
+ export type PikkuFunction<In = unknown, Out = never, RequiredWires extends keyof PikkuWire = 'session', RequiredServices extends Services = Services> = CorePikkuFunction<In, Out, RequiredServices, Session, PickRequired<PikkuWire<In, Out, true, Session, TypedPikkuRPC, null, any, TypedWorkflow>, RequiredWires>>;
228
+ /**
229
+ * Helper type to infer the output type from a Standard Schema
230
+ */
231
+ export type InferSchemaOutput<T> = T extends StandardSchemaV1<any, infer Output> ? Output : never;
232
+ /**
233
+ * Configuration object for Pikku functions with optional middleware, permissions, tags, and documentation.
234
+ * This type wraps CorePikkuFunctionConfig with the user's custom types.
235
+ *
236
+ * @template In - The input type
237
+ * @template Out - The output type
238
+ * @template PikkuFunc - The function type (can be narrowed to PikkuFunction or PikkuFunctionSessionless)
239
+ */
240
+ export type PikkuFunctionConfig<In = unknown, Out = unknown, RequiredWires extends keyof PikkuWire = never, PikkuFunc extends PikkuFunction<In, Out, RequiredWires> | PikkuFunctionSessionless<In, Out, RequiredWires> = PikkuFunction<In, Out, RequiredWires> | PikkuFunctionSessionless<In, Out, RequiredWires>, InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined> = CorePikkuFunctionConfig<PikkuFunc, PikkuPermission<In>, PikkuMiddleware, InputSchema, OutputSchema>;
241
+ /**
242
+ * Configuration object for Pikku functions with Zod schema validation.
243
+ * Use this when you want to define input/output schemas using Zod.
244
+ * Types are automatically inferred from the schemas.
245
+ */
246
+ type SchemaInferred<S, Fallback = unknown> = S extends StandardSchemaV1 ? InferSchemaOutput<S> : Fallback;
247
+ /**
248
+ * Schema-overload variant for pikkuFunc. Derived from CorePikkuFunctionConfig
249
+ * so adding a field on the core type automatically propagates here.
250
+ */
251
+ export type PikkuFunctionConfigWithSchema<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined, RequiredWires extends keyof PikkuWire = never> = Omit<CorePikkuFunctionConfig<PikkuFunction<SchemaInferred<InputSchema>, SchemaInferred<OutputSchema>, RequiredWires> | PikkuFunctionSessionless<SchemaInferred<InputSchema>, SchemaInferred<OutputSchema>, RequiredWires>>, 'func' | 'input' | 'output' | 'permissions' | 'approvalDescription'> & {
252
+ func: PikkuFunction<SchemaInferred<InputSchema>, SchemaInferred<OutputSchema>, RequiredWires> | PikkuFunctionSessionless<SchemaInferred<InputSchema>, SchemaInferred<OutputSchema>, RequiredWires>;
253
+ input?: InputSchema;
254
+ output?: OutputSchema;
255
+ permissions?: InputSchema extends StandardSchemaV1 ? CorePermissionGroup<PikkuPermission<InferSchemaOutput<InputSchema>>> : undefined;
256
+ approvalDescription?: InputSchema extends StandardSchemaV1 ? PikkuApprovalDescription<InferSchemaOutput<InputSchema>> : never;
257
+ };
258
+ /**
259
+ * Creates a Pikku function that can be either session-aware or sessionless.
260
+ * This is the main function wrapper for creating API endpoints.
261
+ *
262
+ * Supports two patterns:
263
+ * 1. Generic types: `pikkuFunc<Input, Output>({ func: ... })`
264
+ * 2. Zod schemas: `pikkuFunc({ input: z.object(...), output: z.object(...), func: ... })`
265
+ *
266
+ * @template In - Input type for the function (inferred from schema if provided)
267
+ * @template Out - Output type for the function (inferred from schema if provided)
268
+ * @param func - Function definition, either direct function or configuration object
269
+ * @returns The normalized configuration object
270
+ *
271
+ * @example
272
+ * ```typescript
273
+ * // Pattern 1: Using generic types
274
+ * const createUser = pikkuFunc<{name: string, email: string}, {id: number}>({
275
+ * func: async ({db}, input) => {
276
+ * const user = await db.users.create(input)
277
+ * return { id: user.id }
278
+ * }
279
+ * })
280
+ *
281
+ * // Pattern 2: Using Zod schemas (types inferred automatically)
282
+ * const createUserInput = z.object({ name: z.string(), email: z.string() })
283
+ * const createUserOutput = z.object({ id: z.number() })
284
+ *
285
+ * const createUser = pikkuFunc({
286
+ * input: createUserInput,
287
+ * output: createUserOutput,
288
+ * func: async ({db}, input) => {
289
+ * // input is typed as { name: string, email: string }
290
+ * const user = await db.users.create(input)
291
+ * return { id: user.id } // must match output schema
292
+ * }
293
+ * })
294
+ * ```
295
+ */
296
+ export declare function pikkuFunc<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined>(config: PikkuFunctionConfigWithSchema<InputSchema, OutputSchema, 'session' | 'rpc'>): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'session' | 'rpc'>;
297
+ export declare function pikkuFunc<In, Out = unknown>(func: PikkuFunction<In, Out, 'session' | 'rpc'> | PikkuFunctionConfig<In, Out, 'session' | 'rpc'>): PikkuFunctionConfig<In, Out, 'session' | 'rpc'>;
298
+ export type PikkuListFunction<F extends Record<string, unknown> = {}, Row = unknown, S extends string = never> = PikkuFunction<ListInput<F, S>, ListOutput<Row>, 'session' | 'rpc'> | PikkuFunctionSessionless<ListInput<F, S>, ListOutput<Row>, 'session' | 'rpc'>;
299
+ export declare const pikkuListFunc: <F extends Record<string, unknown> = {}, Row = unknown, S extends string = never>(config: PikkuFunctionConfig<ListInput<F, S>, ListOutput<Row>, "session" | "rpc">) => PikkuFunctionConfig<ListInput<F, S>, ListOutput<Row>, "session" | "rpc">;
300
+ /**
301
+ * Configuration object for sessionless Pikku functions with Zod schema validation.
302
+ */
303
+ /**
304
+ * Schema-overload variant for pikkuSessionlessFunc. Derived from
305
+ * CorePikkuFunctionConfig to stay in sync with the generic-typed config.
306
+ */
307
+ export type PikkuFunctionSessionlessConfigWithSchema<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined, RequiredWires extends keyof PikkuWire = never> = Omit<CorePikkuFunctionConfig<PikkuFunctionSessionless<SchemaInferred<InputSchema>, SchemaInferred<OutputSchema>, RequiredWires>>, 'func' | 'input' | 'output' | 'permissions' | 'approvalDescription'> & {
308
+ func: PikkuFunctionSessionless<SchemaInferred<InputSchema>, SchemaInferred<OutputSchema>, RequiredWires>;
309
+ input?: InputSchema;
310
+ output?: OutputSchema;
311
+ permissions?: InputSchema extends StandardSchemaV1 ? CorePermissionGroup<PikkuPermission<InferSchemaOutput<InputSchema>>> : undefined;
312
+ approvalDescription?: InputSchema extends StandardSchemaV1 ? PikkuApprovalDescription<InferSchemaOutput<InputSchema>> : never;
313
+ };
314
+ /**
315
+ * Creates a sessionless Pikku function that doesn't require user authentication.
316
+ * Use this for public endpoints, webhooks, or background tasks.
317
+ *
318
+ * Supports two patterns:
319
+ * 1. Generic types: `pikkuSessionlessFunc<Input, Output>({ func: ... })`
320
+ * 2. Zod schemas: `pikkuSessionlessFunc({ input: z.object(...), func: ... })`
321
+ *
322
+ * @template In - Input type for the function (inferred from schema if provided)
323
+ * @template Out - Output type for the function (inferred from schema if provided)
324
+ * @param func - Function definition, either direct function or configuration object
325
+ * @returns The normalized configuration object
326
+ *
327
+ * @example
328
+ * ```typescript
329
+ * // Pattern 1: Using generic types
330
+ * const healthCheck = pikkuSessionlessFunc<void, {status: string}>({
331
+ * func: async ({logger}) => {
332
+ * return { status: 'healthy' }
333
+ * }
334
+ * })
335
+ *
336
+ * // Pattern 2: Using Zod schemas
337
+ * const greetInput = z.object({ name: z.string() })
338
+ * const greetOutput = z.object({ message: z.string() })
339
+ *
340
+ * const greet = pikkuSessionlessFunc({
341
+ * input: greetInput,
342
+ * output: greetOutput,
343
+ * func: async (_services, { name }) => {
344
+ * return { message: `Hello, ${name}!` }
345
+ * }
346
+ * })
347
+ * ```
348
+ */
349
+ export declare function pikkuSessionlessFunc<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined>(config: PikkuFunctionSessionlessConfigWithSchema<InputSchema, OutputSchema, 'session' | 'rpc'>): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'session' | 'rpc'>;
350
+ export declare function pikkuSessionlessFunc<In, Out = unknown>(func: PikkuFunctionSessionless<In, Out, 'session' | 'rpc'> | PikkuFunctionConfig<In, Out, 'session' | 'rpc'>): PikkuFunctionConfig<In, Out, 'session' | 'rpc'>;
351
+ /**
352
+ * Creates a function that takes no input and returns no output.
353
+ * Useful for health checks, triggers, or cleanup operations.
354
+ *
355
+ * @param func - Function definition, either direct function or configuration object
356
+ * @returns The normalized configuration object
357
+ *
358
+ * @example
359
+ * ```typescript
360
+ * const cleanupTempFiles = pikkuVoidFunc(async ({fileSystem, logger}) => {
361
+ * logger.info('Starting cleanup of temporary files')
362
+ * await fileSystem.deleteDirectory('/tmp/uploads')
363
+ * logger.info('Cleanup completed')
364
+ * })
365
+ * ```
366
+ */
367
+ export declare const pikkuVoidFunc: (func: PikkuFunctionSessionless<void, void, "session" | "rpc"> | PikkuFunctionConfig<void, void, "session" | "rpc">) => PikkuFunctionConfig<void, void, "rpc" | "session", PikkuFunctionSessionless<void, void, "rpc" | "session", Services> | PikkuFunction<void, void, "rpc" | "session", Services>, undefined, undefined>;
368
+ /**
369
+ * References a registered function by name for use in any wiring.
370
+ * Works for both local and addon functions — resolves via RPC at runtime.
371
+ *
372
+ * @template Name - The function name (must be a key in FlattenedRPCMap)
373
+ * @param rpcName - The name of the function to reference
374
+ * @returns A Pikku function config that proxies calls via RPC
375
+ *
376
+ * @example
377
+ * ```typescript
378
+ * // Use in agent tools
379
+ * tools: [ref('todos:listTodos'), ref('myLocalFunc')]
380
+ *
381
+ * // Use in HTTP wiring
382
+ * wireHTTP({ route: '/greet', method: 'post', func: ref('greet') })
383
+ * ```
384
+ */
385
+ export declare const ref: <Name extends keyof FlattenedRPCMap>(rpcName: Name) => PikkuFunctionConfig<FlattenedRPCMap[Name]["input"], FlattenedRPCMap[Name]["output"], "session" | "rpc">;
386
+ /**
387
+ * Creates a Pikku config factory.
388
+ * Use this to define your application's configuration factory.
389
+ *
390
+ * @param func - Config factory function that returns your application's config
391
+ * @returns The config factory function
392
+ *
393
+ * @example
394
+ * ```typescript
395
+ * export const createConfig = pikkuConfig(async () => {
396
+ * return {
397
+ * apiUrl: process.env.API_URL || 'http://localhost:3000',
398
+ * dbUrl: process.env.DATABASE_URL
399
+ * }
400
+ * })
401
+ * ```
402
+ */
403
+ export declare const pikkuConfig: (func: (variables?: any, ...args: any[]) => Promise<Config>) => (variables?: any, ...args: any[]) => Promise<Config>;
404
+ /**
405
+ * Creates a Pikku singleton services factory.
406
+ * Use this to define services that are created once and shared across all requests.
407
+ *
408
+ * @param func - Singleton services factory function
409
+ * @returns The singleton services factory function
410
+ *
411
+ * @example
412
+ * ```typescript
413
+ * export const createSingletonServices = pikkuServices(async (config, existingServices) => {
414
+ * return {
415
+ * config,
416
+ * logger: new CustomLogger(),
417
+ * db: await createDatabaseConnection(config.dbUrl)
418
+ * }
419
+ * })
420
+ * ```
421
+ */
422
+ export declare const pikkuServices: (func: (config: Config, existingServices: Partial<SingletonServices>) => Promise<Partial<Omit<RequiredSingletonServices, "auth">>>) => (config: Config, existingServices?: Partial<SingletonServices>) => Promise<RequiredSingletonServices>;
423
+ /**
424
+ * Creates a Pikku wire services factory.
425
+ * Use this to define services that are created per-request/session.
426
+ *
427
+ * @param func - Wire services factory function
428
+ * @returns The wire services factory function
429
+ *
430
+ * @example
431
+ * ```typescript
432
+ * export const createWireServices = pikkuWireServices(async (services, wire) => {
433
+ * const session = await wire.session?.get()
434
+ * return {
435
+ * userCache: new UserCache(session?.userId)
436
+ * }
437
+ * })
438
+ * ```
439
+ */
440
+ export declare const pikkuWireServices: (func: (services: SingletonServices, wire: any) => Promise<RequiredWireServices>) => CreateWireServices;
441
+ /**
442
+ * Tag-scoped middleware. Applies to any wiring that carries the matching tag.
443
+ *
444
+ * @example
445
+ * addTagMiddleware('admin', [adminMiddleware])
446
+ */
447
+ export declare const addTagMiddleware: (tag: string, middleware: PikkuMiddleware[]) => void;
448
+ /**
449
+ * Wire-agnostic global middleware. Runs at the top of every wiring's
450
+ * middleware chain — before wire-, tag-, and function-level entries.
451
+ *
452
+ * Resolution order: global -> wire -> tag -> function.
453
+ *
454
+ * @example
455
+ * addGlobalMiddleware([telemetryMiddleware])
456
+ */
457
+ export declare const addGlobalMiddleware: (middleware: PikkuMiddleware[]) => void;
458
+ /**
459
+ * Tag-scoped permissions. Applies to any wiring that carries the matching tag.
460
+ *
461
+ * @example
462
+ * addTagPermission('admin', [adminPermission])
463
+ */
464
+ export declare const addTagPermission: <In = unknown>(tag: string, permissions: CorePermissionGroup<PikkuPermission<In>> | PikkuPermission<In>[]) => void;
465
+ /**
466
+ * Wire-agnostic global permissions. Runs at the top of every wiring's
467
+ * permission resolution — before wire-, tag-, and function-level entries.
468
+ *
469
+ * Resolution order: global -> wire -> tag -> function.
470
+ *
471
+ * @example
472
+ * addGlobalPermission([signedInUser])
473
+ */
474
+ export declare const addGlobalPermission: <In = unknown>(permissions: CorePermissionGroup<PikkuPermission<In>> | PikkuPermission<In>[]) => void;
475
+ export { wireAddon } from '@pikku/core/rpc';
476
+ export type { WireAddonConfig } from '@pikku/core/rpc';
477
+ /**
478
+ * Addon contract references. Generated from each wired addon's published
479
+ * contract metadata — no addon source is imported. Functions are proxied via
480
+ * ref() (RPC) exactly like ref('namespace:fn').
481
+ */
482
+ declare const __addonHttp: {};
483
+ declare const __addonChannel: {};
484
+ declare const __addonCli: {};
485
+ export declare const refHTTP: <Name extends keyof typeof __addonHttp>(name: Name, options?: {
486
+ basePath?: string;
487
+ }) => (typeof __addonHttp)[Name];
488
+ export declare const refChannel: <Name extends keyof typeof __addonChannel>(name: Name) => (typeof __addonChannel)[Name];
489
+ export declare const refCLI: <Name extends keyof typeof __addonCli>(name: Name) => (typeof __addonCli)[Name];
490
+ //# sourceMappingURL=pikku-function-types.gen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pikku-function-types.gen.d.ts","sourceRoot":"","sources":["../../../.pikku/function/pikku-function-types.gen.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;GAEG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC3H,OAAO,KAAK,EAAE,uBAAuB,EAAE,aAAa,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAQ5H,OAAO,EAA8B,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACrF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,EAAE,iBAAiB,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAA;AAEtF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAA;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAA;AAC3E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAA;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAA;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAA;AACp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