@akohn/dashql 0.0.19-dev.261.g8742d37fb → 0.0.19-dev.268.g2efe9377d
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const AGENT_SESSION_PROTOCOL =
|
|
1
|
+
export declare const AGENT_SESSION_PROTOCOL = 3;
|
|
2
2
|
export declare const AGENT_SESSION_MIN_PROTOCOL = 1;
|
|
3
3
|
export declare const AGENT_SESSION_PROTOCOL_HEADER = "X-DashQL-Protocol";
|
|
4
4
|
export declare const AGENT_SESSION_MIN_PROTOCOL_HEADER = "X-DashQL-Min-Protocol";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// dist/.stage/src/platform/session/agent_session_protocol.ts
|
|
2
|
-
var AGENT_SESSION_PROTOCOL =
|
|
2
|
+
var AGENT_SESSION_PROTOCOL = 3;
|
|
3
3
|
var AGENT_SESSION_MIN_PROTOCOL = 1;
|
|
4
4
|
var AGENT_SESSION_PROTOCOL_HEADER = "X-DashQL-Protocol";
|
|
5
5
|
var AGENT_SESSION_MIN_PROTOCOL_HEADER = "X-DashQL-Min-Protocol";
|
|
@@ -7,7 +7,7 @@ var AgentSessionProtocolError = class extends Error {
|
|
|
7
7
|
outdated;
|
|
8
8
|
serverProtocol;
|
|
9
9
|
constructor(outdated, serverProtocol) {
|
|
10
|
-
super(outdated === "server" ? `the server of the session speaks protocol ${serverProtocol ?? "none"}, this client needs 1 or newer: update dashql-cli` : `the server of the session speaks protocol ${serverProtocol ?? "none"} and needs a newer client than protocol
|
|
10
|
+
super(outdated === "server" ? `the server of the session speaks protocol ${serverProtocol ?? "none"}, this client needs 1 or newer: update dashql-cli` : `the server of the session speaks protocol ${serverProtocol ?? "none"} and needs a newer client than protocol 3`);
|
|
11
11
|
this.outdated = outdated;
|
|
12
12
|
this.serverProtocol = serverProtocol;
|
|
13
13
|
this.name = "AgentSessionProtocolError";
|
|
@@ -22,7 +22,7 @@ function serverAcceptsAgentSessionClient(clientProtocol) {
|
|
|
22
22
|
}
|
|
23
23
|
function outdatedAgentSessionSide(serverProtocol, serverMinProtocol) {
|
|
24
24
|
if (serverProtocol == null || serverMinProtocol == null || serverProtocol < 1) return "server";
|
|
25
|
-
if (
|
|
25
|
+
if (3 < serverMinProtocol) return "client";
|
|
26
26
|
return null;
|
|
27
27
|
}
|
|
28
28
|
function checkAgentSessionAnswer(response) {
|
|
@@ -32,7 +32,7 @@ function checkAgentSessionAnswer(response) {
|
|
|
32
32
|
}
|
|
33
33
|
async function fetchAgentSession(input, init = {}, send = fetch) {
|
|
34
34
|
const headers = new Headers(init.headers);
|
|
35
|
-
headers.set(AGENT_SESSION_PROTOCOL_HEADER, String(
|
|
35
|
+
headers.set(AGENT_SESSION_PROTOCOL_HEADER, String(3));
|
|
36
36
|
const response = await send(input, {
|
|
37
37
|
...init,
|
|
38
38
|
headers
|
|
@@ -29,6 +29,7 @@ export interface AgentSessionTurn {
|
|
|
29
29
|
steps: AgentSessionStep[];
|
|
30
30
|
}
|
|
31
31
|
export interface AgentSessionState {
|
|
32
|
+
id?: string;
|
|
32
33
|
harness: string;
|
|
33
34
|
folder: string;
|
|
34
35
|
ended: boolean;
|
|
@@ -40,6 +41,6 @@ export interface AgentSessionState {
|
|
|
40
41
|
export declare const MAX_AGENT_SESSION_TURNS = 50;
|
|
41
42
|
export declare const MAX_AGENT_SESSION_STEPS = 30;
|
|
42
43
|
export declare const MAX_AGENT_SESSION_LOG = 100;
|
|
43
|
-
export declare function createAgentSessionState(harness: string, folder: string): AgentSessionState;
|
|
44
|
+
export declare function createAgentSessionState(harness: string, folder: string, id?: string): AgentSessionState;
|
|
44
45
|
export declare function reduceAgentSessionEvent(state: AgentSessionState, event: AgentSessionEvent, now?: number): AgentSessionState;
|
|
45
46
|
export declare function reduceAgentSessionJournal(state: AgentSessionState, record: LogRecord, files?: JournalFile[]): AgentSessionState;
|
|
@@ -3,8 +3,9 @@ import { isJournalMarker, reduceJournalMarker } from "./workbook_journal.js";
|
|
|
3
3
|
var MAX_AGENT_SESSION_TURNS = 50;
|
|
4
4
|
var MAX_AGENT_SESSION_STEPS = 30;
|
|
5
5
|
var MAX_AGENT_SESSION_LOG = 100;
|
|
6
|
-
function createAgentSessionState(harness, folder) {
|
|
6
|
+
function createAgentSessionState(harness, folder, id = globalThis.crypto.randomUUID()) {
|
|
7
7
|
return {
|
|
8
|
+
id,
|
|
8
9
|
harness,
|
|
9
10
|
folder,
|
|
10
11
|
ended: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akohn/dashql",
|
|
3
|
-
"version": "0.0.19-dev.
|
|
3
|
+
"version": "0.0.19-dev.268.g2efe9377d",
|
|
4
4
|
"description": "DashQL in TypeScript: the WebAssembly bindings of its SQL core, its runtime and the platforms of the runtime",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MPL-2.0",
|