@a1st/aix-schema 0.0.12 → 0.2.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../src/lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,eAAe,IAAI,CAAC;AAUjC,eAAO,MAAM,uBAAuB,6EAQlC,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;EAOjB,CAAC;AAEb,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYnB,CAAC;AAEb,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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G,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
package/dist/lock.js ADDED
@@ -0,0 +1,68 @@
1
+ import { z } from 'zod';
2
+ export const lockfileVersion = 1;
3
+ const sha256DigestSchema = z
4
+ .string()
5
+ .regex(/^sha256:[a-f0-9]{64}$/, 'Expected sha256:<64 lowercase hex characters>');
6
+ const sha512IntegritySchema = z
7
+ .string()
8
+ .regex(/^sha512-[A-Za-z0-9+/]+={0,2}$/, 'Expected a SHA-512 Subresource Integrity string');
9
+ export const lockEntitySectionSchema = z.enum([
10
+ 'skills',
11
+ 'rules',
12
+ 'prompts',
13
+ 'mcp',
14
+ 'hooks',
15
+ 'editors',
16
+ 'aix',
17
+ ]);
18
+ export const lockedFileSchema = z
19
+ .object({
20
+ path: z.string().min(1),
21
+ digest: sha256DigestSchema,
22
+ integrity: sha512IntegritySchema,
23
+ size: z.number().int().nonnegative(),
24
+ })
25
+ .strict();
26
+ export const lockedEntitySchema = z
27
+ .object({
28
+ name: z.string().min(1),
29
+ section: lockEntitySectionSchema,
30
+ digest: sha256DigestSchema,
31
+ integrity: sha512IntegritySchema,
32
+ size: z.number().int().nonnegative(),
33
+ source: z.unknown().optional(),
34
+ resolved: z.record(z.unknown()).optional(),
35
+ metadataDigest: sha256DigestSchema.optional(),
36
+ files: z.array(lockedFileSchema).optional(),
37
+ })
38
+ .strict();
39
+ export const lockedEntitiesSchema = z
40
+ .object({
41
+ skills: z.record(lockedEntitySchema).default({}),
42
+ rules: z.record(lockedEntitySchema).default({}),
43
+ prompts: z.record(lockedEntitySchema).default({}),
44
+ mcp: z.record(lockedEntitySchema).default({}),
45
+ hooks: z.record(lockedEntitySchema).default({}),
46
+ editors: z.record(lockedEntitySchema).default({}),
47
+ aix: z.record(lockedEntitySchema).default({}),
48
+ })
49
+ .strict();
50
+ export const lockedConfigSchema = z
51
+ .object({
52
+ path: z.string().min(1),
53
+ digest: sha256DigestSchema,
54
+ integrity: sha512IntegritySchema,
55
+ size: z.number().int().nonnegative(),
56
+ })
57
+ .strict();
58
+ export const aiLockFileSchema = z
59
+ .object({
60
+ $schema: z.string().url().optional(),
61
+ lockfileVersion: z.literal(lockfileVersion),
62
+ generatedBy: z.string().min(1),
63
+ generatedAt: z.string().datetime({ offset: true }).optional(),
64
+ config: lockedConfigSchema,
65
+ entities: lockedEntitiesSchema,
66
+ })
67
+ .strict();
68
+ //# sourceMappingURL=lock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lock.js","sourceRoot":"","sources":["../src/lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC;AAEjC,MAAM,kBAAkB,GAAG,CAAC;KACxB,MAAM,EAAE;KACR,KAAK,CAAC,uBAAuB,EAAE,+CAA+C,CAAC,CAAC;AAEpF,MAAM,qBAAqB,GAAG,CAAC;KAC3B,MAAM,EAAE;KACR,KAAK,CAAC,+BAA+B,EAAE,iDAAiD,CAAC,CAAC;AAE9F,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC3C,QAAQ;IACR,OAAO;IACP,SAAS;IACT,KAAK;IACL,OAAO;IACP,SAAS;IACT,KAAK;CACP,CAAC,CAAC;AAEH,MAAM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
13
  }, "strip", z.ZodTypeAny, {
14
14
  description?: string | undefined;
15
15
  name?: string | undefined;
16
- license?: string | undefined;
17
16
  compatibility?: string | undefined;
17
+ license?: string | undefined;
18
18
  metadata?: Record<string, string> | undefined;
19
19
  'allowed-tools'?: string | undefined;
20
20
  }, {
21
21
  description?: string | undefined;
22
22
  name?: string | undefined;
23
- license?: string | undefined;
24
23
  compatibility?: string | undefined;
24
+ license?: string | undefined;
25
25
  metadata?: Record<string, string> | undefined;
26
26
  'allowed-tools'?: string | undefined;
27
27
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a1st/aix-schema",
3
- "version": "0.0.12",
3
+ "version": "0.2.0",
4
4
  "description": "JSON Schema and validation for aix configuration",
5
5
  "keywords": [
6
6
  "ai-config",
package/schema.json CHANGED
@@ -29,6 +29,11 @@
29
29
  ],
30
30
  "description": "Extend from other ai.json configs"
31
31
  },
