@kuznai/inception-engine 0.11.1 → 0.13.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.
@@ -13,7 +13,9 @@ const SAFE_NAME_RE = /^[a-zA-Z0-9][a-zA-Z0-9._-]*$/;
13
13
  // Target templates must be rooted at a known placeholder and may only add
14
14
  // descendant path segments beneath that root. e.g. "{home}/.claude/settings.json"
15
15
  // is valid, while "{home}/../.ssh/config" is rejected.
16
- const TARGET_TEMPLATE_RE = /^\{(home|appdata|xdg_config)\}(?:[\\/].*)?$/;
16
+ // {repo} resolves to the manifest directory at deploy time, enabling repo-local
17
+ // targets (e.g. Antigravity's .agents/rules/ surface).
18
+ const TARGET_TEMPLATE_RE = /^\{(home|appdata|xdg_config|repo)\}(?:[\\/].*)?$/;
17
19
  // Standalone schema used for type derivation and single-ID validation (e.g. index.ts).
18
20
  export const AgentIdSchema = z.enum(AGENT_IDS);
19
21
  // Used inside SkillEntrySchema.agents so that enum failures embed the received
@@ -53,7 +55,7 @@ const targetTemplateField = z
53
55
  .string({ message: "target must be a non-empty string" })
54
56
  .min(1, { message: "target must be a non-empty string" })
55
57
  .refine((t) => TARGET_TEMPLATE_RE.test(t), {
56
- message: "target must start with a known placeholder: {home}, {appdata}, or {xdg_config}",
58
+ message: "target must start with a known placeholder: {home}, {appdata}, {xdg_config}, or {repo}",
57
59
  })
58
60
  .refine((t) => !t.split(/[\\/]+/).includes(".."), {
59
61
  message: "target must not escape its placeholder root",
package/dist/types.d.ts CHANGED
@@ -5,6 +5,18 @@ export interface AgentPaths {
5
5
  windows: string[];
6
6
  }
7
7
  export type Confidence = "documented" | "implementation-only" | "provisional";
8
+ export interface SupportedAgentSurface {
9
+ status: "supported";
10
+ path: AgentPaths;
11
+ schemaLabel: string;
12
+ mcpPatchKey?: string;
13
+ }
14
+ export interface UnsupportedAgentSurface {
15
+ status: "unsupported";
16
+ schemaLabel: string;
17
+ reason: string;
18
+ }
19
+ export type AgentSurfaceSupport = SupportedAgentSurface | UnsupportedAgentSurface;
8
20
  export interface AgentProvenance {
9
21
  skills: Confidence;
10
22
  detectPaths: Confidence;
@@ -19,9 +31,8 @@ export interface AgentConfig {
19
31
  detectPaths: AgentPaths;
20
32
  detectBinary: string | null;
21
33
  provenance: AgentProvenance;
22
- mcpConfigPath?: AgentPaths;
23
- agentRulesPath?: AgentPaths;
24
- claudeNativeInstruction?: true;
34
+ mcpSupport?: AgentSurfaceSupport;
35
+ agentRulesSupport?: AgentSurfaceSupport;
25
36
  policyNote?: string;
26
37
  }
27
38
  export interface PlanWarning {
@@ -53,7 +64,23 @@ export interface ConfigPatchDeployAction {
53
64
  patch: unknown;
54
65
  confidence?: Confidence;
55
66
  }
56
- export type DeployAction = SkillDirDeployAction | FileWriteDeployAction | ConfigPatchDeployAction;
67
+ export interface TomlPatchDeployAction {
68
+ kind: "toml-patch";
69
+ skill: string;
70
+ agent: AgentId;
71
+ target: string;
72
+ config: Record<string, unknown>;
73
+ confidence?: Confidence;
74
+ }
75
+ export interface FrontmatterEmitDeployAction {
76
+ kind: "frontmatter-emit";
77
+ skill: string;
78
+ agent: AgentId;
79
+ target: string;
80
+ frontmatter: Record<string, unknown>;
81
+ confidence?: Confidence;
82
+ }
83
+ export type DeployAction = SkillDirDeployAction | FileWriteDeployAction | ConfigPatchDeployAction | TomlPatchDeployAction | FrontmatterEmitDeployAction;
57
84
  export interface SkillDirRevertAction {
58
85
  kind: "skill-dir";
59
86
  skill: string;
@@ -72,17 +99,30 @@ export interface ConfigPatchRevertAction {
72
99
  agent: AgentId;
73
100
  target: string;
74
101
  }
75
- export type RevertAction = SkillDirRevertAction | FileWriteRevertAction | ConfigPatchRevertAction;
76
- export type PlannedChangeVerb = "create-symlink" | "copy-dir" | "write-file" | "patch-config" | "remove" | "unapply-patch";
102
+ export interface TomlPatchRevertAction {
103
+ kind: "toml-patch";
104
+ skill: string;
105
+ agent: AgentId;
106
+ target: string;
107
+ }
108
+ export interface FrontmatterEmitRevertAction {
109
+ kind: "frontmatter-emit";
110
+ skill: string;
111
+ agent: AgentId;
112
+ target: string;
113
+ }
114
+ export type RevertAction = SkillDirRevertAction | FileWriteRevertAction | ConfigPatchRevertAction | TomlPatchRevertAction | FrontmatterEmitRevertAction;
115
+ export type PlannedChangeVerb = "create-symlink" | "copy-dir" | "write-file" | "patch-config" | "patch-toml" | "emit-frontmatter" | "remove" | "unapply-patch";
77
116
  export interface PlannedChange {
78
117
  verb: PlannedChangeVerb;
79
- kind: "skill-dir" | "file-write" | "config-patch";
118
+ kind: "skill-dir" | "file-write" | "config-patch" | "toml-patch" | "frontmatter-emit";
80
119
  skill: string;
81
120
  agent: AgentId;
82
121
  source?: string;
83
122
  target: string;
84
123
  method?: "symlink" | "copy";
85
124
  patch?: Record<string, unknown>;
125
+ frontmatter?: Record<string, unknown>;
86
126
  confidence?: Confidence;
87
127
  }
88
128
  export interface CliOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kuznai/inception-engine",
3
- "version": "0.11.1",
3
+ "version": "0.13.0",
4
4
  "description": "Deploy AI agent skills from a git repo to user home directories",
5
5
  "license": "MIT",
6
6
  "author": "Damian Piątkowski",
@@ -47,6 +47,8 @@
47
47
  "test:posix": "node --test --test-isolation=none test/unit/*.test.ts test/os/cross-platform/*.test.ts test/os/posix/*.test.ts"
48
48
  },
49
49
  "dependencies": {
50
+ "front-matter": "^4.0.2",
51
+ "smol-toml": "^1.6.1",
50
52
  "zod": "^4.0.0"
51
53
  },
52
54
  "devDependencies": {