@atproto/pds 0.4.44 → 0.4.46
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +19 -0
- package/dist/api/app/bsky/feed/getFeed.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/getFeed.js +6 -2
- package/dist/api/app/bsky/feed/getFeed.js.map +1 -1
- package/dist/api/app/bsky/feed/getPostThread.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/getPostThread.js +2 -1
- package/dist/api/app/bsky/feed/getPostThread.js.map +1 -1
- package/dist/api/app/bsky/notification/registerPush.d.ts.map +1 -1
- package/dist/api/app/bsky/notification/registerPush.js +2 -1
- package/dist/api/app/bsky/notification/registerPush.js.map +1 -1
- package/dist/api/com/atproto/admin/sendEmail.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/sendEmail.js +2 -1
- package/dist/api/com/atproto/admin/sendEmail.js.map +1 -1
- package/dist/api/com/atproto/repo/uploadBlob.js +1 -1
- package/dist/api/com/atproto/repo/uploadBlob.js.map +1 -1
- package/dist/api/com/atproto/server/createAccount.js +2 -2
- package/dist/api/com/atproto/server/createAccount.js.map +1 -1
- package/dist/api/com/atproto/server/getServiceAuth.d.ts.map +1 -1
- package/dist/api/com/atproto/server/getServiceAuth.js +13 -0
- package/dist/api/com/atproto/server/getServiceAuth.js.map +1 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +0 -2
- package/dist/api/index.js.map +1 -1
- package/dist/auth-verifier.d.ts +7 -5
- package/dist/auth-verifier.d.ts.map +1 -1
- package/dist/auth-verifier.js +25 -6
- package/dist/auth-verifier.js.map +1 -1
- package/dist/context.d.ts +2 -2
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +4 -3
- package/dist/context.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +13 -36
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +17 -38
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/defs.d.ts +1 -1
- package/dist/lexicon/types/app/bsky/feed/defs.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/label/defs.d.ts +1 -1
- package/dist/lexicon/types/com/atproto/server/getServiceAuth.d.ts +5 -0
- package/dist/lexicon/types/com/atproto/server/getServiceAuth.d.ts.map +1 -1
- package/dist/pipethrough.d.ts +11 -2
- package/dist/pipethrough.d.ts.map +1 -1
- package/dist/pipethrough.js +41 -14
- package/dist/pipethrough.js.map +1 -1
- package/dist/read-after-write/viewer.d.ts +1 -1
- package/dist/read-after-write/viewer.d.ts.map +1 -1
- package/dist/read-after-write/viewer.js +5 -4
- package/dist/read-after-write/viewer.js.map +1 -1
- package/package.json +6 -6
- package/src/api/app/bsky/feed/getFeed.ts +9 -2
- package/src/api/app/bsky/feed/getPostThread.ts +2 -1
- package/src/api/app/bsky/notification/registerPush.ts +6 -1
- package/src/api/com/atproto/admin/sendEmail.ts +3 -1
- package/src/api/com/atproto/repo/uploadBlob.ts +1 -1
- package/src/api/com/atproto/server/createAccount.ts +2 -2
- package/src/api/com/atproto/server/getServiceAuth.ts +20 -1
- package/src/api/index.ts +0 -2
- package/src/auth-verifier.ts +32 -10
- package/src/context.ts +4 -3
- package/src/lexicon/lexicons.ts +20 -39
- package/src/lexicon/types/app/bsky/feed/defs.ts +1 -1
- package/src/lexicon/types/com/atproto/label/defs.ts +1 -1
- package/src/lexicon/types/com/atproto/server/getServiceAuth.ts +5 -0
- package/src/pipethrough.ts +49 -15
- package/src/read-after-write/viewer.ts +8 -4
- package/tests/moderator-auth.test.ts +4 -0
- package/tests/proxied/notif.test.ts +1 -0
- package/tests/proxied/proxy-header.test.ts +1 -0
- package/dist/api/chat/index.d.ts +0 -4
- package/dist/api/chat/index.d.ts.map +0 -1
- package/dist/api/chat/index.js +0 -91
- package/dist/api/chat/index.js.map +0 -1
- package/dist/lexicon/types/app/bsky/feed/detach.d.ts +0 -15
- package/dist/lexicon/types/app/bsky/feed/detach.d.ts.map +0 -1
- package/dist/lexicon/types/app/bsky/feed/detach.js +0 -17
- package/dist/lexicon/types/app/bsky/feed/detach.js.map +0 -1
- package/src/api/chat/index.ts +0 -90
- package/src/lexicon/types/app/bsky/feed/detach.ts +0 -29
@@ -164,7 +164,7 @@ export declare function validateThreadgateView(v: unknown): ValidationResult;
|
|
164
164
|
export interface Interaction {
|
165
165
|
item?: string;
|
166
166
|
event?: 'app.bsky.feed.defs#requestLess' | 'app.bsky.feed.defs#requestMore' | 'app.bsky.feed.defs#clickthroughItem' | 'app.bsky.feed.defs#clickthroughAuthor' | 'app.bsky.feed.defs#clickthroughReposter' | 'app.bsky.feed.defs#clickthroughEmbed' | 'app.bsky.feed.defs#interactionSeen' | 'app.bsky.feed.defs#interactionLike' | 'app.bsky.feed.defs#interactionRepost' | 'app.bsky.feed.defs#interactionReply' | 'app.bsky.feed.defs#interactionQuote' | 'app.bsky.feed.defs#interactionShare' | (string & {});
|
167
|
-
/** Context on a feed item that was
|
167
|
+
/** Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton. */
|
168
168
|
feedContext?: string;
|
169
169
|
[k: string]: unknown;
|
170
170
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/feed/defs.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAI5D,OAAO,KAAK,gBAAgB,MAAM,eAAe,CAAA;AACjD,OAAO,KAAK,kBAAkB,MAAM,iBAAiB,CAAA;AACrD,OAAO,KAAK,oBAAoB,MAAM,mBAAmB,CAAA;AACzD,OAAO,KAAK,kBAAkB,MAAM,iBAAiB,CAAA;AACrD,OAAO,KAAK,2BAA2B,MAAM,0BAA0B,CAAA;AACvE,OAAO,KAAK,mBAAmB,MAAM,iCAAiC,CAAA;AACtE,OAAO,KAAK,oBAAoB,MAAM,mBAAmB,CAAA;AACzD,OAAO,KAAK,gBAAgB,MAAM,eAAe,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,eAAO,MAAM,WAAW,mCAAmC,CAAA;AAC3D,4CAA4C;AAC5C,eAAO,MAAM,gBAAgB,wCAAwC,CAAA;AACrE,0DAA0D;AAC1D,eAAO,MAAM,kBAAkB,0CAA0C,CAAA;AACzE,4DAA4D;AAC5D,eAAO,MAAM,oBAAoB,4CAA4C,CAAA;AAC7E,oEAAoE;AACpE,eAAO,MAAM,iBAAiB,yCAAyC,CAAA;AACvE,iCAAiC;AACjC,eAAO,MAAM,eAAe,uCAAuC,CAAA;AACnE,+BAA+B;AAC/B,eAAO,MAAM,eAAe,uCAAuC,CAAA;AACnE,kCAAkC;AAClC,eAAO,MAAM,iBAAiB,yCAAyC,CAAA;AACvE,oCAAoC;AACpC,eAAO,MAAM,gBAAgB,wCAAwC,CAAA;AACrE,gCAAgC;AAChC,eAAO,MAAM,gBAAgB,wCAAwC,CAAA;AACrE,gCAAgC;AAChC,eAAO,MAAM,gBAAgB,wCAAwC,CAAA"}
|
@@ -41,7 +41,7 @@ export interface SelfLabel {
|
|
41
41
|
}
|
42
42
|
export declare function isSelfLabel(v: unknown): v is SelfLabel;
|
43
43
|
export declare function validateSelfLabel(v: unknown): ValidationResult;
|
44
|
-
/** Declares a label value and its expected
|
44
|
+
/** Declares a label value and its expected interpretations and behaviors. */
|
45
45
|
export interface LabelValueDefinition {
|
46
46
|
/** The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+). */
|
47
47
|
identifier: string;
|
@@ -6,6 +6,10 @@ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
|
|
6
6
|
export interface QueryParams {
|
7
7
|
/** The DID of the service that the token will be used to authenticate with */
|
8
8
|
aud: string;
|
9
|
+
/** The time in Unix Epoch seconds that the JWT expires. Defaults to 60 seconds in the future. The service may enforce certain time bounds on tokens depending on the requested scope. */
|
10
|
+
exp?: number;
|
11
|
+
/** Lexicon (XRPC) method to bind the requested token to */
|
12
|
+
lxm?: string;
|
9
13
|
}
|
10
14
|
export type InputSchema = undefined;
|
11
15
|
export interface OutputSchema {
|
@@ -23,6 +27,7 @@ export interface HandlerSuccess {
|
|
23
27
|
export interface HandlerError {
|
24
28
|
status: number;
|
25
29
|
message?: string;
|
30
|
+
error?: 'BadExpiration';
|
26
31
|
}
|
27
32
|
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
|
28
33
|
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getServiceAuth.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/getServiceAuth.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAEtE,MAAM,WAAW,WAAW;IAC1B,8EAA8E;IAC9E,GAAG,EAAE,MAAM,CAAA;
|
1
|
+
{"version":3,"file":"getServiceAuth.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/getServiceAuth.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAEtE,MAAM,WAAW,WAAW;IAC1B,8EAA8E;IAC9E,GAAG,EAAE,MAAM,CAAA;IACX,yLAAyL;IACzL,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,2DAA2D;IAC3D,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,eAAe,CAAA;CACxB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAC9E,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;CACtB,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
|
package/dist/pipethrough.d.ts
CHANGED
@@ -5,13 +5,21 @@ import { LexValue } from '@atproto/lexicon';
|
|
5
5
|
import { CatchallHandler, HandlerPipeThrough } from '@atproto/xrpc-server';
|
6
6
|
import AppContext from './context';
|
7
7
|
export declare const proxyHandler: (ctx: AppContext) => CatchallHandler;
|
8
|
-
export declare const pipethrough: (ctx: AppContext, req: express.Request, requester: string | null,
|
8
|
+
export declare const pipethrough: (ctx: AppContext, req: express.Request, requester: string | null, override?: {
|
9
|
+
aud?: string;
|
10
|
+
lxm?: string;
|
11
|
+
}) => Promise<HandlerPipeThrough>;
|
9
12
|
export declare const pipethroughProcedure: (ctx: AppContext, req: express.Request, requester: string | null, body?: LexValue) => Promise<HandlerPipeThrough>;
|
10
13
|
export declare const formatUrlAndAud: (ctx: AppContext, req: express.Request, audOverride?: string) => Promise<{
|
11
14
|
url: URL;
|
12
15
|
aud: string;
|
16
|
+
nsid: string;
|
13
17
|
}>;
|
14
|
-
export declare const formatHeaders: (ctx: AppContext, req: express.Request,
|
18
|
+
export declare const formatHeaders: (ctx: AppContext, req: express.Request, opts: {
|
19
|
+
aud: string;
|
20
|
+
lxm: string;
|
21
|
+
requester: string | null;
|
22
|
+
}) => Promise<{
|
15
23
|
authorization?: string;
|
16
24
|
}>;
|
17
25
|
export declare const parseProxyHeader: (ctx: AppContext, req: express.Request) => Promise<{
|
@@ -25,5 +33,6 @@ export declare const parseProxyRes: (res: Response) => Promise<{
|
|
25
33
|
buffer: ArrayBuffer;
|
26
34
|
headers: Record<string, string>;
|
27
35
|
}>;
|
36
|
+
export declare const PRIVILEGED_METHODS: Set<string>;
|
28
37
|
export declare const parseRes: <T>(nsid: string, res: HandlerPipeThrough) => T;
|
29
38
|
//# sourceMappingURL=pipethrough.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipethrough.d.ts","sourceRoot":"","sources":["../src/pipethrough.ts"],"names":[],"mappings":";;AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EAAE,QAAQ,EAA2B,MAAM,kBAAkB,CAAA;AACpE,OAAO,EACL,eAAe,EACf,kBAAkB,EAEnB,MAAM,sBAAsB,CAAA;AAK7B,OAAO,UAAU,MAAM,WAAW,CAAA;
|
1
|
+
{"version":3,"file":"pipethrough.d.ts","sourceRoot":"","sources":["../src/pipethrough.ts"],"names":[],"mappings":";;AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EAAE,QAAQ,EAA2B,MAAM,kBAAkB,CAAA;AACpE,OAAO,EACL,eAAe,EACf,kBAAkB,EAEnB,MAAM,sBAAsB,CAAA;AAK7B,OAAO,UAAU,MAAM,WAAW,CAAA;AAGlC,eAAO,MAAM,YAAY,QAAS,UAAU,KAAG,eAwB9C,CAAA;AAED,eAAO,MAAM,WA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) {
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
27
27
|
};
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
-
exports.parseRes = exports.parseProxyRes = exports.pipeProxyRes = exports.makeRequest = exports.parseProxyHeader = exports.formatHeaders = exports.formatUrlAndAud = exports.pipethroughProcedure = exports.pipethrough = exports.proxyHandler = void 0;
|
29
|
+
exports.parseRes = exports.PRIVILEGED_METHODS = exports.parseProxyRes = exports.pipeProxyRes = exports.makeRequest = exports.parseProxyHeader = exports.formatHeaders = exports.formatUrlAndAud = exports.pipethroughProcedure = exports.pipethrough = exports.proxyHandler = void 0;
|
30
30
|
const ui8 = __importStar(require("uint8arrays"));
|
31
31
|
const node_net_1 = __importDefault(require("node:net"));
|
32
32
|
const node_stream_1 = __importDefault(require("node:stream"));
|
@@ -36,13 +36,21 @@ const xrpc_1 = require("@atproto/xrpc");
|
|
36
36
|
const lexicons_1 = require("./lexicon/lexicons");
|
37
37
|
const logger_1 = require("./logger");
|
38
38
|
const common_1 = require("@atproto/common");
|
39
|
+
const xrpc_server_2 = require("@atproto/xrpc-server");
|
39
40
|
const proxyHandler = (ctx) => {
|
40
41
|
const accessStandard = ctx.authVerifier.accessStandard();
|
41
42
|
return async (req, res, next) => {
|
42
43
|
try {
|
43
|
-
const { url, aud } = await (0, exports.formatUrlAndAud)(ctx, req);
|
44
|
+
const { url, aud, nsid } = await (0, exports.formatUrlAndAud)(ctx, req);
|
44
45
|
const auth = await accessStandard({ req });
|
45
|
-
|
46
|
+
if (!auth.credentials.isPrivileged && exports.PRIVILEGED_METHODS.has(nsid)) {
|
47
|
+
throw new xrpc_server_1.InvalidRequestError('Bad token method', 'InvalidToken');
|
48
|
+
}
|
49
|
+
const headers = await (0, exports.formatHeaders)(ctx, req, {
|
50
|
+
aud,
|
51
|
+
lxm: nsid,
|
52
|
+
requester: auth.credentials.did,
|
53
|
+
});
|
46
54
|
const body = node_stream_1.default.Readable.toWeb(req);
|
47
55
|
const reqInit = formatReqInit(req, headers, body);
|
48
56
|
const proxyRes = await (0, exports.makeRequest)(url, reqInit);
|
@@ -55,17 +63,18 @@ const proxyHandler = (ctx) => {
|
|
55
63
|
};
|
56
64
|
};
|
57
65
|
exports.proxyHandler = proxyHandler;
|
58
|
-
const pipethrough = async (ctx, req, requester,
|
59
|
-
const { url, aud } = await (0, exports.formatUrlAndAud)(ctx, req,
|
60
|
-
const
|
66
|
+
const pipethrough = async (ctx, req, requester, override = {}) => {
|
67
|
+
const { url, aud, nsid } = await (0, exports.formatUrlAndAud)(ctx, req, override.aud);
|
68
|
+
const lxm = override.lxm ?? nsid;
|
69
|
+
const headers = await (0, exports.formatHeaders)(ctx, req, { aud, lxm, requester });
|
61
70
|
const reqInit = formatReqInit(req, headers);
|
62
71
|
const res = await (0, exports.makeRequest)(url, reqInit);
|
63
72
|
return (0, exports.parseProxyRes)(res);
|
64
73
|
};
|
65
74
|
exports.pipethrough = pipethrough;
|
66
75
|
const pipethroughProcedure = async (ctx, req, requester, body) => {
|
67
|
-
const { url, aud } = await (0, exports.formatUrlAndAud)(ctx, req);
|
68
|
-
const headers = await (0, exports.formatHeaders)(ctx, req, aud, requester);
|
76
|
+
const { url, aud, nsid: lxm } = await (0, exports.formatUrlAndAud)(ctx, req);
|
77
|
+
const headers = await (0, exports.formatHeaders)(ctx, req, { aud, lxm, requester });
|
69
78
|
const encodedBody = body
|
70
79
|
? new TextEncoder().encode((0, lexicon_1.stringifyLex)(body))
|
71
80
|
: undefined;
|
@@ -84,7 +93,8 @@ const REQ_HEADERS_TO_FORWARD = [
|
|
84
93
|
];
|
85
94
|
const formatUrlAndAud = async (ctx, req, audOverride) => {
|
86
95
|
const proxyTo = await (0, exports.parseProxyHeader)(ctx, req);
|
87
|
-
const
|
96
|
+
const nsid = (0, xrpc_server_2.parseReqNsid)(req);
|
97
|
+
const defaultProxy = defaultService(ctx, nsid);
|
88
98
|
const serviceUrl = proxyTo?.serviceUrl ?? defaultProxy?.url;
|
89
99
|
const aud = audOverride ?? proxyTo?.did ?? defaultProxy?.did;
|
90
100
|
if (!serviceUrl || !aud) {
|
@@ -94,12 +104,13 @@ const formatUrlAndAud = async (ctx, req, audOverride) => {
|
|
94
104
|
if (!ctx.cfg.service.devMode && !isSafeUrl(url)) {
|
95
105
|
throw new xrpc_server_1.InvalidRequestError(`Invalid service url: ${url.toString()}`);
|
96
106
|
}
|
97
|
-
return { url, aud };
|
107
|
+
return { url, aud, nsid };
|
98
108
|
};
|
99
109
|
exports.formatUrlAndAud = formatUrlAndAud;
|
100
|
-
const formatHeaders = async (ctx, req,
|
110
|
+
const formatHeaders = async (ctx, req, opts) => {
|
111
|
+
const { aud, lxm, requester } = opts;
|
101
112
|
const headers = requester
|
102
|
-
? (await ctx.serviceAuthHeaders(requester, aud)).headers
|
113
|
+
? (await ctx.serviceAuthHeaders(requester, aud, lxm)).headers
|
103
114
|
: {};
|
104
115
|
// forward select headers to upstream services
|
105
116
|
for (const header of REQ_HEADERS_TO_FORWARD) {
|
@@ -220,8 +231,24 @@ const parseProxyRes = async (res) => {
|
|
220
231
|
exports.parseProxyRes = parseProxyRes;
|
221
232
|
// Utils
|
222
233
|
// -------------------
|
223
|
-
|
224
|
-
|
234
|
+
exports.PRIVILEGED_METHODS = new Set([
|
235
|
+
lexicons_1.ids.ChatBskyActorDeleteAccount,
|
236
|
+
lexicons_1.ids.ChatBskyActorExportAccountData,
|
237
|
+
lexicons_1.ids.ChatBskyConvoDeleteMessageForSelf,
|
238
|
+
lexicons_1.ids.ChatBskyConvoGetConvo,
|
239
|
+
lexicons_1.ids.ChatBskyConvoGetConvoForMembers,
|
240
|
+
lexicons_1.ids.ChatBskyConvoGetLog,
|
241
|
+
lexicons_1.ids.ChatBskyConvoGetMessages,
|
242
|
+
lexicons_1.ids.ChatBskyConvoLeaveConvo,
|
243
|
+
lexicons_1.ids.ChatBskyConvoListConvos,
|
244
|
+
lexicons_1.ids.ChatBskyConvoMuteConvo,
|
245
|
+
lexicons_1.ids.ChatBskyConvoSendMessage,
|
246
|
+
lexicons_1.ids.ChatBskyConvoSendMessageBatch,
|
247
|
+
lexicons_1.ids.ChatBskyConvoUnmuteConvo,
|
248
|
+
lexicons_1.ids.ChatBskyConvoUpdateRead,
|
249
|
+
lexicons_1.ids.ComAtprotoServerCreateAccount,
|
250
|
+
]);
|
251
|
+
const defaultService = (ctx, nsid) => {
|
225
252
|
switch (nsid) {
|
226
253
|
case lexicons_1.ids.ToolsOzoneTeamAddMember:
|
227
254
|
case lexicons_1.ids.ToolsOzoneTeamDeleteMember:
|
package/dist/pipethrough.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipethrough.js","sourceRoot":"","sources":["../src/pipethrough.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,iDAAkC;AAClC,wDAA0B;AAC1B,8DAAgC;AAEhC,8CAAoE;AACpE,sDAI6B;AAC7B,wCAAuD;AACvD,iDAAkD;AAClD,qCAAqC;AACrC,4CAAqE;AAG9D,MAAM,YAAY,GAAG,CAAC,GAAe,EAAmB,EAAE;IAC/D,MAAM,cAAc,GAAG,GAAG,CAAC,YAAY,CAAC,cAAc,EAAE,CAAA;IACxD,OAAO,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC9B,IAAI,CAAC;YACH,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,MAAM,IAAA,uBAAe,EAAC,GAAG,EAAE,GAAG,CAAC,CAAA;YACpD,MAAM,IAAI,GAAG,MAAM,cAAc,CAAC,EAAE,GAAG,EAAE,CAAC,CAAA;YAC1C,MAAM,OAAO,GAAG,MAAM,IAAA,qBAAa,EAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA;YACxE,MAAM,IAAI,GACR,qBAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;YAC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AAC,GAAG,EAAE,GAAG,CAAC,IAAI,OAAO,EAAE,CAAC;QACjC,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAA;IACnB,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC,CAAA"}
|
@@ -36,7 +36,7 @@ export declare class LocalViewer {
|
|
36
36
|
appviewCdnUrlPattern?: string;
|
37
37
|
}): LocalViewerCreator;
|
38
38
|
getImageUrl(pattern: CommonSignedUris, cid: string): string;
|
39
|
-
serviceAuthHeaders(did: string): Promise<{
|
39
|
+
serviceAuthHeaders(did: string, lxm: string): Promise<{
|
40
40
|
headers: {
|
41
41
|
authorization: string;
|
42
42
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"viewer.d.ts","sourceRoot":"","sources":["../../src/read-after-write/viewer.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAEvC,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,qCAAqC,CAAA;AAC1E,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,yCAAyC,CAAA;AAEjF,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,mBAAmB,EACpB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EACL,YAAY,EAEZ,QAAQ,EACT,MAAM,qCAAqC,CAAA;AAE5C,OAAO,EACL,IAAI,IAAI,WAAW,EAEpB,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EACL,IAAI,IAAI,aAAa,EAEtB,MAAM,0CAA0C,CAAA;AACjD,OAAO,EACL,IAAI,IAAI,WAAW,EAEnB,IAAI,IAAI,eAAe,EAExB,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EACL,IAAI,IAAI,oBAAoB,EAE7B,MAAM,iDAAiD,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC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,GACpB,gBAAgB;IAUnB,iBAAiB,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,GAAG,WAAW;IAOxE,qBAAqB,CACnB,IAAI,EAAE,mBAAmB,EACzB,MAAM,EAAE,aAAa,GACpB,mBAAmB;CAQvB;AAED,eAAO,MAAM,kBAAkB,eACjB,gBAAgB,OACvB,MAAM,KACV,QAAQ,YAAY,CA0CtB,CAAA"}
|
@@ -77,7 +77,7 @@ class LocalViewer {
|
|
77
77
|
}
|
78
78
|
return util_1.default.format(this.appviewCdnUrlPattern, pattern, this.did, cid);
|
79
79
|
}
|
80
|
-
async serviceAuthHeaders(did) {
|
80
|
+
async serviceAuthHeaders(did, lxm) {
|
81
81
|
if (!this.appviewDid) {
|
82
82
|
throw new Error('Could not find bsky appview did');
|
83
83
|
}
|
@@ -85,6 +85,7 @@ class LocalViewer {
|
|
85
85
|
return (0, xrpc_server_1.createServiceAuthHeaders)({
|
86
86
|
iss: did,
|
87
87
|
aud: this.appviewDid,
|
88
|
+
lxm,
|
88
89
|
keypair,
|
89
90
|
});
|
90
91
|
}
|
@@ -219,7 +220,7 @@ class LocalViewer {
|
|
219
220
|
}
|
220
221
|
const collection = new syntax_1.AtUri(embed.record.uri).collection;
|
221
222
|
if (collection === lexicons_1.ids.AppBskyFeedPost) {
|
222
|
-
const res = await this.appViewAgent.api.app.bsky.feed.getPosts({ uris: [embed.record.uri] }, await this.serviceAuthHeaders(this.did));
|
223
|
+
const res = await this.appViewAgent.api.app.bsky.feed.getPosts({ uris: [embed.record.uri] }, await this.serviceAuthHeaders(this.did, lexicons_1.ids.AppBskyFeedGetPosts));
|
223
224
|
const post = res.data.posts[0];
|
224
225
|
if (!post)
|
225
226
|
return null;
|
@@ -235,14 +236,14 @@ class LocalViewer {
|
|
235
236
|
};
|
236
237
|
}
|
237
238
|
else if (collection === lexicons_1.ids.AppBskyFeedGenerator) {
|
238
|
-
const res = await this.appViewAgent.api.app.bsky.feed.getFeedGenerator({ feed: embed.record.uri }, await this.serviceAuthHeaders(this.did));
|
239
|
+
const res = await this.appViewAgent.api.app.bsky.feed.getFeedGenerator({ feed: embed.record.uri }, await this.serviceAuthHeaders(this.did, lexicons_1.ids.AppBskyFeedGetFeedGenerator));
|
239
240
|
return {
|
240
241
|
$type: 'app.bsky.feed.defs#generatorView',
|
241
242
|
...res.data.view,
|
242
243
|
};
|
243
244
|
}
|
244
245
|
else if (collection === lexicons_1.ids.AppBskyGraphList) {
|
245
|
-
const res = await this.appViewAgent.api.app.bsky.graph.getList({ list: embed.record.uri }, await this.serviceAuthHeaders(this.did));
|
246
|
+
const res = await this.appViewAgent.api.app.bsky.graph.getList({ list: embed.record.uri }, await this.serviceAuthHeaders(this.did, lexicons_1.ids.AppBskyGraphGetList));
|
246
247
|
return {
|
247
248
|
$type: 'app.bsky.graph.defs#listView',
|
248
249
|
...res.data.list,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"viewer.js","sourceRoot":"","sources":["../../src/read-after-write/viewer.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAuB;AACvB,0CAAsC;AACtC,4CAAuD;AACvD,wCAA+C;AAE/C,sDAA+D;AAG/D,kDAAyC;AAYzC,mEAG+C;AAC/C,uEAGiD;AACjD,mEAK+C;AAC/C,qFAGwD;AASxD,MAAa,WAAW;IAStB,YAAY,MAOX;QAfD;;;;;WAAW;QACX;;;;;WAA4B;QAC5B;;;;;WAA8B;QAC9B;;;;;WAAmB;QACnB;;;;;WAAuB;QACvB;;;;;WAAmB;QACnB;;;;;WAA6B;QAU3B,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,CAAA;QAChC,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAA;QACnC,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAA;QAC3C,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAA;QACrC,IAAI,CAAC,YAAY,GAAG,MAAM,CA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mBAAmB;YACnD,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,MAAM,EAC5B,CAAC;YACD,GAAG,CAAC,OAAO,GAAG,QAAyC,CAAA;QACzD,CAAC;aAAM,IAAI,QAAQ,CAAC,GAAG,CAAC,UAAU,KAAK,cAAG,CAAC,eAAe,EAAE,CAAC;YAC3D,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,QAAsC,CAAC,CAAA;QACxD,CAAC;QACD,GAAG,CAAC,KAAK,EAAE,CAAA;QACX,OAAO,GAAG,CAAA;IACZ,CAAC,EACD,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAkB,CACvD,CAAA;AACH,CAAC,CAAA;AA7CY,QAAA,kBAAkB,sBA6C9B"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atproto/pds",
|
3
|
-
"version": "0.4.
|
3
|
+
"version": "0.4.46",
|
4
4
|
"license": "MIT",
|
5
5
|
"description": "Reference implementation of atproto Personal Data Server (PDS)",
|
6
6
|
"keywords": [
|
@@ -44,7 +44,7 @@
|
|
44
44
|
"uint8arrays": "3.0.0",
|
45
45
|
"zod": "^3.23.8",
|
46
46
|
"@atproto-labs/fetch-node": "0.1.0",
|
47
|
-
"@atproto/api": "^0.12.
|
47
|
+
"@atproto/api": "^0.12.29",
|
48
48
|
"@atproto/aws": "^0.2.1",
|
49
49
|
"@atproto/common": "^0.4.1",
|
50
50
|
"@atproto/crypto": "^0.4.0",
|
@@ -54,7 +54,7 @@
|
|
54
54
|
"@atproto/repo": "^0.4.1",
|
55
55
|
"@atproto/syntax": "^0.3.0",
|
56
56
|
"@atproto/xrpc": "^0.5.0",
|
57
|
-
"@atproto/xrpc-server": "^0.
|
57
|
+
"@atproto/xrpc-server": "^0.6.0"
|
58
58
|
},
|
59
59
|
"devDependencies": {
|
60
60
|
"@atproto/pds-entryway": "npm:@atproto/pds@0.3.0-entryway.3",
|
@@ -72,8 +72,8 @@
|
|
72
72
|
"jest": "^28.1.2",
|
73
73
|
"ts-node": "^10.8.2",
|
74
74
|
"ws": "^8.12.0",
|
75
|
-
"@atproto/api": "^0.12.
|
76
|
-
"@atproto/bsky": "^0.0.
|
75
|
+
"@atproto/api": "^0.12.29",
|
76
|
+
"@atproto/bsky": "^0.0.73",
|
77
77
|
"@atproto/lex-cli": "^0.4.0"
|
78
78
|
},
|
79
79
|
"scripts": {
|
@@ -85,7 +85,7 @@
|
|
85
85
|
"test:sqlite": "jest",
|
86
86
|
"test:sqlite-only": "jest --testPathIgnorePatterns /tests/proxied/*",
|
87
87
|
"test:log": "tail -50 test.log | pino-pretty",
|
88
|
-
"test:updateSnapshot": "jest --updateSnapshot",
|
88
|
+
"test:updateSnapshot": "../dev-infra/with-test-redis-and-db.sh jest --updateSnapshot",
|
89
89
|
"migration:create": "ts-node ./bin/migration-create.ts"
|
90
90
|
}
|
91
91
|
}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { Server } from '../../../../lexicon'
|
2
2
|
import AppContext from '../../../../context'
|
3
3
|
import { pipethrough } from '../../../../pipethrough'
|
4
|
+
import { ids } from '../../../../lexicon/lexicons'
|
4
5
|
|
5
6
|
export default function (server: Server, ctx: AppContext) {
|
6
7
|
const { appViewAgent } = ctx
|
@@ -14,9 +15,15 @@ export default function (server: Server, ctx: AppContext) {
|
|
14
15
|
const { data: feed } =
|
15
16
|
await appViewAgent.api.app.bsky.feed.getFeedGenerator(
|
16
17
|
{ feed: params.feed },
|
17
|
-
await ctx.appviewAuthHeaders(
|
18
|
+
await ctx.appviewAuthHeaders(
|
19
|
+
requester,
|
20
|
+
ids.AppBskyFeedGetFeedGenerator,
|
21
|
+
),
|
18
22
|
)
|
19
|
-
return pipethrough(ctx, req, requester,
|
23
|
+
return pipethrough(ctx, req, requester, {
|
24
|
+
aud: feed.view.did,
|
25
|
+
lxm: ids.AppBskyFeedGetFeedSkeleton,
|
26
|
+
})
|
20
27
|
},
|
21
28
|
})
|
22
29
|
}
|
@@ -22,6 +22,7 @@ import {
|
|
22
22
|
formatMungedResponse,
|
23
23
|
} from '../../../../read-after-write'
|
24
24
|
import { pipethrough } from '../../../../pipethrough'
|
25
|
+
import { ids } from '../../../../lexicon/lexicons'
|
25
26
|
|
26
27
|
const METHOD_NSID = 'app.bsky.feed.getPostThread'
|
27
28
|
|
@@ -189,7 +190,7 @@ const readAfterWriteNotFound = async (
|
|
189
190
|
assert(ctx.appViewAgent)
|
190
191
|
const parentsRes = await ctx.appViewAgent.api.app.bsky.feed.getPostThread(
|
191
192
|
{ uri: highestParent, parentHeight: params.parentHeight, depth: 0 },
|
192
|
-
await ctx.appviewAuthHeaders(requester),
|
193
|
+
await ctx.appviewAuthHeaders(requester, ids.AppBskyFeedGetPostThread),
|
193
194
|
)
|
194
195
|
thread.parent = parentsRes.data.thread
|
195
196
|
} catch (err) {
|
@@ -5,6 +5,7 @@ import { InvalidRequestError } from '@atproto/xrpc-server'
|
|
5
5
|
import { AtpAgent } from '@atproto/api'
|
6
6
|
import { getDidDoc } from '../util/resolver'
|
7
7
|
import { AuthScope } from '../../../../auth-verifier'
|
8
|
+
import { ids } from '../../../../lexicon/lexicons'
|
8
9
|
|
9
10
|
export default function (server: Server, ctx: AppContext) {
|
10
11
|
const { appViewAgent } = ctx
|
@@ -19,7 +20,11 @@ export default function (server: Server, ctx: AppContext) {
|
|
19
20
|
credentials: { did },
|
20
21
|
} = auth
|
21
22
|
|
22
|
-
const authHeaders = await ctx.serviceAuthHeaders(
|
23
|
+
const authHeaders = await ctx.serviceAuthHeaders(
|
24
|
+
did,
|
25
|
+
serviceDid,
|
26
|
+
ids.AppBskyNotificationRegisterPush,
|
27
|
+
)
|
23
28
|
|
24
29
|
if (ctx.cfg.bskyAppView?.did === serviceDid) {
|
25
30
|
await appViewAgent.api.app.bsky.notification.registerPush(input.body, {
|
@@ -3,6 +3,7 @@ import { InvalidRequestError } from '@atproto/xrpc-server'
|
|
3
3
|
import { Server } from '../../../../lexicon'
|
4
4
|
import AppContext from '../../../../context'
|
5
5
|
import { resultPassthru } from '../../../proxy'
|
6
|
+
import { ids } from '../../../../lexicon/lexicons'
|
6
7
|
|
7
8
|
export default function (server: Server, ctx: AppContext) {
|
8
9
|
server.com.atproto.admin.sendEmail({
|
@@ -29,7 +30,8 @@ export default function (server: Server, ctx: AppContext) {
|
|
29
30
|
encoding: 'application/json',
|
30
31
|
...(await ctx.serviceAuthHeaders(
|
31
32
|
recipientDid,
|
32
|
-
ctx.cfg.entryway
|
33
|
+
ctx.cfg.entryway.did,
|
34
|
+
ids.ComAtprotoAdminSendEmail,
|
33
35
|
)),
|
34
36
|
}),
|
35
37
|
)
|
@@ -6,7 +6,7 @@ import { BlobMetadata } from '../../../../actor-store/blob/transactor'
|
|
6
6
|
|
7
7
|
export default function (server: Server, ctx: AppContext) {
|
8
8
|
server.com.atproto.repo.uploadBlob({
|
9
|
-
auth: ctx.authVerifier.
|
9
|
+
auth: ctx.authVerifier.accessOrUserServiceAuth({
|
10
10
|
checkTakedown: true,
|
11
11
|
}),
|
12
12
|
rateLimit: {
|
@@ -20,9 +20,9 @@ export default function (server: Server, ctx: AppContext) {
|
|
20
20
|
durationMs: 5 * MINUTE,
|
21
21
|
points: 100,
|
22
22
|
},
|
23
|
-
auth: ctx.authVerifier.
|
23
|
+
auth: ctx.authVerifier.userServiceAuthOptional,
|
24
24
|
handler: async ({ input, auth, req }) => {
|
25
|
-
const requester = auth.credentials?.
|
25
|
+
const requester = auth.credentials?.did ?? null
|
26
26
|
const {
|
27
27
|
did,
|
28
28
|
handle,
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import { createServiceJwt } from '@atproto/xrpc-server'
|
1
|
+
import { InvalidRequestError, createServiceJwt } from '@atproto/xrpc-server'
|
2
|
+
import { MINUTE } from '@atproto/common'
|
2
3
|
import AppContext from '../../../../context'
|
3
4
|
import { Server } from '../../../../lexicon'
|
4
5
|
|
@@ -8,9 +9,27 @@ export default function (server: Server, ctx: AppContext) {
|
|
8
9
|
handler: async ({ params, auth }) => {
|
9
10
|
const did = auth.credentials.did
|
10
11
|
const keypair = await ctx.actorStore.keypair(did)
|
12
|
+
const exp = params.exp ? params.exp * 1000 : undefined
|
13
|
+
if (exp) {
|
14
|
+
const diff = exp - Date.now()
|
15
|
+
if (diff < 0) {
|
16
|
+
throw new InvalidRequestError(
|
17
|
+
'expiration is in past',
|
18
|
+
'BadExpiration',
|
19
|
+
)
|
20
|
+
} else if (diff > MINUTE) {
|
21
|
+
throw new InvalidRequestError(
|
22
|
+
'cannot request a token with an expiration more than a minute in the future',
|
23
|
+
'BadExpiration',
|
24
|
+
)
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
11
28
|
const token = await createServiceJwt({
|
12
29
|
iss: did,
|
13
30
|
aud: params.aud,
|
31
|
+
lxm: params.lxm ?? null,
|
32
|
+
exp,
|
14
33
|
keypair,
|
15
34
|
})
|
16
35
|
return {
|
package/src/api/index.ts
CHANGED
@@ -1,12 +1,10 @@
|
|
1
1
|
import { Server } from '../lexicon'
|
2
2
|
import comAtproto from './com/atproto'
|
3
3
|
import appBsky from './app/bsky'
|
4
|
-
import chat from './chat'
|
5
4
|
import AppContext from '../context'
|
6
5
|
|
7
6
|
export default function (server: Server, ctx: AppContext) {
|
8
7
|
comAtproto(server, ctx)
|
9
8
|
appBsky(server, ctx)
|
10
|
-
chat(server, ctx)
|
11
9
|
return server
|
12
10
|
}
|