@nyte-ai/plugin 0.0.27 → 0.0.28-nightly.20261107.65

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 (55) hide show
  1. package/dist/chunks/{bash-description-tc68h635.js → bash-description-4y8ey061.js} +1 -1
  2. package/dist/chunks/{bash-description-5zjawxsz.js → bash-description-7pkkngps.js} +1 -1
  3. package/dist/chunks/{bash-description-j2azw9sj.js → bash-description-ajjg78ww.js} +1 -1
  4. package/dist/chunks/{bash-description-jhrs22a3.js → bash-description-nn0tmjap.js} +16 -8
  5. package/dist/chunks/{bash-description-0gnxcq7q.js → bash-description-rckj413b.js} +1 -1
  6. package/dist/chunks/bash-description-wtcc8946.js +14 -0
  7. package/dist/src/acp/connection.d.ts +0 -11
  8. package/dist/src/acp/connection.js +1 -1
  9. package/dist/src/acp/index.js +1 -1
  10. package/dist/src/acp/registry.d.ts +0 -15
  11. package/dist/src/acp/thread.d.ts +0 -17
  12. package/dist/src/acp/transcript.d.ts +0 -3
  13. package/dist/src/acp/translate.d.ts +0 -5
  14. package/dist/src/approvals/approvals.d.ts +0 -1
  15. package/dist/src/approvals/schema.d.ts +0 -7
  16. package/dist/src/bash-description.d.ts +0 -9
  17. package/dist/src/browser-client.d.ts +0 -20
  18. package/dist/src/canvas/canvas-client.d.ts +0 -20
  19. package/dist/src/canvas/canvas-compile.js +2 -2
  20. package/dist/src/canvas/canvas-preview.js +2 -2
  21. package/dist/src/canvas/canvas-protocol.d.ts +16 -8
  22. package/dist/src/canvas/canvas-protocol.js +1 -1
  23. package/dist/src/canvas/canvas.js +4 -4
  24. package/dist/src/canvas/schema.js +2 -2
  25. package/dist/src/claude-code-sdk/session.d.ts +0 -17
  26. package/dist/src/claude-code-sdk/translate.d.ts +0 -1
  27. package/dist/src/client/citation.d.ts +8 -0
  28. package/dist/src/client/citation.js +6 -0
  29. package/dist/src/client/mount.d.ts +0 -12
  30. package/dist/src/client/notifications.js +2 -1
  31. package/dist/src/client/presentation.d.ts +2 -144
  32. package/dist/src/client/presentation.js +5 -1
  33. package/dist/src/client/transcript-tui.d.ts +0 -6
  34. package/dist/src/client/transcript.d.ts +0 -6
  35. package/dist/src/client/user-messages.d.ts +0 -10
  36. package/dist/src/client.d.ts +0 -25
  37. package/dist/src/codemode.d.ts +0 -6
  38. package/dist/src/codemode.js +2 -2
  39. package/dist/src/core.d.ts +0 -26
  40. package/dist/src/desktop-settings/schema.d.ts +0 -3
  41. package/dist/src/find-on-path.d.ts +0 -2
  42. package/dist/src/openai-astra-context.d.ts +0 -14
  43. package/dist/src/question/schema.d.ts +0 -8
  44. package/dist/src/rename.js +1 -1
  45. package/dist/src/subagents.d.ts +0 -8
  46. package/dist/src/subagents.js +65 -21
  47. package/dist/src/tool-search.d.ts +0 -1
  48. package/dist/src/web/body.d.ts +0 -1
  49. package/dist/src/web/fetch.d.ts +0 -5
  50. package/dist/src/web/html-markdown.d.ts +0 -6
  51. package/dist/src/web/index.d.ts +0 -6
  52. package/dist/src/web/providers.d.ts +0 -19
  53. package/dist/src/web/search.d.ts +0 -4
  54. package/package.json +4 -4
  55. /package/dist/chunks/{bash-description-spc5av5d.js → bash-description-sqknck2c.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CANVAS_CODE_LIMIT2
3
- } from "./bash-description-jhrs22a3.js";
3
+ } from "./bash-description-nn0tmjap.js";
4
4
 
5
5
  // src/canvas/schema.ts
6
6
  import { definePart } from "@nyte-ai/core";
@@ -4,7 +4,7 @@ import {
4
4
  initializeResult2,
5
5
  renderNotification2,
6
6
  clampCanvasHeight2
7
- } from "./bash-description-jhrs22a3.js";
7
+ } from "./bash-description-nn0tmjap.js";
8
8
 
9
9
  // src/canvas/canvas-preview.ts
10
10
  import { Type } from "typebox";
@@ -10,7 +10,7 @@ import {
10
10
  LIBRARY_EXPORTS2,
11
11
  canvasFilesComment2,
12
12
  KIT_EXPORTS2
13
- } from "./bash-description-jhrs22a3.js";
13
+ } from "./bash-description-nn0tmjap.js";
14
14
 
15
15
  // src/canvas/canvas-compile.ts
16
16
  import { init, parse } from "es-module-lexer/minimal";
