heyio 4.3.1 → 4.3.3
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/daemon/cli.js +33 -7
- package/dist/daemon/index.js +32 -7
- package/package.json +1 -1
package/dist/daemon/cli.js
CHANGED
|
@@ -80,7 +80,7 @@ var init_constants = __esm({
|
|
|
80
80
|
"packages/shared/dist/constants.js"() {
|
|
81
81
|
"use strict";
|
|
82
82
|
APP_NAME = "io";
|
|
83
|
-
APP_VERSION = "4.3.
|
|
83
|
+
APP_VERSION = "4.3.3";
|
|
84
84
|
API_PORT = 7777;
|
|
85
85
|
API_HOST = "0.0.0.0";
|
|
86
86
|
DEFAULT_MODEL = "gpt-4.1-mini";
|
|
@@ -68368,6 +68368,7 @@ async function refreshModelPricing(logger2) {
|
|
|
68368
68368
|
}
|
|
68369
68369
|
const db = await getDatabase();
|
|
68370
68370
|
const now = nowIso();
|
|
68371
|
+
await db.execute("DELETE FROM model_pricing WHERE id LIKE '%/%'");
|
|
68371
68372
|
for (const model of modelMap.values()) {
|
|
68372
68373
|
if (model.tokenInputMultiplier == null) {
|
|
68373
68374
|
continue;
|
|
@@ -68473,7 +68474,7 @@ async function upsertModel(db, model) {
|
|
|
68473
68474
|
}
|
|
68474
68475
|
function rowToModelPricing(row) {
|
|
68475
68476
|
return {
|
|
68476
|
-
id: asString(row.id),
|
|
68477
|
+
id: stripVendorPrefix(asString(row.id)),
|
|
68477
68478
|
displayName: asString(row.display_name),
|
|
68478
68479
|
premiumMultiplier: asNullableNumber(row.premium_multiplier),
|
|
68479
68480
|
tokenInputMultiplier: asNullableNumber(row.token_input_multiplier),
|
|
@@ -69899,7 +69900,7 @@ async function executeAgentTask(member, task, worktreePath, options2) {
|
|
|
69899
69900
|
try {
|
|
69900
69901
|
client2 = new CopilotClient3({ workingDirectory: worktreePath });
|
|
69901
69902
|
await client2.start();
|
|
69902
|
-
const model = member.model
|
|
69903
|
+
const model = member.model ? stripVendorPrefix(member.model) : await selectModelForTask(task.description);
|
|
69903
69904
|
const session = await client2.createSession({
|
|
69904
69905
|
model,
|
|
69905
69906
|
workingDirectory: worktreePath,
|
|
@@ -70316,7 +70317,7 @@ Return strict JSON:
|
|
|
70316
70317
|
try {
|
|
70317
70318
|
client2 = new CopilotClient5({ workingDirectory: worktreePath });
|
|
70318
70319
|
await client2.start();
|
|
70319
|
-
const model = qaMember.model
|
|
70320
|
+
const model = qaMember.model ? stripVendorPrefix(qaMember.model) : await selectModelForTask(`QA review: ${objective.description}`);
|
|
70320
70321
|
const session = await client2.createSession({
|
|
70321
70322
|
model,
|
|
70322
70323
|
workingDirectory: worktreePath,
|
|
@@ -70394,6 +70395,7 @@ var init_qa = __esm({
|
|
|
70394
70395
|
"use strict";
|
|
70395
70396
|
init_dist();
|
|
70396
70397
|
init_event_bus();
|
|
70398
|
+
init_registry();
|
|
70397
70399
|
init_model_selector();
|
|
70398
70400
|
init_roles();
|
|
70399
70401
|
init_store2();
|
|
@@ -70450,7 +70452,7 @@ Return strict JSON:
|
|
|
70450
70452
|
try {
|
|
70451
70453
|
client2 = new CopilotClient6();
|
|
70452
70454
|
await client2.start();
|
|
70453
|
-
const model = teamLead.model
|
|
70455
|
+
const model = teamLead.model ? stripVendorPrefix(teamLead.model) : await selectModelForTask(`Code review: ${objective.description}`);
|
|
70454
70456
|
const session = await client2.createSession({
|
|
70455
70457
|
model,
|
|
70456
70458
|
onPermissionRequest: approveAll6,
|
|
@@ -70487,6 +70489,7 @@ You are conducting a final coordination review before QA.`
|
|
|
70487
70489
|
var init_review = __esm({
|
|
70488
70490
|
"packages/daemon/src/execution/review.ts"() {
|
|
70489
70491
|
"use strict";
|
|
70492
|
+
init_registry();
|
|
70490
70493
|
init_model_selector();
|
|
70491
70494
|
init_roles();
|
|
70492
70495
|
}
|
|
@@ -71088,11 +71091,21 @@ async function handleAddSquadMember(rawArgs) {
|
|
|
71088
71091
|
if (!squad) {
|
|
71089
71092
|
throw new Error(`Squad ${squadId} was not found.`);
|
|
71090
71093
|
}
|
|
71094
|
+
let validatedModel = null;
|
|
71095
|
+
if (model) {
|
|
71096
|
+
validatedModel = stripVendorPrefix(model);
|
|
71097
|
+
const pricing = await getModelPricing(validatedModel);
|
|
71098
|
+
if (!pricing) {
|
|
71099
|
+
throw new Error(
|
|
71100
|
+
`Model "${model}" is not available. Use a model from the pricing database (e.g. gpt-4.1-mini, gpt-4.1, claude-sonnet-4, o4-mini). Omit the model field to use dynamic selection.`
|
|
71101
|
+
);
|
|
71102
|
+
}
|
|
71103
|
+
}
|
|
71091
71104
|
const member = await addMember(squadId, {
|
|
71092
71105
|
role,
|
|
71093
71106
|
name,
|
|
71094
71107
|
systemPrompt,
|
|
71095
|
-
model:
|
|
71108
|
+
model: validatedModel
|
|
71096
71109
|
});
|
|
71097
71110
|
eventBus.emit(EVENT_NAMES.SQUAD_MEMBER_UPDATED, { squadId, member });
|
|
71098
71111
|
return {
|
|
@@ -71210,10 +71223,22 @@ async function handleUpdateSquadMember(rawArgs) {
|
|
|
71210
71223
|
if (!member || member.squadId !== squadId) {
|
|
71211
71224
|
throw new Error(`Member ${memberId} was not found in squad ${squadId}.`);
|
|
71212
71225
|
}
|
|
71226
|
+
let validatedModel = void 0;
|
|
71227
|
+
if (model === "") {
|
|
71228
|
+
validatedModel = null;
|
|
71229
|
+
} else if (model) {
|
|
71230
|
+
validatedModel = stripVendorPrefix(model);
|
|
71231
|
+
const pricing = await getModelPricing(validatedModel);
|
|
71232
|
+
if (!pricing) {
|
|
71233
|
+
throw new Error(
|
|
71234
|
+
`Model "${model}" is not available. Use a model from the pricing database (e.g. gpt-4.1-mini, gpt-4.1, claude-sonnet-4, o4-mini). Set to empty string to clear and use dynamic selection.`
|
|
71235
|
+
);
|
|
71236
|
+
}
|
|
71237
|
+
}
|
|
71213
71238
|
const updated = await updateMember(memberId, {
|
|
71214
71239
|
role,
|
|
71215
71240
|
systemPrompt,
|
|
71216
|
-
model:
|
|
71241
|
+
model: validatedModel
|
|
71217
71242
|
});
|
|
71218
71243
|
if (!updated) {
|
|
71219
71244
|
throw new Error(`Failed to update member ${memberId}.`);
|
|
@@ -71303,6 +71328,7 @@ var init_squad2 = __esm({
|
|
|
71303
71328
|
init_event_bus();
|
|
71304
71329
|
init_instances2();
|
|
71305
71330
|
init_runner();
|
|
71331
|
+
init_models();
|
|
71306
71332
|
init_manager2();
|
|
71307
71333
|
init_store2();
|
|
71308
71334
|
execAsync8 = promisify8(exec8);
|
package/dist/daemon/index.js
CHANGED
|
@@ -79,7 +79,7 @@ var init_constants = __esm({
|
|
|
79
79
|
"packages/shared/dist/constants.js"() {
|
|
80
80
|
"use strict";
|
|
81
81
|
APP_NAME = "io";
|
|
82
|
-
APP_VERSION = "4.3.
|
|
82
|
+
APP_VERSION = "4.3.3";
|
|
83
83
|
API_PORT = 7777;
|
|
84
84
|
API_HOST = "0.0.0.0";
|
|
85
85
|
DEFAULT_MODEL = "gpt-4.1-mini";
|
|
@@ -62907,6 +62907,7 @@ async function refreshModelPricing(logger2) {
|
|
|
62907
62907
|
}
|
|
62908
62908
|
const db = await getDatabase();
|
|
62909
62909
|
const now = nowIso();
|
|
62910
|
+
await db.execute("DELETE FROM model_pricing WHERE id LIKE '%/%'");
|
|
62910
62911
|
for (const model of modelMap.values()) {
|
|
62911
62912
|
if (model.tokenInputMultiplier == null) {
|
|
62912
62913
|
continue;
|
|
@@ -63012,7 +63013,7 @@ async function upsertModel(db, model) {
|
|
|
63012
63013
|
}
|
|
63013
63014
|
function rowToModelPricing(row) {
|
|
63014
63015
|
return {
|
|
63015
|
-
id: asString(row.id),
|
|
63016
|
+
id: stripVendorPrefix(asString(row.id)),
|
|
63016
63017
|
displayName: asString(row.display_name),
|
|
63017
63018
|
premiumMultiplier: asNullableNumber(row.premium_multiplier),
|
|
63018
63019
|
tokenInputMultiplier: asNullableNumber(row.token_input_multiplier),
|
|
@@ -82696,7 +82697,7 @@ async function executeAgentTask(member, task, worktreePath, options2) {
|
|
|
82696
82697
|
try {
|
|
82697
82698
|
client2 = new CopilotClient3({ workingDirectory: worktreePath });
|
|
82698
82699
|
await client2.start();
|
|
82699
|
-
const model = member.model
|
|
82700
|
+
const model = member.model ? stripVendorPrefix(member.model) : await selectModelForTask(task.description);
|
|
82700
82701
|
const session = await client2.createSession({
|
|
82701
82702
|
model,
|
|
82702
82703
|
workingDirectory: worktreePath,
|
|
@@ -83036,6 +83037,7 @@ init_dist();
|
|
|
83036
83037
|
import { exec as exec6 } from "node:child_process";
|
|
83037
83038
|
import { promisify as promisify6 } from "node:util";
|
|
83038
83039
|
import { CopilotClient as CopilotClient5, approveAll as approveAll5 } from "@github/copilot-sdk";
|
|
83040
|
+
init_registry();
|
|
83039
83041
|
var execAsync6 = promisify6(exec6);
|
|
83040
83042
|
var GIT_DIFF_MAX_BUFFER = 10 * 1024 * 1024;
|
|
83041
83043
|
function extractJsonObject2(content) {
|
|
@@ -83077,7 +83079,7 @@ Return strict JSON:
|
|
|
83077
83079
|
try {
|
|
83078
83080
|
client2 = new CopilotClient5({ workingDirectory: worktreePath });
|
|
83079
83081
|
await client2.start();
|
|
83080
|
-
const model = qaMember.model
|
|
83082
|
+
const model = qaMember.model ? stripVendorPrefix(qaMember.model) : await selectModelForTask(`QA review: ${objective.description}`);
|
|
83081
83083
|
const session = await client2.createSession({
|
|
83082
83084
|
model,
|
|
83083
83085
|
workingDirectory: worktreePath,
|
|
@@ -83151,6 +83153,7 @@ async function handleQARejection(objectiveId, feedback) {
|
|
|
83151
83153
|
}
|
|
83152
83154
|
|
|
83153
83155
|
// packages/daemon/src/execution/review.ts
|
|
83156
|
+
init_registry();
|
|
83154
83157
|
import { CopilotClient as CopilotClient6, approveAll as approveAll6 } from "@github/copilot-sdk";
|
|
83155
83158
|
function extractJsonObject3(content) {
|
|
83156
83159
|
const fenced = content.match(/```(?:json)?\s*([\s\S]*?)```/i);
|
|
@@ -83198,7 +83201,7 @@ Return strict JSON:
|
|
|
83198
83201
|
try {
|
|
83199
83202
|
client2 = new CopilotClient6();
|
|
83200
83203
|
await client2.start();
|
|
83201
|
-
const model = teamLead.model
|
|
83204
|
+
const model = teamLead.model ? stripVendorPrefix(teamLead.model) : await selectModelForTask(`Code review: ${objective.description}`);
|
|
83202
83205
|
const session = await client2.createSession({
|
|
83203
83206
|
model,
|
|
83204
83207
|
onPermissionRequest: approveAll6,
|
|
@@ -83948,11 +83951,21 @@ async function handleAddSquadMember(rawArgs) {
|
|
|
83948
83951
|
if (!squad) {
|
|
83949
83952
|
throw new Error(`Squad ${squadId} was not found.`);
|
|
83950
83953
|
}
|
|
83954
|
+
let validatedModel = null;
|
|
83955
|
+
if (model) {
|
|
83956
|
+
validatedModel = stripVendorPrefix(model);
|
|
83957
|
+
const pricing = await getModelPricing(validatedModel);
|
|
83958
|
+
if (!pricing) {
|
|
83959
|
+
throw new Error(
|
|
83960
|
+
`Model "${model}" is not available. Use a model from the pricing database (e.g. gpt-4.1-mini, gpt-4.1, claude-sonnet-4, o4-mini). Omit the model field to use dynamic selection.`
|
|
83961
|
+
);
|
|
83962
|
+
}
|
|
83963
|
+
}
|
|
83951
83964
|
const member = await addMember(squadId, {
|
|
83952
83965
|
role,
|
|
83953
83966
|
name,
|
|
83954
83967
|
systemPrompt,
|
|
83955
|
-
model:
|
|
83968
|
+
model: validatedModel
|
|
83956
83969
|
});
|
|
83957
83970
|
eventBus.emit(EVENT_NAMES.SQUAD_MEMBER_UPDATED, { squadId, member });
|
|
83958
83971
|
return {
|
|
@@ -84070,10 +84083,22 @@ async function handleUpdateSquadMember(rawArgs) {
|
|
|
84070
84083
|
if (!member || member.squadId !== squadId) {
|
|
84071
84084
|
throw new Error(`Member ${memberId} was not found in squad ${squadId}.`);
|
|
84072
84085
|
}
|
|
84086
|
+
let validatedModel = void 0;
|
|
84087
|
+
if (model === "") {
|
|
84088
|
+
validatedModel = null;
|
|
84089
|
+
} else if (model) {
|
|
84090
|
+
validatedModel = stripVendorPrefix(model);
|
|
84091
|
+
const pricing = await getModelPricing(validatedModel);
|
|
84092
|
+
if (!pricing) {
|
|
84093
|
+
throw new Error(
|
|
84094
|
+
`Model "${model}" is not available. Use a model from the pricing database (e.g. gpt-4.1-mini, gpt-4.1, claude-sonnet-4, o4-mini). Set to empty string to clear and use dynamic selection.`
|
|
84095
|
+
);
|
|
84096
|
+
}
|
|
84097
|
+
}
|
|
84073
84098
|
const updated = await updateMember(memberId, {
|
|
84074
84099
|
role,
|
|
84075
84100
|
systemPrompt,
|
|
84076
|
-
model:
|
|
84101
|
+
model: validatedModel
|
|
84077
84102
|
});
|
|
84078
84103
|
if (!updated) {
|
|
84079
84104
|
throw new Error(`Failed to update member ${memberId}.`);
|