talentos 1.3.0 → 1.4.2

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.
@@ -11,6 +11,7 @@ import { gatewayLauncherPath } from "../gateway-install.js";
11
11
  import { providerPathEnv, resolveProviderBinary } from "../provider-binary.js";
12
12
  import { codexRoomArgs, ROOM_TOOLS } from "./codex-policy.js";
13
13
  import { CodexBoundaryError, probeCodexBoundary } from "./codex-probe.js";
14
+ import { prepareCodexOwnerLaunch } from "./native/codex-launch.js";
14
15
  import { prepareOwnerLaunch } from "./native/launch.js";
15
16
  import { readReceipts } from "./native/receipts.js";
16
17
  const CHILD_ENV = [
@@ -212,6 +213,28 @@ export async function runProvider(input) {
212
213
  command = binary;
213
214
  args = ownerLaunch.args;
214
215
  }
216
+ else if (input.owner && config.provider === "codex" && input.owner.codex) {
217
+ const watching = await input.owner.watch?.();
218
+ stopWatching = watching?.stop;
219
+ ownerLaunch = await prepareCodexOwnerLaunch({
220
+ agentId: config.agentId,
221
+ askSocket: watching?.socketPath,
222
+ binary: input.owner.codex.binary,
223
+ bundledCatalog: input.owner.codex.bundledCatalog,
224
+ directory: dirname(workDir),
225
+ env: input.owner.env,
226
+ home: input.owner.home,
227
+ instructions,
228
+ jobId: job.jobId,
229
+ prompt,
230
+ sessionId,
231
+ sharedRoom: job.native?.sharedRoom,
232
+ signal,
233
+ workspace: input.owner.workspace,
234
+ });
235
+ command = binary;
236
+ args = ownerLaunch.args;
237
+ }
215
238
  else if (config.provider === "claude_code") {
216
239
  await writePrivateFile(mcpPath, JSON.stringify({
217
240
  mcpServers: {
@@ -1,3 +1,6 @@
1
+ // Served by our LOCAL stdio proxy in an owner-native Codex job, not by the
2
+ // server: the shell fence (#10987). The proxy classifies the command.
3
+ export const ROOM_LOCAL_TOOLS = ["run_command"];
1
4
  export const ROOM_TOOLS = [
2
5
  "list_rooms",
3
6
  "read_room",
@@ -38,7 +38,9 @@ export class AgentGateway {
38
38
  }
39
39
  async subscribe(wake, fallback,
40
40
  // Jobs of this agent that were cancelled (the owner's Stop): end them now.
41
- stopped) {
41
+ stopped,
42
+ // The owner opened "Add project" or removed one: serve it from this computer.
43
+ projectRequests) {
42
44
  const initial = await this.request("/agent-gateway/token");
43
45
  if (!(initial && isSecureUrl(new URL(initial.convexUrl)))) {
44
46
  throw new Error("Agent push is unavailable.");
@@ -67,9 +69,17 @@ export class AgentGateway {
67
69
  const unsubscribeStops = stopped
68
70
  ? client.onUpdate(makeFunctionReference("externalAgents/jobs:jobControl"), {}, (jobIds) => stopped(jobIds), () => undefined)
69
71
  : undefined;
72
+ const unsubscribeProjects = projectRequests
73
+ ? client.onUpdate(makeFunctionReference("externalAgents/projects:requestsForAgent"), {}, (count) => {
74
+ if (count > 0) {
75
+ projectRequests();
76
+ }
77
+ }, () => undefined)
78
+ : undefined;
70
79
  return async () => {
71
80
  unsubscribe();
72
81
  unsubscribeStops?.();
82
+ unsubscribeProjects?.();
73
83
  await client.close();
74
84
  };
75
85
  }
@@ -11,4 +11,7 @@ if (!config) {
11
11
  }
12
12
  await startMcpProxy(new AgentClient({ apiUrl: config.apiUrl, apiKey: config.apiKey }),
13
13
  // The launcher names the job's workspace; a job with none uploads nothing.
14
- options["upload-root"]);
14
+ options["upload-root"],
15
+ // Set only for an owner-native Codex job: the folder whose context.json and
16
+ // hook gate run_command (#10987). Absent for every room-only job.
17
+ options["owner-job-dir"]);