@ci-kit/roundtable 0.3.0 → 0.3.1
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/chunks/example.mjs +4 -0
- package/dist/cli.mjs +1 -1
- package/dist/index.d.mts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.mjs +10 -0
- package/package.json +3 -3
package/dist/chunks/example.mjs
CHANGED
|
@@ -23,6 +23,10 @@ phases:
|
|
|
23
23
|
|
|
24
24
|
onVeto: re-propose
|
|
25
25
|
maxAttempts: 3
|
|
26
|
+
# Optional: how long one seat's model call may take. Seat work is slower than a
|
|
27
|
+
# short request, so a reviewing table usually wants more than the transport
|
|
28
|
+
# default. Omit to keep that default.
|
|
29
|
+
# timeoutMs: 180000
|
|
26
30
|
---
|
|
27
31
|
|
|
28
32
|
\u8FD9\u662F\u4E00\u4E2A\u793A\u4F8B\u5706\u684C\u3002\u6539\u5B8C frontmatter \u5C31\u80FD\u7528\uFF0C\u6B63\u6587\u53EF\u4EE5\u7559\u7A7A\u3002
|
package/dist/cli.mjs
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -69,6 +69,16 @@ interface Table {
|
|
|
69
69
|
onVeto: OnVeto;
|
|
70
70
|
maxAttempts: number;
|
|
71
71
|
threshold: number;
|
|
72
|
+
/**
|
|
73
|
+
* How long one seat's model call may take. Undefined keeps the http
|
|
74
|
+
* package's default.
|
|
75
|
+
*
|
|
76
|
+
* A seat reads a whole article and replies with paragraphs, which routinely
|
|
77
|
+
* needs more than the transport default meant for short requests. The table
|
|
78
|
+
* owns this because "how long may a seat think" is a property of the review,
|
|
79
|
+
* not of the provider.
|
|
80
|
+
*/
|
|
81
|
+
timeoutMs?: number;
|
|
72
82
|
phases: Phase[];
|
|
73
83
|
/** Phase ids given the special roles, resolved during validation. */
|
|
74
84
|
special: {
|
package/dist/index.d.ts
CHANGED
|
@@ -69,6 +69,16 @@ interface Table {
|
|
|
69
69
|
onVeto: OnVeto;
|
|
70
70
|
maxAttempts: number;
|
|
71
71
|
threshold: number;
|
|
72
|
+
/**
|
|
73
|
+
* How long one seat's model call may take. Undefined keeps the http
|
|
74
|
+
* package's default.
|
|
75
|
+
*
|
|
76
|
+
* A seat reads a whole article and replies with paragraphs, which routinely
|
|
77
|
+
* needs more than the transport default meant for short requests. The table
|
|
78
|
+
* owns this because "how long may a seat think" is a property of the review,
|
|
79
|
+
* not of the provider.
|
|
80
|
+
*/
|
|
81
|
+
timeoutMs?: number;
|
|
72
82
|
phases: Phase[];
|
|
73
83
|
/** Phase ids given the special roles, resolved during validation. */
|
|
74
84
|
special: {
|
package/dist/index.mjs
CHANGED
|
@@ -582,6 +582,7 @@ const TABLE_KEYS = /* @__PURE__ */ new Set([
|
|
|
582
582
|
"onVeto",
|
|
583
583
|
"maxAttempts",
|
|
584
584
|
"threshold",
|
|
585
|
+
"timeoutMs",
|
|
585
586
|
"phases",
|
|
586
587
|
"special"
|
|
587
588
|
]);
|
|
@@ -715,6 +716,10 @@ function parseTable(document, fallbackTitle) {
|
|
|
715
716
|
if (threshold <= 0 || threshold > 1) {
|
|
716
717
|
throw new TableError("table: threshold must be greater than 0 and at most 1");
|
|
717
718
|
}
|
|
719
|
+
const timeoutMs = asNumber(data.timeoutMs, "timeoutMs");
|
|
720
|
+
if (timeoutMs !== void 0 && (!Number.isInteger(timeoutMs) || timeoutMs < 1e3 || timeoutMs > 36e5)) {
|
|
721
|
+
throw new TableError("table: timeoutMs must be an integer between 1000 and 3600000");
|
|
722
|
+
}
|
|
718
723
|
const phases = parsePhases(data.phases);
|
|
719
724
|
if (!phases.length) {
|
|
720
725
|
throw new TableError("table: at least one phase is required");
|
|
@@ -733,6 +738,7 @@ function parseTable(document, fallbackTitle) {
|
|
|
733
738
|
onVeto,
|
|
734
739
|
maxAttempts,
|
|
735
740
|
threshold,
|
|
741
|
+
timeoutMs,
|
|
736
742
|
phases,
|
|
737
743
|
special: resolveSpecial(phases, asMapping(data.special, "special"))
|
|
738
744
|
};
|
|
@@ -1056,6 +1062,10 @@ async function callSeat(seat, prompt, options) {
|
|
|
1056
1062
|
json: wantJson,
|
|
1057
1063
|
temperature: seat.seat.temperature,
|
|
1058
1064
|
maxTokens: seat.seat.maxTokens,
|
|
1065
|
+
// How long one seat may spend reading and answering. The table sets it
|
|
1066
|
+
// because a seat's work is longer than a short request; leaving it
|
|
1067
|
+
// undefined keeps the transport default.
|
|
1068
|
+
timeoutMs: options.loaded.table.timeoutMs,
|
|
1059
1069
|
// Paid, non-idempotent: never resend after an unknown outcome.
|
|
1060
1070
|
retries: seat.seat.fallback === "retry" ? void 0 : 0,
|
|
1061
1071
|
env: options.env
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ci-kit/roundtable",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.1",
|
|
5
5
|
"description": "Seat-based orchestration that lets multiple AI roles discuss, produce and converge without a human-supplied agenda",
|
|
6
6
|
"author": "imba97",
|
|
7
7
|
"license": "MIT",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"dist"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@ci-kit/ai": "0.3.
|
|
33
|
-
"@ci-kit/http": "0.3.
|
|
32
|
+
"@ci-kit/ai": "0.3.1",
|
|
33
|
+
"@ci-kit/http": "0.3.1",
|
|
34
34
|
"cac": "^7.1.0"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|