@kuznai/inception-engine 0.25.1 → 1.0.2

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.
Files changed (34) hide show
  1. package/README.md +68 -4
  2. package/dist/src/core/adapters/agent-definitions.d.ts +2 -1
  3. package/dist/src/core/adapters/agent-definitions.js +14 -5
  4. package/dist/src/core/adapters/execution-config.js +2 -4
  5. package/dist/src/core/adapters/index.d.ts +2 -1
  6. package/dist/src/core/adapters/index.js +3 -3
  7. package/dist/src/core/adapters/rules.d.ts +2 -1
  8. package/dist/src/core/adapters/rules.js +12 -5
  9. package/dist/src/core/concurrency.d.ts +5 -0
  10. package/dist/src/core/concurrency.js +19 -0
  11. package/dist/src/core/deploy.js +158 -100
  12. package/dist/src/core/init.d.ts +1 -0
  13. package/dist/src/core/init.js +79 -28
  14. package/dist/src/core/preflight.js +6 -4
  15. package/dist/src/core/revert.js +2 -4
  16. package/dist/src/core/validation.d.ts +31 -3
  17. package/dist/src/core/validation.js +64 -10
  18. package/dist/src/formatters.js +14 -11
  19. package/dist/src/schemas/manifest.d.ts +64 -64
  20. package/dist/src/schemas/manifest.js +1 -1
  21. package/dist/src/schemas/registry.d.ts +27 -27
  22. package/dist/src/types.d.ts +1 -1
  23. package/dist/test/unit/adapters.test.js +84 -83
  24. package/dist/test/unit/cli.test.js +57 -1
  25. package/dist/test/unit/deploy.test.js +253 -0
  26. package/dist/test/unit/formatters.test.js +4 -3
  27. package/dist/test/unit/gemini-north-star.test.js +9 -8
  28. package/dist/test/unit/init.test.d.ts +1 -0
  29. package/dist/test/unit/init.test.js +14 -0
  30. package/dist/test/unit/manifest.test.js +25 -0
  31. package/dist/test/unit/preflight.test.js +29 -0
  32. package/dist/test/unit/validation.test.d.ts +1 -0
  33. package/dist/test/unit/validation.test.js +102 -0
  34. package/package.json +7 -7
@@ -449,8 +449,7 @@ async function revertConfigPatch(action, dryRun, verbose, home, planned, deps) {
449
449
  return result;
450
450
  }
451
451
  const entry = await lookupDeployment(home, action.target, deps.registry);
