@hearsay-tools/squawk 0.18.0-pr3633.6592 → 0.18.0-pr3633.6594
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.
|
@@ -280,12 +280,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
280
280
|
"/api/v1/tools/ask": {
|
|
281
281
|
$post: {
|
|
282
282
|
output: {
|
|
283
|
-
|
|
284
|
-
code: 'unavailable';
|
|
283
|
+
code: 'capability_revoked';
|
|
285
284
|
message: string;
|
|
286
285
|
};
|
|
287
286
|
outputFormat: "json";
|
|
288
|
-
status:
|
|
287
|
+
status: 401;
|
|
289
288
|
input: {
|
|
290
289
|
json: {
|
|
291
290
|
questions: {
|
|
@@ -303,11 +302,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
303
302
|
};
|
|
304
303
|
} | {
|
|
305
304
|
output: {
|
|
306
|
-
|
|
305
|
+
ok: false;
|
|
306
|
+
code: 'unavailable';
|
|
307
307
|
message: string;
|
|
308
308
|
};
|
|
309
309
|
outputFormat: "json";
|
|
310
|
-
status:
|
|
310
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
311
311
|
input: {
|
|
312
312
|
json: {
|
|
313
313
|
questions: {
|
|
@@ -375,12 +375,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
375
375
|
"/api/v1/tools/cancel-wait": {
|
|
376
376
|
$post: {
|
|
377
377
|
output: {
|
|
378
|
-
|
|
379
|
-
code: 'unavailable';
|
|
378
|
+
code: 'capability_revoked';
|
|
380
379
|
message: string;
|
|
381
380
|
};
|
|
382
381
|
outputFormat: "json";
|
|
383
|
-
status:
|
|
382
|
+
status: 401;
|
|
384
383
|
input: {
|
|
385
384
|
json: {
|
|
386
385
|
wait_id: string;
|
|
@@ -388,11 +387,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
388
387
|
};
|
|
389
388
|
} | {
|
|
390
389
|
output: {
|
|
391
|
-
|
|
390
|
+
cancelled: false;
|
|
391
|
+
code: 'unavailable';
|
|
392
392
|
message: string;
|
|
393
393
|
};
|
|
394
394
|
outputFormat: "json";
|
|
395
|
-
status:
|
|
395
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
396
396
|
input: {
|
|
397
397
|
json: {
|
|
398
398
|
wait_id: string;
|
|
@@ -440,12 +440,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
440
440
|
"/api/v1/tools/done": {
|
|
441
441
|
$post: {
|
|
442
442
|
output: {
|
|
443
|
-
|
|
444
|
-
code: 'unavailable';
|
|
443
|
+
code: 'capability_revoked';
|
|
445
444
|
message: string;
|
|
446
445
|
};
|
|
447
446
|
outputFormat: "json";
|
|
448
|
-
status:
|
|
447
|
+
status: 401;
|
|
449
448
|
input: {
|
|
450
449
|
json: {
|
|
451
450
|
summary?: string | undefined;
|
|
@@ -453,11 +452,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
453
452
|
};
|
|
454
453
|
} | {
|
|
455
454
|
output: {
|
|
456
|
-
|
|
455
|
+
ok: false;
|
|
456
|
+
code: 'unavailable';
|
|
457
457
|
message: string;
|
|
458
458
|
};
|
|
459
459
|
outputFormat: "json";
|
|
460
|
-
status:
|
|
460
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
461
461
|
input: {
|
|
462
462
|
json: {
|
|
463
463
|
summary?: string | undefined;
|
|
@@ -525,13 +525,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
525
525
|
"/api/v1/tools/preview-stop": {
|
|
526
526
|
$post: {
|
|
527
527
|
output: {
|
|
528
|
-
|
|
529
|
-
code: "adopted" | "approval_required" | "headless" | "invalid_input" | "not_registered" | "port_held" | "port_in_use" | "preview_disabled" | "restarted" | "stopped" | "unavailable" | "worktree_missing";
|
|
528
|
+
code: 'capability_revoked';
|
|
530
529
|
message: string;
|
|
531
|
-
hint: string;
|
|
532
530
|
};
|
|
533
531
|
outputFormat: "json";
|
|
534
|
-
status:
|
|
532
|
+
status: 401;
|
|
535
533
|
input: {
|
|
536
534
|
json: {
|
|
537
535
|
port: number;
|
|
@@ -540,11 +538,13 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
540
538
|
};
|
|
541
539
|
} | {
|
|
542
540
|
output: {
|
|
543
|
-
|
|
541
|
+
ok: boolean;
|
|
542
|
+
code: "adopted" | "approval_required" | "headless" | "invalid_input" | "not_registered" | "port_held" | "port_in_use" | "preview_disabled" | "restarted" | "stopped" | "unavailable" | "worktree_missing";
|
|
544
543
|
message: string;
|
|
544
|
+
hint: string;
|
|
545
545
|
};
|
|
546
546
|
outputFormat: "json";
|
|
547
|
-
status:
|
|
547
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
548
548
|
input: {
|
|
549
549
|
json: {
|
|
550
550
|
port: number;
|
|
@@ -557,13 +557,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
557
557
|
"/api/v1/tools/preview-serve": {
|
|
558
558
|
$post: {
|
|
559
559
|
output: {
|
|
560
|
-
|
|
561
|
-
code: "cezar_port" | "cwd_outside_worktree" | "headless" | "invalid_input" | "port_held" | "preview_disabled" | "registered" | "replaced" | "too_many" | "unavailable" | "worktree_missing";
|
|
560
|
+
code: 'capability_revoked';
|
|
562
561
|
message: string;
|
|
563
|
-
hint: string;
|
|
564
562
|
};
|
|
565
563
|
outputFormat: "json";
|
|
566
|
-
status:
|
|
564
|
+
status: 401;
|
|
567
565
|
input: {
|
|
568
566
|
json: {
|
|
569
567
|
command: string;
|
|
@@ -575,11 +573,13 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
575
573
|
};
|
|
576
574
|
} | {
|
|
577
575
|
output: {
|
|
578
|
-
|
|
576
|
+
ok: boolean;
|
|
577
|
+
code: "cezar_port" | "cwd_outside_worktree" | "headless" | "invalid_input" | "port_held" | "preview_disabled" | "registered" | "replaced" | "too_many" | "unavailable" | "worktree_missing";
|
|
579
578
|
message: string;
|
|
579
|
+
hint: string;
|
|
580
580
|
};
|
|
581
581
|
outputFormat: "json";
|
|
582
|
-
status:
|
|
582
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
583
583
|
input: {
|
|
584
584
|
json: {
|
|
585
585
|
command: string;
|
|
@@ -595,12 +595,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
595
595
|
"/api/v1/tools/schedule-task": {
|
|
596
596
|
$post: {
|
|
597
597
|
output: {
|
|
598
|
-
|
|
599
|
-
code: import('../contract/index.js').ScheduledTaskRefusalCode;
|
|
598
|
+
code: 'capability_revoked';
|
|
600
599
|
message: string;
|
|
601
600
|
};
|
|
602
601
|
outputFormat: "json";
|
|
603
|
-
status:
|
|
602
|
+
status: 401;
|
|
604
603
|
input: {
|
|
605
604
|
json: {
|
|
606
605
|
at?: string | undefined;
|
|
@@ -617,11 +616,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
617
616
|
};
|
|
618
617
|
} | {
|
|
619
618
|
output: {
|
|
620
|
-
|
|
619
|
+
ok: false;
|
|
620
|
+
code: import('../contract/index.js').ScheduledTaskRefusalCode;
|
|
621
621
|
message: string;
|
|
622
622
|
};
|
|
623
623
|
outputFormat: "json";
|
|
624
|
-
status:
|
|
624
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
625
625
|
input: {
|
|
626
626
|
json: {
|
|
627
627
|
at?: string | undefined;
|
|
@@ -676,12 +676,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
676
676
|
"/api/v1/tools/scheduled-tasks": {
|
|
677
677
|
$post: {
|
|
678
678
|
output: {
|
|
679
|
-
|
|
680
|
-
code: import('../contract/index.js').ScheduledTaskRefusalCode;
|
|
679
|
+
code: 'capability_revoked';
|
|
681
680
|
message: string;
|
|
682
681
|
};
|
|
683
682
|
outputFormat: "json";
|
|
684
|
-
status:
|
|
683
|
+
status: 401;
|
|
685
684
|
input: {
|
|
686
685
|
json: {
|
|
687
686
|
at?: string | undefined;
|
|
@@ -714,11 +713,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
714
713
|
};
|
|
715
714
|
} | {
|
|
716
715
|
output: {
|
|
717
|
-
|
|
716
|
+
ok: false;
|
|
717
|
+
code: import('../contract/index.js').ScheduledTaskRefusalCode;
|
|
718
718
|
message: string;
|
|
719
719
|
};
|
|
720
720
|
outputFormat: "json";
|
|
721
|
-
status:
|
|
721
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
722
722
|
input: {
|
|
723
723
|
json: {
|
|
724
724
|
at?: string | undefined;
|
|
@@ -7,14 +7,17 @@
|
|
|
7
7
|
* only. Each record is parsed once, for its message list.
|
|
8
8
|
*/
|
|
9
9
|
export function conversationMembersSelect(source, where = '1') {
|
|
10
|
-
const member = (field) => `SELECT root_id, CASE WHEN m.type = 'object' THEN json_extract(m.value, '$.${field}') END AS member_id
|
|
11
|
-
FROM conversation_roots, json_each(coalesce(messages, '[]')) m WHERE member_id IS NOT NULL`;
|
|
12
10
|
return `WITH conversation_roots AS MATERIALIZED (
|
|
13
11
|
SELECT s.id AS root_id, CASE WHEN json_type(s.data, '$.delegation.conversation.messages') = 'array'
|
|
14
12
|
THEN json_extract(s.data, '$.delegation.conversation.messages') END AS messages FROM ${source} s
|
|
15
13
|
WHERE ${where} AND CASE WHEN json_valid(s.summary) AND json_valid(s.data) THEN json_extract(s.summary, '$.delegation.role') = 'root'
|
|
16
14
|
AND json_extract(s.data, '$.delegation.conversation') IS NOT NULL ELSE 0 END)
|
|
17
|
-
SELECT root_id, '' AS member_id FROM conversation_roots UNION ${
|
|
15
|
+
SELECT root_id, '' AS member_id FROM conversation_roots UNION ${messageMembers('senderRunId')} UNION ${messageMembers('recipientRunId')}`;
|
|
16
|
+
}
|
|
17
|
+
/** One message field of every listed root's messages, as `conversation_members` rows. */
|
|
18
|
+
function messageMembers(field) {
|
|
19
|
+
return `SELECT root_id, CASE WHEN m.type = 'object' THEN json_extract(m.value, '$.${field}') END AS member_id
|
|
20
|
+
FROM conversation_roots, json_each(coalesce(messages, '[]')) m WHERE member_id IS NOT NULL`;
|
|
18
21
|
}
|
|
19
22
|
/** Index who each root's conversation names, so a lookup reads a few rows instead of every record. */
|
|
20
23
|
export const CONVERSATION_MEMBERS_MIGRATION = `
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-members.js","sourceRoot":"","sources":["../../src/runs/conversation-members.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,UAAU,yBAAyB,CAAC,MAAc,EAAE,KAAK,GAAG,GAAG;IACnE,
|
|
1
|
+
{"version":3,"file":"conversation-members.js","sourceRoot":"","sources":["../../src/runs/conversation-members.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,UAAU,yBAAyB,CAAC,MAAc,EAAE,KAAK,GAAG,GAAG;IACnE,OAAO;;+FAEsF,MAAM;cACvF,KAAK;;oEAEiD,cAAc,CAAC,aAAa,CAAC,UAAU,cAAc,CAAC,gBAAgB,CAAC,EAAE,CAAC;AAC9I,CAAC;AAED,yFAAyF;AACzF,SAAS,cAAc,CAAC,KAAuC;IAC7D,OAAO,6EAA6E,KAAK;+FACI,CAAC;AAChG,CAAC;AAED,sGAAsG;AACtG,MAAM,CAAC,MAAM,8BAA8B,GAAG;;;;;;;;;;;;oEAYsB,yBAAyB,CAAC,MAAM,CAAC;GAClG,CAAC;AAEJ,MAAM,SAAS,GAAG,IAAI,OAAO,EAAqC,CAAC;AAEnE,MAAM,UAAU,mBAAmB,CAAC,EAAgB,EAAE,OAAgB;IACpE,IAAI,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC7B,IAAI,CAAC,IAAI,EAAE,CAAC;QAAC,IAAI,GAAG,IAA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AAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACnC,KAAK,MAAM,MAAM,IAAI,OAAO,IAAI,EAAE;YAAE,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjF,CAAC;IAED,SAAS,CAAC,MAAc,IAAU,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;CACxE"}
|
|
@@ -40,7 +40,7 @@ export declare const reportsRoutes: import("hono/hono-base").HonoBase<ProjectApi
|
|
|
40
40
|
error: string;
|
|
41
41
|
};
|
|
42
42
|
outputFormat: "json";
|
|
43
|
-
status:
|
|
43
|
+
status: 400;
|
|
44
44
|
input: {
|
|
45
45
|
query: {
|
|
46
46
|
q?: string | undefined;
|
|
@@ -53,7 +53,7 @@ export declare const reportsRoutes: import("hono/hono-base").HonoBase<ProjectApi
|
|
|
53
53
|
error: string;
|
|
54
54
|
};
|
|
55
55
|
outputFormat: "json";
|
|
56
|
-
status:
|
|
56
|
+
status: 409;
|
|
57
57
|
input: {
|
|
58
58
|
query: {
|
|
59
59
|
q?: string | undefined;
|