@nyte-ai/plugin 0.0.23 → 0.0.25-beta.1

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 (95) hide show
  1. package/THIRD-PARTY-NOTICES.md +2 -38
  2. package/dist/chunks/{billing-mvc33pv6.js → bash-description-1neewp76.js} +20 -9
  3. package/dist/chunks/{billing-2v3g7rd9.js → bash-description-2v3g7rd9.js} +1 -1
  4. package/dist/chunks/{billing-3j77ss7y.js → bash-description-3j77ss7y.js} +1 -1
  5. package/dist/chunks/{billing-bv5zr32b.js → bash-description-dnvgk30y.js} +2 -2
  6. package/dist/chunks/{billing-r2ftaajy.js → bash-description-eqp7ap2w.js} +3 -9
  7. package/dist/chunks/{billing-hg64tqf1.js → bash-description-hg64tqf1.js} +1 -1
  8. package/dist/chunks/{billing-svrhh5a5.js → bash-description-svrhh5a5.js} +1 -1
  9. package/dist/chunks/{billing-wbe8w0te.js → bash-description-wbe8w0te.js} +1 -1
  10. package/dist/chunks/{billing-wmcbg6fw.js → bash-description-wmcbg6fw.js} +1 -1
  11. package/dist/chunks/{billing-sxc70w72.js → bash-description-yyd9jznf.js} +1 -1
  12. package/dist/chunks/{billing-gs2h17jb.js → bash-description-zz15raxk.js} +1 -1
  13. package/dist/src/acp/connection.js +3 -3
  14. package/dist/src/acp/index.d.ts +3 -3
  15. package/dist/src/acp/index.js +6 -6
  16. package/dist/src/acp/registry.js +2 -2
  17. package/dist/src/acp/thread.js +2 -2
  18. package/dist/src/acp/transcript.js +2 -2
  19. package/dist/src/acp/translate.js +1 -1
  20. package/dist/src/approvals/approvals.d.ts +16 -16
  21. package/dist/src/approvals/approvals.js +1 -1
  22. package/dist/src/approvals/schema.d.ts +18 -18
  23. package/dist/src/approvals/schema.js +1 -1
  24. package/dist/src/bash-description.d.ts +1 -1
  25. package/dist/src/bash-description.js +3 -5
  26. package/dist/src/canvas/canvas-compile.js +3 -3
  27. package/dist/src/canvas/canvas-libraries.js +1 -1
  28. package/dist/src/canvas/canvas-preview.js +3 -3
  29. package/dist/src/canvas/canvas-protocol.d.ts +12 -12
  30. package/dist/src/canvas/canvas-protocol.js +2 -2
  31. package/dist/src/canvas/canvas.d.ts +12 -3
  32. package/dist/src/canvas/canvas.js +37 -15
  33. package/dist/src/canvas/schema.d.ts +48 -8
  34. package/dist/src/canvas/schema.js +7 -3
  35. package/dist/src/claude-code-sdk/index.d.ts +1 -1
  36. package/dist/src/claude-code-sdk/index.js +6 -6
  37. package/dist/src/claude-code-sdk/session.js +2 -2
  38. package/dist/src/claude-code-sdk/transcript.js +2 -2
  39. package/dist/src/claude-code-sdk/translate.js +1 -1
  40. package/dist/src/client/notifications.d.ts +1 -1
  41. package/dist/src/client/presentation.d.ts +1 -27
  42. package/dist/src/client/presentation.js +1 -19
  43. package/dist/src/find-on-path.js +1 -1
  44. package/dist/src/question/client/questions-tui.js +1 -1
  45. package/dist/src/question/client/questions.js +1 -1
  46. package/dist/src/question/question.d.ts +14 -14
  47. package/dist/src/question/question.js +2 -2
  48. package/dist/src/question/schema.d.ts +23 -23
  49. package/dist/src/question/schema.js +1 -1
  50. package/dist/src/rename.d.ts +10 -10
  51. package/dist/src/telemetry.d.ts +1 -1
  52. package/dist/src/web-search.d.ts +2 -2
  53. package/package.json +5 -10
  54. package/dist/chunks/billing-0y7dfkp2.js +0 -146
  55. package/dist/chunks/billing-3scqmkzb.js +0 -559
  56. package/dist/chunks/billing-8rjk35gr.js +0 -444
  57. package/dist/chunks/billing-9qc0eqh4.js +0 -174
  58. package/dist/chunks/billing-a9vqn66p.js +0 -351
  59. package/dist/chunks/billing-cy1rg619.js +0 -302
  60. package/dist/chunks/billing-ejx2hv52.js +0 -323
  61. package/dist/chunks/billing-j643d12p.js +0 -197
  62. package/dist/chunks/billing-s4rrspsk.js +0 -7
  63. package/dist/chunks/billing-t1qrxe16.js +0 -41
  64. package/dist/chunks/billing-tzr3cebf.js +0 -20
  65. package/dist/examples/claude-code/LICENSE +0 -21
  66. package/dist/examples/claude-code/billing.d.ts +0 -7
  67. package/dist/examples/claude-code/billing.js +0 -11
  68. package/dist/examples/claude-code/claude-cli.d.ts +0 -35
  69. package/dist/examples/claude-code/claude-cli.js +0 -15
  70. package/dist/examples/claude-code/env.d.ts +0 -1
  71. package/dist/examples/claude-code/env.js +0 -6
  72. package/dist/examples/claude-code/index.d.ts +0 -24
  73. package/dist/examples/claude-code/index.js +0 -149
  74. package/dist/examples/claude-code/inert-mcp.d.ts +0 -1
  75. package/dist/examples/claude-code/inert-mcp.js +0 -6
  76. package/dist/examples/claude-code/model-catalog.d.ts +0 -27
  77. package/dist/examples/claude-code/model-catalog.js +0 -12
  78. package/dist/examples/claude-code/process.d.ts +0 -22
  79. package/dist/examples/claude-code/process.js +0 -25
  80. package/dist/examples/claude-code/replay.d.ts +0 -4
  81. package/dist/examples/claude-code/replay.js +0 -11
  82. package/dist/examples/claude-code/stream.d.ts +0 -3
  83. package/dist/examples/claude-code/stream.js +0 -16
  84. package/dist/examples/claude-code/transcript.d.ts +0 -83
  85. package/dist/examples/claude-code/transcript.js +0 -23
  86. package/dist/examples/claude-code/turn-relay.d.ts +0 -48
  87. package/dist/examples/claude-code/turn-relay.js +0 -9
  88. package/dist/examples/claude-code/wire.d.ts +0 -372
  89. package/dist/examples/claude-code/wire.js +0 -18
  90. /package/dist/chunks/{billing-4vz9pxyx.js → bash-description-4vz9pxyx.js} +0 -0
  91. /package/dist/chunks/{billing-6z2kgtyt.js → bash-description-6z2kgtyt.js} +0 -0
  92. /package/dist/chunks/{billing-9nn3yp18.js → bash-description-9nn3yp18.js} +0 -0
  93. /package/dist/chunks/{billing-h13r0byk.js → bash-description-h13r0byk.js} +0 -0
  94. /package/dist/chunks/{billing-ye3wk5r3.js → bash-description-ye3wk5r3.js} +0 -0
  95. /package/dist/chunks/{billing-zfpm2rt0.js → bash-description-zfpm2rt0.js} +0 -0