452
- if (!entry ||
453
- entry.kind !== "config-patch" ||
452
+ if (entry?.kind !== "config-patch" ||
454
453
  entry.skill !== action.skill ||
455
454
  entry.agent !== action.agent) {
456
455
  logger.warn(label, `skipping: ${action.target} is not in the deployment registry — not managed by inception-engine`);
@@ -507,8 +506,7 @@ async function revertTomlPatch(action, dryRun, verbose, home, planned, deps) {
507
506
  return result;
508
507
  }
509
508
  const entry = await lookupDeployment(home, action.target, deps.registry);
510
- if (!entry ||
511
- entry.kind !== "config-patch" ||
509
+ if (entry?.kind !== "config-patch" ||
512
510
  entry.skill !== action.skill ||
513
511
  entry.agent !== action.agent) {
514
512
  logger.warn(label, `skipping: ${action.target} is not in the deployment registry — not managed by inception-engine`);
@@ -1,6 +1,18 @@
1
1
  import type { AgentId } from "../schemas/manifest.ts";
2
2
  export declare function sourceAccessError(err: unknown, sourcePath: string): string;
3
3
  export declare function validateSourcePath(source: string, skillPath: string, resolvedSourceDir: string, realRoot: string): Promise<void>;
4
+ export type SourcePathValidator = (source: string, manifestPath: string, resolvedSourceDir: string) => Promise<void>;
5
+ /**
6
+ * Returns a memoizing source-path validator bound to a single `realRoot`.
7
+ *
8
+ * The cheap out-of-root string gate still runs on every call so per-entry
9
+ * `manifestPath` error messages remain accurate. The realpath resolution and
10
+ * the identity-based ancestor walk are memoized per resolved `source`, which
11
+ * eliminates repeated syscalls when the same source is referenced across
12
+ * multiple manifest sections or fans out to multiple agents within one
13
+ * `planDeploy` invocation.
14
+ */
15
+ export declare function createSourcePathValidator(realRoot: string): SourcePathValidator;
4
16
  export declare function validateSourceFile(sourcePath: string, manifestPath: string): Promise<void>;
5
17
  export declare function validateMcpServerConfigShape(config: Record<string, unknown>, entryName: string, agentId: string): void;
6
18
  export declare function validatePermissionsConfigShape(config: Record<string, unknown>, entryName: string, agentId: string): void;
@@ -11,7 +23,23 @@ export declare function validateSkillDefinitionFile(sourcePath: string, manifest
11
23
  body: string;
12
24
  }>;
13
25
  /**
14
- * Validates that an instruction file (agentRules or agentDefinitions) meets
15
- * the structural requirements of the target agent.
26
+ * Returns true when the agent requires its instruction-file source to expose
27
+ * structural YAML frontmatter. Used by adapters to decide whether to parse
28
+ * the source document before per-agent validation.
29
+ */
30
+ export declare function instructionRequiresFrontmatter(agentId: AgentId): boolean;
31
+ /**
32
+ * Reads and parses an instruction file's YAML frontmatter once. Callers that
33
+ * fan out to multiple target agents should invoke this at most once per
34
+ * source file and reuse the returned attributes for each
35
+ * `validateInstructionAgentRequirements` call.
36
+ */
37
+ export declare function parseInstructionDocument(sourcePath: string, manifestPath: string): Promise<{
38
+ attributes: Record<string, unknown>;
39
+ body: string;
40
+ }>;
41
+ /**
42
+ * Runs the per-agent structural checks against an already-parsed instruction
43
+ * document. Agents without frontmatter requirements are a no-op.
16
44
  */
17
- export declare function validateInstructionFileRequirements(sourcePath: string, manifestPath: string, agentId: AgentId): Promise<void>;
45
+ export declare function validateInstructionAgentRequirements(attributes: Record<string, unknown>, manifestPath: string, agentId: AgentId): void;
@@ -54,6 +54,47 @@ export async function validateSourcePath(source, skillPath, resolvedSourceDir, r
54
54
  // Source doesn't exist yet — will be caught during execute
55
55
  }
56
56
  }
57
+ /**
58
+ * Returns a memoizing source-path validator bound to a single `realRoot`.
59
+ *
60
+ * The cheap out-of-root string gate still runs on every call so per-entry
61
+ * `manifestPath` error messages remain accurate. The realpath resolution and
62
+ * the identity-based ancestor walk are memoized per resolved `source`, which
63
+ * eliminates repeated syscalls when the same source is referenced across
64
+ * multiple manifest sections or fans out to multiple agents within one
65
+ * `planDeploy` invocation.
66
+ */
67
+ export function createSourcePathValidator(realRoot) {
68
+ const cache = new Map();
69
+ const resolveOutcome = async (source) => {
70
+ try {
71
+ const realSource = await realpath(source);
72
+ if (isSameOrDescendantPath(realSource, realRoot) ||
73
+ (await isWithinRootByIdentity(realSource, realRoot))) {
74
+ return { kind: "ok" };
75
+ }
76
+ return { kind: "escape", realSource };
77
+ }
78
+ catch {
79
+ // Source doesn't exist yet — will be caught during execute
80
+ return { kind: "ok" };
81
+ }
82
+ };
83
+ return async (source, manifestPath, resolvedSourceDir) => {
84
+ if (!source.startsWith(resolvedSourceDir + path.sep)) {
85
+ throw new UserError("DEPLOY_FAILED", `Skill path "${manifestPath}" resolves outside the repository root: ${source}`);
86
+ }
87
+ let pending = cache.get(source);
88
+ if (!pending) {
89
+ pending = resolveOutcome(source);
90
+ cache.set(source, pending);
91
+ }
92
+ const outcome = await pending;
93
+ if (outcome.kind === "escape") {
94
+ throw new UserError("DEPLOY_FAILED", `Skill path "${manifestPath}" resolves outside the repository root via symlink: ${source} -> ${outcome.realSource}`);
95
+ }
96
+ };
97
+ }
57
98
  export async function validateSourceFile(sourcePath, manifestPath) {
58
99
  let stat;
59
100
  try {
@@ -308,24 +349,37 @@ function validateAntigravityRequirements(attributes, manifestPath) {
308
349
  }
309
350
  }
310
351
  /**
311
- * Validates that an instruction file (agentRules or agentDefinitions) meets
312
- * the structural requirements of the target agent.
352
+ * Returns true when the agent requires its instruction-file source to expose
353
+ * structural YAML frontmatter. Used by adapters to decide whether to parse
354
+ * the source document before per-agent validation.
313
355
  */
314
- export async function validateInstructionFileRequirements(sourcePath, manifestPath, agentId) {
315
- const requiresFrontmatter = AGENT_REGISTRY_BY_ID[agentId]?.instructionFrontmatterRequired === true;
316
- if (!requiresFrontmatter)
317
- return;
318
- let attributes;
356
+ export function instructionRequiresFrontmatter(agentId) {
357
+ return AGENT_REGISTRY_BY_ID[agentId]?.instructionFrontmatterRequired === true;
358
+ }
359
+ /**
360
+ * Reads and parses an instruction file's YAML frontmatter once. Callers that
361
+ * fan out to multiple target agents should invoke this at most once per
362
+ * source file and reuse the returned attributes for each
363
+ * `validateInstructionAgentRequirements` call.
364
+ */
365
+ export async function parseInstructionDocument(sourcePath, manifestPath) {
319
366
  try {
320
- const result = await validateSkillDefinitionFile(sourcePath, manifestPath);
321
- attributes = result.attributes;
367
+ return await validateSkillDefinitionFile(sourcePath, manifestPath);
322
368
  }
323
369
  catch (err) {
324
370
  if (err instanceof UserError) {
325
- throw new UserError("DEPLOY_FAILED", `Instruction file "${manifestPath}" for agent "${agentId}" failed structural validation: ${err.message}`);
371
+ throw new UserError("DEPLOY_FAILED", `Instruction file "${manifestPath}" failed structural validation: ${err.message}`, { cause: err });
326
372
  }
327
373
  throw err;
328
374
  }
375
+ }
376
+ /**
377
+ * Runs the per-agent structural checks against an already-parsed instruction
378
+ * document. Agents without frontmatter requirements are a no-op.
379
+ */
380
+ export function validateInstructionAgentRequirements(attributes, manifestPath, agentId) {
381
+ if (!instructionRequiresFrontmatter(agentId))
382
+ return;
329
383
  if (agentId === "github-copilot") {
330
384
  validateGithubCopilotRequirements(attributes, manifestPath);
331
385
  }
@@ -27,32 +27,35 @@ export function formatDryRunPlan(planned) {
27
27
  }
28
28
  function formatPlannedChange(change) {
29
29
  const icon = styleText("cyan", "○");
30
- const kind = styleText("dim", `[${change.kind}]`);
31
- const lines = [
32
- ` ${icon} ${kind} ${change.verb} ${styleText("bold", change.skill)}`,
33
- ];
30
+ const lines = [` ${icon} ${change.verb} ${styleText("bold", change.skill)}`];
34
31
  if (change.source !== undefined) {
35
32
  lines.push(` source: ${styleText("dim", change.source)}`);
36
33
  }
37
34
  lines.push(` target: ${styleText("dim", change.target)}`);
38
- const detail = formatChangeDetail(change);
39
- if (detail) {
40
- lines.push(` ${detail}`);
35
+ const detailLines = formatChangeDetail(change);
36
+ if (detailLines) {
37
+ lines.push(...detailLines.map((line) => ` ${line}`));
41
38
  }
42
39
  return lines.join("\n");
43
40
  }
44
41
  function formatChangeDetail(change) {
45
42
  if (change.verb === "patch-config" && change.patch !== undefined) {
46
- return `patch: ${styleText("dim", JSON.stringify(change.patch))}`;
43
+ return formatJsonDetail("patch", change.patch);
47
44
  }
48
45
  if (change.verb === "unapply-patch" && change.patch !== undefined) {
49
- return `undo: ${styleText("dim", JSON.stringify(change.patch))}`;
46
+ return formatJsonDetail("undo", change.patch);
50
47
  }
51
48
  if (change.verb === "patch-toml" && change.patch !== undefined) {
52
- return `patch: ${styleText("dim", JSON.stringify(change.patch))}`;
49
+ return formatJsonDetail("patch", change.patch);
53
50
  }
54
51
  if (change.verb === "emit-frontmatter" && change.frontmatter !== undefined) {
55
- return `frontmatter: ${styleText("dim", JSON.stringify(change.frontmatter))}`;
52
+ return formatJsonDetail("frontmatter", change.frontmatter);
56
53
  }
57
54
  return null;
58
55
  }
56
+ function formatJsonDetail(label, value) {
57
+ const jsonLines = JSON.stringify(value, null, 2)
58
+ .split("\n")
59
+ .map((line) => styleText("dim", line));
60
+ return [`${label}:`, ...jsonLines.map((line) => ` ${line}`)];
61
+ }
@@ -2,124 +2,124 @@ import { z } from "zod";
2
2
  declare const AGENT_IDS: readonly ["claude-code", "codex", "gemini-cli", "antigravity", "opencode", "github-copilot"];
3
3
  export { AGENT_IDS };
4
4
  export declare const AgentIdSchema: z.ZodEnum<{
5
+ antigravity: "antigravity";
5
6
  "claude-code": "claude-code";
6
7
  codex: "codex";
7
8
  "gemini-cli": "gemini-cli";
8
- antigravity: "antigravity";
9
- opencode: "opencode";
10
9
  "github-copilot": "github-copilot";
10
+ opencode: "opencode";
11
11
  }>;
12
12
  export type AgentId = z.output<typeof AgentIdSchema>;
13
13
  export declare const SkillEntrySchema: z.ZodObject<{
14
14
  name: z.ZodString;
15
15
  path: z.ZodString;
16
16
  agents: z.ZodPipe<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodEnum<{
17
+ antigravity: "antigravity";
17
18
  "claude-code": "claude-code";
18
19
  codex: "codex";
19
20
  "gemini-cli": "gemini-cli";
20
- antigravity: "antigravity";
21
- opencode: "opencode";
22
21
  "github-copilot": "github-copilot";
23
- }>>>, z.ZodTransform<("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[], ("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[]>>;
22
+ opencode: "opencode";
23
+ }>>>, z.ZodTransform<("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[], ("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[]>>;
24
24
  }, z.core.$strip>;
25
25
  export declare const FileEntrySchema: z.ZodObject<{
26
26
  name: z.ZodString;
27
27
  path: z.ZodString;
28
28
  target: z.ZodString;
29
29
  agents: z.ZodPipe<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodEnum<{
30
+ antigravity: "antigravity";
30
31
  "claude-code": "claude-code";
31
32
  codex: "codex";
32
33
  "gemini-cli": "gemini-cli";
33
- antigravity: "antigravity";
34
- opencode: "opencode";
35
34
  "github-copilot": "github-copilot";
36
- }>>>, z.ZodTransform<("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[], ("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[]>>;
35
+ opencode: "opencode";
36
+ }>>>, z.ZodTransform<("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[], ("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[]>>;
37
37
  }, z.core.$strip>;
38
38
  export declare const ConfigEntrySchema: z.ZodObject<{
39
39
  name: z.ZodString;
40
40
  target: z.ZodString;
41
41
  patch: z.ZodRecord<z.ZodString, z.ZodUnknown>;
42
42
  agents: z.ZodPipe<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodEnum<{
43
+ antigravity: "antigravity";
43
44
  "claude-code": "claude-code";
44
45
  codex: "codex";
45
46
  "gemini-cli": "gemini-cli";
46
- antigravity: "antigravity";
47
- opencode: "opencode";
48
47
  "github-copilot": "github-copilot";
49
- }>>>, z.ZodTransform<("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[], ("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[]>>;
48
+ opencode: "opencode";
49
+ }>>>, z.ZodTransform<("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[], ("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[]>>;
50
50
  }, z.core.$strip>;
51
51
  export declare const McpServerEntrySchema: z.ZodObject<{
52
52
  name: z.ZodString;
53
53
  agents: z.ZodPipe<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodEnum<{
54
+ antigravity: "antigravity";
54
55
  "claude-code": "claude-code";
55
56
  codex: "codex";
56
57
  "gemini-cli": "gemini-cli";
57
- antigravity: "antigravity";
58
- opencode: "opencode";
59
58
  "github-copilot": "github-copilot";
60
- }>>>, z.ZodTransform<("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[], ("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[]>>;
59
+ opencode: "opencode";
60
+ }>>>, z.ZodTransform<("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[], ("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[]>>;
61
61
  config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
62
62
  scope: z.ZodDefault<z.ZodEnum<{
63
+ devcontainer: "devcontainer";
63
64
  global: "global";
64
65
  repo: "repo";
65
66
  workspace: "workspace";
66
- devcontainer: "devcontainer";
67
67
  }>>;
68
68
  }, z.core.$strip>;
69
69
  export declare const AgentRuleEntrySchema: z.ZodObject<{
70
70
  name: z.ZodString;
71
71
  agents: z.ZodPipe<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodEnum<{
72
+ antigravity: "antigravity";
72
73
  "claude-code": "claude-code";
73
74
  codex: "codex";
74
75
  "gemini-cli": "gemini-cli";
75
- antigravity: "antigravity";
76
- opencode: "opencode";
77
76
  "github-copilot": "github-copilot";
78
- }>>>, z.ZodTransform<("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[], ("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[]>>;
77
+ opencode: "opencode";
78
+ }>>>, z.ZodTransform<("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[], ("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[]>>;
79
79
  path: z.ZodString;
80
80
  scope: z.ZodDefault<z.ZodEnum<{
81
+ "copilot-repo": "copilot-repo";
82
+ "copilot-scoped": "copilot-scoped";
81
83
  global: "global";
82
84
  repo: "repo";
83
85
  workspace: "workspace";
84
- "copilot-repo": "copilot-repo";
85
- "copilot-scoped": "copilot-scoped";
86
86
  }>>;
87
87
  targetDir: z.ZodOptional<z.ZodString>;
88
88
  }, z.core.$strip>;
89
89
  export declare const PermissionsEntrySchema: z.ZodObject<{
90
90
  name: z.ZodString;
91
91
  agents: z.ZodPipe<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodEnum<{
92
+ antigravity: "antigravity";
92
93
  "claude-code": "claude-code";
93
94
  codex: "codex";
94
95
  "gemini-cli": "gemini-cli";
95
- antigravity: "antigravity";
96
- opencode: "opencode";
97
96
  "github-copilot": "github-copilot";
98
- }>>>, z.ZodTransform<("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[], ("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[]>>;
97
+ opencode: "opencode";
98
+ }>>>, z.ZodTransform<("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[], ("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[]>>;
99
99
  config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
100
100
  }, z.core.$strip>;
101
101
  export declare const ExecutionConfigEntrySchema: z.ZodObject<{
102
102
  name: z.ZodString;
103
103
  agents: z.ZodPipe<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodEnum<{
104
+ antigravity: "antigravity";
104
105
  "claude-code": "claude-code";
105
106
  codex: "codex";
106
107
  "gemini-cli": "gemini-cli";
107
- antigravity: "antigravity";
108
- opencode: "opencode";
109
108
  "github-copilot": "github-copilot";
110
- }>>>, z.ZodTransform<("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[], ("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[]>>;
109
+ opencode: "opencode";
110
+ }>>>, z.ZodTransform<("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[], ("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[]>>;
111
111
  config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
112
112
  }, z.core.$strip>;
113
113
  export declare const AgentDefinitionEntrySchema: z.ZodObject<{
114
114
  name: z.ZodString;
115
115
  agents: z.ZodPipe<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodEnum<{
116
+ antigravity: "antigravity";
116
117
  "claude-code": "claude-code";
117
118
  codex: "codex";
118
119
  "gemini-cli": "gemini-cli";
119
- antigravity: "antigravity";
120
- opencode: "opencode";
121
120
  "github-copilot": "github-copilot";
122
- }>>>, z.ZodTransform<("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[], ("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[]>>;
121
+ opencode: "opencode";
122
+ }>>>, z.ZodTransform<("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[], ("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[]>>;
123
123
  path: z.ZodString;
124
124
  scope: z.ZodDefault<z.ZodEnum<{
125
125
  global: "global";
@@ -130,13 +130,13 @@ export declare const AgentDefinitionEntrySchema: z.ZodObject<{
130
130
  export declare const HookEntrySchema: z.ZodObject<{
131
131
  name: z.ZodString;
132
132
  agents: z.ZodPipe<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodEnum<{
133
+ antigravity: "antigravity";
133
134
  "claude-code": "claude-code";
134
135
  codex: "codex";
135
136
  "gemini-cli": "gemini-cli";
136
- antigravity: "antigravity";
137
- opencode: "opencode";
138
137
  "github-copilot": "github-copilot";
139
- }>>>, z.ZodTransform<("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[], ("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[]>>;
138
+ opencode: "opencode";
139
+ }>>>, z.ZodTransform<("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[], ("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[]>>;
140
140
  config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
141
141
  }, z.core.$strip>;
142
142
  export declare const ManifestSchema: z.ZodObject<{
@@ -144,100 +144,100 @@ export declare const ManifestSchema: z.ZodObject<{
144
144
  name: z.ZodString;
145
145
  path: z.ZodString;
146
146
  agents: z.ZodPipe<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodEnum<{
147
+ antigravity: "antigravity";
147
148
  "claude-code": "claude-code";
148
149
  codex: "codex";
149
150
  "gemini-cli": "gemini-cli";
150
- antigravity: "antigravity";
151
- opencode: "opencode";
152
151
  "github-copilot": "github-copilot";
153
- }>>>, z.ZodTransform<("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[], ("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[]>>;
152
+ opencode: "opencode";
153
+ }>>>, z.ZodTransform<("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[], ("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[]>>;
154
154
  }, z.core.$strip>>;
155
155
  files: z.ZodDefault<z.ZodArray<z.ZodObject<{
156
156
  name: z.ZodString;
157
157
  path: z.ZodString;
158
158
  target: z.ZodString;
159
159
  agents: z.ZodPipe<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodEnum<{
160
+ antigravity: "antigravity";
160
161
  "claude-code": "claude-code";
161
162
  codex: "codex";
162
163
  "gemini-cli": "gemini-cli";
163
- antigravity: "antigravity";
164
- opencode: "opencode";
165
164
  "github-copilot": "github-copilot";
166
- }>>>, z.ZodTransform<("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[], ("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[]>>;
165
+ opencode: "opencode";
166
+ }>>>, z.ZodTransform<("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[], ("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[]>>;
167
167
  }, z.core.$strip>>>;
168
168
  configs: z.ZodDefault<z.ZodArray<z.ZodObject<{
169
169
  name: z.ZodString;
170
170
  target: z.ZodString;
171
171
  patch: z.ZodRecord<z.ZodString, z.ZodUnknown>;
172
172
  agents: z.ZodPipe<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodEnum<{
173
+ antigravity: "antigravity";
173
174
  "claude-code": "claude-code";
174
175
  codex: "codex";
175
176
  "gemini-cli": "gemini-cli";
176
- antigravity: "antigravity";
177
- opencode: "opencode";
178
177
  "github-copilot": "github-copilot";
179
- }>>>, z.ZodTransform<("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[], ("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[]>>;
178
+ opencode: "opencode";
179
+ }>>>, z.ZodTransform<("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[], ("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[]>>;
180
180
  }, z.core.$strip>>>;
181
181
  mcpServers: z.ZodDefault<z.ZodArray<z.ZodObject<{
182
182
  name: z.ZodString;
183
183
  agents: z.ZodPipe<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodEnum<{
184
+ antigravity: "antigravity";
184
185
  "claude-code": "claude-code";
185
186
  codex: "codex";
186
187
  "gemini-cli": "gemini-cli";
187
- antigravity: "antigravity";
188
- opencode: "opencode";
189
188
  "github-copilot": "github-copilot";
190
- }>>>, z.ZodTransform<("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[], ("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[]>>;
189
+ opencode: "opencode";
190
+ }>>>, z.ZodTransform<("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[], ("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[]>>;
191
191
  config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
192
192
  scope: z.ZodDefault<z.ZodEnum<{
193
+ devcontainer: "devcontainer";
193
194
  global: "global";
194
195
  repo: "repo";
195
196
  workspace: "workspace";
196
- devcontainer: "devcontainer";
197
197
  }>>;
198
198
  }, z.core.$strip>>>;
199
199
  agentRules: z.ZodDefault<z.ZodArray<z.ZodObject<{
200
200
  name: z.ZodString;
201
201
  agents: z.ZodPipe<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodEnum<{
202
+ antigravity: "antigravity";
202
203
  "claude-code": "claude-code";
203
204
  codex: "codex";
204
205
  "gemini-cli": "gemini-cli";
205
- antigravity: "antigravity";
206
- opencode: "opencode";
207
206
  "github-copilot": "github-copilot";
208
- }>>>, z.ZodTransform<("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[], ("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[]>>;
207
+ opencode: "opencode";
208
+ }>>>, z.ZodTransform<("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[], ("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[]>>;
209
209
  path: z.ZodString;
210
210
  scope: z.ZodDefault<z.ZodEnum<{
211
+ "copilot-repo": "copilot-repo";
212
+ "copilot-scoped": "copilot-scoped";
211
213
  global: "global";
212
214
  repo: "repo";
213
215
  workspace: "workspace";
214
- "copilot-repo": "copilot-repo";
215
- "copilot-scoped": "copilot-scoped";
216
216
  }>>;
217
217
  targetDir: z.ZodOptional<z.ZodString>;
218
218
  }, z.core.$strip>>>;
219
219
  permissions: z.ZodDefault<z.ZodArray<z.ZodObject<{
220
220
  name: z.ZodString;
221
221
  agents: z.ZodPipe<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodEnum<{
222
+ antigravity: "antigravity";
222
223
  "claude-code": "claude-code";
223
224
  codex: "codex";
224
225
  "gemini-cli": "gemini-cli";
225
- antigravity: "antigravity";
226
- opencode: "opencode";
227
226
  "github-copilot": "github-copilot";
228
- }>>>, z.ZodTransform<("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[], ("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[]>>;
227
+ opencode: "opencode";
228
+ }>>>, z.ZodTransform<("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[], ("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[]>>;
229
229
  config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
230
230
  }, z.core.$strip>>>;
231
231
  agentDefinitions: z.ZodDefault<z.ZodArray<z.ZodObject<{
232
232
  name: z.ZodString;
233
233
  agents: z.ZodPipe<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodEnum<{
234
+ antigravity: "antigravity";
234
235
  "claude-code": "claude-code";
235
236
  codex: "codex";
236
237
  "gemini-cli": "gemini-cli";
237
- antigravity: "antigravity";
238
- opencode: "opencode";
239
238
  "github-copilot": "github-copilot";
240
- }>>>, z.ZodTransform<("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[], ("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[]>>;
239
+ opencode: "opencode";
240
+ }>>>, z.ZodTransform<("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[], ("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[]>>;
241
241
  path: z.ZodString;
242
242
  scope: z.ZodDefault<z.ZodEnum<{
243
243
  global: "global";
@@ -248,25 +248,25 @@ export declare const ManifestSchema: z.ZodObject<{
248
248
  hooks: z.ZodOptional<z.ZodArray<z.ZodObject<{
249
249
  name: z.ZodString;
250
250
  agents: z.ZodPipe<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodEnum<{
251
+ antigravity: "antigravity";
251
252
  "claude-code": "claude-code";
252
253
  codex: "codex";
253
254
  "gemini-cli": "gemini-cli";
254
- antigravity: "antigravity";
255
- opencode: "opencode";
256
255
  "github-copilot": "github-copilot";
257
- }>>>, z.ZodTransform<("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[], ("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[]>>;
256
+ opencode: "opencode";
257
+ }>>>, z.ZodTransform<("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[], ("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[]>>;
258
258
  config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
259
259
  }, z.core.$strip>>>;
260
260
  executionConfigs: z.ZodOptional<z.ZodArray<z.ZodObject<{
261
261
  name: z.ZodString;
262
262
  agents: z.ZodPipe<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodEnum<{
263
+ antigravity: "antigravity";
263
264
  "claude-code": "claude-code";
264
265
  codex: "codex";
265
266
  "gemini-cli": "gemini-cli";
266
- antigravity: "antigravity";
267
- opencode: "opencode";
268
267
  "github-copilot": "github-copilot";
269
- }>>>, z.ZodTransform<("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[], ("claude-code" | "codex" | "gemini-cli" | "antigravity" | "opencode" | "github-copilot")[]>>;
268
+ opencode: "opencode";
269
+ }>>>, z.ZodTransform<("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[], ("antigravity" | "claude-code" | "codex" | "gemini-cli" | "github-copilot" | "opencode")[]>>;
270
270
  config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
271
271
  }, z.core.$strip>>>;
272
272
  }, z.core.$strip>;
@@ -281,10 +281,10 @@ export type HookEntry = z.infer<typeof HookEntrySchema>;
281
281
  export type ExecutionConfigEntry = z.infer<typeof ExecutionConfigEntrySchema>;
282
282
  export type Manifest = z.infer<typeof ManifestSchema>;
283
283
  export declare const AgentListSchema: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodPipe<z.ZodString, z.ZodEnum<{
284
+ antigravity: "antigravity";
284
285
  "claude-code": "claude-code";
285
286
  codex: "codex";
286
287
  "gemini-cli": "gemini-cli";
287
- antigravity: "antigravity";
288
- opencode: "opencode";
289
288
  "github-copilot": "github-copilot";
289
+ opencode: "opencode";
290
290
  }>>>>;
@@ -55,7 +55,7 @@ const targetTemplateField = z
55
55
  .string({ message: "target must be a non-empty string" })
56
56
  .min(1, { message: "target must be a non-empty string" })
57
57
  .refine((t) => TARGET_TEMPLATE_RE.test(t), {
58
- message: "target must start with a known placeholder: {home}, {appdata}, {xdg_config}, or {repo}",
58
+ message: "target must start with a known placeholder: {home}, {appdata}, {xdg_config}, {repo}, or {workspace}",
59
59
  })
60
60
  .refine((t) => !t.split(/[\\/]+/).includes(".."), {
61
61
  message: "target must not escape its placeholder root",