Merge origin/main into dev (second round)
Resolve 21 conflicts from latest main (provider profiles, Windows fixes, 0.1.55-rc.1). Fix all type errors and syntax issues from merge artifacts.
This commit is contained in:
@@ -45,7 +45,7 @@ import type {
|
||||
AgentTimelineRow,
|
||||
AgentTimelineStore,
|
||||
} from "./agent-timeline-store-types.js";
|
||||
import { AGENT_PROVIDER_IDS, getAgentProviderDefinition } from "./provider-manifest.js";
|
||||
import { getAgentProviderDefinition } from "./provider-manifest.js";
|
||||
|
||||
export { AGENT_LIFECYCLE_STATUSES, type AgentLifecycleStatus };
|
||||
export type {
|
||||
@@ -334,6 +334,10 @@ export class AgentManager {
|
||||
this.clients.set(provider, client);
|
||||
}
|
||||
|
||||
getRegisteredProviderIds(): AgentProvider[] {
|
||||
return Array.from(this.clients.keys());
|
||||
}
|
||||
|
||||
setAgentAttentionCallback(callback: AgentAttentionCallback): void {
|
||||
this.onAgentAttention = callback;
|
||||
}
|
||||
@@ -477,8 +481,7 @@ export class AgentManager {
|
||||
}
|
||||
|
||||
async listProviderAvailability(): Promise<ProviderAvailability[]> {
|
||||
const checks = AGENT_PROVIDER_IDS.map(async (providerId) => {
|
||||
const provider = providerId as AgentProvider;
|
||||
const checks = Array.from(this.clients.keys()).map(async (provider) => {
|
||||
const client = this.clients.get(provider);
|
||||
if (!client) {
|
||||
return {
|
||||
@@ -787,6 +790,7 @@ export class AgentManager {
|
||||
async setAgentMode(agentId: string, modeId: string): Promise<void> {
|
||||
const agent = this.requireSessionAgent(agentId);
|
||||
await agent.session.setMode(modeId);
|
||||
agent.config.modeId = modeId;
|
||||
agent.currentModeId = modeId;
|
||||
// Update runtimeInfo to reflect the new mode
|
||||
if (agent.runtimeInfo) {
|
||||
@@ -1847,10 +1851,14 @@ export class AgentManager {
|
||||
const durableTimelineSeed = shouldSeedFromDurable
|
||||
? await this.loadCommittedTimelineSeed(resolvedAgentId, now)
|
||||
: null;
|
||||
const durableTimelineHasRows = durableTimelineSeed != null && (durableTimelineSeed.nextSeq ?? 1) > 1;
|
||||
const durableTimelineHasRows =
|
||||
durableTimelineSeed != null && (durableTimelineSeed.nextSeq ?? 1) > 1;
|
||||
const timelineSeed = explicitTimelineSeed ?? durableTimelineSeed;
|
||||
if (timelineSeed || !this.timelineStore.has(resolvedAgentId)) {
|
||||
this.timelineStore.initialize(resolvedAgentId, timelineSeed ?? { timestamp: now.toISOString() });
|
||||
this.timelineStore.initialize(
|
||||
resolvedAgentId,
|
||||
timelineSeed ?? { timestamp: now.toISOString() },
|
||||
);
|
||||
}
|
||||
if (options?.timelineRows?.length) {
|
||||
this.enqueueDurableTimelineBulkInsert(resolvedAgentId, options.timelineRows);
|
||||
@@ -2157,9 +2165,7 @@ export class AgentManager {
|
||||
}
|
||||
}
|
||||
|
||||
private async hydrateTimelineFromLegacyProviderHistory(
|
||||
agent: ActiveManagedAgent,
|
||||
): Promise<void> {
|
||||
private async hydrateTimelineFromLegacyProviderHistory(agent: ActiveManagedAgent): Promise<void> {
|
||||
if (agent.historyPrimed) {
|
||||
return;
|
||||
}
|
||||
@@ -2726,5 +2732,4 @@ export class AgentManager {
|
||||
}
|
||||
return agent;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user