32
+ "scope": {
33
+ "type": "string",
34
+ "enum": ["project", "user"],
35
+ "description": "Config scope: \"project\" (default) or \"user\""
36
+ },
32
37
  "skills": {
33
38
  "type": "object",
34
39
  "additionalProperties": {
@@ -639,7 +644,9 @@
639
644
  "claude-code",
640
645
  "copilot",
641
646
  "zed",
642
- "neovim"
647
+ "neovim",
648
+ "gemini",
649
+ "opencode"
643
650
  ],
644
651
  "description": "Supported editor/agent"
645
652
  },
@@ -1104,6 +1111,227 @@
1104
1111
  }
1105
1112
  },
1106
1113
  "additionalProperties": false
1114
+ },
1115
+ "gemini": {
1116
+ "type": "object",
1117
+ "properties": {
1118
+ "enabled": {
1119
+ "type": "boolean",
1120
+ "default": true,
1121
+ "description": "Whether to configure this editor"
1122
+ },
1123
+ "rules": {
1124
+ "type": "object",
1125
+ "additionalProperties": {
1126
+ "anyOf": [
1127
+ {
1128
+ "anyOf": [
1129
+ {
1130
+ "type": "string",
1131
+ "description": "Source reference: local path (./, ../, /, file:), git URL (https://), or git shorthand (github:)"
1132
+ },
1133
+ {
1134
+ "type": "object",
1135
+ "properties": {
1136
+ "description": {
1137
+ "type": "string",
1138
+ "description": "When the rule should apply (required for auto mode)"
1139
+ },
1140
+ "activation": {
1141
+ "type": "string",
1142
+ "enum": ["always", "auto", "glob", "manual"],
1143
+ "default": "always",
1144
+ "description": "When the rule should be activated"
1145
+ },
1146
+ "globs": {
1147
+ "type": "array",
1148
+ "items": {
1149
+ "type": "string"
1150
+ },
1151
+ "description": "File patterns (required for glob mode)"
1152
+ },
1153
+ "content": {
1154
+ "type": "string",
1155
+ "description": "Inline rule content"
1156
+ },
1157
+ "path": {
1158
+ "type": "string",
1159
+ "description": "Local file path to rule content"
1160
+ },
1161
+ "git": {
1162
+ "type": "object",
1163
+ "properties": {
1164
+ "url": {
1165
+ "type": "string",
1166
+ "description": "Git repository URL or shorthand (e.g., github:user/repo)"
1167
+ },
1168
+ "path": {
1169
+ "type": "string",
1170
+ "description": "Path to rule file within repo (default: root)"
1171
+ },
1172
+ "ref": {
1173
+ "type": "string",
1174
+ "description": "Branch, tag, or commit (default: main/master)"
1175
+ }
1176
+ },
1177
+ "required": ["url"],
1178
+ "additionalProperties": false,
1179
+ "description": "Git repository source"
1180
+ },
1181
+ "npm": {
1182
+ "type": "object",
1183
+ "properties": {
1184
+ "npm": {
1185
+ "type": "string",
1186
+ "description": "NPM package name (e.g., \"@company/rules\")"
1187
+ },
1188
+ "path": {
1189
+ "type": "string",
1190
+ "description": "Path to file within package (e.g., \"rules/style.md\")"
1191
+ },
1192
+ "version": {
1193
+ "type": "string",
1194
+ "description": "Version to auto-install (omit to use project node_modules)"
1195
+ }
1196
+ },
1197
+ "required": ["npm", "path"],
1198
+ "additionalProperties": false,
1199
+ "description": "NPM package source"
1200
+ }
1201
+ },
1202
+ "additionalProperties": false,
1203
+ "description": "Rule with metadata and content source"
1204
+ }
1205
+ ]
1206
+ },
1207
+ {
1208
+ "type": "boolean",
1209
+ "const": false
1210
+ }
1211
+ ]
1212
+ },
1213
+ "propertyNames": {
1214
+ "minLength": 1,
1215
+ "maxLength": 64,
1216
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
1217
+ },
1218
+ "description": "Editor-specific rules (in addition to global rules)"
1219
+ },
1220
+ "geminiSettings": {
1221
+ "type": "object",
1222
+ "additionalProperties": {},
1223
+ "description": "Gemini CLI settings"
1224
+ }
1225
+ },
1226
+ "additionalProperties": false
1227
+ },
1228
+ "opencode": {
1229
+ "type": "object",
1230
+ "properties": {
1231
+ "enabled": {
1232
+ "type": "boolean",
1233
+ "default": true,
1234
+ "description": "Whether to configure this editor"
1235
+ },
1236
+ "rules": {
1237
+ "type": "object",
1238
+ "additionalProperties": {
1239
+ "anyOf": [
1240
+ {
1241
+ "anyOf": [
1242
+ {
1243
+ "type": "string",
1244
+ "description": "Source reference: local path (./, ../, /, file:), git URL (https://), or git shorthand (github:)"
1245
+ },
1246
+ {
1247
+ "type": "object",
1248
+ "properties": {
1249
+ "description": {
1250
+ "type": "string",
1251
+ "description": "When the rule should apply (required for auto mode)"
1252
+ },
1253
+ "activation": {
1254
+ "type": "string",
1255
+ "enum": ["always", "auto", "glob", "manual"],
1256
+ "default": "always",
1257
+ "description": "When the rule should be activated"
1258
+ },
1259
+ "globs": {
1260
+ "type": "array",
1261
+ "items": {
1262
+ "type": "string"
1263
+ },
1264
+ "description": "File patterns (required for glob mode)"
1265
+ },
1266
+ "content": {
1267
+ "type": "string",
1268
+ "description": "Inline rule content"
1269
+ },
1270
+ "path": {
1271
+ "type": "string",
1272
+ "description": "Local file path to rule content"
1273
+ },
1274
+ "git": {
1275
+ "type": "object",
1276
+ "properties": {
1277
+ "url": {
1278
+ "type": "string",
1279
+ "description": "Git repository URL or shorthand (e.g., github:user/repo)"
1280
+ },
1281
+ "path": {
1282
+ "type": "string",
1283
+ "description": "Path to rule file within repo (default: root)"
1284
+ },
1285
+ "ref": {
1286
+ "type": "string",
1287
+ "description": "Branch, tag, or commit (default: main/master)"
1288
+ }
1289
+ },
1290
+ "required": ["url"],
1291
+ "additionalProperties": false,
1292
+ "description": "Git repository source"
1293
+ },
1294
+ "npm": {
1295
+ "type": "object",
1296
+ "properties": {
1297
+ "npm": {
1298
+ "type": "string",
1299
+ "description": "NPM package name (e.g., \"@company/rules\")"
1300
+ },
1301
+ "path": {
1302
+ "type": "string",
1303
+ "description": "Path to file within package (e.g., \"rules/style.md\")"
1304
+ },
1305
+ "version": {
1306
+ "type": "string",
1307
+ "description": "Version to auto-install (omit to use project node_modules)"
1308
+ }
1309
+ },
1310
+ "required": ["npm", "path"],
1311
+ "additionalProperties": false,
1312
+ "description": "NPM package source"
1313
+ }
1314
+ },
1315
+ "additionalProperties": false,
1316
+ "description": "Rule with metadata and content source"
1317
+ }
1318
+ ]
1319
+ },
1320
+ {
1321
+ "type": "boolean",
1322
+ "const": false
1323
+ }
1324
+ ]
1325
+ },
1326
+ "propertyNames": {
1327
+ "minLength": 1,
1328
+ "maxLength": 64,
1329
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
1330
+ },
1331
+ "description": "Editor-specific rules (in addition to global rules)"
1332
+ }
1333
+ },
1334
+ "additionalProperties": false
1107
1335
  }
