@tendrilapp/cli 0.1.49 → 0.1.50

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/SKILL.md CHANGED
@@ -254,11 +254,20 @@ Batch runs (several components in one session):
254
254
  lists unconfirmed partner pairs, this recording references OTHER
255
255
  recorded components (a segmented control built from a recorded
256
256
  Control, a dialog holding a recorded Button). Order matters:
257
- generate the PARTNER bundle first, then show the pairing to the
258
- user a human decides it by running
257
+ generate the PARTNER bundle first, then put the pairing decision in
258
+ front of the human it is human-only on either channel, and you
259
+ can never make it. CLICK PATH (lead with this): `tendril_compose`
260
+ puts the pairing in their browser as an Approve card (sign in first
261
+ via `tendril_login` if needed — one browser Approve each); relay
262
+ the approve link VERBATIM, name the account the result says to
263
+ approve as, never urge, then loop `tendril_compose_wait` (same
264
+ heartbeat contract as publish waits: pending is a heartbeat, one
265
+ short liveness line, never "stuck"). The card's Deny is NOT NOW —
266
+ this request only, never a permanent decline. TERMINAL PATH: the
267
+ human runs
259
268
  `npx -y -p @tendrilapp/cli@latest tendril compose --set <host-set-dir>`
260
- in their own terminal (confirm or `--decline <pair-key>`; the
261
- pair-key is printed above each pair). Never confirm it yourself.
269
+ themselves (confirm or `--decline <pair-key>`; decline there IS
270
+ permanent asked once). Never confirm on either channel yourself.
262
271
  Generating the host with pairs undecided is valid — the brief will
263
272
  say so — but the host then re-implements the partner's pixels
264
273
  locally instead of composing the verified partner bundle, so
@@ -268,6 +277,29 @@ Batch runs (several components in one session):
268
277
  in another project root are invisible to pairing until co-located
269
278
  or pointed at — the tools name their scanned roots so "not
270
279
  scanned" never reads as "no relationship".
280
+ CONNECTING COMPONENTS THAT ALREADY EXIST (both recorded, both
281
+ generated): step ONE is putting both recording sets in one scanned
282
+ root (co-locate, or --library). If the pairing then shows as
283
+ NAME-ONLY (the host was recorded over MCP, so Figma's instance→
284
+ component bindings were never captured), run
285
+ `tendril_record_bindings` on the HOST set — one or two batched
286
+ REST calls, congruence-verified, no re-recording; needs the Figma
287
+ connect — if absent, that is ONE more browser Allow via
288
+ `tendril_figma_connect`, name it up front so it never reads as a
289
+ detour — and the pairing becomes id-backed and confirmable. Then
290
+ the click path above (tendril_compose → Approve →
291
+ tendril_compose_wait). After the approve: the HOST bundle is
292
+ REGENERATED with the same --library roots (a verified bundle is
293
+ frozen — composition never retrofits one; the partner bundle is
294
+ reused verbatim). That regeneration is a normal generation run:
295
+ ask the model question there as always, and set the expectation in
296
+ one line that it takes a few scored attempts. If the regenerated
297
+ host was ALREADY published, the republish completes in one
298
+ announced call; if it was NEVER published, a SECOND, different
299
+ browser card appears — the publish approval — say so before it
300
+ does. On session resume, a pending connect decision may be waiting:
301
+ if `pending-compose.json` exists under the user config dir, run
302
+ `tendril_compose_wait` first.
271
303
 
272
304
  ## Generating (the agent-harness engine — you are the proposer)
273
305
 
@@ -151,6 +151,40 @@ var TOOLS = [
151
151
  schema: z.object({ setDir: str("recording set directory") }),
152
152
  argv: (i) => ["record", "rest-fetch", "--set", i["setDir"]]
153
153
  },
