Package release 0.4.162 from the current workspace snapshot

Constraint: Windows and Linux artifacts are built on native GitHub runners from a temporary snapshot branch
Rejected: Build Windows/Linux locally on Apple Silicon | docker/wine packaging is not stable on this host
Confidence: medium
Scope-risk: moderate
Directive: This snapshot branch is transport-only and should be deleted after the release completes
Tested: local verify/build stages before snapshot creation
Not-tested: remote packaging before workflow execution
This commit is contained in:
ZacharyZhang-NY committed 2026-04-06 14:01:39 -04:00
1 parent f5d4f8b705
commit 15a9c5c3c2
4 files changed
+61 -30

No files matched your search

+3 -19
View File
@@ -247,25 +247,9 @@ export function executeAutomationAction(
}
} else {
// No manager found — agent is likely the CEO or top-level.
// Post as company-wide message so the board and other leaders see it.
const escalationResult = dispatchAgentMessage(
{ db, emitEvent, publishDomainChanged, wakeAgentIfPossible },
{
companyId: ctx.companyId,
fromAgentId: targetAgentId,
toAgentId: null,
channel: "company",
subject: `Escalation: ${taskTitle}`,
body: escalationBody,
priority: "urgent",
},
wakeTrigger,
);
if (!escalationResult.ok) {
logger.warn(
`[automation] Failed to escalate "${taskTitle}" to company channel: ${escalationResult.error.code} ${escalationResult.error.message}`,
);
}
// Skip posting to company channel to avoid flooding it with system noise.
// The task status change is already visible in the task list and activity log.
logger.info(`[automation] Skipping escalation for top-level agent "${agentName}" — no manager to escalate to.`);
}
break;
}
+47
View File
@@ -90,6 +90,53 @@ export function buildConnectorMethods(
const currentRows = readAll<Partial<ConnectorRecord>>(
"select id, label, description, status, command, version, auth_state as authState, last_checked_at as lastCheckedAt, last_error as lastError, model, env_binding_text as envBindingText, notes from connectors",
);
// Migrate first compat slot if its definition defaults have changed (edition upgrade).
// When the definition ships with preset notes that differ from the DB, relocate the
// old user config to the next empty compat slot so definition defaults take effect.
const firstCompat = currentRows.find((r) => r.id === "claude_compatible");
if (firstCompat?.envBindingText && firstCompat.notes) {
let firstDef: { notes: string } | undefined;
try { firstDef = getConnectorDefinition("claude_compatible"); } catch { /* skip */ }
if (firstDef?.notes && firstCompat.notes !== firstDef.notes) {
const migrationTargets: ConnectorId[] = [
"claude_compat_2", "claude_compat_3", "claude_compat_4", "claude_compat_5",
"claude_compat_6", "claude_compat_7", "claude_compat_8", "claude_compat_9", "claude_compat_10",
];
const occupied = new Set(
currentRows
.filter((r) => r.id !== "claude_compatible" && r.id?.startsWith("claude_compat") && r.envBindingText)
.map((r) => r.id),
);
const targetId = migrationTargets.find((id) => !occupied.has(id));
if (targetId) {
const migrated = {
envBindingText: firstCompat.envBindingText,
notes: firstCompat.notes,
model: firstCompat.model,
status: firstCompat.status,
authState: firstCompat.authState,
version: firstCompat.version,
lastCheckedAt: firstCompat.lastCheckedAt,
lastError: firstCompat.lastError,
};
const targetRow = currentRows.find((r) => r.id === targetId);
if (targetRow) {
Object.assign(targetRow, migrated);
} else {
currentRows.push({ id: targetId as ConnectorId, ...migrated });
}
firstCompat.envBindingText = undefined;
firstCompat.notes = undefined;
firstCompat.model = undefined;
firstCompat.status = undefined;
firstCompat.authState = undefined;
firstCompat.version = undefined;
firstCompat.lastCheckedAt = undefined;
firstCompat.lastError = undefined;
}
}
}
const merged = buildDefaultConnectorRows(currentRows);
const statement = getDb().prepare(
"insert or replace into connectors (id, label, description, status, command, version, auth_state, last_checked_at, last_error, model, env_binding_text, notes, updated_at) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",