@pikku/bun-server 0.12.14 → 0.12.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bun-event-hub-service.d.ts +4 -2
- package/dist/bun-event-hub-service.js +28 -11
- package/dist/bun-event-hub-service.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/pikku-bun-server.js +1 -1
- package/dist/pikku-bun-server.js.map +1 -1
- package/package.json +13 -8
- package/CHANGELOG.md +0 -397
- package/run-tests.sh +0 -68
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import type { ServerWebSocket, Server } from 'bun';
|
|
2
2
|
type AnyServer = Server<unknown>;
|
|
3
|
-
import type { EventHubService } from '@pikku/core/channel';
|
|
3
|
+
import type { EventHubService, PikkuChannelHandler } from '@pikku/core/channel';
|
|
4
4
|
export declare class BunEventHubService<Mappings extends Record<string, unknown> = {}> implements EventHubService<Mappings> {
|
|
5
5
|
private sockets;
|
|
6
6
|
private server;
|
|
7
|
+
private readonly local;
|
|
7
8
|
setServer(server: AnyServer): void;
|
|
9
|
+
registerSocket(channelId: string, ws: ServerWebSocket<unknown>): void;
|
|
8
10
|
subscribe<T extends keyof Mappings>(topic: T, channelId: string): Promise<void>;
|
|
9
11
|
unsubscribe<T extends keyof Mappings>(topic: T, channelId: string): Promise<void>;
|
|
10
12
|
publish<T extends keyof Mappings>(topic: T, channelId: string | null, message: Mappings[T], isBinary?: boolean): Promise<void>;
|
|
11
|
-
onChannelOpened(
|
|
13
|
+
onChannelOpened(channelHandler: PikkuChannelHandler): Promise<void>;
|
|
12
14
|
onChannelClosed(channelId: string): Promise<void>;
|
|
13
15
|
}
|
|
14
16
|
export {};
|
|
@@ -1,30 +1,47 @@
|
|
|
1
|
+
import { LocalEventHubService } from '@pikku/core/channel/local';
|
|
1
2
|
export class BunEventHubService {
|
|
2
3
|
sockets = new Map();
|
|
3
4
|
server = null;
|
|
5
|
+
local = new LocalEventHubService();
|
|
4
6
|
setServer(server) {
|
|
5
7
|
this.server = server;
|
|
6
8
|
}
|
|
9
|
+
registerSocket(channelId, ws) {
|
|
10
|
+
this.sockets.set(channelId, ws);
|
|
11
|
+
}
|
|
7
12
|
async subscribe(topic, channelId) {
|
|
8
|
-
this.sockets.get(channelId)
|
|
13
|
+
const socket = this.sockets.get(channelId);
|
|
14
|
+
if (socket) {
|
|
15
|
+
socket.subscribe(topic);
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
await this.local.subscribe(topic, channelId);
|
|
9
19
|
}
|
|
10
20
|
async unsubscribe(topic, channelId) {
|
|
11
|
-
this.sockets.get(channelId)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
if (!this.server)
|
|
21
|
+
const socket = this.sockets.get(channelId);
|
|
22
|
+
if (socket) {
|
|
23
|
+
socket.unsubscribe(topic);
|
|
15
24
|
return;
|
|
16
|
-
if (isBinary) {
|
|
17
|
-
this.server.publish(topic, message, true);
|
|
18
25
|
}
|
|
19
|
-
|
|
20
|
-
|
|
26
|
+
await this.local.unsubscribe(topic, channelId);
|
|
27
|
+
}
|
|
28
|
+
async publish(topic, channelId, message, isBinary) {
|
|
29
|
+
if (this.server) {
|
|
30
|
+
if (isBinary) {
|
|
31
|
+
this.server.publish(topic, message, true);
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
this.server.publish(topic, JSON.stringify(message), false);
|
|
35
|
+
}
|
|
21
36
|
}
|
|
37
|
+
await this.local.publish(topic, channelId, message, isBinary);
|
|
22
38
|
}
|
|
23
|
-
async onChannelOpened(
|
|
24
|
-
this.
|
|
39
|
+
async onChannelOpened(channelHandler) {
|
|
40
|
+
this.local.onChannelOpened(channelHandler);
|
|
25
41
|
}
|
|
26
42
|
async onChannelClosed(channelId) {
|
|
27
43
|
this.sockets.delete(channelId);
|
|
44
|
+
this.local.onChannelClosed(channelId);
|
|
28
45
|
}
|
|
29
46
|
}
|
|
30
47
|
//# sourceMappingURL=bun-event-hub-service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bun-event-hub-service.js","
|
|
1
|
+
{"version":3,"file":"bun-event-hub-service.js","sources":["../src/bun-event-hub-service.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAEhE,MAAM,OAAO,kBAAkB;IAGrB,OAAO,GAA0C,IAAI,GAAG,EAAE,CAAA;IAC1D,MAAM,GAAqB,IAAI,CAAA;IACtB,KAAK,GAAG,IAAI,oBAAoB,EAAY,CAAA;IAEtD,SAAS,CAAC,MAAiB;QAChC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAEM,cAAc,CAAC,SAAiB,EAAE,EAA4B;QACnE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,EAAE,CAAC,CAAA;IACjC,CAAC;IAEM,KAAK,CAAC,SAAS,CACpB,KAAQ,EACR,SAAiB;QAEjB,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;QAC1C,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,CAAC,SAAS,CAAC,KAAe,CAAC,CAAA;YACjC,OAAM;QACR,CAAC;QACD,MAAM,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,CAAA;IAC9C,CAAC;IAEM,KAAK,CAAC,WAAW,CACtB,KAAQ,EACR,SAAiB;QAEjB,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;QAC1C,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,CAAC,WAAW,CAAC,KAAe,CAAC,CAAA;YACnC,OAAM;QACR,CAAC;QACD,MAAM,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,EAAE,SAAS,CAAC,CAAA;IAChD,CAAC;IAEM,KAAK,CAAC,OAAO,CAClB,KAAQ,EACR,SAAwB,EACxB,OAAoB,EACpB,QAAkB;QAElB,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,IAAI,QAAQ,EAAE,CAAC;gBACb,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAe,EAAE,OAAc,EAAE,IAAI,CAAC,CAAA;YAC5D,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAe,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,CAAA;YACtE,CAAC;QACH,CAAC;QACD,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAA;IAC/D,CAAC;IAEM,KAAK,CAAC,eAAe,CAC1B,cAAmC;QAEnC,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,cAAc,CAAC,CAAA;IAC5C,CAAC;IAEM,KAAK,CAAC,eAAe,CAAC,SAAiB;QAC5C,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;QAC9B,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,SAAS,CAAC,CAAA;IACvC,CAAC;CACF"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA"}
|
package/dist/pikku-bun-server.js
CHANGED
|
@@ -189,7 +189,7 @@ export class PikkuBunServer {
|
|
|
189
189
|
ws.close();
|
|
190
190
|
});
|
|
191
191
|
Promise.all([
|
|
192
|
-
eventHub.
|
|
192
|
+
eventHub.registerSocket(channelHandler.channelId, ws),
|
|
193
193
|
channelHandler.open(),
|
|
194
194
|
]).catch((error) => {
|
|
195
195
|
logger.error(`Error opening websocket channel: ${error}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pikku-bun-server.js","sourceRoot":"","sources":["../src/pikku-bun-server.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE9C,OAAO,EACL,gCAAgC,GAEjC,MAAM,oDAAoD,CAAA;AAC3D,OAAO,EACL,SAAS,EACT,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,SAAS,IAAI,iBAAiB,GAE/B,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAEjD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAEtD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAoF/D,MAAM,cAAc,GAAG,CAAC,IAAa,EAAW,EAAE,CAChD,CAAC,CACC,OAAO,IAAI,KAAK,QAAQ;IACxB,IAAI,YAAY,WAAW;IAC3B,IAAI,YAAY,UAAU;IAC1B,IAAI,YAAY,SAAS;IACzB,IAAI,YAAY,WAAW;IAC3B,IAAI,YAAY,UAAU;IAC1B,IAAI,YAAY,WAAW;IAC3B,IAAI,YAAY,UAAU;IAC1B,IAAI,YAAY,YAAY;IAC5B,IAAI,YAAY,YAAY,CAC7B,CAAA;AAkBH,MAAM,OAAO,cAAc;IAkBN,MAAM;IACN,MAAM;IAlBjB,MAAM,GAA6B,IAAI,CAAA;IAC9B,QAAQ,CAAoB;IAC5B,OAAO,CAAsB;IAC7B,OAAO,CAAmC;IAC1C,OAAO,CAAQ;IACf,WAAW,CAAsC;IACjD,OA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name": "@pikku/bun-server",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.16",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/pikkujs/pikku.git",
|
|
@@ -11,18 +11,23 @@
|
|
|
11
11
|
"author": "yasser.fadl@gmail.com",
|
|
12
12
|
"module": "dist/index.js",
|
|
13
13
|
"main": "dist/index.js",
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"!dist/**/*.tsbuildinfo"
|
|
17
|
+
],
|
|
14
18
|
"type": "module",
|
|
15
19
|
"scripts": {
|
|
16
20
|
"tsc": "tsc",
|
|
17
|
-
"build": "tsc -b",
|
|
21
|
+
"build": "bun run clean && tsc -b",
|
|
18
22
|
"test": "bash run-tests.sh",
|
|
19
23
|
"test:watch": "bash run-tests.sh --watch",
|
|
20
24
|
"test:coverage": "bash run-tests.sh --coverage",
|
|
21
|
-
"prepublishOnly": "bun run build"
|
|
25
|
+
"prepublishOnly": "bun run build",
|
|
26
|
+
"clean": "rm -rf dist tsconfig.tsbuildinfo"
|
|
22
27
|
},
|
|
23
28
|
"peerDependencies": {
|
|
24
|
-
"@pikku/core": "^0.12.
|
|
25
|
-
"@pikku/modelcontextprotocol": "^0.12.
|
|
29
|
+
"@pikku/core": "^0.12.155",
|
|
30
|
+
"@pikku/modelcontextprotocol": "^0.12.18"
|
|
26
31
|
},
|
|
27
32
|
"peerDependenciesMeta": {
|
|
28
33
|
"@pikku/modelcontextprotocol": {
|
|
@@ -30,9 +35,9 @@
|
|
|
30
35
|
}
|
|
31
36
|
},
|
|
32
37
|
"devDependencies": {
|
|
33
|
-
"@pikku/core": "^0.12.
|
|
34
|
-
"@pikku/modelcontextprotocol": "^0.12.
|
|
35
|
-
"@types/bun": "^1.4.
|
|
38
|
+
"@pikku/core": "^0.12.155",
|
|
39
|
+
"@pikku/modelcontextprotocol": "^0.12.18",
|
|
40
|
+
"@types/bun": "^1.4.3"
|
|
36
41
|
},
|
|
37
42
|
"engines": {
|
|
38
43
|
"bun": ">=1.4.0"
|
package/CHANGELOG.md
DELETED
|
@@ -1,397 +0,0 @@
|
|
|
1
|
-
# @pikku/bun-server
|
|
2
|
-
|
|
3
|
-
## 0.12.14
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- d3d8a98: Graceful shutdown ignores repeat signals. A second SIGTERM or SIGINT arriving while `beforeStop` and the service teardown are still running no longer falls through to the default handler and kills the process mid-cleanup. `@pikku/core/lifecycle` is a new entry point holding `onShutdownSignals`, `stopSingletonServices` and `pikkuServerLifecycle` (the latter two stay re-exported from `utils`), which the server runtimes now share.
|
|
8
|
-
- Updated dependencies [b04e444]
|
|
9
|
-
- Updated dependencies [d3d8a98]
|
|
10
|
-
- Updated dependencies [658da50]
|
|
11
|
-
- @pikku/core@0.12.141
|
|
12
|
-
|
|
13
|
-
## 0.12.13
|
|
14
|
-
|
|
15
|
-
### Patch Changes
|
|
16
|
-
|
|
17
|
-
- b312867: A project can now serve several MCP endpoints, one per connector.
|
|
18
|
-
|
|
19
|
-
Until now every MCP tool in a project was pooled onto a single `/mcp`, so a hub offering three connectors offered one endpoint listing all three connectors' tools at once. A client pointed at it saw tools it had no business calling, and the only way to give a connector an endpoint of its own was to give it a deployment of its own — three deploys, three bills, three service graphs.
|
|
20
|
-
|
|
21
|
-
`wireAddon` gains `mcpEndpoint`. `true` serves that instance's tools at `/mcp/<name>`; a string is the path, used as given. Leaving it unset keeps the tools on the shared endpoint, which is where they have always been, so nothing existing moves.
|
|
22
|
-
|
|
23
|
-
A surfaced instance now gets its own manifest (`.pikku/mcp/mcp.<name>.gen.json`, carrying the path it answers on), its own deploy unit (`mcp-<name>`, routed on that path), and its own MCP server — with its own tool list, so a client pointed at one endpoint never sees another's tools. The plumbing for the per-surface manifest and unit already existed in `deploy apply`; nothing had ever produced one.
|
|
24
|
-
|
|
25
|
-
`pikku dev` mounts every endpoint the generated tree describes, not just the default one. Without that a project that moved its tools onto their own endpoints would have served nothing locally at all — the default manifest it reads is empty precisely because they moved — and the only way to try a connector would have been to deploy it.
|
|
26
|
-
|
|
27
|
-
The node and bun transports take `mcpSurfaces` alongside `mcpJson` and mount each at its own path, longest path first. `/mcp` claims everything beneath `/mcp/`, so without that ordering the default endpoint answers `/mcp/weather` and the surface's tools are unreachable.
|
|
28
|
-
|
|
29
|
-
OAuth discovery is split between the endpoints rather than duplicated across them. RFC 9728 folds a resource's path into its well-known route, so each endpoint's own document is already distinct, but the path-less `/.well-known/oauth-protected-resource` predates that and describes whichever resource answers it. Only the default endpoint claims it — otherwise every unit registers the same route and the provider's router decides which resource a client is told about, and in dev a client probing it is described whichever surface sorted first.
|
|
30
|
-
|
|
31
|
-
- Updated dependencies [87971bd]
|
|
32
|
-
- Updated dependencies [51bd35a]
|
|
33
|
-
- Updated dependencies [b312867]
|
|
34
|
-
- Updated dependencies [51bd35a]
|
|
35
|
-
- @pikku/core@0.12.116
|
|
36
|
-
- @pikku/modelcontextprotocol@0.12.14
|
|
37
|
-
|
|
38
|
-
## 0.12.12
|
|
39
|
-
|
|
40
|
-
### Patch Changes
|
|
41
|
-
|
|
42
|
-
- dfd7019: An MCP call that needs a session is refused with an OAuth challenge
|
|
43
|
-
|
|
44
|
-
A tool fronting a session-requiring function used to answer an unauthenticated
|
|
45
|
-
caller with `200` and `isError: true`, which a client reads as a tool that
|
|
46
|
-
broke rather than one it has not authenticated for — so OAuth discovery never
|
|
47
|
-
began. Such a call now gets `401` with a `WWW-Authenticate: Bearer` challenge
|
|
48
|
-
naming the resource metadata, and `/.well-known/oauth-protected-resource` is
|
|
49
|
-
served alongside the MCP endpoint.
|
|
50
|
-
|
|
51
|
-
The endpoint is not gated as a whole. `mcpTargetRequiresSession` reads the
|
|
52
|
-
declarations the runner already enforces — a `pikkuFunc` needs a session, a
|
|
53
|
-
`pikkuSessionlessFunc` needs one only where it says `auth: true` — so public
|
|
54
|
-
and private tools can share one server and only the private ones are
|
|
55
|
-
challenged.
|
|
56
|
-
|
|
57
|
-
`createFetchHandler` and `createHTTPRequestHandler` take an optional `auth`
|
|
58
|
-
describing what to advertise (`authorizationServers`, `scopesSupported`,
|
|
59
|
-
`resourceName`), surfaced on both servers as an `mcpAuth` option. Every field
|
|
60
|
-
defaults from the request, because a pikku app is usually its own
|
|
61
|
-
authorization server. Both handlers now also return `ownsPath`, because the
|
|
62
|
-
discovery document lives outside `mcpPath` and a host routing on the endpoint
|
|
63
|
-
alone would 404 the document its own challenge points at.
|
|
64
|
-
|
|
65
|
-
- Updated dependencies [c842054]
|
|
66
|
-
- Updated dependencies [dfd7019]
|
|
67
|
-
- Updated dependencies [dfd7019]
|
|
68
|
-
- Updated dependencies [dfd7019]
|
|
69
|
-
- Updated dependencies [dfd7019]
|
|
70
|
-
- Updated dependencies [9b978e7]
|
|
71
|
-
- Updated dependencies [1469e73]
|
|
72
|
-
- @pikku/core@0.12.113
|
|
73
|
-
- @pikku/modelcontextprotocol@0.12.12
|
|
74
|
-
|
|
75
|
-
## 0.12.11
|
|
76
|
-
|
|
77
|
-
### Patch Changes
|
|
78
|
-
|
|
79
|
-
- 3d75643: Run the app's server lifecycle in generated entries, and make an out-of-band
|
|
80
|
-
account signable-in.
|
|
81
|
-
|
|
82
|
-
`pikkuServerLifecycle` was only ever called by `pikku dev` and `pikku serve`, so
|
|
83
|
-
an app that seeds its first admin account, probes a dependency, or warms a cache
|
|
84
|
-
in `beforeStart` did all of that in development and silently skipped it
|
|
85
|
-
everywhere it was actually deployed. The standalone entry and the shared node
|
|
86
|
-
server entry — the one behind every `target: 'server'` unit — now import the
|
|
87
|
-
app's lifecycle and call it: `beforeStart` after `init` and before the port
|
|
88
|
-
opens, so work that must finish before the first request has, `afterStart` once
|
|
89
|
-
the server is listening, and the stop hooks handed to the signal handler that
|
|
90
|
-
already owns shutdown rather than a second listener racing it. Each shutdown
|
|
91
|
-
step is isolated from the ones after it, so a hook that throws is logged without
|
|
92
|
-
taking the service teardown and the socket close down with it.
|
|
93
|
-
|
|
94
|
-
Separately, `createAuthUser` and `setAuthUserPassword` wrote credential accounts
|
|
95
|
-
with no `issuer`. From better-auth 1.7 a credential account is matched by its
|
|
96
|
-
issuer as well as its provider, so those accounts were invisible to sign-in,
|
|
97
|
-
`updatePassword` and `findCredentialAccount` — a user who plainly existed in the
|
|
98
|
-
table was reported as "user not found". The field is written only when the
|
|
99
|
-
resolved schema has it, so older better-auth keeps working, and
|
|
100
|
-
`setAuthUserPassword` repairs an account that predates the fix.
|
|
101
|
-
|
|
102
|
-
## 0.12.10
|
|
103
|
-
|
|
104
|
-
### Patch Changes
|
|
105
|
-
|
|
106
|
-
- 80eb5c0: Generate a desktop shell from `pikku deploy apply --desktop`
|
|
107
|
-
|
|
108
|
-
`pikku deploy apply --provider standalone --runtime bun --desktop` now emits a
|
|
109
|
-
`src-tauri/` crate that ships the compiled binary as a sidecar and opens a
|
|
110
|
-
window on the server's own HTTP origin, so cookies, CORS and OAuth behave
|
|
111
|
-
exactly as they do in a browser. Regeneration is idempotent and leaves an
|
|
112
|
-
edited file alone rather than overwriting it.
|
|
113
|
-
|
|
114
|
-
`--desktop-url https://app.example.com` builds the other shape: a shell that
|
|
115
|
-
points at an already-deployed server. Nothing is bundled — no sidecar, no
|
|
116
|
-
binary, and so no bun runtime to compile one — and the window is declared in
|
|
117
|
-
`tauri.conf.json` rather than opened from Rust, because the origin is known up
|
|
118
|
-
front. The url can also live in `pikku.config.json` as `deploy.desktop.url`,
|
|
119
|
-
alongside `deploy.desktop.identifier`.
|
|
120
|
-
|
|
121
|
-
Supporting changes: `SERVER_READY_MARKER` moved to `@pikku/deploy` (the CLI
|
|
122
|
-
re-exports it from its old path), both HTTP runtimes expose the port they
|
|
123
|
-
actually bound so `--port 0` reports a real port, and the generated server
|
|
124
|
-
entry exits when its parent process goes away.
|
|
125
|
-
|
|
126
|
-
- 80eb5c0: feat: serve a built frontend from the pikku server's own origin
|
|
127
|
-
|
|
128
|
-
A new `frontend` key in `pikku.config.json` names a directory of built
|
|
129
|
-
frontend output. `pikku serve` mounts it, and `pikku deploy` ships it inside
|
|
130
|
-
the distributable — into a directory beside the bundle for the node runtime,
|
|
131
|
-
and embedded in the binary for a `bun build --compile` standalone. `pikku dev`
|
|
132
|
-
deliberately ignores it and says so, because the frontend's own dev server owns
|
|
133
|
-
that job.
|
|
134
|
-
|
|
135
|
-
Pikku reads the frontend's output and never builds it, so an unbuilt directory
|
|
136
|
-
fails with a message that says which build to run rather than booting a server
|
|
137
|
-
that answers every page with a 404.
|
|
138
|
-
|
|
139
|
-
- Updated dependencies [80eb5c0]
|
|
140
|
-
- Updated dependencies [2252016]
|
|
141
|
-
- @pikku/core@0.12.98
|
|
142
|
-
|
|
143
|
-
## 0.12.9
|
|
144
|
-
|
|
145
|
-
### Patch Changes
|
|
146
|
-
|
|
147
|
-
- 6ff72d3: Raise the supported Bun version to 1.4.
|
|
148
|
-
|
|
149
|
-
`@pikku/bun-server` and `@pikku/kysely-bun-sqlite` now declare `engines.bun: >=1.4.0`
|
|
150
|
-
and build against `@types/bun@^1.4.0`. `create-pikku` scaffolds
|
|
151
|
-
`"packageManager": "bun@1.4.0"`, and the fabric `smoke`/`validate` commands default to
|
|
152
|
-
and recommend the same version. CI pins `oven-sh/setup-bun` to 1.4.0 instead of
|
|
153
|
-
tracking `latest`.
|
|
154
|
-
|
|
155
|
-
## 0.12.8
|
|
156
|
-
|
|
157
|
-
### Patch Changes
|
|
158
|
-
|
|
159
|
-
- 266e3bc: One door per name: `@pikku/core/ecosystem/*` and the package root are gone
|
|
160
|
-
|
|
161
|
-
`@pikku/core` published every module twice. `ecosystem/http` re-exported
|
|
162
|
-
`./http`, `ecosystem/services` re-exported `./services`, and a name was
|
|
163
|
-
reachable through either — so every addition had to be made in two places, and a
|
|
164
|
-
consumer's import said nothing about what it actually used. The package root was
|
|
165
|
-
the same problem at a larger scale: a single barrel of 206 names that no bundler
|
|
166
|
-
could take apart, and the one specifier that revealed nothing at all.
|
|
167
|
-
|
|
168
|
-
Both are deleted. Every name now lives on the subpath that owns it, and every
|
|
169
|
-
import carries that subpath — `@pikku/core/http`, `@pikku/core/services`,
|
|
170
|
-
`@pikku/core/errors`, `@pikku/core/types`.
|
|
171
|
-
|
|
172
|
-
Deleting the facades meant the raw subpaths had to become a superset of them,
|
|
173
|
-
which they were not: the facade tree had accumulated 25 names with no raw home
|
|
174
|
-
and about 26 more filed under a different area than the module they came from.
|
|
175
|
-
Those names moved to the area that owns them, and three areas were published as
|
|
176
|
-
new entry points rather than left on a root that is going away — `./types` (the
|
|
177
|
-
shared type surface, the largest single destination), `./state` and
|
|
178
|
-
`./classification`.
|
|
179
|
-
|
|
180
|
-
`./classification` is one door onto one subject: what a value is and how it must
|
|
181
|
-
be handled. Its three halves would each have been an entry point — the brands
|
|
182
|
-
and manifest types, the stored-form helpers (`hashToken`, `unsafeAsSealed` and
|
|
183
|
-
friends), and `SecretValue` — split by whether a name happens to be a type or a
|
|
184
|
-
value, which is the same defect as the facades. The duration and versioned-id
|
|
185
|
-
helpers went to `./utils`, which already published, and `PikkuRequest` went to
|
|
186
|
-
`./function`: it is the transport-agnostic request base, not an HTTP one — HTTP
|
|
187
|
-
has `PikkuHTTPAbstractRequest`, and the only thing outside core that extends
|
|
188
|
-
`PikkuRequest` is Azure's timer request.
|
|
189
|
-
|
|
190
|
-
`./types` inherited the root barrel's habit before it inherited its contents, so
|
|
191
|
-
the names with an owner elsewhere were moved off it. The middleware types and the
|
|
192
|
-
five middleware factories — `pikkuMiddleware`, `pikkuMiddlewareFactory`,
|
|
193
|
-
`pikkuChannelMiddleware`, `pikkuChannelMiddlewareFactory` and
|
|
194
|
-
`pikkuAgentMiddleware`, runtime values on a types entry point — are now
|
|
195
|
-
`@pikku/core/middleware`; the function meta types are `@pikku/core/function`;
|
|
196
|
-
`SerializedError` is `@pikku/core/errors`; and the generic TypeScript helpers
|
|
197
|
-
(`MakeRequired`, `PickRequired`, `PickOptional`, `RequireAtLeastOne`,
|
|
198
|
-
`JSONPrimitive`, `JSONValue`) are `@pikku/core/utils`. What is left on `./types`
|
|
199
|
-
is the vocabulary the wirings share, which no single module owns.
|
|
200
|
-
|
|
201
|
-
`pikku` was itself a root barrel — `export * from '@pikku/core'` — and
|
|
202
|
-
now exports only the services it bundles.
|
|
203
|
-
|
|
204
|
-
One module survives at the old specifier, and only for the bootstrap:
|
|
205
|
-
`packages/cli` is generated by the _published_ CLI pinned in its `build.sh`, and
|
|
206
|
-
that CLI still writes a bare `@pikku/core` into the files it generates for the
|
|
207
|
-
CLI itself. `bootstrap-compat/root.ts` carries the eight types it names, a test
|
|
208
|
-
in core fails if that list grows, and it goes when the pin moves to a CLI
|
|
209
|
-
released from this branch. The adapter names the pinned CLI reaches for —
|
|
210
|
-
`pikkuState` and `CreateWireServices` — are rewritten to `@pikku/core/state` and
|
|
211
|
-
`@pikku/core/types` by the same `build.sh` patch pass, so no second shim is
|
|
212
|
-
needed for them.
|
|
213
|
-
|
|
214
|
-
A guard test keeps the root shut: it parses imports and rejects a bare
|
|
215
|
-
`@pikku/core` rather than grepping for it, because several tests hold a user's
|
|
216
|
-
file as a template literal, where `import … from '@pikku/core'` is fixture text
|
|
217
|
-
rather than an import this repo makes.
|
|
218
|
-
|
|
219
|
-
An agent scaffold a project generated under an older CLI is refreshed rather
|
|
220
|
-
than left to fail: `pikku all` already deleted one importing an entry point
|
|
221
|
-
`@pikku/core` no longer publishes, and the `#pikku` hub joins that list.
|
|
222
|
-
Without it a project that scaffolds the agent endpoint but
|
|
223
|
-
declares no agents keeps the old file forever — the generator that would rewrite
|
|
224
|
-
it only runs when agents exist, and the file being present is what stops it
|
|
225
|
-
being regenerated as missing.
|
|
226
|
-
|
|
227
|
-
`pikku new addon` also wrote a tsconfig `paths` map naming only the deleted hub.
|
|
228
|
-
An addon's `imports` map points into `dist`, so `paths` is what resolves
|
|
229
|
-
`#pikku/<leaf>` for the addon's own source build — it now names the two leaf
|
|
230
|
-
patterns, in both the addon and its test harness.
|
|
231
|
-
|
|
232
|
-
- Updated dependencies [7722ceb]
|
|
233
|
-
- Updated dependencies [375c1ff]
|
|
234
|
-
- Updated dependencies [02a70cd]
|
|
235
|
-
- Updated dependencies [aeef159]
|
|
236
|
-
- Updated dependencies [a281de6]
|
|
237
|
-
- Updated dependencies [266e3bc]
|
|
238
|
-
- Updated dependencies [02a70cd]
|
|
239
|
-
- Updated dependencies [786dae5]
|
|
240
|
-
- Updated dependencies [6eef0a0]
|
|
241
|
-
- Updated dependencies [3561d67]
|
|
242
|
-
- Updated dependencies [a91c433]
|
|
243
|
-
- Updated dependencies [02a70cd]
|
|
244
|
-
- Updated dependencies [9537f74]
|
|
245
|
-
- Updated dependencies [2b57ca8]
|
|
246
|
-
- Updated dependencies [266e3bc]
|
|
247
|
-
- Updated dependencies [9fce0f1]
|
|
248
|
-
- Updated dependencies [83683a0]
|
|
249
|
-
- Updated dependencies [456c88b]
|
|
250
|
-
- Updated dependencies [456c88b]
|
|
251
|
-
- Updated dependencies [c127273]
|
|
252
|
-
- @pikku/core@0.12.85
|
|
253
|
-
- @pikku/modelcontextprotocol@0.12.10
|
|
254
|
-
|
|
255
|
-
## 0.12.7
|
|
256
|
-
|
|
257
|
-
### Patch Changes
|
|
258
|
-
|
|
259
|
-
- 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.
|
|
260
|
-
|
|
261
|
-
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.
|
|
262
|
-
|
|
263
|
-
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.
|
|
264
|
-
|
|
265
|
-
- Updated dependencies [7406bfe]
|
|
266
|
-
- Updated dependencies [6794681]
|
|
267
|
-
- @pikku/core@0.12.84
|
|
268
|
-
- @pikku/modelcontextprotocol@0.12.9
|
|
269
|
-
|
|
270
|
-
## 0.12.6
|
|
271
|
-
|
|
272
|
-
### Patch Changes
|
|
273
|
-
|
|
274
|
-
- 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.
|
|
275
|
-
- Updated dependencies [063f43a]
|
|
276
|
-
- Updated dependencies [ce66bf8]
|
|
277
|
-
- Updated dependencies [d0307a8]
|
|
278
|
-
- Updated dependencies [ce66bf8]
|
|
279
|
-
- Updated dependencies [ce66bf8]
|
|
280
|
-
- Updated dependencies [3ad2131]
|
|
281
|
-
- Updated dependencies [b930dca]
|
|
282
|
-
- Updated dependencies [b95e77d]
|
|
283
|
-
- Updated dependencies [fd9d834]
|
|
284
|
-
- Updated dependencies [8978fbd]
|
|
285
|
-
- @pikku/core@0.12.82
|
|
286
|
-
- @pikku/modelcontextprotocol@0.12.8
|
|
287
|
-
|
|
288
|
-
## 0.12.5
|
|
289
|
-
|
|
290
|
-
### Patch Changes
|
|
291
|
-
|
|
292
|
-
- ea8aabf: Serve `LocalContent` uploads and signed reads under Bun.
|
|
293
|
-
|
|
294
|
-
`LocalContent` hands the browser a `PUT <uploadUrlPrefix>/<key>` upload URL and a signed
|
|
295
|
-
`GET <assetUrlPrefix>/<key>` read URL, but it is a `ContentService` and cannot answer
|
|
296
|
-
either — something in the serving path has to. Only `@pikku/node-http-server` did. The
|
|
297
|
-
same project served under Bun handed out upload URLs that 404ed, with nothing naming the
|
|
298
|
-
cause: the config was accepted, the service was constructed, and the URLs looked right.
|
|
299
|
-
|
|
300
|
-
`@pikku/core` now exports `createLocalContentRequestHandler` from
|
|
301
|
-
`@pikku/core/services/local-content-request-handler` — the server half of `LocalContent`,
|
|
302
|
-
expressed in Web `Request`/`Response` so every runtime shares one implementation of the
|
|
303
|
-
signature check rather than each re-deriving it. It returns `null` for anything that is
|
|
304
|
-
not a content request, which is the caller's signal to carry on with its normal routing.
|
|
305
|
-
|
|
306
|
-
`PikkuBunServer` accepts `config.content` and a `contentSigningJWT` option, mirroring
|
|
307
|
-
`PikkuNodeHTTPServer`, and answers both prefixes ahead of static mounts and routing.
|
|
308
|
-
`BunServerRunner` was dropping `contentSigningJWT` on the floor, which silently disabled
|
|
309
|
-
signed asset reads for every Bun project even once the prefixes were served — the config
|
|
310
|
-
arrived, the service that verifies its signatures did not.
|
|
311
|
-
|
|
312
|
-
Signed reads are refused unless every claim matches, the path included: without that, a
|
|
313
|
-
signature minted for one asset would read any other.
|
|
314
|
-
|
|
315
|
-
- Updated dependencies [32277d5]
|
|
316
|
-
- Updated dependencies [ea8aabf]
|
|
317
|
-
- Updated dependencies [33e96ab]
|
|
318
|
-
- Updated dependencies [fd72e58]
|
|
319
|
-
- Updated dependencies [fd72e58]
|
|
320
|
-
- Updated dependencies [fd72e58]
|
|
321
|
-
- Updated dependencies [894b2f8]
|
|
322
|
-
- Updated dependencies [dd19aa7]
|
|
323
|
-
- Updated dependencies [50ec500]
|
|
324
|
-
- @pikku/core@0.12.75
|
|
325
|
-
|
|
326
|
-
## 0.12.4
|
|
327
|
-
|
|
328
|
-
### Patch Changes
|
|
329
|
-
|
|
330
|
-
- d4a2503: Serve the console same-origin at /console (#861). Both dev servers gain
|
|
331
|
-
`staticMounts` (prefix → directory static serving with SPA fallback and path
|
|
332
|
-
traversal protection); `pikku serve` / `pikku dev` mount the bundled console
|
|
333
|
-
app at `/console` on the API port whenever it is bundled, so auth cookies are
|
|
334
|
-
first-party and no `?server=` param is needed. The console is built with
|
|
335
|
-
`base: '/console/'` (its router already derives the basename from BASE_URL).
|
|
336
|
-
The separate `--console <port>` static server is removed; `pikku console`
|
|
337
|
-
serves the bundle under /console and redirects the root there.
|
|
338
|
-
- Updated dependencies [61c9ce9]
|
|
339
|
-
- Updated dependencies [f1f39f8]
|
|
340
|
-
- Updated dependencies [c45e98d]
|
|
341
|
-
- Updated dependencies [472a349]
|
|
342
|
-
- @pikku/core@0.12.52
|
|
343
|
-
|
|
344
|
-
## 0.12.3
|
|
345
|
-
|
|
346
|
-
### Patch Changes
|
|
347
|
-
|
|
348
|
-
- 6f6abfe: Mount MCP on the bun runtime. `@pikku/bun-server` now accepts `mcpJson`/`mcpPath`
|
|
349
|
-
options and serves the MCP endpoint (default `/mcp`) via a new fetch-native
|
|
350
|
-
handler on `PikkuMCPServer.createFetchHandler()`, which uses the MCP SDK's
|
|
351
|
-
Web-Standard (`Request`→`Response`) streamable-HTTP transport — no `node:http`
|
|
352
|
-
req/res. The standalone `--runtime bun` entry now wires the same `mcpImport` +
|
|
353
|
-
`mcpJson` option the node entry already used, so a bun standalone build serves
|
|
354
|
-
`/mcp` with the project's tools/resources/prompts instead of silently dropping
|
|
355
|
-
them. `@pikku/modelcontextprotocol` is an optional peer dep of `@pikku/bun-server`
|
|
356
|
-
(only imported when `mcpJson` is non-empty).
|
|
357
|
-
- Updated dependencies [6f6abfe]
|
|
358
|
-
- @pikku/modelcontextprotocol@0.12.6
|
|
359
|
-
|
|
360
|
-
## 0.12.2
|
|
361
|
-
|
|
362
|
-
### Patch Changes
|
|
363
|
-
|
|
364
|
-
- 41ce2cb: Upgrade to TypeScript 6 and raise the minimum Node.js version to 22.
|
|
365
|
-
|
|
366
|
-
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.
|
|
367
|
-
|
|
368
|
-
- Updated dependencies [41ce2cb]
|
|
369
|
-
- @pikku/core@0.12.44
|
|
370
|
-
|
|
371
|
-
## 0.12.1
|
|
372
|
-
|
|
373
|
-
### Patch Changes
|
|
374
|
-
|
|
375
|
-
- d5c3c85: feat: bun first-class support — new `@pikku/bun-server` runtime and `@pikku/kysely-bun-sqlite` dialect, bun template, CI matrix with `package-manager: [yarn, bun]`, and bun verifier.
|
|
376
|
-
- e443e94: feat(deploy): standalone provider can target the bun runtime
|
|
377
|
-
|
|
378
|
-
`pikku deploy plan|apply --provider standalone --runtime bun` now generates a
|
|
379
|
-
`@pikku/bun-server` entry (native `Bun.serve` WebSockets, no `ws` package) and
|
|
380
|
-
compiles the bundle into a single self-contained executable via
|
|
381
|
-
`bun build --compile` — no runtime needed on the target host. The default
|
|
382
|
-
remains `--runtime node`, which is unchanged (ships `bundle.js`, run with
|
|
383
|
-
`node bundle.js`).
|
|
384
|
-
|
|
385
|
-
`PikkuBunServer` now accepts an injectable `eventHub` in its options. Inject the
|
|
386
|
-
same `BunEventHubService` you pass to `createSingletonServices` so functions and
|
|
387
|
-
the WebSocket transport share one hub — otherwise a function's
|
|
388
|
-
`eventHub.publish(...)` targets a different hub than the one holding the live
|
|
389
|
-
sockets and broadcasts never reach connected clients. The standalone bun entry
|
|
390
|
-
and the `bun` template now wire this shared hub, fixing cross-connection /
|
|
391
|
-
cross-transport channel pub-sub on bun.
|
|
392
|
-
|
|
393
|
-
Also removes the unused `@yao-pkg/pkg` dependency and its stale type shim from
|
|
394
|
-
`@pikku/deploy-standalone` (the pkg-based binary path was dropped in #489).
|
|
395
|
-
|
|
396
|
-
- Updated dependencies [92cd5b1]
|
|
397
|
-
- @pikku/core@0.12.38
|
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[@]}"
|