agent-def 0.0.2-alpha.1 → 0.1.1

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/README.md CHANGED
@@ -1,4 +1,12 @@
1
- # agent-def
1
+ <p align="center">
2
+ <a href="https://artinet.io"><img src="https://img.shields.io/badge/website-artinet.io-black" alt="Website"></a>
3
+ <a href="https://www.npmjs.com/package/agent-def"><img src="https://img.shields.io/npm/v/agent-def?color=black" alt="Version"></a>
4
+ <a href="https://www.npmjs.com/package/agent-def"><img src="https://img.shields.io/npm/dt/agent-def?color=black" alt="Downloads"></a>
5
+ <a><img src="https://img.shields.io/badge/License-Apache_2.0-black.svg" alt="License"></a>
6
+ <a href="https://snyk.io/test/npm/agent-def"><img src="https://snyk.io/test/npm/agent-def/badge.svg" alt="Known Vulnerabilities"></a>
7
+ </p>
8
+
9
+ <h1 align="center"><em>agent-def</em></h1>
2
10
 
3
11
  A standardized, portable definition format for collaborative AI agents.
4
12
 
@@ -40,16 +40,16 @@ export type Group = z.output<typeof GroupSchema>;
40
40
  * id: backend-architect
41
41
  * name: Backend System Architect
42
42
  * description: Design RESTful APIs and microservice architectures
43
- * model: openai/gpt-4
43
+ * modelId: openai/gpt-4
44
44
  * version: "1.0.0"
45
- * toolIds:
46
- * - filesystem
47
- * - database-analyzer
45
+ * toolUris:
46
+ * - mcp:filesystem
47
+ * - mcp:database-analyzer
48
48
  * groupIds:
49
- * - team:backend
49
+ * - us:east:1:team:backend
50
50
  * - project:api-v2
51
- * agentIds:
52
- * - database-specialist
51
+ * agentUris:
52
+ * - agents:example:database-specialist
53
53
  * - security-auditor
54
54
  * instructions: |
55
55
  * You are a backend system architect specializing in scalable API design...
@@ -57,7 +57,7 @@ export type Group = z.output<typeof GroupSchema>;
57
57
  * ```
58
58
  */
59
59
  export declare const AgentDefinitionSchema: z.ZodObject<{
60
- uri: z.ZodString;
60
+ uri: z.ZodNonOptional<z.ZodOptional<z.ZodString>>;
61
61
  protocolVersion: z.ZodOptional<z.ZodDefault<z.ZodString>>;
62
62
  name: z.ZodString;
63
63
  description: z.ZodString;
@@ -97,8 +97,8 @@ export declare const AgentDefinitionSchema: z.ZodObject<{
97
97
  description: z.ZodOptional<z.ZodString>;
98
98
  type: z.ZodLiteral<"apiKey">;
99
99
  in: z.ZodEnum<{
100
- header: "header";
101
100
  query: "query";
101
+ header: "header";
102
102
  cookie: "cookie";
103
103
  }>;
104
104
  name: z.ZodString;
@@ -161,12 +161,10 @@ export declare const AgentDefinitionSchema: z.ZodObject<{
161
161
  signature: z.ZodString;
162
162
  header: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
163
163
  }, z.core.$strip>>>;
164
+ schemaVersion: z.ZodLiteral<"0.1.0">;
164
165
  id: z.ZodOptional<z.ZodString>;
165
166
  modelId: z.ZodOptional<z.ZodString>;
166
- modelUri: z.ZodOptional<z.ZodString>;
167
- toolIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
168
167
  toolUris: z.ZodOptional<z.ZodArray<z.ZodString>>;
169
- agentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
170
168
  agentUris: z.ZodOptional<z.ZodArray<z.ZodString>>;
171
169
  groupIds: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
172
170
  id: z.ZodString;
@@ -220,7 +218,7 @@ export type AgentDefinition = z.output<typeof AgentDefinitionSchema>;
220
218
  * ```
221
219
  */