1108
1336
  },
1109
1337
  "additionalProperties": {
@@ -1227,32 +1455,150 @@
1227
1455
  "properties": {
1228
1456
  "matcher": {
1229
1457
  "type": "string",
1230
- "description": "Pattern to match (regex supported, editor-specific)"
1458
+ "description": "Pattern to match (regex or pipe-separated literal, editor-specific)."
1459
+ },
1460
+ "sequential": {
1461
+ "type": "boolean",
1462
+ "description": "Run hooks in this group sequentially instead of in parallel (Gemini)."
1463
+ },
1464
+ "description": {
1465
+ "type": "string",
1466
+ "description": "Free-form description for the group."
1231
1467
  },
1232
1468
  "hooks": {
1233
1469
  "type": "array",
1234
1470
  "items": {
1235
1471
  "type": "object",
1236
1472
  "properties": {
1473
+ "type": {
1474
+ "type": "string",
1475
+ "enum": ["command", "http", "mcp_tool", "prompt", "agent"],
1476
+ "description": "Action handler kind (default: \"command\")."
1477
+ },
1237
1478
  "command": {
1238
1479
  "type": "string",
1239
- "description": "Shell command to execute"
1480
+ "description": "Shell command to execute."
1481
+ },
1482
+ "bash": {
1483
+ "type": "string",
1484
+ "description": "Bash command (macOS / Linux)."
1485
+ },
1486
+ "powershell": {
1487
+ "type": "string",
1488
+ "description": "PowerShell command (Windows)."
1489
+ },
1490
+ "shell": {
1491
+ "type": "string",
1492
+ "enum": ["bash", "powershell"],
1493
+ "description": "Shell selector when only one of `command` / `bash` / `powershell` is set."
1240
1494
  },
1241
1495
  "timeout": {
1242
1496
  "type": "number",
1243
1497
  "exclusiveMinimum": 0,
1244
- "description": "Timeout in seconds"
1498
+ "description": "Timeout in seconds. Adapters convert to native units (e.g. milliseconds)."
1245
1499
  },
1246
1500
  "show_output": {
1247
1501
  "type": "boolean",
1248
- "description": "Whether to show command output in UI"
1502
+ "description": "Whether to surface command output in the editor UI (Windsurf-specific)."
1249
1503
  },
1250
1504
  "working_directory": {
1251
1505
  "type": "string",
1252
- "description": "Working directory for the command"
1506
+ "description": "Working directory for the command. Interchangeable with `cwd`; the strategy decides which native key to emit (Windsurf uses `working_directory`; Copilot, Gemini, and Claude Code use `cwd`)."
1507
+ },
1508
+ "cwd": {
1509
+ "type": "string",
1510
+ "description": "Working directory for the command. Interchangeable with `working_directory`."
1511
+ },
1512
+ "env": {
1513
+ "type": "object",
1514
+ "additionalProperties": {
1515
+ "type": "string"
1516
+ },
1517
+ "description": "Environment variables to set when running the command."
1518
+ },
1519
+ "async": {
1520
+ "type": "boolean",
1521
+ "description": "Run the command in the background without blocking the agent."
1522
+ },
1523
+ "async_rewake": {
1524
+ "type": "boolean",
1525
+ "description": "Run async; on exit code 2, wake the agent with stderr/stdout context."
1526
+ },
1527
+ "if": {
1528
+ "type": "string",
1529
+ "description": "Permission-rule expression (Claude Code) gating execution."
1530
+ },
1531
+ "status_message": {
1532
+ "type": "string",
1533
+ "description": "Custom spinner message while the hook runs (Claude Code)."
1534
+ },
1535
+ "once": {
1536
+ "type": "boolean",
1537
+ "description": "Run once per session, then unregister (Claude Code skill / agent frontmatter)."
1538
+ },
1539
+ "url": {
1540
+ "type": "string",
1541
+ "description": "URL to POST hook input to (Claude Code HTTP)."
1542
+ },
1543
+ "headers": {
1544
+ "type": "object",
1545
+ "additionalProperties": {
1546
+ "type": "string"
1547
+ },
1548
+ "description": "Additional HTTP headers, with env-var interpolation (Claude Code HTTP)."
1549
+ },
1550
+ "allowed_env_vars": {
1551
+ "type": "array",
1552
+ "items": {
1553
+ "type": "string"
1554
+ },
1555
+ "description": "Env-var allowlist for header interpolation (Claude Code HTTP)."
1556
+ },
1557
+ "mcp_server": {
1558
+ "type": "string",
1559
+ "description": "Configured MCP server name (Claude Code mcp_tool)."
1560
+ },
1561
+ "mcp_tool": {
1562
+ "type": "string",
1563
+ "description": "Tool name on the MCP server (Claude Code mcp_tool)."
1564
+ },
1565
+ "mcp_input": {
1566
+ "type": "object",
1567
+ "additionalProperties": {},
1568
+ "description": "Arguments for the MCP tool, with `${tool_input.x}` substitution (Claude Code)."
1569
+ },
1570
+ "prompt": {
1571
+ "type": "string",
1572
+ "description": "Prompt text (Claude Code, Cursor, Copilot)."
1573
+ },
1574
+ "model": {
1575
+ "type": "string",
1576
+ "description": "Model override for prompt / agent hooks."
1577
+ },
1578
+ "description": {
1579
+ "type": "string",
1580
+ "description": "Free-form description for logs / UI."
1581
+ },
1582
+ "name": {
1583
+ "type": "string",
1584
+ "description": "Friendly identifier for logs and CLI commands."
1585
+ },
1586
+ "fail_closed": {
1587
+ "type": "boolean",
1588
+ "description": "Block the action when the hook itself fails (Cursor)."
1589
+ },
1590
+ "loop_limit": {
1591
+ "anyOf": [
1592
+ {
1593
+ "type": "integer"
1594
+ },
1595
+ {
1596
+ "type": "null"
1597
+ }
1598
+ ],
1599
+ "description": "Max auto-triggered follow-ups for stop-style events (Cursor)."
1253
1600
  }
1254
1601
  },
1255
- "required": ["command"],
1256
1602
  "additionalProperties": false,
1257
1603
  "description": "Hook action configuration"
1258
1604
  },
@@ -1266,8 +1612,18 @@
1266
1612
  },
1267
1613
  "propertyNames": {
1268
1614
  "enum": [
1615
+ "session_start",
1616
+ "session_end",
1617
+ "setup",
1618
+ "pre_prompt",
1619
+ "user_prompt_expansion",
1269
1620
  "pre_tool_use",
1270
1621
  "post_tool_use",
1622
+ "post_tool_use_failure",
1623
+ "post_tool_batch",
1624
+ "pre_tool_selection",
1625
+ "permission_request",
1626
+ "permission_denied",
1271
1627
  "pre_file_read",
1272
1628
  "post_file_read",
1273
1629
  "pre_file_write",
@@ -1276,10 +1632,33 @@
1276
1632
  "post_command",
1277
1633
  "pre_mcp_tool",
1278
1634
  "post_mcp_tool",
1279
- "pre_prompt",
1280
- "session_start",
1281
- "session_end",
1282
- "agent_stop"
1635
+ "pre_tab_file_read",
1636
+ "post_tab_file_edit",
1637
+ "pre_model_request",
1638
+ "post_model_response",
1639
+ "pre_response_chunk",
1640
+ "pre_agent",
1641
+ "post_agent",
1642
+ "post_response",
1643
+ "post_response_with_transcript",
1644
+ "agent_stop",
1645
+ "subagent_start",
1646
+ "subagent_stop",
1647
+ "subagent_idle",
1648
+ "pre_compact",
1649
+ "post_compact",
1650
+ "task_created",
1651
+ "task_completed",
1652
+ "worktree_setup",
1653
+ "worktree_remove",
1654
+ "instructions_loaded",
1655
+ "config_change",
1656
+ "cwd_changed",
1657
+ "file_changed",
1658
+ "notification",
1659
+ "elicitation",
1660
+ "elicitation_result",
1661
+ "error_occurred"
1283
1662
  ]
1284
1663
  },
1285
1664
  "description": "Lifecycle hooks for AI agent events"