@kuznai/inception-engine 0.18.0 → 0.19.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.
- package/README.md +27 -24
- package/dist/config/agents.js +87 -10
- package/dist/core/adapters/agent-definitions.d.ts +2 -2
- package/dist/core/adapters/agent-definitions.js +6 -5
- package/dist/core/adapters/index.d.ts +1 -1
- package/dist/core/adapters/index.js +4 -4
- package/dist/core/adapters/mcp.d.ts +2 -2
- package/dist/core/adapters/mcp.js +4 -4
- package/dist/core/adapters/rules.d.ts +2 -2
- package/dist/core/adapters/rules.js +61 -14
- package/dist/core/deploy.d.ts +1 -1
- package/dist/core/deploy.js +206 -54
- package/dist/core/init.js +127 -47
- package/dist/core/ownership.d.ts +2 -2
- package/dist/core/preflight.d.ts +1 -1
- package/dist/core/preflight.js +95 -25
- package/dist/core/resolve.d.ts +1 -1
- package/dist/core/resolve.js +7 -4
- package/dist/core/revert.js +9 -7
- package/dist/core/runtime-paths.d.ts +2 -1
- package/dist/core/runtime-paths.js +30 -23
- package/dist/core/validation.d.ts +10 -1
- package/dist/core/validation.js +55 -0
- package/dist/formatters.d.ts +5 -0
- package/dist/formatters.js +58 -0
- package/dist/index.js +8 -24
- package/dist/logger.js +22 -21
- package/dist/schemas/manifest.d.ts +2 -0
- package/dist/schemas/manifest.js +8 -5
- package/dist/schemas/registry.d.ts +38 -0
- package/dist/schemas/registry.js +7 -0
- package/dist/types.d.ts +47 -0
- package/package.json +1 -1
package/dist/schemas/manifest.js
CHANGED
|
@@ -15,7 +15,7 @@ const SAFE_NAME_RE = /^[a-zA-Z0-9][a-zA-Z0-9._-]*$/;
|
|
|
15
15
|
// is valid, while "{home}/../.ssh/config" is rejected.
|
|
16
16
|
// {repo} resolves to the manifest directory at deploy time, enabling repo-local
|
|
17
17
|
// targets (e.g. Antigravity's .agents/rules/ surface).
|
|
18
|
-
const TARGET_TEMPLATE_RE = /^\{(home|appdata|xdg_config|repo)\}(?:[\\/].*)?$/;
|
|
18
|
+
const TARGET_TEMPLATE_RE = /^\{(home|appdata|xdg_config|repo|workspace)\}(?:[\\/].*)?$/;
|
|
19
19
|
// Standalone schema used for type derivation and single-ID validation (e.g. index.ts).
|
|
20
20
|
export const AgentIdSchema = z.enum(AGENT_IDS);
|
|
21
21
|
// Used inside SkillEntrySchema.agents so that enum failures embed the received
|
|
@@ -88,11 +88,14 @@ export const AgentRuleEntrySchema = z.object({
|
|
|
88
88
|
name: nameField,
|
|
89
89
|
agents: agentsField,
|
|
90
90
|
// Relative path to the rules/instruction file within the source bundle.
|
|
91
|
+
// Must be a .md or .markdown file. Structural requirements (e.g. YAML
|
|
92
|
+
// frontmatter) are validated per agent requirements by the adapter.
|
|
91
93
|
path: sourcePathField,
|
|
92
94
|
// Deployment scope: "global" targets the agent's home-directory instruction
|
|
93
95
|
// file (default), "repo" targets the project-root instruction file within the
|
|
94
|
-
// deployed repository (e.g. {repo}/CLAUDE.md for claude-code)
|
|
95
|
-
|
|
96
|
+
// deployed repository (e.g. {repo}/CLAUDE.md for claude-code), and "workspace"
|
|
97
|
+
// targets the agent's workspace-local instruction surface.
|
|
98
|
+
scope: z.enum(["global", "repo", "workspace"]).default("global"),
|
|
96
99
|
});
|
|
97
100
|
export const PermissionsEntrySchema = z.object({
|
|
98
101
|
name: nameField,
|
|
@@ -106,8 +109,8 @@ export const AgentDefinitionEntrySchema = z.object({
|
|
|
106
109
|
name: nameField,
|
|
107
110
|
agents: agentsField,
|
|
108
111
|
// Relative path to the agent definition Markdown file within the source bundle.
|
|
109
|
-
// Must be a .md or .markdown file.
|
|
110
|
-
//
|
|
112
|
+
// Must be a .md or .markdown file. Structural requirements (e.g. YAML
|
|
113
|
+
// frontmatter) are validated per agent requirements by the adapter.
|
|
111
114
|
path: sourcePathField,
|
|
112
115
|
});
|
|
113
116
|
export const ManifestSchema = z.object({
|
|
@@ -46,6 +46,19 @@ declare const ConfigPatchRegistryEntrySchema: z.ZodObject<{
|
|
|
46
46
|
}>;
|
|
47
47
|
deployed: z.ZodString;
|
|
48
48
|
}, z.core.$strip>;
|
|
49
|
+
declare const FrontmatterEmitRegistryEntrySchema: z.ZodObject<{
|
|
50
|
+
kind: z.ZodLiteral<"frontmatter-emit">;
|
|
51
|
+
skill: z.ZodString;
|
|
52
|
+
agent: z.ZodEnum<{
|
|
53
|
+
"claude-code": "claude-code";
|
|
54
|
+
codex: "codex";
|
|
55
|
+
"gemini-cli": "gemini-cli";
|
|
56
|
+
antigravity: "antigravity";
|
|
57
|
+
opencode: "opencode";
|
|
58
|
+
"github-copilot": "github-copilot";
|
|
59
|
+
}>;
|
|
60
|
+
deployed: z.ZodString;
|
|
61
|
+
}, z.core.$strip>;
|
|
49
62
|
export declare const RegistryEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
50
63
|
kind: z.ZodLiteral<"skill-dir">;
|
|
51
64
|
source: z.ZodString;
|
|
@@ -90,6 +103,18 @@ export declare const RegistryEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
90
103
|
"github-copilot": "github-copilot";
|
|
91
104
|
}>;
|
|
92
105
|
deployed: z.ZodString;
|
|
106
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
107
|
+
kind: z.ZodLiteral<"frontmatter-emit">;
|
|
108
|
+
skill: z.ZodString;
|
|
109
|
+
agent: z.ZodEnum<{
|
|
110
|
+
"claude-code": "claude-code";
|
|
111
|
+
codex: "codex";
|
|
112
|
+
"gemini-cli": "gemini-cli";
|
|
113
|
+
antigravity: "antigravity";
|
|
114
|
+
opencode: "opencode";
|
|
115
|
+
"github-copilot": "github-copilot";
|
|
116
|
+
}>;
|
|
117
|
+
deployed: z.ZodString;
|
|
93
118
|
}, z.core.$strip>], "kind">;
|
|
94
119
|
export declare const RegistrySchema: z.ZodObject<{
|
|
95
120
|
version: z.ZodLiteral<1>;
|
|
@@ -137,11 +162,24 @@ export declare const RegistrySchema: z.ZodObject<{
|
|
|
137
162
|
"github-copilot": "github-copilot";
|
|
138
163
|
}>;
|
|
139
164
|
deployed: z.ZodString;
|
|
165
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
166
|
+
kind: z.ZodLiteral<"frontmatter-emit">;
|
|
167
|
+
skill: z.ZodString;
|
|
168
|
+
agent: z.ZodEnum<{
|
|
169
|
+
"claude-code": "claude-code";
|
|
170
|
+
codex: "codex";
|
|
171
|
+
"gemini-cli": "gemini-cli";
|
|
172
|
+
antigravity: "antigravity";
|
|
173
|
+
opencode: "opencode";
|
|
174
|
+
"github-copilot": "github-copilot";
|
|
175
|
+
}>;
|
|
176
|
+
deployed: z.ZodString;
|
|
140
177
|
}, z.core.$strip>], "kind">>;
|
|
141
178
|
}, z.core.$strip>;
|
|
142
179
|
export type SkillDirRegistryEntry = z.infer<typeof SkillDirRegistryEntrySchema>;
|
|
143
180
|
export type FileWriteRegistryEntry = z.infer<typeof FileWriteRegistryEntrySchema>;
|
|
144
181
|
export type ConfigPatchRegistryEntry = z.infer<typeof ConfigPatchRegistryEntrySchema>;
|
|
182
|
+
export type FrontmatterEmitRegistryEntry = z.infer<typeof FrontmatterEmitRegistryEntrySchema>;
|
|
145
183
|
export type RegistryEntry = z.infer<typeof RegistryEntrySchema>;
|
|
146
184
|
export type Registry = z.infer<typeof RegistrySchema>;
|
|
147
185
|
export {};
|
package/dist/schemas/registry.js
CHANGED
|
@@ -23,10 +23,17 @@ const ConfigPatchRegistryEntrySchema = z.object({
|
|
|
23
23
|
agent: AgentIdSchema,
|
|
24
24
|
deployed: z.string(),
|
|
25
25
|
});
|
|
26
|
+
const FrontmatterEmitRegistryEntrySchema = z.object({
|
|
27
|
+
kind: z.literal("frontmatter-emit"),
|
|
28
|
+
skill: z.string(),
|
|
29
|
+
agent: AgentIdSchema,
|
|
30
|
+
deployed: z.string(),
|
|
31
|
+
});
|
|
26
32
|
export const RegistryEntrySchema = z.discriminatedUnion("kind", [
|
|
27
33
|
SkillDirRegistryEntrySchema,
|
|
28
34
|
FileWriteRegistryEntrySchema,
|
|
29
35
|
ConfigPatchRegistryEntrySchema,
|
|
36
|
+
FrontmatterEmitRegistryEntrySchema,
|
|
30
37
|
]);
|
|
31
38
|
export const RegistrySchema = z.object({
|
|
32
39
|
version: z.literal(1),
|
package/dist/types.d.ts
CHANGED
|
@@ -7,6 +7,33 @@ export interface AgentPaths {
|
|
|
7
7
|
export type Confidence = "documented" | "implementation-only" | "provisional";
|
|
8
8
|
export interface SupportedAgentSurface {
|
|
9
9
|
status: "supported";
|
|
10
|
+
/**
|
|
11
|
+
* Declares how this agent relates to the surface:
|
|
12
|
+
* - "agent-specific" (default when absent): the agent owns this surface
|
|
13
|
+
* independently and deploy emits a normal action.
|
|
14
|
+
* - "native": the agent reads this surface autonomously without any deploy
|
|
15
|
+
* action from inception-engine; no action is emitted.
|
|
16
|
+
* - "shared-via": this agent rides another agent's deployment. When the
|
|
17
|
+
* primary agent (`via`) is also in the target list, deploy skips this
|
|
18
|
+
* agent's action (the primary writes the shared file). When the primary
|
|
19
|
+
* is absent, a guidance warning is emitted instead.
|
|
20
|
+
*/
|
|
21
|
+
surfaceKind?: {
|
|
22
|
+
kind: "agent-specific";
|
|
23
|
+
} | {
|
|
24
|
+
kind: "native";
|
|
25
|
+
} | {
|
|
26
|
+
kind: "shared-via";
|
|
27
|
+
via: AgentId;
|
|
28
|
+
/**
|
|
29
|
+
* When true, this agent cannot deploy to the surface independently —
|
|
30
|
+
* the primary agent (`via`) must also be in the target list. If the
|
|
31
|
+
* primary is absent, a guidance warning is emitted and no action is
|
|
32
|
+
* generated. When false or absent, the agent can deploy to the surface
|
|
33
|
+
* on its own if the primary is not present.
|
|
34
|
+
*/
|
|
35
|
+
requiresPrimary?: boolean;
|
|
36
|
+
};
|
|
10
37
|
path: AgentPaths;
|
|
11
38
|
schemaLabel: string;
|
|
12
39
|
mcpPatchKey?: string;
|
|
@@ -50,15 +77,35 @@ export interface AgentConfig {
|
|
|
50
77
|
* (e.g. GitHub Copilot reads `.claude/skills/` directly).
|
|
51
78
|
*/
|
|
52
79
|
skills?: AgentPaths;
|
|
80
|
+
/**
|
|
81
|
+
* When `skills` is absent, this field explains why. Currently only
|
|
82
|
+
* "shared-via" is used — the agent reads skills from the `via` agent's
|
|
83
|
+
* deployment path natively and needs no separate skills deploy action.
|
|
84
|
+
*/
|
|
85
|
+
skillsSurfaceKind?: {
|
|
86
|
+
kind: "shared-via";
|
|
87
|
+
via: AgentId;
|
|
88
|
+
};
|
|
53
89
|
detectPaths: AgentPaths;
|
|
54
90
|
detectBinary: string | null;
|
|
55
91
|
provenance: AgentProvenance;
|
|
56
92
|
mcpSupport?: AgentSurfaceSupport;
|
|
57
93
|
agentRulesSupport?: AgentSurfaceSupport;
|
|
58
94
|
agentRulesRepoSupport?: AgentSurfaceSupport;
|
|
95
|
+
agentRulesWorkspaceSupport?: AgentSurfaceSupport;
|
|
59
96
|
permissionsSupport?: AgentSurfaceSupport;
|
|
60
97
|
agentDefinitionsSupport?: AgentSurfaceSupport;
|
|
61
98
|
policyNote?: string;
|
|
99
|
+
/**
|
|
100
|
+
* When true, instruction files deployed to this agent must include valid
|
|
101
|
+
* YAML frontmatter. Drives validateInstructionFileRequirements without
|
|
102
|
+
* hardcoded agent-ID checks.
|
|
103
|
+
*/
|
|
104
|
+
instructionFrontmatterRequired?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* When true, preflight runs enterprise-policy detection for this agent.
|
|
107
|
+
*/
|
|
108
|
+
enterprisePolicyDetection?: boolean;
|
|
62
109
|
}
|
|
63
110
|
export interface PlanWarning {
|
|
64
111
|
kind: "confidence" | "collision" | "ambiguity";
|