@aithos/sdk 0.1.0-alpha.50 → 0.1.0-alpha.52
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/src/assets.d.ts
CHANGED
|
@@ -35,8 +35,9 @@
|
|
|
35
35
|
*/
|
|
36
36
|
import { type AssetMetadata, type AssetReference } from "@aithos/assets-crypto";
|
|
37
37
|
export interface CreateAssetsClientArgs {
|
|
38
|
-
/** Base URL of the assets PDS. Defaults to `https://
|
|
39
|
-
* production vanity domain) when omitted.
|
|
38
|
+
/** Base URL of the assets PDS. Defaults to `https://assets.aithos.be` (the
|
|
39
|
+
* production vanity domain — SEPARATE from the data PDS) when omitted.
|
|
40
|
+
* Override for self-hosting/staging. */
|
|
40
41
|
readonly pdsUrl?: string;
|
|
41
42
|
/** Subject DID. */
|
|
42
43
|
readonly did: string;
|
package/dist/src/assets.js
CHANGED
|
@@ -59,7 +59,7 @@ export class AssetsClient {
|
|
|
59
59
|
/** Cache: URN → AMK (recovered on first fetch, reused thereafter). */
|
|
60
60
|
#amkCache = new Map();
|
|
61
61
|
constructor(args) {
|
|
62
|
-
this.#pdsUrl = (args.pdsUrl ?? DEFAULT_SDK_ENDPOINTS.
|
|
62
|
+
this.#pdsUrl = (args.pdsUrl ?? DEFAULT_SDK_ENDPOINTS.assets).replace(/\/$/, "");
|
|
63
63
|
this.#did = args.did;
|
|
64
64
|
this.#seed = args.sphereSeed;
|
|
65
65
|
this.#verificationMethod = args.verificationMethod;
|
package/dist/src/endpoints.d.ts
CHANGED
|
@@ -18,14 +18,21 @@ export interface AithosSdkEndpoints {
|
|
|
18
18
|
*/
|
|
19
19
|
readonly web: string;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* `
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
21
|
+
* Data PDS base URL — the `aithos.data.*` sub-protocol Personal Data Store.
|
|
22
|
+
* Default `https://pds.aithos.be`. Previously every app had to pass a raw
|
|
23
|
+
* `execute-api` URL to `createDataClient`; this centralizes it on the vanity
|
|
24
|
+
* domain (CloudFront-fronted, same as the other surfaces). Used by
|
|
25
|
+
* `createDataClient` / `createDelegateDataClient` / `createAppendDataClient`.
|
|
26
|
+
* Override for self-hosting or staging.
|
|
27
27
|
*/
|
|
28
28
|
readonly pds: string;
|
|
29
|
+
/**
|
|
30
|
+
* Assets PDS base URL — the assets sub-protocol. This is a **separate** API
|
|
31
|
+
* Gateway from the data PDS (it exposes the same `/mcp/primitives/...` paths,
|
|
32
|
+
* so it needs its own host). Default `https://assets.aithos.be`. Used by
|
|
33
|
+
* `createAssetsClient`. Override for self-hosting or staging.
|
|
34
|
+
*/
|
|
35
|
+
readonly assets: string;
|
|
29
36
|
}
|
|
30
37
|
/** Production defaults. */
|
|
31
38
|
export declare const DEFAULT_SDK_ENDPOINTS: AithosSdkEndpoints;
|
package/dist/src/endpoints.js
CHANGED
|
@@ -6,6 +6,7 @@ export const DEFAULT_SDK_ENDPOINTS = {
|
|
|
6
6
|
wallet: "https://wallet.aithos.be",
|
|
7
7
|
web: "https://extract.aithos.be",
|
|
8
8
|
pds: "https://pds.aithos.be",
|
|
9
|
+
assets: "https://assets.aithos.be",
|
|
9
10
|
};
|
|
10
11
|
/** Compose the full compute-invoke URL: `${compute}/v1/invoke`. */
|
|
11
12
|
export function computeInvokeUrl(endpoints) {
|
|
@@ -25,6 +25,7 @@ describe("computeInvokeUrl", () => {
|
|
|
25
25
|
wallet: "https://wallet.aithos.be",
|
|
26
26
|
web: "https://extract.aithos.be",
|
|
27
27
|
pds: "https://pds.aithos.be",
|
|
28
|
+
assets: "https://assets.aithos.be",
|
|
28
29
|
}), "https://compute.aithos.be/v1/invoke");
|
|
29
30
|
});
|
|
30
31
|
it("trims a trailing slash on the compute base", () => {
|
|
@@ -33,6 +34,7 @@ describe("computeInvokeUrl", () => {
|
|
|
33
34
|
wallet: "https://wallet.aithos.be",
|
|
34
35
|
web: "https://extract.aithos.be",
|
|
35
36
|
pds: "https://pds.aithos.be",
|
|
37
|
+
assets: "https://assets.aithos.be",
|
|
36
38
|
}), "https://compute.aithos.be/v1/invoke");
|
|
37
39
|
});
|
|
38
40
|
});
|
|
@@ -43,6 +45,7 @@ describe("walletTopupCheckoutUrl", () => {
|
|
|
43
45
|
wallet: "https://wallet.aithos.be",
|
|
44
46
|
web: "https://extract.aithos.be",
|
|
45
47
|
pds: "https://pds.aithos.be",
|
|
48
|
+
assets: "https://assets.aithos.be",
|
|
46
49
|
}), "https://wallet.aithos.be/v1/wallet/topup/checkout");
|
|
47
50
|
});
|
|
48
51
|
});
|
|
@@ -53,6 +56,7 @@ describe("webInvokeUrl", () => {
|
|
|
53
56
|
wallet: "https://wallet.aithos.be",
|
|
54
57
|
web: "https://extract.aithos.be",
|
|
55
58
|
pds: "https://pds.aithos.be",
|
|
59
|
+
assets: "https://assets.aithos.be",
|
|
56
60
|
}), "https://extract.aithos.be/v1/invoke");
|
|
57
61
|
});
|
|
58
62
|
it("trims a trailing slash on the web base", () => {
|
|
@@ -61,6 +65,7 @@ describe("webInvokeUrl", () => {
|
|
|
61
65
|
wallet: "https://wallet.aithos.be",
|
|
62
66
|
web: "https://extract.aithos.be/",
|
|
63
67
|
pds: "https://pds.aithos.be",
|
|
68
|
+
assets: "https://assets.aithos.be",
|
|
64
69
|
}), "https://extract.aithos.be/v1/invoke");
|
|
65
70
|
});
|
|
66
71
|
});
|
package/dist/test/sdk.test.js
CHANGED
|
@@ -35,6 +35,7 @@ describe("DEFAULT_SDK_ENDPOINTS", () => {
|
|
|
35
35
|
assert.equal(DEFAULT_SDK_ENDPOINTS.wallet, "https://wallet.aithos.be");
|
|
36
36
|
assert.equal(DEFAULT_SDK_ENDPOINTS.web, "https://extract.aithos.be");
|
|
37
37
|
assert.equal(DEFAULT_SDK_ENDPOINTS.pds, "https://pds.aithos.be");
|
|
38
|
+
assert.equal(DEFAULT_SDK_ENDPOINTS.assets, "https://assets.aithos.be");
|
|
38
39
|
});
|
|
39
40
|
});
|
|
40
41
|
describe("AithosSDK constructor", () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aithos/sdk",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.52",
|
|
4
4
|
"description": "Aithos SDK — high-level TypeScript developer kit for building agentic apps on the Aithos protocol. Wraps @aithos/protocol-client and exposes the Aithos compute proxy and wallet (Stripe top-up) endpoints.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aithos",
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"@aithos/assets-crypto": ">=0.1.0-alpha.1 <0.2.0",
|
|
60
|
-
"@aithos/protocol-client": "^0.1.0-alpha.
|
|
61
|
-
"@aithos/protocol-core": ">=0.6.
|
|
60
|
+
"@aithos/protocol-client": "^0.1.0-alpha.18",
|
|
61
|
+
"@aithos/protocol-core": ">=0.6.5 <0.7.0",
|
|
62
62
|
"react": "^18.0.0 || ^19.0.0"
|
|
63
63
|
},
|
|
64
64
|
"peerDependenciesMeta": {
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@aithos/assets-crypto": "^0.1.0-alpha.1",
|
|
74
|
-
"@aithos/protocol-client": "^0.1.0-alpha.
|
|
75
|
-
"@aithos/protocol-core": ">=0.6.
|
|
74
|
+
"@aithos/protocol-client": "^0.1.0-alpha.18",
|
|
75
|
+
"@aithos/protocol-core": ">=0.6.5 <0.7.0",
|
|
76
76
|
"@types/node": "^24.12.2",
|
|
77
77
|
"fake-indexeddb": "^6.2.5",
|
|
78
78
|
"typescript": "^5.9.2"
|