@pikku/cli 0.10.2 → 0.11.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 (165) hide show
  1. package/.pikku/channel/pikku-channel-types.gen.ts +1 -1
  2. package/.pikku/channel/pikku-channels-map.gen.d.ts +4 -1
  3. package/.pikku/channel/pikku-channels-meta.gen.ts +1 -1
  4. package/.pikku/channel/pikku-channels.gen.ts +1 -1
  5. package/.pikku/cli/pikku-cli-types.gen.ts +1 -1
  6. package/.pikku/cli/pikku-cli-wirings-meta.gen.ts +5 -2
  7. package/.pikku/cli/pikku-cli-wirings.gen.ts +1 -1
  8. package/.pikku/function/pikku-function-types.gen.ts +1 -1
  9. package/.pikku/function/pikku-functions-meta.gen.ts +110 -1
  10. package/.pikku/function/pikku-functions-meta.min.gen.ts +26 -1
  11. package/.pikku/function/pikku-functions.gen.ts +9 -1
  12. package/.pikku/http/pikku-http-types.gen.ts +1 -1
  13. package/.pikku/http/pikku-http-wirings-map.gen.d.ts +4 -1
  14. package/.pikku/http/pikku-http-wirings-meta.gen.ts +1 -1
  15. package/.pikku/http/pikku-http-wirings.gen.ts +1 -1
  16. package/.pikku/mcp/pikku-mcp-types.gen.ts +1 -1
  17. package/.pikku/mcp/pikku-mcp-wirings-meta.gen.ts +1 -1
  18. package/.pikku/mcp/pikku-mcp-wirings.gen.ts +1 -1
  19. package/.pikku/pikku-bootstrap.gen.ts +4 -1
  20. package/.pikku/pikku-services.gen.ts +6 -1
  21. package/.pikku/pikku-types.gen.ts +1 -1
  22. package/.pikku/pikku-websocket.gen.ts +1 -1
  23. package/.pikku/queue/pikku-queue-types.gen.ts +1 -1
  24. package/.pikku/queue/pikku-queue-workers-wirings-map.gen.d.ts +4 -1
  25. package/.pikku/queue/pikku-queue-workers-wirings-meta.gen.ts +7 -2
  26. package/.pikku/queue/pikku-queue-workers-wirings.gen.ts +1 -1
  27. package/.pikku/rpc/pikku-remote-rpc-workers.gen.ts +27 -0
  28. package/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +12 -2
  29. package/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +17 -2
  30. package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +7 -2
  31. package/.pikku/scheduler/pikku-scheduler-types.gen.ts +1 -1
  32. package/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.ts +1 -1
  33. package/.pikku/scheduler/pikku-schedulers-wirings.gen.ts +1 -1
  34. package/.pikku/schemas/register.gen.ts +13 -1
  35. package/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
  36. package/.pikku/schemas/schemas/PikkuPublicRPCOutput.schema.json +1 -0
  37. package/.pikku/schemas/schemas/PikkuRemoteRPCOutput.schema.json +1 -0
  38. package/.pikku/schemas/schemas/PikkuWorkflowOutput.schema.json +1 -0
  39. package/.pikku/workflow/pikku-workflow-map.gen.d.ts +62 -0
  40. package/.pikku/workflow/pikku-workflow-types.gen.ts +92 -0
  41. package/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +5 -0
  42. package/.pikku/workflow/pikku-workflow-wirings.gen.ts +4 -0
  43. package/CHANGELOG.md +8 -0
  44. package/cli.schema.json +1 -1
  45. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
  46. package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
  47. package/dist/.pikku/channel/pikku-channels-meta.gen.js +1 -1
  48. package/dist/.pikku/channel/pikku-channels.gen.d.ts +1 -1
  49. package/dist/.pikku/channel/pikku-channels.gen.js +1 -1
  50. package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +1 -1
  51. package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
  52. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +5 -2
  53. package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
  54. package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
  55. package/dist/.pikku/function/pikku-function-types.gen.d.ts +1 -1
  56. package/dist/.pikku/function/pikku-function-types.gen.js +1 -1
  57. package/dist/.pikku/function/pikku-functions-meta.gen.js +110 -1
  58. package/dist/.pikku/function/pikku-functions-meta.min.gen.js +26 -1
  59. package/dist/.pikku/function/pikku-functions.gen.js +9 -1
  60. package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
  61. package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
  62. package/dist/.pikku/http/pikku-http-wirings-meta.gen.js +1 -1
  63. package/dist/.pikku/http/pikku-http-wirings.gen.d.ts +1 -1
  64. package/dist/.pikku/http/pikku-http-wirings.gen.js +1 -1
  65. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
  66. package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
  67. package/dist/.pikku/mcp/pikku-mcp-wirings-meta.gen.js +1 -1
  68. package/dist/.pikku/mcp/pikku-mcp-wirings.gen.d.ts +1 -1
  69. package/dist/.pikku/mcp/pikku-mcp-wirings.gen.js +1 -1
  70. package/dist/.pikku/pikku-bootstrap.gen.d.ts +4 -1
  71. package/dist/.pikku/pikku-bootstrap.gen.js +4 -1
  72. package/dist/.pikku/pikku-services.gen.d.ts +8 -2
  73. package/dist/.pikku/pikku-services.gen.js +7 -1
  74. package/dist/.pikku/pikku-types.gen.d.ts +1 -1
  75. package/dist/.pikku/pikku-types.gen.js +1 -1
  76. package/dist/.pikku/pikku-websocket.gen.d.ts +1 -1
  77. package/dist/.pikku/pikku-websocket.gen.js +1 -1
  78. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
  79. package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
  80. package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +7 -2
  81. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +1 -1
  82. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +1 -1
  83. package/dist/.pikku/rpc/pikku-remote-rpc-workers.gen.d.ts +17 -0
  84. package/dist/.pikku/rpc/pikku-remote-rpc-workers.gen.js +22 -0
  85. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +7 -2
  86. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
  87. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
  88. package/dist/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.js +1 -1
  89. package/dist/.pikku/scheduler/pikku-schedulers-wirings.gen.d.ts +1 -1
  90. package/dist/.pikku/scheduler/pikku-schedulers-wirings.gen.js +1 -1
  91. package/dist/.pikku/schemas/register.gen.js +7 -1
  92. package/dist/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
  93. package/dist/.pikku/schemas/schemas/PikkuPublicRPCOutput.schema.json +1 -0
  94. package/dist/.pikku/schemas/schemas/PikkuRemoteInternalRPCInput.schema.json +1 -0
  95. package/dist/.pikku/schemas/schemas/PikkuRemoteRPCOutput.schema.json +1 -0
  96. package/dist/.pikku/schemas/schemas/PikkuWorkflowOutput.schema.json +1 -0
  97. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +58 -0
  98. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +28 -0
  99. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.d.ts +1 -0
  100. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +5 -0
  101. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +4 -0
  102. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +5 -0
  103. package/dist/src/functions/commands/all.js +20 -0
  104. package/dist/src/functions/commands/bootstrap.js +1 -0
  105. package/dist/src/functions/wirings/cli/serialize-channel-cli-client.js +15 -22
  106. package/dist/src/functions/wirings/queue/pikku-queue.js +9 -1
  107. package/dist/src/functions/wirings/queue/serialize-queue-map.d.ts +2 -2
  108. package/dist/src/functions/wirings/queue/serialize-queue-meta.d.ts +2 -2
  109. package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.d.ts +1 -0
  110. package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.js +23 -0
  111. package/dist/src/functions/wirings/rpc/pikku-command-remote-rpc.d.ts +1 -0
  112. package/dist/src/functions/wirings/rpc/pikku-command-remote-rpc.js +23 -0
  113. package/dist/src/functions/wirings/rpc/serialize-public-rpc.d.ts +4 -0
  114. package/dist/src/functions/wirings/rpc/serialize-public-rpc.js +30 -0
  115. package/dist/src/functions/wirings/rpc/serialize-remote-rpc.d.ts +4 -0
  116. package/dist/src/functions/wirings/rpc/serialize-remote-rpc.js +30 -0
  117. package/dist/src/functions/wirings/rpc/serialize-rpc-wrapper.js +2 -2
  118. package/dist/src/functions/wirings/rpc/serialize-typed-rpc-map.js +27 -3
  119. package/dist/src/functions/wirings/workflow/pikku-command-workflow-map.d.ts +1 -0
  120. package/dist/src/functions/wirings/workflow/pikku-command-workflow-map.js +12 -0
  121. package/dist/src/functions/wirings/workflow/pikku-command-workflow-types.d.ts +1 -0
  122. package/dist/src/functions/wirings/workflow/pikku-command-workflow-types.js +11 -0
  123. package/dist/src/functions/wirings/workflow/pikku-command-workflow.d.ts +1 -0
  124. package/dist/src/functions/wirings/workflow/pikku-command-workflow.js +55 -0
  125. package/dist/src/functions/wirings/workflow/serialize-workflow-map.d.ts +4 -0
  126. package/dist/src/functions/wirings/workflow/serialize-workflow-map.js +79 -0
  127. package/dist/src/functions/wirings/workflow/serialize-workflow-meta.d.ts +2 -0
  128. package/dist/src/functions/wirings/workflow/serialize-workflow-meta.js +10 -0
  129. package/dist/src/functions/wirings/workflow/serialize-workflow-types.d.ts +4 -0
  130. package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +95 -0
  131. package/dist/src/functions/wirings/workflow/serialize-workflow-workers.d.ts +4 -0
  132. package/dist/src/functions/wirings/workflow/serialize-workflow-workers.js +60 -0
  133. package/dist/src/services/cli-logger-forwarder.service.js +1 -1
  134. package/dist/src/services/cli-logger.service.js +1 -1
  135. package/dist/src/utils/command-summary.d.ts +1 -0
  136. package/dist/src/utils/command-summary.js +9 -8
  137. package/dist/src/utils/pikku-cli-config.js +24 -4
  138. package/dist/src/utils/schema-generator.js +28 -7
  139. package/dist/tsconfig.tsbuildinfo +1 -1
  140. package/package.json +3 -3
  141. package/src/functions/commands/all.ts +28 -0
  142. package/src/functions/commands/bootstrap.ts +1 -0
  143. package/src/functions/wirings/cli/serialize-channel-cli-client.ts +15 -22
  144. package/src/functions/wirings/queue/pikku-queue.ts +10 -1
  145. package/src/functions/wirings/queue/serialize-queue-map.ts +3 -3
  146. package/src/functions/wirings/queue/serialize-queue-meta.ts +2 -2
  147. package/src/functions/wirings/rpc/pikku-command-public-rpc.ts +32 -0
  148. package/src/functions/wirings/rpc/pikku-command-remote-rpc.ts +35 -0
  149. package/src/functions/wirings/rpc/serialize-public-rpc.ts +30 -0
  150. package/src/functions/wirings/rpc/serialize-remote-rpc.ts +30 -0
  151. package/src/functions/wirings/rpc/serialize-rpc-wrapper.ts +2 -2
  152. package/src/functions/wirings/rpc/serialize-typed-rpc-map.ts +26 -3
  153. package/src/functions/wirings/workflow/pikku-command-workflow-map.ts +24 -0
  154. package/src/functions/wirings/workflow/pikku-command-workflow-types.ts +22 -0
  155. package/src/functions/wirings/workflow/pikku-command-workflow.ts +123 -0
  156. package/src/functions/wirings/workflow/serialize-workflow-map.ts +123 -0
  157. package/src/functions/wirings/workflow/serialize-workflow-meta.ts +16 -0
  158. package/src/functions/wirings/workflow/serialize-workflow-types.ts +95 -0
  159. package/src/functions/wirings/workflow/serialize-workflow-workers.ts +60 -0
  160. package/src/services/cli-logger-forwarder.service.ts +1 -1
  161. package/src/services/cli-logger.service.ts +1 -1
  162. package/src/utils/command-summary.ts +10 -8
  163. package/src/utils/pikku-cli-config.ts +44 -4
  164. package/src/utils/schema-generator.ts +25 -7
  165. package/types/config.d.ts +45 -0
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  /**
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  /**
5
5
  * This provides the structure needed for TypeScript to be aware of channels
@@ -18,8 +18,11 @@ export type PikkuMCPOutput = false | true
18
18
  export type PikkuMiddlewareOutput = false | true
19
19
  export type PikkuPermissionsOutput = false | true
20
20
  export type PikkuQueueOutput = false | true
21
+ export type PikkuPublicRPCOutput = false | true
22
+ export type PikkuRemoteRPCOutput = false | true
21
23
  export type PikkuRPCOutput = false | true
22
24
  export type PikkuSchedulerOutput = false | true
25
+ export type PikkuWorkflowOutput = false | true
23
26
 
24
27
  interface ChannelHandler<I, O> {
25
28
  input: I;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  import { pikkuState } from '@pikku/core'
5
5
  pikkuState('channel', 'meta', {})
@@ -1,4 +1,4 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  /* The files with an addChannel function call */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  /**
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  import { pikkuState } from '@pikku/core'
5
5
  pikkuState('cli', 'meta', {
@@ -16,7 +16,10 @@ pikkuState('cli', 'meta', {
16
16
  "schema",
17
17
  "jwt",
18
18
  "config",
19
- "variables"
19
+ "variables",
20
+ "workflowService",
21
+ "queueService",
22
+ "schedulerService"
20
23
  ]
21
24
  },
22
25
  "filePath": "src/services.ts"
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  /* The files with an wireCLI function call */
5
5
  import '../../src/services.js'
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  /**
5
5
  * Core function, middleware, and permission types for all wirings
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  import { pikkuState } from '@pikku/core'
5
5
  pikkuState('function', 'meta', {
@@ -714,6 +714,56 @@ pikkuState('function', 'meta', {
714
714
  }
715
715
  ]
716
716
  },
717
+ "pikkuPublicRPC": {
718
+ "pikkuFuncName": "pikkuPublicRPC",
719
+ "name": "pikkuPublicRPC",
720
+ "services": {
721
+ "optimized": true,
722
+ "services": [
723
+ "logger",
724
+ "config"
725
+ ]
726
+ },
727
+ "inputSchemaName": null,
728
+ "outputSchemaName": "PikkuPublicRPCOutput",
729
+ "inputs": [],
730
+ "outputs": [
731
+ "PikkuPublicRPCOutput"
732
+ ],
733
+ "isDirectFunction": false,
734
+ "middleware": [
735
+ {
736
+ "type": "wire",
737
+ "name": "logCommandInfoAndTime",
738
+ "inline": false
739
+ }
740
+ ]
741
+ },
742
+ "pikkuRemoteRPC": {
743
+ "pikkuFuncName": "pikkuRemoteRPC",
744
+ "name": "pikkuRemoteRPC",
745
+ "services": {
746
+ "optimized": true,
747
+ "services": [
748
+ "logger",
749
+ "config"
750
+ ]
751
+ },
752
+ "inputSchemaName": null,
753
+ "outputSchemaName": "PikkuRemoteRPCOutput",
754
+ "inputs": [],
755
+ "outputs": [
756
+ "PikkuRemoteRPCOutput"
757
+ ],
758
+ "isDirectFunction": false,
759
+ "middleware": [
760
+ {
761
+ "type": "wire",
762
+ "name": "logCommandInfoAndTime",
763
+ "inline": false
764
+ }
765
+ ]
766
+ },
717
767
  "pikkuRPCClient": {
718
768
  "pikkuFuncName": "pikkuRPCClient",
719
769
  "name": "pikkuRPCClient",
@@ -859,5 +909,64 @@ pikkuState('function', 'meta', {
859
909
  "inline": false
860
910
  }
861
911
  ]
912
+ },
913
+ "pikkuWorkflowMap": {
914
+ "pikkuFuncName": "pikkuWorkflowMap",
915
+ "name": "pikkuWorkflowMap",
916
+ "services": {
917
+ "optimized": true,
918
+ "services": [
919
+ "logger",
920
+ "config",
921
+ "getInspectorState"
922
+ ]
923
+ },
924
+ "inputSchemaName": null,
925
+ "outputSchemaName": null,
926
+ "inputs": [],
927
+ "outputs": [],
928
+ "isDirectFunction": false
929
+ },
930
+ "pikkuWorkflowTypes": {
931
+ "pikkuFuncName": "pikkuWorkflowTypes",
932
+ "name": "pikkuWorkflowTypes",
933
+ "services": {
934
+ "optimized": true,
935
+ "services": [
936
+ "logger",
937
+ "config"
938
+ ]
939
+ },
940
+ "inputSchemaName": null,
941
+ "outputSchemaName": null,
942
+ "inputs": [],
943
+ "outputs": [],
944
+ "isDirectFunction": false
945
+ },
946
+ "pikkuWorkflow": {
947
+ "pikkuFuncName": "pikkuWorkflow",
948
+ "name": "pikkuWorkflow",
949
+ "services": {
950
+ "optimized": true,
951
+ "services": [
952
+ "logger",
953
+ "config",
954
+ "getInspectorState"
955
+ ]
956
+ },
957
+ "inputSchemaName": null,
958
+ "outputSchemaName": "PikkuWorkflowOutput",
959
+ "inputs": [],
960
+ "outputs": [
961
+ "PikkuWorkflowOutput"
962
+ ],
963
+ "isDirectFunction": false,
964
+ "middleware": [
965
+ {
966
+ "type": "wire",
967
+ "name": "logCommandInfoAndTime",
968
+ "inline": false
969
+ }
970
+ ]
862
971
  }
863
972
  })
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  import { pikkuState } from '@pikku/core'
5
5
  pikkuState('function', 'meta', {
@@ -153,6 +153,16 @@ pikkuState('function', 'meta', {
153
153
  "inputSchemaName": null,
154
154
  "outputSchemaName": "PikkuQueueOutput"
155
155
  },
156
+ "pikkuPublicRPC": {
157
+ "pikkuFuncName": "pikkuPublicRPC",
158
+ "inputSchemaName": null,
159
+ "outputSchemaName": "PikkuPublicRPCOutput"
160
+ },
161
+ "pikkuRemoteRPC": {
162
+ "pikkuFuncName": "pikkuRemoteRPC",
163
+ "inputSchemaName": null,
164
+ "outputSchemaName": "PikkuRemoteRPCOutput"
165
+ },
156
166
  "pikkuRPCClient": {
157
167
  "pikkuFuncName": "pikkuRPCClient",
158
168
  "inputSchemaName": null,
@@ -182,5 +192,20 @@ pikkuState('function', 'meta', {
182
192
  "pikkuFuncName": "pikkuScheduler",
183
193
  "inputSchemaName": null,
184
194
  "outputSchemaName": "PikkuSchedulerOutput"
195
+ },
196
+ "pikkuWorkflowMap": {
197
+ "pikkuFuncName": "pikkuWorkflowMap",
198
+ "inputSchemaName": null,
199
+ "outputSchemaName": null
200
+ },
201
+ "pikkuWorkflowTypes": {
202
+ "pikkuFuncName": "pikkuWorkflowTypes",
203
+ "inputSchemaName": null,
204
+ "outputSchemaName": null
205
+ },
206
+ "pikkuWorkflow": {
207
+ "pikkuFuncName": "pikkuWorkflow",
208
+ "inputSchemaName": null,
209
+ "outputSchemaName": "PikkuWorkflowOutput"
185
210
  }
186
211
  })
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  /* Import and register functions used by RPCs */
5
5
  import { addFunction } from '@pikku/core'
