@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
@@ -1,12 +1,12 @@
1
1
  import type { Infer, PartId, SessionView } from "@nyte-ai/schema";
2
2
  declare const info: import("@nyte-ai/schema").Schema<{
3
- multiple?: boolean | undefined;
3
+ question: string;
4
+ header: string;
4
5
  options: {
5
- description: string;
6
6
  label: string;
7
+ description: string;
7
8
  }[];
8
- question: string;
9
- header: string;
9
+ multiple?: boolean | undefined;
10
10
  }>;
11
11
  export declare const answerInput: import("@nyte-ai/schema").Schema<{
12
12
  answers: string[][];
@@ -15,26 +15,26 @@ export declare const questionOutput: import("@nyte-ai/schema").Schema<{
15
15
  answers: string[][] | null;
16
16
  }>;
17
17
  declare const state: import("@nyte-ai/schema").Schema<{
18
- answers: string[][] | null;
19
18
  questions: {
20
- multiple?: boolean | undefined;
19
+ question: string;
20
+ header: string;
21
21
  options: {
22
- description: string;
23
22
  label: string;
23
+ description: string;
24
24
  }[];
25
- question: string;
26
- header: string;
25
+ multiple?: boolean | undefined;
27
26
  }[];
27
+ answers: string[][] | null;
28
28
  }>;
29
29
  export declare const questionParameters: import("@nyte-ai/schema").Schema<{
30
30
  questions: {
31
- multiple?: boolean | undefined;
31
+ question: string;
32
+ header: string;
32
33
  options: {
33
- description: string;
34
34
  label: string;
35
+ description: string;
35
36
  }[];
36
- question: string;
37
- header: string;
37
+ multiple?: boolean | undefined;
38
38
  }[];
39
39
  }>;
40
40
  /** A question, its described choices, and whether the user may select several. */
@@ -53,16 +53,16 @@ export type QuestionState = Infer<typeof state>;
53
53
  export declare const question: {
54
54
  kind: string;
55
55
  state: import("@nyte-ai/schema").Schema<{
56
- answers: string[][] | null;
57
56
  questions: {
58
- multiple?: boolean | undefined;
57
+ question: string;
58
+ header: string;
59
59
  options: {
60
- description: string;
61
60
  label: string;
61
+ description: string;
62
62
  }[];
63
- question: string;
64
- header: string;
63
+ multiple?: boolean | undefined;
65
64
  }[];
65
+ answers: string[][] | null;
66
66
  }>;
67
67
  actions: {
68
68
  answer: {
@@ -72,16 +72,16 @@ export declare const question: {
72
72
  };
73
73
  };
74
74
  fallback: (current: {
75
- answers: string[][] | null;
76
75
  questions: {
77
- multiple?: boolean | undefined;
76
+ question: string;
77
+ header: string;
78
78
  options: {
79
- description: string;
80
79
  label: string;
80
+ description: string;
81
81
  }[];
82
- question: string;
83
- header: string;
82
+ multiple?: boolean | undefined;
84
83
  }[];
84
+ answers: string[][] | null;
85
85
  }, { id }: {
86
86
  readonly id: PartId;
87
87
  }) => string;
@@ -4,7 +4,7 @@ import {
4
4
  questionParameters2,
5
5
  question3,
6
6
  openQuestions2
7
- } from "../../chunks/billing-6z2kgtyt.js";
7
+ } from "../../chunks/bash-description-6z2kgtyt.js";
8
8
  export {
9
9
  answerInput2 as answerInput,
10
10
  openQuestions2 as openQuestions,
@@ -27,26 +27,26 @@ declare const _default: {
27
27
  };
28
28
  hooks: {
29
29
  run_started: (run: Readonly<{
30
+ readonly id: import("@nyte-ai/schema").Id<"run">;
31
+ readonly head: import("@nyte-ai/schema").Id<"head">;
32
+ readonly startedAt: number;
33
+ readonly attempt: number;
30
34
  readonly configuration: {
35
+ readonly kind: "exact";
31
36
  readonly model: {
32
- readonly id: string;
33
37
  readonly provider: string;
38
+ readonly id: string;
34
39
  };
35
- readonly thinking: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
36
- readonly kind: "exact";
40
+ readonly thinking: "high" | "low" | "max" | "medium" | "minimal" | "off" | "xhigh";
41
+ readonly agent: string | null;
37
42
  readonly settings: {
38
43
  readonly [x: string]: import("@nyte-ai/schema").Json;
39
44
  };
40
- readonly agent: string | null;
41
45
  readonly settingsVersion: string;
42
46
  };
43
- readonly id: import("@nyte-ai/schema").Id<"run">;
44
- readonly head: import("@nyte-ai/schema").Id<"head">;
45
- readonly startedAt: number;
46
- readonly attempt: number;
47
47
  readonly origin: {
48
- readonly message: import("@nyte-ai/schema").Id<"message">;
49
48
  readonly kind: "input";
49
+ readonly message: import("@nyte-ai/schema").Id<"message">;
50
50
  } | {
51
51
  readonly kind: "continuation";
52
52
  readonly from: "child" | "job" | "wake";
@@ -58,7 +58,7 @@ declare const _default: {
58
58
  readonly contribute: import("@nyte-ai/core").Registries<"core">;
59
59
  readonly storage: import("@nyte-ai/core").PluginStorage;
60
60
  readonly signal: AbortSignal;
61
- 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;
61
+ hook<N extends import("@nyte-ai/core").HookName<"core">>(name: N, entry: import("@nyte-ai/core").HookEntry<"core", N>): import("@nyte-ai/schema").Disposer;
62
62
  report(issue: import("@nyte-ai/schema").ValidationIssue): void;
63
63
  reload(): void;
64
64
  } & {
@@ -21,7 +21,7 @@ declare const _default: {
21
21
  readonly contribute: import("@nyte-ai/core").Registries<"core">;
22
22
  readonly storage: import("@nyte-ai/core").PluginStorage;
23
23
  readonly signal: AbortSignal;
24
- 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;
24
+ hook<N extends import("@nyte-ai/core").HookName<"core">>(name: N, entry: import("@nyte-ai/core").HookEntry<"core", N>): import("@nyte-ai/schema").Disposer;
25
25
  report(issue: import("@nyte-ai/schema").ValidationIssue): void;
26
26
  reload(): void;
27
27
  } & {
@@ -54,7 +54,7 @@ export declare const adapters: {
54
54
  declare const _default: {
55
55
  id: string;
56
56
  contribute: {
57
- settings: SettingDefinition<"exa" | "tavily" | "firecrawl" | "parallel">[];
57
+ settings: SettingDefinition<"exa" | "firecrawl" | "parallel" | "tavily">[];
58
58
  commands: Command<keyof import("@nyte-ai/core").SideTable>[];
59
59
  };
60
60
  activate(api: {
@@ -63,7 +63,7 @@ declare const _default: {
63
63
  readonly contribute: import("@nyte-ai/core").Registries<"core">;
64
64
  readonly storage: import("@nyte-ai/core").PluginStorage;
65
65
  readonly signal: AbortSignal;
66
- 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;
66
+ hook<N extends import("@nyte-ai/core").HookName<"core">>(name: N, entry: import("@nyte-ai/core").HookEntry<"core", N>): import("@nyte-ai/schema").Disposer;
67
67
  report(issue: import("@nyte-ai/schema").ValidationIssue): void;
68
68
  reload(): void;
69
69
  } & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nyte-ai/plugin",
3
- "version": "0.0.23",
3
+ "version": "0.0.25-beta.1",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -47,10 +47,6 @@
47
47
  "types": "./dist/src/canvas/canvas-preview.d.ts",
48
48
  "import": "./dist/src/canvas/canvas-preview.js"
49
49
  },
50
- "./core/claude-code": {
51
- "types": "./dist/examples/claude-code/index.d.ts",
52
- "import": "./dist/examples/claude-code/index.js"
53
- },
54
50
  "./core/claude-code-sdk": {
55
51
  "types": "./dist/src/claude-code-sdk/index.d.ts",
56
52
  "import": "./dist/src/claude-code-sdk/index.js"
@@ -148,9 +144,9 @@
148
144
  "@agentclientprotocol/sdk": "^2.0.0",
149
145
  "@anthropic-ai/claude-agent-sdk": "^0.3.306",
150
146
  "@earendil-works/pi-codemode": "^1.3.0",
151
- "@nyte-ai/ai": "0.0.23",
152
- "@nyte-ai/core": "0.0.23",
153
- "@nyte-ai/schema": "0.0.23",
147
+ "@nyte-ai/ai": "0.0.25-beta.1",
148
+ "@nyte-ai/core": "0.0.25-beta.1",
149
+ "@nyte-ai/schema": "0.0.25-beta.1",
154
150
  "@opentelemetry/api": "^1.10.0",
155
151
  "@opentelemetry/exporter-trace-otlp-http": "^0.300.0",
156
152
  "@opentelemetry/resources": "^3.0.0",
@@ -166,7 +162,6 @@
166
162
  "@types/node": "^26.6.5",
167
163
  "@types/react": "^19.3.0",
168
164
  "react": "^19.3.1",
169
- "typescript": "6.0.3",
170
165
  "vitest": "^5.0.5"
171
166
  },
172
167
  "peerDependencies": {
@@ -187,7 +182,7 @@
187
182
  "scripts": {
188
183
  "clean": "rm -rf node_modules .turbo",
189
184
  "test": "vitest --run",
190
- "typecheck": "tsrs --noEmit",
185
+ "typecheck": "tsc --noEmit",
191
186
  "build:package": "bun ../../scripts/sdk-packages.mjs build plugin"
192
187
  }
193
188
  }
@@ -1,146 +0,0 @@
1
- // examples/claude-code/wire.ts
2
- import { Type } from "typebox";
3
- import { Value } from "typebox/value";
4
- var recordSchema = Type.Record(Type.String(), Type.Unknown());
5
- var usageSchema = Type.Object({
6
- input_tokens: Type.Number(),
7
- output_tokens: Type.Number(),
8
- cache_read_input_tokens: Type.Optional(Type.Number()),
9
- cache_creation_input_tokens: Type.Optional(Type.Number()),
10
- cache_creation: Type.Optional(Type.Object({ ephemeral_1h_input_tokens: Type.Optional(Type.Number()) })),
11
- output_tokens_details: Type.Optional(Type.Object({ thinking_tokens: Type.Optional(Type.Number()) }))
12
- });
13
- var contentSchema = Type.Union([
14
- Type.Object({ type: Type.Literal("text"), text: Type.String() }),
15
- Type.Object({
16
- type: Type.Literal("thinking"),
17
- thinking: Type.String(),
18
- signature: Type.Optional(Type.String())
19
- }),
20
- Type.Object({ type: Type.Literal("redacted_thinking"), data: Type.String() }),
21
- Type.Object({
22
- type: Type.Literal("tool_use"),
23
- id: Type.String(),
24
- name: Type.String(),
25
- input: recordSchema
26
- })
27
- ]);
28
- var messageSchema2 = Type.Intersect([
29
- recordSchema,
30
- Type.Object({
31
- id: Type.Optional(Type.String()),
32
- role: Type.Literal("assistant"),
33
- content: Type.Array(contentSchema),
34
- usage: Type.Optional(usageSchema),
35
- stop_reason: Type.Optional(Type.Union([Type.String(), Type.Null()])),
36
- stop_sequence: Type.Optional(Type.Union([Type.String(), Type.Null()]))
37
- })
38
- ]);
39
- var streamEventSchema = Type.Union([
40
- Type.Object({ type: Type.Literal("message_start"), message: messageSchema2 }),
41
- Type.Object({
42
- type: Type.Literal("content_block_start"),
43
- index: Type.Integer({ minimum: 0 }),
44
- content_block: contentSchema
45
- }),
46
- Type.Object({
47
- type: Type.Literal("content_block_delta"),
48
- index: Type.Integer({ minimum: 0 }),
49
- delta: Type.Union([
50
- Type.Object({ type: Type.Literal("text_delta"), text: Type.String() }),
51
- Type.Object({ type: Type.Literal("thinking_delta"), thinking: Type.String() }),
52
- Type.Object({ type: Type.Literal("signature_delta"), signature: Type.String() }),
53
- Type.Object({ type: Type.Literal("input_json_delta"), partial_json: Type.String() })
54
- ])
55
- }),
56
- Type.Object({ type: Type.Literal("content_block_stop"), index: Type.Integer({ minimum: 0 }) }),
57
- Type.Object({
58
- type: Type.Literal("message_delta"),
59
- delta: Type.Object({
60
- stop_reason: Type.Optional(Type.Union([Type.String(), Type.Null()])),
61
- stop_sequence: Type.Optional(Type.Union([Type.String(), Type.Null()]))
62
- }),
63
- usage: Type.Optional(Type.Partial(usageSchema))
64
- }),
65
- Type.Object({ type: Type.Literal("message_stop") }),
66
- Type.Object({
67
- type: Type.Literal("error"),
68
- error: Type.Optional(Type.Object({ type: Type.Optional(Type.String()), message: Type.Optional(Type.String()) }))
69
- })
70
- ]);
71
- var outputEventSchema = Type.Union([
72
- Type.Object({
73
- type: Type.Literal("assistant"),
74
- message: messageSchema2,
75
- error: Type.Optional(Type.Unknown())
76
- }),
77
- Type.Object({
78
- type: Type.Literal("result"),
79
- subtype: Type.Optional(Type.String()),
80
- is_error: Type.Optional(Type.Boolean()),
81
- num_turns: Type.Optional(Type.Number()),
82
- usage: Type.Optional(usageSchema),
83
- total_cost_usd: Type.Optional(Type.Number()),
84
- modelUsage: Type.Optional(recordSchema)
85
- }),
86
- Type.Object({ type: Type.Literal("stream_event"), event: streamEventSchema }),
87
- Type.Object({
88
- type: Type.Literal("rate_limit_event"),
89
- rate_limit_info: Type.Optional(Type.Object({
90
- status: Type.Optional(Type.String()),
91
- rateLimitType: Type.Optional(Type.String()),
92
- resetsAt: Type.Optional(Type.Number()),
93
- isUsingOverage: Type.Optional(Type.Boolean()),
94
- overageStatus: Type.Optional(Type.String()),
95
- overageDisabledReason: Type.Optional(Type.String())
96
- }))
97
- }),
98
- Type.Object({ type: Type.Literal("control_response"), response: recordSchema })
99
- ]);
100
- var requestMessageSchema = Type.Object({
101
- role: Type.Optional(Type.String()),
102
- content: Type.Optional(Type.Unknown())
103
- });
104
- var requestMessagesSchema = Type.Array(requestMessageSchema);
105
- var requestSchema = Type.Intersect([
106
- recordSchema,
107
- Type.Object({ messages: requestMessagesSchema, system: Type.Optional(Type.Unknown()) })
108
- ]);
109
- function matchesRecord2(value) {
110
- return Value.Check(recordSchema, value);
111
- }
112
- function parseRecord2(text) {
113
- const value = JSON.parse(text);
114
- if (!matchesRecord2(value))
115
- throw new Error("Expected a JSON object");
116
- return value;
117
- }
118
- function parseStreamEvent2(text) {
119
- const value = JSON.parse(text);
120
- if (matchesRecord2(value) && value.type === "ping")
121
- return;
122
- if (!Value.Check(streamEventSchema, value))
123
- throw new Error("Invalid Anthropic stream event");
124
- return value;
125
- }
126
- function parseOutputEvent2(text) {
127
- const value = parseRecord2(text);
128
- if (!["assistant", "result", "stream_event", "rate_limit_event", "control_response"].includes(String(value.type)))
129
- return;
130
- if (!Value.Check(outputEventSchema, value))
131
- throw new Error("Invalid Claude Code output event");
132
- return value;
133
- }
134
- function parseRequest2(body) {
135
- const value = JSON.parse(body.toString("utf8"));
136
- if (!Value.Check(requestSchema, value))
137
- throw new Error("Invalid Claude Code request");
138
- return value;
139
- }
140
- function parseRequestMessages2(value) {
141
- if (!Value.Check(requestMessagesSchema, value))
142
- throw new Error("Invalid Claude Code replay messages");
143
- return value;
144
- }
145
-
146
- export { messageSchema2, matchesRecord2, parseRecord2, parseStreamEvent2, parseOutputEvent2, parseRequest2, parseRequestMessages2 };