@agent-native/agentkit 0.228.0-nightly-20261111212500 → 0.228.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.
Files changed (2) hide show
  1. package/README.md +104 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -352,6 +352,105 @@ name. Core supplies this resolver from its integration catalog and logo library.
352
352
  Hosts can supply their own accessible badge node or return `undefined` to retain
353
353
  the default activity icon.
354
354
 
355
+ Build custom activity, tool, and task renderers from the same Trace parts the
356
+ default transcript uses, so they share its icon column, running shimmer,
357
+ reduced-motion handling, and find-in-page behavior:
358
+
359
+ ```tsx
360
+ import {
361
+ TraceCollapsible,
362
+ TraceCollapsibleContent,
363
+ TraceCollapsibleTrigger,
364
+ TraceDescription,
365
+ TraceIcon,
366
+ TraceLine,
367
+ TraceTitle,
368
+ } from "@agent-native/toolkit/app/agentkit/react";
369
+
370
+ function DeploymentActivity({ value }: AgentKitRenderProps<AgentActivity>) {
371
+ const running = value.status === "running";
372
+ return (
373
+ <TraceCollapsible defaultOpen={running}>
374
+ <TraceCollapsibleTrigger>
375
+ <TraceLine status={running ? "running" : undefined}>
376
+ <TraceIcon>
377
+ <IconRocket />
378
+ </TraceIcon>
379
+ <TraceTitle>{running ? "Deploying" : "Deployed"}</TraceTitle>
380
+ <TraceDescription>{value.detail}</TraceDescription>
381
+ </TraceLine>
382
+ </TraceCollapsibleTrigger>
383
+ <TraceCollapsibleContent keepMounted>
384
+ <DeploymentLog activityId={value.id} />
385
+ </TraceCollapsibleContent>
386
+ </TraceCollapsible>
387
+ );
388
+ }
389
+ ```
390
+
391
+ `TraceLine` takes `running`, `error`, or `pending`; omit it for finished work.
392
+ Status shows only as color and motion, so the title must say it too. Content
393
+ unmounts while closed unless `keepMounted`, which keeps it in the DOM as
394
+ `hidden="until-found"` so find-in-page opens the step. Outside `AgentChat`,
395
+ wrap Trace in an `agentkit-tokens` element so it resolves the AgentKit tokens.
396
+
397
+ Code uses the same approach. `CodeBlock` is what fenced Markdown, tool input,
398
+ and tool results render through. `CodeBlockContent` highlights a string child
399
+ for its `language` with the bundled grammars, and renders any other language as
400
+ plain text. While code streams it re-highlights at most every 80 ms, and a
401
+ finished line keeps its colors. `lineNumbers`, `wrap`, and `CodeBlockLine`
402
+ variants (`added`, `removed`, `highlighted`) cover logs and diffs. Line numbers
403
+ and diff markers stay out of copied text and the accessibility tree:
404
+
405
+ ```tsx
406
+ <CodeBlock size="sm">
407
+ <CodeBlockHeader>
408
+ <CodeBlockTitle>pnpm build</CodeBlockTitle>
409
+ <CodeBlockActions>
410
+ <CodeBlockCopyButton value={output} />
411
+ </CodeBlockActions>
412
+ </CodeBlockHeader>
413
+ <CodeBlockContent wrap language="ansi">
414
+ {output}
415
+ </CodeBlockContent>
416
+ </CodeBlock>
417
+ ```
418
+
419
+ `StackTrace` renders a V8 or Python stack trace found in text: the error is the
420
+ title, the caller's frames come first, and each run of framework frames
421
+ (`node_modules`, `node:internal`, the Python standard library) folds into one
422
+ line. A tool result that contains a stack shows it this way above the raw
423
+ result, and replaces the raw result when the stack is all the result holds.
424
+ `parseStackTrace` returns the parsed error and frames, and `onFilePathClick`
425
+ turns the caller's frames into buttons:
426
+
427
+ ```tsx
428
+ <StackTrace trace={stderr} defaultOpen onFilePathClick={openInEditor} />
429
+ ```
430
+
431
+ `Terminal` renders a command with its output streaming in underneath. The
432
+ command is the title; a nonzero exit or a timeout marks the step failed and
433
+ adds the exit code beside the duration. The step opens once when output starts
434
+ while running, the view follows new output until the reader scrolls up, the
435
+ newest 500 lines show with the earlier ones a click away, and copy drops ANSI
436
+ color codes. Tool calls whose metadata is `{ toolKind: "bash", command,
437
+ exitCode, durationMs, timedOut }`, as core's coding tools attach, render as a
438
+ terminal by default:
439
+
440
+ ```tsx
441
+ <Terminal
442
+ command="pnpm test"
443
+ output={output}
444
+ running={status === "running"}
445
+ exitCode={exitCode}
446
+ durationMs={durationMs}
447
+ />
448
+ ```
449
+
450
+ Message `citation` parts render as one Sources step: "Used 3 sources", which
451
+ expands to the deduped links. A host `slots.citation` or a
452
+ `registry.messageParts.citation` renderer keeps the inline run instead.
453
+
355
454
  The `react/headless` entry excludes the reference transcript and rich composer,
356
455
  so a custom client bundle loads only the regions it renders. `AgentKitProvider`
357
456
  is the lower-level context boundary it exports: it accepts a controller, thread
@@ -603,6 +702,11 @@ Agent-Native thread, queue, approval, and streaming runtime, and
603
702
  performed in the thread, workspace, or an external app, using a shared
604
703
  semantic kind taxonomy for status, reasoning, search, reads, writes, commands,
605
704
  checks, MCP calls, connections, navigation, delegation, approvals, and tools.
705
+ The React transcript folds each delegated agent's interactions, activities,
706
+ own tool calls, and assigned task into one collapsible Subagent step that
707
+ shows its status, task, and duration, with its calls and reply inside.
708
+ `formatAgentInteractionDetail` on the provider supplies an interaction's
709
+ detail text, such as a localized failure reason from its metadata.
606
710
  - Namespaced `x-*` message parts let a host add rich domain UI without forking
607
711
  the base union, and `data` parts carry opaque structured content for
608
712
  host-owned renderers. The host owns validation and rendering for both.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/agentkit",
3
- "version": "0.228.0-nightly-20261111212500",
3
+ "version": "0.228.0",
4
4
  "description": "Provider-neutral AgentKit protocol, headless client, and transports for composable agent-native conversations.",
5
5
  "homepage": "https://github.com/BuilderIO/agent-native#readme",
6
6
  "bugs": {