@pikku/addon-ollama 0.1.1 → 0.1.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/.pikku/addon/pikku-addon-types.gen.ts +105 -0
- package/.pikku/addon/pikku-package.gen.ts +11 -0
- package/.pikku/agent/pikku-agent-map.gen.d.ts +4 -0
- package/.pikku/agent/pikku-agent-types.gen.ts +84 -0
- package/.pikku/channel/pikku-channel-types.gen.ts +177 -0
- package/.pikku/console/pikku-addon-meta.gen.json +61 -0
- package/.pikku/console/pikku-node-types.gen.ts +8 -0
- package/.pikku/function/pikku-function-types.gen.ts +797 -0
- package/.pikku/function/pikku-functions-meta-verbose.gen.json +126 -0
- package/.pikku/function/pikku-functions-meta.gen.json +102 -0
- package/.pikku/function/pikku-functions-meta.gen.ts +7 -0
- package/.pikku/function/pikku-functions.gen.ts +14 -0
- package/.pikku/http/pikku-http-types.gen.ts +119 -0
- package/.pikku/mcp/pikku-mcp-types.gen.ts +183 -0
- package/.pikku/pikku-bootstrap-scenarios.gen.ts +9 -0
- package/.pikku/pikku-bootstrap.gen.ts +8 -0
- package/.pikku/pikku-meta-service.gen.ts +10 -0
- package/.pikku/pikku-services.gen.ts +50 -0
- package/.pikku/pikku-types.gen.ts +24 -0
- package/.pikku/queue/pikku-queue-types.gen.ts +27 -0
- package/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +207 -0
- package/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +211 -0
- package/.pikku/rpc/pikku-rpc-wirings-map.remote.gen.d.ts +207 -0
- package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +6 -0
- package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +6 -0
- package/.pikku/scenarios/features.gen.json +1 -0
- package/.pikku/scenarios/pikku-scenario-functions-meta.gen.json +1 -0
- package/.pikku/scenarios/pikku-scenario-functions-meta.gen.ts +12 -0
- package/.pikku/scenarios/pikku-scenario-functions.gen.ts +4 -0
- package/.pikku/scenarios/pikku-scenario-wirings-meta.gen.ts +15 -0
- package/.pikku/scenarios/pikku-scenario-wirings.gen.ts +4 -0
- package/.pikku/scenarios/schemas/register.gen.ts +4 -0
- package/.pikku/scheduler/pikku-scheduler-types.gen.ts +25 -0
- package/.pikku/schemas/register.gen.ts +39 -0
- package/.pikku/schemas/schemas/OllamaEmbedInput.schema.json +1 -0
- package/.pikku/schemas/schemas/OllamaEmbedManyInput.schema.json +1 -0
- package/.pikku/schemas/schemas/OllamaEmbedManyOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/OllamaEmbedOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/OllamaGenerateObjectInput.schema.json +1 -0
- package/.pikku/schemas/schemas/OllamaGenerateObjectOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/OllamaGenerateTextInput.schema.json +1 -0
- package/.pikku/schemas/schemas/OllamaGenerateTextOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/VariableSchema_ollama_base_url.schema.json +1 -0
- package/.pikku/scopes/pikku-personas-meta.gen.json +1 -0
- package/.pikku/scopes/pikku-personas.gen.ts +52 -0
- package/.pikku/scopes/pikku-roles-meta.gen.json +1 -0
- package/.pikku/scopes/pikku-roles.gen.ts +41 -0
- package/.pikku/scopes/pikku-scope-types.gen.ts +7 -0
- package/.pikku/scopes/pikku-scopes-meta.gen.json +1 -0
- package/.pikku/scopes/pikku-scopes.gen.ts +58 -0
- package/.pikku/secrets/pikku-secret-types.gen.ts +5 -0
- package/.pikku/secrets/pikku-secrets-meta.gen.json +1 -0
- package/.pikku/secrets/pikku-secrets.gen.ts +34 -0
- package/.pikku/trigger/pikku-trigger-types.gen.ts +160 -0
- package/.pikku/variables/pikku-variable-types.gen.ts +5 -0
- package/.pikku/variables/pikku-variables-meta.gen.json +10 -0
- package/.pikku/variables/pikku-variables.gen.ts +36 -0
- package/.pikku/workflow/personas.gen.json +1 -0
- package/.pikku/workflow/pikku-personas.gen.ts +38 -0
- package/.pikku/workflow/pikku-scenario-step-map.gen.d.ts +18 -0
- package/.pikku/workflow/pikku-workflow-map.gen.d.ts +38 -0
- package/.pikku/workflow/pikku-workflow-types.gen.ts +591 -0
- package/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +9 -0
- package/.pikku/workflow/pikku-workflow-wirings.gen.ts +3 -0
- package/dist/.pikku/addon/pikku-addon-types.gen.d.ts +4 -4
- package/dist/.pikku/addon/pikku-addon-types.gen.d.ts.map +1 -1
- package/dist/.pikku/addon/pikku-addon-types.gen.js +7 -3
- package/dist/.pikku/addon/pikku-addon-types.gen.js.map +1 -1
- package/dist/.pikku/addon/pikku-addon-types.gen.ts +11 -6
- package/dist/.pikku/addon/pikku-package.gen.js +2 -1
- package/dist/.pikku/addon/pikku-package.gen.js.map +1 -1
- package/dist/.pikku/addon/pikku-package.gen.ts +3 -1
- package/dist/.pikku/agent/pikku-agent-map.gen.d.ts +2 -14
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +8 -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/agent/pikku-agent-types.gen.ts +15 -7
- 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/channel/pikku-channel-types.gen.ts +177 -0
- package/dist/.pikku/console/pikku-addon-meta.gen.json +31 -28
- package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
- package/dist/.pikku/console/pikku-node-types.gen.ts +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +133 -133
- package/dist/.pikku/function/pikku-function-types.gen.d.ts.map +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.js +98 -61
- package/dist/.pikku/function/pikku-function-types.gen.js.map +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.ts +268 -157
- package/dist/.pikku/function/pikku-functions-meta-verbose.gen.json +64 -44
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +67 -39
- package/dist/.pikku/function/pikku-functions-meta.gen.ts +1 -1
- package/dist/.pikku/function/pikku-functions.gen.js +2 -2
- package/dist/.pikku/function/pikku-functions.gen.js.map +1 -1
- package/dist/.pikku/function/pikku-functions.gen.ts +2 -2
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +98 -0
- package/dist/.pikku/http/pikku-http-types.gen.d.ts.map +1 -0
- package/dist/.pikku/http/pikku-http-types.gen.js +50 -0
- package/dist/.pikku/http/pikku-http-types.gen.js.map +1 -0
- package/dist/.pikku/http/pikku-http-types.gen.ts +119 -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/mcp/pikku-mcp-types.gen.ts +183 -0
- package/dist/.pikku/pikku-bootstrap-scenarios.gen.d.ts +10 -0
- package/dist/.pikku/pikku-bootstrap-scenarios.gen.d.ts.map +1 -0
- package/dist/.pikku/pikku-bootstrap-scenarios.gen.js +10 -0
- package/dist/.pikku/pikku-bootstrap-scenarios.gen.js.map +1 -0
- package/dist/.pikku/pikku-bootstrap-scenarios.gen.ts +9 -0
- package/dist/.pikku/pikku-bootstrap.gen.d.ts +4 -2
- package/dist/.pikku/pikku-bootstrap.gen.d.ts.map +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.js +2 -10
- package/dist/.pikku/pikku-bootstrap.gen.js.map +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.ts +2 -9
- 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-meta-service.gen.ts +10 -0
- package/dist/.pikku/pikku-services.gen.d.ts +15 -2
- package/dist/.pikku/pikku-services.gen.d.ts.map +1 -1
- package/dist/.pikku/pikku-services.gen.js +14 -0
- package/dist/.pikku/pikku-services.gen.js.map +1 -1
- package/dist/.pikku/pikku-services.gen.ts +17 -2
- package/dist/.pikku/pikku-types.gen.d.ts +2 -1
- package/dist/.pikku/pikku-types.gen.d.ts.map +1 -1
- package/dist/.pikku/pikku-types.gen.js +3 -1
- package/dist/.pikku/pikku-types.gen.js.map +1 -1
- package/dist/.pikku/pikku-types.gen.ts +4 -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/queue/pikku-queue-types.gen.ts +27 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +81 -62
- package/dist/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +84 -65
- package/dist/.pikku/rpc/pikku-rpc-wirings-map.remote.gen.d.ts +207 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.d.ts +2 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.d.ts.map +1 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +7 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js.map +1 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +6 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +6 -0
- package/dist/.pikku/scenarios/features.gen.json +1 -0
- package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.d.ts +2 -0
- package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.d.ts.map +1 -0
- package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.js +11 -0
- package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.js.map +1 -0
- package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.json +1 -0
- package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.ts +12 -0
- package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts +5 -0
- package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts.map +1 -0
- package/dist/.pikku/scenarios/pikku-scenario-functions.gen.js +2 -0
- package/dist/.pikku/scenarios/pikku-scenario-functions.gen.js.map +1 -0
- package/dist/.pikku/scenarios/pikku-scenario-functions.gen.ts +4 -0
- package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.d.ts +2 -0
- package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.d.ts.map +1 -0
- package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.js +11 -0
- package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.js.map +1 -0
- package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.ts +15 -0
- package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.d.ts +5 -0
- package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.d.ts.map +1 -0
- package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.js +2 -0
- package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.js.map +1 -0
- package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.ts +4 -0
- package/dist/.pikku/scenarios/schemas/register.gen.d.ts +5 -0
- package/dist/.pikku/scenarios/schemas/register.gen.d.ts.map +1 -0
- package/dist/.pikku/scenarios/schemas/register.gen.js +5 -0
- package/dist/.pikku/scenarios/schemas/register.gen.js.map +1 -0
- package/dist/.pikku/scenarios/schemas/register.gen.ts +4 -0
- 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/scheduler/pikku-scheduler-types.gen.ts +25 -0
- package/dist/.pikku/schemas/register.gen.js +11 -11
- package/dist/.pikku/schemas/register.gen.js.map +1 -1
- package/dist/.pikku/schemas/register.gen.ts +17 -17
- package/dist/.pikku/scopes/pikku-personas-meta.gen.json +1 -0
- package/dist/.pikku/scopes/pikku-personas.gen.d.ts +37 -0
- package/dist/.pikku/scopes/pikku-personas.gen.d.ts.map +1 -0
- package/dist/.pikku/scopes/pikku-personas.gen.js +18 -0
- package/dist/.pikku/scopes/pikku-personas.gen.js.map +1 -0
- package/dist/.pikku/scopes/pikku-personas.gen.ts +52 -0
- package/dist/.pikku/scopes/pikku-roles-meta.gen.json +1 -0
- package/dist/.pikku/scopes/pikku-roles.gen.d.ts +31 -0
- package/dist/.pikku/scopes/pikku-roles.gen.d.ts.map +1 -0
- package/dist/.pikku/scopes/pikku-roles.gen.js +19 -0
- package/dist/.pikku/scopes/pikku-roles.gen.js.map +1 -0
- package/dist/.pikku/scopes/pikku-roles.gen.ts +41 -0
- package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +8 -0
- package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts.map +1 -0
- package/dist/.pikku/scopes/pikku-scope-types.gen.js +6 -0
- package/dist/.pikku/scopes/pikku-scope-types.gen.js.map +1 -0
- package/dist/.pikku/scopes/pikku-scope-types.gen.ts +7 -0
- package/dist/.pikku/scopes/pikku-scopes-meta.gen.json +1 -0
- package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +36 -0
- package/dist/.pikku/scopes/pikku-scopes.gen.d.ts.map +1 -0
- package/dist/.pikku/scopes/pikku-scopes.gen.js +28 -0
- package/dist/.pikku/scopes/pikku-scopes.gen.js.map +1 -0
- package/dist/.pikku/scopes/pikku-scopes.gen.ts +58 -0
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +2 -2
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts.map +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.js +2 -2
- package/dist/.pikku/secrets/pikku-secret-types.gen.js.map +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.ts +2 -2
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +11 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts.map +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.js +11 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.js.map +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.ts +14 -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/trigger/pikku-trigger-types.gen.ts +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +2 -2
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts.map +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.js +2 -2
- package/dist/.pikku/variables/pikku-variable-types.gen.js.map +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.ts +2 -2
- package/dist/.pikku/variables/pikku-variables.gen.d.ts +11 -1
- package/dist/.pikku/variables/pikku-variables.gen.d.ts.map +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.js +14 -4
- package/dist/.pikku/variables/pikku-variables.gen.js.map +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.ts +17 -4
- package/dist/.pikku/workflow/personas.gen.json +1 -0
- package/dist/.pikku/workflow/pikku-personas.gen.d.ts +16 -0
- package/dist/.pikku/workflow/pikku-personas.gen.d.ts.map +1 -0
- package/dist/.pikku/workflow/pikku-personas.gen.js +18 -0
- package/dist/.pikku/workflow/pikku-personas.gen.js.map +1 -0
- package/dist/.pikku/workflow/pikku-personas.gen.ts +38 -0
- package/dist/.pikku/workflow/pikku-scenario-step-map.gen.d.ts +18 -0
- package/dist/.pikku/workflow/pikku-workflow-map.gen.d.ts +9 -5
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +289 -31
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts.map +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +66 -18
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js.map +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.ts +494 -61
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js.map +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +3 -3
- 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/.pikku/workflow/pikku-workflow-wirings.gen.ts +1 -1
- package/dist/src/functions/embeddings/embed-many.function.d.ts +2 -2
- package/dist/src/functions/embeddings/embed-many.function.d.ts.map +1 -1
- package/dist/src/functions/embeddings/embed.function.d.ts +2 -2
- package/dist/src/functions/embeddings/embed.function.d.ts.map +1 -1
- package/dist/src/functions/text/generate-object.function.d.ts +7 -7
- package/dist/src/functions/text/generate-object.function.d.ts.map +1 -1
- package/dist/src/functions/text/generate.function.d.ts +2 -2
- package/dist/src/functions/text/generate.function.d.ts.map +1 -1
- package/dist/src/ollama.variable.js +2 -2
- package/dist/src/ollama.variable.js.map +1 -1
- package/package.json +7 -6
- 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-meta.gen.ts +0 -7
- 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/.pikku/agent/pikku-agent-wirings.gen.ts +0 -3
|
@@ -1,106 +1,126 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"pikkuFuncId": "
|
|
2
|
+
"ollamaEmbedMany": {
|
|
3
|
+
"pikkuFuncId": "ollamaEmbedMany",
|
|
4
4
|
"functionType": "user",
|
|
5
5
|
"funcWrapper": "pikkuSessionlessFunc",
|
|
6
6
|
"sessionless": true,
|
|
7
|
-
"name": "
|
|
7
|
+
"name": "ollamaEmbedMany",
|
|
8
8
|
"services": {
|
|
9
9
|
"optimized": true,
|
|
10
10
|
"services": [
|
|
11
11
|
"ollama"
|
|
12
12
|
]
|
|
13
13
|
},
|
|
14
|
-
"inputSchemaName": "
|
|
15
|
-
"outputSchemaName": "
|
|
14
|
+
"inputSchemaName": "OllamaEmbedManyInput",
|
|
15
|
+
"outputSchemaName": "OllamaEmbedManyOutput",
|
|
16
16
|
"inputs": [
|
|
17
|
-
"
|
|
17
|
+
"OllamaEmbedManyInput"
|
|
18
18
|
],
|
|
19
19
|
"outputs": [
|
|
20
|
-
"
|
|
20
|
+
"OllamaEmbedManyOutput"
|
|
21
21
|
],
|
|
22
|
-
"
|
|
22
|
+
"implementationHash": "2abe1562dff3ca44",
|
|
23
|
+
"description": "Create embedding vectors from multiple texts using an Ollama model",
|
|
23
24
|
"isDirectFunction": false,
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
25
|
+
"sourceFile": "/home/runner/work/addons/addons/packages/ai/ollama/src/functions/embeddings/embed-many.function.ts",
|
|
26
|
+
"exportedName": "ollamaEmbedMany",
|
|
27
|
+
"bodyStart": 27,
|
|
28
|
+
"bodyEnd": 34,
|
|
29
|
+
"contractHash": "3db02092482ca9c6",
|
|
30
|
+
"inputHash": "4f6f4b67",
|
|
31
|
+
"outputHash": "54a0cfe3"
|
|
27
32
|
},
|
|
28
|
-
"
|
|
29
|
-
"pikkuFuncId": "
|
|
33
|
+
"ollamaEmbed": {
|
|
34
|
+
"pikkuFuncId": "ollamaEmbed",
|
|
30
35
|
"functionType": "user",
|
|
31
36
|
"funcWrapper": "pikkuSessionlessFunc",
|
|
32
37
|
"sessionless": true,
|
|
33
|
-
"name": "
|
|
38
|
+
"name": "ollamaEmbed",
|
|
34
39
|
"services": {
|
|
35
40
|
"optimized": true,
|
|
36
41
|
"services": [
|
|
37
42
|
"ollama"
|
|
38
43
|
]
|
|
39
44
|
},
|
|
40
|
-
"inputSchemaName": "
|
|
41
|
-
"outputSchemaName": "
|
|
45
|
+
"inputSchemaName": "OllamaEmbedInput",
|
|
46
|
+
"outputSchemaName": "OllamaEmbedOutput",
|
|
42
47
|
"inputs": [
|
|
43
|
-
"
|
|
48
|
+
"OllamaEmbedInput"
|
|
44
49
|
],
|
|
45
50
|
"outputs": [
|
|
46
|
-
"
|
|
51
|
+
"OllamaEmbedOutput"
|
|
47
52
|
],
|
|
48
|
-
"
|
|
53
|
+
"implementationHash": "ac6fc8ad50940ac6",
|
|
54
|
+
"description": "Create an embedding vector from text using an Ollama model",
|
|
49
55
|
"isDirectFunction": false,
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
56
|
+
"sourceFile": "/home/runner/work/addons/addons/packages/ai/ollama/src/functions/embeddings/embed.function.ts",
|
|
57
|
+
"exportedName": "ollamaEmbed",
|
|
58
|
+
"bodyStart": 27,
|
|
59
|
+
"bodyEnd": 34,
|
|
60
|
+
"contractHash": "0354ea934b747af7",
|
|
61
|
+
"inputHash": "8340c2c0",
|
|
62
|
+
"outputHash": "bb88b854"
|
|
53
63
|
},
|
|
54
|
-
"
|
|
55
|
-
"pikkuFuncId": "
|
|
64
|
+
"ollamaGenerateObject": {
|
|
65
|
+
"pikkuFuncId": "ollamaGenerateObject",
|
|
56
66
|
"functionType": "user",
|
|
57
67
|
"funcWrapper": "pikkuSessionlessFunc",
|
|
58
68
|
"sessionless": true,
|
|
59
|
-
"name": "
|
|
69
|
+
"name": "ollamaGenerateObject",
|
|
60
70
|
"services": {
|
|
61
71
|
"optimized": true,
|
|
62
72
|
"services": [
|
|
63
73
|
"ollama"
|
|
64
74
|
]
|
|
65
75
|
},
|
|
66
|
-
"inputSchemaName": "
|
|
67
|
-
"outputSchemaName": "
|
|
76
|
+
"inputSchemaName": "OllamaGenerateObjectInput",
|
|
77
|
+
"outputSchemaName": "OllamaGenerateObjectOutput",
|
|
68
78
|
"inputs": [
|
|
69
|
-
"
|
|
79
|
+
"OllamaGenerateObjectInput"
|
|
70
80
|
],
|
|
71
81
|
"outputs": [
|
|
72
|
-
"
|
|
82
|
+
"OllamaGenerateObjectOutput"
|
|
73
83
|
],
|
|
74
|
-
"
|
|
84
|
+
"implementationHash": "267ece83350ede19",
|
|
85
|
+
"description": "Generate a structured JSON object using an Ollama model",
|
|
75
86
|
"isDirectFunction": false,
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
87
|
+
"sourceFile": "/home/runner/work/addons/addons/packages/ai/ollama/src/functions/text/generate-object.function.ts",
|
|
88
|
+
"exportedName": "ollamaGenerateObject",
|
|
89
|
+
"bodyStart": 44,
|
|
90
|
+
"bodyEnd": 60,
|
|
91
|
+
"contractHash": "e7026856e15a96b5",
|
|
92
|
+
"inputHash": "4ceb54b7",
|
|
93
|
+
"outputHash": "e26f98ba"
|
|
79
94
|
},
|
|
80
|
-
"
|
|
81
|
-
"pikkuFuncId": "
|
|
95
|
+
"ollamaGenerateText": {
|
|
96
|
+
"pikkuFuncId": "ollamaGenerateText",
|
|
82
97
|
"functionType": "user",
|
|
83
98
|
"funcWrapper": "pikkuSessionlessFunc",
|
|
84
99
|
"sessionless": true,
|
|
85
|
-
"name": "
|
|
100
|
+
"name": "ollamaGenerateText",
|
|
86
101
|
"services": {
|
|
87
102
|
"optimized": true,
|
|
88
103
|
"services": [
|
|
89
104
|
"ollama"
|
|
90
105
|
]
|
|
91
106
|
},
|
|
92
|
-
"inputSchemaName": "
|
|
93
|
-
"outputSchemaName": "
|
|
107
|
+
"inputSchemaName": "OllamaGenerateTextInput",
|
|
108
|
+
"outputSchemaName": "OllamaGenerateTextOutput",
|
|
94
109
|
"inputs": [
|
|
95
|
-
"
|
|
110
|
+
"OllamaGenerateTextInput"
|
|
96
111
|
],
|
|
97
112
|
"outputs": [
|
|
98
|
-
"
|
|
113
|
+
"OllamaGenerateTextOutput"
|
|
99
114
|
],
|
|
100
|
-
"
|
|
115
|
+
"implementationHash": "24061cbafdbafa6a",
|
|
116
|
+
"description": "Generate text using an Ollama model",
|
|
101
117
|
"isDirectFunction": false,
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"
|
|
118
|
+
"sourceFile": "/home/runner/work/addons/addons/packages/ai/ollama/src/functions/text/generate.function.ts",
|
|
119
|
+
"exportedName": "ollamaGenerateText",
|
|
120
|
+
"bodyStart": 42,
|
|
121
|
+
"bodyEnd": 56,
|
|
122
|
+
"contractHash": "0d03988593f9adef",
|
|
123
|
+
"inputHash": "bdf047a6",
|
|
124
|
+
"outputHash": "4e2c22b3"
|
|
105
125
|
}
|
|
106
126
|
}
|
|
@@ -1,39 +1,28 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"pikkuFuncId": "
|
|
4
|
-
"functionType": "user",
|
|
5
|
-
"funcWrapper": "pikkuSessionlessFunc",
|
|
6
|
-
"sessionless": true,
|
|
7
|
-
"name": "ollamaGenerateText",
|
|
8
|
-
"inputSchemaName": "OllamaGenerateTextInput",
|
|
9
|
-
"outputSchemaName": "OllamaGenerateTextOutput",
|
|
10
|
-
"inputs": [
|
|
11
|
-
"OllamaGenerateTextInput"
|
|
12
|
-
],
|
|
13
|
-
"outputs": [
|
|
14
|
-
"OllamaGenerateTextOutput"
|
|
15
|
-
],
|
|
16
|
-
"contractHash": "0d03988593f9adef",
|
|
17
|
-
"inputHash": "bdf047a6",
|
|
18
|
-
"outputHash": "4e2c22b3"
|
|
19
|
-
},
|
|
20
|
-
"ollamaGenerateObject": {
|
|
21
|
-
"pikkuFuncId": "ollamaGenerateObject",
|
|
2
|
+
"ollamaEmbedMany": {
|
|
3
|
+
"pikkuFuncId": "ollamaEmbedMany",
|
|
22
4
|
"functionType": "user",
|
|
23
5
|
"funcWrapper": "pikkuSessionlessFunc",
|
|
24
6
|
"sessionless": true,
|
|
25
|
-
"name": "
|
|
26
|
-
"inputSchemaName": "
|
|
27
|
-
"outputSchemaName": "
|
|
7
|
+
"name": "ollamaEmbedMany",
|
|
8
|
+
"inputSchemaName": "OllamaEmbedManyInput",
|
|
9
|
+
"outputSchemaName": "OllamaEmbedManyOutput",
|
|
28
10
|
"inputs": [
|
|
29
|
-
"
|
|
11
|
+
"OllamaEmbedManyInput"
|
|
30
12
|
],
|
|
31
13
|
"outputs": [
|
|
32
|
-
"
|
|
14
|
+
"OllamaEmbedManyOutput"
|
|
33
15
|
],
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
16
|
+
"implementationHash": "2abe1562dff3ca44",
|
|
17
|
+
"contractHash": "3db02092482ca9c6",
|
|
18
|
+
"inputHash": "4f6f4b67",
|
|
19
|
+
"outputHash": "54a0cfe3",
|
|
20
|
+
"services": {
|
|
21
|
+
"optimized": true,
|
|
22
|
+
"services": [
|
|
23
|
+
"ollama"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
37
26
|
},
|
|
38
27
|
"ollamaEmbed": {
|
|
39
28
|
"pikkuFuncId": "ollamaEmbed",
|
|
@@ -49,26 +38,65 @@
|
|
|
49
38
|
"outputs": [
|
|
50
39
|
"OllamaEmbedOutput"
|
|
51
40
|
],
|
|
41
|
+
"implementationHash": "ac6fc8ad50940ac6",
|
|
52
42
|
"contractHash": "0354ea934b747af7",
|
|
53
43
|
"inputHash": "8340c2c0",
|
|
54
|
-
"outputHash": "bb88b854"
|
|
44
|
+
"outputHash": "bb88b854",
|
|
45
|
+
"services": {
|
|
46
|
+
"optimized": true,
|
|
47
|
+
"services": [
|
|
48
|
+
"ollama"
|
|
49
|
+
]
|
|
50
|
+
}
|
|
55
51
|
},
|
|
56
|
-
"
|
|
57
|
-
"pikkuFuncId": "
|
|
52
|
+
"ollamaGenerateObject": {
|
|
53
|
+
"pikkuFuncId": "ollamaGenerateObject",
|
|
58
54
|
"functionType": "user",
|
|
59
55
|
"funcWrapper": "pikkuSessionlessFunc",
|
|
60
56
|
"sessionless": true,
|
|
61
|
-
"name": "
|
|
62
|
-
"inputSchemaName": "
|
|
63
|
-
"outputSchemaName": "
|
|
57
|
+
"name": "ollamaGenerateObject",
|
|
58
|
+
"inputSchemaName": "OllamaGenerateObjectInput",
|
|
59
|
+
"outputSchemaName": "OllamaGenerateObjectOutput",
|
|
64
60
|
"inputs": [
|
|
65
|
-
"
|
|
61
|
+
"OllamaGenerateObjectInput"
|
|
66
62
|
],
|
|
67
63
|
"outputs": [
|
|
68
|
-
"
|
|
64
|
+
"OllamaGenerateObjectOutput"
|
|
69
65
|
],
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
66
|
+
"implementationHash": "267ece83350ede19",
|
|
67
|
+
"contractHash": "e7026856e15a96b5",
|
|
68
|
+
"inputHash": "4ceb54b7",
|
|
69
|
+
"outputHash": "e26f98ba",
|
|
70
|
+
"services": {
|
|
71
|
+
"optimized": true,
|
|
72
|
+
"services": [
|
|
73
|
+
"ollama"
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"ollamaGenerateText": {
|
|
78
|
+
"pikkuFuncId": "ollamaGenerateText",
|
|
79
|
+
"functionType": "user",
|
|
80
|
+
"funcWrapper": "pikkuSessionlessFunc",
|
|
81
|
+
"sessionless": true,
|
|
82
|
+
"name": "ollamaGenerateText",
|
|
83
|
+
"inputSchemaName": "OllamaGenerateTextInput",
|
|
84
|
+
"outputSchemaName": "OllamaGenerateTextOutput",
|
|
85
|
+
"inputs": [
|
|
86
|
+
"OllamaGenerateTextInput"
|
|
87
|
+
],
|
|
88
|
+
"outputs": [
|
|
89
|
+
"OllamaGenerateTextOutput"
|
|
90
|
+
],
|
|
91
|
+
"implementationHash": "24061cbafdbafa6a",
|
|
92
|
+
"contractHash": "0d03988593f9adef",
|
|
93
|
+
"inputHash": "bdf047a6",
|
|
94
|
+
"outputHash": "4e2c22b3",
|
|
95
|
+
"services": {
|
|
96
|
+
"optimized": true,
|
|
97
|
+
"services": [
|
|
98
|
+
"ollama"
|
|
99
|
+
]
|
|
100
|
+
}
|
|
73
101
|
}
|
|
74
102
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.96
|
|
3
3
|
*/
|
|
4
4
|
/* Import and register functions used by RPCs */
|
|
5
|
-
import { addFunction } from '@pikku/core';
|
|
5
|
+
import { addFunction } from '@pikku/core/function';
|
|
6
6
|
import { ollamaEmbed } from '../../src/functions/embeddings/embed.function.js';
|
|
7
7
|
import { ollamaEmbedMany } from '../../src/functions/embeddings/embed-many.function.js';
|
|
8
8
|
import { ollamaGenerateObject } from '../../src/functions/text/generate-object.function.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pikku-functions.gen.js","sourceRoot":"","sources":["../../../.pikku/function/pikku-functions.gen.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,gDAAgD;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"pikku-functions.gen.js","sourceRoot":"","sources":["../../../.pikku/function/pikku-functions.gen.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,gDAAgD;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,kDAAkD,CAAA;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAA;AACvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,sDAAsD,CAAA;AAC3F,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAA;AAElF,WAAW,CAAC,aAAa,EAAE,WAAW,EAAE,qBAAqB,CAAC,CAAA;AAC9D,WAAW,CAAC,iBAAiB,EAAE,eAAe,EAAE,qBAAqB,CAAC,CAAA;AACtE,WAAW,CAAC,sBAAsB,EAAE,oBAAoB,EAAE,qBAAqB,CAAC,CAAA;AAChF,WAAW,CAAC,oBAAoB,EAAE,kBAAkB,EAAE,qBAAqB,CAAC,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.96
|
|
3
3
|
*/
|
|
4
4
|
/* Import and register functions used by RPCs */
|
|
5
|
-
import { addFunction } from '@pikku/core'
|
|
5
|
+
import { addFunction } from '@pikku/core/function'
|
|
6
6
|
import { ollamaEmbed } from '../../src/functions/embeddings/embed.function.js'
|
|
7
7
|
import { ollamaEmbedMany } from '../../src/functions/embeddings/embed-many.function.js'
|
|
8
8
|
import { ollamaGenerateObject } from '../../src/functions/text/generate-object.function.js'
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.96
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* HTTP-specific type definitions for tree-shaking optimization
|
|
6
|
+
*/
|
|
7
|
+
import { AssertHTTPWiringParams } from '@pikku/core/http';
|
|
8
|
+
import type { PikkuFunction, PikkuFunctionSessionless, PikkuPermission, PikkuMiddleware, PikkuFunctionConfig } from '../function/pikku-function-types.gen.js';
|
|
9
|
+
import type { CoreHTTPFunctionWiring, HTTPMethod, HTTPRouteBaseConfig } from '@pikku/core/http';
|
|
10
|
+
/**
|
|
11
|
+
* Type definition for HTTP API wirings with type-safe path parameters.
|
|
12
|
+
* Supports both authenticated and unauthenticated functions.
|
|
13
|
+
*
|
|
14
|
+
* @template In - Input type for the HTTP wiring
|
|
15
|
+
* @template Out - Output type for the HTTP wiring
|
|
16
|
+
* @template Route - String literal type for the HTTP path (e.g., "/users/:id")
|
|
17
|
+
*/
|
|
18
|
+
type HTTPWiring<In, Out, Route extends string> = CoreHTTPFunctionWiring<In, Out, Route, PikkuFunction<In, Out, 'rpc' | 'session'>, PikkuFunctionSessionless<In, Out, 'rpc' | 'session'>, PikkuPermission<In>, PikkuMiddleware>;
|
|
19
|
+
/**
|
|
20
|
+
* Registers an HTTP wiring with the Pikku framework.
|
|
21
|
+
*
|
|
22
|
+
* @template In - Input type for the HTTP wiring
|
|
23
|
+
* @template Out - Output type for the HTTP wiring
|
|
24
|
+
* @template Route - String literal type for the HTTP path (e.g., "/users/:id")
|
|
25
|
+
* @param httpWiring - HTTP wiring definition with handler, method, and optional middleware
|
|
26
|
+
*/
|
|
27
|
+
export declare const wireHTTP: <In, Out, Route extends string>(httpWiring: HTTPWiring<In, Out, Route> & AssertHTTPWiringParams<In, Route>) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Registers HTTP middleware either globally or for a specific route pattern.
|
|
30
|
+
*
|
|
31
|
+
* When a string route pattern is provided along with middleware, the middleware
|
|
32
|
+
* is applied only to that route. Otherwise, if an array is provided, it is treated
|
|
33
|
+
* as global middleware (applied to all routes).
|
|
34
|
+
*
|
|
35
|
+
* @param routeOrMiddleware - Either a global middleware array or a route pattern string
|
|
36
|
+
* @param middleware - The middleware array to apply when a route pattern is specified
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* // Add global HTTP middleware
|
|
41
|
+
* addHTTPMiddleware([authMiddleware, loggingMiddleware])
|
|
42
|
+
*
|
|
43
|
+
* // Add route-specific middleware
|
|
44
|
+
* addHTTPMiddleware('/api/admin/*', [adminAuthMiddleware])
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export declare const addHTTPMiddleware: (routeOrMiddleware: PikkuMiddleware[] | string, middleware?: PikkuMiddleware[]) => void;
|
|
48
|
+
/**
|
|
49
|
+
* Route configuration for wireHTTPRoutes with proper typing
|
|
50
|
+
*/
|
|
51
|
+
type HTTPRouteConfig = HTTPRouteBaseConfig & {
|
|
52
|
+
method: HTTPMethod;
|
|
53
|
+
route: string;
|
|
54
|
+
func: PikkuFunctionConfig<any, any, any, any, any, any>;
|
|
55
|
+
auth?: boolean;
|
|
56
|
+
middleware?: PikkuMiddleware[];
|
|
57
|
+
sse?: boolean;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Typed route map for wireHTTPRoutes
|
|
61
|
+
*/
|
|
62
|
+
type TypedHTTPRouteMap = {
|
|
63
|
+
[key: string]: HTTPRouteConfig | TypedHTTPRouteMap | TypedHTTPRouteContract;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Typed route contract for defineHTTPRoutes
|
|
67
|
+
*/
|
|
68
|
+
type TypedHTTPRouteContract<T extends TypedHTTPRouteMap = TypedHTTPRouteMap> = TypedHTTPRoutesGroupConfig & {
|
|
69
|
+
routes: T;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Group config with typed middleware
|
|
73
|
+
*/
|
|
74
|
+
type TypedHTTPRoutesGroupConfig = {
|
|
75
|
+
basePath?: string;
|
|
76
|
+
tags?: string[];
|
|
77
|
+
auth?: boolean;
|
|
78
|
+
middleware?: PikkuMiddleware[];
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Full config for wireHTTPRoutes
|
|
82
|
+
*/
|
|
83
|
+
type TypedWireHTTPRoutesConfig = TypedHTTPRoutesGroupConfig & {
|
|
84
|
+
routes: TypedHTTPRouteMap | HTTPRouteConfig[];
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Type-safe helper for defining route contracts that can be composed.
|
|
88
|
+
*/
|
|
89
|
+
export declare function defineHTTPRoutes<T extends TypedHTTPRouteMap>(routes: T): TypedHTTPRouteContract<T>;
|
|
90
|
+
export declare function defineHTTPRoutes<T extends TypedHTTPRouteMap>(config: TypedHTTPRoutesGroupConfig & {
|
|
91
|
+
routes: T;
|
|
92
|
+
}): TypedHTTPRouteContract<T>;
|
|
93
|
+
/**
|
|
94
|
+
* Wires multiple HTTP routes from a nested map or array configuration.
|
|
95
|
+
*/
|
|
96
|
+
export declare const wireHTTPRoutes: (config: TypedWireHTTPRoutesConfig) => void;
|
|
97
|
+
export {};
|
|
98
|
+
//# sourceMappingURL=pikku-http-types.gen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pikku-http-types.gen.d.ts","sourceRoot":"","sources":["../../../.pikku/http/pikku-http-types.gen.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;GAEG;AAEH,OAAO,EAAE,sBAAsB,EAAwJ,MAAM,kBAAkB,CAAA;AAC/M,OAAO,KAAK,EAAE,aAAa,EAAE,wBAAwB,EAAE,eAAe,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAA;AAC7J,OAAO,KAAK,EAAE,sBAAsB,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAE/F;;;;;;;GAOG;AACH,KAAK,UAAU,CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,SAAS,MAAM,IAAI,sBAAsB,CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,aAAa,CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,GAAG,SAAS,CAAC,EAAE,wBAAwB,CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,GAAG,SAAS,CAAC,EAAE,eAAe,CAAC,EAAE,CAAC,EAAE,eAAe,CAAC,CAAA;AAE9N;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,GAAI,EAAE,EAAE,GAAG,EAAE,KAAK,SAAS,MAAM,EACpD,YAAY,UAAU,CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,sBAAsB,CAAC,EAAE,EAAE,KAAK,CAAC,SAG3E,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,iBAAiB,GAC5B,mBAAmB,eAAe,EAAE,GAAG,MAAM,EAC7C,aAAa,eAAe,EAAE,SAG/B,CAAA;AAED;;GAEG;AACH,KAAK,eAAe,GAAG,mBAAmB,GAAG;IAC3C,MAAM,EAAE,UAAU,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;IACvD,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,UAAU,CAAC,EAAE,eAAe,EAAE,CAAA;IAC9B,GAAG,CAAC,EAAE,OAAO,CAAA;CACd,CAAA;AAED;;GAEG;AACH,KAAK,iBAAiB,GAAG;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,GAAG,iBAAiB,GAAG,sBAAsB,CAAA;CAC5E,CAAA;AAED;;GAEG;AACH,KAAK,sBAAsB,CAAC,CAAC,SAAS,iBAAiB,GAAG,iBAAiB,IAAI,0BAA0B,GAAG;IAC1G,MAAM,EAAE,CAAC,CAAA;CACV,CAAA;AAED;;GAEG;AACH,KAAK,0BAA0B,GAAG;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,UAAU,CAAC,EAAE,eAAe,EAAE,CAAA;CAC/B,CAAA;AAED;;GAEG;AACH,KAAK,yBAAyB,GAAG,0BAA0B,GAAG;IAC5D,MAAM,EAAE,iBAAiB,GAAG,eAAe,EAAE,CAAA;CAC9C,CAAA;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,iBAAiB,EAAE,MAAM,EAAE,CAAC,GAAG,sBAAsB,CAAC,CAAC,CAAC,CAAA;AACnG,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,iBAAiB,EAAE,MAAM,EAAE,0BAA0B,GAAG;IAAE,MAAM,EAAE,CAAC,CAAA;CAAE,GAAG,sBAAsB,CAAC,CAAC,CAAC,CAAA;AAK5I;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,yBAAyB,KAAG,IAElE,CAAA"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.96
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* HTTP-specific type definitions for tree-shaking optimization
|
|
6
|
+
*/
|
|
7
|
+
import { wireHTTP as wireHTTPCore, addHTTPMiddleware as addHTTPMiddlewareCore, wireHTTPRoutes as wireHTTPRoutesCore, defineHTTPRoutes as defineHTTPRoutesCore } from '@pikku/core/http';
|
|
8
|
+
/**
|
|
9
|
+
* Registers an HTTP wiring with the Pikku framework.
|
|
10
|
+
*
|
|
11
|
+
* @template In - Input type for the HTTP wiring
|
|
12
|
+
* @template Out - Output type for the HTTP wiring
|
|
13
|
+
* @template Route - String literal type for the HTTP path (e.g., "/users/:id")
|
|
14
|
+
* @param httpWiring - HTTP wiring definition with handler, method, and optional middleware
|
|
15
|
+
*/
|
|
16
|
+
export const wireHTTP = (httpWiring) => {
|
|
17
|
+
wireHTTPCore(httpWiring);
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Registers HTTP middleware either globally or for a specific route pattern.
|
|
21
|
+
*
|
|
22
|
+
* When a string route pattern is provided along with middleware, the middleware
|
|
23
|
+
* is applied only to that route. Otherwise, if an array is provided, it is treated
|
|
24
|
+
* as global middleware (applied to all routes).
|
|
25
|
+
*
|
|
26
|
+
* @param routeOrMiddleware - Either a global middleware array or a route pattern string
|
|
27
|
+
* @param middleware - The middleware array to apply when a route pattern is specified
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```typescript
|
|
31
|
+
* // Add global HTTP middleware
|
|
32
|
+
* addHTTPMiddleware([authMiddleware, loggingMiddleware])
|
|
33
|
+
*
|
|
34
|
+
* // Add route-specific middleware
|
|
35
|
+
* addHTTPMiddleware('/api/admin/*', [adminAuthMiddleware])
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export const addHTTPMiddleware = (routeOrMiddleware, middleware) => {
|
|
39
|
+
addHTTPMiddlewareCore(routeOrMiddleware, middleware);
|
|
40
|
+
};
|
|
41
|
+
export function defineHTTPRoutes(configOrRoutes) {
|
|
42
|
+
return defineHTTPRoutesCore(configOrRoutes);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Wires multiple HTTP routes from a nested map or array configuration.
|
|
46
|
+
*/
|
|
47
|
+
export const wireHTTPRoutes = (config) => {
|
|
48
|
+
wireHTTPRoutesCore(config);
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=pikku-http-types.gen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pikku-http-types.gen.js","sourceRoot":"","sources":["../../../.pikku/http/pikku-http-types.gen.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;GAEG;AAEH,OAAO,EAA0B,QAAQ,IAAI,YAAY,EAAE,iBAAiB,IAAI,qBAAqB,EAAE,cAAc,IAAI,kBAAkB,EAAE,gBAAgB,IAAI,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAc/M;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,UAA0E,EAC1E,EAAE;IACF,YAAY,CAAC,UAAiB,CAAC,CAAA;AACjC,CAAC,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,iBAA6C,EAC7C,UAA8B,EAC9B,EAAE;IACF,qBAAqB,CAAC,iBAAwB,EAAE,UAAiB,CAAC,CAAA;AACpE,CAAC,CAAA;AAkDD,MAAM,UAAU,gBAAgB,CAA8B,cAAgE;IAC5H,OAAO,oBAAoB,CAAC,cAAqB,CAAyC,CAAA;AAC5F,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAAiC,EAAQ,EAAE;IACxE,kBAAkB,CAAC,MAAa,CAAC,CAAA;AACnC,CAAC,CAAA"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.96
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* HTTP-specific type definitions for tree-shaking optimization
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { AssertHTTPWiringParams, wireHTTP as wireHTTPCore, addHTTPMiddleware as addHTTPMiddlewareCore, wireHTTPRoutes as wireHTTPRoutesCore, defineHTTPRoutes as defineHTTPRoutesCore } from '@pikku/core/http'
|
|
9
|
+
import type { PikkuFunction, PikkuFunctionSessionless, PikkuPermission, PikkuMiddleware, PikkuFunctionConfig } from '../function/pikku-function-types.gen.js'
|
|
10
|
+
import type { CoreHTTPFunctionWiring, HTTPMethod, HTTPRouteBaseConfig } from '@pikku/core/http'
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Type definition for HTTP API wirings with type-safe path parameters.
|
|
14
|
+
* Supports both authenticated and unauthenticated functions.
|
|
15
|
+
*
|
|
16
|
+
* @template In - Input type for the HTTP wiring
|
|
17
|
+
* @template Out - Output type for the HTTP wiring
|
|
18
|
+
* @template Route - String literal type for the HTTP path (e.g., "/users/:id")
|
|
19
|
+
*/
|
|
20
|
+
type HTTPWiring<In, Out, Route extends string> = CoreHTTPFunctionWiring<In, Out, Route, PikkuFunction<In, Out, 'rpc' | 'session'>, PikkuFunctionSessionless<In, Out, 'rpc' | 'session'>, PikkuPermission<In>, PikkuMiddleware>
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Registers an HTTP wiring with the Pikku framework.
|
|
24
|
+
*
|
|
25
|
+
* @template In - Input type for the HTTP wiring
|
|
26
|
+
* @template Out - Output type for the HTTP wiring
|
|
27
|
+
* @template Route - String literal type for the HTTP path (e.g., "/users/:id")
|
|
28
|
+
* @param httpWiring - HTTP wiring definition with handler, method, and optional middleware
|
|
29
|
+
*/
|
|
30
|
+
export const wireHTTP = <In, Out, Route extends string>(
|
|
31
|
+
httpWiring: HTTPWiring<In, Out, Route> & AssertHTTPWiringParams<In, Route>
|
|
32
|
+
) => {
|
|
33
|
+
wireHTTPCore(httpWiring as any)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Registers HTTP middleware either globally or for a specific route pattern.
|
|
38
|
+
*
|
|
39
|
+
* When a string route pattern is provided along with middleware, the middleware
|
|
40
|
+
* is applied only to that route. Otherwise, if an array is provided, it is treated
|
|
41
|
+
* as global middleware (applied to all routes).
|
|
42
|
+
*
|
|
43
|
+
* @param routeOrMiddleware - Either a global middleware array or a route pattern string
|
|
44
|
+
* @param middleware - The middleware array to apply when a route pattern is specified
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* // Add global HTTP middleware
|
|
49
|
+
* addHTTPMiddleware([authMiddleware, loggingMiddleware])
|
|
50
|
+
*
|
|
51
|
+
* // Add route-specific middleware
|
|
52
|
+
* addHTTPMiddleware('/api/admin/*', [adminAuthMiddleware])
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export const addHTTPMiddleware = (
|
|
56
|
+
routeOrMiddleware: PikkuMiddleware[] | string,
|
|
57
|
+
middleware?: PikkuMiddleware[]
|
|
58
|
+
) => {
|
|
59
|
+
addHTTPMiddlewareCore(routeOrMiddleware as any, middleware as any)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Route configuration for wireHTTPRoutes with proper typing
|
|
64
|
+
*/
|
|
65
|
+
type HTTPRouteConfig = HTTPRouteBaseConfig & {
|
|
66
|
+
method: HTTPMethod
|
|
67
|
+
route: string
|
|
68
|
+
func: PikkuFunctionConfig<any, any, any, any, any, any>
|
|
69
|
+
auth?: boolean
|
|
70
|
+
middleware?: PikkuMiddleware[]
|
|
71
|
+
sse?: boolean
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Typed route map for wireHTTPRoutes
|
|
76
|
+
*/
|
|
77
|
+
type TypedHTTPRouteMap = {
|
|
78
|
+
[key: string]: HTTPRouteConfig | TypedHTTPRouteMap | TypedHTTPRouteContract
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Typed route contract for defineHTTPRoutes
|
|
83
|
+
*/
|
|
84
|
+
type TypedHTTPRouteContract<T extends TypedHTTPRouteMap = TypedHTTPRouteMap> = TypedHTTPRoutesGroupConfig & {
|
|
85
|
+
routes: T
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Group config with typed middleware
|
|
90
|
+
*/
|
|
91
|
+
type TypedHTTPRoutesGroupConfig = {
|
|
92
|
+
basePath?: string
|
|
93
|
+
tags?: string[]
|
|
94
|
+
auth?: boolean
|
|
95
|
+
middleware?: PikkuMiddleware[]
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Full config for wireHTTPRoutes
|
|
100
|
+
*/
|
|
101
|
+
type TypedWireHTTPRoutesConfig = TypedHTTPRoutesGroupConfig & {
|
|
102
|
+
routes: TypedHTTPRouteMap | HTTPRouteConfig[]
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Type-safe helper for defining route contracts that can be composed.
|
|
107
|
+
*/
|
|
108
|
+
export function defineHTTPRoutes<T extends TypedHTTPRouteMap>(routes: T): TypedHTTPRouteContract<T>
|
|
109
|
+
export function defineHTTPRoutes<T extends TypedHTTPRouteMap>(config: TypedHTTPRoutesGroupConfig & { routes: T }): TypedHTTPRouteContract<T>
|
|
110
|
+
export function defineHTTPRoutes<T extends TypedHTTPRouteMap>(configOrRoutes: T | (TypedHTTPRoutesGroupConfig & { routes: T })): TypedHTTPRouteContract<T> {
|
|
111
|
+
return defineHTTPRoutesCore(configOrRoutes as any) as unknown as TypedHTTPRouteContract<T>
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Wires multiple HTTP routes from a nested map or array configuration.
|
|
116
|
+
*/
|
|
117
|
+
export const wireHTTPRoutes = (config: TypedWireHTTPRoutesConfig): void => {
|
|
118
|
+
wireHTTPRoutesCore(config as any)
|
|
119
|
+
}
|