@pikku/addon-console 0.12.44 → 0.12.46
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/CHANGELOG.md +136 -0
- package/dist/.pikku/addon/agent/index.d.ts +1 -1
- package/dist/.pikku/addon/agent/index.js +1 -1
- package/dist/.pikku/addon/agent/pikku-agent-map.gen.d.ts +1 -1
- package/dist/.pikku/addon/agent/pikku-agent-types.gen.d.ts +42 -1
- package/dist/.pikku/addon/agent/pikku-agent-types.gen.d.ts.map +1 -1
- package/dist/.pikku/addon/agent/pikku-agent-types.gen.js +41 -0
- package/dist/.pikku/addon/agent/pikku-agent-types.gen.js.map +1 -1
- package/dist/.pikku/addon/agent/pikku-model-aliases.gen.js +1 -1
- package/dist/.pikku/addon/agent/pikku-scorer-names.gen.d.ts +1 -1
- package/dist/.pikku/addon/auth/auth.types.d.ts +1 -1
- package/dist/.pikku/addon/auth/auth.types.js +1 -1
- package/dist/.pikku/addon/auth/index.d.ts +1 -1
- package/dist/.pikku/addon/auth/index.js +1 -1
- package/dist/.pikku/addon/auth/pikku-auth-types.gen.d.ts +10 -20
- package/dist/.pikku/addon/auth/pikku-auth-types.gen.d.ts.map +1 -1
- package/dist/.pikku/addon/auth/pikku-auth-types.gen.js +2 -19
- package/dist/.pikku/addon/auth/pikku-auth-types.gen.js.map +1 -1
- package/dist/.pikku/addon/channel/index.d.ts +1 -1
- package/dist/.pikku/addon/channel/index.js +1 -1
- package/dist/.pikku/addon/channel/pikku-channel-types.gen.d.ts +8 -18
- package/dist/.pikku/addon/channel/pikku-channel-types.gen.d.ts.map +1 -1
- package/dist/.pikku/addon/channel/pikku-channel-types.gen.js +7 -1
- package/dist/.pikku/addon/channel/pikku-channel-types.gen.js.map +1 -1
- package/dist/.pikku/addon/error/index.d.ts +1 -1
- package/dist/.pikku/addon/error/index.js +1 -1
- package/dist/.pikku/addon/error/pikku-error-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/error/pikku-error-types.gen.js +1 -1
- package/dist/.pikku/addon/function/index.d.ts +1 -1
- package/dist/.pikku/addon/function/index.js +1 -1
- package/dist/.pikku/addon/function/pikku-function-types.gen.d.ts +47 -38
- package/dist/.pikku/addon/function/pikku-function-types.gen.d.ts.map +1 -1
- package/dist/.pikku/addon/function/pikku-function-types.gen.js +21 -9
- package/dist/.pikku/addon/function/pikku-function-types.gen.js.map +1 -1
- package/dist/.pikku/addon/function/pikku-functions-meta-verbose.gen.json +150 -22
- package/dist/.pikku/addon/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/addon/function/pikku-functions-meta.gen.json +117 -16
- package/dist/.pikku/addon/function/pikku-functions.gen.js +7 -1
- package/dist/.pikku/addon/function/pikku-functions.gen.js.map +1 -1
- package/dist/.pikku/addon/http/index.d.ts +1 -1
- package/dist/.pikku/addon/http/index.js +1 -1
- package/dist/.pikku/addon/http/pikku-http-types.gen.d.ts +3 -1
- package/dist/.pikku/addon/http/pikku-http-types.gen.d.ts.map +1 -1
- package/dist/.pikku/addon/http/pikku-http-types.gen.js +1 -1
- package/dist/.pikku/addon/http/pikku-http-types.gen.js.map +1 -1
- package/dist/.pikku/addon/mcp/index.d.ts +1 -1
- package/dist/.pikku/addon/mcp/index.js +1 -1
- package/dist/.pikku/addon/mcp/pikku-mcp-types.gen.d.ts +7 -1
- package/dist/.pikku/addon/mcp/pikku-mcp-types.gen.d.ts.map +1 -1
- package/dist/.pikku/addon/mcp/pikku-mcp-types.gen.js +1 -1
- package/dist/.pikku/addon/mcp/pikku-mcp-types.gen.js.map +1 -1
- package/dist/.pikku/addon/middleware/index.d.ts +1 -1
- package/dist/.pikku/addon/middleware/index.js +1 -1
- package/dist/.pikku/addon/middleware/pikku-middleware-types.gen.d.ts +41 -25
- package/dist/.pikku/addon/middleware/pikku-middleware-types.gen.d.ts.map +1 -1
- package/dist/.pikku/addon/middleware/pikku-middleware-types.gen.js +29 -24
- package/dist/.pikku/addon/middleware/pikku-middleware-types.gen.js.map +1 -1
- package/dist/.pikku/addon/permissions/pikku-permissions.gen.d.ts +5 -0
- package/dist/.pikku/addon/permissions/pikku-permissions.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/permissions/pikku-permissions.gen.js +5 -0
- package/dist/.pikku/addon/permissions/pikku-permissions.gen.js.map +1 -0
- package/dist/.pikku/addon/pikku-bootstrap-scenarios.gen.d.ts +1 -1
- package/dist/.pikku/addon/pikku-bootstrap-scenarios.gen.js +1 -1
- package/dist/.pikku/addon/pikku-bootstrap.gen.d.ts +2 -1
- package/dist/.pikku/addon/pikku-bootstrap.gen.d.ts.map +1 -1
- package/dist/.pikku/addon/pikku-bootstrap.gen.js +2 -1
- package/dist/.pikku/addon/pikku-bootstrap.gen.js.map +1 -1
- package/dist/.pikku/addon/pikku-package.gen.js +1 -1
- package/dist/.pikku/addon/pikku-services.gen.d.ts +5 -4
- package/dist/.pikku/addon/pikku-services.gen.d.ts.map +1 -1
- package/dist/.pikku/addon/pikku-services.gen.js +3 -2
- package/dist/.pikku/addon/pikku-services.gen.js.map +1 -1
- package/dist/.pikku/addon/rpc/pikku-rpc-wirings-map.gen.d.ts +11 -2
- package/dist/.pikku/addon/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +11 -2
- package/dist/.pikku/addon/rpc/pikku-rpc-wirings-map.remote.gen.d.ts +8 -2
- package/dist/.pikku/addon/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
- package/dist/.pikku/addon/rpc/pikku-rpc-wirings-meta.internal.gen.json +3 -0
- package/dist/.pikku/addon/scenarios/index.d.ts +1 -1
- package/dist/.pikku/addon/scenarios/index.js +1 -1
- package/dist/.pikku/addon/scenarios/pikku-personas.gen.d.ts +4 -0
- package/dist/.pikku/addon/scenarios/pikku-personas.gen.d.ts.map +1 -1
- package/dist/.pikku/addon/scenarios/pikku-personas.gen.js +1 -1
- package/dist/.pikku/addon/scenarios/pikku-personas.gen.js.map +1 -1
- package/dist/.pikku/addon/scenarios/pikku-scenario-functions-meta.gen.js +1 -1
- package/dist/.pikku/addon/scenarios/pikku-scenario-functions.gen.d.ts +1 -1
- package/dist/.pikku/addon/scenarios/pikku-scenario-types.gen.d.ts +13 -1
- package/dist/.pikku/addon/scenarios/pikku-scenario-types.gen.d.ts.map +1 -1
- package/dist/.pikku/addon/scenarios/pikku-scenario-types.gen.js +4 -0
- package/dist/.pikku/addon/scenarios/pikku-scenario-types.gen.js.map +1 -1
- package/dist/.pikku/addon/scenarios/pikku-scenario-wirings-meta.gen.js +1 -1
- package/dist/.pikku/addon/scenarios/pikku-scenario-wirings.gen.d.ts +1 -1
- package/dist/.pikku/addon/scenarios/schemas/register.gen.d.ts +1 -1
- package/dist/.pikku/addon/scenarios/schemas/register.gen.js +1 -1
- package/dist/.pikku/addon/schemas/register.gen.js +13 -1
- package/dist/.pikku/addon/schemas/register.gen.js.map +1 -1
- package/dist/.pikku/addon/schemas/schemas/AddonMetaPage.schema.json +1 -1
- package/dist/.pikku/addon/schemas/schemas/AddonPackageInfo.schema.json +1 -1
- package/dist/.pikku/addon/schemas/schemas/AllMeta.schema.json +1 -1
- package/dist/.pikku/addon/schemas/schemas/GetFunctionsMetaOutput.schema.json +1 -1
- package/dist/.pikku/addon/schemas/schemas/GetVirtualUserRunStepsInput.schema.json +1 -0
- package/dist/.pikku/addon/schemas/schemas/GetVirtualUserRunStepsOutput.schema.json +1 -0
- package/dist/.pikku/addon/schemas/schemas/GetVirtualUserRunsInput.schema.json +1 -0
- package/dist/.pikku/addon/schemas/schemas/GetVirtualUserRunsOutput.schema.json +1 -0
- package/dist/.pikku/addon/schemas/schemas/GetWorkflowMetaByIdOutput.schema.json +1 -1
- package/dist/.pikku/addon/schemas/schemas/StartVirtualUserRunInput.schema.json +1 -0
- package/dist/.pikku/addon/schemas/schemas/StartVirtualUserRunOutput.schema.json +1 -0
- package/dist/.pikku/addon/schemas/schemas/UpdateFunctionConfigInput.schema.json +1 -1
- package/dist/.pikku/addon/scopes/index.d.ts +1 -1
- package/dist/.pikku/addon/scopes/index.js +1 -1
- package/dist/.pikku/addon/scopes/pikku-personas.gen.js +1 -1
- package/dist/.pikku/addon/scopes/pikku-roles.gen.d.ts +1 -1
- package/dist/.pikku/addon/scopes/pikku-scope-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/scopes/pikku-scope-types.gen.js +1 -1
- package/dist/.pikku/addon/scopes/pikku-scopes-meta.gen.json +11 -0
- package/dist/.pikku/addon/scopes/pikku-scopes.gen.d.ts +2 -2
- package/dist/.pikku/addon/scopes/pikku-scopes.gen.d.ts.map +1 -1
- package/dist/.pikku/addon/scopes/pikku-scopes.gen.js.map +1 -1
- package/dist/.pikku/addon/secrets/index.d.ts +1 -1
- package/dist/.pikku/addon/secrets/index.js +1 -1
- package/dist/.pikku/addon/secrets/pikku-secret-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/secrets/pikku-secret-types.gen.js +1 -1
- package/dist/.pikku/addon/secrets/pikku-secrets.gen.d.ts +9 -1
- package/dist/.pikku/addon/secrets/pikku-secrets.gen.d.ts.map +1 -1
- package/dist/.pikku/addon/secrets/pikku-secrets.gen.js +5 -1
- package/dist/.pikku/addon/secrets/pikku-secrets.gen.js.map +1 -1
- package/dist/.pikku/addon/services/pikku-meta-service.gen.d.ts +1 -1
- package/dist/.pikku/addon/services/pikku-meta-service.gen.js +1 -1
- package/dist/.pikku/addon/setup/index.d.ts +1 -1
- package/dist/.pikku/addon/setup/index.js +1 -1
- package/dist/.pikku/addon/setup/pikku-addon-setup-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/setup/pikku-addon-setup-types.gen.js +1 -1
- package/dist/.pikku/addon/setup/pikku-setup-types.gen.d.ts +7 -19
- package/dist/.pikku/addon/setup/pikku-setup-types.gen.d.ts.map +1 -1
- package/dist/.pikku/addon/setup/pikku-setup-types.gen.js +11 -19
- package/dist/.pikku/addon/setup/pikku-setup-types.gen.js.map +1 -1
- package/dist/.pikku/addon/trigger/index.d.ts +1 -1
- package/dist/.pikku/addon/trigger/index.js +1 -1
- package/dist/.pikku/addon/trigger/pikku-trigger-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/trigger/pikku-trigger-types.gen.js +1 -1
- package/dist/.pikku/addon/variables/index.d.ts +1 -1
- package/dist/.pikku/addon/variables/index.js +1 -1
- package/dist/.pikku/addon/variables/pikku-variable-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/variables/pikku-variable-types.gen.js +1 -1
- package/dist/.pikku/addon/variables/pikku-variables.gen.d.ts +9 -1
- package/dist/.pikku/addon/variables/pikku-variables.gen.d.ts.map +1 -1
- package/dist/.pikku/addon/variables/pikku-variables.gen.js +5 -1
- package/dist/.pikku/addon/variables/pikku-variables.gen.js.map +1 -1
- package/dist/.pikku/addon/workflow/index.d.ts +1 -1
- package/dist/.pikku/addon/workflow/index.js +1 -1
- package/dist/.pikku/addon/workflow/pikku-scenario-step-map.gen.d.ts +1 -1
- package/dist/.pikku/addon/workflow/pikku-workflow-map.gen.d.ts +1 -1
- package/dist/.pikku/addon/workflow/pikku-workflow-types.gen.d.ts +29 -1
- package/dist/.pikku/addon/workflow/pikku-workflow-types.gen.d.ts.map +1 -1
- package/dist/.pikku/addon/workflow/pikku-workflow-types.gen.js +8 -1
- package/dist/.pikku/addon/workflow/pikku-workflow-types.gen.js.map +1 -1
- package/dist/.pikku/addon/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
- package/dist/.pikku/addon/workflow/pikku-workflow-wirings.gen.d.ts +1 -1
- package/dist/.pikku/addon/workflow/pikku-workflow-wirings.gen.js +1 -1
- package/dist/src/functions/delete-agent-thread.function.d.ts.map +1 -1
- package/dist/src/functions/delete-agent-thread.function.js +3 -1
- package/dist/src/functions/delete-agent-thread.function.js.map +1 -1
- package/dist/src/functions/delete-agent-thread.function.test.d.ts +2 -0
- package/dist/src/functions/delete-agent-thread.function.test.d.ts.map +1 -0
- package/dist/src/functions/delete-agent-thread.function.test.js +8 -0
- package/dist/src/functions/delete-agent-thread.function.test.js.map +1 -0
- package/dist/src/functions/get-agent-thread-messages.function.d.ts.map +1 -1
- package/dist/src/functions/get-agent-thread-messages.function.js +3 -1
- package/dist/src/functions/get-agent-thread-messages.function.js.map +1 -1
- package/dist/src/functions/get-agent-thread-messages.function.test.d.ts +2 -0
- package/dist/src/functions/get-agent-thread-messages.function.test.d.ts.map +1 -0
- package/dist/src/functions/get-agent-thread-messages.function.test.js +8 -0
- package/dist/src/functions/get-agent-thread-messages.function.test.js.map +1 -0
- package/dist/src/functions/get-virtual-user-run-steps.function.d.ts +14 -0
- package/dist/src/functions/get-virtual-user-run-steps.function.d.ts.map +1 -0
- package/dist/src/functions/get-virtual-user-run-steps.function.js +31 -0
- package/dist/src/functions/get-virtual-user-run-steps.function.js.map +1 -0
- package/dist/src/functions/get-virtual-user-runs.function.d.ts +14 -0
- package/dist/src/functions/get-virtual-user-runs.function.d.ts.map +1 -0
- package/dist/src/functions/get-virtual-user-runs.function.js +39 -0
- package/dist/src/functions/get-virtual-user-runs.function.js.map +1 -0
- package/dist/src/functions/is-thread-owner.permission.d.ts +13 -0
- package/dist/src/functions/is-thread-owner.permission.d.ts.map +1 -0
- package/dist/src/functions/is-thread-owner.permission.js +23 -0
- package/dist/src/functions/is-thread-owner.permission.js.map +1 -0
- package/dist/src/functions/is-thread-owner.permission.test.d.ts +2 -0
- package/dist/src/functions/is-thread-owner.permission.test.d.ts.map +1 -0
- package/dist/src/functions/is-thread-owner.permission.test.js +25 -0
- package/dist/src/functions/is-thread-owner.permission.test.js.map +1 -0
- package/dist/src/functions/start-virtual-user-run.function.d.ts +33 -0
- package/dist/src/functions/start-virtual-user-run.function.d.ts.map +1 -0
- package/dist/src/functions/start-virtual-user-run.function.js +31 -0
- package/dist/src/functions/start-virtual-user-run.function.js.map +1 -0
- package/dist/src/functions/update-agent-config.function.d.ts +1 -1
- package/dist/src/functions/update-agent-config.function.d.ts.map +1 -1
- package/dist/src/functions/update-function-config.function.d.ts +1 -1
- package/dist/src/functions/update-function-config.function.d.ts.map +1 -1
- package/dist/src/scopes.js +11 -0
- package/dist/src/scopes.js.map +1 -1
- package/dist/src/services.js +1 -1
- package/dist/src/services.js.map +1 -1
- package/dist/types/application-types.d.ts +1 -1
- package/package.json +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,139 @@
|
|
|
1
|
+
## 0.12.46
|
|
2
|
+
|
|
3
|
+
### Patch Changes
|
|
4
|
+
|
|
5
|
+
- d1c6956: The AST-locate-then-text-splice editor that backs `console:updateFunctionConfig`
|
|
6
|
+
and `console:updateAgentConfig` is now `@pikku/code-edit` instead of a private
|
|
7
|
+
service inside the console addon. Nothing about the behaviour or the scopes
|
|
8
|
+
changed — the file moved and the addon imports it.
|
|
9
|
+
|
|
10
|
+
Editing a Pikku declaration is not a console concern: the CLI needs the same
|
|
11
|
+
operation, and the alternative was a second copy that drifts. It stays out of
|
|
12
|
+
`@pikku/inspector` deliberately, because the inspector is the read model that
|
|
13
|
+
codegen and validation depend on precisely because it does not mutate.
|
|
14
|
+
|
|
15
|
+
The addon still reaches it through a lazy dynamic import, so self-contained
|
|
16
|
+
bundles that never edit code continue not to ship the TypeScript compiler.
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [d1c6956]
|
|
19
|
+
- Updated dependencies [56d6fde]
|
|
20
|
+
- @pikku/code-edit@0.12.1
|
|
21
|
+
|
|
22
|
+
## 0.12.45
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- 3c0012c: Gate console agent-thread reads and deletes on thread ownership, claim MongoDB workflow steps atomically, and reach the deployment fallback from `rpcWithWire`
|
|
27
|
+
|
|
28
|
+
`getAgentThreadMessages` and `deleteAgentThread` in the console addon took a
|
|
29
|
+
caller-supplied `threadId` straight to storage, while their siblings
|
|
30
|
+
`getAgentThreads` and `getAgentThreadRuns` already filtered to what the session
|
|
31
|
+
owns. Both now carry an `isThreadOwner` permission: an admin reaches any thread,
|
|
32
|
+
everyone else only their own, and a missing thread is refused rather than 404'd
|
|
33
|
+
so it is indistinguishable from someone else's.
|
|
34
|
+
|
|
35
|
+
`MongoDBWorkflowService` claimed a step by reading its status and then writing
|
|
36
|
+
it, under a `withStepLock` that is a pass-through — so two dispatches racing for
|
|
37
|
+
the same step could both proceed and run a side-effecting step twice. The claim
|
|
38
|
+
is now a single status-guarded update, atomic on one document.
|
|
39
|
+
|
|
40
|
+
`rpcWithWire` threw `RPCNotFoundError` for any unresolved namespaced call
|
|
41
|
+
instead of falling through to the deployment service, so a namespaced RPC that
|
|
42
|
+
`rpc()` would have dispatched remotely failed when called with an explicit wire.
|
|
43
|
+
|
|
44
|
+
- 05e47cf: feat(virtual-user): make a run's history readable
|
|
45
|
+
|
|
46
|
+
There was no way to ask what the virtual users had been doing. The scaffold
|
|
47
|
+
generated a way to start a run and a way to read one back by id, and
|
|
48
|
+
`VirtualUserRunStore.list()` — which takes a persona filter — had no caller at
|
|
49
|
+
all. The console's Virtual Users screen was built entirely from static meta, so
|
|
50
|
+
it could say who a persona was and what they could reach, and nothing about
|
|
51
|
+
whether anybody had ever turned them loose.
|
|
52
|
+
|
|
53
|
+
The scaffold now also generates `listVirtualUserRuns` and
|
|
54
|
+
`getVirtualUserRunSteps`, both behind the existing `virtualUser:read` scope —
|
|
55
|
+
the transcript is strictly more sensitive than the summary it belongs to, since
|
|
56
|
+
it carries the live ids and payloads the run actually sent.
|
|
57
|
+
|
|
58
|
+
The console reads the same two things through the console addon
|
|
59
|
+
(`console:getVirtualUserRuns`, `console:getVirtualUserRunSteps`) off the host's
|
|
60
|
+
own `virtualUserRunStore`, under a new `pikku:console:virtualUsers:read` scope.
|
|
61
|
+
Going through the store rather than the scaffolded RPCs means a project's runs
|
|
62
|
+
show up whether or not it turned `scaffold.virtualUser` on — wiring the store is
|
|
63
|
+
all a run has ever needed. A host with no store answers with an empty list
|
|
64
|
+
rather than an error: it has no runs, which is a true answer.
|
|
65
|
+
|
|
66
|
+
Each persona now shows its recent runs under the declaration — status, when,
|
|
67
|
+
steps and mutations, findings, disposition and seed — and opening one fetches
|
|
68
|
+
its transcript. The steps are fetched only on open, because the history is read
|
|
69
|
+
far more often than any single run is.
|
|
70
|
+
|
|
71
|
+
- 05e47cf: feat(virtual-user): put each persona on its own clock
|
|
72
|
+
|
|
73
|
+
A budget says where one run stops. Nothing said how often a persona should use
|
|
74
|
+
the application, so in practice each one ran whenever somebody remembered — and
|
|
75
|
+
what actually tells you about a product is the same user coming back over a
|
|
76
|
+
fortnight.
|
|
77
|
+
|
|
78
|
+
Each persona now gets a row rather than a bigger budget. `virtualUserSchedule`
|
|
79
|
+
holds `enabled`, the disposition and goals to run with, an interval **range**,
|
|
80
|
+
and `nextRunAt`. `tickVirtualUserSchedules` acts on whichever rows are due:
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
wireScheduler({
|
|
84
|
+
name: 'virtualUsers',
|
|
85
|
+
schedule: '0 * * * *',
|
|
86
|
+
func: tickVirtualUserSchedules,
|
|
87
|
+
})
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The tick is generated and wired by nobody, deliberately. A scaffolded
|
|
91
|
+
`wireScheduler` would start spending an application's model budget the moment
|
|
92
|
+
somebody ran `pikku all`, on a host that may not run schedulers at all. Tick
|
|
93
|
+
resolution bounds how late a due persona is, never how often it runs.
|
|
94
|
+
|
|
95
|
+
Three things it does that are easy to leave out:
|
|
96
|
+
|
|
97
|
+
- The next due time is written **before** the run is dispatched, so a tick that
|
|
98
|
+
dies halfway cannot hand the same persona to the next one. A dispatch that
|
|
99
|
+
throws waits a full interval instead of retrying every minute for a week.
|
|
100
|
+
That write is a compare-and-set against the `nextRunAt` the tick read, so it
|
|
101
|
+
is also how a tick _wins_ the persona: two processes on the same cron see the
|
|
102
|
+
same due row, and only the one whose claim lands dispatches.
|
|
103
|
+
- A persona whose previous run is still `running` is skipped, not queued. Two
|
|
104
|
+
copies of the same user acting at once is a different test, and its findings
|
|
105
|
+
do not reproduce.
|
|
106
|
+
- A run still `running` after two hours is failed. Without that, one restart
|
|
107
|
+
mid-run blocks that persona's schedule permanently — which is where the
|
|
108
|
+
stranded-record cost of not using a queue finally gets paid.
|
|
109
|
+
|
|
110
|
+
Reschedule-on-completion was the other candidate and is worse in exactly one
|
|
111
|
+
way, fatally: a crash between finishing and scheduling ends the persona forever,
|
|
112
|
+
and the evidence is an absence.
|
|
113
|
+
|
|
114
|
+
New: `VirtualUserScheduleStore` in core (with the tick, `isDue` and `nextRunAt`
|
|
115
|
+
as pure functions), `KyselyVirtualUserScheduleStore` and its own schema —
|
|
116
|
+
its own rather than a third table in `virtualUserSchema`, and owned by its own
|
|
117
|
+
store, so a project that records runs and never wants them unattended carries no
|
|
118
|
+
cadence table. `scaffold.virtualUser` gains `setVirtualUserSchedule`,
|
|
119
|
+
`listVirtualUserSchedules` and the tick, behind a new `virtualUser:schedule`
|
|
120
|
+
scope: starting a run spends money once with a caller watching, while writing a
|
|
121
|
+
schedule spends it repeatedly with nobody there.
|
|
122
|
+
|
|
123
|
+
The console's Virtual Users screen gains a **Run now** button beside a persona's
|
|
124
|
+
run history, gated on `pikku:console:virtualUsers:run`. It dispatches the
|
|
125
|
+
project's own `runVirtualUser` rather than starting a run itself, so a run the
|
|
126
|
+
application would refuse — an acted-upon persona, a non-accountable disposition
|
|
127
|
+
in production — is still refused.
|
|
128
|
+
|
|
129
|
+
- Updated dependencies [3c0012c]
|
|
130
|
+
- Updated dependencies [05e47cf]
|
|
131
|
+
- Updated dependencies [cfd364a]
|
|
132
|
+
- Updated dependencies [05e47cf]
|
|
133
|
+
- Updated dependencies [05e47cf]
|
|
134
|
+
- Updated dependencies [05e47cf]
|
|
135
|
+
- @pikku/core@0.12.90
|
|
136
|
+
|
|
1
137
|
## 0.12.44
|
|
2
138
|
|
|
3
139
|
### Patch Changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.118
|
|
3
3
|
*/
|
|
4
4
|
import { CoreAgent } from '@pikku/core/agent';
|
|
5
5
|
import { pikkuAgentScorer as corePikkuAgentScorer, pikkuAgentJudge as corePikkuAgentJudge } from '@pikku/core/agent-scorer';
|
|
@@ -21,9 +21,33 @@ type AgentConfig<InputSchema extends StandardSchemaV1 | undefined = undefined, O
|
|
|
21
21
|
agents?: AgentConfig<StandardSchemaV1 | undefined, StandardSchemaV1 | undefined>[];
|
|
22
22
|
workflows?: object[];
|
|
23
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* Declares an agent: the model, the prompt, the tools it may call and the shape
|
|
26
|
+
* of what it returns. Wire it like any other function.
|
|
27
|
+
*
|
|
28
|
+
* @example snippet: aiAgent
|
|
29
|
+
*/
|
|
24
30
|
export declare const pikkuAgent: <InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined>(agent: AgentConfig<InputSchema, OutputSchema>) => AgentConfig<InputSchema, OutputSchema>;
|
|
31
|
+
/**
|
|
32
|
+
* Declares a scorer that grades an agent run programmatically — a function over
|
|
33
|
+
* the run's input and output returning a score.
|
|
34
|
+
*
|
|
35
|
+
* @example snippet: agentScorer
|
|
36
|
+
*/
|
|
25
37
|
export declare const pikkuAgentScorer: (config: Parameters<typeof corePikkuAgentScorer<Services>>[0]) => import("@pikku/core/agent-scorer").PikkuAgentScorer<Services>;
|
|
38
|
+
/**
|
|
39
|
+
* Declares a scorer that grades an agent run with another model, for the
|
|
40
|
+
* qualities a programmatic check cannot express.
|
|
41
|
+
*
|
|
42
|
+
* @example snippet: agentJudge
|
|
43
|
+
*/
|
|
26
44
|
export declare const pikkuAgentJudge: (config: Parameters<typeof corePikkuAgentJudge<Services>>[0]) => import("@pikku/core/agent-scorer").PikkuAgentScorer<Services>;
|
|
45
|
+
/**
|
|
46
|
+
* A ready-made function that runs the named agent once and returns its result —
|
|
47
|
+
* wire it straight to a route when you need no logic around the run.
|
|
48
|
+
*
|
|
49
|
+
* @example snippet: aiAgentInvoke
|
|
50
|
+
*/
|
|
27
51
|
export declare const agent: <Name extends keyof AgentMap>(agentName: Name) => PikkuFunctionConfig<AgentInput, {
|
|
28
52
|
runId: string;
|
|
29
53
|
result: AgentMap[Name]["output"];
|
|
@@ -32,17 +56,34 @@ export declare const agent: <Name extends keyof AgentMap>(agentName: Name) => Pi
|
|
|
32
56
|
outputTokens: number;
|
|
33
57
|
};
|
|
34
58
|
}, "session" | "rpc">;
|
|
59
|
+
/**
|
|
60
|
+
* The streaming counterpart of `agent`: wire it to a channel to send tokens and
|
|
61
|
+
* tool calls as they happen instead of waiting for the run to finish.
|
|
62
|
+
*
|
|
63
|
+
* @example snippet: aiAgentStream
|
|
64
|
+
*/
|
|
35
65
|
export declare const agentStream: <Name extends keyof AgentMap>(agentName?: Name | undefined) => PikkuFunctionConfig<{
|
|
36
66
|
agentName?: string;
|
|
37
67
|
message: string;
|
|
38
68
|
threadId: string;
|
|
39
69
|
resourceId: string;
|
|
40
70
|
}, void, "session" | "rpc">;
|
|
71
|
+
/**
|
|
72
|
+
* A ready-made function that answers one pending tool approval, letting a run
|
|
73
|
+
* that paused for a human carry on.
|
|
74
|
+
*
|
|
75
|
+
* @example snippet: agentApproval
|
|
76
|
+
*/
|
|
41
77
|
export declare const agentResume: () => PikkuFunctionConfig<{
|
|
42
78
|
runId: string;
|
|
43
79
|
toolCallId: string;
|
|
44
80
|
approved: boolean;
|
|
45
81
|
}, void, "session" | "rpc">;
|
|
82
|
+
/**
|
|
83
|
+
* A ready-made function that answers every pending approval for a run at once.
|
|
84
|
+
*
|
|
85
|
+
* @example snippet: agentApproval
|
|
86
|
+
*/
|
|
46
87
|
export declare const agentApprove: <Name extends keyof AgentMap>(agentName: Name) => PikkuFunctionConfig<{
|
|
47
88
|
runId: string;
|
|
48
89
|
approvals: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pikku-agent-types.gen.d.ts","sourceRoot":"","sources":["../../../../.pikku/addon/agent/pikku-agent-types.gen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CAAC;IAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;IAAC,KAAK,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,EACzG,SAAS,GAAG,KAAK,CAEpB,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,IAAI,SAAS,MAAM,QAAQ,EACrD,4BAAgB,KAE0D,mBAAmB,CAC3F;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,EAC7E,IAAI,EACJ,SAAS,GAAG,KAAK,CAEpB,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,QACM,mBAAmB,CAC7C;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,EACxD,IAAI,EACJ,SAAS,GAAG,KAAK,CAEpB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,IAAI,SAAS,MAAM,QAAQ,EACtD,WAAW,IAAI,KAE4D,mBAAmB,CAC5F;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,EAAE,CAAA;CAAE,EACzE,OAAO,EACP,SAAS,GAAG,KAAK,CAEpB,CAAA"}
|
|
@@ -1,19 +1,60 @@
|
|
|
1
1
|
import { agent as coreAgent, agentStream as coreAgentStream, agentResume as coreAgentResume, agentApprove as coreAgentApprove, } from '@pikku/core/agent';
|
|
2
2
|
import { pikkuAgentScorer as corePikkuAgentScorer, pikkuAgentJudge as corePikkuAgentJudge, } from '@pikku/core/agent-scorer';
|
|
3
|
+
/**
|
|
4
|
+
* Declares an agent: the model, the prompt, the tools it may call and the shape
|
|
5
|
+
* of what it returns. Wire it like any other function.
|
|
6
|
+
*
|
|
7
|
+
* @example snippet: aiAgent
|
|
8
|
+
*/
|
|
3
9
|
export const pikkuAgent = (agent) => {
|
|
4
10
|
return agent;
|
|
5
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* Declares a scorer that grades an agent run programmatically — a function over
|
|
14
|
+
* the run's input and output returning a score.
|
|
15
|
+
*
|
|
16
|
+
* @example snippet: agentScorer
|
|
17
|
+
*/
|
|
6
18
|
export const pikkuAgentScorer = (config) => corePikkuAgentScorer(config);
|
|
19
|
+
/**
|
|
20
|
+
* Declares a scorer that grades an agent run with another model, for the
|
|
21
|
+
* qualities a programmatic check cannot express.
|
|
22
|
+
*
|
|
23
|
+
* @example snippet: agentJudge
|
|
24
|
+
*/
|
|
7
25
|
export const pikkuAgentJudge = (config) => corePikkuAgentJudge(config);
|
|
26
|
+
/**
|
|
27
|
+
* A ready-made function that runs the named agent once and returns its result —
|
|
28
|
+
* wire it straight to a route when you need no logic around the run.
|
|
29
|
+
*
|
|
30
|
+
* @example snippet: aiAgentInvoke
|
|
31
|
+
*/
|
|
8
32
|
export const agent = (agentName) => {
|
|
9
33
|
return coreAgent(agentName);
|
|
10
34
|
};
|
|
35
|
+
/**
|
|
36
|
+
* The streaming counterpart of `agent`: wire it to a channel to send tokens and
|
|
37
|
+
* tool calls as they happen instead of waiting for the run to finish.
|
|
38
|
+
*
|
|
39
|
+
* @example snippet: aiAgentStream
|
|
40
|
+
*/
|
|
11
41
|
export const agentStream = (agentName) => {
|
|
12
42
|
return coreAgentStream(agentName);
|
|
13
43
|
};
|
|
44
|
+
/**
|
|
45
|
+
* A ready-made function that answers one pending tool approval, letting a run
|
|
46
|
+
* that paused for a human carry on.
|
|
47
|
+
*
|
|
48
|
+
* @example snippet: agentApproval
|
|
49
|
+
*/
|
|
14
50
|
export const agentResume = () => {
|
|
15
51
|
return coreAgentResume();
|
|
16
52
|
};
|
|
53
|
+
/**
|
|
54
|
+
* A ready-made function that answers every pending approval for a run at once.
|
|
55
|
+
*
|
|
56
|
+
* @example snippet: agentApproval
|
|
57
|
+
*/
|
|
17
58
|
export const agentApprove = (agentName) => {
|
|
18
59
|
return coreAgentApprove(agentName);
|
|
19
60
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pikku-agent-types.gen.js","sourceRoot":"","sources":["../../../../.pikku/addon/agent/pikku-agent-types.gen.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,IAAI,SAAS,EAClB,WAAW,IAAI,eAAe,EAC9B,WAAW,IAAI,eAAe,EAC9B,YAAY,IAAI,gBAAgB,GACjC,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,gBAAgB,IAAI,oBAAoB,EACxC,eAAe,IAAI,mBAAmB,GACvC,MAAM,0BAA0B,CAAA;AAsBjC,MAAM,CAAC,MAAM,UAAU,GAAG,CAIxB,KAA6C,EAC7C,EAAE;IACF,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,MAA4D,EAC5D,EAAE,CAAC,oBAAoB,CAAW,MAAM,CAAC,CAAA;AAE3C,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,MAA2D,EAC3D,EAAE,CAAC,mBAAmB,CAAW,MAAM,CAAC,CAAA;AAI1C,MAAM,CAAC,MAAM,KAAK,GAAG,CACnB,SAAe,EACf,EAAE;IACF,OAAO,SAAS,CAAW,SAAoC,CAI9D,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,SAAgB,EAChB,EAAE;IACF,OAAO,eAAe,CAAW,SAAoC,CAIpE,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE;IAC9B,OAAO,eAAe,EAIrB,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,SAAe,EACf,EAAE;IACF,OAAO,gBAAgB,CAAW,SAAoC,CAIrE,CAAA;AACH,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"file":"pikku-agent-types.gen.js","sourceRoot":"","sources":["../../../../.pikku/addon/agent/pikku-agent-types.gen.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,IAAI,SAAS,EAClB,WAAW,IAAI,eAAe,EAC9B,WAAW,IAAI,eAAe,EAC9B,YAAY,IAAI,gBAAgB,GACjC,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,gBAAgB,IAAI,oBAAoB,EACxC,eAAe,IAAI,mBAAmB,GACvC,MAAM,0BAA0B,CAAA;AAsBjC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAIxB,KAA6C,EAC7C,EAAE;IACF,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,MAA4D,EAC5D,EAAE,CAAC,oBAAoB,CAAW,MAAM,CAAC,CAAA;AAE3C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,MAA2D,EAC3D,EAAE,CAAC,mBAAmB,CAAW,MAAM,CAAC,CAAA;AAI1C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CACnB,SAAe,EACf,EAAE;IACF,OAAO,SAAS,CAAW,SAAoC,CAI9D,CAAA;AACH,CAAC,CAAA;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,SAAgB,EAChB,EAAE;IACF,OAAO,eAAe,CAAW,SAAoC,CAIpE,CAAA;AACH,CAAC,CAAA;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE;IAC9B,OAAO,eAAe,EAIrB,CAAA;AACH,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,SAAe,EACf,EAAE;IACF,OAAO,gBAAgB,CAAW,SAAoC,CAIrE,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.118
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* Permission, auth gate and credential definitions
|
|
6
6
|
*/
|
|
7
7
|
import type { PikkuWire, SecretlessServices } from '@pikku/core/types';
|
|
8
8
|
import type { CorePermissionGroup, CorePikkuAuth, CorePikkuAuthConfig, CorePikkuPermission } from '@pikku/core/function';
|
|
9
|
-
import type { Services, Session, SingletonServices, WiredServices
|
|
9
|
+
import type { Services, Session, SingletonServices, WiredServices } from '../function/pikku-function-types.gen.js';
|
|
10
|
+
import type { RequiredSingletonServices } from '../pikku-services.gen.js';
|
|
10
11
|
export { defineCredential } from '@pikku/core/credential';
|
|
12
|
+
/**
|
|
13
|
+
* Derived here rather than imported: nothing outside a generated leaf ever
|
|
14
|
+
* names this intersection, so the function leaf keeps it to itself and the
|
|
15
|
+
* leaves that want it spell it out.
|
|
16
|
+
*/
|
|
17
|
+
type WiredSingletonServices = RequiredSingletonServices & SingletonServices;
|
|
11
18
|
/** `WiredSingletonServices` without `secrets`, for auth gates. */
|
|
12
19
|
type WiredAuthServices = SecretlessServices<WiredSingletonServices>;
|
|
13
20
|
/**
|
|
@@ -33,24 +40,7 @@ type PikkuPermissionConfig<In = unknown, RequiredServices extends SecretlessServ
|
|
|
33
40
|
* Factory function for creating permissions with tree-shaking support.
|
|
34
41
|
* Supports both direct function and configuration object syntax.
|
|
35
42
|
*
|
|
36
|
-
* @example
|
|
37
|
-
* ```typescript
|
|
38
|
-
* // Direct function syntax
|
|
39
|
-
* const permission = pikkuPermission(async ({ logger }, data, { session }) => {
|
|
40
|
-
* const session = await session?.get()
|
|
41
|
-
* return session?.role === 'admin'
|
|
42
|
-
* })
|
|
43
|
-
*
|
|
44
|
-
* // Configuration object syntax with metadata
|
|
45
|
-
* const adminPermission = pikkuPermission({
|
|
46
|
-
* name: 'Admin Permission',
|
|
47
|
-
* description: 'Checks if user has admin role',
|
|
48
|
-
* func: async ({ logger }, data, { session }) => {
|
|
49
|
-
* const session = await session?.get()
|
|
50
|
-
* return session?.role === 'admin'
|
|
51
|
-
* }
|
|
52
|
-
* })
|
|
53
|
-
* ```
|
|
43
|
+
* @example snippet: permissionFunction
|
|
54
44
|
*/
|
|
55
45
|
export declare const pikkuPermission: <In>(permission: PikkuPermission<In> | PikkuPermissionConfig<In>) => PikkuPermission<In>;
|
|
56
46
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pikku-auth-types.gen.d.ts","sourceRoot":"","sources":["../../../../.pikku/addon/auth/pikku-auth-types.gen.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtE,OAAO,KAAK,EACV,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,sBAAsB,CAAA;AAG7B,OAAO,KAAK,EACV,QAAQ,EACR,OAAO,EACP,iBAAiB,EACjB,aAAa,
|
|
1
|
+
{"version":3,"file":"pikku-auth-types.gen.d.ts","sourceRoot":"","sources":["../../../../.pikku/addon/auth/pikku-auth-types.gen.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtE,OAAO,KAAK,EACV,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,sBAAsB,CAAA;AAG7B,OAAO,KAAK,EACV,QAAQ,EACR,OAAO,EACP,iBAAiB,EACjB,aAAa,EACd,MAAM,yCAAyC,CAAA;AAChD,OAAO,KAAK,EAAE,yBAAyB,E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C,CAAA;AAEzJ;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,SAAS,GAAI,gBAAgB,SAAS,kBAAkB,CAAC,iBAAiB,CAAC,GAAG,iBAAiB,EAC1G,MAAM,SAAS,CAAC,gBAAgB,CAAC,GAAG,eAAe,CAAC,gBAAgB,CAAC,KACpE,eAAe,CAAC,GAAG,EAAE,GAAG,CAE1B,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,sBAAsB,GAAI,EAAE,GAAG,GAAG,EAC7C,SAAS,CAAC,KAAK,EAAE,EAAE,KAAK,eAAe,CAAC,GAAG,CAAC,KAC3C,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,eAAe,CAAC,GAAG,CAAC,CAEtC,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,GAAI,EAAE,GAAG,OAAO,EAAE,aAAa,mBAAmB,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,GAAG,eAAe,CAAC,EAAE,CAAC,EAAE,SAE9H,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.118
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* Permission, auth gate and credential definitions
|
|
@@ -11,24 +11,7 @@ export { defineCredential } from '@pikku/core/credential';
|
|
|
11
11
|
* Factory function for creating permissions with tree-shaking support.
|
|
12
12
|
* Supports both direct function and configuration object syntax.
|
|
13
13
|
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```typescript
|
|
16
|
-
* // Direct function syntax
|
|
17
|
-
* const permission = pikkuPermission(async ({ logger }, data, { session }) => {
|
|
18
|
-
* const session = await session?.get()
|
|
19
|
-
* return session?.role === 'admin'
|
|
20
|
-
* })
|
|
21
|
-
*
|
|
22
|
-
* // Configuration object syntax with metadata
|
|
23
|
-
* const adminPermission = pikkuPermission({
|
|
24
|
-
* name: 'Admin Permission',
|
|
25
|
-
* description: 'Checks if user has admin role',
|
|
26
|
-
* func: async ({ logger }, data, { session }) => {
|
|
27
|
-
* const session = await session?.get()
|
|
28
|
-
* return session?.role === 'admin'
|
|
29
|
-
* }
|
|
30
|
-
* })
|
|
31
|
-
* ```
|
|
14
|
+
* @example snippet: permissionFunction
|
|
32
15
|
*/
|
|
33
16
|
export const pikkuPermission = (permission) => {
|
|
34
17
|
return typeof permission === 'function' ? permission : permission.func;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pikku-auth-types.gen.js","sourceRoot":"","sources":["../../../../.pikku/addon/auth/pikku-auth-types.gen.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;GAEG;AASH,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,EAAE,mBAAmB,IAAI,uBAAuB,EAAE,MAAM,wBAAwB,CAAA;AASvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"pikku-auth-types.gen.js","sourceRoot":"","sources":["../../../../.pikku/addon/auth/pikku-auth-types.gen.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;GAEG;AASH,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,EAAE,mBAAmB,IAAI,uBAAuB,EAAE,MAAM,wBAAwB,CAAA;AASvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAiCzD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,UAA2D,EACtC,EAAE;IACvB,OAAO,OAAO,UAAU,KAAK,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAA;AACxE,CAAC,CAAA;AAgBD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,IAAqE,EAC1C,EAAE;IAC7B,OAAO,aAAa,CAAC,IAAW,CAAQ,CAAA;AAC1C,CAAC,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,OAA4C,EACL,EAAE;IACzC,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAe,WAA6E,EAAE,EAAE;IACjI,uBAAuB,CAAC,WAAkB,EAAE,sBAAsB,CAAC,CAAA;AACrE,CAAC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.118
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* Channel-specific type definitions for tree-shaking optimization
|
|
@@ -20,6 +20,8 @@ type InferSchemaOutput<T> = T extends StandardSchemaV1<any, infer Output> ? Outp
|
|
|
20
20
|
* @template Out - Output type for connection response
|
|
21
21
|
* @param func - Function definition, either direct function or configuration object
|
|
22
22
|
* @returns The normalized configuration object
|
|
23
|
+
*
|
|
24
|
+
* @example snippet: channelLifecycle
|
|
23
25
|
*/
|
|
24
26
|
export declare const pikkuChannelConnectionFunc: <Out = unknown>(func: PikkuFunctionSessionless<void, Out, "channel" | "session" | "rpc"> | PikkuFunctionConfig<void, Out, "channel" | "session" | "rpc">) => PikkuFunctionConfig<void, Out, "channel" | "rpc" | "session">;
|
|
25
27
|
/**
|
|
@@ -28,6 +30,8 @@ export declare const pikkuChannelConnectionFunc: <Out = unknown>(func: PikkuFunc
|
|
|
28
30
|
*
|
|
29
31
|
* @param func - Function definition, either direct function or configuration object
|
|
30
32
|
* @returns The normalized configuration object
|
|
33
|
+
*
|
|
34
|
+
* @example snippet: channelLifecycle
|
|
31
35
|
*/
|
|
32
36
|
export declare const pikkuChannelDisconnectionFunc: (func: PikkuFunctionSessionless<void, void, "channel"> | PikkuFunctionConfig<void, void, "channel" | "session" | "rpc">) => PikkuFunctionConfig<void, void, "channel" | "rpc" | "session">;
|
|
33
37
|
/**
|
|
@@ -58,23 +62,7 @@ type PikkuChannelFuncConfigWithSchema<InputSchema extends StandardSchemaV1, Outp
|
|
|
58
62
|
* @param func - Function definition, either direct function or configuration object
|
|
59
63
|
* @returns The normalized configuration object
|
|
60
64
|
*
|
|
61
|
-
* @example
|
|
62
|
-
* ```typescript
|
|
63
|
-
* // Pattern 1: Using generic types
|
|
64
|
-
* const handleMessage = pikkuChannelFunc<{text: string}, {received: boolean}>({
|
|
65
|
-
* func: async (_services, { text }) => ({ received: true })
|
|
66
|
-
* })
|
|
67
|
-
*
|
|
68
|
-
* // Pattern 2: Using Zod schemas
|
|
69
|
-
* const messageInput = z.object({ text: z.string() })
|
|
70
|
-
* const messageOutput = z.object({ received: z.boolean() })
|
|
71
|
-
*
|
|
72
|
-
* const handleMessage = pikkuChannelFunc({
|
|
73
|
-
* input: messageInput,
|
|
74
|
-
* output: messageOutput,
|
|
75
|
-
* func: async (_services, { text }) => ({ received: true })
|
|
76
|
-
* })
|
|
77
|
-
* ```
|
|
65
|
+
* @example snippet: orderStatusChannel
|
|
78
66
|
*/
|
|
79
67
|
export declare function pikkuChannelFunc<InputSchema extends StandardSchemaV1, OutputSchema extends StandardSchemaV1 | undefined = undefined>(config: PikkuChannelFuncConfigWithSchema<InputSchema, OutputSchema>): PikkuFunctionConfig<InferSchemaOutput<InputSchema>, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'channel' | 'session' | 'rpc'>;
|
|
80
68
|
export declare function pikkuChannelFunc<In, Out = unknown>(func: PikkuFunctionSessionless<In, Out, 'channel' | 'session' | 'rpc'> | PikkuFunctionConfig<In, Out, 'channel' | 'session' | 'rpc'>): PikkuFunctionConfig<In, Out, 'channel' | 'session' | 'rpc'>;
|
|
@@ -85,6 +73,8 @@ export declare function pikkuChannelFunc<In, Out = unknown>(func: PikkuFunctionS
|
|
|
85
73
|
* @template T - Record of channel route handlers
|
|
86
74
|
* @param routes - The channel routes record
|
|
87
75
|
* @returns The same routes record (identity function for type safety)
|
|
76
|
+
*
|
|
77
|
+
* @example snippet: channelRoutes
|
|
88
78
|
*/
|
|
89
79
|
export declare function defineChannelRoutes<T extends Record<string, any>>(routes: T): T;
|
|
90
80
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pikku-channel-types.gen.d.ts","sourceRoot":"","sources":["../../../../.pikku/addon/channel/pikku-channel-types.gen.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;GAEG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAA;AAC5G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAA;AAClF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAE7D;;GAEG;AACH,KAAK,iBAAiB,CAAC,CAAC,IAAI,CAAC,SAAS,gBAAgB,CAAC,GAAG,EAAE,MAAM,MAAM,CAAC,GAAG,MAAM,GAAG,KAAK,CAAA;AAI1F
|
|
1
|
+
{"version":3,"file":"pikku-channel-types.gen.d.ts","sourceRoot":"","sources":["../../../../.pikku/addon/channel/pikku-channel-types.gen.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;GAEG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAA;AAC5G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAA;AAClF,OAAO,KAAK,EAAE,mBAAmB,EAAE,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,CAAC,CAAA;IAClF,UAAU,CAAC,EAAE,eAAe,EAAE,CAAA;IAC9B,KAAK,EAAE,WAAW,CAAA;IAClB,MAAM,CAAC,EAAE,YAAY,CAAA;CACtB,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,SAAS,gBAAgB,EACpC,YAAY,SAAS,gBAAgB,GAAG,SAAS,GAAG,SAAS,EAE7D,MAAM,EAAE,gCAAgC,CAAC,WAAW,EAAE,YAAY,CAAC,GAClE,mBAAmB,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE,YAAY,SAAS,gBAAgB,GAAG,iBAAiB,CAAC,YAAY,CAAC,GAAG,OAAO,EAAE,SAAS,GAAG,SAAS,GAAG,KAAK,CAAC,CAAA;AACxK,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,GAAG,GAAG,OAAO,EAChD,IAAI,EACA,wBAAwB,CAAC,EAAE,EAAE,GAAG,EAAE,SAAS,GAAG,SAAS,GAAG,KAAK,CAAC,GAChE,mBAAmB,CAAC,EAAE,EAAE,GAAG,EAAE,SAAS,GAAG,SAAS,GAAG,KAAK,CAAC,GAC9D,mBAAmB,CAAC,EAAE,EAAE,GAAG,EAAE,SAAS,GAAG,SAAS,GAAG,KAAK,CAAC,CAAA;AAM9D;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAE/E"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.118
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* Channel-specific type definitions for tree-shaking optimization
|
|
@@ -12,6 +12,8 @@ import { defineChannelRoutes as defineChannelRoutesCore } from '@pikku/core/chan
|
|
|
12
12
|
* @template Out - Output type for connection response
|
|
13
13
|
* @param func - Function definition, either direct function or configuration object
|
|
14
14
|
* @returns The normalized configuration object
|
|
15
|
+
*
|
|
16
|
+
* @example snippet: channelLifecycle
|
|
15
17
|
*/
|
|
16
18
|
export const pikkuChannelConnectionFunc = (func) => {
|
|
17
19
|
return typeof func === 'function' ? { func } : func;
|
|
@@ -22,6 +24,8 @@ export const pikkuChannelConnectionFunc = (func) => {
|
|
|
22
24
|
*
|
|
23
25
|
* @param func - Function definition, either direct function or configuration object
|
|
24
26
|
* @returns The normalized configuration object
|
|
27
|
+
*
|
|
28
|
+
* @example snippet: channelLifecycle
|
|
25
29
|
*/
|
|
26
30
|
export const pikkuChannelDisconnectionFunc = (func) => {
|
|
27
31
|
return typeof func === 'function' ? { func } : func;
|
|
@@ -36,6 +40,8 @@ export function pikkuChannelFunc(func) {
|
|
|
36
40
|
* @template T - Record of channel route handlers
|
|
37
41
|
* @param routes - The channel routes record
|
|
38
42
|
* @returns The same routes record (identity function for type safety)
|
|
43
|
+
*
|
|
44
|
+
* @example snippet: channelRoutes
|
|
39
45
|
*/
|
|
40
46
|
export function defineChannelRoutes(routes) {
|
|
41
47
|
return defineChannelRoutesCore(routes);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pikku-channel-types.gen.js","sourceRoot":"","sources":["../../../../.pikku/addon/channel/pikku-channel-types.gen.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;GAEG;AAEH,OAAO,EAAE,mBAAmB,IAAI,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAcpF
|
|
1
|
+
{"version":3,"file":"pikku-channel-types.gen.js","sourceRoot":"","sources":["../../../../.pikku/addon/channel/pikku-channel-types.gen.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;GAEG;AAEH,OAAO,EAAE,mBAAmB,IAAI,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAcpF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,IAEiE,EACjE,EAAE;IACF,OAAO,OAAO,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAA;AACrD,CAAC,CAAA;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAC3C,IAEkE,EAClE,EAAE;IACF,OAAO,OAAO,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAA;AACrD,CAAC,CAAA;AAmDD,MAAM,UAAU,gBAAgB,CAAC,IAAS;IACxC,OAAO,OAAO,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAA;AACrD,CAAC;AAGD;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB,CAAgC,MAAS;IAC1E,OAAO,uBAAuB,CAAC,MAAM,CAAC,CAAA;AACxC,CAAC"}
|