@nyte-ai/protocol 0.0.21 → 0.0.24
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
CHANGED
|
@@ -45,39 +45,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
45
45
|
SOFTWARE.
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
## pi-claude-code (`earendil-works/pi-claude-code`)
|
|
49
|
-
|
|
50
|
-
- Repository: https://github.com/earendil-works/pi-claude-code
|
|
51
|
-
- What: the Claude Code CLI provider, single-turn relay, transcript replay,
|
|
52
|
-
process reuse, and billing guards in `packages/plugin/examples/claude-code`
|
|
53
|
-
are adapted from commit `70abb65186592ca788b29b3db22c3160d629c41f`.
|
|
54
|
-
|
|
55
|
-
License: MIT, with the following notice:
|
|
56
|
-
|
|
57
|
-
```text
|
|
58
|
-
MIT License
|
|
59
|
-
|
|
60
|
-
Copyright (c) 2026 Armin Ronacher
|
|
61
|
-
|
|
62
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
63
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
64
|
-
in the Software without restriction, including without limitation the rights
|
|
65
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
66
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
67
|
-
furnished to do so, subject to the following conditions:
|
|
68
|
-
|
|
69
|
-
The above copyright notice and this permission notice shall be included in all
|
|
70
|
-
copies or substantial portions of the Software.
|
|
71
|
-
|
|
72
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
73
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
74
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
75
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
76
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
77
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
78
|
-
SOFTWARE.
|
|
79
|
-
```
|
|
80
|
-
|
|
81
48
|
## pi (`earendil-works/pi`)
|
|
82
49
|
|
|
83
50
|
- Repository: https://github.com/earendil-works/pi
|
|
@@ -345,8 +312,8 @@ Copyright 2025 OpenAI
|
|
|
345
312
|
front of the queue (`packages/tui/src/model/interactions.ts`) is its
|
|
346
313
|
`onEmptySubmit`. The rename
|
|
347
314
|
plugin's context construction, prompt, model fallback, and output cleanup
|
|
348
|
-
(`packages/plugin/
|
|
349
|
-
plugin set (`packages/plugin/
|
|
315
|
+
(`packages/plugin/src/rename.ts`) port OpenCode v2. The web-search
|
|
316
|
+
plugin set (`packages/plugin/src/web-search.ts`) ports its Exa, Firecrawl,
|
|
350
317
|
Parallel, and Tavily adapters, its stateless MCP `tools/call` transport and
|
|
351
318
|
response bounds, its result and error vocabulary, and its arrangement of one
|
|
352
319
|
plugin per provider from OpenCode v2.
|
|
@@ -429,9 +396,6 @@ SOFTWARE.
|
|
|
429
396
|
bypass, and connection tuning in `packages/host/src/sqlite*.ts` are adapted
|
|
430
397
|
from `bf8ffe81a63c82d3de5fbaa9991fd5f30034a452`.
|
|
431
398
|
- Homepage: https://t3.codes
|
|
432
|
-
- What: the demo desktop app (`packages/demo/desktop`) follows T3 Code's
|
|
433
|
-
control-surface shape — agents in a sidebar, a conversation workspace, a
|
|
434
|
-
shared composer, and settings behind a dialog.
|
|
435
399
|
|
|
436
400
|
License: MIT, with the following notice:
|
|
437
401
|
|
|
@@ -7,6 +7,7 @@ import { Type } from "typebox";
|
|
|
7
7
|
import { Compile } from "typebox/compile";
|
|
8
8
|
import { SdkError } from "@nyte-ai/schema";
|
|
9
9
|
var TAKE = -1;
|
|
10
|
+
var NO_SESSIONS = { ids: [], list: [] };
|
|
10
11
|
var streamed = Compile(Type.Object({ markdown: Type.String() }));
|
|
11
12
|
function viewFrames2(views) {
|
|
12
13
|
let previous = null;
|
|
@@ -40,6 +41,34 @@ function applyViewFrame2(view, frame) {
|
|
|
40
41
|
catalog: frame.catalog ?? view.catalog
|
|
41
42
|
};
|
|
42
43
|
}
|
|
44
|
+
function sessionsFrames2(lists) {
|
|
45
|
+
let previous = null;
|
|
46
|
+
return mapped2(lists, (list) => {
|
|
47
|
+
const { runs, items } = splice(previous ?? [], list) ?? { runs: [0, list.length], items: [] };
|
|
48
|
+
const kind = previous === null ? "list" : "delta";
|
|
49
|
+
previous = list;
|
|
50
|
+
return { kind, order: { runs, items: items.map((info) => info.id) }, items };
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function sessionLists2(frames) {
|
|
54
|
+
return {
|
|
55
|
+
[Symbol.asyncIterator]() {
|
|
56
|
+
let shown = null;
|
|
57
|
+
return mapped2(frames, (frame) => {
|
|
58
|
+
const before = frame.kind === "list" ? NO_SESSIONS : shown;
|
|
59
|
+
if (before === null)
|
|
60
|
+
throw unfit("A sessions delta arrived before its list.");
|
|
61
|
+
const taken = new Set(frame.order.items);
|
|
62
|
+
const rows = new Map(frame.items.map((info) => [info.id, info]));
|
|
63
|
+
const kept = new Map(before.list.map((info) => [info.id, info]));
|
|
64
|
+
const ids = applySplice(before.ids, frame.order);
|
|
65
|
+
const list = ids.flatMap((id) => (taken.has(id) ? rows.get(id) : kept.get(id)) ?? []);
|
|
66
|
+
shown = { ids, list };
|
|
67
|
+
return list;
|
|
68
|
+
})[Symbol.asyncIterator]();
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
}
|
|
43
72
|
function viewDelta(previous, next) {
|
|
44
73
|
const appends = [];
|
|
45
74
|
const messages = splice(previous.messages, next.messages, (before, after, at) => {
|
|
@@ -154,4 +183,4 @@ function unfit(message) {
|
|
|
154
183
|
return new SdkError("invalid", message);
|
|
155
184
|
}
|
|
156
185
|
|
|
157
|
-
export { viewFrames2, applyViewFrame2 };
|
|
186
|
+
export { viewFrames2, applyViewFrame2, sessionsFrames2, sessionLists2 };
|
package/dist/src/index.js
CHANGED
|
@@ -52,8 +52,10 @@ import {
|
|
|
52
52
|
} from "../chunks/client-xscg1xbf.js";
|
|
53
53
|
import {
|
|
54
54
|
viewFrames2,
|
|
55
|
-
applyViewFrame2
|
|
56
|
-
|
|
55
|
+
applyViewFrame2,
|
|
56
|
+
sessionsFrames2,
|
|
57
|
+
sessionLists2
|
|
58
|
+
} from "../chunks/client-st5jk59p.js";
|
|
57
59
|
import {
|
|
58
60
|
operationsDigest2
|
|
59
61
|
} from "../chunks/client-hrkzqw6w.js";
|
|
@@ -90,6 +92,8 @@ export {
|
|
|
90
92
|
parseSse2 as parseSse,
|
|
91
93
|
readInputHeader2 as readInputHeader,
|
|
92
94
|
readStreamFrame2 as readStreamFrame,
|
|
95
|
+
sessionLists2 as sessionLists,
|
|
96
|
+
sessionsFrames2 as sessionsFrames,
|
|
93
97
|
sseFrames2 as sseFrames,
|
|
94
98
|
statusCode2 as statusCode,
|
|
95
99
|
streamBuffer2 as streamBuffer,
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import type { SessionView, ViewFrame } from "@nyte-ai/schema";
|
|
1
|
+
import type { SessionInfo, SessionsFrame, SessionView, ViewFrame } from "@nyte-ai/schema";
|
|
2
2
|
/** Returns each view as the frame `head.watch` sends: the first whole, each later one as what changed since the view before it, compared by identity, so a view that reuses its predecessor's items sends only the items it replaced; a streaming part's message sends only its appended text. */
|
|
3
3
|
export declare function viewFrames(views: AsyncIterable<SessionView>): AsyncIterable<ViewFrame>;
|
|
4
4
|
/** Returns the view a frame describes: a whole view as it is, a delta applied to `view`, the frame before it, keeping every item the delta copies; a delta with no view before it, or one that does not fit it, throws `SdkError("invalid")`. */
|
|
5
5
|
export declare function applyViewFrame(view: SessionView | null, frame: ViewFrame): SessionView;
|
|
6
|
+
/** Returns each list as the frame `sessions.watch` sends: the first a `list` spliced from none, each later one a `delta` from the list before it, its ids spliced by row identity and only the rows it takes. */
|
|
7
|
+
export declare function sessionsFrames(lists: AsyncIterable<readonly SessionInfo[]>): AsyncIterable<SessionsFrame>;
|
|
8
|
+
/** Returns the list each `sessions.watch` frame describes: a `list` frame's ids, or a delta's spliced into the ids before it, each with the row the frame carries for it or else the row it had; a delta before any list, or one that does not fit, throws `SdkError("invalid")`. A row the frame could not read is left out. */
|
|
9
|
+
export declare function sessionLists(frames: AsyncIterable<SessionsFrame>): AsyncIterable<readonly SessionInfo[]>;
|
package/dist/src/view-frames.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
viewFrames2,
|
|
3
|
-
applyViewFrame2
|
|
4
|
-
|
|
3
|
+
applyViewFrame2,
|
|
4
|
+
sessionsFrames2,
|
|
5
|
+
sessionLists2
|
|
6
|
+
} from "../chunks/client-st5jk59p.js";
|
|
5
7
|
import"../chunks/client-xscg1xbf.js";
|
|
6
8
|
export {
|
|
7
9
|
applyViewFrame2 as applyViewFrame,
|
|
10
|
+
sessionLists2 as sessionLists,
|
|
11
|
+
sessionsFrames2 as sessionsFrames,
|
|
8
12
|
viewFrames2 as viewFrames
|
|
9
13
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nyte-ai/protocol",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.24",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"provenance": true
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@nyte-ai/core": "0.0.
|
|
29
|
-
"@nyte-ai/schema": "0.0.
|
|
30
|
-
"fflate": "0.8.3",
|
|
31
|
-
"typebox": "1.
|
|
28
|
+
"@nyte-ai/core": "0.0.24",
|
|
29
|
+
"@nyte-ai/schema": "0.0.24",
|
|
30
|
+
"fflate": "^0.8.3",
|
|
31
|
+
"typebox": "^1.4.2"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/node": "^26.6.5",
|