@truefoundry/trueforge 0.2.0-rc.7 → 0.2.0-rc.8

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/main.js CHANGED
@@ -8100,7 +8100,6 @@ var GetAgentCodeSnippetsRequestQuerySchema = z2.object({
8100
8100
  // src/schemas/agentImport.ts
8101
8101
  init_common();
8102
8102
  var RESERVED_AGENT_NAMES2 = /* @__PURE__ */ new Set(["tfg", "trueforge"]);
8103
- var ImportAgentCollaboratorSchema = z3.object({}).loose().openapi("ImportAgentCollaborator");
8104
8103
  var ImportAgentItemSchema = z3.object({
8105
8104
  name: NameSchema.refine((name) => !RESERVED_AGENT_NAMES2.has(name), {
8106
8105
  message: "Agent name is reserved, cannot be used"
@@ -8109,7 +8108,7 @@ var ImportAgentItemSchema = z3.object({
8109
8108
  manifest: AgentSpecSchema5,
8110
8109
  tenant_id: z3.string().min(1).describe("Tenant to create the agent under."),
8111
8110
  created_by_subject: CreatedBySubjectSchema3.describe("Original creator to persist on the agent."),
8112
- collaborators: z3.array(ImportAgentCollaboratorSchema).optional()
8111
+ truefoundry_managed_agent_id: z3.string()
8113
8112
  }).strict().openapi("ImportAgentItem");
8114
8113
  var ImportAgentsRequestSchema = z3.object({
8115
8114
  agents: z3.array(ImportAgentItemSchema).describe("Agents to create; each carries tenant_id and created_by_subject.")
@@ -8731,7 +8730,7 @@ var TrueFoundryServiceFoundryServerClient = class {
8731
8730
  }
8732
8731
  /** PUT `/internal/tfg/agents` — create/reuse remote agent + sync model/MCP grants. */
8733
8732
  async putRemoteAgent(input) {
8734
- const hasCollaborators = input.collaborators && input.collaborators.length > 0;
8733
+ const hasTrueFoundryManagedAgentId = input.trueFoundryManagedAgentId !== void 0;
8735
8734
  const payload = await this.#requestJson({
8736
8735
  url: this.#url(TFG_AGENTS_PATH),
8737
8736
  accessToken: input.accessToken,
@@ -8742,7 +8741,7 @@ var TrueFoundryServiceFoundryServerClient = class {
8742
8741
  description: input.description,
8743
8742
  model: input.model,
8744
8743
  mcp_servers: input.mcp_servers,
8745
- ...hasCollaborators ? { collaborators: input.collaborators } : {}
8744
+ ...hasTrueFoundryManagedAgentId ? { trueFoundryManagedAgentId: input.trueFoundryManagedAgentId } : {}
8746
8745
  }
8747
8746
  });
8748
8747
  const parsed = PutRemoteAgentResponseSchema.safeParse(payload);
@@ -9131,7 +9130,7 @@ function createAgentImportRouter(deps) {
9131
9130
  external_id: null,
9132
9131
  created_by_subject: agent.created_by_subject,
9133
9132
  custom: {
9134
- ...agent.collaborators ? { collaborators: agent.collaborators } : {}
9133
+ trueFoundryManagedAgentId: agent.truefoundry_managed_agent_id
9135
9134
  }
9136
9135
  });
9137
9136
  results.push({
@@ -17766,14 +17765,14 @@ function toPutRemoteAgentPayload({
17766
17765
  name,
17767
17766
  description,
17768
17767
  manifest,
17769
- collaborators
17768
+ trueFoundryManagedAgentId
17770
17769
  }) {
17771
17770
  return {
17772
17771
  name,
17773
17772
  description: (description || name).slice(0, AGENT_DESCRIPTION_MAX_LENGTH),
17774
17773
  model: manifest.model.name,
17775
17774
  mcp_servers: (manifest.mcp_servers ?? []).map((server) => server.name),
17776
- ...collaborators ? { collaborators } : {}
17775
+ ...trueFoundryManagedAgentId ? { trueFoundryManagedAgentId } : {}
17777
17776
  };
17778
17777
  }
17779
17778
  var TrueFoundryAgentStore = class {
@@ -17815,14 +17814,14 @@ var TrueFoundryAgentStore = class {
17815
17814
  const created = await this.#inner.createAgent({ ...input, external_id: null }, transaction);
17816
17815
  let externalId;
17817
17816
  try {
17818
- const collaborators = input.custom?.["collaborators"];
17817
+ const trueFoundryManagedAgentId = input.custom?.["trueFoundryManagedAgentId"];
17819
17818
  ({ externalId } = await this.#client.putRemoteAgent({
17820
17819
  accessToken: await this.#resolveAccessToken(),
17821
17820
  ...toPutRemoteAgentPayload({
17822
17821
  name: input.name,
17823
17822
  description: input.description,
17824
17823
  manifest: input.manifest,
17825
- ...collaborators ? { collaborators } : {}
17824
+ ...trueFoundryManagedAgentId ? { trueFoundryManagedAgentId } : {}
17826
17825
  })
17827
17826
  }));
17828
17827
  const updated = await this.#inner.updateAgent(