@agent-native/core 0.92.4 → 0.92.5
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/corpus/core/CHANGELOG.md +6 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/cli/design-connect.ts +43 -16
- package/corpus/core/src/cli/skills.ts +52 -16
- package/corpus/templates/design/.agents/skills/visual-edit/SKILL.md +27 -15
- package/corpus/templates/design/actions/connect-localhost.ts +40 -11
- package/corpus/templates/design/actions/open-visual-edit.ts +7 -1
- package/dist/cli/design-connect.d.ts +5 -1
- package/dist/cli/design-connect.d.ts.map +1 -1
- package/dist/cli/design-connect.js +37 -16
- package/dist/cli/design-connect.js.map +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +52 -16
- package/dist/cli/skills.js.map +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/observability/routes.d.ts +3 -3
- package/dist/progress/routes.d.ts +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/package.json +1 -1
package/dist/cli/skills.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/cli/skills.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,EAKL,KAAK,gBAAgB,EAEtB,MAAM,gBAAgB,CAAC;AAUxB,OAAO,EAAW,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAGjE,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/cli/skills.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,EAKL,KAAK,gBAAgB,EAEtB,M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AU,wBAAwB;IAChC,YAAY,EAAE,SAAS,GAAG,MAAM,CAAC;CAClC;AAED,UAAU,2BAA2B;IACnC,WAAW,EAAE,eAAe,CAAC;CAC9B;AAkuDD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,gBAAgB,CA8GhE;AAkiBD,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,gBAAgB,EACxB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,eAAe,CAAC,CA6Y1B;AA8QD,wBAAsB,SAAS,CAC7B,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,IAAI,CAAC,CA8Zf"}
|
package/dist/cli/skills.js
CHANGED
|
@@ -465,34 +465,66 @@ iframe-backed screens on the infinite canvas.
|
|
|
465
465
|
|
|
466
466
|
## Required Local Bridge
|
|
467
467
|
|
|
468
|
-
|
|
468
|
+
The live-edit bridge is unlocked by a shared secret (the "bridge token") that
|
|
469
|
+
must match on two sides: the local bridge process, and the user's connection row
|
|
470
|
+
in Design (which the browser reads to authorize \`/live-edit-bridge\`,
|
|
471
|
+
\`/read-file\`, \`/write-file\`). Get them to match by letting the
|
|
472
|
+
**authenticated** \`open-visual-edit\` action mint the token, then starting the
|
|
473
|
+
bridge with it. This is the only ordering that works for the remote-MCP flow —
|
|
474
|
+
the bridge cannot push its own token to the server without a CLI auth token, so
|
|
475
|
+
the server mints instead and the bridge adopts.
|
|
476
|
+
|
|
477
|
+
From the target app repo, make sure its dev server is running, then:
|
|
478
|
+
|
|
479
|
+
**1. Discover routes without starting a durable bridge** (one-shot, exits):
|
|
469
480
|
|
|
470
481
|
\`\`\`bash
|
|
471
|
-
npx @agent-native/core@latest design connect --url http://localhost:5173 --root . --
|
|
482
|
+
npx @agent-native/core@latest design connect --url http://localhost:5173 --root . --json
|
|
472
483
|
\`\`\`
|
|
473
484
|
|
|
474
|
-
|
|
475
|
-
\`
|
|
476
|
-
|
|
485
|
+
This prints the manifest (routes + capabilities). Parse it to build
|
|
486
|
+
\`routeManifest\` for the next step. (Skip this if the user already gave explicit
|
|
487
|
+
paths/URLs to place.)
|
|
488
|
+
|
|
489
|
+
**2. Call \`open-visual-edit\`** (see Action Flow below) with NO \`bridgeToken\`.
|
|
490
|
+
The server mints one, stores it on the user's connection row, copies it into the
|
|
491
|
+
placed screens' metadata, and returns it to you as \`bridgeToken\`. Capture it.
|
|
477
492
|
|
|
478
|
-
|
|
493
|
+
**3. Start the persistent bridge adopting that token** (single line; prefer the
|
|
494
|
+
env var so the secret does not appear in \`ps\`):
|
|
495
|
+
|
|
496
|
+
\`\`\`bash
|
|
497
|
+
AGENT_NATIVE_BRIDGE_TOKEN="<bridgeToken from step 2>" npx @agent-native/core@latest design connect --url http://localhost:5173 --root . --daemon
|
|
498
|
+
\`\`\`
|
|
499
|
+
|
|
500
|
+
(Equivalently, pass \`--bridge-token <token>\`.) This starts a detached bridge on
|
|
501
|
+
\`http://127.0.0.1:7331\`, adopts the server-minted token — so bridge and row
|
|
502
|
+
agree and live-edit authorizes with no self-registration — and stays alive after
|
|
503
|
+
the command exits.
|
|
504
|
+
|
|
505
|
+
For a manual health/manifest check on the running bridge:
|
|
479
506
|
|
|
480
507
|
\`\`\`bash
|
|
481
508
|
curl http://127.0.0.1:7331/manifest.json
|
|
482
509
|
\`\`\`
|
|
483
510
|
|
|
484
|
-
|
|
485
|
-
\`--dry-run\`
|
|
486
|
-
|
|
511
|
+
Only use \`--json\` for the step-1 route probe. Never use \`--json\`, \`--once\`,
|
|
512
|
+
or \`--dry-run\` for the durable step-3 bridge: they print the manifest and exit,
|
|
513
|
+
so Design falls back to a non-editable live iframe.
|
|
487
514
|
|
|
488
515
|
## Action Flow
|
|
489
516
|
|
|
490
517
|
Prefer the single authenticated \`open-visual-edit\` action. It registers or
|
|
491
|
-
refreshes the localhost bridge,
|
|
492
|
-
URL-backed screens, stores the active
|
|
493
|
-
overview mode in one call. This avoids
|
|
494
|
-
synthetic CLI user and then handing the browser
|
|
495
|
-
shadowed by an existing session.
|
|
518
|
+
refreshes the localhost bridge connection, mints and stores the bridge token,
|
|
519
|
+
creates or reuses a Design project, places URL-backed screens, stores the active
|
|
520
|
+
visual-edit context, and navigates to overview mode in one call. This avoids
|
|
521
|
+
creating a private design under a synthetic CLI user and then handing the browser
|
|
522
|
+
a tokenized URL that may be shadowed by an existing session.
|
|
523
|
+
|
|
524
|
+
Call it BEFORE starting the durable bridge (step 3 above): it does not contact
|
|
525
|
+
the bridge, so the bridge need not be running yet, and you need its returned
|
|
526
|
+
\`bridgeToken\` to start the bridge with a matching secret. Omit \`bridgeToken\`
|
|
527
|
+
on the call so the server mints one.
|
|
496
528
|
|
|
497
529
|
\`\`\`bash
|
|
498
530
|
pnpm action open-visual-edit '{
|
|
@@ -505,8 +537,12 @@ pnpm action open-visual-edit '{
|
|
|
505
537
|
}'
|
|
506
538
|
\`\`\`
|
|
507
539
|
|
|
508
|
-
The action returns \`designId\`, \`connectionId\`, \`
|
|
509
|
-
\`openUrl\`. Keep
|
|
540
|
+
The action returns \`designId\`, \`connectionId\`, \`bridgeToken\`, \`screens\`,
|
|
541
|
+
\`urlPath\`, and \`openUrl\`. Keep \`designId\`/\`connectionId\` in the chat context
|
|
542
|
+
for follow-ups, and pass \`bridgeToken\` to \`design connect\` (step 3) to start
|
|
543
|
+
the bridge. On follow-up calls reusing an existing \`connectionId\`, the same
|
|
544
|
+
token is returned (it is minted once and reused), so the running bridge stays
|
|
545
|
+
valid.
|
|
510
546
|
|
|
511
547
|
For a numbered flow the user describes in chat, keep the labels and order:
|
|
512
548
|
|