@pikku/addon-console 0.12.5 → 0.12.7
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 +3 -3
- package/dist/.pikku/addon/pikku-addon-types.gen.d.ts.map +1 -1
- package/dist/.pikku/addon/pikku-addon-types.gen.js +6 -2
- package/dist/.pikku/addon/pikku-addon-types.gen.js.map +1 -1
- package/dist/.pikku/addon/pikku-package.gen.js +2 -1
- package/dist/.pikku/addon/pikku-package.gen.js.map +1 -1
- package/dist/.pikku/agent/pikku-agent-map.gen.d.ts +4 -0
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +6 -6
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts.map +1 -1
- package/dist/.pikku/agent/pikku-agent-types.gen.js.map +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +112 -0
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts.map +1 -0
- package/dist/.pikku/channel/pikku-channel-types.gen.js +60 -0
- package/dist/.pikku/channel/pikku-channel-types.gen.js.map +1 -0
- package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +78 -0
- package/dist/.pikku/cli/pikku-cli-types.gen.d.ts.map +1 -0
- package/dist/.pikku/cli/pikku-cli-types.gen.js +61 -0
- package/dist/.pikku/cli/pikku-cli-types.gen.js.map +1 -0
- package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +28 -31
- package/dist/.pikku/function/pikku-function-types.gen.d.ts.map +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.js +15 -19
- 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 +522 -184
- package/dist/.pikku/function/pikku-functions.gen.js +38 -2
- package/dist/.pikku/function/pikku-functions.gen.js.map +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +120 -0
- package/dist/.pikku/http/pikku-http-types.gen.d.ts.map +1 -0
- package/dist/.pikku/http/pikku-http-types.gen.js +72 -0
- package/dist/.pikku/http/pikku-http-types.gen.js.map +1 -0
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +131 -0
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts.map +1 -0
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js +38 -0
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js.map +1 -0
- package/dist/.pikku/pikku-bootstrap.gen.d.ts +3 -2
- package/dist/.pikku/pikku-bootstrap.gen.d.ts.map +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.js +1 -10
- package/dist/.pikku/pikku-bootstrap.gen.js.map +1 -1
- package/dist/.pikku/pikku-meta-service.gen.d.ts +8 -0
- package/dist/.pikku/pikku-meta-service.gen.d.ts.map +1 -0
- package/dist/.pikku/pikku-meta-service.gen.js +10 -0
- package/dist/.pikku/pikku-meta-service.gen.js.map +1 -0
- package/dist/.pikku/pikku-services.gen.d.ts +12 -10
- package/dist/.pikku/pikku-services.gen.d.ts.map +1 -1
- package/dist/.pikku/pikku-services.gen.js +11 -8
- 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 +24 -0
- package/dist/.pikku/queue/pikku-queue-types.gen.d.ts.map +1 -0
- package/dist/.pikku/queue/pikku-queue-types.gen.js +17 -0
- package/dist/.pikku/queue/pikku-queue-types.gen.js.map +1 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +218 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +219 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +32 -14
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +22 -0
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts.map +1 -0
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +17 -0
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js.map +1 -0
- package/dist/.pikku/schemas/register.gen.js +111 -43
- package/dist/.pikku/schemas/register.gen.js.map +1 -1
- package/dist/.pikku/schemas/schemas/AddonPackageInfo.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/AgentCredentialCheckInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/AgentCredentialCheckOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/AllMeta.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/CredentialDeleteInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/CredentialDeleteOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/CredentialGetInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/CredentialGetOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/CredentialListUsersOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/CredentialSetInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/CredentialSetOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/CredentialStatusInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/CredentialStatusOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/CredentialUsersInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/CredentialUsersOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/GetAddonMetaOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/GetFunctionsMetaOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/GetOpenapiDetailInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/GetOpenapiDetailOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/GetOpenapisInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/GetOpenapisOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/GetWorkflowMetaByIdOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/InstallAddonInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/InstallAddonOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/InstallOpenapiAddonInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/InstallOpenapiAddonOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/OauthConnectInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PingOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ReadAgentSourceInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ReadAgentSourceOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ReadFunctionBodyInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ReadFunctionBodyOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ReadFunctionSourceInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ReadFunctionSourceOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/UpdateAgentConfigInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/UpdateAgentConfigOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/UpdateFunctionBodyInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/UpdateFunctionBodyOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/UpdateFunctionConfigInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/UpdateFunctionConfigOutput.schema.json +1 -0
- 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 +38 -0
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +36 -27
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts.map +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +5 -18
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js.map +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/agent-credential-check.function.d.ts +26 -0
- package/dist/src/functions/agent-credential-check.function.d.ts.map +1 -0
- package/dist/src/functions/agent-credential-check.function.js +48 -0
- package/dist/src/functions/agent-credential-check.function.js.map +1 -0
- package/dist/src/functions/credential-delete.function.d.ts +17 -0
- package/dist/src/functions/credential-delete.function.d.ts.map +1 -0
- package/dist/src/functions/credential-delete.function.js +15 -0
- package/dist/src/functions/credential-delete.function.js.map +1 -0
- package/dist/src/functions/credential-get.function.d.ts +17 -0
- package/dist/src/functions/credential-get.function.d.ts.map +1 -0
- package/dist/src/functions/credential-get.function.js +15 -0
- package/dist/src/functions/credential-get.function.js.map +1 -0
- package/dist/src/functions/credential-list-users.function.d.ts +12 -0
- package/dist/src/functions/credential-list-users.function.d.ts.map +1 -0
- package/dist/src/functions/credential-list-users.function.js +25 -0
- package/dist/src/functions/credential-list-users.function.js.map +1 -0
- package/dist/src/functions/credential-set.function.d.ts +20 -0
- package/dist/src/functions/credential-set.function.d.ts.map +1 -0
- package/dist/src/functions/credential-set.function.js +15 -0
- package/dist/src/functions/credential-set.function.js.map +1 -0
- package/dist/src/functions/credential-status.function.d.ts +17 -0
- package/dist/src/functions/credential-status.function.d.ts.map +1 -0
- package/dist/src/functions/credential-status.function.js +18 -0
- package/dist/src/functions/credential-status.function.js.map +1 -0
- package/dist/src/functions/credential-users.function.d.ts +14 -0
- package/dist/src/functions/credential-users.function.d.ts.map +1 -0
- package/dist/src/functions/credential-users.function.js +15 -0
- package/dist/src/functions/credential-users.function.js.map +1 -0
- package/dist/src/functions/delete-agent-thread.function.d.ts.map +1 -1
- package/dist/src/functions/delete-agent-thread.function.js +2 -1
- package/dist/src/functions/delete-agent-thread.function.js.map +1 -1
- package/dist/src/functions/delete-workflow-run.function.d.ts.map +1 -1
- package/dist/src/functions/delete-workflow-run.function.js +2 -1
- package/dist/src/functions/delete-workflow-run.function.js.map +1 -1
- package/dist/src/functions/get-agent-thread-messages.function.d.ts.map +1 -1
- package/dist/src/functions/get-agent-thread-messages.function.js +2 -1
- package/dist/src/functions/get-agent-thread-messages.function.js.map +1 -1
- package/dist/src/functions/get-agent-thread-runs.function.d.ts.map +1 -1
- package/dist/src/functions/get-agent-thread-runs.function.js +2 -1
- package/dist/src/functions/get-agent-thread-runs.function.js.map +1 -1
- package/dist/src/functions/get-agent-threads.function.d.ts.map +1 -1
- package/dist/src/functions/get-agent-threads.function.js +2 -1
- package/dist/src/functions/get-agent-threads.function.js.map +1 -1
- package/dist/src/functions/get-ai-workflows.function.d.ts.map +1 -1
- package/dist/src/functions/get-ai-workflows.function.js +5 -4
- package/dist/src/functions/get-ai-workflows.function.js.map +1 -1
- package/dist/src/functions/get-channel-snippets.function.d.ts.map +1 -1
- package/dist/src/functions/get-channel-snippets.function.js +3 -3
- package/dist/src/functions/get-channel-snippets.function.js.map +1 -1
- package/dist/src/functions/get-functions-meta.function.js +3 -3
- package/dist/src/functions/get-functions-meta.function.js.map +1 -1
- package/dist/src/functions/get-installed-addons.function.d.ts.map +1 -1
- package/dist/src/functions/get-installed-addons.function.js +9 -9
- package/dist/src/functions/get-installed-addons.function.js.map +1 -1
- package/dist/src/functions/get-installed-package.function.d.ts.map +1 -1
- package/dist/src/functions/get-installed-package.function.js +39 -51
- package/dist/src/functions/get-installed-package.function.js.map +1 -1
- package/dist/src/functions/get-openapi-detail.function.d.ts +53 -0
- package/dist/src/functions/get-openapi-detail.function.d.ts.map +1 -0
- package/dist/src/functions/get-openapi-detail.function.js +17 -0
- package/dist/src/functions/get-openapi-detail.function.js.map +1 -0
- package/dist/src/functions/get-openapis.function.d.ts +56 -0
- package/dist/src/functions/get-openapis.function.d.ts.map +1 -0
- package/dist/src/functions/get-openapis.function.js +20 -0
- package/dist/src/functions/get-openapis.function.js.map +1 -0
- package/dist/src/functions/get-schema.function.js +3 -3
- package/dist/src/functions/get-schema.function.js.map +1 -1
- package/dist/src/functions/get-workflow-meta-by-id.function.d.ts +6 -0
- package/dist/src/functions/get-workflow-meta-by-id.function.d.ts.map +1 -1
- package/dist/src/functions/get-workflow-meta-by-id.function.js +4 -4
- package/dist/src/functions/get-workflow-meta-by-id.function.js.map +1 -1
- package/dist/src/functions/get-workflow-run-history.function.d.ts.map +1 -1
- package/dist/src/functions/get-workflow-run-history.function.js +2 -1
- package/dist/src/functions/get-workflow-run-history.function.js.map +1 -1
- package/dist/src/functions/get-workflow-run-names.function.d.ts.map +1 -1
- package/dist/src/functions/get-workflow-run-names.function.js +2 -1
- package/dist/src/functions/get-workflow-run-names.function.js.map +1 -1
- package/dist/src/functions/get-workflow-run-steps.function.d.ts.map +1 -1
- package/dist/src/functions/get-workflow-run-steps.function.js +2 -1
- package/dist/src/functions/get-workflow-run-steps.function.js.map +1 -1
- package/dist/src/functions/get-workflow-run.function.d.ts.map +1 -1
- package/dist/src/functions/get-workflow-run.function.js +2 -1
- package/dist/src/functions/get-workflow-run.function.js.map +1 -1
- package/dist/src/functions/get-workflow-runs.function.d.ts.map +1 -1
- package/dist/src/functions/get-workflow-runs.function.js +2 -1
- package/dist/src/functions/get-workflow-runs.function.js.map +1 -1
- package/dist/src/functions/get-workflow-version.function.d.ts.map +1 -1
- package/dist/src/functions/get-workflow-version.function.js +2 -1
- package/dist/src/functions/get-workflow-version.function.js.map +1 -1
- package/dist/src/functions/install-addon.function.d.ts +23 -0
- package/dist/src/functions/install-addon.function.d.ts.map +1 -0
- package/dist/src/functions/install-addon.function.js +78 -0
- package/dist/src/functions/install-addon.function.js.map +1 -0
- package/dist/src/functions/install-openapi-addon.function.d.ts +23 -0
- package/dist/src/functions/install-openapi-addon.function.d.ts.map +1 -0
- package/dist/src/functions/install-openapi-addon.function.js +112 -0
- package/dist/src/functions/install-openapi-addon.function.js.map +1 -0
- package/dist/src/functions/oauth-connect.function.d.ts +3 -0
- package/dist/src/functions/oauth-connect.function.d.ts.map +1 -1
- package/dist/src/functions/oauth-connect.function.js +16 -6
- package/dist/src/functions/oauth-connect.function.js.map +1 -1
- package/dist/src/functions/oauth-disconnect.function.d.ts.map +1 -1
- package/dist/src/functions/oauth-disconnect.function.js +11 -5
- package/dist/src/functions/oauth-disconnect.function.js.map +1 -1
- package/dist/src/functions/oauth-exchange-tokens.function.d.ts.map +1 -1
- package/dist/src/functions/oauth-exchange-tokens.function.js +9 -4
- package/dist/src/functions/oauth-exchange-tokens.function.js.map +1 -1
- package/dist/src/functions/oauth-refresh-token.function.d.ts.map +1 -1
- package/dist/src/functions/oauth-refresh-token.function.js +4 -3
- package/dist/src/functions/oauth-refresh-token.function.js.map +1 -1
- package/dist/src/functions/oauth-status.function.d.ts.map +1 -1
- package/dist/src/functions/oauth-status.function.js +16 -6
- package/dist/src/functions/oauth-status.function.js.map +1 -1
- package/dist/src/functions/oauth-test-token.function.d.ts.map +1 -1
- package/dist/src/functions/oauth-test-token.function.js +4 -3
- package/dist/src/functions/oauth-test-token.function.js.map +1 -1
- package/dist/src/functions/ping.function.d.ts +8 -0
- package/dist/src/functions/ping.function.d.ts.map +1 -0
- package/dist/src/functions/ping.function.js +11 -0
- package/dist/src/functions/ping.function.js.map +1 -0
- package/dist/src/functions/read-agent-source.function.d.ts +17 -0
- package/dist/src/functions/read-agent-source.function.d.ts.map +1 -0
- package/dist/src/functions/read-agent-source.function.js +15 -0
- package/dist/src/functions/read-agent-source.function.js.map +1 -0
- package/dist/src/functions/read-function-body.function.d.ts +17 -0
- package/dist/src/functions/read-function-body.function.d.ts.map +1 -0
- package/dist/src/functions/read-function-body.function.js +16 -0
- package/dist/src/functions/read-function-body.function.js.map +1 -0
- package/dist/src/functions/read-function-source.function.d.ts +23 -0
- package/dist/src/functions/read-function-source.function.d.ts.map +1 -0
- package/dist/src/functions/read-function-source.function.js +15 -0
- package/dist/src/functions/read-function-source.function.js.map +1 -0
- package/dist/src/functions/stream-workflow-run.function.d.ts.map +1 -1
- package/dist/src/functions/stream-workflow-run.function.js +2 -1
- package/dist/src/functions/stream-workflow-run.function.js.map +1 -1
- package/dist/src/functions/update-agent-config.function.d.ts +21 -0
- package/dist/src/functions/update-agent-config.function.d.ts.map +1 -0
- package/dist/src/functions/update-agent-config.function.js +16 -0
- package/dist/src/functions/update-agent-config.function.js.map +1 -0
- package/dist/src/functions/update-function-body.function.d.ts +20 -0
- package/dist/src/functions/update-function-body.function.d.ts.map +1 -0
- package/dist/src/functions/update-function-body.function.js +16 -0
- package/dist/src/functions/update-function-body.function.js.map +1 -0
- package/dist/src/functions/update-function-config.function.d.ts +21 -0
- package/dist/src/functions/update-function-config.function.d.ts.map +1 -0
- package/dist/src/functions/update-function-config.function.js +16 -0
- package/dist/src/functions/update-function-config.function.js.map +1 -0
- package/dist/src/services/code-edit.service.d.ts +51 -0
- package/dist/src/services/code-edit.service.d.ts.map +1 -0
- package/dist/src/services/code-edit.service.js +299 -0
- package/dist/src/services/code-edit.service.js.map +1 -0
- package/dist/src/services/code-edit.service.test.d.ts +2 -0
- package/dist/src/services/code-edit.service.test.d.ts.map +1 -0
- package/dist/src/services/code-edit.service.test.js +375 -0
- package/dist/src/services/code-edit.service.test.js.map +1 -0
- package/dist/src/services/oauth.service.d.ts +1 -0
- package/dist/src/services/oauth.service.d.ts.map +1 -1
- package/dist/src/services/oauth.service.js.map +1 -1
- package/dist/src/services/wiring.service.d.ts +12 -222
- package/dist/src/services/wiring.service.d.ts.map +1 -1
- package/dist/src/services/wiring.service.js +30 -334
- package/dist/src/services/wiring.service.js.map +1 -1
- package/dist/src/services.d.ts.map +1 -1
- package/dist/src/services.js +16 -11
- package/dist/src/services.js.map +1 -1
- package/package.json +8 -10
- package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.d.ts +0 -2
- package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.d.ts.map +0 -1
- package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.js +0 -7
- package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.js.map +0 -1
- package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.json +0 -3
- package/dist/.pikku/agent/pikku-agent-wirings.gen.d.ts +0 -5
- package/dist/.pikku/agent/pikku-agent-wirings.gen.d.ts.map +0 -1
- package/dist/.pikku/agent/pikku-agent-wirings.gen.js +0 -5
- package/dist/.pikku/agent/pikku-agent-wirings.gen.js.map +0 -1
- package/dist/src/index.d.ts +0 -16
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -15
- package/dist/src/index.js.map +0 -1
- package/dist/src/services/file-watcher.service.d.ts +0 -13
- package/dist/src/services/file-watcher.service.d.ts.map +0 -1
- package/dist/src/services/file-watcher.service.js +0 -31
- package/dist/src/services/file-watcher.service.js.map +0 -1
- package/dist/src/services/schema.service.d.ts +0 -10
- package/dist/src/services/schema.service.d.ts.map +0 -1
- package/dist/src/services/schema.service.js +0 -35
- package/dist/src/services/schema.service.js.map +0 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const credentialSet: import("#pikku").PikkuFunctionConfig<{
|
|
2
|
+
name: string;
|
|
3
|
+
value: unknown;
|
|
4
|
+
userId?: string;
|
|
5
|
+
}, {
|
|
6
|
+
success: boolean;
|
|
7
|
+
}, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
|
|
8
|
+
name: string;
|
|
9
|
+
value: unknown;
|
|
10
|
+
userId?: string;
|
|
11
|
+
}, {
|
|
12
|
+
success: boolean;
|
|
13
|
+
}, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<{
|
|
14
|
+
name: string;
|
|
15
|
+
value: unknown;
|
|
16
|
+
userId?: string;
|
|
17
|
+
}, {
|
|
18
|
+
success: boolean;
|
|
19
|
+
}, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
20
|
+
//# sourceMappingURL=credential-set.function.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-set.function.d.ts","sourceRoot":"","sources":["../../../src/functions/credential-set.function.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa;UAChB,MAAM;WAAS,OAAO;aAAW,MAAM;;aACpC,OAAO;;UADV,MAAM;WAAS,OAAO;aAAW,MAAM;;aACpC,OAAO;;UADV,MAAM;WAAS,OAAO;aAAW,MAAM;;aACpC,OAAO;uEAYlB,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MissingServiceError } from '@pikku/core/errors';
|
|
2
|
+
import { pikkuSessionlessFunc } from '#pikku';
|
|
3
|
+
export const credentialSet = pikkuSessionlessFunc({
|
|
4
|
+
title: 'Set Credential',
|
|
5
|
+
description: 'Stores a credential value, optionally scoped to a user.',
|
|
6
|
+
expose: true,
|
|
7
|
+
func: async ({ credentialService }, { name, value, userId }) => {
|
|
8
|
+
if (!credentialService) {
|
|
9
|
+
throw new MissingServiceError('CredentialService is not configured');
|
|
10
|
+
}
|
|
11
|
+
await credentialService.set(name, value, userId);
|
|
12
|
+
return { success: true };
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=credential-set.function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-set.function.js","sourceRoot":"","sources":["../../../src/functions/credential-set.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAE7C,MAAM,CAAC,MAAM,aAAa,GAAG,oBAAoB,CAG/C;IACA,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,yDAAyD;IACtE,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,KAAK,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE;QAC7D,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACvB,MAAM,IAAI,mBAAmB,CAAC,qCAAqC,CAAC,CAAA;QACtE,CAAC;QACD,MAAM,iBAAiB,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;QAChD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA;IAC1B,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const credentialStatus: import("#pikku").PikkuFunctionConfig<{
|
|
2
|
+
names: string[];
|
|
3
|
+
userId?: string;
|
|
4
|
+
}, {
|
|
5
|
+
statuses: Record<string, boolean>;
|
|
6
|
+
}, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
|
|
7
|
+
names: string[];
|
|
8
|
+
userId?: string;
|
|
9
|
+
}, {
|
|
10
|
+
statuses: Record<string, boolean>;
|
|
11
|
+
}, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<{
|
|
12
|
+
names: string[];
|
|
13
|
+
userId?: string;
|
|
14
|
+
}, {
|
|
15
|
+
statuses: Record<string, boolean>;
|
|
16
|
+
}, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
17
|
+
//# sourceMappingURL=credential-status.function.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-status.function.d.ts","sourceRoot":"","sources":["../../../src/functions/credential-status.function.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB;WAClB,MAAM,EAAE;aAAW,MAAM;;cACtB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;WAD1B,MAAM,EAAE;aAAW,MAAM;;cACtB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;WAD1B,MAAM,EAAE;aAAW,MAAM;;cACtB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;uEAgBnC,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { MissingServiceError } from '@pikku/core/errors';
|
|
2
|
+
import { pikkuSessionlessFunc } from '#pikku';
|
|
3
|
+
export const credentialStatus = pikkuSessionlessFunc({
|
|
4
|
+
title: 'Credential Status',
|
|
5
|
+
description: 'Checks which of the given credential names are configured. Optionally scoped to a user.',
|
|
6
|
+
expose: true,
|
|
7
|
+
func: async ({ credentialService }, { names, userId }) => {
|
|
8
|
+
if (!credentialService) {
|
|
9
|
+
throw new MissingServiceError('CredentialService is not configured');
|
|
10
|
+
}
|
|
11
|
+
const statuses = {};
|
|
12
|
+
for (const name of names) {
|
|
13
|
+
statuses[name] = await credentialService.has(name, userId);
|
|
14
|
+
}
|
|
15
|
+
return { statuses };
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=credential-status.function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-status.function.js","sourceRoot":"","sources":["../../../src/functions/credential-status.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAE7C,MAAM,CAAC,MAAM,gBAAgB,GAAG,oBAAoB,CAGlD;IACA,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EACT,yFAAyF;IAC3F,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,KAAK,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE;QACvD,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACvB,MAAM,IAAI,mBAAmB,CAAC,qCAAqC,CAAC,CAAA;QACtE,CAAC;QACD,MAAM,QAAQ,GAA4B,EAAE,CAAA;QAC5C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,QAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,iBAAiB,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;QAC5D,CAAC;QACD,OAAO,EAAE,QAAQ,EAAE,CAAA;IACrB,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const credentialUsers: import("#pikku").PikkuFunctionConfig<{
|
|
2
|
+
name: string;
|
|
3
|
+
}, {
|
|
4
|
+
userIds: string[];
|
|
5
|
+
}, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
|
|
6
|
+
name: string;
|
|
7
|
+
}, {
|
|
8
|
+
userIds: string[];
|
|
9
|
+
}, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<{
|
|
10
|
+
name: string;
|
|
11
|
+
}, {
|
|
12
|
+
userIds: string[];
|
|
13
|
+
}, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
14
|
+
//# sourceMappingURL=credential-users.function.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-users.function.d.ts","sourceRoot":"","sources":["../../../src/functions/credential-users.function.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe;UAClB,MAAM;;aACH,MAAM,EAAE;;UADX,MAAM;;aACH,MAAM,EAAE;;UADX,MAAM;;aACH,MAAM,EAAE;uEAYnB,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MissingServiceError } from '@pikku/core/errors';
|
|
2
|
+
import { pikkuSessionlessFunc } from '#pikku';
|
|
3
|
+
export const credentialUsers = pikkuSessionlessFunc({
|
|
4
|
+
title: 'Credential Users',
|
|
5
|
+
description: 'Lists all user IDs that have a specific credential configured.',
|
|
6
|
+
expose: true,
|
|
7
|
+
func: async ({ credentialService }, { name }) => {
|
|
8
|
+
if (!credentialService) {
|
|
9
|
+
throw new MissingServiceError('CredentialService is not configured');
|
|
10
|
+
}
|
|
11
|
+
const userIds = await credentialService.getUsersWithCredential(name);
|
|
12
|
+
return { userIds };
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=credential-users.function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-users.function.js","sourceRoot":"","sources":["../../../src/functions/credential-users.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAE7C,MAAM,CAAC,MAAM,eAAe,GAAG,oBAAoB,CAGjD;IACA,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,gEAAgE;IAC7E,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,KAAK,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;QAC9C,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACvB,MAAM,IAAI,mBAAmB,CAAC,qCAAqC,CAAC,CAAA;QACtE,CAAC;QACD,MAAM,OAAO,GAAG,MAAM,iBAAiB,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAA;QACpE,OAAO,EAAE,OAAO,EAAE,CAAA;IACpB,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-agent-thread.function.d.ts","sourceRoot":"","sources":["../../../src/functions/delete-agent-thread.function.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"delete-agent-thread.function.d.ts","sourceRoot":"","sources":["../../../src/functions/delete-agent-thread.function.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB;cAChB,MAAM;;aACP,OAAO;;cADN,MAAM;;aACP,OAAO;;cADN,MAAM;;aACP,OAAO;uEAalB,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MissingServiceError } from '@pikku/core/errors';
|
|
1
2
|
import { pikkuSessionlessFunc } from '#pikku';
|
|
2
3
|
export const deleteAgentThread = pikkuSessionlessFunc({
|
|
3
4
|
title: 'Delete Agent Thread',
|
|
@@ -6,7 +7,7 @@ export const deleteAgentThread = pikkuSessionlessFunc({
|
|
|
6
7
|
auth: false,
|
|
7
8
|
func: async ({ agentRunService }, input) => {
|
|
8
9
|
if (!agentRunService)
|
|
9
|
-
throw new
|
|
10
|
+
throw new MissingServiceError('agentRunService is not available');
|
|
10
11
|
const deleted = await agentRunService.deleteThread(input.threadId);
|
|
11
12
|
return { deleted };
|
|
12
13
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-agent-thread.function.js","sourceRoot":"","sources":["../../../src/functions/delete-agent-thread.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAE7C,MAAM,CAAC,MAAM,iBAAiB,GAAG,oBAAoB,CAGnD;IACA,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EACT,kFAAkF;IACpF,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK,EAAE,EAAE,eAAe,EAAE,EAAE,KAAK,EAAE,EAAE;QACzC,IAAI,CAAC,eAAe;
|
|
1
|
+
{"version":3,"file":"delete-agent-thread.function.js","sourceRoot":"","sources":["../../../src/functions/delete-agent-thread.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAE7C,MAAM,CAAC,MAAM,iBAAiB,GAAG,oBAAoB,CAGnD;IACA,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EACT,kFAAkF;IACpF,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK,EAAE,EAAE,eAAe,EAAE,EAAE,KAAK,EAAE,EAAE;QACzC,IAAI,CAAC,eAAe;YAClB,MAAM,IAAI,mBAAmB,CAAC,kCAAkC,CAAC,CAAA;QACnE,MAAM,OAAO,GAAG,MAAM,eAAe,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;QAClE,OAAO,EAAE,OAAO,EAAE,CAAA;IACpB,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-workflow-run.function.d.ts","sourceRoot":"","sources":["../../../src/functions/delete-workflow-run.function.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"delete-workflow-run.function.d.ts","sourceRoot":"","sources":["../../../src/functions/delete-workflow-run.function.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB;WACnB,MAAM;;aACJ,OAAO;;WADT,MAAM;;aACJ,OAAO;;WADT,MAAM;;aACJ,OAAO;uEAalB,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MissingServiceError } from '@pikku/core/errors';
|
|
1
2
|
import { pikkuSessionlessFunc } from '#pikku';
|
|
2
3
|
export const deleteWorkflowRun = pikkuSessionlessFunc({
|
|
3
4
|
title: 'Delete Workflow Run',
|
|
@@ -6,7 +7,7 @@ export const deleteWorkflowRun = pikkuSessionlessFunc({
|
|
|
6
7
|
auth: false,
|
|
7
8
|
func: async ({ workflowRunService }, input) => {
|
|
8
9
|
if (!workflowRunService)
|
|
9
|
-
throw new
|
|
10
|
+
throw new MissingServiceError('workflowRunService is not available');
|
|
10
11
|
const deleted = await workflowRunService.deleteRun(input.runId);
|
|
11
12
|
return { deleted };
|
|
12
13
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-workflow-run.function.js","sourceRoot":"","sources":["../../../src/functions/delete-workflow-run.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAE7C,MAAM,CAAC,MAAM,iBAAiB,GAAG,oBAAoB,CAGnD;IACA,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EACT,kEAAkE;IACpE,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK,EAAE,EAAE,kBAAkB,EAAE,EAAE,KAAK,EAAE,EAAE;QAC5C,IAAI,CAAC,kBAAkB;
|
|
1
|
+
{"version":3,"file":"delete-workflow-run.function.js","sourceRoot":"","sources":["../../../src/functions/delete-workflow-run.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAE7C,MAAM,CAAC,MAAM,iBAAiB,GAAG,oBAAoB,CAGnD;IACA,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EACT,kEAAkE;IACpE,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK,EAAE,EAAE,kBAAkB,EAAE,EAAE,KAAK,EAAE,EAAE;QAC5C,IAAI,CAAC,kBAAkB;YACrB,MAAM,IAAI,mBAAmB,CAAC,qCAAqC,CAAC,CAAA;QACtE,MAAM,OAAO,GAAG,MAAM,kBAAkB,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;QAC/D,OAAO,EAAE,OAAO,EAAE,CAAA;IACpB,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-agent-thread-messages.function.d.ts","sourceRoot":"","sources":["../../../src/functions/get-agent-thread-messages.function.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-agent-thread-messages.function.d.ts","sourceRoot":"","sources":["../../../src/functions/get-agent-thread-messages.function.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB;cACrB,MAAM;;cAAN,MAAM;;cAAN,MAAM;8EAalB,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MissingServiceError } from '@pikku/core/errors';
|
|
1
2
|
import { pikkuSessionlessFunc } from '#pikku';
|
|
2
3
|
export const getAgentThreadMessages = pikkuSessionlessFunc({
|
|
3
4
|
title: 'Get Agent Thread Messages',
|
|
@@ -6,7 +7,7 @@ export const getAgentThreadMessages = pikkuSessionlessFunc({
|
|
|
6
7
|
auth: false,
|
|
7
8
|
func: async ({ agentRunService }, input) => {
|
|
8
9
|
if (!agentRunService)
|
|
9
|
-
throw new
|
|
10
|
+
throw new MissingServiceError('agentRunService is not available');
|
|
10
11
|
return await agentRunService.getThreadMessages(input.threadId);
|
|
11
12
|
},
|
|
12
13
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-agent-thread-messages.function.js","sourceRoot":"","sources":["../../../src/functions/get-agent-thread-messages.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAE7C,MAAM,CAAC,MAAM,sBAAsB,GAAG,oBAAoB,CAGxD;IACA,KAAK,EAAE,2BAA2B;IAClC,WAAW,EACT,6EAA6E;IAC/E,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK,EAAE,EAAE,eAAe,EAAE,EAAE,KAAK,EAAE,EAAE;QACzC,IAAI,CAAC,eAAe;
|
|
1
|
+
{"version":3,"file":"get-agent-thread-messages.function.js","sourceRoot":"","sources":["../../../src/functions/get-agent-thread-messages.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAE7C,MAAM,CAAC,MAAM,sBAAsB,GAAG,oBAAoB,CAGxD;IACA,KAAK,EAAE,2BAA2B;IAClC,WAAW,EACT,6EAA6E;IAC/E,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK,EAAE,EAAE,eAAe,EAAE,EAAE,KAAK,EAAE,EAAE;QACzC,IAAI,CAAC,eAAe;YAClB,MAAM,IAAI,mBAAmB,CAAC,kCAAkC,CAAC,CAAA;QACnE,OAAO,MAAM,eAAe,CAAC,iBAAiB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;IAChE,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-agent-thread-runs.function.d.ts","sourceRoot":"","sources":["../../../src/functions/get-agent-thread-runs.function.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-agent-thread-runs.function.d.ts","sourceRoot":"","sources":["../../../src/functions/get-agent-thread-runs.function.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB;cACjB,MAAM;;cAAN,MAAM;;cAAN,MAAM;8EAalB,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MissingServiceError } from '@pikku/core/errors';
|
|
1
2
|
import { pikkuSessionlessFunc } from '#pikku';
|
|
2
3
|
export const getAgentThreadRuns = pikkuSessionlessFunc({
|
|
3
4
|
title: 'Get Agent Thread Runs',
|
|
@@ -6,7 +7,7 @@ export const getAgentThreadRuns = pikkuSessionlessFunc({
|
|
|
6
7
|
auth: false,
|
|
7
8
|
func: async ({ agentRunService }, input) => {
|
|
8
9
|
if (!agentRunService)
|
|
9
|
-
throw new
|
|
10
|
+
throw new MissingServiceError('agentRunService is not available');
|
|
10
11
|
return await agentRunService.getThreadRuns(input.threadId);
|
|
11
12
|
},
|
|
12
13
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-agent-thread-runs.function.js","sourceRoot":"","sources":["../../../src/functions/get-agent-thread-runs.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAE7C,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAGpD;IACA,KAAK,EAAE,uBAAuB;IAC9B,WAAW,EACT,oFAAoF;IACtF,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK,EAAE,EAAE,eAAe,EAAE,EAAE,KAAK,EAAE,EAAE;QACzC,IAAI,CAAC,eAAe;
|
|
1
|
+
{"version":3,"file":"get-agent-thread-runs.function.js","sourceRoot":"","sources":["../../../src/functions/get-agent-thread-runs.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAE7C,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAGpD;IACA,KAAK,EAAE,uBAAuB;IAC9B,WAAW,EACT,oFAAoF;IACtF,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK,EAAE,EAAE,eAAe,EAAE,EAAE,KAAK,EAAE,EAAE;QACzC,IAAI,CAAC,eAAe;YAClB,MAAM,IAAI,mBAAmB,CAAC,kCAAkC,CAAC,CAAA;QACnE,OAAO,MAAM,eAAe,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;IAC5D,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-agent-threads.function.d.ts","sourceRoot":"","sources":["../../../src/functions/get-agent-threads.function.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-agent-threads.function.d.ts","sourceRoot":"","sources":["../../../src/functions/get-agent-threads.function.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe;gBACZ,MAAM;YAAU,MAAM;aAAW,MAAM;;gBAAvC,MAAM;YAAU,MAAM;aAAW,MAAM;;gBAAvC,MAAM;YAAU,MAAM;aAAW,MAAM;8EAiBrD,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MissingServiceError } from '@pikku/core/errors';
|
|
1
2
|
import { pikkuSessionlessFunc } from '#pikku';
|
|
2
3
|
export const getAgentThreads = pikkuSessionlessFunc({
|
|
3
4
|
title: 'Get Agent Threads',
|
|
@@ -6,7 +7,7 @@ export const getAgentThreads = pikkuSessionlessFunc({
|
|
|
6
7
|
auth: false,
|
|
7
8
|
func: async ({ agentRunService }, input) => {
|
|
8
9
|
if (!agentRunService)
|
|
9
|
-
throw new
|
|
10
|
+
throw new MissingServiceError('agentRunService is not available');
|
|
10
11
|
return await agentRunService.listThreads({
|
|
11
12
|
agentName: input?.agentName,
|
|
12
13
|
limit: input?.limit,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-agent-threads.function.js","sourceRoot":"","sources":["../../../src/functions/get-agent-threads.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAE7C,MAAM,CAAC,MAAM,eAAe,GAAG,oBAAoB,CAGjD;IACA,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EACT,8HAA8H;IAChI,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK,EAAE,EAAE,eAAe,EAAE,EAAE,KAAK,EAAE,EAAE;QACzC,IAAI,CAAC,eAAe;
|
|
1
|
+
{"version":3,"file":"get-agent-threads.function.js","sourceRoot":"","sources":["../../../src/functions/get-agent-threads.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAE7C,MAAM,CAAC,MAAM,eAAe,GAAG,oBAAoB,CAGjD;IACA,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EACT,8HAA8H;IAChI,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK,EAAE,EAAE,eAAe,EAAE,EAAE,KAAK,EAAE,EAAE;QACzC,IAAI,CAAC,eAAe;YAClB,MAAM,IAAI,mBAAmB,CAAC,kCAAkC,CAAC,CAAA;QACnE,OAAO,MAAM,eAAe,CAAC,WAAW,CAAC;YACvC,SAAS,EAAE,KAAK,EAAE,SAAS;YAC3B,KAAK,EAAE,KAAK,EAAE,KAAK;YACnB,MAAM,EAAE,KAAK,EAAE,MAAM;SACtB,CAAC,CAAA;IACJ,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-ai-workflows.function.d.ts","sourceRoot":"","sources":["../../../src/functions/get-ai-workflows.function.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-ai-workflows.function.d.ts","sourceRoot":"","sources":["../../../src/functions/get-ai-workflows.function.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc;gBACX,MAAM;;kBACE,MAAM;eAAa,MAAM;WAAS,GAAG;;gBAD7C,MAAM;;kBACE,MAAM;eAAa,MAAM;WAAS,GAAG;;gBAD7C,MAAM;;kBACE,MAAM;eAAa,MAAM;WAAS,GAAG;yEAY3D,CAAA"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import { MissingServiceError } from '@pikku/core/errors';
|
|
1
2
|
import { pikkuSessionlessFunc } from '#pikku';
|
|
2
3
|
export const getAIWorkflows = pikkuSessionlessFunc({
|
|
3
4
|
title: 'Get AI-Generated Workflows',
|
|
4
5
|
description: 'Returns workflow definitions created by AI agents from the workflow store. Optionally filters by agent name.',
|
|
5
6
|
expose: true,
|
|
6
7
|
auth: false,
|
|
7
|
-
func: async ({
|
|
8
|
-
if (!
|
|
9
|
-
throw new
|
|
10
|
-
return await
|
|
8
|
+
func: async ({ workflowService }, input) => {
|
|
9
|
+
if (!workflowService)
|
|
10
|
+
throw new MissingServiceError('workflowService is not available');
|
|
11
|
+
return await workflowService.getAIGeneratedWorkflows(input?.agentName);
|
|
11
12
|
},
|
|
12
13
|
});
|
|
13
14
|
//# sourceMappingURL=get-ai-workflows.function.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-ai-workflows.function.js","sourceRoot":"","sources":["../../../src/functions/get-ai-workflows.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAE7C,MAAM,CAAC,MAAM,cAAc,GAAG,oBAAoB,CAGhD;IACA,KAAK,EAAE,4BAA4B;IACnC,WAAW,EACT,8GAA8G;IAChH,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"get-ai-workflows.function.js","sourceRoot":"","sources":["../../../src/functions/get-ai-workflows.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAE7C,MAAM,CAAC,MAAM,cAAc,GAAG,oBAAoB,CAGhD;IACA,KAAK,EAAE,4BAA4B;IACnC,WAAW,EACT,8GAA8G;IAChH,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK,EAAE,EAAE,eAAe,EAAE,EAAE,KAAK,EAAE,EAAE;QACzC,IAAI,CAAC,eAAe;YAClB,MAAM,IAAI,mBAAmB,CAAC,kCAAkC,CAAC,CAAA;QACnE,OAAO,MAAM,eAAe,CAAC,uBAAuB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAA;IACxE,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-channel-snippets.function.d.ts","sourceRoot":"","sources":["../../../src/functions/get-channel-snippets.function.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-channel-snippets.function.d.ts","sourceRoot":"","sources":["../../../src/functions/get-channel-snippets.function.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAEpE,eAAO,MAAM,kBAAkB;iBACd,MAAM;;iBAAN,MAAM;;iBAAN,MAAM;wFAcrB,CAAA"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { pikkuSessionlessFunc } from '#pikku';
|
|
2
2
|
export const getChannelSnippets = pikkuSessionlessFunc({
|
|
3
3
|
title: 'Get Channel Snippets',
|
|
4
|
-
description: 'Given a channelName, reads channel metadata from
|
|
4
|
+
description: 'Given a channelName, reads channel metadata from metaService, finds the matching channel, and generates code snippets (overview, handlers, actions) for that channel. Returns empty snippets if the channel is not found.',
|
|
5
5
|
expose: true,
|
|
6
6
|
auth: false,
|
|
7
|
-
func: async ({ wiringService }, { channelName }) => {
|
|
8
|
-
const channels = await
|
|
7
|
+
func: async ({ metaService, wiringService }, { channelName }) => {
|
|
8
|
+
const channels = await metaService.getChannelsMeta();
|
|
9
9
|
const channel = channels[channelName];
|
|
10
10
|
if (!channel)
|
|
11
11
|
return { overview: '', handlers: {}, actions: {} };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-channel-snippets.function.js","sourceRoot":"","sources":["../../../src/functions/get-channel-snippets.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"get-channel-snippets.function.js","sourceRoot":"","sources":["../../../src/functions/get-channel-snippets.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAI7C,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAGpD;IACA,KAAK,EAAE,sBAAsB;IAC7B,WAAW,EACT,2NAA2N;IAC7N,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE;QAC9D,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,eAAe,EAAE,CAAA;QACpD,MAAM,OAAO,GAA4B,QAAQ,CAAC,WAAW,CAAC,CAAA;QAC9D,IAAI,CAAC,OAAO;YAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAA;QAChE,OAAO,aAAa,CAAC,uBAAuB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAA;IACpE,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { pikkuSessionlessFunc } from '#pikku';
|
|
2
2
|
export const getFunctionsMeta = pikkuSessionlessFunc({
|
|
3
3
|
title: 'Get Functions Metadata',
|
|
4
|
-
description: 'Reads function metadata from
|
|
4
|
+
description: 'Reads function metadata from metaService and returns it as a flat array of FunctionMeta objects (converting from the record/map format using Object.values)',
|
|
5
5
|
expose: true,
|
|
6
6
|
auth: false,
|
|
7
|
-
func: async ({
|
|
8
|
-
const functionsMeta = await
|
|
7
|
+
func: async ({ metaService }) => {
|
|
8
|
+
const functionsMeta = await metaService.getFunctionsMeta();
|
|
9
9
|
return Object.values(functionsMeta);
|
|
10
10
|
},
|
|
11
11
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-functions-meta.function.js","sourceRoot":"","sources":["../../../src/functions/get-functions-meta.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAG7C,MAAM,CAAC,MAAM,gBAAgB,GAAG,oBAAoB,CAAuB;IACzE,KAAK,EAAE,wBAAwB;IAC/B,WAAW,EACT
|
|
1
|
+
{"version":3,"file":"get-functions-meta.function.js","sourceRoot":"","sources":["../../../src/functions/get-functions-meta.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAG7C,MAAM,CAAC,MAAM,gBAAgB,GAAG,oBAAoB,CAAuB;IACzE,KAAK,EAAE,wBAAwB;IAC/B,WAAW,EACT,6JAA6J;IAC/J,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE;QAC9B,MAAM,aAAa,GAAG,MAAM,WAAW,CAAC,gBAAgB,EAAE,CAAA;QAC1D,OAAO,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAA;IACrC,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-installed-addons.function.d.ts","sourceRoot":"","sources":["../../../src/functions/get-installed-addons.function.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-installed-addons.function.d.ts","sourceRoot":"","sources":["../../../src/functions/get-installed-addons.function.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;CAChB;AAoBD,eAAO,MAAM,kBAAkB,+TAuB7B,CAAA"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { pikkuSessionlessFunc } from '#pikku';
|
|
2
2
|
import { pikkuState } from '@pikku/core/internal';
|
|
3
|
-
|
|
4
|
-
import { join } from 'path';
|
|
5
|
-
async function readPackageIcon(packageName) {
|
|
3
|
+
async function readPackageIcon(metaService, packageName) {
|
|
6
4
|
try {
|
|
7
|
-
const
|
|
8
|
-
if (!
|
|
5
|
+
const factories = pikkuState(packageName, 'package', 'factories');
|
|
6
|
+
if (!factories)
|
|
9
7
|
return undefined;
|
|
10
|
-
const content = await readFile(
|
|
11
|
-
return
|
|
8
|
+
const content = await metaService.readFile('console/pikku-addon-meta.gen.json');
|
|
9
|
+
return content
|
|
10
|
+
? (JSON.parse(content)?.package?.icon ?? undefined)
|
|
11
|
+
: undefined;
|
|
12
12
|
}
|
|
13
13
|
catch {
|
|
14
14
|
return undefined;
|
|
@@ -19,13 +19,13 @@ export const getInstalledAddons = pikkuSessionlessFunc({
|
|
|
19
19
|
description: 'Returns locally wired addons from pikkuState',
|
|
20
20
|
expose: true,
|
|
21
21
|
auth: false,
|
|
22
|
-
func: async () => {
|
|
22
|
+
func: async ({ metaService }) => {
|
|
23
23
|
const addonsMap = pikkuState(null, 'addons', 'packages');
|
|
24
24
|
const result = [];
|
|
25
25
|
for (const [namespace, config] of addonsMap) {
|
|
26
26
|
const functions = pikkuState(config.package, 'function', 'meta');
|
|
27
27
|
const agents = pikkuState(config.package, 'agent', 'agentsMeta');
|
|
28
|
-
const icon = await readPackageIcon(config.package);
|
|
28
|
+
const icon = await readPackageIcon(metaService, config.package);
|
|
29
29
|
result.push({
|
|
30
30
|
namespace,
|
|
31
31
|
packageName: config.package,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-installed-addons.function.js","sourceRoot":"","sources":["../../../src/functions/get-installed-addons.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"get-installed-addons.function.js","sourceRoot":"","sources":["../../../src/functions/get-installed-addons.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAYjD,KAAK,UAAU,eAAe,CAC5B,WAAwB,EACxB,WAAmB;IAEnB,IAAI,CAAC;QACH,MAAM,SAAS,GAAG,UAAU,CAAC,WAAW,EAAE,SAAS,EAAE,WAAW,CAAC,CAAA;QACjE,IAAI,CAAC,SAAS;YAAE,OAAO,SAAS,CAAA;QAChC,MAAM,OAAO,GAAG,MAAM,WAAW,CAAC,QAAQ,CACxC,mCAAmC,CACpC,CAAA;QACD,OAAO,OAAO;YACZ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,IAAI,SAAS,CAAC;YACnD,CAAC,CAAC,SAAS,CAAA;IACf,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAA;IAClB,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAAyB;IAC7E,KAAK,EAAE,sBAAsB;IAC7B,WAAW,EAAE,8CAA8C;IAC3D,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE;QAC9B,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAA;QACxD,MAAM,MAAM,GAAqB,EAAE,CAAA;QACnC,KAAK,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,SAAS,EAAE,CAAC;YAC5C,MAAM,SAAS,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,CAAC,CAAA;YAChE,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,CAAA;YAChE,MAAM,IAAI,GAAG,MAAM,eAAe,CAAC,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,CAAA;YAC/D,MAAM,CAAC,IAAI,CAAC;gBACV,SAAS;gBACT,WAAW,EAAE,MAAM,CAAC,OAAO;gBAC3B,aAAa,EAAE,MAAM,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,MAAM;gBAClD,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,MAAM;gBAC5C,IAAI;gBACJ,IAAI,EAAE,MAAM,CAAC,IAAI;aAClB,CAAC,CAAA;QACJ,CAAC;QACD,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-installed-package.function.d.ts","sourceRoot":"","sources":["../../../src/functions/get-installed-package.function.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-installed-package.function.d.ts","sourceRoot":"","sources":["../../../src/functions/get-installed-package.function.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAEpE,eAAO,MAAM,wBAAwB;iBACpB,MAAM;;iBAAN,MAAM;;iBAAN,MAAM;gGAwHrB,CAAA"}
|
|
@@ -1,52 +1,58 @@
|
|
|
1
1
|
import { pikkuSessionlessFunc } from '#pikku';
|
|
2
2
|
import { pikkuState } from '@pikku/core/internal';
|
|
3
|
-
import { readFile } from 'fs/promises';
|
|
4
|
-
import { join } from 'path';
|
|
5
|
-
async function readJsonFile(path) {
|
|
6
|
-
try {
|
|
7
|
-
const content = await readFile(path, 'utf-8');
|
|
8
|
-
return JSON.parse(content);
|
|
9
|
-
}
|
|
10
|
-
catch {
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
3
|
export const getAddonInstalledPackage = pikkuSessionlessFunc({
|
|
15
4
|
title: 'Get Installed Addon Package',
|
|
16
5
|
description: 'Returns the full details of a locally installed addon by reading from pikkuState and .pikku files',
|
|
17
6
|
expose: true,
|
|
18
7
|
auth: false,
|
|
19
|
-
func: async (
|
|
20
|
-
const
|
|
21
|
-
if (!
|
|
8
|
+
func: async ({ metaService }, { packageName }) => {
|
|
9
|
+
const factories = pikkuState(packageName, 'package', 'factories');
|
|
10
|
+
if (!factories)
|
|
22
11
|
return null;
|
|
23
12
|
const functions = pikkuState(packageName, 'function', 'meta') ?? {};
|
|
24
13
|
const agentsMeta = pikkuState(packageName, 'agent', 'agentsMeta');
|
|
25
14
|
const agents = agentsMeta ? { ...agentsMeta } : {};
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const
|
|
15
|
+
const readJson = async (path) => {
|
|
16
|
+
const content = await metaService.readFile(path);
|
|
17
|
+
return content ? JSON.parse(content) : null;
|
|
18
|
+
};
|
|
19
|
+
const secrets = (await readJson('secrets/pikku-secrets-meta.gen.json')) ?? {};
|
|
20
|
+
const variables = (await readJson('variables/pikku-variables-meta.gen.json')) ?? {};
|
|
21
|
+
const httpRoutes = (await readJson('http/pikku-http-wirings-meta.gen.json')) ?? {};
|
|
22
|
+
const channels = (await readJson('channel/pikku-channels-meta.gen.json')) ?? {};
|
|
23
|
+
const cliData = await readJson('cli/pikku-cli-wirings-meta.gen.json');
|
|
31
24
|
const cli = cliData?.programs ?? {};
|
|
32
|
-
const mcp = await
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
let
|
|
25
|
+
const mcp = await readJson('mcp/pikku-mcp-wirings-meta.gen.json');
|
|
26
|
+
// Read all schemas from the schemas directory
|
|
27
|
+
const schemas = {};
|
|
28
|
+
let schemaFiles = [];
|
|
36
29
|
try {
|
|
37
|
-
|
|
38
|
-
readme = await readFile(join(pkgDir, 'README.md'), 'utf-8');
|
|
30
|
+
schemaFiles = (await metaService.readDir('schemas/schemas')) || [];
|
|
39
31
|
}
|
|
40
32
|
catch {
|
|
41
|
-
//
|
|
33
|
+
// fallback to empty array
|
|
42
34
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
35
|
+
for (const file of schemaFiles) {
|
|
36
|
+
if (file.endsWith('.schema.json')) {
|
|
37
|
+
const name = file.replace('.schema.json', '');
|
|
38
|
+
const content = await metaService.readFile(`schemas/schemas/${file}`);
|
|
39
|
+
if (content) {
|
|
40
|
+
schemas[name] = JSON.parse(content);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
47
43
|
}
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
const nodesMeta = await readJson('console/pikku-addon-meta.gen.json');
|
|
45
|
+
// README and package.json are in the parent directory (one level up from .pikku)
|
|
46
|
+
const readme = await metaService.readFile('../README.md');
|
|
47
|
+
const pkgJsonContent = await metaService.readFile('../package.json');
|
|
48
|
+
let pkgJson = {};
|
|
49
|
+
if (pkgJsonContent) {
|
|
50
|
+
try {
|
|
51
|
+
pkgJson = JSON.parse(pkgJsonContent);
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
// fallback to empty object
|
|
55
|
+
}
|
|
50
56
|
}
|
|
51
57
|
const id = packageName.replace(/^@/, '').replace(/\//g, '-').toLowerCase();
|
|
52
58
|
const author = typeof pkgJson.author === 'string'
|
|
@@ -64,7 +70,7 @@ export const getAddonInstalledPackage = pikkuSessionlessFunc({
|
|
|
64
70
|
author,
|
|
65
71
|
repository,
|
|
66
72
|
license: pkgJson.license,
|
|
67
|
-
readme,
|
|
73
|
+
readme: readme ?? undefined,
|
|
68
74
|
icon: nodesMeta?.package?.icon,
|
|
69
75
|
publishedAt: '',
|
|
70
76
|
updatedAt: '',
|
|
@@ -82,22 +88,4 @@ export const getAddonInstalledPackage = pikkuSessionlessFunc({
|
|
|
82
88
|
};
|
|
83
89
|
},
|
|
84
90
|
});
|
|
85
|
-
async function readAllSchemas(schemasDir) {
|
|
86
|
-
const schemas = {};
|
|
87
|
-
try {
|
|
88
|
-
const { readdir } = await import('fs/promises');
|
|
89
|
-
const files = await readdir(schemasDir);
|
|
90
|
-
for (const file of files) {
|
|
91
|
-
if (file.endsWith('.schema.json')) {
|
|
92
|
-
const name = file.replace('.schema.json', '');
|
|
93
|
-
const content = await readFile(join(schemasDir, file), 'utf-8');
|
|
94
|
-
schemas[name] = JSON.parse(content);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
catch {
|
|
99
|
-
// no schemas
|
|
100
|
-
}
|
|
101
|
-
return schemas;
|
|
102
|
-
}
|
|
103
91
|
//# sourceMappingURL=get-installed-package.function.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-installed-package.function.js","sourceRoot":"","sources":["../../../src/functions/get-installed-package.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"get-installed-package.function.js","sourceRoot":"","sources":["../../../src/functions/get-installed-package.function.ts"],"names":[],"mappings":"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"}
|