@clavis.nexus/setup 2.0.0 → 3.0.0
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/README.md +56 -50
- package/dist/cli.js +58 -48
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +41 -36
- package/dist/index.js +55 -45
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +56 -46
- package/dist/mcp.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
# `@clavis.nexus/setup`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
CLI and MCP for starting an Org and an App on developers.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
A person handles the passkey, the card checkout and publishing DNS, in a browser or on their infrastructure. An agent handles order, drafts and reading status. The steps follow the Quickstart (CLI and agents) on [docs.clavis.nexus](https://docs.clavis.nexus).
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Install
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
npm install -g @clavis.nexus/setup
|
|
11
11
|
clavis status
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
To run it once without installing, use `npx -y @clavis.nexus/setup status`.
|
|
15
15
|
|
|
16
|
-
MCP
|
|
16
|
+
Example MCP configuration (Cursor and similar):
|
|
17
17
|
|
|
18
18
|
```json
|
|
19
19
|
{
|
|
@@ -31,7 +31,7 @@ MCP(Cursor 等)の例:
|
|
|
31
31
|
}
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
`clavis mcp`
|
|
34
|
+
`clavis mcp` starts the same process.
|
|
35
35
|
|
|
36
36
|
## CLI
|
|
37
37
|
|
|
@@ -41,94 +41,96 @@ export CLAVIS_ID_ORIGIN=https://id.clavis.nexus
|
|
|
41
41
|
export CLAVIS_DEVELOPERS_ORIGIN=https://developers.clavis.nexus
|
|
42
42
|
|
|
43
43
|
clavis login
|
|
44
|
-
#
|
|
45
|
-
#
|
|
44
|
+
# After the passkey in the browser, paste the JSON from developers /setup/login
|
|
45
|
+
# Non-interactive: clavis login --bridge-json-file ./bridge.json
|
|
46
|
+
# Keep the token off the command line
|
|
46
47
|
clavis status
|
|
47
48
|
clavis org-anchor-plan example.com "Example Org" --incorporation JP --accept-customer-terms
|
|
48
|
-
#
|
|
49
|
+
# passkey, then org-anchor-finish, then publish DNS, then org-verify-anchor
|
|
49
50
|
clavis org-verify-anchor --domain example.com --nonce <nonce> --incorporation JP --accept-customer-terms
|
|
50
51
|
clavis card-checkout <orgId>
|
|
51
|
-
# human.message
|
|
52
|
+
# Show the customer the consent statement in human.message, and continue only after they consent
|
|
52
53
|
clavis card-checkout <orgId> --consent-billing-data
|
|
53
54
|
clavis app-register --org <orgId> --host app.example.com --name "My App"
|
|
54
55
|
clavis app-host-plan <orgId> <appId>
|
|
55
56
|
clavis app-verify-host <orgId> <appId>
|
|
56
|
-
clavis declaration-set --org <orgId> --app <appId> --end-users "
|
|
57
|
+
clavis declaration-set --org <orgId> --app <appId> --end-users "People on our team" --use signature="Approve"
|
|
57
58
|
clavis emit-env --app <appId>
|
|
58
|
-
#
|
|
59
|
+
# optional: narrow the regions that accept new connections
|
|
59
60
|
clavis app-regions-set <orgId> <appId> --regions JP
|
|
60
61
|
```
|
|
61
62
|
|
|
62
|
-
`app-register
|
|
63
|
+
After `app-register`, the operate private key is saved at `~/.config/clavis/apps/<appId>/operate-private.jwk.json` (mode 0600). CLI and MCP JSON carry that file path.
|
|
63
64
|
|
|
64
|
-
`emit-env`
|
|
65
|
+
`emit-env` writes `app.env` (mode 0600) in the same directory, and the response returns `env_file` and `shell` (for `source`). Set `CLAVIS_TRUST_ROOT` to Clavis's Master public JWK. The value is on docs.clavis.nexus. `emit-env` checks, with the verifier, that the trust documents on the trust surface chain to that key, then writes `CLAVIS_TRUST_ROOT` into `app.env` for `@clavis.nexus/app`'s `trustRoot`.
|
|
65
66
|
|
|
66
|
-
|
|
67
|
+
The session file is `~/.config/clavis/session.json` (`CLAVIS_SESSION_PATH` changes the path).
|
|
67
68
|
|
|
68
|
-
###
|
|
69
|
+
### Login (paste)
|
|
69
70
|
|
|
70
|
-
|
|
71
|
+
The browser does not POST the token to localhost. `clavis login` opens developers at `/developers/setup/login?state=…` and takes the page's JSON (`state` and `accessToken`) on stdin or with `--bridge-json-file`. Keep the access token and the operate private key off command-line arguments. MCP `clavis_login` opens the browser on the first call and takes `bridge_json` on the second. The operate key is read from the file `app-register` wrote.
|
|
71
72
|
|
|
72
|
-
### Org
|
|
73
|
+
### Creating an Org (place of incorporation and the organisation agreement)
|
|
73
74
|
|
|
74
|
-
`org-anchor-plan`
|
|
75
|
+
`org-anchor-plan` and `org-verify-anchor` both take the following. In MCP the fields are `incorporation` and `accept_customer_terms`.
|
|
75
76
|
|
|
76
|
-
- `--incorporation`: Org
|
|
77
|
-
- `--accept-customer-terms`:
|
|
77
|
+
- `--incorporation`: the Org's place of incorporation. One of `JP`, `GB-EAW` (England and Wales), an EEA country code (for example `DE`), or `US-XX` (for example `US-DE`).
|
|
78
|
+
- `--accept-customer-terms`: records that the customer has agreed to the Customer Terms and the Data Processing Agreement (DPA) for this Org. Whether to agree is the customer's decision. Pass it after they agree. The CLI and MCP leave agreement off by default. An agent asks a person and does not set the flag itself. A response without it carries `needs_human: terms`.
|
|
78
79
|
|
|
79
|
-
|
|
80
|
+
A place of incorporation closed to new declarations right now (`closed_incorporations` on `GET /orgs/regions`) is refused by `org-anchor-plan` before the passkey. When the API returns 403 `REGION_CLOSED`, the response's `error` starts with `region_closed`.
|
|
80
81
|
|
|
81
|
-
###
|
|
82
|
+
### Declaring the place of incorporation again
|
|
82
83
|
|
|
83
|
-
|
|
84
|
+
After the Customer Terms and the DPA move to a new version, declare the place of incorporation again before a purchase.
|
|
84
85
|
|
|
85
86
|
```bash
|
|
86
87
|
clavis incorporation-set <orgId> --incorporation JP --accept-customer-terms
|
|
87
88
|
```
|
|
88
89
|
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
90
|
+
- A declaration binds to the Customer Terms and DPA versions current at that time. When the versions are newer, `incorporation.terms_current` in `clavis status` is `false`.
|
|
91
|
+
- Agreement to the new versions needs `--accept-customer-terms` (MCP: `clavis_incorporation_set`).
|
|
92
|
+
- Declaring the current place again continues even when that region is closed.
|
|
92
93
|
|
|
93
|
-
###
|
|
94
|
+
### Buying the signature card
|
|
94
95
|
|
|
95
|
-
|
|
96
|
+
After the passkey, signature-card checkout opens in the browser. A person enters the card.
|
|
96
97
|
|
|
97
98
|
```bash
|
|
98
99
|
clavis card-checkout <orgId>
|
|
99
|
-
# human.message
|
|
100
|
+
# Show the customer the consent statement in human.message, and continue only after they consent
|
|
100
101
|
clavis card-checkout <orgId> --consent-billing-data
|
|
101
102
|
```
|
|
102
103
|
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
-
|
|
104
|
+
- The place of incorporation must already be declared against the current versions. When it is missing, `error` is `incorporation_required` or `incorporation_stale`.
|
|
105
|
+
- Payment and billing need the customer's own consent to provide their Clavis account identifier, the Org ID, the feature being purchased, and, after purchase, usage of that feature (counts and times) to Polar Software Inc. in the United States. Run the command once without `--consent-billing-data`. The response's `human.message` (`needs_human: terms`) carries the consent statement and the Customer Terms and DPA versions. Show that statement to the customer, and run again with `--consent-billing-data` (MCP: `consent_billing_data: true`) only after they consent. An agent does not set the flag itself.
|
|
106
|
+
- `--lang ja` shows the consent statement in Japanese (the default is English). The purchase record is tied to the statement in the language that was shown.
|
|
107
|
+
- `--offer bundle` buys the monthly bundle. The default is metered (`meter`).
|
|
107
108
|
|
|
108
|
-
###
|
|
109
|
+
### Regions an app accepts
|
|
109
110
|
|
|
110
|
-
|
|
111
|
+
Each app can narrow the countries and regions it takes new connections from. The setting is optional.
|
|
111
112
|
|
|
112
113
|
```bash
|
|
113
114
|
clavis app-regions-set <orgId> <appId> --regions JP,US
|
|
114
|
-
# Clavis
|
|
115
|
+
# back to every region Clavis accepts
|
|
115
116
|
clavis app-regions-set <orgId> <appId> --all
|
|
116
117
|
```
|
|
117
118
|
|
|
118
|
-
-
|
|
119
|
-
-
|
|
120
|
-
-
|
|
121
|
-
-
|
|
122
|
-
-
|
|
123
|
-
-
|
|
119
|
+
- The regions are `JP`, `US`, `GB` and `EEA`. In MCP, pass `regions` or `all: true` to `clavis_app_regions_set`.
|
|
120
|
+
- The choice is limited to regions Clavis accepts right now (`app_regions` on `GET /orgs/regions`). Any other region is refused before the passkey, and `error` starts with `region_not_open`.
|
|
121
|
+
- The region is the country the connection comes from. A connection whose country cannot be determined counts as outside the chosen regions.
|
|
122
|
+
- People who are already connected keep using the app. What stops is a new agreement, a first app connection, an account link, and a signature whose request names no signer.
|
|
123
|
+
- When the same regions are already saved, the command returns `unchanged: true` and does not open a passkey.
|
|
124
|
+
- An Org owner or admin can change the list. A stopped app cannot be changed.
|
|
124
125
|
|
|
125
|
-
###
|
|
126
|
+
### What this CLI covers
|
|
126
127
|
|
|
127
|
-
- `clavis status`
|
|
128
|
-
- `clavis card-checkout`
|
|
129
|
-
- `declaration-set`
|
|
128
|
+
- `clavis status` returns the Org, apps, host confirmation, the use declaration, the app's accepted regions (`accepted_regions` only when the list is narrowed), the signature card (`signature_card_blockers` is what holds it back) and the place of incorporation. Check the ledger subscription on developers.
|
|
129
|
+
- `clavis card-checkout` opens checkout for the signature card. Subscribe to the ledger card on developers.
|
|
130
|
+
- `--use` on `declaration-set` accepts `signature` and `ledger`. The CLI takes one per run, and that declaration replaces the previous one. To declare more than one feature for one app, use the `uses` array in MCP, or developers.
|
|
131
|
+
- `clavis policy-bootstrap <orgId>` creates the Org policy, with a passkey. `app-register` runs it for you, so you need it on its own only when the policy is missing. A policy already in place returns `already_active: true` and opens no passkey.
|
|
130
132
|
|
|
131
|
-
##
|
|
133
|
+
## Library
|
|
132
134
|
|
|
133
135
|
```ts
|
|
134
136
|
import { createSetupClient } from "@clavis.nexus/setup";
|
|
@@ -137,6 +139,10 @@ const setup = createSetupClient();
|
|
|
137
139
|
const status = await setup.status();
|
|
138
140
|
```
|
|
139
141
|
|
|
140
|
-
|
|
142
|
+
When a tool response carries `needs_human: passkey | payment | dns | login | terms`, a person has to act. `terms` is an agreement only the customer can give: the Customer Terms, or providing data for a card checkout.
|
|
141
143
|
|
|
142
|
-
|
|
144
|
+
Registering a signature request and reading its completion are [`@clavis.nexus/app`](https://www.npmjs.com/package/@clavis.nexus/app).
|
|
145
|
+
|
|
146
|
+
## License
|
|
147
|
+
|
|
148
|
+
MIT. Copyright (c) 2026 DeepDive, Inc.
|
package/dist/cli.js
CHANGED
|
@@ -4,7 +4,7 @@ import { promisify } from 'util';
|
|
|
4
4
|
import { readFile, chmod, unlink, mkdir, writeFile, lstat } from 'fs/promises';
|
|
5
5
|
import path, { dirname, join, resolve, relative, isAbsolute } from 'path';
|
|
6
6
|
import { homedir } from 'os';
|
|
7
|
-
import { generateKeyPair, exportJWK,
|
|
7
|
+
import { generateKeyPair, exportJWK, jwtVerify, importJWK } from 'jose';
|
|
8
8
|
import { createInterface } from 'readline/promises';
|
|
9
9
|
import { stdin, stdout } from 'process';
|
|
10
10
|
import { randomBytes } from 'crypto';
|
|
@@ -183,19 +183,10 @@ async function postCardCheckout(apiOrigin, bearer, orgId, args) {
|
|
|
183
183
|
}
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
|
-
async function
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
});
|
|
191
|
-
if (!res.ok) throw new SetupApiError(res.status, "JWKS_FETCH", `jwks ${res.status}`);
|
|
192
|
-
return res.json();
|
|
193
|
-
}
|
|
194
|
-
async function getMasterJwkJson(apiOrigin, masterPinJson) {
|
|
195
|
-
const { verifySignedJwksDocument } = await import('@clavis.nexus/app');
|
|
196
|
-
const doc = await fetchJwksDocument(apiOrigin);
|
|
197
|
-
await verifySignedJwksDocument(doc, masterPinJson);
|
|
198
|
-
return JSON.stringify(doc.master);
|
|
186
|
+
async function checkTrustRoot(apiOrigin, trustRootJson) {
|
|
187
|
+
const { createVerifier } = await import('@clavis.nexus/app');
|
|
188
|
+
await createVerifier({ trustRoot: trustRootJson, apiOrigin }).trust();
|
|
189
|
+
return JSON.stringify(JSON.parse(trustRootJson));
|
|
199
190
|
}
|
|
200
191
|
var SetupApiError;
|
|
201
192
|
var init_org_api = __esm({
|
|
@@ -575,6 +566,17 @@ async function digestOf(value) {
|
|
|
575
566
|
const bytes = new TextEncoder().encode(canonicalStringify(value));
|
|
576
567
|
return `sha256:${bytesToBase64Url(new Uint8Array(await crypto.subtle.digest("SHA-256", bytes)))}`;
|
|
577
568
|
}
|
|
569
|
+
async function valueDigest(type, value) {
|
|
570
|
+
return digestOf({ type, value });
|
|
571
|
+
}
|
|
572
|
+
async function orgPayloadDigest(payload) {
|
|
573
|
+
let value = payload;
|
|
574
|
+
if (payload && typeof payload === "object" && !Array.isArray(payload)) {
|
|
575
|
+
const { proposer_receipt: _receipt, ...rest } = payload;
|
|
576
|
+
value = rest;
|
|
577
|
+
}
|
|
578
|
+
return valueDigest("org.payload@1", value);
|
|
579
|
+
}
|
|
578
580
|
function orgAnchorPublishStatement(input2) {
|
|
579
581
|
return { type: "org.anchor.publish@1", domain: input2.domain.trim().toLowerCase(), nonce: input2.nonce, exp: input2.exp };
|
|
580
582
|
}
|
|
@@ -582,7 +584,7 @@ function orgPolicyBootstrapStatement(input2) {
|
|
|
582
584
|
return { type: "org.policy.bootstrap@1", org: input2.org.trim(), domain: input2.domain.trim().toLowerCase() };
|
|
583
585
|
}
|
|
584
586
|
function orgAppRegisterStatement(input2) {
|
|
585
|
-
return { type: "org.app.register@1", org: input2.org.trim(), payload: input2.payload.trim()
|
|
587
|
+
return { type: "org.app.register@1", org: input2.org.trim(), payload: input2.payload.trim() };
|
|
586
588
|
}
|
|
587
589
|
function orgAppVerifyHostStatement(input2) {
|
|
588
590
|
return {
|
|
@@ -598,7 +600,7 @@ async function orgAppDeclarationStatement(input2) {
|
|
|
598
600
|
type: "org.app.declaration@1",
|
|
599
601
|
org: input2.org.trim(),
|
|
600
602
|
app: input2.app.trim(),
|
|
601
|
-
declaration: input2.declaration === null ? null : await
|
|
603
|
+
declaration: input2.declaration === null ? null : await valueDigest("app.declaration@1", { endUsers: input2.declaration.endUsers, uses: input2.declaration.uses })
|
|
602
604
|
};
|
|
603
605
|
}
|
|
604
606
|
function orgAppRegionsStatement(input2) {
|
|
@@ -635,13 +637,6 @@ function sameStatement(a, b) {
|
|
|
635
637
|
return false;
|
|
636
638
|
}
|
|
637
639
|
}
|
|
638
|
-
async function computePayloadCommitmentHex(payload) {
|
|
639
|
-
const o = payload && typeof payload === "object" ? { ...payload } : payload;
|
|
640
|
-
if (o && typeof o === "object" && !Array.isArray(o)) {
|
|
641
|
-
delete o.proposer_receipt;
|
|
642
|
-
}
|
|
643
|
-
return sha256HexUtf8(canonicalStringify(o));
|
|
644
|
-
}
|
|
645
640
|
async function hashManifestBody(body) {
|
|
646
641
|
return sha256HexUtf8(canonicalStringify(body));
|
|
647
642
|
}
|
|
@@ -657,14 +652,10 @@ var init_statements = __esm({
|
|
|
657
652
|
|
|
658
653
|
// src/ceremony.ts
|
|
659
654
|
function receiptFromCeremonyPayload(payload) {
|
|
660
|
-
if (
|
|
655
|
+
if (typeof payload !== "string" || payload.length === 0) {
|
|
661
656
|
throw new Error("Passkey confirmation did not return a receipt.");
|
|
662
657
|
}
|
|
663
|
-
|
|
664
|
-
if (o.type !== "receipt@1" || o.statement === null || typeof o.statement !== "object") {
|
|
665
|
-
throw new Error("Passkey confirmation did not return a receipt.");
|
|
666
|
-
}
|
|
667
|
-
return o;
|
|
658
|
+
return payload;
|
|
668
659
|
}
|
|
669
660
|
async function startCeremony(args) {
|
|
670
661
|
const res = await fetch(`${args.apiOrigin.replace(/\/+$/, "")}/webauthn/authentication/ceremony/start`, {
|
|
@@ -808,19 +799,17 @@ var init_operate_key_store = __esm({
|
|
|
808
799
|
|
|
809
800
|
// src/emit-env.ts
|
|
810
801
|
async function emitAppEnv(args) {
|
|
811
|
-
const pin = args.
|
|
802
|
+
const pin = args.trustRoot?.trim() || process.env.CLAVIS_TRUST_ROOT?.trim() || "";
|
|
812
803
|
if (!pin) {
|
|
813
|
-
throw new Error(
|
|
814
|
-
"CLAVIS_MASTER_PUBLIC_JWK_JSON is required. Set it to the master public JWK from GET {apiOrigin}/.well-known/jwks.json."
|
|
815
|
-
);
|
|
804
|
+
throw new Error("CLAVIS_TRUST_ROOT is required. Set it to the Clavis Master public JWK (docs.clavis.nexus).");
|
|
816
805
|
}
|
|
817
|
-
const
|
|
806
|
+
const trustRoot = await checkTrustRoot(args.origins.apiOrigin, pin);
|
|
818
807
|
const operatePath = await saveOperatePrivateJwk(args.appId, args.operatePrivateJwkJson);
|
|
819
808
|
const envRecord = {
|
|
820
809
|
CLAVIS_API_ORIGIN: args.origins.apiOrigin,
|
|
821
810
|
CLAVIS_APP_ID: args.appId,
|
|
822
811
|
OPERATE_PRIVATE_JWK: args.operatePrivateJwkJson,
|
|
823
|
-
|
|
812
|
+
CLAVIS_TRUST_ROOT: trustRoot
|
|
824
813
|
};
|
|
825
814
|
const envFile = await writeAppEnvFile(args.appId, formatEnvExport(envRecord));
|
|
826
815
|
return {
|
|
@@ -866,26 +855,47 @@ var init_keys = __esm({
|
|
|
866
855
|
"src/keys.ts"() {
|
|
867
856
|
}
|
|
868
857
|
});
|
|
858
|
+
async function sessionKey(origin, kid) {
|
|
859
|
+
const res = await fetch(`${origin}/.well-known/jwks.json`, { redirect: "error", headers: { Accept: "application/json" } });
|
|
860
|
+
if (!res.ok) throw new Error(`jwks ${res.status}`);
|
|
861
|
+
const doc = await res.json();
|
|
862
|
+
const key = (doc.keys ?? []).find((k) => k && k.kid === kid);
|
|
863
|
+
if (!key) return null;
|
|
864
|
+
const slot = Object.entries(key).find(([name]) => SLOT_FIELD.test(name))?.[1];
|
|
865
|
+
if (slot !== SESSION_SLOT) return null;
|
|
866
|
+
const jwk = {};
|
|
867
|
+
for (const m of JWK_MEMBERS) if (key[m] !== void 0) jwk[m] = key[m];
|
|
868
|
+
return importJWK(jwk, "ES256");
|
|
869
|
+
}
|
|
869
870
|
async function verifyDevelopersAccessToken(accessToken, apiOrigin) {
|
|
870
871
|
const origin = new URL(apiOrigin).origin;
|
|
871
|
-
|
|
872
|
-
const { payload
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
872
|
+
let refused = false;
|
|
873
|
+
const { payload } = await jwtVerify(
|
|
874
|
+
accessToken,
|
|
875
|
+
async (header) => {
|
|
876
|
+
const key = typeof header.kid === "string" ? await sessionKey(origin, header.kid) : null;
|
|
877
|
+
if (!key) {
|
|
878
|
+
refused = true;
|
|
879
|
+
throw new Error("invalid_access_token_kid");
|
|
880
|
+
}
|
|
881
|
+
return key;
|
|
882
|
+
},
|
|
883
|
+
{ algorithms: ["ES256"], issuer: origin, audience: origin, requiredClaims: ["exp", "iss", "aud", "sub"] }
|
|
884
|
+
).catch((e) => {
|
|
885
|
+
if (refused) throw new Error("invalid_access_token_kid");
|
|
886
|
+
throw e;
|
|
877
887
|
});
|
|
878
|
-
const kid = typeof protectedHeader.kid === "string" ? protectedHeader.kid : "";
|
|
879
|
-
if (!SESSION_SLOT_RE.test(kid)) throw new Error("invalid_access_token_kid");
|
|
880
888
|
if (payload.tk !== "access") throw new Error("invalid_access_token_kind");
|
|
881
889
|
if (typeof payload.sub !== "string" || payload.sub.length === 0) throw new Error("invalid_access_token_sub");
|
|
882
890
|
if (typeof payload.exp !== "number" || !Number.isFinite(payload.exp)) throw new Error("invalid_access_token_exp");
|
|
883
891
|
return { sub: payload.sub, expiresAt: payload.exp };
|
|
884
892
|
}
|
|
885
|
-
var
|
|
893
|
+
var SESSION_SLOT, SLOT_FIELD, JWK_MEMBERS;
|
|
886
894
|
var init_access_token_verify = __esm({
|
|
887
895
|
"src/access-token-verify.ts"() {
|
|
888
|
-
|
|
896
|
+
SESSION_SLOT = "wauthn-auth-jwt";
|
|
897
|
+
SLOT_FIELD = /^[a-z][a-z0-9]{1,31}-slot$/;
|
|
898
|
+
JWK_MEMBERS = ["kty", "crv", "x", "y", "kid", "alg"];
|
|
889
899
|
}
|
|
890
900
|
});
|
|
891
901
|
function defaultSessionPath() {
|
|
@@ -1591,7 +1601,7 @@ function createSetupClient(options = {}) {
|
|
|
1591
1601
|
operate_public_jwk: keys.publicJwk,
|
|
1592
1602
|
redirect_paths: paths
|
|
1593
1603
|
};
|
|
1594
|
-
const payload_hash = await
|
|
1604
|
+
const payload_hash = await orgPayloadDigest(manifest);
|
|
1595
1605
|
const cer = await runPasskeyCeremony({
|
|
1596
1606
|
origins: auth.data.origins,
|
|
1597
1607
|
bearer: auth.data.session.accessToken,
|
|
@@ -2142,7 +2152,7 @@ var init_mcp_server = __esm({
|
|
|
2142
2152
|
},
|
|
2143
2153
|
{
|
|
2144
2154
|
name: "clavis_emit_app_env",
|
|
2145
|
-
description: "Emit environment variables for @clavis.nexus/app after setup.",
|
|
2155
|
+
description: "Emit environment variables for @clavis.nexus/app after setup. Needs CLAVIS_TRUST_ROOT (the Clavis Master public JWK) in the environment.",
|
|
2146
2156
|
inputSchema: {
|
|
2147
2157
|
type: "object",
|
|
2148
2158
|
properties: {
|
|
@@ -2244,7 +2254,7 @@ org-anchor-plan and org-verify-anchor need both flags. --incorporation is the Or
|
|
|
2244
2254
|
A place of incorporation that is closed to new Orgs right now is refused before Passkey.
|
|
2245
2255
|
incorporation-set declares the place again after the Customer Terms change (status shows terms_current false). It needs the customer's agreement too.
|
|
2246
2256
|
card-checkout needs --consent-billing-data: the customer's consent to provide billing data to the payment provider. Run it once without the flag to get the statement to show them.
|
|
2247
|
-
Secrets stay in ~/.config/clavis/apps/<appId>/ (mode 0600). Command output includes the file path. emit-env needs
|
|
2257
|
+
Secrets stay in ~/.config/clavis/apps/<appId>/ (mode 0600). Command output includes the file path. emit-env needs CLAVIS_TRUST_ROOT set to the Clavis Master public JWK (docs.clavis.nexus); it checks that the trust documents chain to it before writing CLAVIS_TRUST_ROOT for @clavis.nexus/app.
|
|
2248
2258
|
app-regions-set chooses where the App accepts new connections from: JP, US, GB, EEA (comma-separated). --all accepts every region Clavis accepts. People already connected keep using the App.
|
|
2249
2259
|
declaration-set replaces the App's current declaration. Pass every use to keep. status reports the signature card and the place of incorporation. Ledger subscription is on developers.
|
|
2250
2260
|
|