@pikku/addon-graph 0.0.2 → 0.0.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 (160) hide show
  1. package/dist/.pikku/addon/pikku-addon-types.gen.d.ts +17 -1
  2. package/dist/.pikku/addon/pikku-addon-types.gen.d.ts.map +1 -1
  3. package/dist/.pikku/addon/pikku-addon-types.gen.js +21 -2
  4. package/dist/.pikku/addon/pikku-addon-types.gen.js.map +1 -1
  5. package/dist/.pikku/addon/pikku-addon-types.gen.ts +24 -2
  6. package/dist/.pikku/addon/pikku-package.gen.js +1 -1
  7. package/dist/.pikku/addon/pikku-package.gen.ts +1 -1
  8. package/dist/.pikku/agent/pikku-agent-map.gen.d.ts +1 -1
  9. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +6 -6
  10. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts.map +1 -1
  11. package/dist/.pikku/agent/pikku-agent-types.gen.js.map +1 -1
  12. package/dist/.pikku/agent/pikku-agent-types.gen.ts +13 -7
  13. package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.js +1 -1
  14. package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.ts +1 -1
  15. package/dist/.pikku/agent/pikku-agent-wirings.gen.d.ts +1 -1
  16. package/dist/.pikku/agent/pikku-agent-wirings.gen.js +1 -1
  17. package/dist/.pikku/agent/pikku-agent-wirings.gen.ts +1 -1
  18. package/dist/.pikku/console/pikku-addon-meta.gen.json +281 -0
  19. package/dist/.pikku/console/pikku-node-types.gen.d.ts +2 -2
  20. package/dist/.pikku/console/pikku-node-types.gen.d.ts.map +1 -1
  21. package/dist/.pikku/console/pikku-node-types.gen.ts +2 -2
  22. package/dist/.pikku/function/pikku-function-types.gen.d.ts +41 -12
  23. package/dist/.pikku/function/pikku-function-types.gen.d.ts.map +1 -1
  24. package/dist/.pikku/function/pikku-function-types.gen.js +17 -1
  25. package/dist/.pikku/function/pikku-function-types.gen.js.map +1 -1
  26. package/dist/.pikku/function/pikku-function-types.gen.ts +53 -15
  27. package/dist/.pikku/function/pikku-functions-meta-verbose.gen.json +224 -196
  28. package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
  29. package/dist/.pikku/function/pikku-functions-meta.gen.json +160 -144
  30. package/dist/.pikku/function/pikku-functions-meta.gen.ts +1 -1
  31. package/dist/.pikku/function/pikku-functions.gen.js +3 -1
  32. package/dist/.pikku/function/pikku-functions.gen.js.map +1 -1
  33. package/dist/.pikku/function/pikku-functions.gen.ts +3 -1
  34. package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
  35. package/dist/.pikku/pikku-bootstrap.gen.ts +1 -1
  36. package/dist/.pikku/pikku-services.gen.d.ts +3 -1
  37. package/dist/.pikku/pikku-services.gen.d.ts.map +1 -1
  38. package/dist/.pikku/pikku-services.gen.js +2 -0
  39. package/dist/.pikku/pikku-services.gen.js.map +1 -1
  40. package/dist/.pikku/pikku-services.gen.ts +3 -1
  41. package/dist/.pikku/pikku-types.gen.d.ts +1 -1
  42. package/dist/.pikku/pikku-types.gen.js +1 -1
  43. package/dist/.pikku/pikku-types.gen.ts +1 -1
  44. package/dist/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +50 -396
  45. package/dist/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +59 -404
  46. package/dist/.pikku/schema-cache.json +1 -0
  47. package/dist/.pikku/schemas/pikku.cache.json +1 -0
  48. package/dist/.pikku/schemas/register.gen.js +35 -33
  49. package/dist/.pikku/schemas/register.gen.js.map +1 -1
  50. package/dist/.pikku/schemas/register.gen.ts +69 -65
  51. package/dist/.pikku/schemas/schemas/SleepInput.schema.json +1 -0
  52. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
  53. package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
  54. package/dist/.pikku/secrets/pikku-secret-types.gen.ts +1 -1
  55. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
  56. package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
  57. package/dist/.pikku/secrets/pikku-secrets.gen.ts +1 -1
  58. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
  59. package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
  60. package/dist/.pikku/trigger/pikku-trigger-types.gen.ts +1 -1
  61. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
  62. package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
  63. package/dist/.pikku/variables/pikku-variable-types.gen.ts +1 -1
  64. package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
  65. package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
  66. package/dist/.pikku/variables/pikku-variables.gen.ts +1 -1
  67. package/dist/.pikku/workflow/pikku-workflow-map.gen.d.ts +1 -1
  68. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +35 -5
  69. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts.map +1 -1
  70. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +5 -5
  71. package/dist/.pikku/workflow/pikku-workflow-types.gen.js.map +1 -1
  72. package/dist/.pikku/workflow/pikku-workflow-types.gen.ts +65 -9
  73. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
  74. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +1 -1
  75. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +1 -1
  76. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
  77. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.ts +1 -1
  78. package/dist/src/functions/data/sleep.function.d.ts +16 -0
  79. package/dist/src/functions/data/sleep.function.d.ts.map +1 -0
  80. package/dist/src/functions/data/sleep.function.js +18 -0
  81. package/dist/src/functions/data/sleep.function.js.map +1 -0
  82. package/package.json +11 -8
  83. package/.pikku/addon/pikku-addon-types.gen.ts +0 -78
  84. package/.pikku/addon/pikku-package.gen.ts +0 -9
  85. package/.pikku/agent/pikku-agent-map.gen.d.ts +0 -16
  86. package/.pikku/agent/pikku-agent-types.gen.ts +0 -76
  87. package/.pikku/agent/pikku-agent-wirings-meta.gen.json +0 -3
  88. package/.pikku/agent/pikku-agent-wirings-meta.gen.ts +0 -7
  89. package/.pikku/agent/pikku-agent-wirings.gen.ts +0 -3
  90. package/.pikku/console/pikku-node-types.gen.ts +0 -8
  91. package/.pikku/function/pikku-function-types.gen.ts +0 -648
  92. package/.pikku/function/pikku-functions-meta-verbose.gen.json +0 -582
  93. package/.pikku/function/pikku-functions-meta.gen.json +0 -434
  94. package/.pikku/function/pikku-functions-meta.gen.ts +0 -7
  95. package/.pikku/function/pikku-functions.gen.ts +0 -54
  96. package/.pikku/pikku-bootstrap.gen.ts +0 -15
  97. package/.pikku/pikku-services.gen.ts +0 -32
  98. package/.pikku/pikku-types.gen.ts +0 -21
  99. package/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +0 -470
  100. package/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +0 -494
  101. package/.pikku/schemas/register.gen.ts +0 -195
  102. package/.pikku/schemas/schemas/AggregateInput.schema.json +0 -1
  103. package/.pikku/schemas/schemas/AggregateOutput.schema.json +0 -1
  104. package/.pikku/schemas/schemas/ChunkInput.schema.json +0 -1
  105. package/.pikku/schemas/schemas/ChunkOutput.schema.json +0 -1
  106. package/.pikku/schemas/schemas/CoalesceInput.schema.json +0 -1
  107. package/.pikku/schemas/schemas/CoalesceOutput.schema.json +0 -1
  108. package/.pikku/schemas/schemas/CryptoInput.schema.json +0 -1
  109. package/.pikku/schemas/schemas/CryptoOutput.schema.json +0 -1
  110. package/.pikku/schemas/schemas/DateTimeInput.schema.json +0 -1
  111. package/.pikku/schemas/schemas/DateTimeOutput.schema.json +0 -1
  112. package/.pikku/schemas/schemas/EditFieldsInput.schema.json +0 -1
  113. package/.pikku/schemas/schemas/EditFieldsOutput.schema.json +0 -1
  114. package/.pikku/schemas/schemas/FindInput.schema.json +0 -1
  115. package/.pikku/schemas/schemas/FindOutput.schema.json +0 -1
  116. package/.pikku/schemas/schemas/GroupByInput.schema.json +0 -1
  117. package/.pikku/schemas/schemas/GroupByOutput.schema.json +0 -1
  118. package/.pikku/schemas/schemas/JwtDecodeInput.schema.json +0 -1
  119. package/.pikku/schemas/schemas/JwtDecodeOutput.schema.json +0 -1
  120. package/.pikku/schemas/schemas/JwtSignInput.schema.json +0 -1
  121. package/.pikku/schemas/schemas/JwtSignOutput.schema.json +0 -1
  122. package/.pikku/schemas/schemas/LimitInput.schema.json +0 -1
  123. package/.pikku/schemas/schemas/LimitOutput.schema.json +0 -1
  124. package/.pikku/schemas/schemas/MathInput.schema.json +0 -1
  125. package/.pikku/schemas/schemas/MathOutput.schema.json +0 -1
  126. package/.pikku/schemas/schemas/MergeInput.schema.json +0 -1
  127. package/.pikku/schemas/schemas/MergeOutput.schema.json +0 -1
  128. package/.pikku/schemas/schemas/OmitInput.schema.json +0 -1
  129. package/.pikku/schemas/schemas/OmitOutput.schema.json +0 -1
  130. package/.pikku/schemas/schemas/PickInput.schema.json +0 -1
  131. package/.pikku/schemas/schemas/PickOutput.schema.json +0 -1
  132. package/.pikku/schemas/schemas/RemoveDuplicatesInput.schema.json +0 -1
  133. package/.pikku/schemas/schemas/RemoveDuplicatesOutput.schema.json +0 -1
  134. package/.pikku/schemas/schemas/RenameKeysInput.schema.json +0 -1
  135. package/.pikku/schemas/schemas/RenameKeysOutput.schema.json +0 -1
  136. package/.pikku/schemas/schemas/ReverseInput.schema.json +0 -1
  137. package/.pikku/schemas/schemas/ReverseOutput.schema.json +0 -1
  138. package/.pikku/schemas/schemas/SortInput.schema.json +0 -1
  139. package/.pikku/schemas/schemas/SortOutput.schema.json +0 -1
  140. package/.pikku/schemas/schemas/SplitOutInput.schema.json +0 -1
  141. package/.pikku/schemas/schemas/SplitOutOutput.schema.json +0 -1
  142. package/.pikku/schemas/schemas/StringTransformInput.schema.json +0 -1
  143. package/.pikku/schemas/schemas/StringTransformOutput.schema.json +0 -1
  144. package/.pikku/schemas/schemas/SummarizeInput.schema.json +0 -1
  145. package/.pikku/schemas/schemas/SummarizeOutput.schema.json +0 -1
  146. package/.pikku/schemas/schemas/TypeConvertInput.schema.json +0 -1
  147. package/.pikku/schemas/schemas/TypeConvertOutput.schema.json +0 -1
  148. package/.pikku/schemas/schemas/UniqueInput.schema.json +0 -1
  149. package/.pikku/schemas/schemas/UniqueOutput.schema.json +0 -1
  150. package/.pikku/secrets/pikku-secret-types.gen.ts +0 -5
  151. package/.pikku/secrets/pikku-secrets-meta.gen.json +0 -1
  152. package/.pikku/secrets/pikku-secrets.gen.ts +0 -21
  153. package/.pikku/trigger/pikku-trigger-types.gen.ts +0 -160
  154. package/.pikku/variables/pikku-variable-types.gen.ts +0 -5
  155. package/.pikku/variables/pikku-variables-meta.gen.json +0 -1
  156. package/.pikku/variables/pikku-variables.gen.ts +0 -21
  157. package/.pikku/workflow/pikku-workflow-map.gen.d.ts +0 -34
  158. package/.pikku/workflow/pikku-workflow-types.gen.ts +0 -158
  159. package/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +0 -9
  160. package/.pikku/workflow/pikku-workflow-wirings.gen.ts +0 -3
