@pikku/addon-graph 0.12.0 → 0.12.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.
- package/dist/.pikku/addon/pikku-addon-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/pikku-addon-types.gen.js +1 -1
- package/dist/.pikku/addon/pikku-package.gen.js +1 -1
- package/dist/.pikku/agent/pikku-agent-map.gen.d.ts +1 -1
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
- package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +43 -69
- package/dist/.pikku/function/pikku-function-types.gen.d.ts.map +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.js +33 -40
- package/dist/.pikku/function/pikku-function-types.gen.js.map +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +476 -449
- package/dist/.pikku/function/pikku-functions.gen.js +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.d.ts +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
- package/dist/.pikku/pikku-meta-service.gen.d.ts +1 -1
- package/dist/.pikku/pikku-meta-service.gen.js +1 -1
- package/dist/.pikku/pikku-services.gen.d.ts +3 -1
- package/dist/.pikku/pikku-services.gen.d.ts.map +1 -1
- package/dist/.pikku/pikku-services.gen.js +2 -0
- package/dist/.pikku/pikku-services.gen.js.map +1 -1
- package/dist/.pikku/pikku-types.gen.d.ts +1 -1
- package/dist/.pikku/pikku-types.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +11 -3
- package/dist/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +12 -4
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +26 -26
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
- package/dist/.pikku/schemas/register.gen.js +3 -1
- package/dist/.pikku/schemas/register.gen.js.map +1 -1
- package/dist/.pikku/schemas/schemas/AggregateInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/AggregateOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/ChunkInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/ChunkOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/CoalesceInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/CoalesceOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/CryptoInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/CryptoOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/DateTimeInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/DateTimeOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/EditFieldsInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/EditFieldsOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/FindInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/FindOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/GroupByInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/GroupByOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/JwtDecodeInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/JwtDecodeOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/JwtSignInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/JwtSignOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/LimitInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/LimitOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/MathInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/MathOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/MergeInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/MergeOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/OmitInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/OmitOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PickInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PickOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/RemoveDuplicatesInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/RemoveDuplicatesOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/RenameKeysInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/RenameKeysOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/ReverseInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/ReverseOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/SleepInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/SleepOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/SortInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/SortOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/SplitOutInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/SplitOutOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/StringTransformInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/StringTransformOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/SummarizeInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/SummarizeOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/TypeConvertInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/TypeConvertOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/UniqueInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/UniqueOutput.schema.json +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-map.gen.d.ts +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
- package/dist/src/functions/data/sleep.function.d.ts +1 -0
- package/dist/src/functions/data/sleep.function.d.ts.map +1 -1
- package/dist/src/functions/data/sleep.function.js +2 -1
- package/dist/src/functions/data/sleep.function.js.map +1 -1
- package/package.json +14 -15
- package/.pikku/addon/pikku-addon-types.gen.ts +0 -105
- package/.pikku/addon/pikku-package.gen.ts +0 -11
- package/.pikku/agent/pikku-agent-map.gen.d.ts +0 -4
- package/.pikku/agent/pikku-agent-types.gen.ts +0 -82
- package/.pikku/channel/pikku-channel-types.gen.ts +0 -177
- package/.pikku/cli/pikku-cli-types.gen.ts +0 -105
- package/.pikku/console/pikku-addon-meta.gen.json +0 -281
- package/.pikku/console/pikku-node-types.gen.ts +0 -8
- package/.pikku/function/pikku-function-types.gen.ts +0 -684
- package/.pikku/function/pikku-functions-meta-verbose.gen.json +0 -660
- package/.pikku/function/pikku-functions-meta.gen.json +0 -450
- package/.pikku/function/pikku-functions-meta.gen.ts +0 -7
- package/.pikku/function/pikku-functions.gen.ts +0 -56
- package/.pikku/http/pikku-http-types.gen.ts +0 -147
- package/.pikku/mcp/pikku-mcp-types.gen.ts +0 -183
- package/.pikku/pikku-bootstrap.gen.ts +0 -8
- package/.pikku/pikku-meta-service.gen.ts +0 -10
- package/.pikku/pikku-services.gen.ts +0 -39
- package/.pikku/pikku-types.gen.ts +0 -21
- package/.pikku/queue/pikku-queue-types.gen.ts +0 -27
- package/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +0 -488
- package/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +0 -513
- package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +0 -27
- package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +0 -6
- package/.pikku/scheduler/pikku-scheduler-types.gen.ts +0 -25
- package/.pikku/schemas/register.gen.ts +0 -199
- package/.pikku/schemas/schemas/AggregateInput.schema.json +0 -1
- package/.pikku/schemas/schemas/AggregateOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/ChunkInput.schema.json +0 -1
- package/.pikku/schemas/schemas/ChunkOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/CoalesceInput.schema.json +0 -1
- package/.pikku/schemas/schemas/CoalesceOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/CryptoInput.schema.json +0 -1
- package/.pikku/schemas/schemas/CryptoOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/DateTimeInput.schema.json +0 -1
- package/.pikku/schemas/schemas/DateTimeOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/EditFieldsInput.schema.json +0 -1
- package/.pikku/schemas/schemas/EditFieldsOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/FindInput.schema.json +0 -1
- package/.pikku/schemas/schemas/FindOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/GroupByInput.schema.json +0 -1
- package/.pikku/schemas/schemas/GroupByOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/JwtDecodeInput.schema.json +0 -1
- package/.pikku/schemas/schemas/JwtDecodeOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/JwtSignInput.schema.json +0 -1
- package/.pikku/schemas/schemas/JwtSignOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/LimitInput.schema.json +0 -1
- package/.pikku/schemas/schemas/LimitOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/MathInput.schema.json +0 -1
- package/.pikku/schemas/schemas/MathOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/MergeInput.schema.json +0 -1
- package/.pikku/schemas/schemas/MergeOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/OmitInput.schema.json +0 -1
- package/.pikku/schemas/schemas/OmitOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/PickInput.schema.json +0 -1
- package/.pikku/schemas/schemas/PickOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/RemoveDuplicatesInput.schema.json +0 -1
- package/.pikku/schemas/schemas/RemoveDuplicatesOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/RenameKeysInput.schema.json +0 -1
- package/.pikku/schemas/schemas/RenameKeysOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/ReverseInput.schema.json +0 -1
- package/.pikku/schemas/schemas/ReverseOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/SleepInput.schema.json +0 -1
- package/.pikku/schemas/schemas/SortInput.schema.json +0 -1
- package/.pikku/schemas/schemas/SortOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/SplitOutInput.schema.json +0 -1
- package/.pikku/schemas/schemas/SplitOutOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/StringTransformInput.schema.json +0 -1
- package/.pikku/schemas/schemas/StringTransformOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/SummarizeInput.schema.json +0 -1
- package/.pikku/schemas/schemas/SummarizeOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/TypeConvertInput.schema.json +0 -1
- package/.pikku/schemas/schemas/TypeConvertOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/UniqueInput.schema.json +0 -1
- package/.pikku/schemas/schemas/UniqueOutput.schema.json +0 -1
- package/.pikku/secrets/pikku-secret-types.gen.ts +0 -5
- package/.pikku/secrets/pikku-secrets-meta.gen.json +0 -1
- package/.pikku/secrets/pikku-secrets.gen.ts +0 -21
- package/.pikku/trigger/pikku-trigger-types.gen.ts +0 -160
- package/.pikku/variables/pikku-variable-types.gen.ts +0 -5
- package/.pikku/variables/pikku-variables-meta.gen.json +0 -1
- package/.pikku/variables/pikku-variables.gen.ts +0 -21
- package/.pikku/workflow/pikku-workflow-map.gen.d.ts +0 -38
- package/.pikku/workflow/pikku-workflow-types.gen.ts +0 -167
- package/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +0 -9
- package/.pikku/workflow/pikku-workflow-wirings.gen.ts +0 -3
- package/dist/.pikku/addon/pikku-addon-types.gen.ts +0 -105
- package/dist/.pikku/addon/pikku-package.gen.ts +0 -11
- package/dist/.pikku/agent/pikku-agent-types.gen.ts +0 -82
- package/dist/.pikku/channel/pikku-channel-types.gen.ts +0 -177
- package/dist/.pikku/cli/pikku-cli-types.gen.ts +0 -105
- package/dist/.pikku/console/pikku-addon-meta.gen.json +0 -281
- package/dist/.pikku/console/pikku-node-types.gen.ts +0 -8
- package/dist/.pikku/function/pikku-function-types.gen.ts +0 -684
- package/dist/.pikku/function/pikku-functions-meta-verbose.gen.json +0 -660
- package/dist/.pikku/function/pikku-functions-meta.gen.ts +0 -7
- package/dist/.pikku/function/pikku-functions.gen.ts +0 -56
- package/dist/.pikku/http/pikku-http-types.gen.ts +0 -147
- package/dist/.pikku/mcp/pikku-mcp-types.gen.ts +0 -183
- package/dist/.pikku/pikku-bootstrap.gen.ts +0 -8
- package/dist/.pikku/pikku-meta-service.gen.ts +0 -10
- package/dist/.pikku/pikku-services.gen.ts +0 -39
- package/dist/.pikku/pikku-types.gen.ts +0 -21
- package/dist/.pikku/queue/pikku-queue-types.gen.ts +0 -27
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +0 -6
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.ts +0 -25
- package/dist/.pikku/schemas/register.gen.ts +0 -199
- package/dist/.pikku/secrets/pikku-secret-types.gen.ts +0 -5
- package/dist/.pikku/secrets/pikku-secrets-meta.gen.json +0 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.ts +0 -21
- package/dist/.pikku/trigger/pikku-trigger-types.gen.ts +0 -160
- package/dist/.pikku/variables/pikku-variable-types.gen.ts +0 -5
- package/dist/.pikku/variables/pikku-variables-meta.gen.json +0 -1
- package/dist/.pikku/variables/pikku-variables.gen.ts +0 -21
- package/dist/.pikku/workflow/pikku-workflow-types.gen.ts +0 -167
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +0 -9
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.ts +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"item":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The input object"},"fields":{"type":"array","items":{"type":"string"},"description":"Fields to keep (supports dot notation for nested fields)"}},"required":["item","fields"],"additionalProperties":false}
|
|
1
|
+
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "item": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {}, "description": "The input object" }, "fields": { "type": "array", "items": { "type": "string" }, "description": "Fields to keep (supports dot notation for nested fields)" } }, "required": ["item", "fields"], "additionalProperties": false }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"item":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Object with only the specified fields"}},"required":["item"],"additionalProperties":false}
|
|
1
|
+
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "item": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {}, "description": "Object with only the specified fields" } }, "required": ["item"], "additionalProperties": false }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"The array of items to deduplicate"},"fields":{"type":"array","items":{"type":"string"},"description":"Fields to use for comparison (if empty, compares entire objects)"},"keepFirst":{"description":"Keep the first occurrence (true) or last (false)","type":"boolean"}},"required":["items","fields"],"additionalProperties":false}
|
|
1
|
+
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "description": "The array of items to deduplicate" }, "fields": { "type": "array", "items": { "type": "string" }, "description": "Fields to use for comparison (if empty, compares entire objects)" }, "keepFirst": { "description": "Keep the first occurrence (true) or last (false)", "type": "boolean" } }, "required": ["items", "fields"], "additionalProperties": false }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"The deduplicated array of items"},"removedCount":{"type":"number","description":"Number of duplicates removed"}},"required":["items","removedCount"],"additionalProperties":false}
|
|
1
|
+
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "description": "The deduplicated array of items" }, "removedCount": { "type": "number", "description": "Number of duplicates removed" } }, "required": ["items", "removedCount"], "additionalProperties": false }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"item":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The input object to transform"},"mappings":{"type":"array","items":{"type":"object","properties":{"oldKey":{"type":"string","description":"The original key name"},"newKey":{"type":"string","description":"The new key name"}},"required":["oldKey","newKey"],"additionalProperties":false},"description":"List of key rename mappings"},"keepUnmapped":{"description":"Whether to keep keys that are not in the mapping","type":"boolean"}},"required":["item","mappings"],"additionalProperties":false}
|
|
1
|
+
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "item": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {}, "description": "The input object to transform" }, "mappings": { "type": "array", "items": { "type": "object", "properties": { "oldKey": { "type": "string", "description": "The original key name" }, "newKey": { "type": "string", "description": "The new key name" } }, "required": ["oldKey", "newKey"], "additionalProperties": false }, "description": "List of key rename mappings" }, "keepUnmapped": { "description": "Whether to keep keys that are not in the mapping", "type": "boolean" } }, "required": ["item", "mappings"], "additionalProperties": false }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"item":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The transformed object with renamed keys"}},"required":["item"],"additionalProperties":false}
|
|
1
|
+
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "item": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {}, "description": "The transformed object with renamed keys" } }, "required": ["item"], "additionalProperties": false }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{},"description":"The array to reverse"}},"required":["items"],"additionalProperties":false}
|
|
1
|
+
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": {}, "description": "The array to reverse" } }, "required": ["items"], "additionalProperties": false }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{},"description":"The reversed array"}},"required":["items"],"additionalProperties":false}
|
|
1
|
+
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": {}, "description": "The reversed array" } }, "required": ["items"], "additionalProperties": false }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","description":"A unique name for this sleep step"},"ms":{"type":"number","description":"Duration to sleep in milliseconds"}},"required":["name","ms"],"additionalProperties":false}
|
|
1
|
+
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "name": { "type": "string", "description": "A unique name for this sleep step" }, "ms": { "type": "number", "description": "Duration to sleep in milliseconds" } }, "required": ["name", "ms"], "additionalProperties": false }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "$schema": "https://json-schema.org/draft/2020-12/schema" }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"The array of items to sort"},"sortBy":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"The field path to sort by (supports dot notation)"},"order":{"description":"Sort order","type":"string","enum":["asc","desc"]}},"required":["field"],"additionalProperties":false},"description":"Fields to sort by (in order of priority)"}},"required":["items","sortBy"],"additionalProperties":false}
|
|
1
|
+
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "description": "The array of items to sort" }, "sortBy": { "type": "array", "items": { "type": "object", "properties": { "field": { "type": "string", "description": "The field path to sort by (supports dot notation)" }, "order": { "description": "Sort order", "type": "string", "enum": ["asc", "desc"] } }, "required": ["field"], "additionalProperties": false }, "description": "Fields to sort by (in order of priority)" } }, "required": ["items", "sortBy"], "additionalProperties": false }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"The sorted array of items"}},"required":["items"],"additionalProperties":false}
|
|
1
|
+
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "description": "The sorted array of items" } }, "required": ["items"], "additionalProperties": false }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"item":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The input object containing a nested array"},"field":{"type":"string","description":"The field path containing the array to split (supports dot notation)"},"includeParent":{"description":"Include parent object fields in each output item","type":"boolean"}},"required":["item","field"],"additionalProperties":false}
|
|
1
|
+
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "item": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {}, "description": "The input object containing a nested array" }, "field": { "type": "string", "description": "The field path containing the array to split (supports dot notation)" }, "includeParent": { "description": "Include parent object fields in each output item", "type": "boolean" } }, "required": ["item", "field"], "additionalProperties": false }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"The split array of items"}},"required":["items"],"additionalProperties":false}
|
|
1
|
+
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "description": "The split array of items" } }, "required": ["items"], "additionalProperties": false }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"value":{"type":"string","description":"The input string"},"operation":{"type":"string","enum":["uppercase","lowercase","capitalize","camelCase","snakeCase","kebabCase","trim","trimStart","trimEnd","split","replace","slice","padStart","padEnd"],"description":"The transformation to apply"},"separator":{"description":"Separator for split operation","type":"string"},"search":{"description":"Search string for replace operation","type":"string"},"replacement":{"description":"Replacement string for replace operation","type":"string"},"replaceAll":{"description":"Replace all occurrences","type":"boolean"},"start":{"description":"Start index for slice","type":"number"},"end":{"description":"End index for slice","type":"number"},"length":{"description":"Target length for pad operations","type":"number"},"padChar":{"description":"Character to pad with","type":"string"}},"required":["value","operation"],"additionalProperties":false}
|
|
1
|
+
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "value": { "type": "string", "description": "The input string" }, "operation": { "type": "string", "enum": ["uppercase", "lowercase", "capitalize", "camelCase", "snakeCase", "kebabCase", "trim", "trimStart", "trimEnd", "split", "replace", "slice", "padStart", "padEnd"], "description": "The transformation to apply" }, "separator": { "description": "Separator for split operation", "type": "string" }, "search": { "description": "Search string for replace operation", "type": "string" }, "replacement": { "description": "Replacement string for replace operation", "type": "string" }, "replaceAll": { "description": "Replace all occurrences", "type": "boolean" }, "start": { "description": "Start index for slice", "type": "number" }, "end": { "description": "End index for slice", "type": "number" }, "length": { "description": "Target length for pad operations", "type": "number" }, "padChar": { "description": "Character to pad with", "type": "string" } }, "required": ["value", "operation"], "additionalProperties": false }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"result":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The transformed result"}},"required":["result"],"additionalProperties":false}
|
|
1
|
+
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "result": { "anyOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }], "description": "The transformed result" } }, "required": ["result"], "additionalProperties": false }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"The array of items to summarize"},"aggregations":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"The field path to aggregate"},"operation":{"type":"string","enum":["sum","avg","min","max","count","countDistinct","first","last"],"description":"The aggregation operation"},"outputField":{"type":"string","description":"The name of the output field"}},"required":["field","operation","outputField"],"additionalProperties":false},"description":"List of aggregation operations to perform"},"groupBy":{"description":"Fields to group by","type":"array","items":{"type":"string"}}},"required":["items","aggregations"],"additionalProperties":false}
|
|
1
|
+
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "description": "The array of items to summarize" }, "aggregations": { "type": "array", "items": { "type": "object", "properties": { "field": { "type": "string", "description": "The field path to aggregate" }, "operation": { "type": "string", "enum": ["sum", "avg", "min", "max", "count", "countDistinct", "first", "last"], "description": "The aggregation operation" }, "outputField": { "type": "string", "description": "The name of the output field" } }, "required": ["field", "operation", "outputField"], "additionalProperties": false }, "description": "List of aggregation operations to perform" }, "groupBy": { "description": "Fields to group by", "type": "array", "items": { "type": "string" } } }, "required": ["items", "aggregations"], "additionalProperties": false }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"The summarized results"}},"required":["items"],"additionalProperties":false}
|
|
1
|
+
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "description": "The summarized results" } }, "required": ["items"], "additionalProperties": false }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"value":{"description":"The value to convert"},"to":{"type":"string","enum":["string","number","boolean","json","array"],"description":"Target type"},"radix":{"description":"Radix for number parsing (e.g., 10, 16)","type":"number"}},"required":["value","to"],"additionalProperties":false}
|
|
1
|
+
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "value": { "description": "The value to convert" }, "to": { "type": "string", "enum": ["string", "number", "boolean", "json", "array"], "description": "Target type" }, "radix": { "description": "Radix for number parsing (e.g., 10, 16)", "type": "number" } }, "required": ["value", "to"], "additionalProperties": false }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"result":{"description":"The converted value"},"success":{"type":"boolean","description":"Whether the conversion succeeded"},"originalType":{"type":"string","description":"The original type of the value"}},"required":["result","success","originalType"],"additionalProperties":false}
|
|
1
|
+
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "result": { "description": "The converted value" }, "success": { "type": "boolean", "description": "Whether the conversion succeeded" }, "originalType": { "type": "string", "description": "The original type of the value" } }, "required": ["result", "success", "originalType"], "additionalProperties": false }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{},"description":"The array to get unique values from"},"field":{"description":"For arrays of objects, the field to check uniqueness by","type":"string"}},"required":["items"],"additionalProperties":false}
|
|
1
|
+
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": {}, "description": "The array to get unique values from" }, "field": { "description": "For arrays of objects, the field to check uniqueness by", "type": "string" } }, "required": ["items"], "additionalProperties": false }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{},"description":"Array with only unique values"}},"required":["items"],"additionalProperties":false}
|
|
1
|
+
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": {}, "description": "Array with only unique values" } }, "required": ["items"], "additionalProperties": false }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.22
|
|
3
3
|
*/
|
|
4
4
|
export { wireVariable } from '@pikku/core/variable';
|
|
5
5
|
export type { CoreVariable, VariableDefinitionMeta, VariableDefinitionsMeta } from '@pikku/core/variable';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sleep.function.d.ts","sourceRoot":"","sources":["../../../../src/functions/data/sleep.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,UAAU;;;iBAGrB,CAAA;AAEF,eAAO,MAAM,KAAK;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"sleep.function.d.ts","sourceRoot":"","sources":["../../../../src/functions/data/sleep.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,UAAU;;;iBAGrB,CAAA;AAEF,eAAO,MAAM,WAAW,WAAW,CAAA;AAEnC,eAAO,MAAM,KAAK;;;;;;;;;6EAUhB,CAAA"}
|
|
@@ -4,11 +4,12 @@ export const SleepInput = z.object({
|
|
|
4
4
|
name: z.string().describe('A unique name for this sleep step'),
|
|
5
5
|
ms: z.number().describe('Duration to sleep in milliseconds'),
|
|
6
6
|
});
|
|
7
|
+
export const SleepOutput = z.void();
|
|
7
8
|
export const sleep = pikkuSessionlessFunc({
|
|
8
9
|
description: 'Sleep for a specified duration before continuing',
|
|
9
10
|
node: { displayName: 'Sleep', category: 'Data', type: 'action' },
|
|
10
11
|
input: SleepInput,
|
|
11
|
-
output:
|
|
12
|
+
output: SleepOutput,
|
|
12
13
|
func: async (_services, data, { workflow }) => {
|
|
13
14
|
if (!workflow)
|
|
14
15
|
throw new Error('sleep can only be called from within a workflow');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sleep.function.js","sourceRoot":"","sources":["../../../../src/functions/data/sleep.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAE7C,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IAC9D,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;CAC7D,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,oBAAoB,CAAC;IACxC,WAAW,EAAE,kDAAkD;IAC/D,IAAI,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;IAChE,KAAK,EAAE,UAAU;IACjB,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"sleep.function.js","sourceRoot":"","sources":["../../../../src/functions/data/sleep.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAE7C,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IAC9D,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;CAC7D,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,EAAE,CAAA;AAEnC,MAAM,CAAC,MAAM,KAAK,GAAG,oBAAoB,CAAC;IACxC,WAAW,EAAE,kDAAkD;IAC/D,IAAI,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;IAChE,KAAK,EAAE,UAAU;IACjB,MAAM,EAAE,WAAW;IACnB,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC5C,IAAI,CAAC,QAAQ;YACX,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAA;QACpE,MAAM,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,EAAE,IAAI,CAAC,CAAA;IACjD,CAAC;CACF,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pikku/addon-graph",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
|
-
"#pikku":
|
|
6
|
+
"#pikku": {
|
|
7
|
+
"types": "./.pikku/pikku-types.gen.ts",
|
|
8
|
+
"import": "./dist/.pikku/pikku-types.gen.js"
|
|
9
|
+
}
|
|
7
10
|
},
|
|
8
11
|
"exports": {
|
|
9
|
-
".":
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
"./.pikku/*": "./.pikku/*",
|
|
14
|
-
"./.pikku/pikku-metadata.gen.json": "./.pikku/pikku-metadata.gen.json",
|
|
12
|
+
".": "./dist/.pikku/pikku-bootstrap.gen.js",
|
|
13
|
+
"./.pikku/*": "./dist/.pikku/*",
|
|
14
|
+
"./.pikku/pikku-metadata.gen.json": "./dist/.pikku/pikku-metadata.gen.json",
|
|
15
15
|
"./.pikku/rpc/pikku-rpc-wirings-map.internal.gen.js": {
|
|
16
|
-
"types": "
|
|
16
|
+
"types": "./dist/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
|
-
"dist"
|
|
21
|
-
".pikku"
|
|
20
|
+
"dist"
|
|
22
21
|
],
|
|
23
22
|
"scripts": {
|
|
24
|
-
"build": "
|
|
25
|
-
"pikku": "pikku
|
|
23
|
+
"build": "./build.sh",
|
|
24
|
+
"pikku": "./build.sh pikku",
|
|
26
25
|
"ncu": "npx npm-check-updates",
|
|
27
|
-
"pretest": "pikku
|
|
26
|
+
"pretest": "./build.sh pikku",
|
|
28
27
|
"test": "tsc --noEmit",
|
|
29
28
|
"prepublishOnly": "yarn build"
|
|
30
29
|
},
|
|
@@ -33,7 +32,7 @@
|
|
|
33
32
|
"zod": "^4"
|
|
34
33
|
},
|
|
35
34
|
"devDependencies": {
|
|
36
|
-
"@pikku/cli": "
|
|
35
|
+
"@pikku/cli": "^0.12.22",
|
|
37
36
|
"@pikku/core": "*",
|
|
38
37
|
"typescript": "^5.9.3",
|
|
39
38
|
"zod": "^4"
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.19
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Addon package types for pikkuAddonConfig and pikkuAddonServices
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import type { CreateConfig, PikkuWire } 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
|
-
/**
|
|
20
|
-
* Base services provided to addon package service factories.
|
|
21
|
-
* These are always available from the parent application.
|
|
22
|
-
*/
|
|
23
|
-
export type AddonBaseServices = {
|
|
24
|
-
logger: SingletonServices['logger']
|
|
25
|
-
variables: TypedVariablesService
|
|
26
|
-
secrets: TypedSecretService
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Creates a Pikku config factory for addon packages.
|
|
31
|
-
* Unlike pikkuConfig, this receives AddonBaseServices (logger, variables, secrets)
|
|
32
|
-
* from the parent application, so addon packages can read variables/secrets during config creation.
|
|
33
|
-
*/
|
|
34
|
-
export const pikkuAddonConfig = <ExistingServices extends Omit<Partial<SingletonServices>, 'variables' | 'secrets'> & AddonBaseServices>(
|
|
35
|
-
func: (services: ExistingServices) => Promise<Config>
|
|
36
|
-
): CreateConfig<Config> => {
|
|
37
|
-
return (async (_variables: any, existingServices?: Partial<SingletonServices>): Promise<Config> => {
|
|
38
|
-
const { secrets, variables, ...rest } = (existingServices ?? {}) as unknown as SingletonServices
|
|
39
|
-
return func({ ...rest, secrets: new TypedSecretService(secrets), variables: new TypedVariablesService(variables) } as ExistingServices)
|
|
40
|
-
}) as unknown as CreateConfig<Config>
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Creates a Pikku singleton services factory for addon packages.
|
|
45
|
-
* Unlike pikkuServices, this expects the parent application to provide
|
|
46
|
-
* logger, variables, and secrets - no fallbacks needed.
|
|
47
|
-
*
|
|
48
|
-
* @param func - Addon services factory function that receives config and base services
|
|
49
|
-
* @returns The singleton services factory function
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```typescript
|
|
53
|
-
* export const createSingletonServices = pikkuAddonServices(async (
|
|
54
|
-
* config,
|
|
55
|
-
* { secrets }
|
|
56
|
-
* ) => {
|
|
57
|
-
* const creds = await secrets.getSecretJSON<GithubCredentials>('GITHUB_CREDENTIALS')
|
|
58
|
-
* const github = new GithubService(creds)
|
|
59
|
-
* return { github }
|
|
60
|
-
* })
|
|
61
|
-
* ```
|
|
62
|
-
*/
|
|
63
|
-
export const pikkuAddonServices = <T extends Record<string, any>, ExistingServices extends Omit<Partial<SingletonServices>, 'variables' | 'secrets'> & AddonBaseServices>(
|
|
64
|
-
func: (config: Config, services: ExistingServices) => Promise<T>
|
|
65
|
-
) => {
|
|
66
|
-
return async (config: Config, existingServices?: Partial<SingletonServices>): Promise<RequiredSingletonServices> => {
|
|
67
|
-
const { logger, variables, secrets, schema } = (existingServices ?? {}) as unknown as SingletonServices
|
|
68
|
-
const typedVariables = new TypedVariablesService(variables)
|
|
69
|
-
const typedSecrets = new TypedSecretService(secrets)
|
|
70
|
-
const result = await func(config, { ...existingServices, logger, variables: typedVariables, secrets: typedSecrets } as ExistingServices)
|
|
71
|
-
return {
|
|
72
|
-
config,
|
|
73
|
-
logger,
|
|
74
|
-
schema,
|
|
75
|
-
variables: typedVariables,
|
|
76
|
-
secrets: typedSecrets,
|
|
77
|
-
...result,
|
|
78
|
-
} as unknown as RequiredSingletonServices
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Creates a Pikku wire services factory for addon packages.
|
|
84
|
-
* Wire services are created per-request and have access to the HTTP request context.
|
|
85
|
-
*
|
|
86
|
-
* @param func - Wire services factory function that receives singleton services and the wire context
|
|
87
|
-
* @returns The wire services factory function
|
|
88
|
-
*
|
|
89
|
-
* @example
|
|
90
|
-
* ```typescript
|
|
91
|
-
* export const createWireServices = pikkuAddonWireServices(async (services, wire) => {
|
|
92
|
-
* const authHeader = wire.http?.request?.header('authorization')
|
|
93
|
-
* return { myService: new MyService(authHeader) }
|
|
94
|
-
* })
|
|
95
|
-
* ```
|
|
96
|
-
*/
|
|
97
|
-
export const pikkuAddonWireServices = <ExistingServices extends Omit<Partial<SingletonServices>, 'variables' | 'secrets'> & AddonBaseServices>(
|
|
98
|
-
func: (services: ExistingServices, wire: PikkuWire) => Promise<Record<string, any>>
|
|
99
|
-
) => {
|
|
100
|
-
return ((services: any, wire: PikkuWire) => {
|
|
101
|
-
const typedVariables = new TypedVariablesService(services.variables)
|
|
102
|
-
const typedSecrets = new TypedSecretService(services.secrets)
|
|
103
|
-
return func({ ...services, variables: typedVariables, secrets: typedSecrets } as ExistingServices, wire)
|
|
104
|
-
}) as any
|
|
105
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.19
|
|
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
|
-
})
|
|
10
|
-
|
|
11
|
-
pikkuState('@pikku/addon-graph', 'package', 'requiredParentServices', ["jwt"])
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.19
|
|
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<
|
|
20
|
-
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
21
|
-
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
22
|
-
> = Omit<CoreAIAgent<PikkuPermission, PikkuMiddleware>, 'tools' | 'agents' | 'memory' | 'input' | 'output'> & {
|
|
23
|
-
input?: InputSchema
|
|
24
|
-
output?: OutputSchema
|
|
25
|
-
memory?: Omit<AIAgentMemoryConfig, 'workingMemory'> & { workingMemory?: StandardSchemaV1 }
|
|
26
|
-
tools?: object[]
|
|
27
|
-
agents?: AIAgentConfig<StandardSchemaV1 | undefined, StandardSchemaV1 | undefined>[]
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export const pikkuAIAgent = <
|
|
31
|
-
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
32
|
-
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
33
|
-
>(
|
|
34
|
-
agent: AIAgentConfig<InputSchema, OutputSchema>
|
|
35
|
-
) => {
|
|
36
|
-
return agent
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export const pikkuAIMiddleware = <
|
|
40
|
-
State extends Record<string, unknown> = Record<string, unknown>,
|
|
41
|
-
RequiredServices extends Services = Services,
|
|
42
|
-
>(
|
|
43
|
-
hooks: PikkuAIMiddlewareHooks<State, RequiredServices>
|
|
44
|
-
): PikkuAIMiddlewareHooks<State, RequiredServices> => hooks
|
|
45
|
-
|
|
46
|
-
export const agent = <Name extends keyof AgentMap>(
|
|
47
|
-
agentName: Name
|
|
48
|
-
) => {
|
|
49
|
-
return coreAgent<AgentMap>(agentName as string & keyof AgentMap) as PikkuFunctionConfig<
|
|
50
|
-
AIAgentInput,
|
|
51
|
-
{ runId: string; result: AgentMap[Name]['output']; usage: { inputTokens: number; outputTokens: number } },
|
|
52
|
-
'session' | 'rpc'
|
|
53
|
-
>
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export const agentStream = <Name extends keyof AgentMap>(
|
|
57
|
-
agentName?: Name
|
|
58
|
-
) => {
|
|
59
|
-
return coreAgentStream<AgentMap>(agentName as string & keyof AgentMap) as PikkuFunctionConfig<
|
|
60
|
-
{ agentName?: string; message: string; threadId: string; resourceId: string },
|
|
61
|
-
void,
|
|
62
|
-
'session' | 'rpc'
|
|
63
|
-
>
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export const agentResume = () => {
|
|
67
|
-
return coreAgentResume() as PikkuFunctionConfig<
|
|
68
|
-
{ runId: string; toolCallId: string; approved: boolean },
|
|
69
|
-
void,
|
|
70
|
-
'session' | 'rpc'
|
|
71
|
-
>
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export const agentApprove = <Name extends keyof AgentMap>(
|
|
75
|
-
agentName: Name
|
|
76
|
-
) => {
|
|
77
|
-
return coreAgentApprove<AgentMap>(agentName as string & keyof AgentMap) as PikkuFunctionConfig<
|
|
78
|
-
{ runId: string; approvals: { toolCallId: string; approved: boolean }[] },
|
|
79
|
-
unknown,
|
|
80
|
-
'session' | 'rpc'
|
|
81
|
-
>
|
|
82
|
-
}
|