@app-vitals/agent-admin 1.9.0 → 1.10.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@app-vitals/agent-admin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/app-vitals/agent.git",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@anthropic-ai/sdk": "0.135.0",
|
|
45
|
-
"@app-vitals/agent-lib": "1.
|
|
45
|
+
"@app-vitals/agent-lib": "1.10.0",
|
|
46
46
|
"@hono/zod-openapi": "^1.0.0",
|
|
47
47
|
"@prisma/adapter-pg": "^7.10.0",
|
|
48
48
|
"@prisma/client": "^7.10.0",
|
|
@@ -5562,7 +5562,7 @@ describe("admin UI — create agent seeds type tools and extension plugins", ()
|
|
|
5562
5562
|
cookie = await makeSessionCookie();
|
|
5563
5563
|
});
|
|
5564
5564
|
|
|
5565
|
-
it("POST /admin/agents with the default type seeds an AgentTool row for every type tool and
|
|
5565
|
+
it("POST /admin/agents with the default type seeds an AgentTool row for every type tool and the default agent-platform plugin", async () => {
|
|
5566
5566
|
const seededTools: string[] = [];
|
|
5567
5567
|
const seededPlugins: string[] = [];
|
|
5568
5568
|
const deps = makeMockDeps();
|
|
@@ -5602,7 +5602,7 @@ describe("admin UI — create agent seeds type tools and extension plugins", ()
|
|
|
5602
5602
|
expect(res.headers.get("Location")).toBe(`/admin/agents/${AGENT_ID}`);
|
|
5603
5603
|
expect(seededTools).toEqual([...SPECIALIST_TYPE.tools]);
|
|
5604
5604
|
expect(seededTools).toContain("Bash");
|
|
5605
|
-
expect(seededPlugins).toEqual([]);
|
|
5605
|
+
expect(seededPlugins).toEqual(["agent-platform@app-vitals-agent"]);
|
|
5606
5606
|
});
|
|
5607
5607
|
|
|
5608
5608
|
it("POST /admin/agents with the configured default type (AGR-1.9) seeds the specialist floor and needs no product specialty", async () => {
|
|
@@ -5654,7 +5654,7 @@ describe("admin UI — create agent seeds type tools and extension plugins", ()
|
|
|
5654
5654
|
expect(res.status).toBe(302);
|
|
5655
5655
|
expect(res.headers.get("Location")).toBe(`/admin/agents/${AGENT_ID}`);
|
|
5656
5656
|
expect(seededTools).toEqual([...registry.getType("fixture").tools]);
|
|
5657
|
-
expect(seededPlugins).toEqual([]);
|
|
5657
|
+
expect(seededPlugins).toEqual(["agent-platform@app-vitals-agent"]);
|
|
5658
5658
|
});
|
|
5659
5659
|
|
|
5660
5660
|
it("an extension-contributed type (ETP-1.2) shows in the picker and POST /admin/agents accepts it", async () => {
|
|
@@ -201,7 +201,10 @@ describeOrSkip("createAgent() — integration (real Postgres)", () => {
|
|
|
201
201
|
const plugins = await prisma.agentPlugin.findMany({
|
|
202
202
|
where: { agentId: result.agent.id },
|
|
203
203
|
});
|
|
204
|
-
expect(plugins.map((p) => p.name)).toEqual([
|
|
204
|
+
expect(plugins.map((p) => p.name).sort()).toEqual([
|
|
205
|
+
"agent-platform@app-vitals-agent",
|
|
206
|
+
"shipwright",
|
|
207
|
+
]);
|
|
205
208
|
|
|
206
209
|
const members = await prisma.agentMember.findMany({
|
|
207
210
|
where: { agentId: result.agent.id },
|
package/src/agents.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { findRepoNameCollisions } from "@app-vitals/agent-lib/clone-plan";
|
|
10
|
+
import { resolveDefaultPlugins } from "@app-vitals/agent-lib/default-plugins";
|
|
10
11
|
import { DEFAULT_AGENT_ENV } from "@app-vitals/agent-lib/default-agent-env";
|
|
11
12
|
import { isGithubLogin } from "@app-vitals/agent-lib/github-login";
|
|
12
13
|
import { isOrgRepo } from "@app-vitals/agent-lib/org-repo";
|
|
@@ -983,7 +984,9 @@ export async function createAgent(
|
|
|
983
984
|
for (const pattern of extensionDefaults?.tools ?? type?.tools ?? []) {
|
|
984
985
|
await deps.agentToolService.add(agent.id, pattern, tx);
|
|
985
986
|
}
|
|
986
|
-
for (const pluginName of
|
|
987
|
+
for (const pluginName of resolveDefaultPlugins(
|
|
988
|
+
extensionDefaults?.plugins,
|
|
989
|
+
)) {
|
|
987
990
|
await deps.agentPluginService.add(
|
|
988
991
|
agent.id,
|
|
989
992
|
pluginName,
|
package/src/agents.unit.test.ts
CHANGED
|
@@ -1312,7 +1312,10 @@ describe("createAgent() specialtyDefaults hook", () => {
|
|
|
1312
1312
|
|
|
1313
1313
|
expect(result.ok).toBe(true);
|
|
1314
1314
|
expect(calls.toolsAdded.map((t) => t.pattern)).toEqual(["Grep"]);
|
|
1315
|
-
expect(calls.pluginsAdded.map((p) => p.name)).toEqual([
|
|
1315
|
+
expect(calls.pluginsAdded.map((p) => p.name)).toEqual([
|
|
1316
|
+
"agent-platform@app-vitals-agent",
|
|
1317
|
+
"ext-plugin",
|
|
1318
|
+
]);
|
|
1316
1319
|
});
|
|
1317
1320
|
|
|
1318
1321
|
it("falls back to the type's tools floor when the hook returns nothing", async () => {
|
|
@@ -1324,7 +1327,9 @@ describe("createAgent() specialtyDefaults hook", () => {
|
|
|
1324
1327
|
expect(calls.toolsAdded.map((t) => t.pattern)).toEqual([
|
|
1325
1328
|
...CODING_TYPE.tools,
|
|
1326
1329
|
]);
|
|
1327
|
-
expect(calls.pluginsAdded).toEqual([
|
|
1330
|
+
expect(calls.pluginsAdded.map((p) => p.name)).toEqual([
|
|
1331
|
+
"agent-platform@app-vitals-agent",
|
|
1332
|
+
]);
|
|
1328
1333
|
});
|
|
1329
1334
|
|
|
1330
1335
|
it("falls back per field when the hook omits tools or plugins", async () => {
|
|
@@ -1336,7 +1341,10 @@ describe("createAgent() specialtyDefaults hook", () => {
|
|
|
1336
1341
|
expect(calls.toolsAdded.map((t) => t.pattern)).toEqual([
|
|
1337
1342
|
...CODING_TYPE.tools,
|
|
1338
1343
|
]);
|
|
1339
|
-
expect(calls.pluginsAdded.map((p) => p.name)).toEqual([
|
|
1344
|
+
expect(calls.pluginsAdded.map((p) => p.name)).toEqual([
|
|
1345
|
+
"agent-platform@app-vitals-agent",
|
|
1346
|
+
"ext-plugin",
|
|
1347
|
+
]);
|
|
1340
1348
|
});
|
|
1341
1349
|
|
|
1342
1350
|
it("accepts a specialty known only to the hook", async () => {
|
|
@@ -1351,7 +1359,9 @@ describe("createAgent() specialtyDefaults hook", () => {
|
|
|
1351
1359
|
|
|
1352
1360
|
expect(result.ok).toBe(true);
|
|
1353
1361
|
expect(calls.toolsAdded.map((t) => t.pattern)).toEqual(["Read"]);
|
|
1354
|
-
expect(calls.pluginsAdded).toEqual([
|
|
1362
|
+
expect(calls.pluginsAdded.map((p) => p.name)).toEqual([
|
|
1363
|
+
"agent-platform@app-vitals-agent",
|
|
1364
|
+
]);
|
|
1355
1365
|
});
|
|
1356
1366
|
|
|
1357
1367
|
it("still rejects a specialty unknown to both hook and manifest", async () => {
|
|
@@ -1536,7 +1546,9 @@ describe("createAgent()", () => {
|
|
|
1536
1546
|
"Write",
|
|
1537
1547
|
"Bash",
|
|
1538
1548
|
]);
|
|
1539
|
-
expect(calls.pluginsAdded).toEqual([
|
|
1549
|
+
expect(calls.pluginsAdded.map((p) => p.name)).toEqual([
|
|
1550
|
+
"agent-platform@app-vitals-agent",
|
|
1551
|
+
]);
|
|
1540
1552
|
expect(calls.updateFieldsCalls).toEqual([
|
|
1541
1553
|
{ id: result.agent.id, fields: { repos: ["org/repo1", "org/repo2"] } },
|
|
1542
1554
|
{
|