package/package.json CHANGED
@@ -1,31 +1,34 @@
1
1
  {
2
2
  "name": "@pikku/addon-graph",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
5
  "imports": {
6
- "#pikku": "./.pikku/pikku-types.gen.ts"
6
+ "#pikku": {
7
+ "types": "./.pikku/pikku-types.gen.ts",
8
+ "import": "./dist/.pikku/pikku-types.gen.js"
9
+ }
7
10
  },
8
11
  "exports": {
9
12
  ".": {
10
13
  "types": "./dist/src/index.d.ts",
11
14
  "import": "./dist/src/index.js"
12
15
  },
13
- "./.pikku/*": "./.pikku/*",
14
- "./.pikku/pikku-metadata.gen.json": "./.pikku/pikku-metadata.gen.json",
16
+ "./.pikku/*": "./dist/.pikku/*",
17
+ "./.pikku/pikku-metadata.gen.json": "./dist/.pikku/pikku-metadata.gen.json",
15
18
  "./.pikku/rpc/pikku-rpc-wirings-map.internal.gen.js": {
16
- "types": "./.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts"
19
+ "types": "./dist/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts"
17
20
  }
18
21
  },
19
22
  "files": [
20
- "dist",
21
- ".pikku"
23
+ "dist"
22
24
  ],
23
25
  "scripts": {
24
26
  "build": "pikku all && tsc && cp -r .pikku dist/",
25
27
  "pikku": "pikku all",
26
28
  "ncu": "npx npm-check-updates",
27
29
  "pretest": "pikku all",
28
- "test": "tsc --noEmit"
30
+ "test": "tsc --noEmit",
31
+ "prepublishOnly": "yarn build"
29
32
  },
30
33
  "peerDependencies": {
31
34
  "@pikku/core": "*",
@@ -1,78 +0,0 @@
1
- /**
2
- * This file was generated by @pikku/cli@0.12.2
3
- */
4
- /**
5
- * Addon package types for pikkuAddonConfig and pikkuAddonServices
6
- */
7
-
8
- import type { CreateConfig } from '@pikku/core'
9
- import type { SingletonServices } from '../../types/application-types.d.js'
10
- import type { Config } from '../../types/application-types.d.js'
11
- import type { RequiredSingletonServices } from '../pikku-services.gen.js'
12
- import { TypedSecretService } from '../secrets/pikku-secrets.gen.js'
13
- import { TypedVariablesService } from '../variables/pikku-variables.gen.js'
14
-
15
-
16
-
17
-
18
- /**
19
- * Base services provided to addon package service factories.
20
- * These are always available from the parent application.
21
- */
22
- export type AddonBaseServices = {
23
- logger: SingletonServices['logger']
24
- variables: TypedVariablesService
25
- secrets: TypedSecretService
26
- }
27
-
28
- /**
29
- * Creates a Pikku config factory for addon packages.
30
- * Unlike pikkuConfig, this receives AddonBaseServices (logger, variables, secrets)
31
- * from the parent application, so addon packages can read variables/secrets during config creation.
32
- */
33
- export const pikkuAddonConfig = <ExistingServices extends Omit<Partial<SingletonServices>, 'variables' | 'secrets'> & AddonBaseServices>(
34
- func: (services: ExistingServices) => Promise<Config>
35
- ): CreateConfig<Config> => {
36
- return (async (_variables: any, existingServices?: Partial<SingletonServices>): Promise<Config> => {
37
- const { secrets, variables, ...rest } = (existingServices ?? {}) as unknown as SingletonServices
38
- return func({ ...rest, secrets: new TypedSecretService(secrets), variables: new TypedVariablesService(variables) } as ExistingServices)
39
- }) as unknown as CreateConfig<Config>
40
- }
41
-
42
- /**
43
- * Creates a Pikku singleton services factory for addon packages.
44
- * Unlike pikkuServices, this expects the parent application to provide
45
- * logger, variables, and secrets - no fallbacks needed.
46
- *
47
- * @param func - Addon services factory function that receives config and base services
48
- * @returns The singleton services factory function
49
- *
50
- * @example
51
- * ```typescript
52
- * export const createSingletonServices = pikkuAddonServices(async (
53
- * config,
54
- * { secrets }
55
- * ) => {
56
- * const creds = await secrets.getSecretJSON<GithubCredentials>('GITHUB_CREDENTIALS')
57
- * const github = new GithubService(creds)
58
- * return { github }
59
- * })
60
- * ```
61
- */
62
- export const pikkuAddonServices = <T extends Record<string, any>, ExistingServices extends Omit<Partial<SingletonServices>, 'variables' | 'secrets'> & AddonBaseServices>(
63
- func: (config: Config, services: ExistingServices) => Promise<T>
64
- ) => {
65
- return async (config: Config, existingServices?: Partial<SingletonServices>): Promise<RequiredSingletonServices> => {
66
- const { logger, variables, secrets } = (existingServices ?? {}) as unknown as SingletonServices
67
- const typedVariables = new TypedVariablesService(variables)
68
- const typedSecrets = new TypedSecretService(secrets)
69
- const result = await func(config, { ...existingServices, logger, variables: typedVariables, secrets: typedSecrets } as ExistingServices)
70
- return {
71
- config,
72
- logger,
73
- variables: typedVariables,
74
- secrets: typedSecrets,
75
- ...result,
76
- } as unknown as RequiredSingletonServices
77
- }
78
- }
@@ -1,9 +0,0 @@
1
- /**
2
- * This file was generated by @pikku/cli@0.12.2
3
- */
4
- import { pikkuState } from '@pikku/core/internal'
5
- import { createSingletonServices as createSingletonServices } from '../../src/services.js'
6
-
7
- pikkuState('@pikku/addon-graph', 'package', 'factories', {
8
- createSingletonServices,
9
- })
@@ -1,16 +0,0 @@
1
- /**
2
- * This file was generated by @pikku/cli@0.12.2
3
- */
4
- /**
5
- * Agent type map with output types for each agent
6
- */
7
-
8
-
9
-
10
-
11
- interface AgentHandler<O> {
12
- output: O;
13
- }
14
-
15
- export type AgentMap = {
16
- };
@@ -1,76 +0,0 @@
1
- /**
2
- * This file was generated by @pikku/cli@0.12.2
3
- */
4
- import {
5
- CoreAIAgent,
6
- PikkuAIMiddlewareHooks,
7
- } from '@pikku/core/ai-agent'
8
- import {
9
- agent as coreAgent,
10
- agentStream as coreAgentStream,
11
- agentResume as coreAgentResume,
12
- agentApprove as coreAgentApprove,
13
- } from '@pikku/core/ai-agent'
14
- import type { PikkuPermission, PikkuMiddleware, Services, PikkuFunctionConfig } from '../function/pikku-function-types.gen.js'
15
- import type { StandardSchemaV1 } from '@standard-schema/spec'
16
- import type { AIAgentMemoryConfig, AIAgentInput } from '@pikku/core/ai-agent'
17
- import type { AgentMap } from './pikku-agent-map.gen.d.js'
18
-
19
- type AIAgentConfig = Omit<CoreAIAgent<PikkuPermission, PikkuMiddleware>, 'tools' | 'agents' | 'memory'> & {
20
- input?: StandardSchemaV1
21
- output?: StandardSchemaV1
22
- memory?: Omit<AIAgentMemoryConfig, 'workingMemory'> & { workingMemory?: StandardSchemaV1 }
23
- tools?: object[]
24
- agents?: AIAgentConfig[]
25
- }
26
-
27
- export const pikkuAIAgent = (
28
- agent: AIAgentConfig
29
- ) => {
30
- return agent
31
- }
32
-
33
- export const pikkuAIMiddleware = <
34
- State extends Record<string, unknown> = Record<string, unknown>,
35
- RequiredServices extends Services = Services,
36
- >(
37
- hooks: PikkuAIMiddlewareHooks<State, RequiredServices>
38
- ): PikkuAIMiddlewareHooks<State, RequiredServices> => hooks
39
-
40
- export const agent = <Name extends keyof AgentMap>(
41
- agentName: Name
42
- ) => {
43
- return coreAgent<AgentMap>(agentName as string & keyof AgentMap) as PikkuFunctionConfig<
44
- AIAgentInput,
45
- { runId: string; result: AgentMap[Name]['output']; usage: { inputTokens: number; outputTokens: number } },
46
- 'session' | 'rpc'
47
- >
48
- }
49
-
50
- export const agentStream = <Name extends keyof AgentMap>(
51
- agentName?: Name
52
- ) => {
53
- return coreAgentStream<AgentMap>(agentName as string & keyof AgentMap) as PikkuFunctionConfig<
54
- { agentName?: string; message: string; threadId: string; resourceId: string },
55
- void,
56
- 'session' | 'rpc'
57
- >
58
- }
59
-
60
- export const agentResume = () => {
61
- return coreAgentResume() as PikkuFunctionConfig<
62
- { runId: string; toolCallId: string; approved: boolean },
63
- void,
64
- 'session' | 'rpc'
65
- >
66
- }
67
-
68
- export const agentApprove = <Name extends keyof AgentMap>(
69
- agentName: Name
70
- ) => {
71
- return coreAgentApprove<AgentMap>(agentName as string & keyof AgentMap) as PikkuFunctionConfig<
72
- { runId: string; approvals: { toolCallId: string; approved: boolean }[] },
73
- unknown,
74
- 'session' | 'rpc'
75
- >
76
- }
@@ -1,3 +0,0 @@
1
- {
2
- "agentsMeta": {}
3
- }
@@ -1,7 +0,0 @@
1
- /**
2
- * This file was generated by @pikku/cli@0.12.2
3
- */
4
- import { pikkuState } from '@pikku/core/internal'
5
- import type { AIAgentMeta } from '@pikku/core/ai-agent'
6
- import metaData from './pikku-agent-wirings-meta.gen.json' with { type: 'json' }
7
- pikkuState('@pikku/addon-graph', 'agent', 'agentsMeta', metaData.agentsMeta as AIAgentMeta)
@@ -1,3 +0,0 @@
1
- /**
2
- * This file was generated by @pikku/cli@0.12.2
3
- */
@@ -1,8 +0,0 @@
1
- /**
2
- * This file was generated by @pikku/cli@0.12.2
3
- */
4
- import type { FlattenedRPCMap } from '../rpc/pikku-rpc-wirings-map.internal.gen.js'
5
-
6
- export type NodeCategory = 'Transform' | 'Array' | 'Data'
7
-
8
- export type NodeRPCName = keyof FlattenedRPCMap