@chipschat/harness 1.0.0 → 1.0.2
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/asks.d.ts +22 -0
- package/dist/asks.d.ts.map +1 -1
- package/dist/asks.js +51 -6
- package/dist/asks.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
package/dist/asks.d.ts
CHANGED
|
@@ -8,7 +8,14 @@
|
|
|
8
8
|
* Once is per connection object: a reconnect keeps what was handed. A harness that stops before
|
|
9
9
|
* it claims a room is handed it again at its next start, because the room is still listed as
|
|
10
10
|
* asked until it is claimed, which is the point of the list.
|
|
11
|
+
*
|
|
12
|
+
* Words heard live come with the `message.new` they arrived as, and `firstTurnOf` makes that the
|
|
13
|
+
* turn of the agent the claim puts in the harness's place: who is in the room and its note, which
|
|
14
|
+
* Chips wrote for the harness before the agent was made. A bridge that answered the words alone
|
|
15
|
+
* told the agent nothing of the room: in Bruh chat (5 November 2026) three of five agents
|
|
16
|
+
* introduced themselves without knowing their names, who else was there or who led.
|
|
11
17
|
*/
|
|
18
|
+
import { type MessageNew } from "@chipschat/protocol";
|
|
12
19
|
/** A room a person asked this harness for, and what they said it was for. */
|
|
13
20
|
export interface SpaceAsked {
|
|
14
21
|
readonly spaceId: string;
|
|
@@ -19,6 +26,12 @@ export interface SpaceAsked {
|
|
|
19
26
|
readonly messageId: string;
|
|
20
27
|
readonly text: string;
|
|
21
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* The words as Chips handed them to the harness, when heard live: with who is in the room and
|
|
31
|
+
* the room's note and rules for the harness. Answer them with `firstTurnOf`. Absent when read
|
|
32
|
+
* from the room's history at a catch-up.
|
|
33
|
+
*/
|
|
34
|
+
readonly message?: MessageNew | undefined;
|
|
22
35
|
}
|
|
23
36
|
/** What `claimSpace` did. */
|
|
24
37
|
export interface ClaimedSpace {
|
|
@@ -69,6 +82,15 @@ export declare class Asks {
|
|
|
69
82
|
private note;
|
|
70
83
|
private hand;
|
|
71
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* A room's first words as the turn of the agent its claim put in the harness's place: the
|
|
87
|
+
* `message.new` Chips handed the harness, for the agent instead. Chips wrote the room's note
|
|
88
|
+
* before the agent was made, naming the harness by the first name the room held for its agent
|
|
89
|
+
* (ADR 0150), so the note, the rules and the harness's place among the members become the
|
|
90
|
+
* agent's, and `promptFor` with the agent as taker says them. Nothing when the words were read
|
|
91
|
+
* from the room's history, which carries no note: answer the words alone then.
|
|
92
|
+
*/
|
|
93
|
+
export declare function firstTurnOf(asked: SpaceAsked, agentId: string): MessageNew | undefined;
|
|
72
94
|
/** The first thing a person said in a page of a room's history, as `GET /v1/events` returns it. */
|
|
73
95
|
export declare function firstWords(history: readonly Frame[]): SpaceAsked["firstMessage"] | undefined;
|
|
74
96
|
export {};
|
package/dist/asks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asks.d.ts","sourceRoot":"","sources":["../src/asks.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"asks.d.ts","sourceRoot":"","sources":["../src/asks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,KAAK,UAAU,EAAe,MAAM,qBAAqB,CAAC;AAEnE,6EAA6E;AAC7E,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,4BAA4B;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,gFAAgF;IAChF,QAAQ,CAAC,YAAY,EAAE;QAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7E;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,UAAU,GAAG,SAA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AAE,UAAU,EAAE,OAAO,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CA4BtF;AAED,mGAAmG;AACnG,wBAAgB,UAAU,CAAC,OAAO,EAAE,SAAS,KAAK,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,GAAG,SAAS,CAO5F"}
|
package/dist/asks.js
CHANGED
|
@@ -8,6 +8,12 @@
|
|
|
8
8
|
* Once is per connection object: a reconnect keeps what was handed. A harness that stops before
|
|
9
9
|
* it claims a room is handed it again at its next start, because the room is still listed as
|
|
10
10
|
* asked until it is claimed, which is the point of the list.
|
|
11
|
+
*
|
|
12
|
+
* Words heard live come with the `message.new` they arrived as, and `firstTurnOf` makes that the
|
|
13
|
+
* turn of the agent the claim puts in the harness's place: who is in the room and its note, which
|
|
14
|
+
* Chips wrote for the harness before the agent was made. A bridge that answered the words alone
|
|
15
|
+
* told the agent nothing of the room: in Bruh chat (5 November 2026) three of five agents
|
|
16
|
+
* introduced themselves without knowing their names, who else was there or who led.
|
|
11
17
|
*/
|
|
12
18
|
import { messageIdOf } from "@chipschat/protocol";
|
|
13
19
|
export class Asks {
|
|
@@ -46,10 +52,7 @@ export class Asks {
|
|
|
46
52
|
const from = event["from"];
|
|
47
53
|
if (!this.listener.listening() || from?.kind !== "person")
|
|
48
54
|
return false;
|
|
49
|
-
this.hand(spaceId, room, {
|
|
50
|
-
messageId: String(event["message_id"]),
|
|
51
|
-
text: String(event["text"] ?? ""),
|
|
52
|
-
});
|
|
55
|
+
this.hand(spaceId, room, { messageId: String(event["message_id"]), text: String(event["text"] ?? "") }, event);
|
|
53
56
|
return true;
|
|
54
57
|
}
|
|
55
58
|
/**
|
|
@@ -85,10 +88,52 @@ export class Asks {
|
|
|
85
88
|
this.rooms.set(spaceId, room);
|
|
86
89
|
return room;
|
|
87
90
|
}
|
|
88
|
-
hand(spaceId, room, first) {
|
|
91
|
+
hand(spaceId, room, first, message) {
|
|
89
92
|
room.first = first.messageId;
|
|
90
|
-
this.listener.hand({
|
|
93
|
+
this.listener.hand({
|
|
94
|
+
spaceId,
|
|
95
|
+
askedBy: room.askedBy,
|
|
96
|
+
firstMessage: first,
|
|
97
|
+
...(message === undefined ? {} : { message }),
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* A room's first words as the turn of the agent its claim put in the harness's place: the
|
|
103
|
+
* `message.new` Chips handed the harness, for the agent instead. Chips wrote the room's note
|
|
104
|
+
* before the agent was made, naming the harness by the first name the room held for its agent
|
|
105
|
+
* (ADR 0150), so the note, the rules and the harness's place among the members become the
|
|
106
|
+
* agent's, and `promptFor` with the agent as taker says them. Nothing when the words were read
|
|
107
|
+
* from the room's history, which carries no note: answer the words alone then.
|
|
108
|
+
*/
|
|
109
|
+
export function firstTurnOf(asked, agentId) {
|
|
110
|
+
const { message } = asked;
|
|
111
|
+
if (message === undefined)
|
|
112
|
+
return undefined;
|
|
113
|
+
const room = message.room;
|
|
114
|
+
const notes = room?.notes ?? {};
|
|
115
|
+
// The harness's note is the one the words carry: they were for the harness alone.
|
|
116
|
+
const [place, ...more] = Object.keys(notes);
|
|
117
|
+
if (room === undefined || place === undefined || more.length > 0) {
|
|
118
|
+
return { ...message, for: [agentId] };
|
|
91
119
|
}
|
|
120
|
+
const placed = (each) => each.participant_id === place ? { ...each, participant_id: agentId } : each;
|
|
121
|
+
const note = notes[place];
|
|
122
|
+
const rules = room.rules?.[place];
|
|
123
|
+
return {
|
|
124
|
+
...message,
|
|
125
|
+
for: [agentId],
|
|
126
|
+
room: {
|
|
127
|
+
...room,
|
|
128
|
+
members: room.members.map(placed),
|
|
129
|
+
notes: note === undefined ? {} : { [agentId]: note },
|
|
130
|
+
...(room.rules === undefined
|
|
131
|
+
? {}
|
|
132
|
+
: { rules: rules === undefined ? {} : { [agentId]: rules } }),
|
|
133
|
+
...(room.working === undefined ? {} : { working: room.working.map(placed) }),
|
|
134
|
+
...(room.idle === undefined ? {} : { idle: room.idle.map(placed) }),
|
|
135
|
+
},
|
|
136
|
+
};
|
|
92
137
|
}
|
|
93
138
|
/** The first thing a person said in a page of a room's history, as `GET /v1/events` returns it. */
|
|
94
139
|
export function firstWords(history) {
|
package/dist/asks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asks.js","sourceRoot":"","sources":["../src/asks.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"asks.js","sourceRoot":"","sources":["../src/asks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAmB,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAwCnE,MAAM,OAAO,IAAI;IAKI;IAEA;IANF,KAAK,GAAG,IAAI,GAAG,EAAqB,CAAC;IAEtD;IACE,qDAAqD;IACpC,SAAmC;IACpD,uEAAuE;IACtD,QAGhB;QALgB,cAAS,GAAT,SAAS,CAA0B;QAEnC,aAAQ,GAAR,QAAQ,CAGxB;IACA,CAAC;IAEJ;;;OAGG;IACH,KAAK,CAAC,KAAY;QAChB,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC;QAClC,IAAI,OAAO,OAAO,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAC;QAC9C,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,eAAe,EAAE,CAAC;YACtC,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAiC,CAAC;YAC7D,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,EAAE,EAAE,KAAK,QAAQ;gBAAE,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;YACzF,OAAO,KAAK,CAAC;QACf,CAAC;QACD,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,aAAa;YAAE,OAAO,KAAK,CAAC;QAClD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC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AC,EAAE,CAAC;YAC5E,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;SACpE;KACF,CAAC;AACJ,CAAC;AAED,mGAAmG;AACnG,MAAM,UAAU,UAAU,CAAC,OAAyB;IAClD,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAmC,CAAC;QAC/D,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,cAAc,IAAI,KAAK,EAAE,IAAI,KAAK,QAAQ;YAAE,SAAS;QAC3E,OAAO,EAAE,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC;IAC5F,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
export type { ContextBudget, ContextLine, RoomContext, RoomFile, RoomMember, RoomNote, } from "@chipschat/protocol";
|
|
22
22
|
export { noteWithoutRules, renderContext, renderLine, renderReplyingTo, renderRoomNote, } from "@chipschat/protocol";
|
|
23
23
|
export type { ClaimedSpace, SpaceAsked } from "./asks.js";
|
|
24
|
+
export { firstTurnOf } from "./asks.js";
|
|
24
25
|
export type { Agent, ConnectOptions, PostInput, RestartAsk, SocketLike, Speaker, StartRunInput, } from "./connect.js";
|
|
25
26
|
export { Chips, ConnectError, connect } from "./connect.js";
|
|
26
27
|
export type { ChipsEvents, ConnectionState, Handler, Receipt } from "./events.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceR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,aAAa,EACb,UAAU,EACV,YAAY,GACb,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACtF,OAAO,EACL,UAAU,EACV,eAAe,EACf,WAAW,EACX,QAAQ,EACR,UAAU,EACV,WAAW,EACX,WAAW,GACZ,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,gBAAgB,EAChB,sBAAsB,EACtB,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACjD,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACnD,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* keeps what must survive a restart.
|
|
11
11
|
*/
|
|
12
12
|
export { noteWithoutRules, renderContext, renderLine, renderReplyingTo, renderRoomNote, } from "@chipschat/protocol";
|
|
13
|
+
export { firstTurnOf } from "./asks.js";
|
|
13
14
|
export { Chips, ConnectError, connect } from "./connect.js";
|
|
14
15
|
export { PIECE_BYTES } from "./files.js";
|
|
15
16
|
export { overheardLine, workingTurnsOf } from "./heard.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAmBH,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,cAA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,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chipschat/harness",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "The Agent Connect client for a harness you control: connect, start runs, log steps, ask, and hear what people say back.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://chipschat.ai/connect/sdk/",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"url": "git+https://github.com/arjungupta99/chips.git",
|
|
10
10
|
"directory": "packages/sdk-ts"
|
|
11
11
|
},
|
|
12
|
+
"bugs": "https://github.com/arjungupta99/chips/issues",
|
|
12
13
|
"type": "module",
|
|
13
14
|
"exports": {
|
|
14
15
|
".": {
|
|
@@ -23,13 +24,13 @@
|
|
|
23
24
|
"dist"
|
|
24
25
|
],
|
|
25
26
|
"dependencies": {
|
|
26
|
-
"@chipschat/protocol": "1.0.
|
|
27
|
+
"@chipschat/protocol": "1.0.2"
|
|
27
28
|
},
|
|
28
29
|
"devDependencies": {
|
|
29
30
|
"kysely": "0.29.5",
|
|
30
31
|
"vitest": "4.1.11",
|
|
31
|
-
"@chipschat/
|
|
32
|
-
"@chipschat/
|
|
32
|
+
"@chipschat/server": "0.0.0",
|
|
33
|
+
"@chipschat/platform": "0.0.0"
|
|
33
34
|
},
|
|
34
35
|
"scripts": {
|
|
35
36
|
"build": "tsc -p tsconfig.build.json",
|