@@ -28,6 +28,7 @@ import { pikkuQueue } from '../../src/functions/wirings/queue/pikku-queue.js'
28
28
  import { pikkuQueueMap } from '../../src/functions/wirings/queue/pikku-queue-map.js'
29
29
  import { pikkuQueueService } from '../../src/functions/wirings/queue/pikku-command-queue-service.js'
30
30
  import { pikkuQueueTypes } from '../../src/functions/wirings/queue/pikku-command-queue-types.js'
31
+ import { pikkuRemoteRPC } from '../../src/functions/wirings/rpc/pikku-command-remote-rpc.js'
31
32
  import { pikkuRPC } from '../../src/functions/wirings/rpc/pikku-command-rpc.js'
32
33
  import { pikkuRPCClient } from '../../src/functions/wirings/rpc/pikku-command-rpc-client.js'
33
34
  import { pikkuRPCExposedMap } from '../../src/functions/wirings/rpc/pikku-command-rpc-map.js'
@@ -37,6 +38,9 @@ import { pikkuSchedulerTypes } from '../../src/functions/wirings/scheduler/pikku
37
38
  import { pikkuSchemas } from '../../src/functions/wirings/functions/schemas.js'
38
39
  import { pikkuServices } from '../../src/functions/wirings/functions/pikku-command-services.js'
