@kuznai/inception-engine 0.19.0 → 0.21.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.
Files changed (111) hide show
  1. package/README.md +50 -22
  2. package/dist/{config → src/config}/agents.js +113 -14
  3. package/dist/{core → src/core}/adapters/agent-definitions.d.ts +0 -12
  4. package/dist/src/core/adapters/agent-definitions.js +162 -0
  5. package/dist/{core → src/core}/adapters/frontmatter.d.ts +10 -0
  6. package/dist/{core → src/core}/adapters/frontmatter.js +23 -6
  7. package/dist/src/core/adapters/index.js +25 -0
  8. package/dist/{core → src/core}/adapters/mcp.js +17 -20
  9. package/dist/{core → src/core}/adapters/permissions.js +16 -20
  10. package/dist/{core → src/core}/adapters/rules.js +26 -50
  11. package/dist/src/core/capabilities.d.ts +47 -0
  12. package/dist/src/core/capabilities.js +280 -0
  13. package/dist/{core → src/core}/deploy.js +82 -54
  14. package/dist/{core → src/core}/detect.js +2 -7
  15. package/dist/{core → src/core}/init.js +20 -25
  16. package/dist/src/core/merge-patch.d.ts +4 -0
  17. package/dist/src/core/merge-patch.js +46 -0
  18. package/dist/{core → src/core}/ownership.js +13 -0
  19. package/dist/src/core/preflight.js +296 -0
  20. package/dist/{core → src/core}/revert.js +86 -26
  21. package/dist/{core → src/core}/validation.js +31 -0
  22. package/dist/{errors.d.ts → src/errors.d.ts} +3 -1
  23. package/dist/{errors.js → src/errors.js} +2 -2
  24. package/dist/{schemas → src/schemas}/manifest.d.ts +20 -0
  25. package/dist/{schemas → src/schemas}/manifest.js +11 -0
  26. package/dist/{schemas → src/schemas}/registry.d.ts +36 -0
  27. package/dist/{schemas → src/schemas}/registry.js +12 -4
  28. package/dist/{types.d.ts → src/types.d.ts} +15 -0
  29. package/dist/test/helpers/fs.d.ts +2 -0
  30. package/dist/test/helpers/fs.js +17 -0
  31. package/dist/test/helpers/path.d.ts +10 -0
  32. package/dist/test/helpers/path.js +15 -0
  33. package/dist/test/helpers/skill-dir-scenarios.d.ts +7 -0
  34. package/dist/test/helpers/skill-dir-scenarios.js +206 -0
  35. package/dist/test/helpers/skill-dir.d.ts +7 -0
  36. package/dist/test/helpers/skill-dir.js +46 -0
  37. package/dist/test/os/cross-platform/cross-platform.test.d.ts +1 -0
  38. package/dist/test/os/cross-platform/cross-platform.test.js +328 -0
  39. package/dist/test/os/posix/skill-dir.test.d.ts +1 -0
  40. package/dist/test/os/posix/skill-dir.test.js +19 -0
  41. package/dist/test/os/windows/agentRules-integration.test.d.ts +1 -0
  42. package/dist/test/os/windows/agentRules-integration.test.js +245 -0
  43. package/dist/test/os/windows/revert-integration.test.d.ts +1 -0
  44. package/dist/test/os/windows/revert-integration.test.js +72 -0
  45. package/dist/test/os/windows/skill-dir.test.d.ts +1 -0
  46. package/dist/test/os/windows/skill-dir.test.js +19 -0
  47. package/dist/test/unit/adapters.test.d.ts +1 -0
  48. package/dist/test/unit/adapters.test.js +1017 -0
  49. package/dist/test/unit/capabilities.test.d.ts +1 -0
  50. package/dist/test/unit/capabilities.test.js +71 -0
  51. package/dist/test/unit/cli.test.d.ts +1 -0
  52. package/dist/test/unit/cli.test.js +834 -0
  53. package/dist/test/unit/deploy.test.d.ts +1 -0
  54. package/dist/test/unit/deploy.test.js +2481 -0
  55. package/dist/test/unit/detect.test.d.ts +1 -0
  56. package/dist/test/unit/detect.test.js +192 -0
  57. package/dist/test/unit/enterprise.test.d.ts +1 -0
  58. package/dist/test/unit/enterprise.test.js +106 -0
  59. package/dist/test/unit/frontmatter.test.d.ts +1 -0
  60. package/dist/test/unit/frontmatter.test.js +102 -0
  61. package/dist/test/unit/gemini-north-star.test.d.ts +1 -0
  62. package/dist/test/unit/gemini-north-star.test.js +243 -0
  63. package/dist/test/unit/init-fixture.test.d.ts +1 -0
  64. package/dist/test/unit/init-fixture.test.js +153 -0
  65. package/dist/test/unit/manifest.test.d.ts +1 -0
  66. package/dist/test/unit/manifest.test.js +737 -0
  67. package/dist/test/unit/migration-golden.test.d.ts +1 -0
  68. package/dist/test/unit/migration-golden.test.js +197 -0
  69. package/dist/test/unit/ownership.test.d.ts +1 -0
  70. package/dist/test/unit/ownership.test.js +587 -0
  71. package/dist/test/unit/preflight.test.d.ts +1 -0
  72. package/dist/test/unit/preflight.test.js +521 -0
  73. package/dist/test/unit/resolve.test.d.ts +1 -0
  74. package/dist/test/unit/resolve.test.js +119 -0
  75. package/dist/test/unit/revert.test.d.ts +1 -0
  76. package/dist/test/unit/revert.test.js +1004 -0
  77. package/dist/test/unit/toml.test.d.ts +1 -0
  78. package/dist/test/unit/toml.test.js +55 -0
  79. package/package.json +1 -1
  80. package/dist/core/adapters/agent-definitions.js +0 -91
  81. package/dist/core/adapters/index.js +0 -30
  82. package/dist/core/preflight.js +0 -168
  83. /package/dist/{config → src/config}/agents.d.ts +0 -0
  84. /package/dist/{config → src/config}/manifest.d.ts +0 -0
  85. /package/dist/{config → src/config}/manifest.js +0 -0
  86. /package/dist/{core → src/core}/adapters/index.d.ts +0 -0
  87. /package/dist/{core → src/core}/adapters/mcp.d.ts +0 -0
  88. /package/dist/{core → src/core}/adapters/permissions.d.ts +0 -0
  89. /package/dist/{core → src/core}/adapters/rules.d.ts +0 -0
  90. /package/dist/{core → src/core}/adapters/toml.d.ts +0 -0
  91. /package/dist/{core → src/core}/adapters/toml.js +0 -0
  92. /package/dist/{core → src/core}/deploy.d.ts +0 -0
  93. /package/dist/{core → src/core}/detect.d.ts +0 -0
  94. /package/dist/{core → src/core}/init.d.ts +0 -0
  95. /package/dist/{core → src/core}/ownership.d.ts +0 -0
  96. /package/dist/{core → src/core}/preflight.d.ts +0 -0
  97. /package/dist/{core → src/core}/resolve.d.ts +0 -0
  98. /package/dist/{core → src/core}/resolve.js +0 -0
  99. /package/dist/{core → src/core}/revert.d.ts +0 -0
  100. /package/dist/{core → src/core}/runtime-paths.d.ts +0 -0
  101. /package/dist/{core → src/core}/runtime-paths.js +0 -0
  102. /package/dist/{core → src/core}/validation.d.ts +0 -0
  103. /package/dist/{formatters.d.ts → src/formatters.d.ts} +0 -0
  104. /package/dist/{formatters.js → src/formatters.js} +0 -0
  105. /package/dist/{index.d.ts → src/index.d.ts} +0 -0
  106. /package/dist/{index.js → src/index.js} +0 -0
  107. /package/dist/{logger.d.ts → src/logger.d.ts} +0 -0
  108. /package/dist/{logger.js → src/logger.js} +0 -0
  109. /package/dist/{schemas → src/schemas}/errors.d.ts +0 -0
  110. /package/dist/{schemas → src/schemas}/errors.js +0 -0
  111. /package/dist/{types.js → src/types.js} +0 -0
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,55 @@
1
+ import assert from "node:assert/strict";
2
+ import fs from "node:fs/promises";
3
+ import os from "node:os";
4
+ import path from "node:path";
5
+ import { afterEach, beforeEach, describe, it } from "node:test";
6
+ import { applyTomlMcpPatch, revertTomlMcpPatch, } from "../../src/core/adapters/toml.js";
7
+ describe("TOML Adapter", () => {
8
+ let tmpDir;
9
+ beforeEach(async () => {
10
+ tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), "inception-toml-test-"));
11
+ });
12
+ afterEach(async () => {
13
+ await fs.rm(tmpDir, { recursive: true, force: true });
14
+ });
15
+ it("applies an MCP server patch to a new TOML file", async () => {
16
+ const target = path.join(tmpDir, "config.toml");
17
+ const config = { command: "npx", args: ["serve"] };
18
+ await applyTomlMcpPatch(target, "my-skill", config);
19
+ const content = await fs.readFile(target, "utf-8");
20
+ assert.match(content, /\[mcpServers\.my-skill\]/);
21
+ assert.match(content, /command = "npx"/);
22
+ assert.match(content, /args = \[ "serve" \]/);
23
+ });
24
+ it("applies an MCP server patch to an existing TOML file preserving other keys", async () => {
25
+ const target = path.join(tmpDir, "config.toml");
26
+ await fs.writeFile(target, 'title = "My App"\n\n[mcpServers.other]\ncommand = "ls"\n');
27
+ const config = { command: "npx", args: ["serve"] };
28
+ await applyTomlMcpPatch(target, "my-skill", config);
29
+ const content = await fs.readFile(target, "utf-8");
30
+ assert.match(content, /title = "My App"/);
31
+ assert.match(content, /\[mcpServers\.other\]/);
32
+ assert.match(content, /\[mcpServers\.my-skill\]/);
33
+ assert.match(content, /command = "npx"/);
34
+ });
35
+ it("reverts an MCP server patch", async () => {
36
+ const target = path.join(tmpDir, "config.toml");
37
+ await fs.writeFile(target, '[mcpServers.other]\ncommand = "ls"\n\n[mcpServers.my-skill]\ncommand = "npx"\n');
38
+ await revertTomlMcpPatch(target, "my-skill");
39
+ const content = await fs.readFile(target, "utf-8");
40
+ assert.match(content, /\[mcpServers\.other\]/);
41
+ assert.doesNotMatch(content, /my-skill/);
42
+ });
43
+ it("cleans up [mcpServers] table if it becomes empty after revert", async () => {
44
+ const target = path.join(tmpDir, "config.toml");
45
+ await fs.writeFile(target, '[mcpServers.my-skill]\ncommand = "npx"\n');
46
+ await revertTomlMcpPatch(target, "my-skill");
47
+ const content = await fs.readFile(target, "utf-8");
48
+ assert.strictEqual(content.trim(), "");
49
+ });
50
+ it("throws error if config.toml is invalid TOML", async () => {
51
+ const target = path.join(tmpDir, "config.toml");
52
+ await fs.writeFile(target, 'this is not = toml "bad"');
53
+ await assert.rejects(() => applyTomlMcpPatch(target, "any", {}), /Invalid TOML document/);
54
+ });
55
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kuznai/inception-engine",
3
- "version": "0.19.0",
3
+ "version": "0.21.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",
@@ -1,91 +0,0 @@
1
- import path from "node:path";
2
- import { AGENT_REGISTRY_BY_ID } from "../../config/agents.js";
3
- import { getPlatformKey, resolvePlaceholders } from "../resolve.js";
4
- import { validateAgentRuleMarkdownPath, validateInstructionFileRequirements, validateSourceFile, validateSourcePath, } from "../validation.js";
5
- /**
6
- * Compiles deploy actions for agentDefinitions manifest entries.
7
- *
8
- * Agent definition files are Markdown files (typically with YAML frontmatter)
9
- * that define custom agents or subagents for a given platform. Unlike
10
- * agentRules (which target a single shared global file per agent), each
11
- * definition entry produces a separate file named after the entry in the
12
- * agent's dedicated agent-definitions directory (repo-local).
13
- *
14
- * Target paths use the `{repo}` placeholder so definitions land in the
15
- * repository being deployed, not the user's home directory.
16
- */
17
- export async function compileAgentDefinitionActions(entry, sourceDir, resolvedSourceDir, realRoot, detectedAgents, home, repo, workspace) {
18
- const actions = [];
19
- const warnings = [];
20
- const platform = getPlatformKey();
21
- const targetAgents = entry.agents.filter((agentId) => detectedAgents.includes(agentId));
22
- const supportedTargets = [];
23
- if (targetAgents.length === 0) {
24
- return { actions, warnings };
25
- }
26
- for (const agentId of targetAgents) {
27
- const agent = AGENT_REGISTRY_BY_ID[agentId];
28
- const support = agent?.agentDefinitionsSupport;
29
- if (!support || support.status === "unsupported") {
30
- warnings.push({
31
- kind: "confidence",
32
- message: `agentDefinitions: agent "${agentId}" uses ${support?.schemaLabel ?? "an unsupported agent-definition schema"} and ${support?.status === "unsupported" ? support.reason : "does not expose a supported agent-definitions adapter"} — skipping "${entry.name}"`,
33
- });
34
- continue;
35
- }
36
- if (support.status === "planned") {
37
- warnings.push({
38
- kind: "confidence",
39
- message: `agentDefinitions: agent "${agentId}" agent-definitions support is planned via ${support.plannedSurface} — skipping "${entry.name}" until that surface is implemented`,
40
- });
41
- continue;
42
- }
43
- supportedTargets.push({
44
- agentId,
45
- confidence: agent.provenance.agentDefinitions ?? "provisional",
46
- target: resolvePlaceholders(support.path[platform], entry.name, home, repo, workspace),
47
- });
48
- }
49
- if (supportedTargets.length === 0) {
50
- return { actions, warnings };
51
- }
52
- // Validate the shared source file only when at least one target is active.
53
- const source = path.resolve(sourceDir, entry.path);
54
- await validateSourcePath(source, entry.path, resolvedSourceDir, realRoot);
55
- await validateSourceFile(source, entry.path);
56
- for (const target of supportedTargets) {
57
- validateAgentRuleMarkdownPath(entry.path, target.agentId);
58
- await validateInstructionFileRequirements(source, entry.path, target.agentId);
59
- actions.push({
60
- kind: "file-write",
61
- skill: entry.name,
62
- agent: target.agentId,
63
- source,
64
- target: target.target,
65
- confidence: target.confidence,
66
- });
67
- }
68
- return { actions, warnings };
69
- }
70
- export function compileAgentDefinitionReverts(entry, agentFilter, home, repo, workspace) {
71
- const actions = [];
72
- const platform = getPlatformKey();
73
- for (const agentId of entry.agents) {
74
- if (agentFilter && !agentFilter.includes(agentId))
75
- continue;
76
- const agent = AGENT_REGISTRY_BY_ID[agentId];
77
- const support = agent?.agentDefinitionsSupport;
78
- if (!support ||
79
- support.status === "unsupported" ||
80
- support.status === "planned")
81
- continue;
82
- const target = resolvePlaceholders(support.path[platform], entry.name, home, repo, workspace);
83
- actions.push({
84
- kind: "file-write",
85
- skill: entry.name,
86
- agent: agentId,
87
- target,
88
- });
89
- }
90
- return actions;
91
- }
@@ -1,30 +0,0 @@
1
- import { compileAgentDefinitionActions, compileAgentDefinitionReverts, } from "./agent-definitions.js";
2
- import { compileMcpServerActions, compileMcpServerReverts } from "./mcp.js";
3
- import { compilePermissionsActions, compilePermissionsReverts, } from "./permissions.js";
4
- import { compileAgentRuleActions, compileAgentRuleReverts } from "./rules.js";
5
- export { compileAgentDefinitionReverts, compileAgentRuleReverts, compileMcpServerReverts, compilePermissionsReverts, };
6
- export async function compileAdapterActions(mcpServers, agentRules, permissions, sourceDir, resolvedSourceDir, realRoot, detectedAgents, home, repo, agentDefinitions, workspace) {
7
- const actions = [];
8
- const warnings = [];
9
- for (const entry of mcpServers) {
10
- const r = compileMcpServerActions(entry, detectedAgents, home, repo, workspace);
11
- actions.push(...r.actions);
12
- warnings.push(...r.warnings);
13
- }
14
- for (const entry of agentRules) {
15
- const r = await compileAgentRuleActions(entry, sourceDir, resolvedSourceDir, realRoot, detectedAgents, home, repo, workspace);
16
- actions.push(...r.actions);
17
- warnings.push(...r.warnings);
18
- }
19
- for (const entry of permissions) {
20
- const r = compilePermissionsActions(entry, detectedAgents, home);
21
- actions.push(...r.actions);
22
- warnings.push(...r.warnings);
23
- }
24
- for (const entry of agentDefinitions ?? []) {
25
- const r = await compileAgentDefinitionActions(entry, sourceDir, resolvedSourceDir, realRoot, detectedAgents, home, repo, workspace);
26
- actions.push(...r.actions);
27
- warnings.push(...r.warnings);
28
- }
29
- return { actions, warnings };
30
- }
@@ -1,168 +0,0 @@
1
- import { readFile, stat } from "node:fs/promises";
2
- import path from "node:path";
3
- import { AGENT_REGISTRY_BY_ID } from "../config/agents.js";
4
- import { resolveRuntimePaths } from "./runtime-paths.js";
5
- const BUDGET_WARN_BYTES = 50 * 1024; // 50 KB
6
- async function detectEnterpriseManagement(agentId, home) {
7
- if (!AGENT_REGISTRY_BY_ID[agentId]?.enterprisePolicyDetection)
8
- return null;
9
- // Check for common GitHub Enterprise environment variables
10
- if (process.env.GITHUB_ENTERPRISE_URL ||
11
- process.env.GH_ENTERPRISE_TOKEN ||
12
- process.env.GITHUB_TOKEN_TYPE === "enterprise") {
13
- return "GitHub Enterprise environment variables detected. Enterprise policies may override local configurations.";
14
- }
15
- const { xdgConfig, localAppdata } = resolveRuntimePaths(home);
16
- const configPath = process.platform === "win32"
17
- ? path.join(localAppdata, "github-copilot", "hosts.json")
18
- : path.join(xdgConfig, "github-copilot", "hosts.json");
19
- try {
20
- const content = await readFile(configPath, "utf8");
21
- const hosts = JSON.parse(content);
22
- const hostNames = Object.keys(hosts);
23
- const enterpriseHosts = hostNames.filter((h) => h !== "github.com" && h !== "localhost");
24
- if (enterpriseHosts.length > 0) {
25
- return `GitHub Copilot is authenticated against enterprise host(s): ${enterpriseHosts.join(", ")}. Enterprise policies may override local configurations.`;
26
- }
27
- }
28
- catch (err) {
29
- const code = err.code;
30
- if (code !== "ENOENT" &&
31
- code !== "EACCES" &&
32
- code !== "EPERM" &&
33
- code !== undefined) {
34
- throw err;
35
- }
36
- }
37
- return null;
38
- }
39
- function groupRulesByPath(rulesForAgent) {
40
- const entriesByPath = new Map();
41
- for (const entry of rulesForAgent ?? []) {
42
- const list = entriesByPath.get(entry.path) ?? [];
43
- list.push({ name: entry.name, scope: entry.scope });
44
- entriesByPath.set(entry.path, list);
45
- }
46
- return entriesByPath;
47
- }
48
- function detectScopeOverlaps(agentId, rulesForAgent) {
49
- const warnings = [];
50
- const entriesByPath = groupRulesByPath(rulesForAgent);
51
- for (const [path, list] of entriesByPath) {
52
- const scopes = new Set(list.map((l) => l.scope));
53
- if (scopes.size < 2)
54
- continue;
55
- const scopeList = Array.from(scopes).sort();
56
- for (let i = 0; i < scopeList.length; i++) {
57
- for (let j = i + 1; j < scopeList.length; j++) {
58
- const entryB = list.find((l) => l.scope === scopeList[j]);
59
- if (entryB) {
60
- warnings.push({
61
- kind: "precedence",
62
- message: `Agent "${agentId}" has agentRules entry "${entryB.name}" deployed to both ${scopeList[i]} and ${scopeList[j]} scope from the same source path "${path}". The file will be written to two distinct targets — verify this is intentional and not a copy-paste mistake.`,
63
- });
64
- }
65
- }
66
- }
67
- }
68
- return warnings;
69
- }
70
- function detectMultipleActiveInstructionScopes(agentId, rulesForAgent) {
71
- const activeScopes = Array.from(new Set((rulesForAgent ?? []).map((e) => e.scope))).sort();
72
- if (activeScopes.length <= 1)
73
- return [];
74
- const scopeDescriptions = activeScopes
75
- .map((s) => {
76
- const entries = (rulesForAgent ?? []).filter((e) => e.scope === s);
77
- return `${s} [${entries.map((e) => `"${e.name}"`).join(", ")}]`;
78
- })
79
- .join(" and ");
80
- return [
81
- {
82
- kind: "precedence",
83
- message: `Agent "${agentId}" will have multiple instruction files active simultaneously across ${activeScopes.length} scopes: ${scopeDescriptions}. All will be loaded by the agent — ensure the content is intended to stack and does not conflict.`,
84
- },
85
- ];
86
- }
87
- function detectInstructionPrecedence(detectedAgents, manifest) {
88
- const warnings = [];
89
- for (const agentId of detectedAgents) {
90
- const rulesForAgent = (manifest.agentRules ?? []).filter((e) => e.agents.includes(agentId));
91
- warnings.push(...detectScopeOverlaps(agentId, rulesForAgent));
92
- warnings.push(...detectMultipleActiveInstructionScopes(agentId, rulesForAgent));
93
- }
94
- return warnings;
95
- }
96
- async function detectInstructionBudgetRisk(detectedAgents, manifest, sourceDir) {
97
- const warnings = [];
98
- const checkedPaths = new Set();
99
- async function checkEntry(entryPath, label, agentIds) {
100
- if (!agentIds.some((id) => detectedAgents.includes(id)))
101
- return;
102
- const sourcePath = path.resolve(sourceDir, entryPath);
103
- if (checkedPaths.has(sourcePath))
104
- return;
105
- checkedPaths.add(sourcePath);
106
- try {
107
- const fileStat = await stat(sourcePath);
108
- if (fileStat.size > BUDGET_WARN_BYTES) {
109
- const sizeKb = (fileStat.size / 1024).toFixed(1);
110
- warnings.push({
111
- kind: "budget",
112
- message: `${label} source "${entryPath}" is ${sizeKb} KB — large instruction files risk crowding out code context in the agent's context window. Consider splitting into smaller focused files.`,
113
- });
114
- }
115
- }
116
- catch (err) {
117
- const code = err.code;
118
- if (code !== "ENOENT" && code !== "EACCES" && code !== "EPERM")
119
- throw err;
120
- // Missing/unreadable files are silently skipped; compileAgentRuleActions
121
- // will produce the proper UserError during action compilation.
122
- }
123
- }
124
- for (const entry of manifest.agentRules ?? []) {
125
- await checkEntry(entry.path, "agentRules", entry.agents);
126
- }
127
- for (const entry of manifest.agentDefinitions ?? []) {
128
- await checkEntry(entry.path, "agentDefinitions", entry.agents);
129
- }
130
- return warnings;
131
- }
132
- export async function runPreflight(options, manifest, home, detectedAgents) {
133
- const warnings = [];
134
- for (const agentId of detectedAgents) {
135
- const agent = AGENT_REGISTRY_BY_ID[agentId];
136
- if (!agent)
137
- continue;
138
- if (agent.provenance.skills === "implementation-only") {
139
- warnings.push({
140
- kind: "config-authority",
141
- message: `Agent "${agentId}" skill support is implementation-only: paths are derived from source inspection, not published documentation.`,
142
- });
143
- }
144
- else if (agent.provenance.skills === "provisional") {
145
- warnings.push({
146
- kind: "config-authority",
147
- message: `Agent "${agentId}" skill support is provisional: behavior has not been independently verified.`,
148
- });
149
- }
150
- const enterpriseWarning = await detectEnterpriseManagement(agentId, home);
151
- if (enterpriseWarning) {
152
- warnings.push({
153
- kind: "policy",
154
- message: `Agent "${agentId}": ${enterpriseWarning}`,
155
- });
156
- }
157
- else if (agent.policyNote &&
158
- !agent.policyNote.includes("Organization policies may override")) {
159
- warnings.push({
160
- kind: "policy",
161
- message: `Agent "${agentId}": ${agent.policyNote}`,
162
- });
163
- }
164
- }
165
- warnings.push(...detectInstructionPrecedence(detectedAgents, manifest));
166
- warnings.push(...(await detectInstructionBudgetRisk(detectedAgents, manifest, options.directory)));
167
- return warnings;
168
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes