@paperclipai/server 2026.930.0-canary.2 → 2026.930.0-canary.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/build-info.json +1 -1
- package/dist/routes/agents.d.ts.map +1 -1
- package/dist/routes/agents.js +35 -0
- package/dist/routes/agents.js.map +1 -1
- package/dist/routes/openapi.d.ts.map +1 -1
- package/dist/routes/openapi.js +17 -0
- package/dist/routes/openapi.js.map +1 -1
- package/dist/services/agents.d.ts +10 -10
- package/dist/services/ai-auth-failure.d.ts +10 -0
- package/dist/services/ai-auth-failure.d.ts.map +1 -0
- package/dist/services/ai-auth-failure.js +19 -0
- package/dist/services/ai-auth-failure.js.map +1 -0
- package/dist/services/ai-auth-failure.test.d.ts +2 -0
- package/dist/services/ai-auth-failure.test.d.ts.map +1 -0
- package/dist/services/ai-auth-failure.test.js +26 -0
- package/dist/services/ai-auth-failure.test.js.map +1 -0
- package/dist/services/ai-connections.d.ts +12 -3
- package/dist/services/ai-connections.d.ts.map +1 -1
- package/dist/services/ai-connections.js +35 -2
- package/dist/services/ai-connections.js.map +1 -1
- package/dist/services/connection-intents.d.ts +9 -2
- package/dist/services/connection-intents.d.ts.map +1 -1
- package/dist/services/connection-intents.js +93 -11
- package/dist/services/connection-intents.js.map +1 -1
- package/dist/services/heartbeat.d.ts.map +1 -1
- package/dist/services/heartbeat.js +16 -3
- package/dist/services/heartbeat.js.map +1 -1
- package/dist/services/recovery/provider-failure-classification.test.js +14 -0
- package/dist/services/recovery/provider-failure-classification.test.js.map +1 -1
- package/dist/services/recovery/service.d.ts.map +1 -1
- package/dist/services/recovery/service.js +2 -1
- package/dist/services/recovery/service.js.map +1 -1
- package/dist/services/run-liveness.d.ts +2 -0
- package/dist/services/run-liveness.d.ts.map +1 -1
- package/dist/services/run-liveness.js +4 -0
- package/dist/services/run-liveness.js.map +1 -1
- package/dist/services/tool-gateway.d.ts +1 -1
- package/dist/services/tool-gateway.d.ts.map +1 -1
- package/package.json +18 -18
- package/ui-dist/assets/{Agents.production-WVmmp2za.js → Agents.production-DgyH00dJ.js} +2 -2
- package/ui-dist/assets/{CompanyActivity.production-nDcqjZbO.js → CompanyActivity.production-BSjvHNFY.js} +1 -1
- package/ui-dist/assets/{CompanyExport-BJoyzcat.js → CompanyExport-CqP7M8vI.js} +1 -1
- package/ui-dist/assets/{CompanySkills.production-jsiCBXHx.js → CompanySkills.production-Dago9rOs.js} +1 -1
- package/ui-dist/assets/{Costs.production-SJm6H8Xd.js → Costs.production-CHeDPs0b.js} +1 -1
- package/ui-dist/assets/{MarkdownBody-DP1mZ18N.js → MarkdownBody-D3EzsAc9.js} +1 -1
- package/ui-dist/assets/{OrgChart.production-CUkp38UD.js → OrgChart.production-SnZgw1fC.js} +1 -1
- package/ui-dist/assets/{RoutineDetail.production-rY4HJPUD.js → RoutineDetail.production-CnpNNs9Q.js} +1 -1
- package/ui-dist/assets/{RoutineRunVariablesDialog-CFS41W3m.js → RoutineRunVariablesDialog-DWi8pFgl.js} +1 -1
- package/ui-dist/assets/{Routines.production-8xhxnNQX.js → Routines.production-Dptz5Yq7.js} +1 -1
- package/ui-dist/assets/{StatusIcon-DljkAslt.js → StatusIcon-CRt2_wNq.js} +1 -1
- package/ui-dist/assets/agents-BFvkriZ4.js +1 -0
- package/ui-dist/assets/{definition-Dga96mzr.js → definition-DrKJYmgu.js} +1 -1
- package/ui-dist/assets/{index-C_APSfRe.js → index-CDS042uS.js} +157 -157
- package/ui-dist/assets/{label-CsiPASFm.js → label-BLCo3uBS.js} +1 -1
- package/ui-dist/assets/{router-Cvpxsdv_.js → router-DgdavNXl.js} +1 -1
- package/ui-dist/index.html +7 -7
- package/ui-dist/sw.js +1 -1
- package/ui-dist/assets/agents-D4OgWpQo.js +0 -1
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/routes/agents.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/routes/agents.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAiFvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAiEhF,OAAO,EACL,wBAAwB,EAWxB,KAAK,sBAAsB,EAE3B,KAAK,sBAAsB,EAC3B,KAAK,6BAA6B,EAClC,KAAK,sBAAsB,EAK5B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EACV,cAAc,EAUf,MAAM,qBAAqB,CAAC;AA2P7B,wBAAgB,WAAW,CACzB,EAAE,EAAE,EAAE,EACN,OAAO,GAAE;IACP,cAAc,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,2BAA2B,GAAG,2BAA2B,CAAC,CAAC;IACrG,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,6EAA6E;IAC7E,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC;;;;OAIG;IACH,0BAA0B,CAAC,EAAE,MAAM,EAAE,CAAC;IACtC;;;;;OAKG;IACH,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC;;;OAGG;IACH,wBAAwB,CAAC,EAAE,CAAC,OAAO,EAAE,wBAAwB,KAAK,IAAI,CAAC;IACvE;;;;;;;;OAQG;IACH,eAAe,CAAC,EAAE;QAChB,OAAO,EAAE,6BAA6B,CAAC;QACvC,MAAM,EAAE,sBAAsB,CAAC;QAC/B,yEAAyE;QACzE,KAAK,CAAC,EAAE,sBAAsB,CAAC;QAC/B;;;WAGG;QACH,kBAAkB,CAAC,EAAE,sBAAsB,CAAC;KAC7C,CAAC;CACE,8CAg+NP"}
|
package/dist/routes/agents.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { connectionIntentService } from "../services/connection-intents.js";
|
|
2
|
+
import { completeConnectionIntentSchema } from "@paperclipai/shared";
|
|
1
3
|
import { agentFileStore, agentFileTokenFromHash } from "../services/agent-file-store.js";
|
|
2
4
|
import { pipeline } from "node:stream/promises";
|
|
3
5
|
import { resolveAgentAppearance, agentAvatarUrl } from "@paperclipai/shared";
|
|
@@ -4374,6 +4376,39 @@ export function agentRoutes(db, options = {}) {
|
|
|
4374
4376
|
});
|
|
4375
4377
|
res.json(result.bundle);
|
|
4376
4378
|
});
|
|
4379
|
+
router.post("/agents/:id/connection-intents/:interactionId/adopt", validate(completeConnectionIntentSchema), async (req, res) => {
|
|
4380
|
+
assertBoard(req);
|
|
4381
|
+
const agent = await getAccessibleResource(req, res, svc.getById(req.params.id), "Agent not found");
|
|
4382
|
+
if (!agent)
|
|
4383
|
+
return;
|
|
4384
|
+
await assertCanUpdateAgent(req, agent);
|
|
4385
|
+
const userId = responsibleUserForAiRequest(req);
|
|
4386
|
+
const intents = connectionIntentService(db);
|
|
4387
|
+
const interactionId = req.params.interactionId;
|
|
4388
|
+
const loaded = await intents.loadIntent(interactionId);
|
|
4389
|
+
if (loaded.issue.companyId !== agent.companyId || loaded.interaction.payload.requestingAgentId !== agent.id)
|
|
4390
|
+
throw notFound("Connection intent not found");
|
|
4391
|
+
if (!userId || loaded.interaction.addresseeUserId !== userId)
|
|
4392
|
+
throw forbidden("Only the addressed user can adopt this connection");
|
|
4393
|
+
const connectionId = req.body.connectionId;
|
|
4394
|
+
if (loaded.interaction.status === "accepted" && loaded.interaction.result?.connectionId === connectionId) {
|
|
4395
|
+
res.json(loaded.interaction);
|
|
4396
|
+
return;
|
|
4397
|
+
}
|
|
4398
|
+
if (loaded.interaction.status !== "pending")
|
|
4399
|
+
throw conflict("Connection intent is already resolved");
|
|
4400
|
+
const setup = await intents.setupOptions(interactionId);
|
|
4401
|
+
if (!setup.aiConnectionRequiresAdoption || !setup.aiConnection)
|
|
4402
|
+
throw conflict("The agent’s AI configuration changed. Reload the task and try again.");
|
|
4403
|
+
// Probe in the agent's execution environment without installing access.
|
|
4404
|
+
// The binding, install, audit, and card resolution commit together below.
|
|
4405
|
+
const validatedConnectionId = await validateManagedAgentBinding(req, agent.companyId, agent.id, agent.adapterType, agent.adapterConfig, setup.aiConnection, agent.defaultEnvironmentId, true, true);
|
|
4406
|
+
if (validatedConnectionId !== connectionId)
|
|
4407
|
+
throw conflict("This is no longer the selected account. Reload the task and try again.");
|
|
4408
|
+
res.json(await intents.complete(interactionId, connectionId, userId, {
|
|
4409
|
+
validatedAdoption: { agentUpdatedAt: agent.updatedAt, binding: setup.aiConnection },
|
|
4410
|
+
}));
|
|
4411
|
+
});
|
|
4377
4412
|
router.patch("/agents/:id", validate(updateAgentSchema), async (req, res) => {
|
|
4378
4413
|
const id = req.params.id;
|
|
4379
4414
|
const existing = await getAccessibleResource(req, res, svc.getById(id), "Agent not found");
|