@hearsay-tools/squawk 0.18.0-pr3633.6594 → 0.18.0-pr3633.6595
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hearsay-tools/squawk",
|
|
3
|
-
"version": "0.18.0-pr3633.
|
|
3
|
+
"version": "0.18.0-pr3633.6595",
|
|
4
4
|
"description": "Local cockpit for running and tracking AI agent tasks in your repo. Uses your logged-in `claude` CLI and `gh` — zero config, zero database.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -62,8 +62,8 @@
|
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@babel/parser": "^8.0.8",
|
|
64
64
|
"@babel/types": "^8.0.8",
|
|
65
|
-
"@open-mercato/cezar-api-client": "0.18.0-pr3633.
|
|
66
|
-
"@open-mercato/cezar-contract": "0.18.0-pr3633.
|
|
65
|
+
"@open-mercato/cezar-api-client": "0.18.0-pr3633.6595",
|
|
66
|
+
"@open-mercato/cezar-contract": "0.18.0-pr3633.6595",
|
|
67
67
|
"@types/node": "^24.19.1",
|
|
68
68
|
"@types/ws": "^8.18.1",
|
|
69
69
|
"esbuild": "^0.28.1",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"publishConfig": {
|
|
81
81
|
"access": "public"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "e528cbf10f545419e2d390792d144d4f8c5e1fb4"
|
|
84
84
|
}
|
|
@@ -34,10 +34,11 @@ export interface ConversationBenchRow { roots: number; conversations: number; aw
|
|
|
34
34
|
|
|
35
35
|
/** The roots, and the one root (`target`) that two conversations send an open request to: a
|
|
36
36
|
* lookup finds a few roots among many conversations, as a real one does. */
|
|
37
|
-
function records(options: ConversationBenchOptions): { rows: RunRecord[]; target: string } {
|
|
37
|
+
function records(options: ConversationBenchOptions): { rows: RunRecord[]; target: string; conversations: number } {
|
|
38
38
|
const ids = Array.from({ length: options.roots }, () => randomUUID());
|
|
39
39
|
const target = ids[0]!, task = 'x'.repeat(options.rootKb * 1024);
|
|
40
|
-
|
|
40
|
+
// Root 0 is the target, so at most every other root talks.
|
|
41
|
+
const talking = Math.min(Math.round(options.roots * options.conversationShare), options.roots - 1);
|
|
41
42
|
const rows = ids.map((id, index) => {
|
|
42
43
|
const messages: ConversationMessage[] = index > 0 && index <= talking ? Array.from({ length: options.messages }, (_, n) => ({
|
|
43
44
|
id: randomUUID(), senderRunId: id, recipientRunId: n === 0 && index <= 2 ? target : ids[1 + ((index + n) % (ids.length - 1))]!, kind: 'request', relationship: 'peer',
|
|
@@ -46,12 +47,12 @@ function records(options: ConversationBenchOptions): { rows: RunRecord[]; target
|
|
|
46
47
|
return makeRunRecord({ id, status: 'done', archived: true, task, createdAt: at(index), finishedAt: at(index + 1),
|
|
47
48
|
delegation: { role: 'root', permissions: ['spawn'], receipts: [], ...(messages.length ? { conversation: { messages, outcomes: [] } } : {}) } });
|
|
48
49
|
});
|
|
49
|
-
return { rows, target };
|
|
50
|
+
return { rows, target, conversations: talking };
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
/** Seed one temporary project, open its store and time the two lookups. */
|
|
53
54
|
export async function measureConversationLookup(options: ConversationBenchOptions): Promise<ConversationBenchRow> {
|
|
54
|
-
const { rows, target } = records(options);
|
|
55
|
+
const { rows, target, conversations } = records(options);
|
|
55
56
|
return withSeededStore('cez-bench-conversations-', () => rows, async (store) => {
|
|
56
57
|
const time = (call: () => unknown) => { const t = performance.now(); call(); return performance.now() - t; };
|
|
57
58
|
const awaiting = rootsAwaitingPeer(store, target).length;
|
|
@@ -61,7 +62,7 @@ export async function measureConversationLookup(options: ConversationBenchOption
|
|
|
61
62
|
lookupMs.push(time(() => rootsAwaitingPeer(store, target)));
|
|
62
63
|
listMs.push(time(() => store.listConversationRootIds()));
|
|
63
64
|
}
|
|
64
|
-
return { roots: options.roots, conversations
|
|
65
|
+
return { roots: options.roots, conversations, awaiting,
|
|
65
66
|
lookupMs: Math.round(median(lookupMs)), listMs: Math.round(median(listMs)) };
|
|
66
67
|
});
|
|
67
68
|
}
|
|
@@ -80,8 +81,8 @@ export function parseConversationBenchArgs(args: string[]): ConversationBenchArg
|
|
|
80
81
|
} });
|
|
81
82
|
const sizes = values.roots.split(',').map(Number);
|
|
82
83
|
const base = { conversationShare: Number(values['conversation-share']), messages: Number(values.messages), rootKb: Number(values['root-kb']), passes: Number(values.passes) };
|
|
83
|
-
if (sizes.some(size => !Number.isInteger(size) || size < 2) || !(base.conversationShare >= 0 && base.conversationShare <= 1) || !(base.messages >= 1) || !(base.passes >= 1)) {
|
|
84
|
-
throw new Error('--roots takes whole numbers >= 2; --conversation-share takes 0 to 1; --messages and --passes take numbers >= 1');
|
|
84
|
+
if (sizes.some(size => !Number.isInteger(size) || size < 2) || !(base.conversationShare >= 0 && base.conversationShare <= 1) || !(Number.isInteger(base.messages) && base.messages >= 1) || !(Number.isInteger(base.passes) && base.passes >= 1)) {
|
|
85
|
+
throw new Error('--roots takes whole numbers >= 2; --conversation-share takes 0 to 1; --messages and --passes take whole numbers >= 1');
|
|
85
86
|
}
|
|
86
87
|
return { sizes, base, out: values.out };
|
|
87
88
|
}
|
|
@@ -106,8 +106,8 @@ export function parseRetentionBenchArgs(args: string[]): RetentionBenchArgs {
|
|
|
106
106
|
const sizes = values.workers.split(',').map(Number);
|
|
107
107
|
const base = { workersPerParent: Number(values['workers-per-parent']), parentKb: Number(values['parent-kb']), workerKb: Number(values['worker-kb']),
|
|
108
108
|
liveRoots: Number(values['live-roots']), passes: Number(values.passes) };
|
|
109
|
-
if (sizes.some(size => !Number.isInteger(size) || size < 0) || !(base.workersPerParent >= 1) || !(base.passes >= 1)) {
|
|
110
|
-
throw new Error('--workers takes whole numbers >= 0; --workers-per-parent and --passes take numbers >= 1');
|
|
109
|
+
if (sizes.some(size => !Number.isInteger(size) || size < 0) || !(Number.isInteger(base.workersPerParent) && base.workersPerParent >= 1) || !(Number.isInteger(base.passes) && base.passes >= 1)) {
|
|
110
|
+
throw new Error('--workers takes whole numbers >= 0; --workers-per-parent and --passes take whole numbers >= 1');
|
|
111
111
|
}
|
|
112
112
|
return { sizes, base, out: values.out };
|
|
113
113
|
}
|