@pikku/lambda 0.12.11 → 0.12.13

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.
@@ -1,5 +1,5 @@
1
1
  import { LambdaClient, InvokeCommand } from '@aws-sdk/client-lambda';
2
- import { buildRemoteHeaders } from '@pikku/core/remote';
2
+ import { buildMeshHeaders } from '@pikku/core/mesh';
3
3
  export class LambdaDeploymentService {
4
4
  jwt;
5
5
  secrets;
@@ -20,8 +20,8 @@ export class LambdaDeploymentService {
20
20
  throw new Error(`No Lambda binding for function '${funcName}'. ` +
21
21
  `Available bindings: ${[...this.bindings.keys()].join(', ')}`);
22
22
  }
23
- const headers = await buildRemoteHeaders(this.jwt, this.secrets, funcName, session, traceId);
24
- const rpcPath = `/remote/rpc/${encodeURIComponent(funcName)}`;
23
+ const headers = await buildMeshHeaders(this.jwt, this.secrets, funcName, session, traceId);
24
+ const rpcPath = `/mesh/rpc/${encodeURIComponent(funcName)}`;
25
25
  const apiGatewayEvent = {
26
26
  httpMethod: 'POST',
27
27
  path: rpcPath,
@@ -48,14 +48,14 @@ export class LambdaDeploymentService {
48
48
  const errorPayload = response.Payload
49
49
  ? new TextDecoder().decode(response.Payload)
50
50
  : 'Unknown error';
51
- throw new Error(`Remote RPC call to '${funcName}' failed: Lambda error: ${errorPayload}`);
51
+ throw new Error(`Mesh RPC call to '${funcName}' failed: Lambda error: ${errorPayload}`);
52
52
  }
53
53
  if (!response.Payload) {
54
- throw new Error(`Remote RPC call to '${funcName}' returned no payload`);
54
+ throw new Error(`Mesh RPC call to '${funcName}' returned no payload`);
55
55
  }
56
56
  const lambdaResult = JSON.parse(new TextDecoder().decode(response.Payload));
57
57
  if (lambdaResult.statusCode && lambdaResult.statusCode >= 400) {
58
- throw new Error(`Remote RPC call to '${funcName}' failed: ${lambdaResult.statusCode} ${lambdaResult.body}`);
58
+ throw new Error(`Mesh RPC call to '${funcName}' failed: ${lambdaResult.statusCode} ${lambdaResult.body}`);
59
59
  }
60
60
  const body = lambdaResult.body;
61
61
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"lambda-deployment-service.js","sourceRoot":"","sources":["../src/lambda-deployment-service.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAIpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAEvD,MAAM,OAAO,uBAAuB;IAKxB,GAAG;IACH,OAAO;IALT,MAAM,CAAc;IACpB,QAAQ,CAAqB;IAErC,YACU,GAA2B,EAC3B,OAAsB,EAC9B,gBAAwC;mBAFhC,GAAG;uBACH,OAAO;QAGf,IAAI,CAAC,MAAM,GAAG,IAAI,YAAY,CAAC,EAAE,CAAC,CAAA;QAClC,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAA;IAC3D,CAAC;IAED,KAAK,CAAC,IAAI,KAAmB,CAAC;IAC9B,KAAK,CAAC,KAAK,CAAC,OAAyB,IAAkB,CAAC;IACxD,KAAK,CAAC,IAAI,KAAmB,CAAC;IAE9B,KAAK,CAAC,MAAM,CACV,QAAgB,EAChB,IAAa,EACb,OAAiB,EACjB,OAAgB;QAEhB,MAAM,kBAAkB,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;QACtD,IAAI,CAAC,kBAAkB,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CACb,mCAAmC,QAAQ,KAAK;gBAC9C,uBAAuB,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAChE,CAAA;QACH,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,kBAAkB,CACtC,IAAI,CAAC,GAAG,EACR,IAAI,CAAC,OAAO,EACZ,QAAQ,EACR,OAAO,EACP,OAAO,CACR,CAAA;QA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AC;gBAC5C,CAAC,CAAC,eAAe,CAAA;YACnB,MAAM,IAAI,KAAK,CACb,qBAAqB,QAAQ,2BAA2B,YAAY,EAAE,CACvE,CAAA;QACH,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,qBAAqB,QAAQ,uBAAuB,CAAC,CAAA;QACvE,CAAC;QAGD,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAA;QAE3E,IAAI,YAAY,CAAC,UAAU,IAAI,YAAY,CAAC,UAAU,IAAI,GAAG,EAAE,CAAC;YAC9D,MAAM,IAAI,KAAK,CACb,qBAAqB,QAAQ,aAAa,YAAY,CAAC,UAAU,IAAI,YAAY,CAAC,IAAI,EAAE,CACzF,CAAA;QACH,CAAC;QAGD,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAA;QAC9B,IAAI,CAAC;YACH,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QACzB,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAA;QACb,CAAC;IACH,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pikku/lambda",
3
- "version": "0.12.11",
3
+ "version": "0.12.13",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/pikkujs/pikku.git",
@@ -15,32 +15,38 @@
15
15
  "scripts": {
16
16
  "tsc": "tsc",
17
17
  "ncu": "npx npm-check-updates",
18
- "build": "tsc -b",
18
+ "build": "bun run clean && tsc -b",
19
19
  "release": "npm run build && npm test",
20
20
  "test": "bash run-tests.sh",
21
21
  "test:watch": "bash run-tests.sh --watch",
22
22
  "test:coverage": "bash run-tests.sh --coverage",
23
- "prepublishOnly": "bun run build"
23
+ "prepublishOnly": "bun run build",
24
+ "clean": "rm -rf dist tsconfig.tsbuildinfo"
24
25
  },
25
26
  "exports": {
26
27
  ".": "./dist/index.js",
27
28
  "./http": "./dist/http/index.js",
28
29
  "./websocket": "./dist/websocket/index.js",
29
30
  "./queue": "./dist/queue/index.js",
30
- "./scheduled": "./dist/scheduled/index.js"
31
+ "./scheduled": "./dist/scheduled/index.js",
32
+ "./package.json": "./package.json"
31
33
  },
34
+ "files": [
35
+ "dist",
36
+ "!dist/**/*.tsbuildinfo"
37
+ ],
32
38
  "peerDependencies": {
33
39
  "@aws-sdk/client-apigatewaymanagementapi": "^3.713.0",
34
40
  "@aws-sdk/client-lambda": "^3.713.0",
35
41
  "@aws-sdk/client-sqs": "^3.713.0",
36
- "@pikku/core": "^0.12.108",
42
+ "@pikku/core": "^0.12.146",
37
43
  "@types/aws-lambda": "^8.10.161"
38
44
  },
39
45
  "devDependencies": {
40
- "@aws-sdk/client-apigatewaymanagementapi": "^3.1111.0",
41
- "@aws-sdk/client-lambda": "^3.1111.0",
42
- "@aws-sdk/client-sqs": "^3.1111.0",
43
- "@types/aws-lambda": "^8.10.162"
46
+ "@aws-sdk/client-apigatewaymanagementapi": "^3.1152.0",
47
+ "@aws-sdk/client-lambda": "^3.1152.0",
48
+ "@aws-sdk/client-sqs": "^3.1152.0",
49
+ "@types/aws-lambda": "^8.10.164"
44
50
  },
45
51
  "engines": {
46
52
  "node": ">=24"
package/CHANGELOG.md DELETED
@@ -1,707 +0,0 @@
1
- ## 0.12.11
2
-
3
- ### Patch Changes
4
-
5
- - 4c7a1b5: Run the monorepo's own scripts through bun instead of yarn. What moves is the
6
- package manager each package's `prepublishOnly` and build scripts invoke, plus
7
- the two manifest fixes bun needs to resolve the tree: `uWebSockets.js` is
8
- declared with an explicit `github:` specifier, and `@pikku/uws-handler` marks
9
- its `uWebSockets.js` peer optional so a bun install of a consumer that brings
10
- its own uWS app does not try to fetch it from the registry.
11
-
12
- Three published behaviours change, all of them cases where an isolated
13
- `node_modules` or bun as the runtime had been papered over by yarn's hoisting:
14
-
15
- - `@pikku/migrator-sql` turns foreign keys on when it opens a sqlite database
16
- through bun. `node:sqlite` enforces them by default and `bun:sqlite` does not,
17
- which silently turned every `ON DELETE CASCADE` into a no-op under
18
- `bunx --bun pikku`.
19
- - `@pikku/cli` resolves a deploy provider against the project being deployed
20
- rather than against wherever the CLI itself is installed, which is what its
21
- own "is not installed" error asks the user to arrange.
22
- - `@pikku/cli` treats a specifier a runtime hands straight back — bun does this
23
- for the modules it implements itself — as not resolved from the project, so
24
- it falls back rather than loading the runtime's own copy.
25
-
26
- - Updated dependencies [4c7a1b5]
27
- - @pikku/core@0.12.108
28
-
29
- ## 0.12.10
30
-
31
- ### Patch Changes
32
-
33
- - 3a83f85: Stop re-exporting package internals through entry points
34
-
35
- 66 names reached consumers only because an `export *` in an entry point swept
36
- them up. Each one is referenced solely inside its own package, so the star is
37
- now an explicit named re-export listing what is genuinely public. The
38
- declarations themselves are untouched — this narrows the entry point, not the
39
- module.
40
-
41
- - Updated dependencies [9687ad1]
42
- - Updated dependencies [2d21628]
43
- - Updated dependencies [985b87b]
44
- - Updated dependencies [3a83f85]
45
- - @pikku/core@0.12.87
46
-
47
- ## 0.12.9
48
-
49
- ### Patch Changes
50
-
51
- - 266e3bc: One door per name: `@pikku/core/ecosystem/*` and the package root are gone
52
-
53
- `@pikku/core` published every module twice. `ecosystem/http` re-exported
54
- `./http`, `ecosystem/services` re-exported `./services`, and a name was
55
- reachable through either — so every addition had to be made in two places, and a
56
- consumer's import said nothing about what it actually used. The package root was
57
- the same problem at a larger scale: a single barrel of 206 names that no bundler
58
- could take apart, and the one specifier that revealed nothing at all.
59
-
60
- Both are deleted. Every name now lives on the subpath that owns it, and every
61
- import carries that subpath — `@pikku/core/http`, `@pikku/core/services`,
62
- `@pikku/core/errors`, `@pikku/core/types`.
63
-
64
- Deleting the facades meant the raw subpaths had to become a superset of them,
65
- which they were not: the facade tree had accumulated 25 names with no raw home
66
- and about 26 more filed under a different area than the module they came from.
67
- Those names moved to the area that owns them, and three areas were published as
68
- new entry points rather than left on a root that is going away — `./types` (the
69
- shared type surface, the largest single destination), `./state` and
70
- `./classification`.
71
-
72
- `./classification` is one door onto one subject: what a value is and how it must
73
- be handled. Its three halves would each have been an entry point — the brands
74
- and manifest types, the stored-form helpers (`hashToken`, `unsafeAsSealed` and
75
- friends), and `SecretValue` — split by whether a name happens to be a type or a
76
- value, which is the same defect as the facades. The duration and versioned-id
77
- helpers went to `./utils`, which already published, and `PikkuRequest` went to
78
- `./function`: it is the transport-agnostic request base, not an HTTP one — HTTP
79
- has `PikkuHTTPAbstractRequest`, and the only thing outside core that extends
80
- `PikkuRequest` is Azure's timer request.
81
-
82
- `./types` inherited the root barrel's habit before it inherited its contents, so
83
- the names with an owner elsewhere were moved off it. The middleware types and the
84
- five middleware factories — `pikkuMiddleware`, `pikkuMiddlewareFactory`,
85
- `pikkuChannelMiddleware`, `pikkuChannelMiddlewareFactory` and
86
- `pikkuAgentMiddleware`, runtime values on a types entry point — are now
87
- `@pikku/core/middleware`; the function meta types are `@pikku/core/function`;
88
- `SerializedError` is `@pikku/core/errors`; and the generic TypeScript helpers
89
- (`MakeRequired`, `PickRequired`, `PickOptional`, `RequireAtLeastOne`,
90
- `JSONPrimitive`, `JSONValue`) are `@pikku/core/utils`. What is left on `./types`
91
- is the vocabulary the wirings share, which no single module owns.
92
-
93
- `pikku` was itself a root barrel — `export * from '@pikku/core'` — and
94
- now exports only the services it bundles.
95
-
96
- One module survives at the old specifier, and only for the bootstrap:
97
- `packages/cli` is generated by the _published_ CLI pinned in its `build.sh`, and
98
- that CLI still writes a bare `@pikku/core` into the files it generates for the
99
- CLI itself. `bootstrap-compat/root.ts` carries the eight types it names, a test
100
- in core fails if that list grows, and it goes when the pin moves to a CLI
101
- released from this branch. The adapter names the pinned CLI reaches for —
102
- `pikkuState` and `CreateWireServices` — are rewritten to `@pikku/core/state` and
103
- `@pikku/core/types` by the same `build.sh` patch pass, so no second shim is
104
- needed for them.
105
-
106
- A guard test keeps the root shut: it parses imports and rejects a bare
107
- `@pikku/core` rather than grepping for it, because several tests hold a user's
108
- file as a template literal, where `import … from '@pikku/core'` is fixture text
109
- rather than an import this repo makes.
110
-
111
- An agent scaffold a project generated under an older CLI is refreshed rather
112
- than left to fail: `pikku all` already deleted one importing an entry point
113
- `@pikku/core` no longer publishes, and the `#pikku` hub joins that list.
114
- Without it a project that scaffolds the agent endpoint but
115
- declares no agents keeps the old file forever — the generator that would rewrite
116
- it only runs when agents exist, and the file being present is what stops it
117
- being regenerated as missing.
118
-
119
- `pikku new addon` also wrote a tsconfig `paths` map naming only the deleted hub.
120
- An addon's `imports` map points into `dist`, so `paths` is what resolves
121
- `#pikku/<leaf>` for the addon's own source build — it now names the two leaf
122
- patterns, in both the addon and its test harness.
123
-
124
- - 6eef0a0: Bump every dependency to its latest compatible minor/patch across the monorepo.
125
- - Updated dependencies [7722ceb]
126
- - Updated dependencies [375c1ff]
127
- - Updated dependencies [02a70cd]
128
- - Updated dependencies [aeef159]
129
- - Updated dependencies [a281de6]
130
- - Updated dependencies [266e3bc]
131
- - Updated dependencies [02a70cd]
132
- - Updated dependencies [786dae5]
133
- - Updated dependencies [6eef0a0]
134
- - Updated dependencies [3561d67]
135
- - Updated dependencies [a91c433]
136
- - Updated dependencies [02a70cd]
137
- - Updated dependencies [9537f74]
138
- - Updated dependencies [2b57ca8]
139
- - Updated dependencies [266e3bc]
140
- - Updated dependencies [9fce0f1]
141
- - Updated dependencies [83683a0]
142
- - Updated dependencies [456c88b]
143
- - Updated dependencies [456c88b]
144
- - Updated dependencies [c127273]
145
- - @pikku/core@0.12.85
146
-
147
- ## 0.12.8
148
-
149
- ### Patch Changes
150
-
151
- - 6794681: Publish the ecosystem surface as per-area sub-barrels under `@pikku/core/ecosystem/*`, and point generated code, the CLI, the inspector and the runtime adapters at them.
152
-
153
- 348 names that only generated code, the toolchain or a runtime adapter ever imports now have a second home on `@pikku/core/ecosystem/<area>` — one sub-barrel per area, matching how core already publishes its entrypoints, so no single barrel grows without bound and a consumer only pulls in the area it uses.
154
-
155
- This step is additive: every name is still exported from the entrypoint it was published from before, so nothing downstream breaks. Removing them from the app-facing barrels is a later change, and needs a release carrying `./ecosystem/*` first.
156
-
157
- - Updated dependencies [7406bfe]
158
- - Updated dependencies [6794681]
159
- - @pikku/core@0.12.84
160
-
161
- ## 0.12.7
162
-
163
- ### Patch Changes
164
-
165
- - fd9d834: Stop publishing internals that only their own package or file used. The declarations stay; only the entrypoint re-export is removed, so nothing that imported a name from where it is declared is affected.
166
- - Updated dependencies [063f43a]
167
- - Updated dependencies [ce66bf8]
168
- - Updated dependencies [d0307a8]
169
- - Updated dependencies [ce66bf8]
170
- - Updated dependencies [3ad2131]
171
- - Updated dependencies [b930dca]
172
- - Updated dependencies [b95e77d]
173
- - Updated dependencies [fd9d834]
174
- - Updated dependencies [8978fbd]
175
- - @pikku/core@0.12.82
176
-
177
- ## 0.12.6
178
-
179
- ### Patch Changes
180
-
181
- - afef587: Close eleven security weaknesses found in a review of `@pikku/core`. Most are
182
- breaking, and two invalidate data or credentials already in the wild — read the
183
- migration notes before upgrading.
184
-
185
- **Breaking: AI agent thread ownership now fails closed.** Reading, listing,
186
- resuming or approving an existing thread or run requires a resolved session
187
- principal (`userId`, or `orgId` for `sessionScope: 'org'`), regardless of the
188
- agent's `auth` setting. Previously a request without a session had no ownership
189
- model at all: the caller-supplied `resourceId` was accepted as the ownership
190
- key, so any caller could read or resume another party's thread by naming its
191
- `resourceId`. Worse, `threadOwnerConstraint` returned `undefined` for a
192
- sessionless caller, and `undefined` means _no filter_ rather than _no rows_ —
193
- so `getAgentThreads` returned every thread in the deployment. It now returns
194
- `string[]`, empty for a sessionless caller, which every storage backend already
195
- treats as matching nothing. Sessionless agents still run one-shot conversations,
196
- each with a fresh unguessable owner; what they lose is cross-request continuity.
197
- Wire a session to restore it.
198
-
199
- **Breaking: stored secrets and credentials must be re-entered.** `deriveKey` ran
200
- a single unsalted round of SHA-256 over the passphrase and used the digest
201
- directly as the AES-GCM key — roughly one hash per brute-force guess, with one
202
- rainbow table working against every deployment. It is now PBKDF2-HMAC-SHA256 at
203
- 600,000 iterations over a random salt. There is no compatibility path: every
204
- value held by the kysely, mongodb and redis secret services and the kysely
205
- credential service becomes undecryptable. They fail loud, naming the key and
206
- `key_version`, so the app hard-fails on first secret read until each is re-set.
207
-
208
- The KEK salt is scoped to the key version and stored alongside it, rather than
209
- per secret, so a bulk read costs one derivation instead of N — `getSecrets` over
210
- 50 secrets went from ~2.3s to ~48ms, and rotation from ~4.6s to ~94ms. This adds
211
- a salt table (kysely), hash field (redis) or collection (mongodb), created
212
- automatically on first use.
213
-
214
- **Breaking: `PIKKU_REMOTE_SECRET` must be at least 32 characters.** The
215
- remote-RPC session envelope moved from PBKDF2 to HKDF, which expands
216
- high-entropy key material rather than stretching a low-entropy passphrase. That
217
- took a remote hop from ~269ms to ~0.4ms — PBKDF2 was running twice per request —
218
- but HKDF supplies no brute-force resistance, so the secret must carry the
219
- entropy itself. A shorter secret now throws `WeakKeyMaterialError` at both ends.
220
- Generate one with `openssl rand -base64 32` and roll it out to every service in
221
- the mesh together: existing bearer tokens are format-incompatible, so a partial
222
- rollout produces 401s until every instance is updated. The Cloudflare, Lambda
223
- and Azure deployment services each hand-rolled a copy of `buildRemoteHeaders`
224
- and now call the shared one, which is what keeps the two sides in step.
225
-
226
- **Breaking: previously signed content URLs stop verifying.** `LocalContent`
227
- signed only `{signedAt, expiresAt, notBefore}`, so a signature proved when a URL
228
- was issued but never what it was issued for — any valid token was a skeleton
229
- key, and swapping the pathname from a public thumbnail to a private document
230
- still verified. The signature now binds the request path. Separately, the
231
- verifier returned "valid" when no JWT service was wired, which is how
232
- `pikku serve` ran: a forged `?signedAt=0&expiresAt=99999999999999` was accepted.
233
- It now rejects with 403, `LocalContent` requires a `JWTService`, and
234
- `pikku serve`/`pikku dev` mint an ephemeral per-process signing key so local
235
- development works without shipping a fail-open path. In-flight signed URLs must
236
- be re-issued.
237
-
238
- **Request body size limits now apply to every adapter.** The `maxBodySize` cap
239
- existed only in `PikkuFetchHTTPRequest`. The real hole was uWebSockets, which
240
- drove `res.onData` itself and concatenated every chunk with no bound and nothing
241
- downstream able to intervene; it now drops chunks past the limit and replies 413
242
- before routing. Fastify delegates to its native `bodyLimit` (set only when
243
- `maxBodySize` is configured, so fastify's stricter 1 MB default is never
244
- loosened), and `PikkuExpressServer` feeds the limit into its body parsers. Two
245
- paths can only reject rather than prevent, and are documented as such:
246
- `express-middleware` mounted on your own app receives an already-parsed body, so
247
- that deployment must bound its own parser; Next server actions bottom out at
248
- `experimental.serverActions.bodySizeLimit`.
249
-
250
- **Breaking: the console addon's privileged functions are gated by default.**
251
- `wireAddon` gains a `scopes` option that applies to every function in the
252
- addon's namespace, and the console scaffold now generates
253
- `wireAddon({ name: 'console', package: '@pikku/addon-console', scopes: ['admin'] })`.
254
- Previously the console's entire privileged surface — around 54 functions
255
- including `credentialGet`, which returns a resolved OAuth token for an arbitrary
256
- `userId`, `updateFunctionBody`, and `installAddon`, which shells out to a
257
- package install — was protected only by an optional host-registered
258
- `addGlobalPermission`. `resolveGlobalPermissions` returns `[]` when none is
259
- registered and permission checking then no-ops, so an app that never registered
260
- one served those functions to anyone, and with the template's default
261
- `scaffold.rpc: "no-auth"` that meant unauthenticated. All of them now return 403
262
- `MissingScopeError` without an `admin`, `admin:*` or `*` scope. **Regenerating
263
- is required** — an app holding an old `console.gen.ts` stays open.
264
- `installAddon` and `installOpenapiAddon` additionally declare their own
265
- `auth: true, scopes: ['admin']`, and `getAgentThreads` now scopes its listing to
266
- the session's own threads unless the caller holds admin.
267
-
268
- Addon scopes are enforced in `runPikkuFunc` rather than at the RPC boundary,
269
- because a wiring can reference an addon function directly — the inspector
270
- records the addon's `packageName` on HTTP, channel, schedule, queue, CLI,
271
- trigger, gateway and MCP wirings — and those paths never call `resolveNamespace`.
272
- Enforcing at the RPC seam would have covered only the `namespace:function` form
273
- while reading as complete.
274
-
275
- **Breaking: `wireAddon`'s `auth` and `tags` now apply on direct wirings too.**
276
- Both were read only by `resolveAddonFunction`, so they had exactly the hole
277
- scopes had: `wireAddon({ name: 'console', package: '@pikku/addon-console', auth:
278
- true, tags: ['admin'] })` gated `rpc('console:credentialGet')` and gated nothing
279
- at all on an HTTP route wired straight to `credentialGet`. A consumer who
280
- reached for the documented way to lock an addon down got a control that was
281
- silently inert on every wiring except one. Both now resolve in `runPikkuFunc`.
282
- `auth` merges as an OR — `auth: false` from an addon is ignored on a direct
283
- wiring, because an addon may require a session the wiring did not but must never
284
- waive one it did. Addon tags resolve to concrete middleware against the **root**
285
- tag groups before the call rather than being folded into the function's
286
- inherited middleware: `addTagMiddleware('admin', …)` is written by the consuming
287
- app and registers under the root package, whereas `combineMiddleware` would look
288
- the tag up under the addon's own `packageName`, where it does not exist.
289
-
290
- One consequence worth naming: an addon that wires `auth: true` and also runs its
291
- own sessionless internal work — a scheduled task or queue worker inside the
292
- addon calling a sibling function — is now gated where it previously was not,
293
- because a bare `rpc('fn')` from inside the addon reaches `runPikkuFunc` with the
294
- addon's `packageName` like any other call. This reverses a decision that
295
- deliberately scoped the gate to the namespaced boundary; that reasoning held
296
- only while the boundary was real, and a direct wiring can enter an addon without
297
- crossing it, so "already inside" is not something the runtime can infer. Such an
298
- addon should carry authorization on the function via
299
- `pikkuFunc({ permissions })`, which has always been enforced on every path. A
300
- follow-up will add execution provenance so an intra-addon call can be
301
- distinguished from an external one and skip the addon-level check; that needs a
302
- marker no caller outside the process can set, which is its own design problem
303
- and does not belong in a security fix.
304
-
305
- **Codegen now warns when an exposed function has no gate (PKU574).** The
306
- generated `POST /rpc/:rpcName` dispatcher forwards to `rpc.exposed`, which
307
- refuses anything without `expose: true` — but nothing checked whether the
308
- target was gated, because a dispatcher cannot know what it dispatches to. The
309
- console shipped ~54 privileged functions through that gap and the toolchain was
310
- silent. The inspector now reports every function that is exposed, sessionless,
311
- and carries no `auth`, `scopes` or `permissions` of its own and none from a
312
- governing `wireAddon`. It is a `warn`, not a critical: `expose: true` on an
313
- ungated sessionless function is correct for a genuinely public endpoint, so it
314
- blocks a build only under `--fail-on-warn`.
315
-
316
- Two pieces of metadata were missing for this to be answerable statically, and
317
- both are now recorded. A `pikkuSessionlessFunc`'s own `auth: true` was read at
318
- runtime but never written to function meta, so a self-gated function was
319
- indistinguishable from an ungated one — `sessionless` carries the baseline, and
320
- `auth` now carries the tightening. And `wireAddon`'s `scopes`, `auth` and `tags`
321
- were not parsed at all: the inspector recorded the addon's `rpcEndpoint` and its
322
- secret, variable and credential overrides, and dropped every one of its gates.
323
- An addon whose gates are not statically knowable is treated as gated, because a
324
- false positive on a correctly-secured addon costs more than the one case it
325
- would catch.
326
-
327
- **Breaking: an application's global permissions now apply inside addons.**
328
- `resolveGlobalPermissions` read only the bucket matching the function's own
329
- package, but the generated `addGlobalPermission` wrapper takes no package
330
- argument and always registers under the root. An app-wide rule like "every
331
- request needs a signed-in user" therefore stopped at the addon boundary, and the
332
- bucket an addon's functions did read was one no host could write to — which is
333
- why the console addon's recommended `addGlobalPermission([isAdmin],
334
- '@pikku/addon-console')` was never a gate anybody could actually install. A
335
- function now resolves the root bucket and its own package's, root first.
336
- Unioning is safe in a way nothing else here would be: globals AND, so adding the
337
- root ones can only tighten. Package buckets stay one-way — a package's globals
338
- never reach root functions, or an installed addon could gate the whole
339
- application. Apps with both a root global and addon-provided functions will see
340
- those functions gated where they previously were not.
341
-
342
- **Codegen now records whether each HTTP route requires a session, and warns
343
- about inert addon tags (PKU575).** Four separate things can demand a session —
344
- the function's `sessionless`, its own `auth`, the route's (or its group's)
345
- `auth`, and the addon it belongs to — and answering "which routes are open?"
346
- meant joining all four by hand and knowing which wins. Each route's meta now
347
- carries the resolved `requiresSession` alongside the route's own `auth`. Scopes
348
- count as requiring one, since they are matched against the session's and fail
349
- closed. Anything not statically knowable resolves to `true`, matching PKU574:
350
- a route that looks stricter than it is costs less than one that looks open and
351
- isn't. Separately, `wireAddon({ tags: ['admin'] })` reads like a gate and is
352
- applied like one right up until no `addTagMiddleware('admin', …)` exists, at
353
- which point it resolves to an empty list and gates nothing; that now warns.
354
- Only addon tags are reported — a tag on a function is as likely to be
355
- organizational, and warning about those would bury the case that matters.
356
-
357
- **Object-shorthand permissions were missing from meta.** The inspector visited
358
- `ts.PropertyAssignment` but not `ts.ShorthandPropertyAssignment`, so
359
- `permissions: { canAdminOrg }` — enforced identically to the longhand form at
360
- runtime, since `verifyPermissions` has a non-array branch — was recorded as _no
361
- permissions at all_. That is the most dangerous direction for meta to be wrong
362
- in: an audit reading it sees an open door where one is shut. It cost this review
363
- a false IDOR report across ~35 billing and org functions before the source
364
- contradicted the metadata.
365
-
366
- **Functions that authorize in their own body can say so.** A webhook receiver
367
- verifying a signature, or a handler redeeming a signed invite, is genuinely
368
- closed while carrying no session, scope or permission — indistinguishable in
369
- meta from one nobody remembered to gate, and so warned about forever by PKU574.
370
- `selfAuthenticated: true` on the function config records the claim and silences
371
- the warning for that function. It is declarative only: nothing at runtime reads
372
- it and it grants nothing. Detection was rejected deliberately — inferring it
373
- from the body means a function that _looks_ like it checks something silences
374
- the warning while checking nothing, and a warning that is usually wrong stops
375
- being read.
376
-
377
- **Breaking: `scaffold.<feature>` is now `boolean | { auth?, path? }`, and `true`
378
- means authenticated.** The old `'auth' | 'no-auth' | false` read like a
379
- starter-file preference while being a live authorization decision, set three
380
- directories from the functions it governed — the shape the console incident
381
- took. A surface now becomes public only by writing `{ auth: false }`, so
382
- omitting a field can never open anything: the failure mode of a forgotten flag
383
- is a locked door. `{ path }` additionally overrides where the file is
384
- generated, which previously could only be set for all features at once via
385
- `pikkuDir`.
386
-
387
- The legacy strings are **refused, not coerced**. `resolveScaffoldFeature` throws
388
- naming the key and its replacement (`"rpc": "no-auth"` → `"rpc": { "auth":
389
- false }`), and it does so at config load, not downstream. An earlier design used
390
- a bare `string` for the output path, under which `"no-auth"` would have parsed
391
- as a file named `no-auth` and every unmigrated config would have silently
392
- produced nonsense; the object form makes any string invalid, so the failure is
393
- loud.
394
-
395
- The collapse is deliberately not uniform in effect. For `rpc` the flag was a
396
- blanket "no anonymous RPC in this app" set on a dispatcher that cannot know what
397
- it dispatches to; for `userAdmin` it was redundant, since the generated
398
- functions are already `pikkuFunc` with `scopes: ['admin:users:list']`. But for
399
- `agent`, `workflow`, `events` and `scenarios` it is the only gate — those
400
- generate real endpoints the app never authors — so `true` keeps them
401
- authenticated rather than opening them as a side effect of a config cleanup.
402
- `webhook` and `remoteRpc` have no auth dimension at all (`serialize-remote-rpc.ts`
403
- hardcodes `auth: false`), so an `{ auth }` on them is ignored. The three
404
- configs in this repo are migrated preserving their current behaviour exactly.
405
-
406
- **Queue job identities are signed.** A job carried the producer's `pikkuUserId`
407
- as a plain string and the worker resolved a session from it with no
408
- verification, so write access to the queue backend was act-as-any-user. The
409
- identity is now `pq1.<claim>.<hmac>`, HMAC-SHA256 over the claim and the
410
- canonicalized job payload, keyed by HKDF expansion of a new
411
- `PIKKU_QUEUE_IDENTITY_SECRET`. Producers opt in by wrapping their queue service
412
- with `SignedQueueService`. This fails safe rather than closed: with no secret
413
- configured the identity is dropped and jobs still process, warning once per
414
- process, so no existing deployment breaks on upgrade — it simply loses queue
415
- identity until the secret is set. The payload rather than the job id is bound
416
- because SQS, Cloudflare Queues, Azure and the in-memory service all mint ids
417
- after `add` returns.
418
-
419
- **Workflow inline state is read from the run record.** `isInline` consulted a
420
- process-local `Map`, while `WorkflowRun.inline` is durable. Any instance that
421
- did not start a run disagreed with the record, so one instance could dispatch a
422
- queued job for a workflow another was already executing in-process. It is now
423
- async and resolves through the durable identity, cached only when a context
424
- already exists so a passive reader allocates nothing. The same `Map` also leaked:
425
- `nextStepKey` fabricated replay state on every step, and `releaseContext`
426
- refused to free anything carrying it, so runs whose steps executed outside a
427
- `beginReplay` bracket — the step-worker queue path — stranded their context and
428
- step state for the process lifetime. Contexts are now released by an explicit
429
- execution counter. Step ordinals reset per execution rather than accumulating
430
- across step-worker invocations in one process, which makes step naming
431
- independent of how work was distributed.
432
-
433
- **Secret reads fail loud in every store.** `MongoDBSecretService.getSecrets`
434
- skipped rows that failed to decrypt, and the redis equivalent dropped every
435
- rejection via `Promise.allSettled`, including the "No KEK available for
436
- key_version N" configuration error. Both now throw, naming the key and its key
437
- version, matching the kysely behaviour. This matters most alongside the KEK
438
- change above: without it, an upgrade surfaces as a partial secrets map and an
439
- opaque downstream failure instead of an error naming the secret to re-enter.
440
-
441
- **A second middleware registration for a pattern no longer erases the first.**
442
- `addHTTPMiddleware`, `addTagMiddleware` and `addChannelMiddleware` groups are
443
- keyed by pattern or tag and held one source file each, so a second file's call
444
- overwrote the first's. Codegen emits its imports from what is stored, so the
445
- losing file was never imported and its middleware never registered — the
446
- runtime composes repeated registrations for a pattern happily, and only codegen
447
- dropped one. Adding an unrelated `addHTTPMiddleware('*', …)` to an app was
448
- enough to silently unregister the generated better-auth session bridge, which
449
- fails open and gives no sign until a request arrives without a session. A group
450
- now carries every registration made for it, and all of them are imported.
451
-
452
- - Updated dependencies [6a307f0]
453
- - Updated dependencies [afef587]
454
- - Updated dependencies [8075f6a]
455
- - @pikku/core@0.12.74
456
-
457
- ## 0.12.5
458
-
459
- ### Patch Changes
460
-
461
- - daec082: Drop Node 22 support — the minimum supported runtime is now Node 24 (LTS).
462
-
463
- Node 22 deadlocks `pikku dev` at `loadUserBootstrap` (tsx `register()` + `require(esm)` cycle handling on node 22.12+), and Node 20 is already below our floor. The `engines.node` requirement is raised to `>=24` across all packages, matching `.nvmrc` and the CI test matrix. Closes #751.
464
-
465
- - Updated dependencies [7b17b14]
466
- - Updated dependencies [daec082]
467
- - Updated dependencies [e0fd352]
468
- - @pikku/core@0.12.58
469
-
470
- ## 0.12.4
471
-
472
- ### Patch Changes
473
-
474
- - 41ce2cb: Upgrade to TypeScript 6 and raise the minimum Node.js version to 22.
475
-
476
- All packages now build against `typescript@^6.0.3` and declare `engines.node >= 22`. Internal tooling (`ts-json-schema-generator`, `zod-to-ts`) was bumped to TypeScript 6-compatible releases.
477
-
478
- - Updated dependencies [41ce2cb]
479
- - @pikku/core@0.12.44
480
-
481
- ## 0.12.0
482
-
483
- ## 0.12.3
484
-
485
- ### Patch Changes
486
-
487
- - e3142ad: Fix OPTIONS method comparison to use uppercase, matching the Fetch API Request.method convention. Previously the CORS preflight handler was dead code.
488
- - 87433f0: Replace full SQS event logging with message count to prevent sensitive data leaking into CloudWatch logs.
489
- - Updated dependencies [e412b4d]
490
- - Updated dependencies [53dc8c8]
491
- - Updated dependencies [0a1cc51]
492
- - Updated dependencies [0a1cc51]
493
- - Updated dependencies [0a1cc51]
494
- - Updated dependencies [0a1cc51]
495
- - Updated dependencies [0a1cc51]
496
- - Updated dependencies [0a1cc51]
497
- - Updated dependencies [0a1cc51]
498
- - Updated dependencies [0a1cc51]
499
- - Updated dependencies [0a1cc51]
500
- - Updated dependencies [8b9b2e9]
501
- - Updated dependencies [8b9b2e9]
502
- - Updated dependencies [b973d44]
503
- - Updated dependencies [8b9b2e9]
504
- - Updated dependencies [8b9b2e9]
505
- - @pikku/core@0.12.9
506
-
507
- ## 0.12.2
508
-
509
- ### Patch Changes
510
-
511
- - 3e04565: chore: update dependencies to latest minor/patch versions
512
- - Updated dependencies [cc4c9e9]
513
- - Updated dependencies [3e04565]
514
- - @pikku/core@0.12.2
515
-
516
- ## 0.12.1
517
-
518
- ### Patch Changes
519
-
520
- - 62a8725: Update `@types/aws-lambda` peer and dev dependency to `^8.10.161` to resolve a `Duplicate identifier 'HttpResponseStream'` TypeScript error that appeared when bundling alongside other AWS SDK packages.
521
- - Updated dependencies [62a8725]
522
- - Updated dependencies [a3bdb0d]
523
- - Updated dependencies [e0349ff]
524
- - Updated dependencies [62a8725]
525
- - Updated dependencies [e04531f]
526
- - Updated dependencies [62a8725]
527
- - Updated dependencies [a83efb8]
528
- - Updated dependencies [8eed717]
529
- - Updated dependencies [62a8725]
530
- - Updated dependencies [62a8725]
531
- - Updated dependencies [62a8725]
532
- - @pikku/core@0.12.1
533
-
534
- ### New Features
535
-
536
- - `createWireServices` and `createConfig` are now optional
537
-
538
- ## 0.11.0
539
-
540
- ## 0.11.1
541
-
542
- ### Patch Changes
543
-
544
- - 4b811db: chore: updating all dependencies
545
- - ce902b1: chore: updating aws types
546
- - 06e1a31: breaking: change session services to wire services
547
- - Updated dependencies [4b811db]
548
- - Updated dependencies [e12a00c]
549
- - Updated dependencies [4579434]
550
- - Updated dependencies [28aeb7f]
551
- - Updated dependencies [ce902b1]
552
- - Updated dependencies [06e1a31]
553
- - @pikku/core@0.11.1
554
-
555
- ### Minor Changes
556
-
557
- - Workflow support
558
-
559
- ## 0.8.0
560
-
561
- ## 0.10.1
562
-
563
- ### Patch Changes
564
-
565
- - e35722d: Fix request converter to avoid undefined httpMethod
566
-
567
- Store httpMethod in a variable before using it to prevent potential undefined access issues in request body handling.
568
-
569
- - Updated dependencies [ea652dc]
570
- - Updated dependencies [4349ec5]
571
- - Updated dependencies [44d71a8]
572
- - @pikku/core@0.10.2
573
-
574
- ## 0.10.0
575
-
576
- This release includes significant improvements across the framework including tree-shaking support, middleware/permission factories, enhanced CLI functionality, improved TypeScript type safety, and comprehensive test strategies.
577
-
578
- For complete details, see https://pikku.dev/changelogs/0_10_0.md
579
-
580
- ## 0.9.4-next.0
581
-
582
- ### Patch Changes
583
-
584
- - Updated dependencies
585
- - @pikku/core@0.9.12-next.0
586
-
587
- ## 0.9.3
588
-
589
- ### Patch Changes
590
-
591
- - c18800d: feat: adding queue and scheduledTask to interactions
592
- - Updated dependencies [c18800d]
593
- - @pikku/core@0.9.4
594
-
595
- ## 0.9.2
596
-
597
- ### Patch Changes
598
-
599
- - a5905a9: chore: updating all dependencies
600
- - Updated dependencies [1256238]
601
- - Updated dependencies [6cf8efd]
602
- - Updated dependencies [d3a9a09]
603
- - Updated dependencies [840e078]
604
- - Updated dependencies [667d23c]
605
- - Updated dependencies [a5905a9]
606
- - @pikku/core@0.9.2
607
-
608
- ## 0.9.1
609
-
610
- ### Patch Changes
611
-
612
- - fdb1593: core: bumping everything with a patch to sync up the major release inconsistencies in dependencies
613
- - Updated dependencies [fdb1593]
614
- - @pikku/core@0.9.1
615
-
616
- ## 0.9.0
617
-
618
- ### Breaking Changes
619
-
620
- - Normalized all transports to use "wirings" instead of events/routes/transports for consistency across the framework
621
-
622
- ### Major Features
623
-
624
- - **SQS Queue Support**: Added SQS queue worker support
625
-
626
- ## 0.7.0
627
-
628
- - Updating to match remaining packages
629
-
630
- ## 0.6.8
631
-
632
- ### Patch Changes
633
-
634
- - 60b2265: refactor: supporting request and response objects
635
- - Updated dependencies [60b2265]
636
- - @pikku/core@0.6.22
637
-
638
- ## 0.6.7
639
-
640
- ### Patch Changes
641
-
642
- - a234e33: fix: regressions in channels due to user session changes
643
-
644
- ## 0.6.6
645
-
646
- ### Patch Changes
647
-
648
- - ee5c874: feat: moving towards using middleware for http and channels
649
- - Updated dependencies [c1d8381]
650
- - Updated dependencies [ee5c874]
651
- - @pikku/core@0.6.14
652
-
653
- ## 0.6.5
654
-
655
- ### Patch Changes
656
-
657
- - de4a36b: refactor: renaming serverless templates to aws-lambda
658
-
659
- ## 0.6.4
660
-
661
- ### Patch Changes
662
-
663
- - 269a532: fix: fixing some typing issues
664
- - Updated dependencies [7859b28]
665
- - Updated dependencies [269a532]
666
- - @pikku/core@0.6.11
667
-
668
- ## 0.6.3
669
-
670
- ### Patch Changes
671
-
672
- - 0a92fa7: refactor: pulling schema into seperate package since ajv doesnt work on cloudflare (also keeps bundle size small!)
673
- - Updated dependencies [0a92fa7]
674
- - @pikku/core@0.6.7
675
-
676
- ## 0.6.2
677
-
678
- ### Patch Changes
679
-
680
- - 09fc52c: feat: adding cloudflare and lambda websockets
681
- breaking change: moved subscription from channel to services and renamed to event hub
682
- - adecb52: feat: changes required to get cloudflare functions to work
683
- - Updated dependencies [09fc52c]
684
- - Updated dependencies [adecb52]
685
- - @pikku/core@0.6.3
686
-
687
- ### Patch Changes
688
-
689
- - ed45ca9: feat: adding lambda serverless
690
- - adeb392: feat: more channel improvements, and adding bubble option to runners to avoid all the empty try catches
691
- - Updated dependencies [ed45ca9]
692
- - Updated dependencies [adeb392]
693
- - @pikku/core@0.6.2
694
-
695
- ## 0.0.2 - 28.07.2021
696
-
697
- Using peer dependencies to avoid version mismatches, which in turn affects lambda and singletons
698
-
699
- ## 0.0.1 - 27.07.2021
700
-
701
- Chore: Bumping deps
702
-
703
- ## 23.07.2021
704
-
705
- ### Initial Release
706
-
707
- A package that allows users to call Pikku functions from lambda
package/run-tests.sh DELETED
@@ -1,68 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Enable nullglob to handle cases where no files match the pattern
4
- shopt -s nullglob
5
-
6
- # Initialize variables for options
7
- watch_mode=false
8
- coverage_mode=false
9
-
10
- # Parse command-line options
11
- while [[ $# -gt 0 ]]; do
12
- case $1 in
13
- --watch)
14
- watch_mode=true
15
- shift
16
- ;;
17
- --coverage)
18
- coverage_mode=true
19
- shift
20
- ;;
21
- *)
22
- echo "Unknown option: $1"
23
- exit 1
24
- ;;
25
- esac
26
- done
27
-
28
- # Define the pattern to match your test files
29
- pattern="src/*.test.ts"
30
-
31
- # Expand the pattern into an array of files
32
- files=($(find src -type f -name "*.test.ts"))
33
-
34
- # Check if any files matched the pattern
35
- if [ ${#files[@]} -eq 0 ]; then
36
- echo "No test files found matching pattern: $pattern"
37
- if [ "${STRICT_TEST_DISCOVERY}" = "1" ]; then
38
- exit 1
39
- fi
40
- exit 0
41
- fi
42
-
43
- # Construct the bun command
44
- #
45
- # --parallel gives every test file its own worker process, which is what node's
46
- # `--test` did. Several suites keep module-level caches (a TypeScript program, a
47
- # temp fixture directory) that a shared process would leak between files.
48
- #
49
- # --timeout because bun caps a test at 5s by default where node had no cap, and
50
- # the suites that build real TypeScript programs run well past that.
51
- bun_cmd=(bun test --parallel --timeout 120000)
52
-
53
- # Append options based on flags
54
- if [ "$watch_mode" = true ]; then
55
- # --watch reruns in one process; parallel workers have nothing to watch.
56
- bun_cmd=(bun test --watch --timeout 120000)
57
- fi
58
-
59
- if [ "$coverage_mode" = true ]; then
60
- # --coverage-dir=. keeps lcov.info at the package root: CI merges every
61
- # package's report by prefixing its SF paths with the file's own directory,
62
- # so a nested coverage/ directory would re-root them one level too deep.
63
- bun_cmd+=(--coverage --coverage-reporter=lcov --coverage-reporter=text --coverage-dir=.)
64
- export PIKKU_TEST_COVERAGE=1
65
- fi
66
-
67
- # Execute the bun command with the expanded list of files
68
- "${bun_cmd[@]}" "${files[@]}"