@nyte-ai/plugin 0.0.25-nightly.20261102.45 → 0.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD-PARTY-NOTICES.md +65 -0
- package/dist/chunks/{bash-description-myvnmtt2.js → bash-description-03bm07ft.js} +2 -8
- package/dist/chunks/{bash-description-9q5rxbtt.js → bash-description-0gnxcq7q.js} +31 -11
- package/dist/chunks/bash-description-0vfhp1qd.js +54 -0
- package/dist/chunks/{bash-description-g7gfy7nw.js → bash-description-4kqkzdkp.js} +3 -5
- package/dist/chunks/{bash-description-axnga0jz.js → bash-description-a99pev5h.js} +2 -2
- package/dist/chunks/{bash-description-bkhr9zrz.js → bash-description-s6v2m3ch.js} +28 -10
- package/dist/chunks/{bash-description-qwyy182r.js → bash-description-spc5av5d.js} +1 -7
- package/dist/chunks/bash-description-t3hbavcc.js +12 -0
- package/dist/src/acp/connection.js +1 -1
- package/dist/src/acp/index.js +2 -2
- package/dist/src/acp/transcript.js +1 -1
- package/dist/src/approvals/approvals.js +6 -3
- package/dist/src/approvals/schema.js +1 -1
- package/dist/src/browser-client.d.ts +135 -0
- package/dist/src/browser-client.js +374 -0
- package/dist/src/canvas/canvas-client.d.ts +71 -0
- package/dist/src/canvas/canvas-client.js +70 -0
- package/dist/src/canvas/canvas-compile.d.ts +0 -34
- package/dist/src/canvas/canvas-libraries.d.ts +0 -6
- package/dist/src/canvas/canvas-preview.d.ts +0 -65
- package/dist/src/canvas/canvas-protocol.d.ts +5 -80
- package/dist/src/canvas/canvas.d.ts +0 -25
- package/dist/src/canvas/schema.d.ts +0 -37
- package/dist/src/client/notifications.js +2 -1
- package/dist/src/client/presentation.d.ts +3 -23
- package/dist/src/client/presentation.js +7 -3
- package/dist/src/client/transcript.js +18 -18
- package/dist/src/client/user-messages.d.ts +41 -0
- package/dist/src/client/user-messages.js +10 -0
- package/dist/src/desktop-settings/desktop-settings.d.ts +31 -0
- package/dist/src/desktop-settings/desktop-settings.js +136 -0
- package/dist/src/desktop-settings/schema.d.ts +42 -0
- package/dist/src/desktop-settings/schema.js +14 -0
- package/dist/src/question/client/questions-tui.js +6 -2
- package/dist/src/question/client/questions.js +47 -46
- package/dist/src/question/question.d.ts +37 -6
- package/dist/src/question/question.js +69 -17
- package/dist/src/question/schema.d.ts +73 -11
- package/dist/src/question/schema.js +9 -5
- package/dist/src/rename.d.ts +1 -1
- package/dist/src/subagents.js +11 -23
- package/dist/src/web/fetch.js +1 -1
- package/dist/src/web/index.js +1 -1
- package/package.json +30 -14
package/dist/src/subagents.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
// src/subagents.ts
|
|
2
2
|
import { Type } from "typebox";
|
|
3
3
|
import { asId, standard } from "@nyte-ai/schema";
|
|
4
|
-
import { isPart, text, tool } from "@nyte-ai/core";
|
|
5
|
-
var ANSWER_LIMIT = 16000;
|
|
6
|
-
var TRANSCRIPT_LIMIT = 16000;
|
|
4
|
+
import { clipText, isPart, text, tool } from "@nyte-ai/core";
|
|
7
5
|
var SCHEDULED = {
|
|
8
6
|
joined: "it joins the work in progress",
|
|
9
7
|
"next-turn": "it runs once its current work ends",
|
|
@@ -87,9 +85,9 @@ var task = {
|
|
|
87
85
|
});
|
|
88
86
|
const answer = await readSubagentReply(child, run, outcome);
|
|
89
87
|
const worktree = await describeWorktree(invocation, child);
|
|
90
|
-
return reply(worktree === null ? answer : `${worktree}
|
|
88
|
+
return reply(clipText(worktree === null ? answer : `${worktree}
|
|
91
89
|
|
|
92
|
-
${answer}
|
|
90
|
+
${answer}`, "head"));
|
|
93
91
|
}
|
|
94
92
|
};
|
|
95
93
|
var create = {
|
|
@@ -156,12 +154,12 @@ var awaitChild = {
|
|
|
156
154
|
const last = execution.kind === "idle" ? execution.lastRun : null;
|
|
157
155
|
if (last === null)
|
|
158
156
|
return reply(`Subagent ${child.id} has not worked on anything yet.`);
|
|
159
|
-
return reply(await readSubagentReply(child, last.id, {
|
|
157
|
+
return reply(clipText(await readSubagentReply(child, last.id, {
|
|
160
158
|
kind: "run",
|
|
161
159
|
session: child.id,
|
|
162
160
|
run: last.id,
|
|
163
161
|
end: last.end
|
|
164
|
-
}));
|
|
162
|
+
}), "head"));
|
|
165
163
|
}
|
|
166
164
|
const targets = [{ kind: "run", session: child.id, run }];
|
|
167
165
|
const outcome = await invocation.wait(args.timeout === undefined ? { kind: "any", targets, untilInput: true } : {
|
|
@@ -170,7 +168,7 @@ var awaitChild = {
|
|
|
170
168
|
untilInput: true,
|
|
171
169
|
deadline: invocation.now() + args.timeout * 1000
|
|
172
170
|
});
|
|
173
|
-
return reply(await readSubagentReply(child, run, outcome));
|
|
171
|
+
return reply(clipText(await readSubagentReply(child, run, outcome), "head"));
|
|
174
172
|
}
|
|
175
173
|
};
|
|
176
174
|
var readAgent = {
|
|
@@ -190,12 +188,12 @@ var readAgent = {
|
|
|
190
188
|
const view = await child.view();
|
|
191
189
|
const execution = view.execution.kind;
|
|
192
190
|
const state = execution === "idle" ? "idle" : execution === "waiting" ? "waiting" : "working";
|
|
193
|
-
const transcript =
|
|
191
|
+
const transcript = [...view.messages, ...view.queue].flatMap(renderTranscriptMessage).join(`
|
|
194
192
|
|
|
195
|
-
`)
|
|
196
|
-
return reply(transcript === "" ? `Subagent ${child.id} is ${state} and has no messages yet.` :
|
|
193
|
+
`);
|
|
194
|
+
return reply(transcript === "" ? `Subagent ${child.id} is ${state} and has no messages yet.` : clipText(`${transcript}
|
|
197
195
|
|
|
198
|
-
${
|
|
196
|
+
Subagent ${child.id} is ${state}.`, "tail"));
|
|
199
197
|
}
|
|
200
198
|
};
|
|
201
199
|
var stop = {
|
|
@@ -273,7 +271,7 @@ async function readSubagentReply(child, run, outcome) {
|
|
|
273
271
|
const answer = view.messages.flatMap((message) => message.turn === turn && isPart(message, text) && message.state.markdown !== "" ? [message.state.markdown] : []).at(-1) ?? "";
|
|
274
272
|
return answer === "" ? header : `${header}
|
|
275
273
|
|
|
276
|
-
${
|
|
274
|
+
${answer}`;
|
|
277
275
|
}
|
|
278
276
|
function describeSubagentOutcome(outcome) {
|
|
279
277
|
if (outcome.kind === "run")
|
|
@@ -308,16 +306,6 @@ function renderTranscriptMessage(message) {
|
|
|
308
306
|
}
|
|
309
307
|
return [];
|
|
310
308
|
}
|
|
311
|
-
function fromStart(content, limit) {
|
|
312
|
-
return content.length > limit ? `${content.slice(0, limit)}
|
|
313
|
-
|
|
314
|
-
[… cut at ${limit} characters]` : content;
|
|
315
|
-
}
|
|
316
|
-
function fromEnd(content, limit) {
|
|
317
|
-
return content.length > limit ? `[… earlier messages cut]
|
|
318
|
-
|
|
319
|
-
${content.slice(-limit)}` : content;
|
|
320
|
-
}
|
|
321
309
|
export {
|
|
322
310
|
subagents_default as default
|
|
323
311
|
};
|
package/dist/src/web/fetch.js
CHANGED
package/dist/src/web/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import"../../chunks/bash-description-0ah30s12.js";
|
|
|
2
2
|
import"../../chunks/bash-description-5dpf5hpt.js";
|
|
3
3
|
import {
|
|
4
4
|
webFetch2
|
|
5
|
-
} from "../../chunks/bash-description-
|
|
5
|
+
} from "../../chunks/bash-description-03bm07ft.js";
|
|
6
6
|
import {
|
|
7
7
|
PROVIDERS2,
|
|
8
8
|
adapters2,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nyte-ai/plugin",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.27",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -31,6 +31,10 @@
|
|
|
31
31
|
"types": "./dist/src/bash-description.d.ts",
|
|
32
32
|
"import": "./dist/src/bash-description.js"
|
|
33
33
|
},
|
|
34
|
+
"./core/browser-client": {
|
|
35
|
+
"types": "./dist/src/browser-client.d.ts",
|
|
36
|
+
"import": "./dist/src/browser-client.js"
|
|
37
|
+
},
|
|
34
38
|
"./core/browser-tools": {
|
|
35
39
|
"types": "./dist/src/browser-tools.d.ts",
|
|
36
40
|
"import": "./dist/src/browser-tools.js"
|
|
@@ -39,6 +43,10 @@
|
|
|
39
43
|
"types": "./dist/src/canvas/canvas.d.ts",
|
|
40
44
|
"import": "./dist/src/canvas/canvas.js"
|
|
41
45
|
},
|
|
46
|
+
"./core/canvas-client": {
|
|
47
|
+
"types": "./dist/src/canvas/canvas-client.d.ts",
|
|
48
|
+
"import": "./dist/src/canvas/canvas-client.js"
|
|
49
|
+
},
|
|
42
50
|
"./core/canvas-compile": {
|
|
43
51
|
"types": "./dist/src/canvas/canvas-compile.d.ts",
|
|
44
52
|
"import": "./dist/src/canvas/canvas-compile.js"
|
|
@@ -63,6 +71,10 @@
|
|
|
63
71
|
"types": "./dist/src/codemode-worker.d.ts",
|
|
64
72
|
"import": "./dist/src/codemode-worker.js"
|
|
65
73
|
},
|
|
74
|
+
"./core/desktop-settings": {
|
|
75
|
+
"types": "./dist/src/desktop-settings/desktop-settings.d.ts",
|
|
76
|
+
"import": "./dist/src/desktop-settings/desktop-settings.js"
|
|
77
|
+
},
|
|
66
78
|
"./core/openai-astra-context": {
|
|
67
79
|
"types": "./dist/src/openai-astra-context.d.ts",
|
|
68
80
|
"import": "./dist/src/openai-astra-context.js"
|
|
@@ -139,6 +151,10 @@
|
|
|
139
151
|
"types": "./dist/src/canvas/schema.d.ts",
|
|
140
152
|
"import": "./dist/src/canvas/schema.js"
|
|
141
153
|
},
|
|
154
|
+
"./desktop-settings/schema": {
|
|
155
|
+
"types": "./dist/src/desktop-settings/schema.d.ts",
|
|
156
|
+
"import": "./dist/src/desktop-settings/schema.js"
|
|
157
|
+
},
|
|
142
158
|
"./question/schema": {
|
|
143
159
|
"types": "./dist/src/question/schema.d.ts",
|
|
144
160
|
"import": "./dist/src/question/schema.js"
|
|
@@ -149,32 +165,32 @@
|
|
|
149
165
|
"provenance": true
|
|
150
166
|
},
|
|
151
167
|
"dependencies": {
|
|
152
|
-
"@agentclientprotocol/sdk": "^2.
|
|
153
|
-
"@anthropic-ai/claude-agent-sdk": "^0.3.
|
|
154
|
-
"@earendil-works/pi-codemode": "^1.
|
|
155
|
-
"@nyte-ai/ai": "0.0.
|
|
156
|
-
"@nyte-ai/core": "0.0.
|
|
157
|
-
"@nyte-ai/schema": "0.0.
|
|
168
|
+
"@agentclientprotocol/sdk": "^2.4.0",
|
|
169
|
+
"@anthropic-ai/claude-agent-sdk": "^0.3.317",
|
|
170
|
+
"@earendil-works/pi-codemode": "^1.5.0",
|
|
171
|
+
"@nyte-ai/ai": "0.0.27",
|
|
172
|
+
"@nyte-ai/core": "0.0.27",
|
|
173
|
+
"@nyte-ai/schema": "0.0.27",
|
|
158
174
|
"@opentelemetry/api": "^1.10.0",
|
|
159
175
|
"@opentelemetry/exporter-trace-otlp-http": "^0.300.0",
|
|
160
176
|
"@opentelemetry/resources": "^3.0.0",
|
|
161
177
|
"@opentelemetry/sdk-trace": "^3.0.0",
|
|
162
|
-
"@opentelemetry/semantic-conventions": "^1.
|
|
178
|
+
"@opentelemetry/semantic-conventions": "^1.44.0",
|
|
163
179
|
"es-module-lexer": "^3.0.4",
|
|
164
|
-
"htmlparser2": "^
|
|
180
|
+
"htmlparser2": "^12.0.0",
|
|
165
181
|
"sucrase": "^3.35.1",
|
|
166
|
-
"typebox": "^1.4.
|
|
182
|
+
"typebox": "^1.4.3",
|
|
167
183
|
"zod": "^4.6.7"
|
|
168
184
|
},
|
|
169
185
|
"devDependencies": {
|
|
170
|
-
"@opentui/core": "^0.
|
|
171
|
-
"@types/node": "^26.6.
|
|
186
|
+
"@opentui/core": "^0.8.2",
|
|
187
|
+
"@types/node": "^26.6.6",
|
|
172
188
|
"@types/react": "^19.3.0",
|
|
173
189
|
"react": "^19.3.1",
|
|
174
|
-
"vitest": "^5.0
|
|
190
|
+
"vitest": "^5.1.0"
|
|
175
191
|
},
|
|
176
192
|
"peerDependencies": {
|
|
177
|
-
"@opentui/core": "^0.
|
|
193
|
+
"@opentui/core": "^0.8.2",
|
|
178
194
|
"react": "^19.3.1"
|
|
179
195
|
},
|
|
180
196
|
"peerDependenciesMeta": {
|