sessionpipe-core 0.13.2 → 0.13.4
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/dist/control.js +101 -1
- package/dist/control.js.map +4 -4
- package/dist/index.js +459 -228
- package/dist/index.js.map +4 -4
- package/dist/schema/v1.d.ts +5 -0
- package/dist/schema/v1.d.ts.map +1 -1
- package/dist/schema.js +7 -2
- package/dist/schema.js.map +2 -2
- package/dist/service.js +1 -1
- package/dist/src/adapters/acp-control.d.ts +2 -2
- package/dist/src/adapters/acp-control.d.ts.map +1 -1
- package/dist/src/adapters/claude-code-control.d.ts +33 -3
- package/dist/src/adapters/claude-code-control.d.ts.map +1 -1
- package/dist/src/adapters/claude-code.d.ts +7 -0
- package/dist/src/adapters/claude-code.d.ts.map +1 -1
- package/dist/src/adapters/headless.d.ts +22 -1
- package/dist/src/adapters/headless.d.ts.map +1 -1
- package/dist/src/adapters/index.d.ts +1 -1
- package/dist/src/adapters/index.d.ts.map +1 -1
- package/dist/src/adapters/types.d.ts +20 -1
- package/dist/src/adapters/types.d.ts.map +1 -1
- package/dist/src/control/frames.d.ts +87 -0
- package/dist/src/control/frames.d.ts.map +1 -0
- package/dist/src/control/index.d.ts +3 -2
- package/dist/src/control/index.d.ts.map +1 -1
- package/dist/src/readers/transcripts.d.ts +7 -2
- package/dist/src/readers/transcripts.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -35,16 +35,35 @@ export interface Turn {
|
|
|
35
35
|
* daemon reaches a session in place (spec/CONTROL.md §6.3, §8). The words are the
|
|
36
36
|
* person's; the arrival was not. */
|
|
37
37
|
injected?: true;
|
|
38
|
+
/** The harness's own id for the turn's prompt, where its transcript records one (Claude
|
|
39
|
+
* Code's `promptId`, the `prompt_id` of its hooks): what `turn.started` named the turn. */
|
|
40
|
+
id?: string;
|
|
41
|
+
/** The person stopped the turn before it finished, and the transcript says so. Such a
|
|
42
|
+
* turn is whole as it stands, with whatever it had said (nothing, sometimes): no hook
|
|
43
|
+
* fires for it, so the file is the only thing that knows. */
|
|
44
|
+
interrupted?: true;
|
|
38
45
|
}
|
|
39
46
|
export interface TranscriptRead {
|
|
40
47
|
turns: Turn[];
|
|
41
48
|
/** The line the cursor may advance to once every turn is delivered. */
|
|
42
49
|
line: number;
|
|
43
|
-
/** A prompt after the last turn with no reply yet (a turn that just began)
|
|
50
|
+
/** A prompt after the last turn with no reply yet (a turn that just began), with the
|
|
51
|
+
* harness's own id for it where its transcript records one (as `Turn.id`). */
|
|
44
52
|
open?: {
|
|
45
53
|
user: string;
|
|
46
54
|
at: number;
|
|
47
55
|
injected?: true;
|
|
56
|
+
id?: string;
|
|
57
|
+
};
|
|
58
|
+
/** The last of `turns`, for a caller that may have to hold it back because the file is
|
|
59
|
+
* still being written: the line it starts on (where the cursor stops if it is held),
|
|
60
|
+
* and `said`, the assistant's last words in it when nothing of that turn follows them
|
|
61
|
+
* (no tool call, no tool result). A harness names a turn's last words as the turn ends
|
|
62
|
+
* (Claude Code's `last_assistant_message`); until `said` is those words, the end of the
|
|
63
|
+
* turn is not in the file yet. Absent when there are no turns. */
|
|
64
|
+
tail?: {
|
|
65
|
+
start: number;
|
|
66
|
+
said?: string;
|
|
48
67
|
};
|
|
49
68
|
}
|
|
50
69
|
export interface SessionFacts extends Partial<Session> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/adapters/types.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,WAAW,SAAS;IACxB,qDAAqD;IACrD,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACxC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,iFAAiF;AACjF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,EACjB,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,GACtB,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,GAAG,WAAW,EAAE,CAAC;IAClE;yEACqE;IACrE,MAAM,CAAC,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC;CAC/D;AAED,0EAA0E;AAC1E,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/D,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CAC9E"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/** The receiver's own host, for a line a person reads; the whole string when it is not
|
|
2
|
+
* a URL. */
|
|
3
|
+
export declare function hostOf(receiver: string): string;
|
|
4
|
+
/** Said with every message that reaches a live session: the answer goes back by itself
|
|
5
|
+
* (the daemon reads it from the transcript), so the model never invents a command to
|
|
6
|
+
* reply with (a real session tried `sessionpipe send`, 2026-10-01). */
|
|
7
|
+
export declare const IN_PLACE_ANSWER = "Answer it right here, as you would answer the person at the keyboard: your reply is sent back to them automatically. Don't run a command or call a tool just to send it.";
|
|
8
|
+
/** What held a session when a copy of it was made instead (CONTROL.md §6, What counts as
|
|
9
|
+
* held), as the machine found it: a window the person has it open in, another process's
|
|
10
|
+
* run of it, or only a write to its transcript too recent to account for. */
|
|
11
|
+
export declare const COPY_WHYS: readonly ["open", "running", "recent"];
|
|
12
|
+
export type CopyWhy = (typeof COPY_WHYS)[number];
|
|
13
|
+
/** Said with a message a copy of a session is answering, so the model knows its reply is
|
|
14
|
+
* the only part the person sees, while its work is as real as the original's. The first
|
|
15
|
+
* note said "nothing you do here appears in it … don't carry on the original's work", and
|
|
16
|
+
* a copy asked to change a page answered that a copy can't publish (2026-11-05). Why
|
|
17
|
+
* there is a copy is said as the machine found it: an original that is open in a
|
|
18
|
+
* window, or one that something else is using. */
|
|
19
|
+
export declare const copyNote: (why: CopyWhy) => string;
|
|
20
|
+
/** Said after a message `sessionpipe wait` prints (CONTROL.md §8), so the session starts
|
|
21
|
+
* the waiter again. */
|
|
22
|
+
export declare const RE_ARM = "(Answer it right here, as you would answer the person at the keyboard: your reply is sent back to them automatically, so don't run a command or call a tool just to send it. Then, without mentioning it, start `sessionpipe wait` again as a background command, with the longest timeout your harness allows, to keep receiving messages.)";
|
|
23
|
+
/** The framed text a session receives (CONTROL.md §6): the model and the person can tell
|
|
24
|
+
* where it came from. */
|
|
25
|
+
export declare function frame(text: string, receiver: string): string;
|
|
26
|
+
/** What the daemon looks for in the row the session's transcript records for a message
|
|
27
|
+
* handed to it in place (§6 `prompt`, §6.3): a turn is only proof of delivery when it is
|
|
28
|
+
* THIS message's turn, and only what the session wrote after that row is its answer.
|
|
29
|
+
*
|
|
30
|
+
* Null for an id that is not a whole ULID. The id is the receiver's and nobody signed
|
|
31
|
+
* it: its characters go into a header that says "signed on the sender's device" and
|
|
32
|
+
* into the session's context, so nothing but the alphabet of a ULID is ever taken from
|
|
33
|
+
* it (an id of `x\n\nrm -rf ~` put those words in the header), and a short one ("42")
|
|
34
|
+
* would make a mark anybody's words contain. */
|
|
35
|
+
export declare const messageMark: (id: string) => string | null;
|
|
36
|
+
/** The framed text for a message handed to a live session in place — at its Stop, to
|
|
37
|
+
* its waiter, into its inbox: `frame()` with that mark in it, since the session answers
|
|
38
|
+
* in a turn of its own and the daemon has to recognise the message again in the
|
|
39
|
+
* transcript to know which words are its answer. A message whose id makes no mark gets
|
|
40
|
+
* `frame()` as it is: nothing of the id reaches the session. */
|
|
41
|
+
export declare function frameMarked(text: string, receiver: string, id: string): string;
|
|
42
|
+
/** A new session's first message: the person's words first, where they come from after
|
|
43
|
+
* (Claude Code names a session from the start of its first message). */
|
|
44
|
+
export declare function frameStart(text: string, receiver: string): string;
|
|
45
|
+
/** What a session another session asked receives (CONTROL.md §13), new or not: the task
|
|
46
|
+
* first, then who asked and that the answer travels by itself. Handed to a live session
|
|
47
|
+
* in place it names the message too (`mark`), which is how the daemon finds the answer
|
|
48
|
+
* in that session's transcript. */
|
|
49
|
+
export declare function frameAsk(text: string, from: string | undefined, mark?: string | null): string;
|
|
50
|
+
/** A handoff's answer as it lands in `reply_to` (CONTROL.md §6). `from` is the session
|
|
51
|
+
* that answered, as a person reads it (`<harness>:<short id>`). */
|
|
52
|
+
export declare function frameHandoff(from: string, receiver: string, reply: string): string;
|
|
53
|
+
/** `frame()` and `frameMarked()` undone, and nothing else: the person's words, and the
|
|
54
|
+
* host they were sent from. A channel shows the words as the message and says where
|
|
55
|
+
* they came from beside it (CONTROL.md §8). Text neither of them made comes back whole,
|
|
56
|
+
* from nowhere. */
|
|
57
|
+
export declare function unframe(text: string): {
|
|
58
|
+
text: string;
|
|
59
|
+
via: string | null;
|
|
60
|
+
};
|
|
61
|
+
/** A delivered message with sessionpipe's own words taken off: the line that says where
|
|
62
|
+
* it came from (before the words for a message into a session that exists, after them
|
|
63
|
+
* for a new session's first), and the one note to the model that may follow the words
|
|
64
|
+
* (how the answer travels, that the session is a copy, to start the waiter again).
|
|
65
|
+
*
|
|
66
|
+
* Only where sessionpipe puts them. A sentence is taken off in the place and the form
|
|
67
|
+
* the daemon builds it in, never because a paragraph somewhere reads like one: a person
|
|
68
|
+
* can type or paste any of these words, and a prompt that is nothing but one of them is
|
|
69
|
+
* what the person wrote. So a note comes off only after the words of a text that carries
|
|
70
|
+
* a frame, a frame's line only with words beside it, and text in no shape the daemon
|
|
71
|
+
* builds comes back exactly as it was, `delivered: false`. `via` is the receiver's host
|
|
72
|
+
* when the frame names one.
|
|
73
|
+
*
|
|
74
|
+
* Kept, because they say whose words these are and not how they travelled: the
|
|
75
|
+
* paragraph `frameAsk` puts after a task (`(Asked by <session> on this machine with
|
|
76
|
+
* sessionpipe ask. …)`, in that plain form whether or not the ask named its message on
|
|
77
|
+
* the way), and the first line of a handoff's answer. The task is an
|
|
78
|
+
* agent's and the answer is an agent's; a receiver tells them from the person's own
|
|
79
|
+
* words by exactly those lines, so a text without them would be drawn as something the
|
|
80
|
+
* person wrote. Kept too, because it is what the message says: the list of attached
|
|
81
|
+
* files. */
|
|
82
|
+
export declare function deliveredWords(text: string): {
|
|
83
|
+
text: string;
|
|
84
|
+
via: string | null;
|
|
85
|
+
delivered: boolean;
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=frames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frames.d.ts","sourceRoot":"","sources":["../../../src/control/frames.ts"],"names":[],"mappings":"AASA;aACa;AACb,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAM/C;AAED;;wEAEwE;AACxE,eAAO,MAAM,eAAe,6KACgJ,CAAC;AAE7K;;8EAE8E;AAC9E,eAAO,MAAM,SAAS,YAAI,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAU,CAAC;AAChE,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjD;;;;;mDAKmD;AACnD,eAAO,MAAM,QAAQ,QAAS,OAAO,KAAG,MACyZ,CAAC;AAElc;wBACwB;AACxB,eAAO,MAAM,MAAM,iVAC6T,CAAC;AAEjV;0BAC0B;AAC1B,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE5D;AAMD;;;;;;;;iDAQiD;AACjD,eAAO,MAAM,WAAW,OAAQ,MAAM,KAAG,MAAM,GAAG,IAA+D,CAAC;AAKlH;;;;iEAIiE;AACjE,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAG9E;AAED;yEACyE;AACzE,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED;;;oCAGoC;AACpC,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAE7F;AAED;oEACoE;AACpE,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAElF;AAuDD;;;oBAGoB;AACpB,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAI1E;AAED;;;;;;;;;;;;;;;;;;;;aAoBa;AACb,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAuBrG"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** sessionpipe-core/control — the signed control command: format, verification,
|
|
2
|
-
* enrollment (spec/CONTROL.md)
|
|
3
|
-
* browser (no node: imports). */
|
|
2
|
+
* enrollment (spec/CONTROL.md), and the words a delivered message is framed in.
|
|
3
|
+
* WebCrypto only; safe to import in a Worker or a browser (no node: imports). */
|
|
4
|
+
export * from "./frames.js";
|
|
4
5
|
export * from "./verify.js";
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/control/index.ts"],"names":[],"mappings":"AACA;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/control/index.ts"],"names":[],"mappings":"AACA;;kFAEkF;AAClF,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { TranscriptRead } from "../adapters/types.js";
|
|
2
2
|
interface Msg {
|
|
3
|
-
|
|
3
|
+
/** `interrupt` carries no words: the person stopped the running turn at this line. */
|
|
4
|
+
role: "user" | "assistant" | "interrupt";
|
|
4
5
|
text: string;
|
|
5
6
|
at: number;
|
|
6
7
|
line: number;
|
|
@@ -9,8 +10,12 @@ interface Msg {
|
|
|
9
10
|
* control daemon reaches a session in place (spec/CONTROL.md §6.3, §8). The words are
|
|
10
11
|
* the person's; the arrival was not. */
|
|
11
12
|
injected?: true;
|
|
13
|
+
/** The harness's own id for the prompt (a `user` message's only). */
|
|
14
|
+
id?: string;
|
|
12
15
|
}
|
|
13
|
-
|
|
16
|
+
/** `tail`: also say where the last turn starts and what the assistant said last in it
|
|
17
|
+
* (TranscriptRead.tail), for a reader whose harness names a turn's last words. */
|
|
18
|
+
export declare function pairTurns(msgs: Msg[], endLine: number, tail?: boolean): TranscriptRead;
|
|
14
19
|
/** Injected context the person never typed: <tag>…</tag> wrappers (the tag may carry
|
|
15
20
|
* attributes, as Claude Code's `<cross-session-message from="…">` does), HTML comments,
|
|
16
21
|
* slash-command expansions. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transcripts.d.ts","sourceRoot":"","sources":["../../../src/readers/transcripts.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"transcripts.d.ts","sourceRoot":"","sources":["../../../src/readers/transcripts.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG3D,UAAU,GAAG;IACX,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4
|
"description": "sessionpipe core: protocol types, harness adapters, privacy filter and redaction rulesets, outbox and sinks. Zero runtime dependencies. (published unscoped until the @sessionpipe npm org exists; the code is the same)",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|