agent-cards-admin 0.3.14 → 0.3.15
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/package.json +1 -1
- package/dist/src/commands/wizard.d.ts.map +1 -1
- package/dist/src/commands/wizard.js +35 -27
- package/dist/src/commands/wizard.js.map +1 -1
- package/dist/src/lib/wizard/onboard.d.ts.map +1 -1
- package/dist/src/lib/wizard/onboard.js +35 -24
- package/dist/src/lib/wizard/onboard.js.map +1 -1
- package/dist/src/lib/wizard/playbook.d.ts.map +1 -1
- package/dist/src/lib/wizard/playbook.js +28 -10
- package/dist/src/lib/wizard/playbook.js.map +1 -1
- package/dist/src/lib/wizard/theme.d.ts +49 -0
- package/dist/src/lib/wizard/theme.d.ts.map +1 -0
- package/dist/src/lib/wizard/theme.js +89 -0
- package/dist/src/lib/wizard/theme.js.map +1 -0
- package/package.json +1 -1
package/dist/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wizard.d.ts","sourceRoot":"","sources":["../../../src/commands/wizard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wizard.d.ts","sourceRoot":"","sources":["../../../src/commands/wizard.ts"],"names":[],"mappings":"AAcA,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CA6KtE"}
|
|
@@ -8,6 +8,7 @@ import { INTEGRATION_PLAYBOOK, buildInitialPrompt } from '../lib/wizard/playbook
|
|
|
8
8
|
import { runIntegrationAgent } from '../lib/wizard/agent.js';
|
|
9
9
|
import { ensureOnboarded } from '../lib/wizard/onboard.js';
|
|
10
10
|
import { writeAgentcardEnv } from '../lib/wizard/secrets.js';
|
|
11
|
+
import { banner, note, ui, glyph, outroSuccess, outroError } from '../lib/wizard/theme.js';
|
|
11
12
|
const MODEL = 'claude-opus-4-8';
|
|
12
13
|
/**
|
|
13
14
|
* `agent-cards-admin wizard` — runs an AI agent (the Claude Agent SDK, on OUR
|
|
@@ -18,23 +19,29 @@ const MODEL = 'claude-opus-4-8';
|
|
|
18
19
|
export async function wizardCommand(opts) {
|
|
19
20
|
const repoRoot = resolve(opts.path ?? process.cwd());
|
|
20
21
|
const appName = basename(repoRoot);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
banner('Agentcard integration wizard', [
|
|
23
|
+
'Sets up your account + credentials, then wires Connect with Agentcard',
|
|
24
|
+
"(OAuth 2.1 + PKCE) + per-user cards via MCP into this repo.",
|
|
25
|
+
"Runs on Agentcard's tokens — your secrets go to a local .env, never to the AI.",
|
|
26
|
+
]);
|
|
24
27
|
// Detect the repo up front (also gives us the app name for provisioning).
|
|
25
28
|
const detection = detectRepo(repoRoot);
|
|
26
29
|
// Phase 1 — Onboard: account → org → confidential OAuth client → sandbox key.
|
|
27
30
|
// ensureOnboarded runs the signup/login flow first if there's no session yet.
|
|
28
31
|
const prov = await ensureOnboarded(appName);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
note('Provisioned in sandbox', [
|
|
33
|
+
`org ${prov.orgName}`,
|
|
34
|
+
`client ${prov.clientId}`,
|
|
35
|
+
`api key ${prov.apiKeyPrefix}`,
|
|
36
|
+
`callback ${prov.redirectUri}`,
|
|
37
|
+
]);
|
|
33
38
|
// Phase 2 — Integrate. Show the repo + consent before writing ANY files (the env
|
|
34
39
|
// write below mutates the repo, so it must be gated by this consent too).
|
|
35
|
-
console.log(chalk.bold('Target repo: ') + repoRoot);
|
|
36
|
-
console.log(detection.summary);
|
|
37
40
|
console.log();
|
|
41
|
+
console.log(`${ui.accent(glyph.diamond)} ${ui.bold('Integrate')} ${ui.muted('·')} ${repoRoot}`);
|
|
42
|
+
for (const l of detection.summary.split('\n'))
|
|
43
|
+
console.log(`${ui.muted(glyph.gutter)} ${ui.dim(l)}`);
|
|
44
|
+
console.log(ui.muted(glyph.gutter));
|
|
38
45
|
if (!opts.yes) {
|
|
39
46
|
const { proceed } = await inquirer.prompt([
|
|
40
47
|
{
|
|
@@ -61,12 +68,12 @@ export async function wizardCommand(opts) {
|
|
|
61
68
|
...(prov.clientSecret ? { AGENTCARD_OAUTH_CLIENT_SECRET: prov.clientSecret } : {}),
|
|
62
69
|
AGENTCARD_API_KEY: prov.apiKey,
|
|
63
70
|
});
|
|
64
|
-
console.log(
|
|
71
|
+
console.log(`${ui.muted(glyph.gutter)} ${ui.success(glyph.check)} secrets written to ${ui.bold(envFile)} ${ui.dim('(kept out of the AI prompt)')}`);
|
|
65
72
|
const gatewayUrl = `${getApiUrl()}/wizard`;
|
|
66
73
|
console.log();
|
|
67
|
-
console.log(
|
|
68
|
-
console.log(
|
|
69
|
-
console.log(
|
|
74
|
+
console.log(`${ui.accent(glyph.diamond)} ${ui.bold('Running the integration agent')}`);
|
|
75
|
+
console.log(`${ui.muted(glyph.gutter)} ${ui.dim('Explores, edits files, and verifies the integration. This can take several minutes.')}`);
|
|
76
|
+
console.log(`${ui.muted(glyph.gutter)} ${ui.dim('Press')} ${ui.bold('Ctrl+B')} ${ui.dim('to toggle detailed logs (full tool inputs + outputs).')}`);
|
|
70
77
|
console.log();
|
|
71
78
|
// Live status: a spinner whose text ticks every second with the current action
|
|
72
79
|
// and elapsed time, so long model-thinking pauses never look hung. The agent's
|
|
@@ -135,13 +142,13 @@ export async function wizardCommand(opts) {
|
|
|
135
142
|
},
|
|
136
143
|
onToolStart: (name, summary, detail) => {
|
|
137
144
|
action = summary ? `${name} ${chalk.dim(summary)}` : name;
|
|
138
|
-
log(`${
|
|
145
|
+
log(`${ui.accent(glyph.arrow)} ${ui.bold(name)}${summary ? ' ' + ui.dim(summary) : ''}`);
|
|
139
146
|
if (verbose)
|
|
140
147
|
showDetail(detail);
|
|
141
148
|
},
|
|
142
149
|
onToolEnd: (name, isError, resultText) => {
|
|
143
150
|
if (isError)
|
|
144
|
-
log(`${
|
|
151
|
+
log(`${ui.error(glyph.cross)} ${ui.dim(`${name} failed`)}`);
|
|
145
152
|
if (verbose && resultText)
|
|
146
153
|
showDetail(resultText);
|
|
147
154
|
action = 'thinking';
|
|
@@ -157,23 +164,24 @@ export async function wizardCommand(opts) {
|
|
|
157
164
|
stdin.pause();
|
|
158
165
|
}
|
|
159
166
|
}
|
|
160
|
-
console.log();
|
|
161
|
-
if (result.outcome === 'success') {
|
|
162
|
-
console.log(chalk.green('✓ Integration agent finished.'));
|
|
163
|
-
}
|
|
164
|
-
else {
|
|
165
|
-
console.log(chalk.red('✗ Integration agent stopped with an error.'));
|
|
166
|
-
}
|
|
167
167
|
if (result.finalText) {
|
|
168
168
|
console.log();
|
|
169
169
|
console.log(result.finalText);
|
|
170
170
|
}
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
const turns = typeof result.numTurns === 'number' ? `${result.numTurns} turns. ` : '';
|
|
172
|
+
if (result.outcome === 'success') {
|
|
173
|
+
outroSuccess({
|
|
174
|
+
message: 'Agentcard integration complete',
|
|
175
|
+
nextSteps: [
|
|
176
|
+
`Issue a live card: open ${ui.primary(`${prov.appBaseUrl}/api/agentcard/connect?user=<id>`)} in a browser to connect a user`,
|
|
177
|
+
'Review the diff and commit when you are happy',
|
|
178
|
+
],
|
|
179
|
+
reviewNote: `${turns}Re-run \`wizard\` to continue or fix up.`,
|
|
180
|
+
});
|
|
173
181
|
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
if (result.outcome !== 'success')
|
|
182
|
+
else {
|
|
183
|
+
outroError('Integration agent stopped with an error', `${turns}See the log above; re-run \`wizard\` to retry.`);
|
|
177
184
|
process.exit(1);
|
|
185
|
+
}
|
|
178
186
|
}
|
|
179
187
|
//# sourceMappingURL=wizard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wizard.js","sourceRoot":"","sources":["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AAQ,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;IACtF,IAAI,MAAM,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;QACjC,YAAY,CAAC;YACX,OAAO,EAAE,gCAAgC;YACzC,SAAS,EAAE;gBACT,2BAA2B,EAAE,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,UAAU,kCAAkC,CAAC,iCAAiC;gBAC5H,+CAA+C;aAChD;YACD,UAAU,EAAE,GAAG,KAAK,0CAA0C;SAC/D,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,UAAU,CAAC,yCAAyC,EAAE,GAAG,KAAK,gDAAgD,CAAC,CAAC;QAChH,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onboard.d.ts","sourceRoot":"","sources":["../../../../src/lib/wizard/onboard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"onboard.d.ts","sourceRoot":"","sources":["../../../../src/lib/wizard/onboard.ts"],"names":[],"mappings":"AAQA;;;;;;;;;GASG;AACH,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;CACtB;AAoBD,kGAAkG;AAClG,eAAO,MAAM,aAAa,4BAA4B,CAAC;AAgBvD,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAsG5E"}
|
|
@@ -4,8 +4,21 @@ import chalk from 'chalk';
|
|
|
4
4
|
import { api } from '../api.js';
|
|
5
5
|
import { getJwt, getEmail, setMode, getApiUrl, clearAuth } from '../config.js';
|
|
6
6
|
import { login } from '../../commands/login.js';
|
|
7
|
+
import { step, line, row, ui } from './theme.js';
|
|
7
8
|
/** The fixed callback path the integration implements; the OAuth client is registered with it. */
|
|
8
9
|
export const CALLBACK_PATH = '/api/agentcard/callback';
|
|
10
|
+
/** Sentinel value for the "create a new organization" choice in the org picker. */
|
|
11
|
+
const CREATE_ORG = '__create_org__';
|
|
12
|
+
/** Prompt for a name and create a new organization. */
|
|
13
|
+
async function createOrgInteractive(defaultName) {
|
|
14
|
+
const { name } = await inquirer.prompt([
|
|
15
|
+
{ type: 'input', name: 'name', message: 'New organization name:', default: defaultName, validate: (v) => v.trim().length > 0 || 'Required' },
|
|
16
|
+
]);
|
|
17
|
+
const spinner = ora('Creating organization…').start();
|
|
18
|
+
const org = await api('/orgs', { method: 'POST', body: { name: String(name).trim(), billingEmail: getEmail() } });
|
|
19
|
+
spinner.succeed(chalk.green(`Organization "${org.name}" created`));
|
|
20
|
+
return org;
|
|
21
|
+
}
|
|
9
22
|
export async function ensureOnboarded(appName) {
|
|
10
23
|
// --- Step 1: account (signup / login) ---
|
|
11
24
|
// Validate any stored session first. Gate on a validity FLAG, not on getJwt() being
|
|
@@ -32,48 +45,46 @@ export async function ensureOnboarded(appName) {
|
|
|
32
45
|
sessionValid = true; // network blip — keep the token; the real call surfaces issues
|
|
33
46
|
}
|
|
34
47
|
}
|
|
48
|
+
step(1, 4, 'Account');
|
|
35
49
|
if (!sessionValid) {
|
|
36
|
-
|
|
37
|
-
console.log(chalk.dim('First time? This creates your account via a magic link.'));
|
|
50
|
+
line(ui.dim('First time? This creates your account via a magic link.'));
|
|
38
51
|
await login();
|
|
39
52
|
if (!getJwt()) {
|
|
40
|
-
|
|
53
|
+
line(ui.error('Sign-in did not complete. Run the wizard again once you have clicked the magic link.'));
|
|
41
54
|
process.exit(1);
|
|
42
55
|
}
|
|
43
56
|
}
|
|
44
57
|
else {
|
|
45
|
-
|
|
58
|
+
row('Signed in', getEmail() ?? 'your account');
|
|
46
59
|
}
|
|
47
60
|
// Everything below is provisioned in sandbox.
|
|
48
61
|
setMode('sandbox');
|
|
49
|
-
// --- Step 2: organization (reuse or create) ---
|
|
62
|
+
// --- Step 2: organization (reuse an existing one or create a new one) ---
|
|
63
|
+
step(2, 4, 'Organization');
|
|
50
64
|
const { organizations } = await api('/orgs');
|
|
51
|
-
let org
|
|
52
|
-
if (organizations.length
|
|
65
|
+
let org;
|
|
66
|
+
if (organizations.length === 0) {
|
|
67
|
+
// No org yet → create one.
|
|
68
|
+
org = await createOrgInteractive(appName);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
// Has org(s) → let them reuse one OR create a new org for this app.
|
|
53
72
|
const { picked } = await inquirer.prompt([
|
|
54
73
|
{
|
|
55
74
|
type: 'list',
|
|
56
75
|
name: 'picked',
|
|
57
|
-
message: '
|
|
58
|
-
choices:
|
|
76
|
+
message: 'Which organization is this app for?',
|
|
77
|
+
choices: [
|
|
78
|
+
...organizations.map((o) => ({ name: `${o.name}${o.billingEmail ? ` (${o.billingEmail})` : ''}`, value: o.id })),
|
|
79
|
+
new inquirer.Separator(),
|
|
80
|
+
{ name: '+ Create a new organization', value: CREATE_ORG },
|
|
81
|
+
],
|
|
59
82
|
},
|
|
60
83
|
]);
|
|
61
|
-
org = organizations.find((o) => o.id === picked);
|
|
62
|
-
}
|
|
63
|
-
else if (!org) {
|
|
64
|
-
console.log(chalk.bold('\nStep 2 · Create your organization'));
|
|
65
|
-
const { name } = await inquirer.prompt([
|
|
66
|
-
{ type: 'input', name: 'name', message: 'Organization name:', default: appName, validate: (v) => v.trim().length > 0 || 'Required' },
|
|
67
|
-
]);
|
|
68
|
-
const spinner = ora('Creating organization…').start();
|
|
69
|
-
org = await api('/orgs', { method: 'POST', body: { name: name.trim(), billingEmail: getEmail() } });
|
|
70
|
-
spinner.succeed(chalk.green(`Organization "${org.name}" created`));
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
console.log(chalk.dim(`Step 2 · Using organization "${org.name}".`));
|
|
84
|
+
org = picked === CREATE_ORG ? await createOrgInteractive(appName) : organizations.find((o) => o.id === picked);
|
|
74
85
|
}
|
|
75
86
|
// --- Step 3: OAuth client (confidential) ---
|
|
76
|
-
|
|
87
|
+
step(3, 4, 'Register a Connect-with-Agentcard client');
|
|
77
88
|
const { appBaseUrl } = await inquirer.prompt([
|
|
78
89
|
{
|
|
79
90
|
type: 'input',
|
|
@@ -92,7 +103,7 @@ export async function ensureOnboarded(appName) {
|
|
|
92
103
|
});
|
|
93
104
|
spinner3.succeed(chalk.green(`OAuth client created (${client.clientId})`));
|
|
94
105
|
// --- Step 4: sandbox API key ---
|
|
95
|
-
|
|
106
|
+
step(4, 4, 'Create a sandbox API key');
|
|
96
107
|
const spinner4 = ora('Creating sandbox API key…').start();
|
|
97
108
|
const key = await api(`/orgs/${org.id}/keys`, {
|
|
98
109
|
method: 'POST',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onboard.js","sourceRoot":"","sources":["../../../../src/lib/wizard/onboard.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"onboard.js","sourceRoot":"","sources":["../../../../src/lib/wizard/onboard.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;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AAO,CAAC,KAAK,CAAC,KAAK,CAAC,4BAA4B,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;IAE5E,OAAO;QACL,KAAK,EAAE,GAAG,CAAC,EAAE;QACb,OAAO,EAAE,GAAG,CAAC,IAAI;QACjB,UAAU,EAAE,IAAI;QAChB,WAAW;QACX,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,YAAY,EAAE,MAAM,CAAC,YAAY;QACjC,MAAM,EAAE,GAAG,CAAC,GAAG;QACf,YAAY,EAAE,GAAG,CAAC,SAAS;KAC5B,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playbook.d.ts","sourceRoot":"","sources":["../../../../src/lib/wizard/playbook.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"playbook.d.ts","sourceRoot":"","sources":["../../../../src/lib/wizard/playbook.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oBAAoB,QA+IzB,CAAC;AAET,gFAAgF;AAChF,6FAA6F;AAC7F,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,wFAAwF;IACxF,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,MAAM,CA+BnF"}
|
|
@@ -70,10 +70,18 @@ Part 3 - MCP (Streamable HTTP):
|
|
|
70
70
|
POST https://mcp.agentcard.sh/mcp, headers Authorization: Bearer <user token>,
|
|
71
71
|
Accept: application/json, text/event-stream. Handshake initialize ->
|
|
72
72
|
notifications/initialized -> tools/list -> tools/call; echo Mcp-Session-Id.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
Expose EVERY tool the server advertises. Call tools/list at RUNTIME and register
|
|
74
|
+
ALL returned tools dynamically, deriving each tool's name, description, and
|
|
75
|
+
parameters from its advertised inputSchema. Do NOT hardcode a tool list and do NOT
|
|
76
|
+
curate/drop any tool - the integration must forward whatever tools/list returns so
|
|
77
|
+
that tools Agentcard adds later are supported automatically with ZERO code change.
|
|
78
|
+
(At the time of writing the server exposes create_card, list_cards,
|
|
79
|
+
get_card_details, check_balance, close_card, approve_request, list_transactions,
|
|
80
|
+
get_plan, buy, ... - treat that only as an example, never as a fixed allowlist.)
|
|
81
|
+
Prefer the Vercel AI SDK MCP client (\`experimental_createMCPClient(...).tools()\`
|
|
82
|
+
returns the full live toolset already mapped to the host's tool type) over
|
|
83
|
+
hand-rolling JSON-RPC if the host already uses the AI SDK. If a denylist is ever
|
|
84
|
+
needed it must be config/env-driven and default to EMPTY (all tools on).
|
|
77
85
|
|
|
78
86
|
## Implementation steps (in order)
|
|
79
87
|
0. Read discovery + confirm endpoints.
|
|
@@ -94,12 +102,14 @@ Part 3 - MCP (Streamable HTTP):
|
|
|
94
102
|
/authorize) and GET /callback (exchange code -> store token). Same process as
|
|
95
103
|
the brain; publicly reachable (tunnel for local dev). redirect_uri must equal
|
|
96
104
|
<public-base>/callback exactly.
|
|
97
|
-
6. Part 3: per user, build an MCP client with the user's token; expose
|
|
98
|
-
|
|
105
|
+
6. Part 3: per user, build an MCP client with the user's token; expose ALL tools
|
|
106
|
+
returned by tools/list dynamically (no hardcoded allowlist, no curated subset);
|
|
107
|
+
refresh on near-expiry and on 401.
|
|
99
108
|
7. Wire into the brain: look up the token; if none, hand the user the
|
|
100
|
-
/connect?user=<id> link; if present, expose
|
|
101
|
-
them in a multi-step loop.
|
|
102
|
-
8. Clean up:
|
|
109
|
+
/connect?user=<id> link; if present, expose the full live toolset and let the
|
|
110
|
+
model call any of them in a multi-step loop.
|
|
111
|
+
8. Clean up: never log PAN/CVV, redact debug logging. Do NOT prune the toolset -
|
|
112
|
+
forward every tool the server advertises.
|
|
103
113
|
|
|
104
114
|
## Gotchas (check every one)
|
|
105
115
|
- resource param mandatory on /authorize AND /token (=https://mcp.agentcard.sh/mcp).
|
|
@@ -110,6 +120,11 @@ Part 3 - MCP (Streamable HTTP):
|
|
|
110
120
|
approval_id; resolve with approve_request. Decide auto-approve vs ask-the-user.
|
|
111
121
|
- Card isolation is per (client, user) - an empty list_cards on a new client is
|
|
112
122
|
correct, not a bug.
|
|
123
|
+
- Toolset is DYNAMIC: register every tool from tools/list and pass through each
|
|
124
|
+
tool's inputSchema; never hardcode tool names or a curated subset, so server-side
|
|
125
|
+
tool additions work without touching the integration. A verification step that
|
|
126
|
+
asserts "exactly these N tools" is WRONG - assert the live tools/list is forwarded
|
|
127
|
+
in full instead.
|
|
113
128
|
- Connect server must be public + co-process with the store.
|
|
114
129
|
- NEVER log PAN/CVV; redact tool-result logging.
|
|
115
130
|
- Identify the user by a stable key.
|
|
@@ -120,7 +135,10 @@ Part 3 - MCP (Streamable HTTP):
|
|
|
120
135
|
A. Offline unit tests: PKCE (challenge === base64url(sha256(verifier))); token
|
|
121
136
|
exchange/refresh against a mock /token asserting grant_type, code_verifier,
|
|
122
137
|
resource, and client_secret when confidential; MCP flow against a mock JSON-RPC
|
|
123
|
-
server incl. the approval-required -> approve_request path.
|
|
138
|
+
server incl. the approval-required -> approve_request path. Add a dynamic-toolset
|
|
139
|
+
test: point the mock server at an ARBITRARY tools/list (including an invented
|
|
140
|
+
future tool the code has never seen) and assert the integration registers ALL of
|
|
141
|
+
them - never assert a fixed/expected set of tool names.
|
|
124
142
|
B. Discovery checks: curl the two .well-known endpoints; for confidential clients,
|
|
125
143
|
prove refresh requires the secret (with -> 200, without -> 400 invalid_client).
|
|
126
144
|
C. Live sandbox: register the client (DCR or org) with <public-base>/callback,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playbook.js","sourceRoot":"","sources":["../../../../src/lib/wizard/playbook.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG
|
|
1
|
+
{"version":3,"file":"playbook.js","sourceRoot":"","sources":["../../../../src/lib/wizard/playbook.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+InC,CAAC,IAAI,EAAE,CAAC;AAWT,MAAM,UAAU,kBAAkB,CAAC,SAAiB,EAAE,MAAqB;IACzE,MAAM,KAAK,GAAG;QACZ,kFAAkF;QAClF,oFAAoF;QACpF,oFAAoF;QACpF,oDAAoD;QACpD,EAAE;QACF,mDAAmD;QACnD,SAAS;KACV,CAAC;IACF,IAAI,MAAM,EAAE,CAAC;QACX,KAAK,CAAC,IAAI,CACR,EAAE,EACF,iFAAiF,EACjF,kFAAkF,EAClF,0BAA0B,MAAM,CAAC,OAAO,GAAG,EAC3C,gFAAgF,EAChF,yBAAyB,EACzB,oBAAoB,MAAM,CAAC,QAAQ,qCAAqC,EACxE,GAAG,MAAM,CAAC,WAAW,yDAAyD,EAC9E,IAAI,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAC,2BAA2B,EAClF,wFAAwF,EACxF,iFAAiF,CAClF,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,IAAI,CACR,EAAE,EACF,+EAA+E,EAC/E,iFAAiF,CAClF,CAAC;IACF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Small presentation theme for the wizard, inspired by PostHog's setup wizard:
|
|
3
|
+
* a brand banner, an accent color, status icons, a connected left gutter, and a
|
|
4
|
+
* structured outro. Layered on top of chalk/inquirer/ora — no UI-framework rewrite.
|
|
5
|
+
*/
|
|
6
|
+
export declare const ui: {
|
|
7
|
+
primary: import("chalk").ChalkInstance;
|
|
8
|
+
accent: import("chalk").ChalkInstance;
|
|
9
|
+
success: import("chalk").ChalkInstance;
|
|
10
|
+
error: import("chalk").ChalkInstance;
|
|
11
|
+
warn: import("chalk").ChalkInstance;
|
|
12
|
+
muted: import("chalk").ChalkInstance;
|
|
13
|
+
bold: import("chalk").ChalkInstance;
|
|
14
|
+
dim: import("chalk").ChalkInstance;
|
|
15
|
+
};
|
|
16
|
+
export declare const glyph: {
|
|
17
|
+
check: string;
|
|
18
|
+
cross: string;
|
|
19
|
+
warn: string;
|
|
20
|
+
diamond: string;
|
|
21
|
+
diamondOpen: string;
|
|
22
|
+
sqOpen: string;
|
|
23
|
+
sqFilled: string;
|
|
24
|
+
play: string;
|
|
25
|
+
pointer: string;
|
|
26
|
+
bullet: string;
|
|
27
|
+
arrow: string;
|
|
28
|
+
gutter: string;
|
|
29
|
+
};
|
|
30
|
+
/** Branded intro banner: three brand blocks + title + dim subtitle lines. */
|
|
31
|
+
export declare function banner(title: string, subtitle?: string[]): void;
|
|
32
|
+
/** A numbered step header, with a blank gutter line under it for grouping. */
|
|
33
|
+
export declare function step(n: number, total: number, title: string): void;
|
|
34
|
+
/** A line inside the current step, hung under the gutter. */
|
|
35
|
+
export declare function line(text?: string): void;
|
|
36
|
+
/** A "label ✔ value" detection/summary row, under the gutter. */
|
|
37
|
+
export declare function row(label: string, value: string): void;
|
|
38
|
+
/** A boxed-ish note: a titled block hung under the gutter (clack-style left rail). */
|
|
39
|
+
export declare function note(title: string, lines: string[]): void;
|
|
40
|
+
/** A success outro: green header, optional "what changed" + "next steps" + review note. */
|
|
41
|
+
export declare function outroSuccess(opts: {
|
|
42
|
+
message: string;
|
|
43
|
+
changes?: string[];
|
|
44
|
+
nextSteps?: string[];
|
|
45
|
+
reviewNote?: string;
|
|
46
|
+
}): void;
|
|
47
|
+
/** An error outro: red header + optional body. */
|
|
48
|
+
export declare function outroError(message: string, body?: string): void;
|
|
49
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/lib/wizard/theme.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,EAAE;;;;;;;;;CASd,CAAC;AAEF,eAAO,MAAM,KAAK;;;;;;;;;;;;;CAajB,CAAC;AAIF,6EAA6E;AAC7E,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAM,EAAO,GAAG,IAAI,CAKnE;AAED,8EAA8E;AAC9E,wBAAgB,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAIlE;AAED,6DAA6D;AAC7D,wBAAgB,IAAI,CAAC,IAAI,SAAK,GAAG,IAAI,CAEpC;AAED,iEAAiE;AACjE,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAEtD;AAED,sFAAsF;AACtF,wBAAgB,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAIzD;AAED,2FAA2F;AAC3F,wBAAgB,YAAY,CAAC,IAAI,EAAE;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,IAAI,CAiBP;AAED,kDAAkD;AAClD,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAI/D"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
/**
|
|
3
|
+
* Small presentation theme for the wizard, inspired by PostHog's setup wizard:
|
|
4
|
+
* a brand banner, an accent color, status icons, a connected left gutter, and a
|
|
5
|
+
* structured outro. Layered on top of chalk/inquirer/ora — no UI-framework rewrite.
|
|
6
|
+
*/
|
|
7
|
+
export const ui = {
|
|
8
|
+
primary: chalk.cyan,
|
|
9
|
+
accent: chalk.hex('#F59E0B'), // warm amber accent (focus / step markers)
|
|
10
|
+
success: chalk.green,
|
|
11
|
+
error: chalk.red,
|
|
12
|
+
warn: chalk.yellow,
|
|
13
|
+
muted: chalk.gray,
|
|
14
|
+
bold: chalk.bold,
|
|
15
|
+
dim: chalk.dim,
|
|
16
|
+
};
|
|
17
|
+
export const glyph = {
|
|
18
|
+
check: '✔',
|
|
19
|
+
cross: '✘',
|
|
20
|
+
warn: '⚠',
|
|
21
|
+
diamond: '◆',
|
|
22
|
+
diamondOpen: '◇',
|
|
23
|
+
sqOpen: '◻',
|
|
24
|
+
sqFilled: '◼',
|
|
25
|
+
play: '▶',
|
|
26
|
+
pointer: '▸',
|
|
27
|
+
bullet: '•',
|
|
28
|
+
arrow: '→',
|
|
29
|
+
gutter: '│',
|
|
30
|
+
};
|
|
31
|
+
const g = () => ui.muted(glyph.gutter);
|
|
32
|
+
/** Branded intro banner: three brand blocks + title + dim subtitle lines. */
|
|
33
|
+
export function banner(title, subtitle = []) {
|
|
34
|
+
const blocks = chalk.cyan('█') + chalk.hex('#F59E0B')('█') + chalk.magentaBright('█');
|
|
35
|
+
console.log();
|
|
36
|
+
console.log(`${blocks} ${ui.bold(title)}`);
|
|
37
|
+
for (const s of subtitle)
|
|
38
|
+
console.log(` ${ui.dim(s)}`);
|
|
39
|
+
}
|
|
40
|
+
/** A numbered step header, with a blank gutter line under it for grouping. */
|
|
41
|
+
export function step(n, total, title) {
|
|
42
|
+
console.log();
|
|
43
|
+
console.log(`${ui.accent(glyph.diamond)} ${ui.bold(`Step ${n}/${total}`)} ${ui.muted('·')} ${title}`);
|
|
44
|
+
console.log(g());
|
|
45
|
+
}
|
|
46
|
+
/** A line inside the current step, hung under the gutter. */
|
|
47
|
+
export function line(text = '') {
|
|
48
|
+
console.log(`${g()} ${text}`);
|
|
49
|
+
}
|
|
50
|
+
/** A "label ✔ value" detection/summary row, under the gutter. */
|
|
51
|
+
export function row(label, value) {
|
|
52
|
+
console.log(`${g()} ${label} ${ui.success(glyph.check)} ${value}`);
|
|
53
|
+
}
|
|
54
|
+
/** A boxed-ish note: a titled block hung under the gutter (clack-style left rail). */
|
|
55
|
+
export function note(title, lines) {
|
|
56
|
+
console.log(g());
|
|
57
|
+
console.log(`${g()} ${ui.bold(title)}`);
|
|
58
|
+
for (const l of lines)
|
|
59
|
+
console.log(`${g()} ${ui.dim(l)}`);
|
|
60
|
+
}
|
|
61
|
+
/** A success outro: green header, optional "what changed" + "next steps" + review note. */
|
|
62
|
+
export function outroSuccess(opts) {
|
|
63
|
+
console.log();
|
|
64
|
+
console.log(`${ui.success(glyph.check)} ${ui.success.bold(opts.message)}`);
|
|
65
|
+
if (opts.changes?.length) {
|
|
66
|
+
console.log();
|
|
67
|
+
console.log(ui.primary.bold('What the agent did:'));
|
|
68
|
+
for (const c of opts.changes)
|
|
69
|
+
console.log(` ${ui.muted(glyph.bullet)} ${c}`);
|
|
70
|
+
}
|
|
71
|
+
if (opts.nextSteps?.length) {
|
|
72
|
+
console.log();
|
|
73
|
+
console.log(ui.primary.bold('Next steps:'));
|
|
74
|
+
for (const s of opts.nextSteps)
|
|
75
|
+
console.log(` ${ui.muted(glyph.bullet)} ${s}`);
|
|
76
|
+
}
|
|
77
|
+
if (opts.reviewNote) {
|
|
78
|
+
console.log();
|
|
79
|
+
console.log(ui.dim(opts.reviewNote));
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
/** An error outro: red header + optional body. */
|
|
83
|
+
export function outroError(message, body) {
|
|
84
|
+
console.log();
|
|
85
|
+
console.log(`${ui.error(glyph.cross)} ${ui.error.bold(message)}`);
|
|
86
|
+
if (body)
|
|
87
|
+
console.log(ui.dim(body));
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../../src/lib/wizard/theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;;GAIG;AACH,MAAM,CAAC,MAAM,EAAE,GAAG;IAChB,OAAO,EAAE,KAAK,CAAC,IAAI;IACnB,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,2CAA2C;IACzE,OAAO,EAAE,KAAK,CAAC,KAAK;IACpB,KAAK,EAAE,KAAK,CAAC,GAAG;IAChB,IAAI,EAAE,KAAK,CAAC,MAAM;IAClB,KAAK,EAAE,KAAK,CAAC,IAAI;IACjB,IAAI,EAAE,KAAK,CAAC,IAAI;IAChB,GAAG,EAAE,KAAK,CAAC,GAAG;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,KAAK,EAAE,GAAG;IACV,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,GAAG;IACT,OAAO,EAAE,GAAG;IACZ,WAAW,EAAE,GAAG;IAChB,MAAM,EAAE,GAAG;IACX,QAAQ,EAAE,GAAG;IACb,IAAI,EAAE,GAAG;IACT,OAAO,EAAE,GAAG;IACZ,MAAM,EAAE,GAAG;IACX,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,GAAG;CACZ,CAAC;AAEF,MAAM,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AAEvC,6EAA6E;AAC7E,MAAM,UAAU,MAAM,CAAC,KAAa,EAAE,WAAqB,EAAE;IAC3D,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC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