154
+ {
155
+ name: "tendril_record_bindings",
156
+ description: "Fetch Figma's instance\u2192component bindings for an EXISTING MCP-recorded set \u2014 one or two batched REST calls, no re-recording, pixels/geometry/identity untouched. This is how components that are ALREADY recorded and generated become connectable: the bindings make cross-component pairing id-backed, so `tendril compose` can propose it for the human's confirm. Every binding is congruence-verified against the recorded metadata (a design that changed since recording refuses per pose, named). The CLI makes the requests itself with the user's connected Figma credential (tendril_figma_connect); you make NO Figma call. The result names the next step \u2014 including when no partner set is visible in the scanned root (co-locate the sets or pass compose --library). For sets recorded before file identity was captured, pass the design's file key as `file`.",
157
+ schema: z.object({ setDir: str("recording set directory"), file: optStr("the design's file key (figma.com/design/<KEY>/\u2026) \u2014 only for sets whose manifest lacks figmaFile; an operator assertion, congruence still gates every binding") }),
158
+ argv: (i) => ["record", "bindings", "--set", i["setDir"], ...typeof i["file"] === "string" ? ["--file", i["file"]] : []]
159
+ },
160
+ {
161
+ name: "tendril_compose",
162
+ description: "Put ONE composition pairing in front of the user's BROWSER \u2014 phase one of the browser-approved connect (invariant-5 migration; the terminal `--confirm-compositions` path remains for humans at a TTY). Requires a portal session (tendril_login \u2014 one browser Approve). Returns the approve-page link: RELAY IT verbatim, name the account the result says to approve as, and never urge the decision \u2014 the card carries the engine's honest disclosures and the human reads them. Deny on the card is NOT NOW (this request only, never a permanent decline). You cannot decide this yourself on any channel: the portal accepts the decision only from the user's signed-in browser, and the terminal flag only from an interactive TTY. A host with several open pairings needs `pair` (one card = one decision). Then finish with tendril_compose_wait. Both recording sets must be visible in one scanned workspace \u2014 co-locate them or pass `library`.",
163
+ schema: z.object({
164
+ setDir: str("the HOST recording set directory (the component that embeds the partner)"),
165
+ pair: optStr("the pair-key to request when the host has several open pairings"),
166
+ library: z.array(z.string()).optional().describe("workspace root(s) holding the partner recording set(s) \u2014 required when they live in another project root"),
167
+ portal: optStr("portal origin override (defaults to the stored session's portal)")
168
+ }),
169
+ argv: (i) => [
170
+ "compose",
171
+ "--set",
172
+ i["setDir"],
173
+ "--approve-start",
174
+ ...typeof i["pair"] === "string" ? ["--pair", i["pair"]] : [],
175
+ ...Array.isArray(i["library"]) ? i["library"].flatMap((d) => ["--library", d]) : [],
176
+ ...typeof i["portal"] === "string" ? ["--to", i["portal"]] : []
177
+ ]
178
+ },
179
+ {
180
+ name: "tendril_compose_wait",
181
+ description: 'Phase two of the browser-approved connect. Waits in a BOUNDED window (~1 minute per call) for the user\'s decision on the card tendril_compose returned; on Approve it records the SAME manifest entry the terminal confirm writes \u2014 after re-deriving the pairing from the CURRENT recordings and refusing if anything changed underneath the click (the click is then not wrong; the project moved \u2014 run the connect again). While undecided, each call returns `status: "approval-pending"` \u2014 a heartbeat, not a failure: one short liveness line to the user, then call again; the request stays live ~30 minutes, and a decided card can take moments to land. NOT NOW, a lapse, and success each arrive as their own sentence \u2014 report the one you got. After success: regenerate the HOST bundle with the same library roots (brief \u2192 generate \u2192 score \u2192 verify), then republish \u2014 announce the republish in one line first. Compose waits follow the same heartbeat contract as publish waits: never urge, never call an in-flight wait stuck.',
182
+ schema: z.object({
183
+ setDir: str("the same HOST set directory tendril_compose was called with"),
184
+ portal: optStr("portal origin override (must match tendril_compose's)")
185
+ }),
186
+ argv: (i) => ["compose", "--set", i["setDir"], "--approve-wait", "--wait-window", "55", ...typeof i["portal"] === "string" ? ["--to", i["portal"]] : []]
187
+ },
154
188
  {
155
189
  name: "tendril_record_fetch",
156
190
  description: "Download a Figma asset URL (from get_screenshot's image_url) straight to disk and ingest it as the rep's envelope \u2014 the fallback when only the screenshot piece needs (re-)recording; for a rep's standard three recordings PREFER tendril_record_ingest_rep. Never download the image yourself: the bytes must not pass through your context.",