39
40
  import { pikkuWebSocketTyped } from '../../src/functions/wirings/channels/pikku-command-websocket-typed.js'
41
+ import { pikkuWorkflow } from '../../src/functions/wirings/workflow/pikku-command-workflow.js'
42
+ import { pikkuWorkflowMap } from '../../src/functions/wirings/workflow/pikku-command-workflow-map.js'
43
+ import { pikkuWorkflowTypes } from '../../src/functions/wirings/workflow/pikku-command-workflow-types.js'
40
44
  import { watch } from '../../src/functions/commands/watch.js'
41
45
 
42
46
  addFunction('all', all)
@@ -64,6 +68,7 @@ addFunction('pikkuQueue', pikkuQueue)
64
68
  addFunction('pikkuQueueMap', pikkuQueueMap)
65
69
  addFunction('pikkuQueueService', pikkuQueueService)
66
70
  addFunction('pikkuQueueTypes', pikkuQueueTypes)
71
+ addFunction('pikkuRemoteRPC', pikkuRemoteRPC)
67
72
  addFunction('pikkuRPC', pikkuRPC)
68
73
  addFunction('pikkuRPCClient', pikkuRPCClient)
69
74
  addFunction('pikkuRPCExposedMap', pikkuRPCExposedMap)
@@ -73,4 +78,7 @@ addFunction('pikkuSchedulerTypes', pikkuSchedulerTypes)
73
78
  addFunction('pikkuSchemas', pikkuSchemas)
