@a1st/aix-schema 0.2.0 → 0.3.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/dist/agents.d.ts +1355 -0
- package/dist/agents.d.ts.map +1 -0
- package/dist/agents.js +53 -0
- package/dist/agents.js.map +1 -0
- package/dist/config.d.ts +3682 -2530
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +3 -0
- package/dist/config.js.map +1 -1
- package/dist/editor-support.d.ts +20 -2
- package/dist/editor-support.d.ts.map +1 -1
- package/dist/editor-support.js +36 -6
- package/dist/editor-support.js.map +1 -1
- package/dist/editors.d.ts +670 -670
- package/dist/factory.d.ts.map +1 -1
- package/dist/factory.js +1 -0
- package/dist/factory.js.map +1 -1
- package/dist/hooks.d.ts +30 -30
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lock.d.ts +308 -100
- package/dist/lock.d.ts.map +1 -1
- package/dist/lock.js +2 -0
- package/dist/lock.js.map +1 -1
- package/dist/prompts.d.ts +42 -42
- package/dist/rules.d.ts +57 -57
- package/package.json +1 -1
- package/schema.json +378 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,eAAe,kDAGoD,CAAC;AAEjF,eAAO,MAAM,0BAA0B,qCAEkB,CAAC;AAE1D,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAE+D,CAAC;AAElG,eAAO,MAAM,0BAA0B,yJAE2C,CAAC;AAEnF,e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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAEoD,CAAC;AAE9E,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
package/dist/agents.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { gitSourceSchema, npmSourceSchema } from './rules.js';
|
|
3
|
+
import { editorEnum } from './editors.js';
|
|
4
|
+
import { mcpServerConfigSchema } from './mcp.js';
|
|
5
|
+
export const agentModeSchema = z
|
|
6
|
+
.enum(['primary', 'subagent'])
|
|
7
|
+
.default('subagent')
|
|
8
|
+
.describe('Whether the agent is a primary assistant or a delegated subagent');
|
|
9
|
+
export const agentPermissionValueSchema = z
|
|
10
|
+
.enum(['allow', 'ask', 'deny'])
|
|
11
|
+
.describe('Permission policy for an agent capability');
|
|
12
|
+
export const agentMcpServersSchema = z
|
|
13
|
+
.record(z.string(), mcpServerConfigSchema)
|
|
14
|
+
.describe('MCP servers available to this agent when the target editor supports per-agent MCP');
|
|
15
|
+
export const agentEditorExtensionSchema = z
|
|
16
|
+
.record(editorEnum, z.record(z.unknown()))
|
|
17
|
+
.describe('Editor-specific agent fields that aix preserves for round-tripping');
|
|
18
|
+
export const agentObjectSchema = z
|
|
19
|
+
.object({
|
|
20
|
+
description: z.string().optional().describe('When this agent should be used'),
|
|
21
|
+
mode: agentModeSchema.optional(),
|
|
22
|
+
model: z.string().optional().describe('Model alias or model ID for this agent'),
|
|
23
|
+
tools: z.array(z.string()).optional().describe('Tool names or tool IDs available to this agent'),
|
|
24
|
+
permissions: z
|
|
25
|
+
.record(agentPermissionValueSchema)
|
|
26
|
+
.optional()
|
|
27
|
+
.describe('Portable capability permissions such as edit, bash, web, or write'),
|
|
28
|
+
mcp: agentMcpServersSchema.optional(),
|
|
29
|
+
content: z.string().optional().describe('Inline agent system prompt'),
|
|
30
|
+
path: z.string().optional().describe('Local file path to agent prompt content'),
|
|
31
|
+
git: gitSourceSchema.optional().describe('Git repository source'),
|
|
32
|
+
npm: npmSourceSchema.optional().describe('NPM package source'),
|
|
33
|
+
editor: agentEditorExtensionSchema.optional(),
|
|
34
|
+
})
|
|
35
|
+
.refine((data) => {
|
|
36
|
+
const sources = [data.content, data.path, data.git, data.npm].filter(Boolean);
|
|
37
|
+
return sources.length === 1;
|
|
38
|
+
}, { message: 'Exactly one content source required: content, path, git, or npm' })
|
|
39
|
+
.describe('Agent or subagent definition');
|
|
40
|
+
const agentStringSchema = z
|
|
41
|
+
.string()
|
|
42
|
+
.describe('Source reference: local path (./, ../, /, file:), git URL (https://), or git shorthand (github:)');
|
|
43
|
+
export const agentValueSchema = z.union([agentStringSchema, agentObjectSchema]);
|
|
44
|
+
export const agentNameSchema = z
|
|
45
|
+
.string()
|
|
46
|
+
.min(1)
|
|
47
|
+
.max(64)
|
|
48
|
+
.regex(/^[a-z0-9]+(-[a-z0-9]+)*$/, 'Agent name must be lowercase alphanumeric with single hyphens (e.g., "code-reviewer")')
|
|
49
|
+
.describe('Agent name (used as key)');
|
|
50
|
+
export const agentsSchema = z
|
|
51
|
+
.record(agentNameSchema, z.union([agentValueSchema, z.literal(false)]))
|
|
52
|
+
.describe('Map of agent names to their definitions (or false to disable)');
|
|
53
|
+
//# sourceMappingURL=agents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEjD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC;KAC5B,IAAI,CAAC,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;KAC7B,OAAO,CAAC,UAAU,CAAC;KACnB,QAAQ,CAAC,kEAAkE,CAAC,CAAC;AAEjF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC;KACvC,IAAI,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;KAC9B,QAAQ,CAAC,2CAA2C,CAAC,CAAC;AAE1D,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC;KAClC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,qBAAqB,CAAC;KACzC,QAAQ,CAAC,mFAAmF,CAAC,CAAC;AAElG,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC;KACvC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KACzC,QAAQ,CAAC,oEAAoE,CAAC,CAAC;AAEnF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC;KAC9B,MAAM,CAA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