@@ -106,20 +106,28 @@ var KIT2 = {
106
106
  Divider: "{}: a hairline",
107
107
  Heading: "{ level?: 1 | 2 | 3 = 2, children }",
108
108
  Text: '{ size?: "xs" | "sm" | "base" | "lg", tone?: "primary" | "secondary" | "tertiary", weight?: "normal" | "medium" | "semibold", mono?: boolean, truncate?: boolean, align?: "start" | "center" | "end", children }',
109
- Code: "{ block?: boolean, children: string }: monospace, inline or a block",
110
- Stat: '{ label: string, value: ReactNode, detail?: ReactNode, tone?: "neutral" | "success" | "warning" | "danger" }: a labelled number',
111
- Badge: '{ tone?: "neutral" | "info" | "success" | "warning" | "danger", children }',
112
- Meter: '{ value: number, max?: number = 100, label?: string, tone?: "primary" | "success" | "warning" | "danger" = "primary" }: a thin filled bar with the value beside the label',
113
- Table: '{ columns: { key: string, label: ReactNode, align?: "start" | "end", width?: number | string }[], rows: Record<string, ReactNode>[], caption?: string }: rows are keyed by column key; a cell can hold a Sparkline or a Badge',
114
- Callout: '{ tone?: "info" | "success" | "warning" | "danger", title?: string, children }',
115
- Card: "{ title?: ReactNode, actions?: ReactNode, padding?: 0 | 2 | 3 | 4 = 4, children }: an elevated bordered surface",
109
+ Code: "{ block?: boolean, title?: string, children: string }: monospace, inline or a block; `title` heads a block with the file it came from",
110
+ FileLink: "{ path: string, line?: number, symbol?: string }: a workspace file, drawn like a file mention in the chat, that opens at `line`; `symbol` names the function there. Use it for every path instead of mono text",
111
+ Stat: '{ label: string, value: ReactNode, detail?: ReactNode, tone?: "neutral" | "success" | "warning" | "danger", delta?: string | number, invert?: boolean, trend?: number[] }: a labelled number; `delta` adds a change chip coloured by its sign (`invert` when down is good), `trend` a sparkline beside the value',
112
+ Delta: "{ value: string | number, invert?: boolean }: a change chip, green when the change is good, read from the sign it is written with; a number gets its sign written for it",
113
+ Badge: '{ tone?: "neutral" | "info" | "success" | "warning" | "danger", dot?: boolean, children }: a short status; `dot` leads it with a status mark',
114
+ Meter: '{ value: number, max?: number = 100, label?: string, detail?: ReactNode, tone?: "primary" | "success" | "warning" | "danger" = "primary" }: a share of a whole with the percentage beside the label; `detail` names the units, as in "124k of 200k"',
115
+ Table: '{ columns: { key: string, label: ReactNode, align?: "start" | "end", width?: number | string }[], rows: Record<string, ReactNode>[], caption?: string }: rows are keyed by column key; a cell can hold a Sparkline, Badge, Delta or DiffStat. The edge cells line up with the text around the table, and with the title inside a `padding={0}` Card',
116
+ KeyValue: "{ items: { label: ReactNode, value: ReactNode }[] }: labelled facts, one per row with the value at the end; use it instead of a two-column Table",
117
+ DiffStat: "{ added: number, removed: number }: lines added and removed, with five blocks split between them as GitHub draws it",
118
+ BarList: '{ data: { label: string, value: number }[], format?: (value: number) => string, tint?: Tint = "blue" }: a ranked list, each label on a bar sized to its share of the largest value; for a top-N list instead of a horizontal BarChart',
119
+ Steps: '{ items: { title: ReactNode, body?: ReactNode, meta?: ReactNode, status?: "done" | "current" | "todo" }[] }: an ordered walk through a process on a numbered rail, instead of a Card per step; `meta` holds a FileLink or a Badge',
120
+ Tracker: '{ label: string, data: { tone: "success" | "warning" | "danger" | "neutral", label: string }[] }: one cell per run, check or day, coloured by how it went and named on hover',
121
+ Callout: '{ tone?: "info" | "success" | "warning" | "danger", title?: string, children }: a note in the reading flow, a soft wash led by its tone glyph',
122
+ Card: "{ title?: ReactNode, description?: ReactNode, actions?: ReactNode, padding?: 0 | 2 | 3 | 4 = 4, children }: a raised surface for one idea; with `padding={0}` its content runs edge to edge under a ruled header",
123
+ Section: "{ title: ReactNode, description?: ReactNode, actions?: ReactNode, children }: a titled group, the heading with an optional line under it and actions at the end, then the content",
116
124
  StackedBars: "{ label: string, series: { key: string, label: string, tint: Tint }[], buckets: { key: string, label: string, values: number[] }[], format: (value: number) => string, height?: number = 88, ticks?: number = 5 }: compact stacked bars without axes, a readout on pointer or arrow keys; the numbers live in the copy around it. Preferred beside a Stat or a heading figure",
117
125
  Sparkline: "{ values: number[], tint?: Tint, label?: string, width?: number = 72, height?: number = 20 }: a row's trend scaled to its own peak, for a Table cell beside the row's number",
118
126
  LineChart: '{ series: { id: string, data: { x: number | string, y: number }[], tint?: Tint }[], height?: number = 240, xFormat?: (x) => string, yFormat?: (y) => string, curve?: "linear" | "monotone" | "step", area?: boolean, legend?: boolean }: a full chart with axes and a readout',
119
127
  BarChart: '{ data: Record<string, number | string>[], keys: (string | { key: string, label?: string, tint?: Tint })[], indexBy: string, height?: number = 240, layout?: "vertical" | "horizontal", mode?: "grouped" | "stacked" = "stacked", valueFormat?: (value: number) => string, legend?: boolean }: a full chart with axes and a readout with the total',
120
128
  PieChart: "{ data: { id: string, value: number, label?: string, tint?: Tint }[], height?: number = 240, donut?: boolean, valueFormat?: (value: number) => string, legend?: boolean }",
121
129
  Button: '{ variant?: "solid" | "outline" | "ghost", pill?: boolean, size?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl", tone?: "neutral" | "primary" | "success" | "warning" | "danger", loading?: boolean, disabled?: boolean, onClick, children }',
122
- Tabs: "Tabs.Root { value?, defaultValue?, onValueChange? } > Tabs.List { children: Tabs.Tab { value, children }[] } + Tabs.Panel { value, children }",
130
+ Tabs: "Tabs.Root { value?, defaultValue?, onValueChange? } > Tabs.List { children: Tabs.Tab { value, children }[] } + Tabs.Panel { value, children }: segmented tabs, only to compare views of one subject",
123
131
  Select: "Select { value?, defaultValue?, onValueChange? } > SelectTrigger { children: <SelectValue /> } + SelectContent { children: SelectItem[] }",
124
132
  SelectTrigger: "see Select",
125
133
  SelectValue: "see Select",
@@ -15,7 +15,7 @@ import { processEnvironment } from "@nyte-ai/core";
15
15
  // package.json
16
16
  var package_default = {
17
17
  name: "@nyte-ai/plugin",
18
- version: "0.0.27",
18
+ version: "0.0.28-nightly.20261107.65",
19
19
  private: false,
20
20
  license: "MIT",
21
21
  repository: {
@@ -0,0 +1,14 @@
1
+ // src/client/citation.ts
2
+ var LOCATION = /^(?<path>.+?)(?::(?<start>\d+)(?:-(?<end>\d+)|:\d+)?|#L(?<anchorStart>\d+)(?:-L(?<anchorEnd>\d+))?)$/u;
3
+ function parseCitation2(text) {
4
+ const trimmed = text.trim().replace(/^\.\//u, "");
5
+ const located = LOCATION.exec(trimmed)?.groups;
6
+ const path = located?.path ?? trimmed;
7
+ const start = Number(located?.start ?? located?.anchorStart);
8
+ if (!Number.isSafeInteger(start) || start < 1)
9
+ return { path, lines: null };
10
+ const end = Number(located?.end ?? located?.anchorEnd ?? start);
11
+ return { path, lines: { start, end: Math.max(start, end) } };
12
+ }
13
+
14
+ export { parseCitation2 };
@@ -2,25 +2,14 @@ import type { ExecutionEnv } from "@nyte-ai/core";
2
2
  import type { AcpAgent } from "./registry.ts";
3
3
  import { AcpThread } from "./thread.ts";
4
4
  import type { AcpApprove } from "./thread.ts";
5
- /**
6
- * One agent process, started in a session's environment so the host's
7
- * environment, sandbox and login-shell gate apply to it, and the ACP
8
- * connection over its stdio. Each `open` starts an ACP session on it. A
9
- * failed `initialize` closes it: an agent that refuses it (fx before
10
- * `fx login`) stays up and keeps refusing, so the next turn needs a new one.
11
- */
12
5
  export declare class AcpProcess {
13
6
  #private;
14
7
  readonly agent: AcpAgent;
15
8
  private constructor();
16
- /** Starts `agent` through `env.exec` with its stdio kept whole for the protocol, after the process environment is whole. */
17
9
  static start(env: ExecutionEnv, agent: AcpAgent): Promise<AcpProcess>;
18
10
  get closed(): boolean;
19
- /** Whether the agent reads image blocks in a prompt. */
20
11
  images(): Promise<boolean>;
21
- /** Starts an ACP session in `cwd` whose permission asks go to `approve`; an agent that wants a sign-in first fails with how to give it one. */
22
12
  open(cwd: string, approve: AcpApprove): Promise<AcpThread>;
23
- /** Drops a thread Nyte no longer follows, cancelling its turn. */
24
13
  forget(thread: AcpThread): void;
25
14
  close(reason?: Error): void;
26
15
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AcpProcess2
3
- } from "../../chunks/bash-description-0gnxcq7q.js";
3
+ } from "../../chunks/bash-description-rckj413b.js";
4
4
  import"../../chunks/bash-description-99k8z2r7.js";
5
5
  import"../../chunks/bash-description-q2v8wbn8.js";
6
6
  export {
@@ -8,7 +8,7 @@ import {
8
8
  import"../../chunks/bash-description-99k8z2r7.js";
9
9
  import {
10
10
  AcpProcess2
11
- } from "../../chunks/bash-description-0gnxcq7q.js";
11
+ } from "../../chunks/bash-description-rckj413b.js";
12
12
  import"../../chunks/bash-description-4vz9pxyx.js";
13
13
  import {
14
14
  registryEntries2,
@@ -1,4 +1,3 @@
1
- /** An ACP agent this machine can start without downloading anything. */
2
1
  export interface AcpAgent {
3
2
  readonly id: string;
4
3
  readonly name: string;
@@ -8,20 +7,6 @@ export interface AcpAgent {
8
7
  /** The ACP session mode each new session is set to, so the agent's permission asks reach Nyte; else the agent's own default. */
9
8
  readonly mode?: string;
10
9
  }
11
- /** The agent entries of a registry document; anything else is no entries. */
12
10
  export declare function registryEntries(document: unknown): readonly unknown[];
13
- /**
14
- * The registry agents installed on this machine, in registry order: a binary
15
- * agent whose command is on `path`, or an npx agent whose package is
16
- * installed globally beside `npx` (its own bin, not another command of the
17
- * same name), run with the registry's arguments. An agent only the registry
18
- * can download is left out, so choosing a model never downloads one.
19
- */
20
11
  export declare function installedAgents(entries: readonly unknown[], path: string): Promise<readonly AcpAgent[]>;
21
- /**
22
- * The agents the user lists in `file` (`{ "agents": [{ id, name, command,
23
- * args?, env?, mode? }] }`), none when there is no file. Each is listed as
24
- * written, installed or not, and its command runs without shell expansion.
25
- * The file is the host's alone, so no client or project picks what runs.
26
- */
27
12
  export declare function userAgents(file: string): Promise<readonly AcpAgent[]>;
@@ -1,46 +1,29 @@
1
1
  import type { ContentBlock, PromptResponse, RequestPermissionRequest, RequestPermissionResponse, SessionUpdate } from "@agentclientprotocol/sdk/unstable";
2
2
  import type { Api, AssistantMessageEventStream, Model } from "@nyte-ai/ai";
3
3
  import type { RuntimeCall, RuntimeVerdict } from "@nyte-ai/core";
4
- /** Decides a call the agent asks permission for, under the session's policy. */
5
4
  export type AcpApprove = (call: RuntimeCall, signal: AbortSignal) => Promise<RuntimeVerdict>;
6
- /** What one of the agent's tool calls reported once it finished, or as far as it got when the turn ended. */
7
5
  export interface AcpToolOutput {
8
6
  readonly text: string;
9
7
  readonly failed: boolean;
10
8
  }
11
- /** How a thread reaches its agent: one prompt turn, the cancel notification for it, the folder its session runs in, and how a permission it asks for is decided. */
12
9
  export interface AcpChannel {
13
10
  readonly cwd: string;
14
11
  prompt(blocks: readonly ContentBlock[]): Promise<PromptResponse>;
15
12
  cancel(): void;
16
13
  readonly approve: AcpApprove;
17
14
  }
18
- /**
19
- * One ACP session on an agent: the prompt turns Nyte sends it, the updates
20
- * it streams back as assistant messages, and its tool calls, which Nyte
21
- * records as mirror calls whose ids start with `prefix`. A permission the
22
- * agent asks for waits until Nyte records that call, then goes to the
23
- * channel's `approve` under the call's ACP kind; a call Nyte skips is
24
- * refused.
25
- */
26
15
  export declare class AcpThread {
27
16
  #private;
28
17
  readonly prefix: string;
29
18
  constructor(prefix: string, channel: AcpChannel);
30
19
  get closed(): boolean;
31
- /** Sends a prompt turn, or queues it behind the turn the agent is running, since ACP takes no message mid-turn. */
32
20
  send(blocks: readonly ContentBlock[]): void;
33
21
  update(update: SessionUpdate): void;
34
22
  permission(request: RequestPermissionRequest): Promise<RequestPermissionResponse>;
35
- /** Lets the agent's permission ask for `id`, now or later, go on to its approval: Nyte is recording the call. */
36
23
  recording(id: string): void;
37
- /** Refuses `id` when the agent asks, now or later: Nyte settled it without running it. A call this thread never saw is left alone. */
38
24
  skip(id: string): void;
39
- /** Streams the turn as one assistant message, ending at the agent's next new tool call or at the turn's end; with `tools` false, its tool calls are refused and skipped. */
40
25
  respond(model: Model<Api>, signal: AbortSignal | undefined, tools?: boolean): AssistantMessageEventStream;
41
- /** Waits for the agent to finish tool call `id`: until it completes or fails, the turn ends, or the agent waits on another call's permission. */
42
26
  result(id: string, signal: AbortSignal): Promise<AcpToolOutput>;
43
- /** Stops the running turn: tells the agent, and answers its waiting permissions as cancelled. */
44
27
  cancel(): void;
45
28
  close(reason?: Error): void;
46
29
  }
@@ -1,8 +1,5 @@
1
1
  import type { ContentBlock } from "@agentclientprotocol/sdk/unstable";
2
2
  import type { Message, UserMessage } from "@nyte-ai/ai";
3
- /** A message's identity for telling whether the agent's session already holds it. */
4
3
  export declare function messageKey(message: Message): string;
5
- /** A user message as prompt blocks; an image the agent cannot read becomes a note of its type. */
6
4
  export declare function userBlocks(message: UserMessage, images: boolean): ContentBlock[];
7
- /** The conversation as plain text, for an agent session that did not see it happen. */
8
5
  export declare function transcriptText(messages: readonly Message[]): string;
@@ -6,7 +6,6 @@ import type { Static } from "typebox";
6
6
  export declare const ACP_PROVIDER = "acp";
7
7
  export declare const ACP_API = "acp";
8
8
  export declare const MIRROR_TOOL = "acp";
9
- /** A mirror call's arguments: the ACP session it ran in, the agent's own call id, title, kind, input and the paths it touches. */
10
9
  export declare const mirrorArguments: Type.TObject<{
11
10
  thread: Type.TString;
12
11
  id: Type.TString;
@@ -16,7 +15,6 @@ export declare const mirrorArguments: Type.TObject<{
16
15
  paths: Type.TArray<Type.TString>;
17
16
  }>;
18
17
  export type MirrorArguments = Static<typeof mirrorArguments>;
19
- /** A turn's usage as ACP defines it. An agent's report missing a required count (fx sends no `totalTokens`) is not usage. */
20
18
  export declare const agentUsage: Type.TObject<{
21
19
  inputTokens: Type.TNumber;
22
20
  outputTokens: Type.TNumber;
@@ -25,11 +23,8 @@ export declare const agentUsage: Type.TObject<{
25
23
  cachedWriteTokens: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
26
24
  }>;
27
25
  export declare function emptyMessage(model: Model<Api>): AssistantMessage;
28
- /** The class Nyte shows and gates an agent's tool call by, from the ACP kind, its paths and its input. */
29
26
  export declare function mirrorClass(args: MirrorArguments): ToolClass;
30
- /** What a finished agent tool call reports, as the text its mirror call returns. */
31
27
  export declare function toolText(content: readonly ToolCallContent[], rawOutput: unknown): string;
32
- /** Builds one assistant message from an agent's streamed text, thoughts and tool calls. */
33
28
  export declare class Translator {
34
29
  #private;
35
30
  constructor(model: Model<Api>, output: AssistantMessage, stream: AssistantMessageEventStream);
@@ -1,6 +1,5 @@
1
1
  import type { PluginApi, RuntimeCall, RuntimeVerdict, SettingDefinition, ToolDefinition } from "@nyte-ai/core";
2
2
  import type { ApprovalPolicy, ApprovalState } from "./schema.ts";
3
- /** A tool call as the policy sees it: its tool's name, its class, and whether its tool lets a policy hold it. */
4
3
  export interface ApprovalTool extends RuntimeCall {
5
4
  readonly approval?: ToolDefinition["approval"];
6
5
  }
@@ -6,9 +6,7 @@ declare const policy: import("@nyte-ai/schema").Schema<"ask" | "auto-edit" | "fu
6
6
  * workspace and tools whose effects are unknown, `full` never.
7
7
  */
8
8
  export type ApprovalPolicy = Infer<typeof policy>;
9
- /** The setting that holds the policy; it names the terminal's `/permissions` command. */
10
9
  export declare const PERMISSIONS = "permissions";
11
- /** The policy setting's schema, shared by the plugin and the clients that read it. */
12
10
  export declare const approvalPolicy: import("@nyte-ai/schema").Schema<"ask" | "auto-edit" | "full">;
13
11
  /** Each policy with the words every client shows for it, in menu order. */
14
12
  export declare const APPROVAL_POLICIES: readonly [{
@@ -57,9 +55,7 @@ declare const state: import("@nyte-ai/schema").Schema<{
57
55
  * first decision, null while it waits.
58
56
  */
59
57
  export type ApprovalState = Infer<typeof state>;
60
- /** What the user can answer, as part actions. */
61
58
  export type ApprovalDecision = Exclude<ApprovalState["decision"], null>;
62
- /** The three answers in the order every client offers them, with their shared labels. */
63
59
  export declare const APPROVAL_ACTIONS: readonly [{
64
60
  readonly action: "once";
65
61
  readonly label: "Allow once";
@@ -70,12 +66,10 @@ export declare const APPROVAL_ACTIONS: readonly [{
70
66
  readonly action: "deny";
71
67
  readonly label: "Deny";
72
68
  }];
73
- /** The question an approval asks and the command, path or label it is about. */
74
69
  export interface ApprovalPrompt {
75
70
  readonly title: string;
76
71
  readonly detail: string;
77
72
  }
78
- /** The words every client shows for an approval. */
79
73
  export declare function approvalPrompt(current: Pick<ApprovalState, "tool" | "class" | "reason">): ApprovalPrompt;
80
74
  /**
81
75
  * A modal request to run one tool call. Its first answer stands: once,
@@ -154,7 +148,6 @@ export declare const approval: {
154
148
  readonly id: PartId;
155
149
  }) => string;
156
150
  };
157
- /** An approval still waiting for the user, with the part its answer goes to. */
158
151
  export type OpenApproval = Pick<ApprovalState, "tool" | "class" | "reason"> & {
159
152
  readonly part: PartId;
160
153
  };
@@ -1,12 +1,3 @@
1
- /**
2
- * Makes the model say what each `bash` call does. A derive wraps the
3
- * environment's `bash` tool, keeping its identity, execute and class, and
4
- * requires `description` in its parameters; the tool's class already carries
5
- * it as `ToolClass.shell.description`, so a client heads the call with it.
6
- *
7
- * @category plugins
8
- * @since 0.1.0
9
- */
10
1
  declare const _default: {
11
2
  id: string;
12
3
  activate(api: {
@@ -14,13 +14,6 @@ export interface ClientActions {
14
14
  offered(action: string): boolean;
15
15
  perform(action: string, input: Json, timeoutMs: number): Promise<Json>;
16
16
  }
17
- /**
18
- * The action an app offers to drive the page each chat's agent holds in its
19
- * browser; its input is a `BrowserCall`.
20
- *
21
- * @category plugins
22
- * @since 0.1.0
23
- */
24
17
  export declare const BROWSER_ACTION: {
25
18
  readonly name: "browser";
26
19
  readonly summary: "Drives the page a chat's agent holds in this app's browser.";
@@ -28,13 +21,6 @@ export declare const BROWSER_ACTION: {
28
21
  readonly type: "object";
29
22
  };
30
23
  };
31
- /**
32
- * What the host asks the browser action to do: one `BrowserAgent` method of
33
- * the desktop and its input.
34
- *
35
- * @category plugins
36
- * @since 0.1.0
37
- */
38
24
  export declare const BrowserCallType: Type.TUnion<[Type.TObject<{
39
25
  method: Type.TLiteral<"open">;
40
26
  session: Type.TUnsafe<import("@nyte-ai/schema").Id<"session">>;
@@ -116,12 +102,6 @@ export type BrowserCall = Static<typeof BrowserCallType>;
116
102
  * @since 0.1.0
117
103
  */
118
104
  export declare function sanitizeLine(text: string): string;
119
- /**
120
- * Returns the id of the page a session's agent holds in an app's browser.
121
- *
122
- * @category plugins
123
- * @since 0.1.0
124
- */
125
105
  export declare function sessionSurfaceId(sessionId: SessionId): string;
126
106
  /**
127
107
  * The browser tools, served by the connected app that offers
@@ -2,14 +2,6 @@ import { Type } from "typebox";
2
2
  import type { Static } from "typebox";
3
3
  import type { ClientActions } from "../browser-client.ts";
4
4
  import type { CanvasPreviewer } from "./canvas-preview.ts";
5
- /**
6
- * The action an app offers to render a canvas preview in its own renderer;
7
- * its input is a `CanvasPreviewRequest`, its answer a
8
- * `CanvasPreviewAnswer`.
9
- *
10
- * @category plugins
11
- * @since 0.1.0
12
- */
13
5
  export declare const CANVAS_PREVIEW_ACTION: {
14
6
  readonly name: "canvas.preview";
15
7
  readonly summary: "Renders a canvas off-screen in this app and reports what it saw.";
@@ -17,12 +9,6 @@ export declare const CANVAS_PREVIEW_ACTION: {
17
9
  readonly type: "object";
18
10
  };
19
11
  };
20
- /**
21
- * What the host sends the preview action.
22
- *
23
- * @category plugins
24
- * @since 0.1.0
25
- */
26
12
  export declare const CanvasPreviewCallType: Type.TObject<{
27
13
  module: Type.TObject<{
28
14
  runtime: Type.TNumber;
@@ -31,12 +17,6 @@ export declare const CanvasPreviewCallType: Type.TObject<{
31
17
  }>;
32
18
  theme: Type.TEnum<["light", "dark"]>;
33
19
  }>;
34
- /**
35
- * What the preview action answers: the outcome, its PNG as base64.
36
- *
37
- * @category plugins
38
- * @since 0.1.0
39
- */
40
20
  export declare const CanvasPreviewAnswerType: Type.TUnion<[Type.TObject<{
41
21
  kind: Type.TLiteral<"rendered">;
42
22
  report: Type.TObject<{
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  localImports2,
3
3
  compileCanvas2
4
- } from "../../chunks/bash-description-j2azw9sj.js";
5
- import"../../chunks/bash-description-jhrs22a3.js";
4
+ } from "../../chunks/bash-description-ajjg78ww.js";
5
+ import"../../chunks/bash-description-nn0tmjap.js";
6
6
  import"../../chunks/bash-description-zfpm2rt0.js";
7
7
  export {
8
8
  compileCanvas2 as compileCanvas,
@@ -2,8 +2,8 @@ import {
2
2
  CANVAS_PREVIEW_WIDTHS2,
3
3
  runCanvasPreview2,
4
4
  describeCanvasPreview2
5
- } from "../../chunks/bash-description-5zjawxsz.js";
6
- import"../../chunks/bash-description-jhrs22a3.js";
5
+ } from "../../chunks/bash-description-7pkkngps.js";
6
+ import"../../chunks/bash-description-nn0tmjap.js";
7
7
  import"../../chunks/bash-description-zfpm2rt0.js";
8
8
  export {
9
9
  CANVAS_PREVIEW_WIDTHS2 as CANVAS_PREVIEW_WIDTHS,
@@ -27,20 +27,28 @@ export declare const KIT: {
27
27
  readonly Divider: "{}: a hairline";
28
28
  readonly Heading: "{ level?: 1 | 2 | 3 = 2, children }";
29
29
  readonly Text: '{ size?: "xs" | "sm" | "base" | "lg", tone?: "primary" | "secondary" | "tertiary", weight?: "normal" | "medium" | "semibold", mono?: boolean, truncate?: boolean, align?: "start" | "center" | "end", children }';
30
- readonly Code: "{ block?: boolean, children: string }: monospace, inline or a block";
31
- readonly Stat: '{ label: string, value: ReactNode, detail?: ReactNode, tone?: "neutral" | "success" | "warning" | "danger" }: a labelled number';
32
- readonly Badge: '{ tone?: "neutral" | "info" | "success" | "warning" | "danger", children }';
33
- readonly Meter: '{ value: number, max?: number = 100, label?: string, tone?: "primary" | "success" | "warning" | "danger" = "primary" }: a thin filled bar with the value beside the label';
34
- readonly Table: '{ columns: { key: string, label: ReactNode, align?: "start" | "end", width?: number | string }[], rows: Record<string, ReactNode>[], caption?: string }: rows are keyed by column key; a cell can hold a Sparkline or a Badge';
35
- readonly Callout: '{ tone?: "info" | "success" | "warning" | "danger", title?: string, children }';
36
- readonly Card: "{ title?: ReactNode, actions?: ReactNode, padding?: 0 | 2 | 3 | 4 = 4, children }: an elevated bordered surface";
30
+ readonly Code: "{ block?: boolean, title?: string, children: string }: monospace, inline or a block; `title` heads a block with the file it came from";
31
+ readonly FileLink: "{ path: string, line?: number, symbol?: string }: a workspace file, drawn like a file mention in the chat, that opens at `line`; `symbol` names the function there. Use it for every path instead of mono text";
32
+ readonly Stat: '{ label: string, value: ReactNode, detail?: ReactNode, tone?: "neutral" | "success" | "warning" | "danger", delta?: string | number, invert?: boolean, trend?: number[] }: a labelled number; `delta` adds a change chip coloured by its sign (`invert` when down is good), `trend` a sparkline beside the value';
33
+ readonly Delta: "{ value: string | number, invert?: boolean }: a change chip, green when the change is good, read from the sign it is written with; a number gets its sign written for it";
34
+ readonly Badge: '{ tone?: "neutral" | "info" | "success" | "warning" | "danger", dot?: boolean, children }: a short status; `dot` leads it with a status mark';
35
+ readonly Meter: '{ value: number, max?: number = 100, label?: string, detail?: ReactNode, tone?: "primary" | "success" | "warning" | "danger" = "primary" }: a share of a whole with the percentage beside the label; `detail` names the units, as in "124k of 200k"';
36
+ readonly Table: '{ columns: { key: string, label: ReactNode, align?: "start" | "end", width?: number | string }[], rows: Record<string, ReactNode>[], caption?: string }: rows are keyed by column key; a cell can hold a Sparkline, Badge, Delta or DiffStat. The edge cells line up with the text around the table, and with the title inside a `padding={0}` Card';
37
+ readonly KeyValue: "{ items: { label: ReactNode, value: ReactNode }[] }: labelled facts, one per row with the value at the end; use it instead of a two-column Table";
38
+ readonly DiffStat: "{ added: number, removed: number }: lines added and removed, with five blocks split between them as GitHub draws it";
39
+ readonly BarList: '{ data: { label: string, value: number }[], format?: (value: number) => string, tint?: Tint = "blue" }: a ranked list, each label on a bar sized to its share of the largest value; for a top-N list instead of a horizontal BarChart';
40
+ readonly Steps: '{ items: { title: ReactNode, body?: ReactNode, meta?: ReactNode, status?: "done" | "current" | "todo" }[] }: an ordered walk through a process on a numbered rail, instead of a Card per step; `meta` holds a FileLink or a Badge';
41
+ readonly Tracker: '{ label: string, data: { tone: "success" | "warning" | "danger" | "neutral", label: string }[] }: one cell per run, check or day, coloured by how it went and named on hover';
42
+ readonly Callout: '{ tone?: "info" | "success" | "warning" | "danger", title?: string, children }: a note in the reading flow, a soft wash led by its tone glyph';
43
+ readonly Card: "{ title?: ReactNode, description?: ReactNode, actions?: ReactNode, padding?: 0 | 2 | 3 | 4 = 4, children }: a raised surface for one idea; with `padding={0}` its content runs edge to edge under a ruled header";
44
+ readonly Section: "{ title: ReactNode, description?: ReactNode, actions?: ReactNode, children }: a titled group, the heading with an optional line under it and actions at the end, then the content";
37
45
  readonly StackedBars: "{ label: string, series: { key: string, label: string, tint: Tint }[], buckets: { key: string, label: string, values: number[] }[], format: (value: number) => string, height?: number = 88, ticks?: number = 5 }: compact stacked bars without axes, a readout on pointer or arrow keys; the numbers live in the copy around it. Preferred beside a Stat or a heading figure";
38
46
  readonly Sparkline: "{ values: number[], tint?: Tint, label?: string, width?: number = 72, height?: number = 20 }: a row's trend scaled to its own peak, for a Table cell beside the row's number";
39
47
  readonly LineChart: '{ series: { id: string, data: { x: number | string, y: number }[], tint?: Tint }[], height?: number = 240, xFormat?: (x) => string, yFormat?: (y) => string, curve?: "linear" | "monotone" | "step", area?: boolean, legend?: boolean }: a full chart with axes and a readout';
40
48
  readonly BarChart: '{ data: Record<string, number | string>[], keys: (string | { key: string, label?: string, tint?: Tint })[], indexBy: string, height?: number = 240, layout?: "vertical" | "horizontal", mode?: "grouped" | "stacked" = "stacked", valueFormat?: (value: number) => string, legend?: boolean }: a full chart with axes and a readout with the total';
41
49
  readonly PieChart: "{ data: { id: string, value: number, label?: string, tint?: Tint }[], height?: number = 240, donut?: boolean, valueFormat?: (value: number) => string, legend?: boolean }";
42
50
  readonly Button: '{ variant?: "solid" | "outline" | "ghost", pill?: boolean, size?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl", tone?: "neutral" | "primary" | "success" | "warning" | "danger", loading?: boolean, disabled?: boolean, onClick, children }';
43
- readonly Tabs: "Tabs.Root { value?, defaultValue?, onValueChange? } > Tabs.List { children: Tabs.Tab { value, children }[] } + Tabs.Panel { value, children }";
51
+ readonly Tabs: "Tabs.Root { value?, defaultValue?, onValueChange? } > Tabs.List { children: Tabs.Tab { value, children }[] } + Tabs.Panel { value, children }: segmented tabs, only to compare views of one subject";
44
52
  readonly Select: "Select { value?, defaultValue?, onValueChange? } > SelectTrigger { children: <SelectValue /> } + SelectContent { children: SelectItem[] }";
45
53
  readonly SelectTrigger: "see Select";
46
54
  readonly SelectValue: "see Select";
@@ -42,7 +42,7 @@ import {
42
42
  clampCanvasHeight2,
43
43
  canvasStartHeight2,
44
44
  sanitizeCanvasVariables2
45
- } from "../../chunks/bash-description-jhrs22a3.js";
45
+ } from "../../chunks/bash-description-nn0tmjap.js";
46
46
  import"../../chunks/bash-description-zfpm2rt0.js";
47
47
  export {
48
48
  CANVAS_CODE_LIMIT2 as CANVAS_CODE_LIMIT,
@@ -9,19 +9,19 @@ import {
9
9
  LIBRARY_VERSIONS2,
10
10
  TINTS2,
11
11
  KIT2
12
- } from "../../chunks/bash-description-jhrs22a3.js";
12
+ } from "../../chunks/bash-description-nn0tmjap.js";
13
13
  import {
14
14
  compileCanvas2
15
- } from "../../chunks/bash-description-j2azw9sj.js";
15
+ } from "../../chunks/bash-description-ajjg78ww.js";
16
16
  import {
17
17
  CANVAS_PREVIEW_WIDTHS2,
18
18
  describeCanvasPreview2
19
- } from "../../chunks/bash-description-5zjawxsz.js";
19
+ } from "../../chunks/bash-description-7pkkngps.js";
20
20
  import {
21
21
  CANVAS_RENDER_TOOL2,
22
22
  CANVAS_REVISIONS_KEPT2,
23
23
  canvas2
24
- } from "../../chunks/bash-description-tc68h635.js";
24
+ } from "../../chunks/bash-description-4y8ey061.js";
25
25
 
26
26
  // src/canvas/canvas.ts
27
27
  import { attachFile, definePart, followedTrace, traced } from "@nyte-ai/core";
@@ -2,8 +2,8 @@ import {
2
2
  CANVAS_RENDER_TOOL2,
3
3
  CANVAS_REVISIONS_KEPT2,
4
4
  canvas2
5
- } from "../../chunks/bash-description-tc68h635.js";
6
- import"../../chunks/bash-description-jhrs22a3.js";
5
+ } from "../../chunks/bash-description-4y8ey061.js";
6
+ import"../../chunks/bash-description-nn0tmjap.js";
7
7
  import"../../chunks/bash-description-zfpm2rt0.js";
8
8
  export {
9
9
  CANVAS_RENDER_TOOL2 as CANVAS_RENDER_TOOL,
@@ -2,7 +2,6 @@ import type { EffortLevel, Options, Query, SDKMessage, SessionStoreEntry, query
2
2
  import type { Api, AssistantMessageEventStream, Message, Model, ProviderEnv, Tool } from "@nyte-ai/ai";
3
3
  import type { ContentBlock } from "./transcript.ts";
4
4
  interface Launch {
5
- /** What only a new process can change: model, folder, thinking and system prompt. Effort and tools change on a running one. */
6
5
  readonly key: string;
7
6
  readonly model: string;
8
7
  readonly cwd: string;
@@ -14,35 +13,19 @@ interface Launch {
14
13
  readonly history: readonly SessionStoreEntry[];
15
14
  readonly tools: readonly Tool[];
16
15
  readonly query: StartQuery;
17
- /** The installed `claude` to run; without one the Agent SDK looks for its own. */
18
16
  readonly claude: string | undefined;
19
17
  }
20
- /** Starts Claude Code: the Agent SDK's `query`, or a stand-in with the parts of its `Query` a session uses. */
21
18
  export type StartQuery = (params: Parameters<typeof query>[0]) => AsyncIterable<SDKMessage> & Pick<Query, "applyFlagSettings" | "close">;
22
- /**
23
- * Claude Code as a bare model: only the tools and system prompt Nyte passes, none of the user's
24
- * Claude Code settings, hooks, MCP servers, skills or CLAUDE.md, and prompts sent as written
25
- * (`verbatimPrompts` needs Claude Code 2.1.248 or later).
26
- */
27
19
  export declare function isolatedOptions(claude: string | undefined, env: ProviderEnv | undefined): Options;
28
- /**
29
- * One running `claude` for a Nyte session. Claude's calls to Nyte's tools end the response that
30
- * makes them; Nyte runs them like any model's calls, and their results answer Claude's MCP
31
- * requests when the next response starts.
32
- */
33
20
  export declare class ClaudeCodeSession {
34
21
  #private;
35
22
  constructor(launch: Launch);
36
23
  get closed(): boolean;
37
- /** Whether this process can take the turn for `keys`: it was launched as `key` and has seen their start. */
38
24
  follows(key: string, keys: readonly string[]): boolean;
39
25
  configure(effort: EffortLevel | undefined): Promise<void>;
40
- /** Serves `tools` as the Nyte MCP server's tools from now on, telling Claude Code when they changed. */
41
26
  expose(tools: readonly Tool[]): void;
42
- /** Answers Claude's waiting Nyte tool calls with the results Nyte recorded for them. */
43
27
  deliver(messages: readonly Message[]): void;
44
28
  send(content: readonly ContentBlock[]): void;
45
- /** Streams Claude's next response to the transcript whose message keys are `keys`. */
46
29
  respond(model: Model<Api>, keys: readonly string[], signal: AbortSignal | undefined): AssistantMessageEventStream;
47
30
  close(reason?: Error): void;
48
31
  }
@@ -8,7 +8,6 @@ export declare function emptyMessage(model: Model<Api>): AssistantMessage;
8
8
  export declare class Translator {
9
9
  #private;
10
10
  constructor(model: Model<Api>, output: AssistantMessage, stream: AssistantMessageEventStream);
11
- /** Applies one stream event. Returns the raw stop reason at a message's end, and `"tool_use"` as soon as a Nyte tool call's input is complete: Claude Code waits for Nyte to run it before it runs the message's later calls. */
12
11
  apply(event: StreamEvent): string | undefined;
13
12
  }
14
13
  export {};
@@ -0,0 +1,8 @@
1
+ export interface Citation {
2
+ readonly path: string;
3
+ readonly lines: {
4
+ readonly start: number;
5
+ readonly end: number;
6
+ } | null;
7
+ }
8
+ export declare function parseCitation(text: string): Citation;
@@ -0,0 +1,6 @@
1
+ import {
2
+ parseCitation2
3
+ } from "../../chunks/bash-description-wtcc8946.js";
4
+ export {
5
+ parseCitation2 as parseCitation
6
+ };
@@ -3,13 +3,6 @@ import type { Decision, Placement, SessionId, SessionInfo, SubmitDraft } from "@
3
3
  import type { Plugin, PluginApi } from "../client.ts";
4
4
  import type { PartMessage } from "./presentation.ts";
5
5
  type Notification = Parameters<PluginApi["ui"]["notify"]>[0];
6
- /**
7
- * What a client hands the plugins it mounts: its connection, the frameworks
8
- * it draws, the session input goes to, the sessions someone is looking at,
9
- * and where notices and plugin errors go.
10
- *
11
- * @category plugins
12
- */
13
6
  export interface MountOptions {
14
7
  readonly connection: Connection;
15
8
  readonly plugins: readonly Plugin[];
@@ -19,11 +12,6 @@ export interface MountOptions {
19
12
  readonly notify: (input: Notification) => void;
20
13
  readonly report: (plugin: string, message: string) => void;
21
14
  }
22
- /**
23
- * The mounted client plugins: their renderers and the hooks a client fires.
24
- *
25
- * @category plugins
26
- */
27
15
  export interface ClientPlugins {
28
16
  readonly ids: readonly string[];
29
17
  /** The view a plugin renderer draws for a part, or undefined when none draws its kind. */