74
79
  addFunction('pikkuServices', pikkuServices)
75
80
  addFunction('pikkuWebSocketTyped', pikkuWebSocketTyped)
81
+ addFunction('pikkuWorkflow', pikkuWorkflow)
82
+ addFunction('pikkuWorkflowMap', pikkuWorkflowMap)
83
+ addFunction('pikkuWorkflowTypes', pikkuWorkflowTypes)
76
84
  addFunction('watch', watch)
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  /**
5
5
  * HTTP-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  /**
5
5
  * This provides the structure needed for typescript to be aware of routes and their return types
@@ -18,8 +18,11 @@ export type PikkuMCPOutput = false | true
18
18
  export type PikkuMiddlewareOutput = false | true
19
19
  export type PikkuPermissionsOutput = false | true
20
20
  export type PikkuQueueOutput = false | true
21
+ export type PikkuPublicRPCOutput = false | true
22
+ export type PikkuRemoteRPCOutput = false | true
21
23
  export type PikkuRPCOutput = false | true
22
24
  export type PikkuSchedulerOutput = false | true
25
+ export type PikkuWorkflowOutput = false | true
23
26
 
24
27
  // The '& {}' is a workaround for not directly refering to a type since it confuses typescript
25
28
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  import { pikkuState } from '@pikku/core'
5
5
  pikkuState('http', 'meta', {
@@ -1,4 +1,4 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  /* The files with an wireHTTP function call */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  /**
5
5
  * MCP-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  import { pikkuState } from '@pikku/core'
5
5
  pikkuState('mcp', 'resourcesMeta', {})
@@ -1,4 +1,4 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  /* The files with an wireMCPResource or wireMCPTool function call */
@@ -1,10 +1,11 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  import './cli/pikku-cli-wirings-meta.gen.js'
5
5
  import './mcp/pikku-mcp-wirings-meta.gen.js'
