talentos 1.1.2 → 1.1.4
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/agent/adapters.js +4 -2
- package/dist/agent/serve.js +1 -1
- package/dist/commands/agent.js +25 -4
- package/package.json +1 -1
package/dist/agent/adapters.js
CHANGED
|
@@ -35,6 +35,7 @@ const ROOM_TOOLS = [
|
|
|
35
35
|
"read_room",
|
|
36
36
|
"list_room_files",
|
|
37
37
|
"read_file",
|
|
38
|
+
"get_skill",
|
|
38
39
|
"suggest_change",
|
|
39
40
|
"create_file",
|
|
40
41
|
"create_deck",
|
|
@@ -192,7 +193,8 @@ export function readProviderEvent(provider, value) {
|
|
|
192
193
|
}
|
|
193
194
|
export async function runProvider(input) {
|
|
194
195
|
const { config, job, workDir, sessionId, signal } = input;
|
|
195
|
-
const
|
|
196
|
+
const { instructions, ...context } = job.packet;
|
|
197
|
+
const prompt = JSON.stringify(config.provider === "claude_code" ? context : job.packet), mcpPath = join(dirname(workDir), ".talentos-mcp.json");
|
|
196
198
|
const catalogPath = join(dirname(workDir), ".talentos-codex-models.json");
|
|
197
199
|
const binary = resolveProviderBinary(config.provider, config.providerPath);
|
|
198
200
|
let command, args;
|
|
@@ -217,7 +219,7 @@ export async function runProvider(input) {
|
|
|
217
219
|
mcpPath,
|
|
218
220
|
"--strict-mcp-config",
|
|
219
221
|
"--append-system-prompt",
|
|
220
|
-
|
|
222
|
+
instructions,
|
|
221
223
|
"--tools",
|
|
222
224
|
"",
|
|
223
225
|
"--allowedTools",
|
package/dist/agent/serve.js
CHANGED
|
@@ -84,7 +84,7 @@ export async function serveAgent(config, directory, version, stop, verify) {
|
|
|
84
84
|
const response = await gateway.request("/agent-gateway/heartbeat", { cliVersion: version }, signal);
|
|
85
85
|
if (response) {
|
|
86
86
|
minimum = response.cliMinVersion;
|
|
87
|
-
if (response.pendingJobs > 0 || minimum
|
|
87
|
+
if (response.pendingJobs > 0 || needsUpdate(version, minimum)) {
|
|
88
88
|
wake();
|
|
89
89
|
}
|
|
90
90
|
}
|
package/dist/commands/agent.js
CHANGED
|
@@ -12,6 +12,7 @@ import { homeDir } from "../install.js";
|
|
|
12
12
|
import { defaultDeviceName, hashKey, mintKey } from "../login.js";
|
|
13
13
|
import { resolveProviderBinary } from "../provider-binary.js";
|
|
14
14
|
const MAX_PREVIOUS_AGENT_IDS = 100;
|
|
15
|
+
const REMOVED_AGENT_NOTICE = "removed in TalentOS; run talentos agent link to reconnect";
|
|
15
16
|
export async function runAgent(parsed, dependencies = {}) {
|
|
16
17
|
switch (parsed.action) {
|
|
17
18
|
case "link": {
|
|
@@ -56,6 +57,17 @@ export async function runAgent(parsed, dependencies = {}) {
|
|
|
56
57
|
let failed = 0;
|
|
57
58
|
for (const agent of agents) {
|
|
58
59
|
try {
|
|
60
|
+
try {
|
|
61
|
+
await fetchAgentStatus(agent);
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
if (agentAccessEnded(error)) {
|
|
65
|
+
await uninstallAgentService(agent, { home: dependencies.home });
|
|
66
|
+
emit(redactAgentOutput(`${agent.name} (${agent.agentId}): ${REMOVED_AGENT_NOTICE}.`, [agent.apiKey]));
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
// Repair remains available offline or before the status route ships.
|
|
70
|
+
}
|
|
59
71
|
agent.providerPath = (dependencies.resolveBinary ?? resolveProviderBinary)(agent.provider);
|
|
60
72
|
(dependencies.probe ?? inspectProvider)(agent.provider, agent.providerPath);
|
|
61
73
|
await storeAgent(agent, dependencies.home);
|
|
@@ -205,13 +217,13 @@ async function showAgents(parsed) {
|
|
|
205
217
|
});
|
|
206
218
|
}
|
|
207
219
|
catch (error) {
|
|
220
|
+
const removed = agentAccessEnded(error);
|
|
208
221
|
rows.push({
|
|
209
222
|
agentId: agent.agentId,
|
|
210
223
|
name: redactAgentOutput(agent.name),
|
|
211
224
|
provider: agent.provider,
|
|
212
|
-
state:
|
|
213
|
-
|
|
214
|
-
: "unreachable",
|
|
225
|
+
state: removed ? "removed" : "unreachable",
|
|
226
|
+
hint: removed ? REMOVED_AGENT_NOTICE : undefined,
|
|
215
227
|
lastSeenAt: null,
|
|
216
228
|
});
|
|
217
229
|
}
|
|
@@ -221,10 +233,19 @@ async function showAgents(parsed) {
|
|
|
221
233
|
}
|
|
222
234
|
else {
|
|
223
235
|
emit(rows.length
|
|
224
|
-
? renderTable(["Agent", "Provider", "Status", "ID"], rows.map((row) => [
|
|
236
|
+
? renderTable(["Agent", "Provider", "Status", "ID"], rows.map((row) => [
|
|
237
|
+
row.name,
|
|
238
|
+
row.provider,
|
|
239
|
+
row.hint ?? row.state,
|
|
240
|
+
row.agentId,
|
|
241
|
+
]))
|
|
225
242
|
: "No agents linked on this machine. Get a setup prompt from TalentOS.");
|
|
226
243
|
}
|
|
227
244
|
}
|
|
245
|
+
function agentAccessEnded(error) {
|
|
246
|
+
return (error instanceof AgentHttpError &&
|
|
247
|
+
(error.status === 401 || error.status === 410));
|
|
248
|
+
}
|
|
228
249
|
async function unlinkLocal(parsed) {
|
|
229
250
|
const agents = await selectAgents(parsed, true);
|
|
230
251
|
const agent = agents[0];
|
package/package.json
CHANGED