@opendatalabs/personal-server-ts-server 0.0.1-canary.016adf9 → 0.0.1-canary.052d47e
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/api-auth.d.ts +31 -0
- package/dist/api-auth.d.ts.map +1 -0
- package/dist/api-auth.js +148 -0
- package/dist/api-auth.js.map +1 -0
- package/dist/api.d.ts +4 -0
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +3 -0
- package/dist/api.js.map +1 -1
- package/dist/app.d.ts +77 -2
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +165 -9
- package/dist/app.js.map +1 -1
- package/dist/bootstrap.d.ts +36 -3
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +434 -39
- package/dist/bootstrap.js.map +1 -1
- package/dist/client.d.ts +17 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +369 -0
- package/dist/client.js.map +1 -0
- package/dist/config/defaults.d.ts +12 -0
- package/dist/config/defaults.d.ts.map +1 -0
- package/dist/config/defaults.js +14 -0
- package/dist/config/defaults.js.map +1 -0
- package/dist/config/index.d.ts +4 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +4 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/loader.d.ts +8 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +78 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/paths.d.ts +9 -0
- package/dist/config/paths.d.ts.map +1 -0
- package/dist/config/paths.js +22 -0
- package/dist/config/paths.js.map +1 -0
- package/dist/enclave-main.d.ts +10 -0
- package/dist/enclave-main.d.ts.map +1 -0
- package/dist/enclave-main.js +115 -0
- package/dist/enclave-main.js.map +1 -0
- package/dist/hono-context.d.ts +14 -0
- package/dist/hono-context.d.ts.map +1 -0
- package/dist/hono-context.js +2 -0
- package/dist/hono-context.js.map +1 -0
- package/dist/index.js +48 -12
- package/dist/index.js.map +1 -1
- package/dist/jobs/types.d.ts +17 -0
- package/dist/jobs/types.d.ts.map +1 -0
- package/dist/jobs/types.js +3 -0
- package/dist/jobs/types.js.map +1 -0
- package/dist/jobs/worker.d.ts +30 -0
- package/dist/jobs/worker.d.ts.map +1 -0
- package/dist/jobs/worker.js +217 -0
- package/dist/jobs/worker.js.map +1 -0
- package/dist/keys/server-account.d.ts +28 -0
- package/dist/keys/server-account.d.ts.map +1 -0
- package/dist/keys/server-account.js +48 -0
- package/dist/keys/server-account.js.map +1 -0
- package/dist/listen.d.ts +11 -0
- package/dist/listen.d.ts.map +1 -0
- package/dist/listen.js +23 -0
- package/dist/listen.js.map +1 -0
- package/dist/logger/index.d.ts +5 -0
- package/dist/logger/index.d.ts.map +1 -0
- package/dist/logger/index.js +9 -0
- package/dist/logger/index.js.map +1 -0
- package/dist/logging/access-log.d.ts +4 -0
- package/dist/logging/access-log.d.ts.map +1 -0
- package/dist/logging/access-log.js +25 -0
- package/dist/logging/access-log.js.map +1 -0
- package/dist/logging/access-reader.d.ts +19 -0
- package/dist/logging/access-reader.d.ts.map +1 -0
- package/dist/logging/access-reader.js +50 -0
- package/dist/logging/access-reader.js.map +1 -0
- package/dist/middleware/access-log.d.ts.map +1 -1
- package/dist/middleware/access-log.js +8 -2
- package/dist/middleware/access-log.js.map +1 -1
- package/dist/middleware/builder-check.d.ts +2 -2
- package/dist/middleware/builder-check.d.ts.map +1 -1
- package/dist/middleware/builder-check.js +7 -2
- package/dist/middleware/builder-check.js.map +1 -1
- package/dist/middleware/cors.d.ts +18 -0
- package/dist/middleware/cors.d.ts.map +1 -0
- package/dist/middleware/cors.js +51 -0
- package/dist/middleware/cors.js.map +1 -0
- package/dist/middleware/owner-check.js +1 -1
- package/dist/middleware/owner-check.js.map +1 -1
- package/dist/middleware/web3-auth.d.ts +12 -0
- package/dist/middleware/web3-auth.d.ts.map +1 -1
- package/dist/middleware/web3-auth.js +27 -31
- package/dist/middleware/web3-auth.js.map +1 -1
- package/dist/migrations/detect-stuck-version-ledger.d.ts +43 -0
- package/dist/migrations/detect-stuck-version-ledger.d.ts.map +1 -0
- package/dist/migrations/detect-stuck-version-ledger.js +73 -0
- package/dist/migrations/detect-stuck-version-ledger.js.map +1 -0
- package/dist/migrations/local-state.d.ts +35 -0
- package/dist/migrations/local-state.d.ts.map +1 -0
- package/dist/migrations/local-state.js +133 -0
- package/dist/migrations/local-state.js.map +1 -0
- package/dist/migrations/state-migrations.d.ts +78 -0
- package/dist/migrations/state-migrations.d.ts.map +1 -0
- package/dist/migrations/state-migrations.js +72 -0
- package/dist/migrations/state-migrations.js.map +1 -0
- package/dist/pending-blob-deletions.d.ts +10 -0
- package/dist/pending-blob-deletions.d.ts.map +1 -0
- package/dist/pending-blob-deletions.js +38 -0
- package/dist/pending-blob-deletions.js.map +1 -0
- package/dist/routes/access-logs.d.ts +7 -0
- package/dist/routes/access-logs.d.ts.map +1 -1
- package/dist/routes/access-logs.js +11 -17
- package/dist/routes/access-logs.js.map +1 -1
- package/dist/routes/auth-device.d.ts +49 -0
- package/dist/routes/auth-device.d.ts.map +1 -0
- package/dist/routes/auth-device.js +581 -0
- package/dist/routes/auth-device.js.map +1 -0
- package/dist/routes/data.d.ts +67 -2
- package/dist/routes/data.d.ts.map +1 -1
- package/dist/routes/data.js +41 -201
- package/dist/routes/data.js.map +1 -1
- package/dist/routes/derivatives.d.ts +33 -0
- package/dist/routes/derivatives.d.ts.map +1 -0
- package/dist/routes/derivatives.js +33 -0
- package/dist/routes/derivatives.js.map +1 -0
- package/dist/routes/enclave-jobs.d.ts +9 -0
- package/dist/routes/enclave-jobs.d.ts.map +1 -0
- package/dist/routes/enclave-jobs.js +104 -0
- package/dist/routes/enclave-jobs.js.map +1 -0
- package/dist/routes/grants.d.ts +9 -2
- package/dist/routes/grants.d.ts.map +1 -1
- package/dist/routes/grants.js +18 -196
- package/dist/routes/grants.js.map +1 -1
- package/dist/routes/health.d.ts +7 -1
- package/dist/routes/health.d.ts.map +1 -1
- package/dist/routes/health.js +39 -2
- package/dist/routes/health.js.map +1 -1
- package/dist/routes/mcp.d.ts +115 -0
- package/dist/routes/mcp.d.ts.map +1 -0
- package/dist/routes/mcp.js +676 -0
- package/dist/routes/mcp.js.map +1 -0
- package/dist/routes/oauth-token.d.ts +56 -0
- package/dist/routes/oauth-token.d.ts.map +1 -0
- package/dist/routes/oauth-token.js +49 -0
- package/dist/routes/oauth-token.js.map +1 -0
- package/dist/routes/sync.d.ts +7 -0
- package/dist/routes/sync.d.ts.map +1 -1
- package/dist/routes/sync.js +12 -39
- package/dist/routes/sync.js.map +1 -1
- package/dist/routes/ui-config.d.ts.map +1 -1
- package/dist/routes/ui-config.js +17 -82
- package/dist/routes/ui-config.js.map +1 -1
- package/dist/routes/ui-registration.d.ts +9 -0
- package/dist/routes/ui-registration.d.ts.map +1 -0
- package/dist/routes/ui-registration.js +217 -0
- package/dist/routes/ui-registration.js.map +1 -0
- package/dist/routes/ui.d.ts +1 -0
- package/dist/routes/ui.d.ts.map +1 -1
- package/dist/routes/ui.js +46 -4
- package/dist/routes/ui.js.map +1 -1
- package/dist/routes/write-session.d.ts +37 -0
- package/dist/routes/write-session.d.ts.map +1 -0
- package/dist/routes/write-session.js +34 -0
- package/dist/routes/write-session.js.map +1 -0
- package/dist/storage/hierarchy.d.ts +36 -0
- package/dist/storage/hierarchy.d.ts.map +1 -0
- package/dist/storage/hierarchy.js +282 -0
- package/dist/storage/hierarchy.js.map +1 -0
- package/dist/storage/index-manager.d.ts +60 -0
- package/dist/storage/index-manager.d.ts.map +1 -0
- package/dist/storage/index-manager.js +174 -0
- package/dist/storage/index-manager.js.map +1 -0
- package/dist/storage/index-schema.d.ts +5 -0
- package/dist/storage/index-schema.d.ts.map +1 -0
- package/dist/storage/index-schema.js +69 -0
- package/dist/storage/index-schema.js.map +1 -0
- package/dist/storage/node-data-storage.d.ts +9 -0
- package/dist/storage/node-data-storage.d.ts.map +1 -0
- package/dist/storage/node-data-storage.js +105 -0
- package/dist/storage/node-data-storage.js.map +1 -0
- package/dist/storage/question-store.d.ts +9 -0
- package/dist/storage/question-store.d.ts.map +1 -0
- package/dist/storage/question-store.js +151 -0
- package/dist/storage/question-store.js.map +1 -0
- package/dist/sync-cursor.d.ts +15 -0
- package/dist/sync-cursor.d.ts.map +1 -0
- package/dist/sync-cursor.js +110 -0
- package/dist/sync-cursor.js.map +1 -0
- package/dist/token-store.d.ts +22 -0
- package/dist/token-store.d.ts.map +1 -0
- package/dist/token-store.js +120 -0
- package/dist/token-store.js.map +1 -0
- package/dist/tunnel/auth.d.ts +4 -0
- package/dist/tunnel/auth.d.ts.map +1 -1
- package/dist/tunnel/auth.js +2 -1
- package/dist/tunnel/auth.js.map +1 -1
- package/dist/tunnel/config.d.ts +1 -0
- package/dist/tunnel/config.d.ts.map +1 -1
- package/dist/tunnel/config.js +1 -1
- package/dist/tunnel/config.js.map +1 -1
- package/dist/tunnel/manager.d.ts +21 -1
- package/dist/tunnel/manager.d.ts.map +1 -1
- package/dist/tunnel/manager.js +78 -23
- package/dist/tunnel/manager.js.map +1 -1
- package/dist/ui/browser_tls_rustls_bg.wasm +0 -0
- package/dist/ui/index.html +2192 -0
- package/dist/ui/ps-lite-debug.d.ts +93 -0
- package/dist/ui/ps-lite-debug.d.ts.map +1 -0
- package/dist/ui/ps-lite-debug.js +135347 -0
- package/dist/ui/ps-lite-debug.js.map +1 -0
- package/package.json +20 -6
- package/dist/middleware/grant-check.d.ts +0 -12
- package/dist/middleware/grant-check.d.ts.map +0 -1
- package/dist/middleware/grant-check.js +0 -90
- package/dist/middleware/grant-check.js.map +0 -1
package/dist/routes/grants.js
CHANGED
|
@@ -1,208 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Grants routes — GET / (owner), POST / (create grant),
|
|
2
|
+
* Grants routes — GET / (owner), POST / (create grant), DELETE /:grantId
|
|
3
|
+
* (revoke grant), POST /verify (public).
|
|
3
4
|
*/
|
|
4
5
|
import { Hono } from "hono";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { createWeb3AuthMiddleware } from "../middleware/web3-auth.js";
|
|
8
|
-
import { createOwnerCheckMiddleware } from "../middleware/owner-check.js";
|
|
9
|
-
function isValidCreateBody(body) {
|
|
10
|
-
if (body === null || typeof body !== "object" || Array.isArray(body))
|
|
11
|
-
return false;
|
|
12
|
-
const b = body;
|
|
13
|
-
if (typeof b.granteeAddress !== "string" ||
|
|
14
|
-
!b.granteeAddress.startsWith("0x"))
|
|
15
|
-
return false;
|
|
16
|
-
if (!Array.isArray(b.scopes) || b.scopes.length === 0)
|
|
17
|
-
return false;
|
|
18
|
-
if (!b.scopes.every((s) => typeof s === "string"))
|
|
19
|
-
return false;
|
|
20
|
-
if (b.expiresAt !== undefined && typeof b.expiresAt !== "number")
|
|
21
|
-
return false;
|
|
22
|
-
if (b.nonce !== undefined && typeof b.nonce !== "number")
|
|
23
|
-
return false;
|
|
24
|
-
return true;
|
|
25
|
-
}
|
|
26
|
-
function isValidVerifyBody(body) {
|
|
27
|
-
if (body === null || typeof body !== "object" || Array.isArray(body))
|
|
28
|
-
return false;
|
|
29
|
-
const b = body;
|
|
30
|
-
if (typeof b.grantId !== "string" || b.grantId.length === 0)
|
|
31
|
-
return false;
|
|
32
|
-
if (typeof b.signature !== "string" || !b.signature.startsWith("0x"))
|
|
33
|
-
return false;
|
|
34
|
-
if (b.payload === null ||
|
|
35
|
-
typeof b.payload !== "object" ||
|
|
36
|
-
Array.isArray(b.payload))
|
|
37
|
-
return false;
|
|
38
|
-
const p = b.payload;
|
|
39
|
-
if (typeof p.user !== "string" || !p.user.startsWith("0x"))
|
|
40
|
-
return false;
|
|
41
|
-
if (typeof p.builder !== "string" || !p.builder.startsWith("0x"))
|
|
42
|
-
return false;
|
|
43
|
-
if (!Array.isArray(p.scopes) || p.scopes.length === 0)
|
|
44
|
-
return false;
|
|
45
|
-
if (!p.scopes.every((s) => typeof s === "string"))
|
|
46
|
-
return false;
|
|
47
|
-
if (typeof p.expiresAt !== "number")
|
|
48
|
-
return false;
|
|
49
|
-
if (typeof p.nonce !== "number")
|
|
50
|
-
return false;
|
|
51
|
-
return true;
|
|
52
|
-
}
|
|
6
|
+
import { handlePersonalServerGrantsRequest, } from "@opendatalabs/personal-server-ts-core/api";
|
|
7
|
+
import { createServerApiAuth } from "../api-auth.js";
|
|
53
8
|
export function grantsRoutes(deps) {
|
|
54
9
|
const app = new Hono();
|
|
55
|
-
const
|
|
10
|
+
const auth = createServerApiAuth({
|
|
56
11
|
serverOrigin: deps.serverOrigin,
|
|
57
12
|
devToken: deps.devToken,
|
|
13
|
+
accessToken: deps.accessToken,
|
|
14
|
+
tokenStore: deps.tokenStore,
|
|
58
15
|
serverOwner: deps.serverOwner,
|
|
16
|
+
gateway: deps.gateway,
|
|
59
17
|
});
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}, 500);
|
|
71
|
-
}
|
|
72
|
-
const grants = await deps.gateway.listGrantsByUser(deps.serverOwner);
|
|
73
|
-
return c.json({ grants });
|
|
74
|
-
});
|
|
75
|
-
// POST / — create a grant (owner-only, called by Desktop App)
|
|
76
|
-
app.post("/", web3Auth, ownerCheck, async (c) => {
|
|
77
|
-
if (!deps.serverOwner) {
|
|
78
|
-
return c.json({
|
|
79
|
-
error: {
|
|
80
|
-
code: 500,
|
|
81
|
-
errorCode: "SERVER_NOT_CONFIGURED",
|
|
82
|
-
message: "Server owner address not configured. Set VANA_MASTER_KEY_SIGNATURE environment variable.",
|
|
83
|
-
},
|
|
84
|
-
}, 500);
|
|
85
|
-
}
|
|
86
|
-
if (!deps.serverSigner) {
|
|
87
|
-
return c.json({
|
|
88
|
-
error: {
|
|
89
|
-
code: 500,
|
|
90
|
-
errorCode: "SERVER_SIGNER_NOT_CONFIGURED",
|
|
91
|
-
message: "Server signer not configured. Set VANA_MASTER_KEY_SIGNATURE environment variable.",
|
|
92
|
-
},
|
|
93
|
-
}, 500);
|
|
94
|
-
}
|
|
95
|
-
let body;
|
|
96
|
-
try {
|
|
97
|
-
body = await c.req.json();
|
|
98
|
-
}
|
|
99
|
-
catch {
|
|
100
|
-
return c.json({ error: "INVALID_BODY", message: "Invalid JSON body" }, 400);
|
|
101
|
-
}
|
|
102
|
-
if (!isValidCreateBody(body)) {
|
|
103
|
-
return c.json({
|
|
104
|
-
error: "INVALID_BODY",
|
|
105
|
-
message: "Body must include granteeAddress (0x string) and scopes (non-empty string array)",
|
|
106
|
-
}, 400);
|
|
107
|
-
}
|
|
108
|
-
const { granteeAddress, scopes, expiresAt, nonce } = body;
|
|
109
|
-
// Look up builder to get their on-chain ID
|
|
110
|
-
const builder = await deps.gateway.getBuilder(granteeAddress);
|
|
111
|
-
if (!builder) {
|
|
112
|
-
return c.json({
|
|
113
|
-
error: {
|
|
114
|
-
code: 404,
|
|
115
|
-
errorCode: "BUILDER_NOT_REGISTERED",
|
|
116
|
-
message: `Builder ${granteeAddress} is not registered on-chain`,
|
|
117
|
-
},
|
|
118
|
-
}, 404);
|
|
119
|
-
}
|
|
120
|
-
// Build the grant payload JSON string
|
|
121
|
-
const grantPayload = JSON.stringify({
|
|
122
|
-
user: deps.serverOwner,
|
|
123
|
-
builder: granteeAddress,
|
|
124
|
-
scopes,
|
|
125
|
-
expiresAt: expiresAt ?? 0,
|
|
126
|
-
nonce: nonce ?? Date.now(),
|
|
127
|
-
});
|
|
128
|
-
// Sign EIP-712 GrantRegistration
|
|
129
|
-
const signature = await deps.serverSigner.signGrantRegistration({
|
|
130
|
-
grantorAddress: deps.serverOwner,
|
|
131
|
-
granteeId: builder.id,
|
|
132
|
-
grant: grantPayload,
|
|
133
|
-
fileIds: [],
|
|
134
|
-
});
|
|
135
|
-
// Submit to Gateway
|
|
136
|
-
const result = await deps.gateway.createGrant({
|
|
137
|
-
grantorAddress: deps.serverOwner,
|
|
138
|
-
granteeId: builder.id,
|
|
139
|
-
grant: grantPayload,
|
|
140
|
-
fileIds: [],
|
|
141
|
-
signature,
|
|
142
|
-
});
|
|
143
|
-
return c.json({ grantId: result.grantId }, 201);
|
|
144
|
-
});
|
|
145
|
-
// POST /verify — public endpoint, no auth required
|
|
146
|
-
app.post("/verify", async (c) => {
|
|
147
|
-
let body;
|
|
148
|
-
try {
|
|
149
|
-
body = await c.req.json();
|
|
150
|
-
}
|
|
151
|
-
catch {
|
|
152
|
-
return c.json({ error: "INVALID_BODY", message: "Invalid JSON body" }, 400);
|
|
153
|
-
}
|
|
154
|
-
if (!isValidVerifyBody(body)) {
|
|
155
|
-
return c.json({
|
|
156
|
-
error: "INVALID_BODY",
|
|
157
|
-
message: "Body must include grantId (string), payload (object with user, builder, scopes, expiresAt, nonce), and signature (0x string)",
|
|
158
|
-
}, 400);
|
|
159
|
-
}
|
|
160
|
-
const { payload, signature } = body;
|
|
161
|
-
// Verify EIP-712 signature — recover signer and check === payload.user
|
|
162
|
-
let valid;
|
|
163
|
-
try {
|
|
164
|
-
valid = await verifyTypedData({
|
|
165
|
-
address: payload.user,
|
|
166
|
-
domain: GRANT_DOMAIN,
|
|
167
|
-
types: GRANT_TYPES,
|
|
168
|
-
primaryType: "Grant",
|
|
169
|
-
message: {
|
|
170
|
-
user: payload.user,
|
|
171
|
-
builder: payload.builder,
|
|
172
|
-
scopes: payload.scopes,
|
|
173
|
-
expiresAt: BigInt(payload.expiresAt),
|
|
174
|
-
nonce: BigInt(payload.nonce),
|
|
175
|
-
},
|
|
176
|
-
signature: signature,
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
catch {
|
|
180
|
-
return c.json({
|
|
181
|
-
valid: false,
|
|
182
|
-
error: "EIP-712 signature verification failed",
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
if (!valid) {
|
|
186
|
-
return c.json({
|
|
187
|
-
valid: false,
|
|
188
|
-
error: "Grant signature does not match user",
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
// Check expiry: expiresAt > 0 means there IS an expiry
|
|
192
|
-
if (payload.expiresAt > 0) {
|
|
193
|
-
const nowSeconds = Math.floor(Date.now() / 1000);
|
|
194
|
-
if (payload.expiresAt < nowSeconds) {
|
|
195
|
-
return c.json({ valid: false, error: "Grant has expired" });
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
return c.json({
|
|
199
|
-
valid: true,
|
|
200
|
-
user: payload.user,
|
|
201
|
-
builder: payload.builder,
|
|
202
|
-
scopes: payload.scopes,
|
|
203
|
-
expiresAt: payload.expiresAt,
|
|
204
|
-
});
|
|
205
|
-
});
|
|
18
|
+
const handler = (c) => handlePersonalServerGrantsRequest(c.req.raw, {
|
|
19
|
+
auth,
|
|
20
|
+
gateway: deps.gateway,
|
|
21
|
+
gatewayConfig: deps.gatewayConfig,
|
|
22
|
+
serverOwner: deps.serverOwner,
|
|
23
|
+
serverSigner: deps.serverSigner,
|
|
24
|
+
}, { basePath: deps.mountPath });
|
|
25
|
+
app.all("/", handler);
|
|
26
|
+
app.delete("/:grantId", handler);
|
|
27
|
+
app.all("/*", handler);
|
|
206
28
|
return app;
|
|
207
29
|
}
|
|
208
30
|
//# sourceMappingURL=grants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grants.js","sourceRoot":"","sources":["../../src/routes/grants.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"grants.js","sourceRoot":"","sources":["../../src/routes/grants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAgB,MAAM,MAAM,CAAC;AAM1C,OAAO,EACL,iCAAiC,GAElC,MAAM,2CAA2C,CAAC;AAGnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAerD,MAAM,UAAU,YAAY,CAAC,IAAqB;IAChD,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;IAEvB,MAAM,IAAI,GAAG,mBAAmB,CAAC;QAC/B,YAAY,EAAE,IAAI,CAAC,YAAY;QAC/B,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,UAAU,EAAE,IAAI,CAAC,UAAU;QAC3B,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,OAAO,EAAE,IAAI,CAAC,OAAO;KACtB,CAAC,CAAC;IAEH,MAAM,OAAO,GAAY,CAAC,CAAC,EAAE,EAAE,CAC7B,iCAAiC,CAC/B,CAAC,CAAC,GAAG,CAAC,GAAG,EACT;QACE,IAAI;QACJ,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,YAAY,EAAE,IAAI,CAAC,YAAY;KAChC,EACD,EAAE,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,CAC7B,CAAC;IAEJ,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACtB,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IACjC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAEvB,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/routes/health.d.ts
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import { Hono } from "hono";
|
|
2
|
-
import type { GatewayClient } from "@opendatalabs/
|
|
2
|
+
import type { DataPortabilityGatewayConfig, GatewayClient } from "@opendatalabs/vana-sdk/node";
|
|
3
|
+
import type { RuntimeAvailabilityPort } from "@opendatalabs/personal-server-ts-core/ports";
|
|
3
4
|
import type { Logger } from "pino";
|
|
4
5
|
import type { IdentityInfo } from "../app.js";
|
|
5
6
|
import type { TunnelStatusInfo } from "../tunnel/index.js";
|
|
6
7
|
export interface HealthDeps {
|
|
7
8
|
version: string;
|
|
8
9
|
startedAt: Date;
|
|
10
|
+
serverOrigin?: string | (() => string);
|
|
9
11
|
serverOwner?: `0x${string}`;
|
|
10
12
|
identity?: IdentityInfo;
|
|
11
13
|
gateway?: GatewayClient;
|
|
14
|
+
gatewayConfig?: DataPortabilityGatewayConfig & {
|
|
15
|
+
url?: string;
|
|
16
|
+
};
|
|
12
17
|
logger?: Logger;
|
|
13
18
|
getTunnelStatus?: () => TunnelStatusInfo | null;
|
|
19
|
+
runtimeAvailability?: RuntimeAvailabilityPort;
|
|
14
20
|
}
|
|
15
21
|
export declare function healthRoute(deps: HealthDeps): Hono;
|
|
16
22
|
//# sourceMappingURL=health.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../../src/routes/health.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../../src/routes/health.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,KAAK,EACV,4BAA4B,EAC5B,aAAa,EACd,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,CAAC;IACvC,WAAW,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;IAC5B,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,aAAa,CAAC,EAAE,4BAA4B,GAAG;QAAE,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAChE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,gBAAgB,GAAG,IAAI,CAAC;IAChD,mBAAmB,CAAC,EAAE,uBAAuB,CAAC;CAC/C;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAsFlD"}
|
package/dist/routes/health.js
CHANGED
|
@@ -22,14 +22,51 @@ export function healthRoute(deps) {
|
|
|
22
22
|
serverId,
|
|
23
23
|
}
|
|
24
24
|
: null;
|
|
25
|
-
const
|
|
25
|
+
const tunnelStatus = deps.getTunnelStatus?.() ?? null;
|
|
26
|
+
const fallbackOrigin = typeof deps.serverOrigin === "function"
|
|
27
|
+
? deps.serverOrigin()
|
|
28
|
+
: deps.serverOrigin;
|
|
29
|
+
const tunnelPublicUrl = tunnelStatus?.publicUrl ?? null;
|
|
30
|
+
const tunnelReady = tunnelStatus?.status === "connected" && tunnelStatus.routable !== false;
|
|
31
|
+
const apiOrigin = tunnelReady && tunnelPublicUrl
|
|
32
|
+
? tunnelPublicUrl
|
|
33
|
+
: (fallbackOrigin ?? null);
|
|
34
|
+
const registrationUrl = tunnelPublicUrl ?? apiOrigin;
|
|
35
|
+
const registration = deps.serverOwner && identity && registrationUrl
|
|
36
|
+
? {
|
|
37
|
+
ownerAddress: deps.serverOwner,
|
|
38
|
+
serverAddress: identity.address,
|
|
39
|
+
publicKey: identity.publicKey,
|
|
40
|
+
serverUrl: registrationUrl,
|
|
41
|
+
serverId,
|
|
42
|
+
registered: Boolean(serverId),
|
|
43
|
+
}
|
|
44
|
+
: null;
|
|
45
|
+
const tunnel = tunnelStatus && registration && tunnelStatus.publicUrl
|
|
46
|
+
? {
|
|
47
|
+
...tunnelStatus,
|
|
48
|
+
routable: registration.registered && tunnelStatus.routable !== false,
|
|
49
|
+
warning: registration.registered
|
|
50
|
+
? tunnelStatus.warning
|
|
51
|
+
: "Server not registered with gateway",
|
|
52
|
+
}
|
|
53
|
+
: tunnelStatus;
|
|
54
|
+
const runtimeAvailable = (await deps.runtimeAvailability?.isAvailable()) ?? true;
|
|
26
55
|
return c.json({
|
|
27
|
-
status: "healthy",
|
|
56
|
+
status: runtimeAvailable ? "healthy" : "unavailable",
|
|
28
57
|
version: deps.version,
|
|
29
58
|
uptime: Math.floor(uptimeMs / 1000),
|
|
30
59
|
owner: deps.serverOwner ?? null,
|
|
60
|
+
apiOrigin,
|
|
61
|
+
gatewayUrl: deps.gatewayConfig?.url ?? null,
|
|
62
|
+
gatewayConfig: deps.gatewayConfig ?? null,
|
|
31
63
|
identity,
|
|
64
|
+
registration,
|
|
32
65
|
tunnel,
|
|
66
|
+
runtime: {
|
|
67
|
+
kind: "ps-node",
|
|
68
|
+
available: runtimeAvailable,
|
|
69
|
+
},
|
|
33
70
|
});
|
|
34
71
|
});
|
|
35
72
|
return app;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"health.js","sourceRoot":"","sources":["../../src/routes/health.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"health.js","sourceRoot":"","sources":["../../src/routes/health.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAwB5B,MAAM,UAAU,WAAW,CAAC,IAAgB;IAC1C,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;IAEvB,GAAG,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;QAC7B,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;QACvD,IAAI,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE,QAAQ,IAAI,IAAI,CAAC;QAE/C,IAAI,IAAI,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;aAC5B;SACF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP routes — both the Claude-facing `/mcp/:token` Streamable HTTP endpoint
|
|
3
|
+
* and the owner-only `/v1/mcp/connections` management surface.
|
|
4
|
+
*
|
|
5
|
+
* §1–§3 of `260604-PLAN-vana-mcp-personal-server.md`.
|
|
6
|
+
*
|
|
7
|
+
* Owner endpoints reuse `createServerApiAuth().authorizeOwner` so the same
|
|
8
|
+
* auth surface that gates `/v1/grants` gates connection management. The
|
|
9
|
+
* Claude-facing endpoint uses the connection token as a capability — there
|
|
10
|
+
* is no Web3Signed payload from Claude; the token resolves to a connection
|
|
11
|
+
* and we then sign reads ourselves with the per-connection grantee.
|
|
12
|
+
*
|
|
13
|
+
* NOTE on Phase-1 storage: this route accepts an `McpConnectionStore` from
|
|
14
|
+
* the caller. The in-memory implementation in `core/src/mcp/store.ts` is
|
|
15
|
+
* fine for tests and the first server-side smoke; for Web PS Lite an
|
|
16
|
+
* IndexedDB-backed adapter is the natural production path (Phase-2 §4
|
|
17
|
+
* "encrypt grantee private keys at rest" applies there).
|
|
18
|
+
*/
|
|
19
|
+
import { Hono } from "hono";
|
|
20
|
+
import type { Logger } from "pino";
|
|
21
|
+
import type { DataPortabilityGatewayConfig, GatewayClient } from "@opendatalabs/vana-sdk/node";
|
|
22
|
+
import { buildMcpUrl, buildStableMcpUrl, type McpProofReplayStore, type McpConnectionStore, type McpSessionStore, type McpOAuthAuthorizationStore, type McpActivityRecorder } from "@opendatalabs/personal-server-ts-core/mcp";
|
|
23
|
+
import type { PersonalServerReadFulfillmentReporter } from "@opendatalabs/personal-server-ts-core/api";
|
|
24
|
+
import type { AccessLogWriter } from "@opendatalabs/personal-server-ts-core/logging/access-log";
|
|
25
|
+
import type { ServerSigner } from "@opendatalabs/personal-server-ts-core/signing";
|
|
26
|
+
import type { HierarchyManagerOptions } from "@opendatalabs/personal-server-ts-core/storage/hierarchy";
|
|
27
|
+
import type { IndexManager } from "@opendatalabs/personal-server-ts-core/storage/index";
|
|
28
|
+
import type { DataStoragePort, RuntimeAvailabilityPort } from "@opendatalabs/personal-server-ts-core/ports";
|
|
29
|
+
import type { TokenStore } from "../token-store.js";
|
|
30
|
+
export interface McpRouteDeps {
|
|
31
|
+
logger: Logger;
|
|
32
|
+
/**
|
|
33
|
+
* `serverOrigin` used both as the Web3Signed `aud` for the per-connection
|
|
34
|
+
* grantee's self-issued read requests AND as the base URL printed back to
|
|
35
|
+
* the user when they create a connection ("paste this into Claude").
|
|
36
|
+
* Caller may pass a thunk if the public origin depends on relay state.
|
|
37
|
+
*/
|
|
38
|
+
serverOrigin: string | (() => string);
|
|
39
|
+
serverOwner?: `0x${string}`;
|
|
40
|
+
/** The server's own account address — required for x402 payment settlement. */
|
|
41
|
+
serverAddress?: `0x${string}`;
|
|
42
|
+
serverSigner?: Pick<ServerSigner, "signGrantRegistration" | "signRecordDataAccess">;
|
|
43
|
+
gateway: GatewayClient;
|
|
44
|
+
gatewayConfig?: (DataPortabilityGatewayConfig & {
|
|
45
|
+
url?: string;
|
|
46
|
+
}) | null;
|
|
47
|
+
/**
|
|
48
|
+
* Enables x402 pay-per-read for self-signing (chatbot) MCP sessions only.
|
|
49
|
+
* The owner/OAuth connection path is always free regardless of this flag.
|
|
50
|
+
*/
|
|
51
|
+
paymentEnabled?: boolean;
|
|
52
|
+
devToken?: string;
|
|
53
|
+
accessToken?: string;
|
|
54
|
+
tokenStore?: TokenStore;
|
|
55
|
+
accessLogWriter: AccessLogWriter;
|
|
56
|
+
readFulfillmentReporter?: PersonalServerReadFulfillmentReporter;
|
|
57
|
+
indexManager?: IndexManager;
|
|
58
|
+
hierarchyOptions?: HierarchyManagerOptions;
|
|
59
|
+
dataStorage?: DataStoragePort;
|
|
60
|
+
runtimeAvailability?: RuntimeAvailabilityPort;
|
|
61
|
+
/** Per-process connection store. Defaults to in-memory. */
|
|
62
|
+
connectionStore?: McpConnectionStore;
|
|
63
|
+
/**
|
|
64
|
+
* Per-process store for self-signing chatbot MCP sessions (Option A).
|
|
65
|
+
* Defaults to in-memory. Shared within `mcpStreamableHttpRoutes` between the
|
|
66
|
+
* `/mcp/session` handshake and the `/mcp` reads.
|
|
67
|
+
*/
|
|
68
|
+
sessionStore?: McpSessionStore;
|
|
69
|
+
/**
|
|
70
|
+
* Per-process replay guard for `/mcp/session` handshake proofs. Defaults to
|
|
71
|
+
* in-memory. Rejects reuse of a still-valid Web3Signed proof.
|
|
72
|
+
*/
|
|
73
|
+
proofReplayStore?: McpProofReplayStore;
|
|
74
|
+
/**
|
|
75
|
+
* OAuth authorization store shared by `/mcp/oauth/authorize`,
|
|
76
|
+
* `/mcp/oauth/token`, and the owner approval endpoint.
|
|
77
|
+
*/
|
|
78
|
+
oauthAuthorizationStore?: McpOAuthAuthorizationStore;
|
|
79
|
+
/** Activity recorder for live MCP call visibility. */
|
|
80
|
+
activityRecorder?: McpActivityRecorder;
|
|
81
|
+
/**
|
|
82
|
+
* Vana Web approval surface. `/mcp/oauth/authorize` redirects owners here
|
|
83
|
+
* with `mcp_authorization` and `ps_origin` query params.
|
|
84
|
+
*/
|
|
85
|
+
oauthApprovalUrl?: string | (() => string);
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Hono sub-app for the owner-only `/v1/mcp/connections` endpoints.
|
|
89
|
+
* Mount under `/v1/mcp/connections` in `app.ts`.
|
|
90
|
+
*/
|
|
91
|
+
export declare function mcpConnectionsRoutes(deps: McpRouteDeps): Hono;
|
|
92
|
+
/**
|
|
93
|
+
* Top-level MCP OAuth/discovery routes.
|
|
94
|
+
*
|
|
95
|
+
* Mount at `/` so the well-known documents are served from the PS origin and
|
|
96
|
+
* Claude can discover auth for the stable `/mcp` resource.
|
|
97
|
+
*/
|
|
98
|
+
export declare function mcpOAuthRoutes(deps: McpRouteDeps): Hono;
|
|
99
|
+
/**
|
|
100
|
+
* Hono sub-app for the Claude-facing Streamable HTTP endpoint.
|
|
101
|
+
* Mount under `/mcp` in `app.ts`; stable `/mcp` accepts OAuth bearer tokens
|
|
102
|
+
* and legacy `/mcp/:connectionToken` still accepts token-in-path calls.
|
|
103
|
+
*
|
|
104
|
+
* NOTE: this MUST receive the SAME `connectionStore` instance you pass to
|
|
105
|
+
* `mcpConnectionsRoutes` — otherwise the management API creates connections
|
|
106
|
+
* that the Claude endpoint can never see.
|
|
107
|
+
*/
|
|
108
|
+
export declare function mcpStreamableHttpRoutes(deps: McpRouteDeps): Hono;
|
|
109
|
+
/**
|
|
110
|
+
* Owner-only activity feed route. Mount at `/v1/mcp/activity` in `app.ts`.
|
|
111
|
+
* Returns the current snapshot from the shared `McpActivityRecorder`.
|
|
112
|
+
*/
|
|
113
|
+
export declare function mcpActivityRoutes(deps: McpRouteDeps): Hono;
|
|
114
|
+
export { buildMcpUrl, buildStableMcpUrl };
|
|
115
|
+
//# sourceMappingURL=mcp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/routes/mcp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,KAAK,EACV,4BAA4B,EAC5B,aAAa,EACd,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAKL,WAAW,EACX,iBAAiB,EAWjB,KAAK,mBAAmB,EAcxB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,0BAA0B,EAC/B,KAAK,mBAAmB,EACzB,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAGV,qCAAqC,EACtC,MAAM,2CAA2C,CAAC;AAInD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0DAA0D,CAAC;AAChG,OA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