@@ -2,9 +2,9 @@ import {
2
2
  CANVAS_PREVIEW_WIDTHS2,
3
3
  runCanvasPreview2,
4
4
  describeCanvasPreview2
5
- } from "../../chunks/billing-sxc70w72.js";
6
- import"../../chunks/billing-bv5zr32b.js";
7
- import"../../chunks/billing-zfpm2rt0.js";
5
+ } from "../../chunks/bash-description-yyd9jznf.js";
6
+ import"../../chunks/bash-description-dnvgk30y.js";
7
+ import"../../chunks/bash-description-zfpm2rt0.js";
8
8
  export {
9
9
  CANVAS_PREVIEW_WIDTHS2 as CANVAS_PREVIEW_WIDTHS,
10
10
  describeCanvasPreview2 as describeCanvasPreview,
@@ -48,24 +48,24 @@ export declare const TINTS: readonly ["blue", "pink", "orange", "teal", "red", "
48
48
  * answers any other import of `nyte/canvas` with a positioned error.
49
49
  */
50
50
  export declare const KIT: {
51
- readonly Stack: "{ direction?: \"row\" | \"column\" = \"column\", gap?: 0 | 1 | 2 | 3 | 4 | 6 = 2 (×4 px), align?: \"start\" | \"center\" | \"end\" | \"stretch\", justify?: \"start\" | \"center\" | \"end\" | \"between\", wrap?: boolean, children }: flex layout";
52
- readonly Grid: "{ columns?: number | \"auto\" = \"auto\", minWidth?: number = 160 (px, with \"auto\"), gap?: 0 | 1 | 2 | 3 | 4 | 6 = 2, children }: equal columns";
51
+ readonly Stack: '{ direction?: "row" | "column" = "column", gap?: 0 | 1 | 2 | 3 | 4 | 6 = 2 (×4 px), align?: "start" | "center" | "end" | "stretch", justify?: "start" | "center" | "end" | "between", wrap?: boolean, children }: flex layout';
52
+ readonly Grid: '{ columns?: number | "auto" = "auto", minWidth?: number = 160 (px, with "auto"), gap?: 0 | 1 | 2 | 3 | 4 | 6 = 2, children }: equal columns';
53
53
  readonly Divider: "{}: a hairline";
54
54
  readonly Heading: "{ level?: 1 | 2 | 3 = 2, children }";
55
- readonly Text: "{ size?: \"xs\" | \"sm\" | \"base\" | \"lg\", tone?: \"primary\" | \"secondary\" | \"tertiary\", weight?: \"normal\" | \"medium\" | \"semibold\", mono?: boolean, truncate?: boolean, align?: \"start\" | \"center\" | \"end\", children }";
55
+ readonly Text: '{ size?: "xs" | "sm" | "base" | "lg", tone?: "primary" | "secondary" | "tertiary", weight?: "normal" | "medium" | "semibold", mono?: boolean, truncate?: boolean, align?: "start" | "center" | "end", children }';
56
56
  readonly Code: "{ block?: boolean, children: string }: monospace, inline or a block";
57
- readonly Stat: "{ label: string, value: ReactNode, detail?: ReactNode, tone?: \"neutral\" | \"success\" | \"warning\" | \"danger\" }: a labelled number";
58
- readonly Badge: "{ tone?: \"neutral\" | \"info\" | \"success\" | \"warning\" | \"danger\", children }";
59
- 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";
60
- 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";
61
- readonly Callout: "{ tone?: \"info\" | \"success\" | \"warning\" | \"danger\", title?: string, children }";
57
+ readonly Stat: '{ label: string, value: ReactNode, detail?: ReactNode, tone?: "neutral" | "success" | "warning" | "danger" }: a labelled number';
58
+ readonly Badge: '{ tone?: "neutral" | "info" | "success" | "warning" | "danger", children }';
59
+ 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';
60
+ 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';
61
+ readonly Callout: '{ tone?: "info" | "success" | "warning" | "danger", title?: string, children }';
62
62
  readonly Card: "{ title?: ReactNode, actions?: ReactNode, padding?: 0 | 2 | 3 | 4 = 4, children }: an elevated bordered surface";
63
63
  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";
64
64
  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";
65
- 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";
66
- 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";
65
+ 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';
66
+ 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';
67
67
  readonly PieChart: "{ data: { id: string, value: number, label?: string, tint?: Tint }[], height?: number = 240, donut?: boolean, valueFormat?: (value: number) => string, legend?: boolean }";
68
- readonly Button: "{ variant?: \"solid\" | \"outline\" | \"ghost\" | \"pill\" | \"chip\", size?: \"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\", tone?: \"neutral\" | \"primary\" | \"success\" | \"warning\" | \"danger\", loading?: boolean, disabled?: boolean, onClick, children }";
68
+ 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 }';
69
69
  readonly Tabs: "Tabs.Root { value?, defaultValue?, onValueChange? } > Tabs.List { children: Tabs.Tab { value, children }[] } + Tabs.Panel { value, children }";
70
70
  readonly Select: "Select { value?, defaultValue?, onValueChange? } > SelectTrigger { children: <SelectValue /> } + SelectContent { children: SelectItem[] }";
71
71
  readonly SelectTrigger: "see Select";
@@ -83,7 +83,7 @@ export declare const KIT: {
83
83
  readonly Collapsible: "Collapsible.Root { open?, defaultOpen?, onOpenChange? } > Collapsible.Trigger { children } + Collapsible.Panel { children }";
84
84
  readonly Kbd: "{ keys: string[] }";
85
85
  readonly Spinner: "{}";
86
- readonly useColorScheme: "(): \"light\" | \"dark\"";
86
+ readonly useColorScheme: '(): "light" | "dark"';
87
87
  };
88
88
  /** Every name `nyte/canvas` exports, in `KIT` order. */
89
89
  export declare const KIT_EXPORTS: readonly string[];
@@ -34,8 +34,8 @@ import {
34
34
  readHostMessage2,
35
35
  clampCanvasHeight2,
36
36
  sanitizeCanvasVariables2
37
- } from "../../chunks/billing-bv5zr32b.js";
38
- import"../../chunks/billing-zfpm2rt0.js";
37
+ } from "../../chunks/bash-description-dnvgk30y.js";
38
+ import"../../chunks/bash-description-zfpm2rt0.js";
39
39
  export {
40
40
  CANVAS_CODE_LIMIT2 as CANVAS_CODE_LIMIT,
41
41
  CANVAS_DEFAULT_HEIGHT2 as CANVAS_DEFAULT_HEIGHT,
@@ -1,18 +1,27 @@
1
1
  import type { CanvasPreviewer } from "./canvas-preview.ts";
2
2
  import type { Plugin } from "@nyte-ai/plugin/core";
3
3
  export declare const canvas: import("@nyte-ai/core").PartDefinition<{
4
- code: string;
5
4
  runtime: number;
6
5
  title: string;
7
- error: string | null;
8
6
  height: number | null;
7
+ code: string;
8
+ error: string | null;
9
+ revisions?: {
10
+ runtime: number;
11
+ title: string;
12
+ height: number | null;
13
+ number: number;
14
+ blob: import("@nyte-ai/schema").Id<"blob">;
15
+ at: number;
16
+ }[] | undefined;
9
17
  }, {
10
18
  replace: {
11
19
  input: import("@nyte-ai/schema").Schema<{
12
- code: string;
13
20
  runtime: number;
14
21
  title: string;
15
22
  height: number | null;
23
+ code: string;
24
+ blob: import("@nyte-ai/schema").Id<"blob">;
16
25
  }>;
17
26
  };
18
27
  report: {
@@ -1,4 +1,4 @@
1
- import"../../chunks/billing-zfpm2rt0.js";
1
+ import"../../chunks/bash-description-zfpm2rt0.js";
2
2
  import {
3
3
  KIT_SPECIFIER2,
4
4
  CANVAS_ENTRY2,
@@ -9,17 +9,19 @@ import {
9
9
  LIBRARY_VERSIONS2,
10
10
  TINTS2,
11
11
  KIT2
12
- } from "../../chunks/billing-bv5zr32b.js";
12
+ } from "../../chunks/bash-description-dnvgk30y.js";
13
13
  import {
14
14
  compileCanvas2
15
- } from "../../chunks/billing-gs2h17jb.js";
15
+ } from "../../chunks/bash-description-zz15raxk.js";
16
16
  import {
17
17
  CANVAS_PREVIEW_WIDTHS2,
18
18
  describeCanvasPreview2
19
- } from "../../chunks/billing-sxc70w72.js";
19
+ } from "../../chunks/bash-description-yyd9jznf.js";
20
20
  import {
21
+ CANVAS_RENDER_TOOL2,
22
+ CANVAS_REVISIONS_KEPT2,
21
23
  canvas2
22
- } from "../../chunks/billing-mvc33pv6.js";
24
+ } from "../../chunks/bash-description-1neewp76.js";
23
25
 
24
26
  // src/canvas/canvas.ts
25
27
  import { definePart, followedTrace, traced } from "@nyte-ai/core";
@@ -27,7 +29,24 @@ import { asId, standard } from "@nyte-ai/schema";
27
29
  import { Type } from "typebox";
28
30
  var handlers = {
29
31
  async replace(input, context) {
30
- const outcome = await context.part.update(() => ({ ...input, error: null }));
32
+ const outcome = await context.part.update((current) => ({
33
+ runtime: input.runtime,
34
+ title: input.title,
35
+ code: input.code,
36
+ height: input.height,
37
+ error: null,
38
+ revisions: [
39
+ ...current.revisions ?? [],
40
+ {
41
+ number: (current.revisions?.at(-1)?.number ?? 1) + 1,
42
+ blob: input.blob,
43
+ runtime: input.runtime,
44
+ title: input.title,
45
+ height: input.height,
46
+ at: Date.now()
47
+ }
48
+ ].slice(-CANVAS_REVISIONS_KEPT2)
49
+ }));
31
50
  if (outcome.kind !== "updated")
32
51
  throw new Error(`The canvas could not be replaced: ${outcome.kind}.`);
33
52
  },
@@ -99,7 +118,7 @@ ${describeErrors(compiled.errors)}`);
99
118
  var PREVIEW_FIRST = "Before rendering, call `canvas_preview` with the same `source` and `files`: it shows you the canvas and its errors, console and height without the user seeing it. Fix what it shows, then render once.";
100
119
  function renderTool(previewing) {
101
120
  return {
102
- name: "canvas_render",
121
+ name: CANVAS_RENDER_TOOL2,
103
122
  description: previewing ? `${PREVIEW_FIRST}
104
123
 
105
124
  ${CANVAS_DESCRIPTION}` : CANVAS_DESCRIPTION,
@@ -113,15 +132,18 @@ ${CANVAS_DESCRIPTION}` : CANVAS_DESCRIPTION,
113
132
  replay: "safe",
114
133
  async execute(args, invocation) {
115
134
  const compiled = await compile(args, invocation);
116
- const next = {
117
- runtime: compiled.runtime,
118
- title: args.title,
119
- code: compiled.code,
120
- height: args.height ?? null
121
- };
135
+ const drawn = { runtime: compiled.runtime, title: args.title, height: args.height ?? null };
136
+ const blob = await invocation.env.files.upload(async function* () {
137
+ yield encoder.encode(compiled.code);
138
+ }());
122
139
  if (args.canvas === undefined) {
123
140
  const part = await invocation.session.parts.create(canvas, {
124
- state: { ...next, error: null },
141
+ state: {
142
+ ...drawn,
143
+ code: compiled.code,
144
+ error: null,
145
+ revisions: [{ number: 1, blob, ...drawn, at: Date.now() }]
146
+ },
125
147
  placement: { kind: "transcript", role: "answer" }
126
148
  });
127
149
  return {
@@ -129,7 +151,7 @@ ${CANVAS_DESCRIPTION}` : CANVAS_DESCRIPTION,
129
151
  parts: [part.id]
130
152
  };
131
153
  }
132
- const outcome = await invocation.session.part(asId(args.canvas)).act("replace", next);
154
+ const outcome = await invocation.session.part(asId(args.canvas)).act("replace", { ...drawn, code: compiled.code, blob });
133
155
  if (outcome.kind !== "ok")
134
156
  throw new Error(`Canvas ${args.canvas} was not replaced: ${outcome.kind}.`);
135
157
  return {
@@ -1,41 +1,81 @@
1
1
  import type { Infer } from "@nyte-ai/schema";
2
+ /**
3
+ * The tool that renders a canvas and replaces one in place.
4
+ *
5
+ * @category plugins
6
+ * @since 0.1.0
7
+ */
8
+ export declare const CANVAS_RENDER_TOOL = "canvas_render";
9
+ /**
10
+ * How many revisions a canvas lists; a replace past it drops the oldest.
11
+ *
12
+ * @category plugins
13
+ * @since 0.1.0
14
+ */
15
+ export declare const CANVAS_REVISIONS_KEPT = 50;
2
16
  declare const state: import("@nyte-ai/schema").Schema<{
3
- code: string;
4
17
  runtime: number;
5
18
  title: string;
6
- error: string | null;
7
19
  height: number | null;
20
+ code: string;
21
+ error: string | null;
22
+ revisions?: {
23
+ runtime: number;
24
+ title: string;
25
+ height: number | null;
26
+ number: number;
27
+ blob: import("@nyte-ai/schema").Id<"blob">;
28
+ at: number;
29
+ }[] | undefined;
8
30
  }>;
9
31
  /**
10
32
  * Returns a canvas part's state: the compiled module, the runtime it needs,
11
- * its title, the agent's height hint and the last error a client reported.
33
+ * its title, the agent's height hint, the last error a client reported, and
34
+ * its revisions, oldest first, the last one being the module itself.
12
35
  *
13
36
  * @category plugins
14
37
  * @since 0.1.0
15
38
  */
16
39
  export type CanvasState = Infer<typeof state>;
40
+ /**
41
+ * One revision of a canvas: its compiled module stored as a blob, with what
42
+ * drawing it needs besides the code.
43
+ *
44
+ * @category plugins
45
+ * @since 0.1.0
46
+ */
47
+ export type CanvasRevision = NonNullable<CanvasState["revisions"]>[number];
17
48
  /**
18
49
  * A canvas part: a React module the agent wrote, compiled on the host and
19
50
  * drawn by a client inside the sandboxed runtime shell. `replace` swaps the
20
- * module in place; `report` records a load or render error a client saw,
21
- * which the model reads in the fallback.
51
+ * module in place and lists it as the next revision; `report` records a load
52
+ * or render error a client saw, which the model reads in the fallback.
22
53
  *
23
54
  * @category plugins
24
55
  * @since 0.1.0
25
56
  */
26
57
  export declare const canvas: import("@nyte-ai/core").PartDefinition<{
27
- code: string;
28
58
  runtime: number;
29
59
  title: string;
30
- error: string | null;
31
60
  height: number | null;
61
+ code: string;
62
+ error: string | null;
63
+ revisions?: {
64
+ runtime: number;
65
+ title: string;
66
+ height: number | null;
67
+ number: number;
68
+ blob: import("@nyte-ai/schema").Id<"blob">;
69
+ at: number;
70
+ }[] | undefined;
32
71
  }, {
33
72
  replace: {
34
73
  input: import("@nyte-ai/schema").Schema<{
35
- code: string;
36
74
  runtime: number;
37
75
  title: string;
38
76
  height: number | null;
77
+ code: string;
78
+ blob: import("@nyte-ai/schema").Id<"blob">;
39
79
  }>;
40
80
  };
41
81
  report: {
@@ -1,8 +1,12 @@
1
1
  import {
2
+ CANVAS_RENDER_TOOL2,
3
+ CANVAS_REVISIONS_KEPT2,
2
4
  canvas2
3
- } from "../../chunks/billing-mvc33pv6.js";
4
- import"../../chunks/billing-bv5zr32b.js";
5
- import"../../chunks/billing-zfpm2rt0.js";
5
+ } from "../../chunks/bash-description-1neewp76.js";
6
+ import"../../chunks/bash-description-dnvgk30y.js";
7
+ import"../../chunks/bash-description-zfpm2rt0.js";
6
8
  export {
9
+ CANVAS_RENDER_TOOL2 as CANVAS_RENDER_TOOL,
10
+ CANVAS_REVISIONS_KEPT2 as CANVAS_REVISIONS_KEPT,
7
11
  canvas2 as canvas
8
12
  };
@@ -20,7 +20,7 @@ export declare function claudeCodeSdk(start?: StartQuery): {
20
20
  readonly contribute: import("@nyte-ai/core").Registries<"core">;
21
21
  readonly storage: import("@nyte-ai/core").PluginStorage;
22
22
  readonly signal: AbortSignal;
23
- hook<N extends "session_activated" | "before_send" | "run_started" | "transform_transcript" | "before_compaction" | "before_request" | "before_tool" | "after_tool" | "after_request" | "run_ended">(name: N, entry: import("@nyte-ai/core").HookEntry<"core", N>): import("@nyte-ai/schema").Disposer;
23
+ hook<N extends import("@nyte-ai/core").HookName<"core">>(name: N, entry: import("@nyte-ai/core").HookEntry<"core", N>): import("@nyte-ai/schema").Disposer;
24
24
  report(issue: import("@nyte-ai/schema").ValidationIssue): void;
25
25
  reload(): void;
26
26
  } & {
@@ -1,29 +1,29 @@
1
1
  import {
2
2
  findOnPath2
3
- } from "../../chunks/billing-4vz9pxyx.js";
3
+ } from "../../chunks/bash-description-4vz9pxyx.js";
4
4
  import {
5
5
  answerInput2
6
- } from "../../chunks/billing-6z2kgtyt.js";
6
+ } from "../../chunks/bash-description-6z2kgtyt.js";
7
7
  import {
8
8
  question2
9
- } from "../../chunks/billing-3j77ss7y.js";
9
+ } from "../../chunks/bash-description-3j77ss7y.js";
10
10
  import {
11
11
  CLAUDE_CODE_PROVIDER2,
12
12
  MIRROR_TOOL3,
13
13
  BACKGROUND_TOOL2,
14
14
  emptyMessage3,
15
15
  Translator3
16
- } from "../../chunks/billing-ye3wk5r3.js";
16
+ } from "../../chunks/bash-description-ye3wk5r3.js";
17
17
  import {
18
18
  ClaudeCodeSession2
19
- } from "../../chunks/billing-wbe8w0te.js";
19
+ } from "../../chunks/bash-description-wbe8w0te.js";
20
20
  import {
21
21
  mirrorArguments3,
22
22
  userBlocks3,
23
23
  messageKey3,
24
24
  sessionEntries2,
25
25
  flatPrompt2
26
- } from "../../chunks/billing-2v3g7rd9.js";
26
+ } from "../../chunks/bash-description-2v3g7rd9.js";
27
27
 
28
28
  // src/claude-code-sdk/index.ts
29
29
  import { randomUUID } from "node:crypto";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ClaudeCodeSession2
3
- } from "../../chunks/billing-wbe8w0te.js";
4
- import"../../chunks/billing-ye3wk5r3.js";
3
+ } from "../../chunks/bash-description-wbe8w0te.js";
4
+ import"../../chunks/bash-description-ye3wk5r3.js";
5
5
  export {
6
6
  ClaudeCodeSession2 as ClaudeCodeSession
7
7
  };
@@ -4,8 +4,8 @@ import {
4
4
  messageKey3,
5
5
  sessionEntries2,
6
6
  flatPrompt2
7
- } from "../../chunks/billing-2v3g7rd9.js";
8
- import"../../chunks/billing-ye3wk5r3.js";
7
+ } from "../../chunks/bash-description-2v3g7rd9.js";
8
+ import"../../chunks/bash-description-ye3wk5r3.js";
9
9
  export {
10
10
  flatPrompt2 as flatPrompt,
11
11
  messageKey3 as messageKey,
@@ -7,7 +7,7 @@ import {
7
7
  emptyMessage3,
8
8
  mirrorCall2,
9
9
  Translator3
10
- } from "../../chunks/billing-ye3wk5r3.js";
10
+ } from "../../chunks/bash-description-ye3wk5r3.js";
11
11
  export {
12
12
  BACKGROUND_TOOL2 as BACKGROUND_TOOL,
13
13
  CLAUDE_CODE_PROVIDER2 as CLAUDE_CODE_PROVIDER,
@@ -22,7 +22,7 @@ declare const _default: {
22
22
  readonly contribute: import("@nyte-ai/core").Registries<"client">;
23
23
  readonly storage: import("@nyte-ai/core").PluginStorage;
24
24
  readonly signal: AbortSignal;
25
- hook<N extends "run_ended_anywhere" | "app_ready" | "session_opened" | "before_submit" | "session_closed" | "app_closing">(name: N, entry: import("@nyte-ai/core").HookEntry<"client", N>): import("@nyte-ai/schema").Disposer;
25
+ hook<N extends import("@nyte-ai/core").HookName<"client">>(name: N, entry: import("@nyte-ai/core").HookEntry<"client", N>): import("@nyte-ai/schema").Disposer;
26
26
  report(issue: import("@nyte-ai/schema").ValidationIssue): void;
27
27
  reload(): void;
28
28
  } & import("@nyte-ai/plugin/client").ClientApi;
@@ -1,6 +1,6 @@
1
1
  import { text, thinking } from "@nyte-ai/core";
2
2
  import type { PartState } from "@nyte-ai/core";
3
- import type { Execution, Failure, HeadInfo, Message, MessageSource, SessionInfo, ToolClass, ToolPartState, UserContent, UserStatus } from "@nyte-ai/schema";
3
+ import type { Execution, Failure, HeadInfo, Message, MessageSource, SessionInfo, ToolClass, ToolPartState, UserContent } from "@nyte-ai/schema";
4
4
  /**
5
5
  * A message the user sent, or one a child, job or action delivered for them.
6
6
  *
@@ -92,32 +92,6 @@ export declare function readRawPart(message: PartMessage): RawPart;
92
92
  * @category presentation
93
93
  */
94
94
  export declare function showsReport(message: UserMessage): message is ReportMessage;
95
- type PendingStatus = Extract<UserStatus, {
96
- readonly kind: "pending";
97
- }>;
98
- /**
99
- * A message that waits in the queue: unsent, or pending for a later turn. A pending steer sent
100
- * while idle or joining the live run is never one.
101
- *
102
- * @category presentation
103
- */
104
- export type QueuedMessage = UserMessage & {
105
- readonly status: Extract<UserStatus, {
106
- readonly kind: "unsent";
107
- }> | (PendingStatus & {
108
- readonly schedule: Exclude<PendingStatus["schedule"], {
109
- readonly kind: "joined";
110
- }>;
111
- });
112
- };
113
- /**
114
- * Whether a message waits in the queue rather than showing in the transcript. A retrying send
115
- * always waits. Reports, joined steers and steers sent while idle stay in the transcript.
116
- * Other messages wait only while a run is active.
117
- *
118
- * @category presentation
119
- */
120
- export declare function waitsInQueue(message: UserMessage, running: boolean): message is QueuedMessage;
121
95
  /**
122
96
  * What a user message shows: an action's label in place of the prompt it sent.
123
97
  *
@@ -21,23 +21,6 @@ function readRawPart(message) {
21
21
  function showsReport(message) {
22
22
  return message.source.kind === "child" || message.source.kind === "job";
23
23
  }
24
- function waitsInQueue(message, running) {
25
- const { status } = message;
26
- if (showsReport(message))
27
- return false;
28
- switch (status.kind) {
29
- case "landed":
30
- return false;
31
- case "unsent":
32
- return status.retrying !== null || running && message.delivery !== "steer";
33
- case "pending":
34
- return running && status.schedule.kind !== "joined" && !(message.delivery === "steer" && status.schedule.kind === "next-turn" && status.schedule.reason === "idle");
35
- default: {
36
- const _exhaustive = status;
37
- return _exhaustive;
38
- }
39
- }
40
- }
41
24
  function shownContent(message) {
42
25
  return message.source.kind === "action" ? message.source.label : message.content;
43
26
  }
@@ -386,6 +369,5 @@ export {
386
369
  toolStatus,
387
370
  toolSubject,
388
371
  toolTitle,
389
- toolVerbs,
390
- waitsInQueue
372
+ toolVerbs
391
373
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  executable2,
3
3
  findOnPath2
4
- } from "../chunks/billing-4vz9pxyx.js";
4
+ } from "../chunks/bash-description-4vz9pxyx.js";
5
5
  export {
6
6
  executable2 as executable,
7
7
  findOnPath2 as findOnPath
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  question3
3
- } from "../../../chunks/billing-6z2kgtyt.js";
3
+ } from "../../../chunks/bash-description-6z2kgtyt.js";
4
4
 
5
5
  // src/question/client/questions-tui.ts
6
6
  import { Box, Text } from "@opentui/core";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  question3
3
- } from "../../../chunks/billing-6z2kgtyt.js";
3
+ } from "../../../chunks/bash-description-6z2kgtyt.js";
4
4
 
5
5
  // src/question/client/questions.tsx
6
6
  import { useId, useRef, useState } from "react";
@@ -1,15 +1,15 @@
1
1
  import type { ToolDefinition } from "@nyte-ai/core";
2
2
  export declare const question: import("@nyte-ai/core").PartDefinition<{
3
- answers: string[][] | null;
4
3
  questions: {
5
- multiple?: boolean | undefined;
4
+ question: string;
5
+ header: string;
6
6
  options: {
7
- description: string;
8
7
  label: string;
8
+ description: string;
9
9
  }[];
10
- question: string;
11
- header: string;
10
+ multiple?: boolean | undefined;
12
11
  }[];
12
+ answers: string[][] | null;
13
13
  }, {
14
14
  answer: {
15
15
  input: import("@nyte-ai/schema").Schema<{
@@ -28,16 +28,16 @@ declare const _default: {
28
28
  id: string;
29
29
  contribute: {
30
30
  parts: import("@nyte-ai/core").PartDefinition<{
31
- answers: string[][] | null;
32
31
  questions: {
33
- multiple?: boolean | undefined;
32
+ question: string;
33
+ header: string;
34
34
  options: {
35
- description: string;
36
35
  label: string;
36
+ description: string;
37
37
  }[];
38
- question: string;
39
- header: string;
38
+ multiple?: boolean | undefined;
40
39
  }[];
40
+ answers: string[][] | null;
41
41
  }, {
42
42
  answer: {
43
43
  input: import("@nyte-ai/schema").Schema<{
@@ -47,13 +47,13 @@ declare const _default: {
47
47
  }>[];
48
48
  tools: ToolDefinition<{
49
49
  questions: {
50
- multiple?: boolean | undefined;
50
+ question: string;
51
+ header: string;
51
52
  options: {
52
- description: string;
53
53
  label: string;
54
+ description: string;
54
55
  }[];
55
- question: string;
56
- header: string;
56
+ multiple?: boolean | undefined;
57
57
  }[];
58
58
  }, {
59
59
  answers: string[][] | null;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  question2,
3
3
  question_default
4
- } from "../../chunks/billing-3j77ss7y.js";
5
- import"../../chunks/billing-6z2kgtyt.js";
4
+ } from "../../chunks/bash-description-3j77ss7y.js";
5
+ import"../../chunks/bash-description-6z2kgtyt.js";
6
6
  export {
7
7
  question_default as default,
8
8
  question2 as question