@agent-native/core 0.54.1 → 0.55.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 +16 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +4 -0
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/cli/connect.d.ts +3 -1
- package/dist/cli/connect.d.ts.map +1 -1
- package/dist/cli/connect.js +7 -1
- package/dist/cli/connect.js.map +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/plan-local.d.ts +40 -0
- package/dist/cli/plan-local.d.ts.map +1 -1
- package/dist/cli/plan-local.js +495 -9
- package/dist/cli/plan-local.js.map +1 -1
- package/dist/cli/skills.d.ts +17 -2
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +135 -36
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/AgentChatHome.d.ts +23 -0
- package/dist/client/AgentChatHome.d.ts.map +1 -0
- package/dist/client/AgentChatHome.js +13 -0
- package/dist/client/AgentChatHome.js.map +1 -0
- package/dist/client/AgentPanel.d.ts +29 -2
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +116 -68
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +140 -18
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/FeedbackButton.d.ts +7 -1
- package/dist/client/FeedbackButton.d.ts.map +1 -1
- package/dist/client/FeedbackButton.js +13 -3
- package/dist/client/FeedbackButton.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts +1 -2
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/agent-sidebar-state.d.ts +2 -0
- package/dist/client/agent-sidebar-state.d.ts.map +1 -1
- package/dist/client/agent-sidebar-state.js +15 -4
- package/dist/client/agent-sidebar-state.js.map +1 -1
- package/dist/client/chat/index.d.ts +5 -0
- package/dist/client/chat/index.d.ts.map +1 -1
- package/dist/client/chat/index.js +5 -0
- package/dist/client/chat/index.js.map +1 -1
- package/dist/client/chat/run-recovery.d.ts.map +1 -1
- package/dist/client/chat/run-recovery.js +4 -6
- package/dist/client/chat/run-recovery.js.map +1 -1
- package/dist/client/chat/tool-call-display.d.ts +1 -0
- package/dist/client/chat/tool-call-display.d.ts.map +1 -1
- package/dist/client/chat/tool-call-display.js +16 -0
- package/dist/client/chat/tool-call-display.js.map +1 -1
- package/dist/client/chat/tool-render-registry.d.ts +24 -0
- package/dist/client/chat/tool-render-registry.d.ts.map +1 -0
- package/dist/client/chat/tool-render-registry.js +37 -0
- package/dist/client/chat/tool-render-registry.js.map +1 -0
- package/dist/client/chat/widgets/DataChartRenderer.d.ts +5 -0
- package/dist/client/chat/widgets/DataChartRenderer.d.ts.map +1 -0
- package/dist/client/chat/widgets/DataChartRenderer.js +33 -0
- package/dist/client/chat/widgets/DataChartRenderer.js.map +1 -0
- package/dist/client/chat/widgets/DataChartWidget.d.ts +5 -0
- package/dist/client/chat/widgets/DataChartWidget.d.ts.map +1 -0
- package/dist/client/chat/widgets/DataChartWidget.js +15 -0
- package/dist/client/chat/widgets/DataChartWidget.js.map +1 -0
- package/dist/client/chat/widgets/DataInsightsWidget.d.ts +5 -0
- package/dist/client/chat/widgets/DataInsightsWidget.d.ts.map +1 -0
- package/dist/client/chat/widgets/DataInsightsWidget.js +18 -0
- package/dist/client/chat/widgets/DataInsightsWidget.js.map +1 -0
- package/dist/client/chat/widgets/DataTableWidget.d.ts +9 -0
- package/dist/client/chat/widgets/DataTableWidget.d.ts.map +1 -0
- package/dist/client/chat/widgets/DataTableWidget.js +95 -0
- package/dist/client/chat/widgets/DataTableWidget.js.map +1 -0
- package/dist/client/chat/widgets/builtin-tool-renderers.d.ts +2 -0
- package/dist/client/chat/widgets/builtin-tool-renderers.d.ts.map +1 -0
- package/dist/client/chat/widgets/builtin-tool-renderers.js +27 -0
- package/dist/client/chat/widgets/builtin-tool-renderers.js.map +1 -0
- package/dist/client/chat/widgets/data-widget-types.d.ts +52 -0
- package/dist/client/chat/widgets/data-widget-types.d.ts.map +1 -0
- package/dist/client/chat/widgets/data-widget-types.js +93 -0
- package/dist/client/chat/widgets/data-widget-types.js.map +1 -0
- package/dist/client/chat-view-transition.d.ts +23 -0
- package/dist/client/chat-view-transition.d.ts.map +1 -0
- package/dist/client/chat-view-transition.js +50 -0
- package/dist/client/chat-view-transition.js.map +1 -0
- package/dist/client/composer/PromptComposer.d.ts +1 -1
- package/dist/client/composer/PromptComposer.d.ts.map +1 -1
- package/dist/client/composer/PromptComposer.js +2 -2
- package/dist/client/composer/PromptComposer.js.map +1 -1
- package/dist/client/composer/TiptapComposer.d.ts +2 -1
- package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
- package/dist/client/composer/TiptapComposer.js +2 -1
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/index.d.ts +5 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +5 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/route-state.d.ts +6 -0
- package/dist/client/route-state.d.ts.map +1 -1
- package/dist/client/route-state.js +29 -1
- package/dist/client/route-state.js.map +1 -1
- package/dist/client/use-chat-threads.d.ts.map +1 -1
- package/dist/client/use-chat-threads.js +19 -4
- package/dist/client/use-chat-threads.js.map +1 -1
- package/dist/scripts/dev/index.d.ts +1 -0
- package/dist/scripts/dev/index.d.ts.map +1 -1
- package/dist/scripts/dev/index.js +129 -127
- package/dist/scripts/dev/index.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts +8 -0
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +29 -21
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/prompts/framework-core-compact.d.ts +4 -1
- package/dist/server/prompts/framework-core-compact.d.ts.map +1 -1
- package/dist/server/prompts/framework-core-compact.js +11 -4
- package/dist/server/prompts/framework-core-compact.js.map +1 -1
- package/dist/server/prompts/framework-core.d.ts +4 -1
- package/dist/server/prompts/framework-core.d.ts.map +1 -1
- package/dist/server/prompts/framework-core.js +15 -5
- package/dist/server/prompts/framework-core.js.map +1 -1
- package/dist/server/prompts/shared-rules.d.ts +4 -1
- package/dist/server/prompts/shared-rules.d.ts.map +1 -1
- package/dist/server/prompts/shared-rules.js +4 -1
- package/dist/server/prompts/shared-rules.js.map +1 -1
- package/dist/styles/agent-native.css +55 -0
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +4 -0
- package/dist/vite/client.js.map +1 -1
- package/docs/content/external-agents.md +14 -4
- package/docs/content/getting-started.md +1 -0
- package/docs/content/key-concepts.md +34 -15
- package/docs/content/mcp-apps.md +2 -0
- package/docs/content/mcp-protocol.md +2 -2
- package/docs/content/template-plan.md +16 -1
- package/docs/content/what-is-agent-native.md +10 -2
- package/package.json +1 -1
package/dist/cli/skills.js
CHANGED
|
@@ -274,7 +274,8 @@ npx @agent-native/core@latest skills add visual-plan --mode local-files
|
|
|
274
274
|
This mode does not register the Plan MCP connector. Before authoring structured
|
|
275
275
|
MDX, fetch the no-auth, schema-only block catalog with
|
|
276
276
|
\`npx @agent-native/core@latest plan blocks --out plan-blocks.md\`, read that file,
|
|
277
|
-
write the MDX folder locally, then run \`plan local serve\`.
|
|
277
|
+
write the MDX folder locally, run \`plan local check\`, then run \`plan local serve\`.
|
|
278
|
+
Plain text skill
|
|
278
279
|
installs (Vercel Skills CLI, copied GitHub files, etc.) can follow that same
|
|
279
280
|
local flow if \`@agent-native/core\` is available. Text alone cannot register
|
|
280
281
|
MCP tools; hosted/shareable Plans still need the Agent-Native CLI
|
|
@@ -1333,17 +1334,31 @@ The local-files contract is:
|
|
|
1333
1334
|
\`plan blocks\` command calls the public no-auth \`get-plan-blocks\` route and
|
|
1334
1335
|
writes only registry metadata to disk; use \`--format schema\` if exact nested
|
|
1335
1336
|
fields are needed. If network access is unavailable, use the bundled
|
|
1336
|
-
references and rely on \`plan local serve\` to catch
|
|
1337
|
+
references and rely on \`plan local check\` / \`plan local serve\` to catch
|
|
1338
|
+
invalid tags. For \`checklist\` and \`question-form\`, copy the catalog examples:
|
|
1339
|
+
checklist items need \`id\`, and question-form questions/options need \`id\`.
|
|
1337
1340
|
- Write the plan as a local MDX folder: use \`plans/<slug>/\` when the user
|
|
1338
1341
|
wants the artifact checked into the repo, or use a repo-ignored/temporary
|
|
1339
1342
|
folder such as \`.agent-native/plans/<slug>/\` or \`/tmp/agent-native-plans/<slug>/\`
|
|
1340
1343
|
when it should not be checked in. The folder contains \`plan.mdx\`, optional
|
|
1341
1344
|
\`canvas.mdx\`, optional \`prototype.mdx\`, and optional \`.plan-state.json\`.
|
|
1342
|
-
- Run \`npx @agent-native/core@latest plan local
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
\`
|
|
1345
|
+
- Run \`npx @agent-native/core@latest plan local check --dir plans/<slug>\`
|
|
1346
|
+
before serving, then run
|
|
1347
|
+
\`npx @agent-native/core@latest plan local serve --dir plans/<slug> --kind plan --open\`.
|
|
1348
|
+
Report the returned local bridge URL from stdout or \`plans/<slug>/.plan-url\`.
|
|
1349
|
+
Treat \`.plan-url\` as a local token file and do not commit it. The URL opens
|
|
1350
|
+
the hosted Plan UI but reads from the localhost bridge on this machine, so it
|
|
1351
|
+
is not shareable across machines. On macOS, \`--open\` prefers Chromium browsers;
|
|
1352
|
+
if Safari opens, switch to Chrome/Chromium because Safari can block the hosted
|
|
1353
|
+
HTTPS page from fetching the HTTP localhost bridge. If the Plan app itself is
|
|
1354
|
+
running locally with the same \`PLAN_LOCAL_DIR\`, the \`/local-plans/<slug>\` route
|
|
1355
|
+
is also valid.
|
|
1356
|
+
- For headless verification, run
|
|
1357
|
+
\`npx @agent-native/core@latest plan local verify --dir plans/<slug> --kind plan\`.
|
|
1358
|
+
It starts the bridge, checks the private-network preflight and JSON payload,
|
|
1359
|
+
prints diagnostics, and exits. If the browser hangs on "Loading plan", fetch
|
|
1360
|
+
the \`bridgeUrl\` from the verify/serve JSON to read the concrete validation
|
|
1361
|
+
error.
|
|
1347
1362
|
- Do **not** call \`create-visual-plan\`, \`create-ui-plan\`,
|
|
1348
1363
|
\`create-prototype-plan\`, \`create-plan-design\`, \`import-visual-plan-source\`,
|
|
1349
1364
|
\`update-visual-plan\`, \`patch-visual-plan-source\`, \`get-plan-feedback\`,
|
|
@@ -1484,7 +1499,9 @@ In local-files mode:
|
|
|
1484
1499
|
MCP connector is not registered; it calls the public no-auth
|
|
1485
1500
|
\`get-plan-blocks\` route and sends no recap content. If network access is
|
|
1486
1501
|
unavailable, use the bundled references and validate with
|
|
1487
|
-
\`plan local serve\`.
|
|
1502
|
+
\`plan local check\` / \`plan local serve\`. For \`checklist\` and \`question-form\`,
|
|
1503
|
+
copy the catalog examples: checklist items need \`id\`, and question-form
|
|
1504
|
+
questions/options need \`id\`.
|
|
1488
1505
|
- Write the recap as a local MDX folder: use \`plans/<slug>/\` when the user
|
|
1489
1506
|
wants the artifact checked into the repo, or use a repo-ignored/temporary
|
|
1490
1507
|
folder such as \`.agent-native/plans/<slug>/\` or \`/tmp/agent-native-plans/<slug>/\`
|
|
@@ -1492,11 +1509,23 @@ In local-files mode:
|
|
|
1492
1509
|
\`canvas.mdx\`, optional \`prototype.mdx\`, and optional \`.plan-state.json\`. Set
|
|
1493
1510
|
\`kind: "recap"\` and \`localOnly: true\` in frontmatter/state when authoring
|
|
1494
1511
|
the source.
|
|
1495
|
-
- Run \`npx @agent-native/core@latest plan local
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
\`
|
|
1512
|
+
- Run \`npx @agent-native/core@latest plan local check --dir plans/<slug>\`
|
|
1513
|
+
before serving, then run
|
|
1514
|
+
\`npx @agent-native/core@latest plan local serve --dir plans/<slug> --kind recap --open\`.
|
|
1515
|
+
Report the returned local bridge URL from stdout or \`plans/<slug>/.plan-url\`.
|
|
1516
|
+
Treat \`.plan-url\` as a local token file and do not commit it. The URL opens
|
|
1517
|
+
the hosted Plan UI but reads from the localhost bridge on this machine, so it
|
|
1518
|
+
is not shareable across machines. On macOS, \`--open\` prefers Chromium browsers;
|
|
1519
|
+
if Safari opens, switch to Chrome/Chromium because Safari can block the hosted
|
|
1520
|
+
HTTPS page from fetching the HTTP localhost bridge. If the Plan app itself is
|
|
1521
|
+
running locally with the same \`PLAN_LOCAL_DIR\`, the \`/local-plans/<slug>\` route
|
|
1522
|
+
is also valid.
|
|
1523
|
+
- For headless verification, run
|
|
1524
|
+
\`npx @agent-native/core@latest plan local verify --dir plans/<slug> --kind recap\`.
|
|
1525
|
+
It starts the bridge, checks the private-network preflight and JSON payload,
|
|
1526
|
+
prints diagnostics, and exits. If the browser hangs on "Loading plan", fetch
|
|
1527
|
+
the \`bridgeUrl\` from the verify/serve JSON to read the concrete validation
|
|
1528
|
+
error.
|
|
1500
1529
|
- Do **not** call \`create-visual-recap\`, \`create-visual-plan\`,
|
|
1501
1530
|
\`import-visual-plan-source\`, \`update-visual-plan\`,
|
|
1502
1531
|
\`patch-visual-plan-source\`, \`get-plan-feedback\`, \`export-visual-plan\`,
|
|
@@ -1714,13 +1743,14 @@ a headless CI agent), state that in the recap handoff instead.
|
|
|
1714
1743
|
|
|
1715
1744
|
## Open And Report The Recap
|
|
1716
1745
|
|
|
1717
|
-
In local-files privacy mode,
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1746
|
+
In local-files privacy mode, run \`plan local check\` first, then report the local
|
|
1747
|
+
bridge URL from
|
|
1748
|
+
\`npx @agent-native/core@latest plan local serve --dir plans/<slug> --kind recap --open\`
|
|
1749
|
+
or from \`plans/<slug>/.plan-url\`. It opens the hosted Plan UI but reads from the
|
|
1750
|
+
localhost bridge on this machine, so it is not shareable across machines. If the
|
|
1751
|
+
Plan app itself is running locally with the same \`PLAN_LOCAL_DIR\`, the
|
|
1752
|
+
\`/local-plans/<slug>\` route is also valid. Do not invent a hosted database URL
|
|
1753
|
+
and do not publish just to get an absolute Plan link.
|
|
1724
1754
|
|
|
1725
1755
|
After creating the recap, link the reviewer to the rendered plan with an
|
|
1726
1756
|
**absolute URL on the origin whose database actually holds the plan**. That
|
|
@@ -1874,7 +1904,7 @@ was installed as plain text and no MCP tools are registered, run
|
|
|
1874
1904
|
\`npx @agent-native/core@latest plan blocks --out plan-blocks.md\` and read that
|
|
1875
1905
|
file first. The CLI command calls the public no-auth \`get-plan-blocks\` route and
|
|
1876
1906
|
sends no plan/recap content. If network access is unavailable, use the bundled
|
|
1877
|
-
references and validate with \`plan local serve\`.
|
|
1907
|
+
references and validate with \`plan local check\` / \`plan local serve\`.
|
|
1878
1908
|
|
|
1879
1909
|
The catalog returns the authoritative, always-current block vocabulary generated
|
|
1880
1910
|
live from the app's own block registry — the same config the renderer and MDX
|
|
@@ -2373,11 +2403,15 @@ under a repo-ignored/temp folder when they should stay private scratch. Before
|
|
|
2373
2403
|
authoring structured MDX, run
|
|
2374
2404
|
\`npx @agent-native/core@latest plan blocks --out plan-blocks.md\` and read the
|
|
2375
2405
|
no-auth block catalog; it sends no plan content. Then run
|
|
2406
|
+
\`npx @agent-native/core@latest plan local check --dir plans/<slug>\`, then
|
|
2376
2407
|
\`npx @agent-native/core@latest plan local serve --dir plans/<slug> --kind plan|recap --open\`,
|
|
2377
|
-
and report the local bridge URL
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2408
|
+
and report the local bridge URL from stdout or \`plans/<slug>/.plan-url\`. Treat
|
|
2409
|
+
\`.plan-url\` as a local token file and do not commit it. It opens the hosted Plan
|
|
2410
|
+
UI but reads from the localhost bridge on this machine, so it is not shareable
|
|
2411
|
+
across machines. On macOS, use Chrome/Chromium if Safari blocks the localhost
|
|
2412
|
+
bridge; run \`plan local verify --dir plans/<slug> --kind plan|recap\` for
|
|
2413
|
+
headless diagnostics. No sharing, all local. Use a hosted or self-hosted Plan MCP
|
|
2414
|
+
connector only if the user explicitly asks to publish or share.`;
|
|
2381
2415
|
}
|
|
2382
2416
|
if (input.mode === "self-hosted") {
|
|
2383
2417
|
return `## Installed Mode
|
|
@@ -3683,6 +3717,33 @@ function canRunInteractiveConnect(options) {
|
|
|
3683
3717
|
return false;
|
|
3684
3718
|
return !!process.stdin.isTTY && !!process.stdout.isTTY;
|
|
3685
3719
|
}
|
|
3720
|
+
function normalizeConnectLogMessage(message) {
|
|
3721
|
+
return message
|
|
3722
|
+
.split("\n")
|
|
3723
|
+
.map((line) => (line.startsWith(" ") ? line.slice(2) : line))
|
|
3724
|
+
.join("\n");
|
|
3725
|
+
}
|
|
3726
|
+
function createClackConnectLog(clack) {
|
|
3727
|
+
return (message) => {
|
|
3728
|
+
clack.log.message(normalizeConnectLogMessage(message), {
|
|
3729
|
+
symbol: clack.S_BAR,
|
|
3730
|
+
secondarySymbol: clack.S_BAR,
|
|
3731
|
+
spacing: 0,
|
|
3732
|
+
});
|
|
3733
|
+
};
|
|
3734
|
+
}
|
|
3735
|
+
async function runWithConnectSpinner(options, message, task) {
|
|
3736
|
+
const spinner = options.createConnectSpinner?.();
|
|
3737
|
+
if (!spinner)
|
|
3738
|
+
return await task();
|
|
3739
|
+
spinner.start(message);
|
|
3740
|
+
try {
|
|
3741
|
+
return await task();
|
|
3742
|
+
}
|
|
3743
|
+
finally {
|
|
3744
|
+
spinner.clear();
|
|
3745
|
+
}
|
|
3746
|
+
}
|
|
3686
3747
|
/** Build the `npx @agent-native/core@latest connect <url> --client … --scope …` command. */
|
|
3687
3748
|
function connectCommandFor(hostedUrl, clients, scope) {
|
|
3688
3749
|
const args = [
|
|
@@ -3718,7 +3779,35 @@ async function connectAfterEnsure(installTarget, clients, parsed, options) {
|
|
|
3718
3779
|
options.log?.(`Authentication skipped (non-interactive). To finish auth, run: ${connectCommand}`);
|
|
3719
3780
|
return { connected: false, connectCommand };
|
|
3720
3781
|
}
|
|
3721
|
-
|
|
3782
|
+
const authMessage = `Authenticating ${installTarget.displayName}…`;
|
|
3783
|
+
const connectLog = options.connectLog ?? options.log;
|
|
3784
|
+
const spinner = options.createConnectSpinner?.();
|
|
3785
|
+
let spinnerActive = false;
|
|
3786
|
+
let wroteAuthMessage = false;
|
|
3787
|
+
const clearSpinner = () => {
|
|
3788
|
+
if (!spinnerActive)
|
|
3789
|
+
return;
|
|
3790
|
+
spinner.clear();
|
|
3791
|
+
spinnerActive = false;
|
|
3792
|
+
};
|
|
3793
|
+
const writeAuthMessage = () => {
|
|
3794
|
+
if (wroteAuthMessage)
|
|
3795
|
+
return;
|
|
3796
|
+
connectLog?.(authMessage);
|
|
3797
|
+
wroteAuthMessage = true;
|
|
3798
|
+
};
|
|
3799
|
+
const writeConnectLog = (message) => {
|
|
3800
|
+
clearSpinner();
|
|
3801
|
+
writeAuthMessage();
|
|
3802
|
+
connectLog?.(message);
|
|
3803
|
+
};
|
|
3804
|
+
if (spinner) {
|
|
3805
|
+
spinner.start(authMessage);
|
|
3806
|
+
spinnerActive = true;
|
|
3807
|
+
}
|
|
3808
|
+
else {
|
|
3809
|
+
writeAuthMessage();
|
|
3810
|
+
}
|
|
3722
3811
|
options.telemetry?.track("skills_cli connect started");
|
|
3723
3812
|
try {
|
|
3724
3813
|
const connectArgs = [
|
|
@@ -3734,25 +3823,24 @@ async function connectAfterEnsure(installTarget, clients, parsed, options) {
|
|
|
3734
3823
|
else {
|
|
3735
3824
|
await runConnect(connectArgs, {
|
|
3736
3825
|
isInteractive: options.isInteractive,
|
|
3737
|
-
logOut:
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
},
|
|
3741
|
-
logErr: (message) => {
|
|
3742
|
-
if (message.trim())
|
|
3743
|
-
options.log?.(message);
|
|
3744
|
-
},
|
|
3826
|
+
logOut: writeConnectLog,
|
|
3827
|
+
logErr: writeConnectLog,
|
|
3828
|
+
withBrowserOpenSpinner: (message, openBrowser) => runWithConnectSpinner(options, message, openBrowser),
|
|
3745
3829
|
});
|
|
3746
3830
|
}
|
|
3831
|
+
clearSpinner();
|
|
3832
|
+
writeAuthMessage();
|
|
3747
3833
|
options.telemetry?.track("skills_cli connect completed");
|
|
3748
3834
|
return { connected: true, connectCommand: "" };
|
|
3749
3835
|
}
|
|
3750
3836
|
catch (err) {
|
|
3837
|
+
clearSpinner();
|
|
3838
|
+
writeAuthMessage();
|
|
3751
3839
|
// Non-fatal: the MCP connector is registered. Surface the manual command.
|
|
3752
3840
|
options.telemetry?.track("skills_cli connect failed", {
|
|
3753
3841
|
error: err?.message ?? String(err),
|
|
3754
3842
|
});
|
|
3755
|
-
|
|
3843
|
+
connectLog?.(`Could not finish authentication automatically (${err?.message ?? err}). ` +
|
|
3756
3844
|
`Run it later with: ${connectCommand}`);
|
|
3757
3845
|
return { connected: false, connectCommand };
|
|
3758
3846
|
}
|
|
@@ -4264,6 +4352,12 @@ export async function runSkills(argv, options = {}) {
|
|
|
4264
4352
|
return;
|
|
4265
4353
|
clackForLog?.log.info(message);
|
|
4266
4354
|
};
|
|
4355
|
+
const connectLog = !parsed.printJson && clackForLog
|
|
4356
|
+
? createClackConnectLog(clackForLog)
|
|
4357
|
+
: undefined;
|
|
4358
|
+
const createConnectSpinner = !parsed.printJson && clackForLog && process.stdout.isTTY
|
|
4359
|
+
? () => clackForLog.spinner({ indicator: "timer" })
|
|
4360
|
+
: undefined;
|
|
4267
4361
|
if (parsed.command === "help") {
|
|
4268
4362
|
process.stdout.write(`${HELP}\n`);
|
|
4269
4363
|
return;
|
|
@@ -4286,7 +4380,12 @@ export async function runSkills(argv, options = {}) {
|
|
|
4286
4380
|
command: parsed.command,
|
|
4287
4381
|
interactive: shouldPrompt(parsed, options),
|
|
4288
4382
|
});
|
|
4289
|
-
const optionsWithTelemetry = {
|
|
4383
|
+
const optionsWithTelemetry = {
|
|
4384
|
+
...options,
|
|
4385
|
+
telemetry,
|
|
4386
|
+
connectLog: options.connectLog ?? connectLog,
|
|
4387
|
+
createConnectSpinner: options.createConnectSpinner ?? createConnectSpinner,
|
|
4388
|
+
};
|
|
4290
4389
|
try {
|
|
4291
4390
|
telemetry.track("skills_cli started");
|
|
4292
4391
|
if (parsed.command === "list") {
|