222
220
  export declare const AgentConfigurationSchema: z.ZodObject<{
223
- uri: z.ZodString;
221
+ uri: z.ZodNonOptional<z.ZodOptional<z.ZodString>>;
224
222
  protocolVersion: z.ZodOptional<z.ZodDefault<z.ZodString>>;
225
223
  name: z.ZodString;
226
224
  description: z.ZodString;
@@ -260,8 +258,8 @@ export declare const AgentConfigurationSchema: z.ZodObject<{
260
258
  description: z.ZodOptional<z.ZodString>;
261
259
  type: z.ZodLiteral<"apiKey">;
262
260
  in: z.ZodEnum<{
263
- header: "header";
264
261
  query: "query";
262
+ header: "header";
265
263
  cookie: "cookie";
266
264
  }>;
267
265
  name: z.ZodString;
@@ -324,12 +322,10 @@ export declare const AgentConfigurationSchema: z.ZodObject<{
324
322
  signature: z.ZodString;
325
323
  header: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
326
324
  }, z.core.$strip>>>;
325
+ schemaVersion: z.ZodLiteral<"0.1.0">;
327
326
  id: z.ZodOptional<z.ZodString>;
328
327
  modelId: z.ZodOptional<z.ZodString>;
329
- modelUri: z.ZodOptional<z.ZodString>;
330
- toolIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
331
328
  toolUris: z.ZodOptional<z.ZodArray<z.ZodString>>;
332
- agentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
333
329
  agentUris: z.ZodOptional<z.ZodArray<z.ZodString>>;
334
330
  groupIds: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
335
331
  id: z.ZodString;
@@ -346,7 +342,7 @@ export declare const AgentConfigurationSchema: z.ZodObject<{
346
342
  type: z.ZodDefault<z.ZodLiteral<"a2a">>;
347
343
  info: z.ZodObject<{
348
344
  id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
349
- uri: z.ZodString;
345
+ uri: z.ZodOptional<z.ZodString>;
350
346
  protocolVersion: z.ZodDefault<z.ZodString>;
351
347
  name: z.ZodString;
352
348
  description: z.ZodString;
@@ -386,8 +382,8 @@ export declare const AgentConfigurationSchema: z.ZodObject<{
386
382
  description: z.ZodOptional<z.ZodString>;
387
383
  type: z.ZodLiteral<"apiKey">;
388
384
  in: z.ZodEnum<{
389
- header: "header";
390
385
  query: "query";
386
+ header: "header";
391
387
  cookie: "cookie";
392
388
  }>;
393
389
  name: z.ZodString;
@@ -461,7 +457,7 @@ export declare const AgentConfigurationSchema: z.ZodObject<{
461
457
  type: z.ZodDefault<z.ZodLiteral<"a2a">>;
462
458
  info: z.ZodObject<{
463
459
  id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
464
- uri: z.ZodString;
460
+ uri: z.ZodOptional<z.ZodString>;
465
461
  protocolVersion: z.ZodDefault<z.ZodString>;
466
462
  name: z.ZodString;
467
463
  description: z.ZodString;
@@ -501,8 +497,8 @@ export declare const AgentConfigurationSchema: z.ZodObject<{
501
497
  description: z.ZodOptional<z.ZodString>;
502
498
  type: z.ZodLiteral<"apiKey">;
503
499
  in: z.ZodEnum<{
504
- header: "header";
505
500
  query: "query";
501
+ header: "header";
506
502
  cookie: "cookie";
507
503
  }>;
508
504
  name: z.ZodString;
@@ -576,7 +572,7 @@ export declare const AgentConfigurationSchema: z.ZodObject<{
576
572
  type: z.ZodDefault<z.ZodLiteral<"mcp">>;
577
573
  info: z.ZodObject<{
578
574
  id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
579
- uri: z.ZodString;
575
+ uri: z.ZodOptional<z.ZodString>;
580
576
  implementation: z.ZodObject<{
581
577
  version: z.ZodString;
582
578
  websiteUrl: z.ZodOptional<z.ZodString>;
@@ -715,10 +711,10 @@ export declare const AgentConfigurationSchema: z.ZodObject<{
715
711
  command: z.ZodString;
716
712
  args: z.ZodArray<z.ZodString>;
717
713
  }, z.core.$strip>, z.ZodString, z.ZodUnknown]>>;
718
- info: z.ZodObject<{
714
+ info: z.ZodOptional<z.ZodObject<{
719
715
  id: z.ZodOptional<z.ZodOptional<z.ZodOptional<z.ZodString>>>;
720
- uri: z.ZodNonOptional<z.ZodOptional<z.ZodString>>;
721
- implementation: z.ZodNonOptional<z.ZodOptional<z.ZodObject<{
716
+ uri: z.ZodOptional<z.ZodOptional<z.ZodString>>;
717
+ implementation: z.ZodOptional<z.ZodObject<{
722
718
  version: z.ZodString;
723
719
  websiteUrl: z.ZodOptional<z.ZodString>;
724
720
  description: z.ZodOptional<z.ZodString>;
@@ -733,7 +729,7 @@ export declare const AgentConfigurationSchema: z.ZodObject<{
733
729
  }, z.core.$strip>>>;
734
730
  name: z.ZodString;
735
731
  title: z.ZodOptional<z.ZodString>;
736
- }, z.core.$strip>>>;
732
+ }, z.core.$strip>>;
737
733
  serverCapabilities: z.ZodOptional<z.ZodObject<{
738
734
  experimental: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodCustom<object, object>>>;
739
735
  logging: z.ZodOptional<z.ZodCustom<object, object>>;
@@ -843,7 +839,7 @@ export declare const AgentConfigurationSchema: z.ZodObject<{
843
839
  title: z.ZodOptional<z.ZodString>;
844
840
  }, z.core.$strip>>>;
845
841
  instructions: z.ZodOptional<z.ZodOptional<z.ZodString>>;
846
- }, z.core.$strip>;
842
+ }, z.core.$strip>>;
847
843
  }, z.core.$strip>]>]>>>;
848
844
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
849
845
  }, z.core.$strip>;
@@ -45,16 +45,16 @@ export const GroupSchema = z.object({
45
45
  * id: backend-architect
46
46
  * name: Backend System Architect
47
47
  * description: Design RESTful APIs and microservice architectures
48
- * model: openai/gpt-4
48
+ * modelId: openai/gpt-4
49
49
  * version: "1.0.0"
50
- * toolIds:
51
- * - filesystem
52
- * - database-analyzer
50
+ * toolUris:
51
+ * - mcp:filesystem
52
+ * - mcp:database-analyzer
53
53
  * groupIds:
54
- * - team:backend
54
+ * - us:east:1:team:backend
55
55
  * - project:api-v2
56
- * agentIds:
57
- * - database-specialist
56
+ * agentUris:
57
+ * - agents:example:database-specialist
58
58
  * - security-auditor
59
59
  * instructions: |
60
60
  * You are a backend system architect specializing in scalable API design...
@@ -67,7 +67,14 @@ export const AgentDefinitionSchema = Runtime.AgentInfoSchema.partial({
67
67
  capabilities: true,
68
68
  defaultInputModes: true,
69
69
  defaultOutputModes: true,
70
- }).extend({
70
+ })
71
+ .required({
72
+ uri: true,
73
+ })
74
+ .extend({
75
+ schemaVersion: z
76
+ .literal("0.1.0")
77
+ .describe("The schema version of the agent definition"),
71
78
  /**
72
79
  * Optional agent ID - will be generated if not provided
73
80
  *
@@ -84,31 +91,6 @@ export const AgentDefinitionSchema = Runtime.AgentInfoSchema.partial({
84
91
  * @example "deepseek-ai/DeepSeek-R1"
85
92
  */
86
93
  modelId: z.string().optional().describe("Model identifier"),
87
- /**
88
- * Optional model specification
89
- *
90
- * Specifies the LLM model to use for this agent.
91
- *
92
- * @example "openai/gpt-4o-mini"
93
- * @example "anthropic/claude-3-opus-20241022"
94
- * @example "deepseek-ai/DeepSeek-R1"
95
- */
96
- modelUri: z.string().optional().describe(`"Model URI"`),
97
- /**
98
- * Tool IDs that this agent can use
99
- *
100
- * A flexible list of tool identifiers that reference MCP servers, in-memory
101
- * functions, or any other tool providers available in the runtime environment.
102
- * Tools are resolved by the agent runtime based on these IDs.
103
- *
104
- * @example ["filesystem", "web-search", "code-analyzer"]
105
- * @example ["mcp-server-git", "mcp-server-postgres", "custom-api-client"]
106
- * @deprecated use toolUris instead
107
- */
108
- toolIds: z
109
- .array(z.string())
110
- .optional()
111
- .describe("List of tool ids that this agent can use"),
112
94
  /**
113
95
  * Tool IDs that this agent can use
114
96
  *
@@ -123,22 +105,6 @@ export const AgentDefinitionSchema = Runtime.AgentInfoSchema.partial({
123
105
  .array(z.string())
124
106
  .optional()
125
107
  .describe("List of tool ids that this agent can use"),
126
- /**
127
- * Agent IDs that this agent can call
128
- *
129
- * Explicitly defines which other agents this agent has permission to invoke.
130
- * These could be local agent instances, remote agent servers, or any agent
131
- * accessible in the runtime environment. This provides explicit access control
132
- * separate from group membership.
133
- *
134
- * @example ["database-specialist", "security-auditor", "code-reviewer"]
135
- * @example ["agent://team-lead", "https://agents.example.com/research"]
136
- * @deprecated use agentUris instead
137
- */
138
- agentIds: z
139
- .array(z.string())
140
- .optional()
141
- .describe("The agent ids that this agent can call"),
142
108
  /**
143
109
  * Agent IDs that this agent can call
144
110
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-def",
3
- "version": "0.0.2-alpha.1",
3
+ "version": "0.1.1",
4
4
  "description": "A standardized definition for collaborative agents.",
5
5
  "main": "dist/src/definition.js",
6
6
  "module": "dist/src/definition.js",
@@ -18,7 +18,7 @@
18
18
  "generate:schema": "tsx ./scripts/generate-schema.ts",
19
19
  "lint": "eslint .",
20
20
  "clean": "rimraf dist",
21
- "prepublishOnly": "npm run build"
21
+ "prepublishOnly": "npm run clean && npm i && npm run generate:schema && npm run build"
22
22
  },
23
23
  "keywords": [
24
24
  "artinet",
@@ -32,12 +32,12 @@
32
32
  "license": "Apache-2.0",
33
33
  "repository": {
34
34
  "type": "git",
35
- "url": "git+https://github.com/the-artinet-project/agent-def.git"
35
+ "url": "git+https://github.com/the-artinet-project/artinet.git"
36
36
  },
37
37
  "bugs": {
38
- "url": "https://github.com/the-artinet-project/agent-def/issues"
38
+ "url": "https://github.com/the-artinet-project/artinet/issues"
39
39
  },
40
- "homepage": "https://github.com/the-artinet-project/agent-def#readme",
40
+ "homepage": "https://artinet.io",
41
41
  "files": [
42
42
  "./dist/**/*",
43
43
  "./package.json",
@@ -61,8 +61,8 @@
61
61
  "zod-to-json-schema": "^3.25.0"
62
62
  },
63
63
  "dependencies": {
64
- "@artinet/sdk": "^0.6.0-preview.2",
65
- "@artinet/types": "^0.0.9-alpha.4",
64
+ "@artinet/sdk": "^0.6.0",
65
+ "@artinet/types": "^0.0.9",
66
66
  "zod": "^3.25"
67
67
  }
68
68
  }