6
6
  import './channel/pikku-channels-meta.gen.js'
7
7
  import './queue/pikku-queue-workers-wirings-meta.gen.js'
8
+ import './workflow/pikku-workflow-wirings-meta.gen.js'
8
9
  import './scheduler/pikku-schedulers-wirings-meta.gen.js'
9
10
  import './http/pikku-http-wirings-meta.gen.js'
10
11
  import './rpc/pikku-rpc-wirings-meta.internal.gen.js'
@@ -13,6 +14,8 @@ import './function/pikku-functions.gen.js'
13
14
  import './schemas/register.gen.js'
14
15
  import './http/pikku-http-wirings.gen.js'
15
16
  import './scheduler/pikku-schedulers-wirings.gen.js'
17
+ import './workflow/pikku-workflow-wirings.gen.js'
18
+ import './rpc/pikku-remote-rpc-workers.gen.js'
16
19
  import './queue/pikku-queue-workers-wirings.gen.js'
17
20
  import './channel/pikku-channels.gen.js'
18
21
  import './mcp/pikku-mcp-wirings.gen.js'
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  import type { SingletonServices } from '../types/application-types.d.js'
5
5
  import type { Services } from '../types/application-types.d.js'
@@ -10,12 +10,17 @@ export const requiredSingletonServices = {
10
10
  'getInspectorState': false,
11
11
  'jwt': false,
12
12
  'logger': true,
13
+ 'queueService': false,
14
+ 'schedulerService': false,
13
15
  'schema': true,
14
16
  'variables': true,
17
+ 'workflowService': false,
15
18
  } as const
16
19
 
17
20
  // Session services map: true if required, false if available but unused
18
21
  export const requiredSessionServices = {
22
+ 'workflow': false,
23
+ 'workflowStep': false,
19
24
  } as const
20
25
 
21
26
  // Type exports
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  /**
5
5
  * Main type export hub - re-exports all wiring-specific types
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  import { CorePikkuWebsocket, CorePikkuRouteHandler } from '@pikku/websocket'
5
5
  import { ChannelDefaultHandlerOf, ChannelWiringHandlerOf, ChannelsMap } from './channel/pikku-channels-map.gen.d.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  /**
5
5
  * Queue-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  /**
5
5
  * This provides the structure needed for typescript to be aware of Queue workers and their input/output types
@@ -18,8 +18,11 @@ export type PikkuMCPOutput = false | true
18
18
  export type PikkuMiddlewareOutput = false | true
19
19
  export type PikkuPermissionsOutput = false | true
20
20
  export type PikkuQueueOutput = false | true
21
+ export type PikkuPublicRPCOutput = false | true
22
+ export type PikkuRemoteRPCOutput = false | true
21
23
  export type PikkuRPCOutput = false | true
22
24
  export type PikkuSchedulerOutput = false | true
25
+ export type PikkuWorkflowOutput = false | true
23
26
 
24
27
  import type { QueueJob } from '@pikku/core/queue'
25
28
 
@@ -1,5 +1,10 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  import { pikkuState } from '@pikku/core'
5
- pikkuState('queue', 'meta', {})
5
+ pikkuState('queue', 'meta', {
6
+ "pikku-remote-internal-rpc": {
7
+ "pikkuFuncName": "pikkuRemoteInternalRPC",
8
+ "queueName": "pikku-remote-internal-rpc"
9
+ }
10
+ })
@@ -1,4 +1,4 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  /* The files with an addQueueWorkers function call */
@@ -0,0 +1,27 @@
1
+ /**
2
+ * This file was generated by @pikku/cli@0.11.0
3
+ */
4
+ /**
5
+ * Auto-generated remote internal RPC queue worker and HTTP endpoint
6
+ * Do not edit manually - regenerate with 'npx pikku'
7
+ */
8
+ import { pikkuSessionlessFunc, wireQueueWorker } from '../pikku-types.gen.js'
9
+
10
+ /**
11
+ * Generic remote RPC worker that invokes any internal RPC by name
12
+ * This is used for executing internal RPCs via a queue or HTTP (e.g., scheduled tasks, background jobs, internal services)
13
+ */
14
+ export const pikkuRemoteInternalRPC = pikkuSessionlessFunc<
15
+ { rpcName: string, data?: any },
16
+ any
17
+ >({
18
+ func: async ({ rpc }, { rpcName, data }) => {
19
+ return await (rpc.invoke as any)(rpcName, data)
20
+ },
21
+ internal: true,
22
+ })
23
+
24
+ wireQueueWorker({
25
+ queueName: 'pikku-remote-internal-rpc',
26
+ func: pikkuRemoteInternalRPC,
27
+ })
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  /**
5
5
  * This provides the structure needed for typescript to be aware of RPCs and their return types
@@ -18,8 +18,11 @@ export type PikkuMCPOutput = false | true
18
18
  export type PikkuMiddlewareOutput = false | true
19
19
  export type PikkuPermissionsOutput = false | true
20
20
  export type PikkuQueueOutput = false | true
21
+ export type PikkuPublicRPCOutput = false | true
22
+ export type PikkuRemoteRPCOutput = false | true
21
23
  export type PikkuRPCOutput = false | true
22
24
  export type PikkuSchedulerOutput = false | true
25
+ export type PikkuWorkflowOutput = false | true
23
26
 
24
27
  interface RPCHandler<I, O> {
25
28
  input: I;
@@ -38,10 +41,17 @@ export type RPCInvoke = <Name extends keyof RPCMap>(
38
41
  }
39
42
  ) => Promise<RPCMap[Name]['output']>
40
43
 
44
+ // Import WorkflowMap for workflow typing
45
+ import type { WorkflowMap } from '../workflow/pikku-workflow-map.gen.js'
46
+
41
47
  export type TypedPikkuRPC = {
42
48
  depth: number;
43
49
  global: boolean;
44
50
  invoke: RPCInvoke;
45
- invokeExposed: (name: string, data: any) => Promise<any>
51
+ invokeExposed: (name: string, data: any) => Promise<any>;
52
+ startWorkflow: <Name extends keyof WorkflowMap>(
53
+ name: Name,
54
+ input: WorkflowMap[Name]['input']
55
+ ) => Promise<{ runId: string }>;
46
56
  }
47
57
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  /**
5
5
  * This provides the structure needed for typescript to be aware of RPCs and their return types
@@ -18,8 +18,11 @@ export type PikkuMCPOutput = false | true
18
18
  export type PikkuMiddlewareOutput = false | true
19
19
  export type PikkuPermissionsOutput = false | true
20
20
  export type PikkuQueueOutput = false | true
21
+ export type PikkuPublicRPCOutput = false | true
22
+ export type PikkuRemoteRPCOutput = false | true
21
23
  export type PikkuRPCOutput = false | true
22
24
  export type PikkuSchedulerOutput = false | true
25
+ export type PikkuWorkflowOutput = false | true
23
26
 
24
27
  interface RPCHandler<I, O> {
25
28
  input: I;
@@ -57,12 +60,17 @@ export type RPCMap = {
57
60
  readonly 'pikkuQueueService': RPCHandler<null, null>,
58
61
  readonly 'pikkuQueueTypes': RPCHandler<null, null>,
59
62
  readonly 'pikkuQueue': RPCHandler<null, PikkuQueueOutput>,
63
+ readonly 'pikkuPublicRPC': RPCHandler<null, PikkuPublicRPCOutput>,
64
+ readonly 'pikkuRemoteRPC': RPCHandler<null, PikkuRemoteRPCOutput>,
60
65
  readonly 'pikkuRPCClient': RPCHandler<null, null>,
61
66
  readonly 'pikkuRPCInternalMap': RPCHandler<null, null>,
62
67
  readonly 'pikkuRPCExposedMap': RPCHandler<null, null>,
63
68
  readonly 'pikkuRPC': RPCHandler<null, PikkuRPCOutput>,
64
69
  readonly 'pikkuSchedulerTypes': RPCHandler<null, null>,
65
70
  readonly 'pikkuScheduler': RPCHandler<null, PikkuSchedulerOutput>,
71
+ readonly 'pikkuWorkflowMap': RPCHandler<null, null>,
72
+ readonly 'pikkuWorkflowTypes': RPCHandler<null, null>,
73
+ readonly 'pikkuWorkflow': RPCHandler<null, PikkuWorkflowOutput>,
66
74
  };
67
75
 
68
76
 
@@ -74,10 +82,17 @@ export type RPCInvoke = <Name extends keyof RPCMap>(
74
82
  }
75
83
  ) => Promise<RPCMap[Name]['output']>
76
84
 
85
+ // Import WorkflowMap for workflow typing
86
+ import type { WorkflowMap } from '../workflow/pikku-workflow-map.gen.js'
87
+
77
88
  export type TypedPikkuRPC = {
78
89
  depth: number;
79
90
  global: boolean;
80
91
  invoke: RPCInvoke;
81
- invokeExposed: (name: string, data: any) => Promise<any>
92
+ invokeExposed: (name: string, data: any) => Promise<any>;
93
+ startWorkflow: <Name extends keyof WorkflowMap>(
94
+ name: Name,
95
+ input: WorkflowMap[Name]['input']
96
+ ) => Promise<{ runId: string }>;
82
97
  }
83
98
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  import { pikkuState } from '@pikku/core'
5
5
  pikkuState('rpc', 'meta', {
@@ -33,10 +33,15 @@ pikkuState('rpc', 'meta', {
33
33
  "pikkuQueueService": "pikkuQueueService",
34
34
  "pikkuQueueTypes": "pikkuQueueTypes",
35
35
  "pikkuQueue": "pikkuQueue",
36
+ "pikkuPublicRPC": "pikkuPublicRPC",
37
+ "pikkuRemoteRPC": "pikkuRemoteRPC",
36
38
  "pikkuRPCClient": "pikkuRPCClient",
37
39
  "pikkuRPCInternalMap": "pikkuRPCInternalMap",
38
40
  "pikkuRPCExposedMap": "pikkuRPCExposedMap",
39
41
  "pikkuRPC": "pikkuRPC",
40
42
  "pikkuSchedulerTypes": "pikkuSchedulerTypes",
41
- "pikkuScheduler": "pikkuScheduler"
43
+ "pikkuScheduler": "pikkuScheduler",
44
+ "pikkuWorkflowMap": "pikkuWorkflowMap",
45
+ "pikkuWorkflowTypes": "pikkuWorkflowTypes",
46
+ "pikkuWorkflow": "pikkuWorkflow"
42
47
  })
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  /**
5
5
  * Scheduler-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  import { pikkuState } from '@pikku/core'
5
5
  pikkuState('scheduler', 'meta', {})
@@ -1,4 +1,4 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.2
2
+ * This file was generated by @pikku/cli@0.11.0
3
3
  */
4
4
  /* The files with an addScheduledTasks function call */