@hasna/instructions 0.4.3 → 0.4.5
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 +19 -7
- package/dist/cli/index.js +3128 -3063
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1685 -1452
- package/dist/lib/apply.d.ts.map +1 -1
- package/dist/lib/config-agents.d.ts +6 -0
- package/dist/lib/config-agents.d.ts.map +1 -0
- package/dist/lib/global-agent-rules-standard.d.ts +6 -0
- package/dist/lib/global-agent-rules-standard.d.ts.map +1 -0
- package/dist/lib/global-agent-rules-standard.test.d.ts +2 -0
- package/dist/lib/global-agent-rules-standard.test.d.ts.map +1 -0
- package/dist/lib/session-render.d.ts +9 -4
- package/dist/lib/session-render.d.ts.map +1 -1
- package/dist/lib/sync.d.ts.map +1 -1
- package/dist/mcp/index.js +95 -22
- package/dist/server/index.js +38 -58
- package/dist/status.d.ts +3 -0
- package/dist/status.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/lib/apply.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../src/lib/apply.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAgB,MAAM,mBAAmB,CAAC;AAE3E,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../src/lib/apply.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAgB,MAAM,mBAAmB,CAAC;AAE3E,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAM1D,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAK5C;AAED,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAsBrD;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;CAC/B;AAiED,wBAAsB,WAAW,CAC/B,MAAM,EAAE,MAAM,EACd,IAAI,GAAE,YAAiB,GACtB,OAAO,CAAC,WAAW,CAAC,CAmDtB;AAeD,wBAAsB,YAAY,CAChC,OAAO,EAAE,MAAM,EAAE,EACjB,IAAI,GAAE,YAAiB,GACtB,OAAO,CAAC,WAAW,EAAE,CAAC,CAQxB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const DEPRECATED_CONFIG_AGENTS: readonly ["gemini"];
|
|
2
|
+
export declare function isDeprecatedConfigAgent(agent: string | null | undefined): boolean;
|
|
3
|
+
export declare function isSupportedConfigAgent(agent: string | null | undefined): boolean;
|
|
4
|
+
export declare function isRetiredOrUnsupportedConfigAgent(agent: string | null | undefined): boolean;
|
|
5
|
+
export declare function retiredOrUnsupportedAgentReason(agent: string | null | undefined): string;
|
|
6
|
+
//# sourceMappingURL=config-agents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-agents.d.ts","sourceRoot":"","sources":["../../src/lib/config-agents.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,wBAAwB,qBAAsB,CAAC;AAK5D,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAEjF;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAEhF;AAED,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAE3F;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAGxF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Config } from "../types/index.js";
|
|
2
|
+
import { type ConfigStore } from "../data/config-store.js";
|
|
3
|
+
export declare const GLOBAL_AGENT_RULES_STANDARD_SLUG = "global-agent-rules-standard";
|
|
4
|
+
export declare const GLOBAL_AGENT_RULES_STANDARD_CONTENT = "# Global Coding Agent Rules Standard\n\nThis standard is managed global/system prompt source content for Hasna coding\nagents. Rendered agents must receive these rules unless a newer authorized\npolicy source supersedes them.\n\n## Session and Planning Defaults\n\n1. Use automatic session renaming when the agent supports it. Rename the\n session early to match the active task; if the task materially pivots, rename\n it again so operators can identify the run.\n2. Never set Codewith goal/token budgets or goal-plan budgets unless the user\n explicitly asks for a budget. Durable goals and goal plans are unbudgeted by\n default.\n\n## Repository Mutation and Landing\n\n3. Repo mutation must happen in a task-scoped worktree. First inspect the canonical worktree root\n `$HOME/.hasna/repos/worktrees`; prefer Hasna repo/project worktree\n mechanisms when available; otherwise use `git worktree`. Never mutate shared checkouts.\n4. PR-first landing: normal changes go through a branch/worktree and pull\n request before landing.\n5. Never push directly to `main`, the default branch, or any protected branch\n unless the user explicitly instructs that exact repo and operation.\n\n## Autonomy and Source-of-Truth Tools\n\n6. Act autonomously. Diagnose, repair, validate, and iterate on the owning\n CLIs, packages, and workflows before asking the user. Ask only when blocked\n by destructive decisions, secret-bearing decisions, user-only authority, or\n external state the agent cannot safely obtain.\n7. Use Hasna CLIs/packages as the source of truth: `todos`, `conversations`,\n `mementos`, `knowledge`, `projects`, `repos`, `accounts`,\n `instructions`, `machines`, `secrets`, and `access`.\n8. Secrets safety is mandatory. Never expose secrets in prompts, tasks,\n memories, conversations, manifests, reports, logs, PR text, or any other\n agent-visible output. Reference vault item names, secret identifiers, and\n access grants only; never print credential values.\n\n## Conversation Surfaces\n\n9. Use default conversation surfaces correctly: `announcements` for policy,\n freeze, breaking, cutover, and release notices; `incidents` for outages,\n crash loops, data risk, or security exposure; `git-publishing` before and\n after package publishes; `git-prs`, `git-commits`, and `git-releases`\n for repository landing events; `hq` for broad coordination;\n `agent-policy` for agent operating-rule discussion; project/product\n channels for normal work; and `conversations blockers` for blocker\n discovery. Do not invent or refer to a literal blockers channel.\n";
|
|
5
|
+
export declare function ensureGlobalAgentRulesStandardConfig(store?: ConfigStore): Promise<Config>;
|
|
6
|
+
//# sourceMappingURL=global-agent-rules-standard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-agent-rules-standard.d.ts","sourceRoot":"","sources":["../../src/lib/global-agent-rules-standard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE/E,eAAO,MAAM,gCAAgC,gCAAgC,CAAC;AAE9E,eAAO,MAAM,mCAAmC,ikFAiD/C,CAAC;AAEF,wBAAsB,oCAAoC,CAAC,KAAK,GAAE,WAAkC,GAAG,OAAO,CAAC,MAAM,CAAC,CA6BrH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-agent-rules-standard.test.d.ts","sourceRoot":"","sources":["../../src/lib/global-agent-rules-standard.test.ts"],"names":[],"mappings":""}
|
|
@@ -3,10 +3,13 @@ export declare const CODEWITH_NATIVE_IMPORTS_ENV = "HASNA_CONFIGS_CODEWITH_NATIV
|
|
|
3
3
|
export declare const SESSION_RENDER_MANAGED_MARKER = "Managed by @hasna/configs session render";
|
|
4
4
|
export declare const SESSION_RENDER_SCHEMA = "hasna.configs.session-render/v1";
|
|
5
5
|
export declare const RAW_STORE_ROOT_ENV = "HASNA_CONFIGS_HOME";
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const ANTIGRAVITY_RULE_FILE_CHAR_LIMIT = 12000;
|
|
7
|
+
export declare const SESSION_RENDER_TOOLS: readonly ["claude", "codex", "cursor", "opencode", "codewith", "aicopilot", "antigravity"];
|
|
7
8
|
export type SessionRenderTool = (typeof SESSION_RENDER_TOOLS)[number];
|
|
8
|
-
export type SessionRenderMode = "native-imports" | "flattened-markdown" | "cursor-mdc" | "opencode-instructions";
|
|
9
|
-
export
|
|
9
|
+
export type SessionRenderMode = "native-imports" | "flattened-markdown" | "cursor-mdc" | "opencode-instructions" | "antigravity-rules";
|
|
10
|
+
export declare const SESSION_INSTRUCTION_LAYERS: readonly ["global", "tool", "account", "machine", "division", "workspace", "repo", "path", "agent", "session", "local"];
|
|
11
|
+
export type SessionInstructionLayer = (typeof SESSION_INSTRUCTION_LAYERS)[number];
|
|
12
|
+
export type SessionInstructionLayerAlias = SessionInstructionLayer | "provider" | "identity" | "project";
|
|
10
13
|
export type SessionInstructionMerge = "append" | "replace";
|
|
11
14
|
export type SessionRenderFileRole = "index" | "fragment" | "rule" | "config" | "manifest";
|
|
12
15
|
export type SessionRenderTargetKind = "session-home" | "project-root" | "blocked";
|
|
@@ -44,7 +47,7 @@ export interface SessionInstructionSource {
|
|
|
44
47
|
id: string;
|
|
45
48
|
content: string;
|
|
46
49
|
label?: string;
|
|
47
|
-
layer?:
|
|
50
|
+
layer?: SessionInstructionLayerAlias;
|
|
48
51
|
merge?: SessionInstructionMerge;
|
|
49
52
|
order?: number;
|
|
50
53
|
path?: string;
|
|
@@ -159,6 +162,8 @@ export interface SessionRenderPlan {
|
|
|
159
162
|
warnings: string[];
|
|
160
163
|
}
|
|
161
164
|
export declare const SESSION_TOOL_ADAPTERS: Record<SessionRenderTool, SessionToolAdapter>;
|
|
165
|
+
export declare const SESSION_LAYER_RANK: Record<SessionInstructionLayer, number>;
|
|
166
|
+
export declare function normalizeSessionInstructionLayer(value: unknown): SessionInstructionLayer;
|
|
162
167
|
export declare function cleanSessionPathInput(path: string): string;
|
|
163
168
|
export declare function resolveSessionPath(path: string): string;
|
|
164
169
|
export declare function resolveSessionTargetOwnership(input: Pick<SessionRenderInput, "tool" | "profile" | "projectRoot">, target: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-render.d.ts","sourceRoot":"","sources":["../../src/lib/session-render.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,eAAO,MAAM,2BAA2B,0CAA0C,CAAC;AACnF,eAAO,MAAM,6BAA6B,6CAA6C,CAAC;AACxF,eAAO,MAAM,qBAAqB,oCAAoC,CAAC;AACvE,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AAEvD,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"session-render.d.ts","sourceRoot":"","sources":["../../src/lib/session-render.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,eAAO,MAAM,2BAA2B,0CAA0C,CAAC;AACnF,eAAO,MAAM,6BAA6B,6CAA6C,CAAC;AACxF,eAAO,MAAM,qBAAqB,oCAAoC,CAAC;AACvE,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AACvD,eAAO,MAAM,gCAAgC,QAAS,CAAC;AAEvD,eAAO,MAAM,oBAAoB,4FAQvB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AACtE,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,GAAG,oBAAoB,GAAG,YAAY,GAAG,uBAAuB,GAAG,mBAAmB,CAAC;AACvI,eAAO,MAAM,0BAA0B,yHAY7B,CAA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AC,EAC3E,KAAK,SAAI,EACT,KAAK,CAAC,EAAE,uBAAuB,GAC9B,wBAAwB,CAc1B;AAED,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,OAAO,EACd,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAO,GAC9E,wBAAwB,EAAE,CAmB5B"}
|
package/dist/lib/sync.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/lib/sync.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACrH,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/lib/sync.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACrH,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAW/E,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,cAAc,CAAC;IACzB,KAAK,EAAE,WAAW,CAAC;IACnB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC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AAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,CAezD;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,CAQ3D;AAGD,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/mcp/index.js
CHANGED
|
@@ -19,8 +19,21 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
|
19
19
|
var __require = import.meta.require;
|
|
20
20
|
|
|
21
21
|
// src/types/index.ts
|
|
22
|
-
var ConfigNotFoundError, ProfileNotFoundError, ConfigApplyError, TemplateRenderError;
|
|
22
|
+
var CONFIG_AGENTS, ConfigNotFoundError, ProfileNotFoundError, ConfigApplyError, TemplateRenderError;
|
|
23
23
|
var init_types = __esm(() => {
|
|
24
|
+
CONFIG_AGENTS = [
|
|
25
|
+
"claude",
|
|
26
|
+
"codex",
|
|
27
|
+
"opencode",
|
|
28
|
+
"cursor",
|
|
29
|
+
"codewith",
|
|
30
|
+
"aicopilot",
|
|
31
|
+
"antigravity",
|
|
32
|
+
"zsh",
|
|
33
|
+
"git",
|
|
34
|
+
"npm",
|
|
35
|
+
"global"
|
|
36
|
+
];
|
|
24
37
|
ConfigNotFoundError = class ConfigNotFoundError extends Error {
|
|
25
38
|
constructor(id) {
|
|
26
39
|
super(`Config not found: ${id}`);
|
|
@@ -1078,6 +1091,33 @@ var init_config_store = __esm(() => {
|
|
|
1078
1091
|
};
|
|
1079
1092
|
});
|
|
1080
1093
|
|
|
1094
|
+
// src/lib/config-agents.ts
|
|
1095
|
+
function isDeprecatedConfigAgent(agent) {
|
|
1096
|
+
return !!agent && DEPRECATED_CONFIG_AGENT_SET.has(agent);
|
|
1097
|
+
}
|
|
1098
|
+
function isSupportedConfigAgent(agent) {
|
|
1099
|
+
return !!agent && ACTIVE_CONFIG_AGENT_SET.has(agent) && !isDeprecatedConfigAgent(agent);
|
|
1100
|
+
}
|
|
1101
|
+
function isRetiredOrUnsupportedConfigAgent(agent) {
|
|
1102
|
+
return !!agent && !isSupportedConfigAgent(agent);
|
|
1103
|
+
}
|
|
1104
|
+
function retiredOrUnsupportedAgentReason(agent) {
|
|
1105
|
+
if (!agent)
|
|
1106
|
+
return "missing agent";
|
|
1107
|
+
return isDeprecatedConfigAgent(agent) ? `deprecated agent: ${agent}` : `unsupported agent: ${agent}`;
|
|
1108
|
+
}
|
|
1109
|
+
var DEPRECATED_CONFIG_AGENTS, ACTIVE_CONFIG_AGENT_SET, DEPRECATED_CONFIG_AGENT_SET;
|
|
1110
|
+
var init_config_agents = __esm(() => {
|
|
1111
|
+
init_types();
|
|
1112
|
+
DEPRECATED_CONFIG_AGENTS = ["gemini"];
|
|
1113
|
+
ACTIVE_CONFIG_AGENT_SET = new Set(CONFIG_AGENTS);
|
|
1114
|
+
DEPRECATED_CONFIG_AGENT_SET = new Set(DEPRECATED_CONFIG_AGENTS);
|
|
1115
|
+
});
|
|
1116
|
+
|
|
1117
|
+
// src/lib/session-render.ts
|
|
1118
|
+
var ANTIGRAVITY_RULE_FILE_CHAR_LIMIT = 12000;
|
|
1119
|
+
var init_session_render = () => {};
|
|
1120
|
+
|
|
1081
1121
|
// src/lib/transforms.ts
|
|
1082
1122
|
import { basename, extname } from "path";
|
|
1083
1123
|
function ensureTrailingNewline(content) {
|
|
@@ -1236,6 +1276,10 @@ function normalizeTargetPath(p) {
|
|
|
1236
1276
|
async function writeConfigResult(config, targetPath, content, opts, meta = {}) {
|
|
1237
1277
|
const renderedTargetPath = opts.vars ? renderMachineAwareContent(targetPath, opts.vars) : targetPath;
|
|
1238
1278
|
const renderedContent = opts.vars ? renderMachineAwareContent(content, opts.vars) : content;
|
|
1279
|
+
const targetAgent = meta.agent ?? config.agent;
|
|
1280
|
+
if (isAntigravityRuleTarget(targetAgent, renderedTargetPath) && renderedContent.length > ANTIGRAVITY_RULE_FILE_CHAR_LIMIT) {
|
|
1281
|
+
throw new ConfigApplyError(`Antigravity rule file ${renderedTargetPath} is ${renderedContent.length} characters; split it before applying because Antigravity limits rule files to ${ANTIGRAVITY_RULE_FILE_CHAR_LIMIT} characters.`);
|
|
1282
|
+
}
|
|
1239
1283
|
const path = expandPath(renderedTargetPath);
|
|
1240
1284
|
const previousContent = existsSync3(path) ? readFileSync(path, "utf-8") : null;
|
|
1241
1285
|
const changed = previousContent !== renderedContent;
|
|
@@ -1260,6 +1304,9 @@ async function writeConfigResult(config, targetPath, content, opts, meta = {}) {
|
|
|
1260
1304
|
...meta
|
|
1261
1305
|
};
|
|
1262
1306
|
}
|
|
1307
|
+
function isAntigravityRuleTarget(agent, targetPath) {
|
|
1308
|
+
return agent === "antigravity" && /\.(md|mdc|markdown)$/i.test(targetPath);
|
|
1309
|
+
}
|
|
1263
1310
|
function isGeneratedOutputTarget(config, configs) {
|
|
1264
1311
|
if (!config.target_path)
|
|
1265
1312
|
return false;
|
|
@@ -1267,7 +1314,13 @@ function isGeneratedOutputTarget(config, configs) {
|
|
|
1267
1314
|
return configs.some((candidate) => candidate.id !== config.id && candidate.outputs.some((output) => normalizeTargetPath(output.target_path) === targetPath));
|
|
1268
1315
|
}
|
|
1269
1316
|
async function applyConfig(config, opts = {}) {
|
|
1270
|
-
|
|
1317
|
+
if (opts.outputAgent && isRetiredOrUnsupportedConfigAgent(opts.outputAgent)) {
|
|
1318
|
+
throw new ConfigApplyError(`Config output agent "${opts.outputAgent}" is retired or unsupported \u2014 cannot apply to disk.`);
|
|
1319
|
+
}
|
|
1320
|
+
if (isRetiredOrUnsupportedConfigAgent(config.agent)) {
|
|
1321
|
+
throw new ConfigApplyError(`Config "${config.name}" uses retired or unsupported agent "${config.agent}" \u2014 cannot apply to disk.`);
|
|
1322
|
+
}
|
|
1323
|
+
const selectedOutputs = opts.outputAgent ? config.outputs.filter((output) => output.agent === opts.outputAgent) : config.outputs.filter((output) => !isRetiredOrUnsupportedConfigAgent(output.agent));
|
|
1271
1324
|
const shouldApplyPrimary = !opts.outputAgent || config.agent === opts.outputAgent;
|
|
1272
1325
|
if (config.kind === "reference" || (!config.target_path || !shouldApplyPrimary) && selectedOutputs.length === 0) {
|
|
1273
1326
|
throw new ConfigApplyError(`Config "${config.name}" is a reference (kind=reference) and has no target_path \u2014 cannot apply to disk.`);
|
|
@@ -1310,6 +1363,8 @@ async function applyConfigs(configs, opts = {}) {
|
|
|
1310
1363
|
for (const config of configs) {
|
|
1311
1364
|
if (config.kind === "reference")
|
|
1312
1365
|
continue;
|
|
1366
|
+
if (isRetiredOrUnsupportedConfigAgent(config.agent))
|
|
1367
|
+
continue;
|
|
1313
1368
|
results.push(await applyConfig(config, opts));
|
|
1314
1369
|
}
|
|
1315
1370
|
return results;
|
|
@@ -1317,7 +1372,9 @@ async function applyConfigs(configs, opts = {}) {
|
|
|
1317
1372
|
var init_apply = __esm(() => {
|
|
1318
1373
|
init_types();
|
|
1319
1374
|
init_config_store();
|
|
1375
|
+
init_config_agents();
|
|
1320
1376
|
init_machine();
|
|
1377
|
+
init_session_render();
|
|
1321
1378
|
init_transforms();
|
|
1322
1379
|
});
|
|
1323
1380
|
|
|
@@ -1620,23 +1677,27 @@ async function syncProject(opts) {
|
|
|
1620
1677
|
result.skipped.push(pf.file);
|
|
1621
1678
|
}
|
|
1622
1679
|
}
|
|
1623
|
-
const
|
|
1624
|
-
|
|
1625
|
-
|
|
1680
|
+
for (const ruleDir of [
|
|
1681
|
+
{ dir: join3(absDir, ".claude", "rules"), agent: "claude", namePrefix: "rules" },
|
|
1682
|
+
{ dir: join3(absDir, ".agents", "rules"), agent: "antigravity", namePrefix: "antigravity-rules" }
|
|
1683
|
+
]) {
|
|
1684
|
+
if (!existsSync4(ruleDir.dir))
|
|
1685
|
+
continue;
|
|
1686
|
+
const mdFiles = readdirSync(ruleDir.dir).filter((f) => f.endsWith(".md") || f.endsWith(".mdc"));
|
|
1626
1687
|
for (const f of mdFiles) {
|
|
1627
|
-
const abs = join3(
|
|
1688
|
+
const abs = join3(ruleDir.dir, f);
|
|
1628
1689
|
const raw = readFileSync2(abs, "utf-8");
|
|
1629
1690
|
const redacted = redactContent(raw, "markdown");
|
|
1630
1691
|
const machineAware = templateizeMachineContent(redacted.content, machine);
|
|
1631
1692
|
const content = machineAware.content;
|
|
1632
1693
|
const isTemplate2 = redacted.isTemplate || machineAware.changed;
|
|
1633
|
-
const name = `${projectName}
|
|
1694
|
+
const name = `${projectName}/${ruleDir.namePrefix}/${f}`;
|
|
1634
1695
|
const targetPath = abs.startsWith(getConfigHome()) ? abs.replace(getConfigHome(), "~") : abs;
|
|
1635
1696
|
const slug = name.toLowerCase().replace(/[^a-z0-9]+/g, "-");
|
|
1636
1697
|
const existing = allConfigs.find((c) => c.target_path === targetPath || c.slug === slug);
|
|
1637
1698
|
if (!existing) {
|
|
1638
1699
|
if (!opts.dryRun)
|
|
1639
|
-
await store.createConfig({ name, category: "rules", agent:
|
|
1700
|
+
await store.createConfig({ name, category: "rules", agent: ruleDir.agent, format: "markdown", content, target_path: targetPath, is_template: isTemplate2 });
|
|
1640
1701
|
result.added++;
|
|
1641
1702
|
} else if (existing.content !== content) {
|
|
1642
1703
|
if (!opts.dryRun)
|
|
@@ -1774,6 +1835,10 @@ async function syncToDisk(opts = {}) {
|
|
|
1774
1835
|
for (const config of configs) {
|
|
1775
1836
|
if (!config.target_path && config.outputs.length === 0)
|
|
1776
1837
|
continue;
|
|
1838
|
+
if (isRetiredOrUnsupportedConfigAgent(config.agent)) {
|
|
1839
|
+
result.skipped.push(`${config.slug} (${retiredOrUnsupportedAgentReason(config.agent)})`);
|
|
1840
|
+
continue;
|
|
1841
|
+
}
|
|
1777
1842
|
try {
|
|
1778
1843
|
const r = await applyConfig(config, { dryRun: opts.dryRun, store, outputAgent: opts.agent });
|
|
1779
1844
|
r.changed ? result.updated++ : result.unchanged++;
|
|
@@ -1840,12 +1905,12 @@ async function diffConfig(config, opts = {}) {
|
|
|
1840
1905
|
}
|
|
1841
1906
|
function detectCategory(filePath) {
|
|
1842
1907
|
const p = filePath.toLowerCase().replace(getConfigHome(), "~");
|
|
1843
|
-
if (p.includes("/.claude/rules/") || p.includes("/.cursor/rules/") || p.endsWith("claude.md") || p.endsWith("agents.md") || p.endsWith("codewith.md") || p.endsWith("gemini.md") || p.endsWith(".mdc"))
|
|
1908
|
+
if (p.includes("/.claude/rules/") || p.includes("/.cursor/rules/") || p.includes("/.agents/rules/") || p.endsWith("claude.md") || p.endsWith("agents.md") || p.endsWith("codewith.md") || p.endsWith("aicopilot.md") || p.endsWith("/.gemini/gemini.md") || p.endsWith(".mdc"))
|
|
1844
1909
|
return "rules";
|
|
1845
|
-
if (p.includes("/.claude/") || p.includes("/.codex/") || p.includes("/.gemini/") || p.includes("/.cursor/") || p.includes("/.config/opencode/") || p.includes("/.codewith/") || p.includes("/.config/aicopilot/"))
|
|
1846
|
-
return "agent";
|
|
1847
1910
|
if (p.includes(".mcp.json") || p.includes("mcp"))
|
|
1848
1911
|
return "mcp";
|
|
1912
|
+
if (p.includes("/.claude/") || p.includes("/.codex/") || p.includes("/.antigravity/") || p.includes("/.agents/") || p.includes("/.cursor/") || p.includes("/.config/opencode/") || p.includes("/.codewith/") || p.includes("/.config/aicopilot/"))
|
|
1913
|
+
return "agent";
|
|
1849
1914
|
if (p.includes(".zshrc") || p.includes(".zprofile") || p.includes(".bashrc") || p.includes(".bash_profile"))
|
|
1850
1915
|
return "shell";
|
|
1851
1916
|
if (p.includes(".gitconfig") || p.includes(".gitignore"))
|
|
@@ -1858,6 +1923,10 @@ function detectCategory(filePath) {
|
|
|
1858
1923
|
}
|
|
1859
1924
|
function detectAgent(filePath) {
|
|
1860
1925
|
const p = filePath.toLowerCase().replace(getConfigHome(), "~");
|
|
1926
|
+
if (p.endsWith("/.gemini/gemini.md") || p.endsWith("/.gemini/config/mcp_config.json"))
|
|
1927
|
+
return "antigravity";
|
|
1928
|
+
if (p.includes("/.agents/rules/") || p.endsWith("/.agents/mcp_config.json"))
|
|
1929
|
+
return "antigravity";
|
|
1861
1930
|
if (p.includes("/.claude/") || p.endsWith("claude.md"))
|
|
1862
1931
|
return "claude";
|
|
1863
1932
|
if (p.includes("/.config/opencode/"))
|
|
@@ -1868,10 +1937,10 @@ function detectAgent(filePath) {
|
|
|
1868
1937
|
return "codewith";
|
|
1869
1938
|
if (p.includes("/.config/aicopilot/"))
|
|
1870
1939
|
return "aicopilot";
|
|
1940
|
+
if (p.includes("/.antigravity/"))
|
|
1941
|
+
return "antigravity";
|
|
1871
1942
|
if (p.includes("/.codex/") || p.endsWith("agents.md"))
|
|
1872
1943
|
return "codex";
|
|
1873
|
-
if (p.includes("/.gemini/") || p.endsWith("gemini.md"))
|
|
1874
|
-
return "gemini";
|
|
1875
1944
|
if (p.includes(".zshrc") || p.includes(".zprofile") || p.includes(".bashrc"))
|
|
1876
1945
|
return "zsh";
|
|
1877
1946
|
if (p.includes(".gitconfig") || p.includes(".gitignore"))
|
|
@@ -1898,6 +1967,7 @@ var CLAUDE_PROMPT_OUTPUTS, KNOWN_CONFIGS, PROJECT_CONFIG_FILES;
|
|
|
1898
1967
|
var init_sync = __esm(() => {
|
|
1899
1968
|
init_config_store();
|
|
1900
1969
|
init_apply();
|
|
1970
|
+
init_config_agents();
|
|
1901
1971
|
init_redact();
|
|
1902
1972
|
init_machine();
|
|
1903
1973
|
init_transforms();
|
|
@@ -1906,7 +1976,8 @@ var init_sync = __esm(() => {
|
|
|
1906
1976
|
{ agent: "codex", target_path: "~/.codex/AGENTS.md", transform: "codex-flat" },
|
|
1907
1977
|
{ agent: "codewith", target_path: "~/.codewith/CODEWITH.md", transform: "codex-flat" },
|
|
1908
1978
|
{ agent: "opencode", target_path: "~/.config/opencode/AGENTS.md", transform: "opencode-flat" },
|
|
1909
|
-
{ agent: "aicopilot", target_path: "~/.config/aicopilot/
|
|
1979
|
+
{ agent: "aicopilot", target_path: "~/.config/aicopilot/AICOPILOT.md", transform: "codex-flat" },
|
|
1980
|
+
{ agent: "antigravity", target_path: "~/.gemini/GEMINI.md", transform: "codex-flat" },
|
|
1910
1981
|
{ agent: "cursor", target_path: "~/.cursor/rules/claude.mdc", transform: "cursor-mdc" }
|
|
1911
1982
|
];
|
|
1912
1983
|
KNOWN_CONFIGS = [
|
|
@@ -1923,10 +1994,10 @@ var init_sync = __esm(() => {
|
|
|
1923
1994
|
{ path: "~/.cursor/mcp.json", name: "cursor-mcp", category: "mcp", agent: "cursor", format: "json", optional: true, description: "Cursor MCP config (includes Skills MCP server entries)" },
|
|
1924
1995
|
{ path: "~/.codewith/CODEWITH.md", name: "codewith-codewith-md", category: "rules", agent: "codewith", format: "markdown", optional: true },
|
|
1925
1996
|
{ path: "~/.codewith/config.toml", name: "codewith-config", category: "mcp", agent: "codewith", format: "toml", optional: true, description: "codewith config (Codex fork, includes Skills MCP server entries)" },
|
|
1926
|
-
{ path: "~/.config/aicopilot/
|
|
1927
|
-
{ path: "~/.config/aicopilot/
|
|
1928
|
-
{ path: "~/.gemini/
|
|
1929
|
-
{ path: "~/.gemini/
|
|
1997
|
+
{ path: "~/.config/aicopilot/AICOPILOT.md", name: "aicopilot-aicopilot-md", category: "rules", agent: "aicopilot", format: "markdown", optional: true },
|
|
1998
|
+
{ path: "~/.config/aicopilot/aicopilot.json", name: "aicopilot-config", category: "mcp", agent: "aicopilot", format: "json", optional: true, description: "AI Copilot config (includes instructions and MCP server entries)" },
|
|
1999
|
+
{ path: "~/.gemini/GEMINI.md", name: "antigravity-global-rules", category: "rules", agent: "antigravity", format: "markdown", optional: true, description: "Google Antigravity global rules file" },
|
|
2000
|
+
{ path: "~/.gemini/config/mcp_config.json", name: "antigravity-global-mcp", category: "mcp", agent: "antigravity", format: "json", optional: true, description: "Google Antigravity global MCP server entries" },
|
|
1930
2001
|
{ path: "~/.claude.json", name: "claude-json", category: "mcp", agent: "claude", format: "json", description: "Claude Code global config (includes MCP server entries)" },
|
|
1931
2002
|
{ path: "~/.zshrc", name: "zshrc", category: "shell", agent: "zsh" },
|
|
1932
2003
|
{ path: "~/.zprofile", name: "zprofile", category: "shell", agent: "zsh", optional: true },
|
|
@@ -1944,10 +2015,12 @@ var init_sync = __esm(() => {
|
|
|
1944
2015
|
{ file: ".mcp.json", category: "mcp", agent: "claude", format: "json" },
|
|
1945
2016
|
{ file: "AGENTS.md", category: "rules", agent: "codex", format: "markdown" },
|
|
1946
2017
|
{ file: ".codex/AGENTS.md", category: "rules", agent: "codex", format: "markdown" },
|
|
1947
|
-
{ file: "GEMINI.md", category: "rules", agent: "gemini", format: "markdown" },
|
|
1948
2018
|
{ file: ".opencode/AGENTS.md", category: "rules", agent: "opencode", format: "markdown" },
|
|
1949
2019
|
{ file: ".codewith/CODEWITH.md", category: "rules", agent: "codewith", format: "markdown" },
|
|
1950
|
-
{ file: ".
|
|
2020
|
+
{ file: ".aicopilot/AICOPILOT.md", category: "rules", agent: "aicopilot", format: "markdown" },
|
|
2021
|
+
{ file: "AICOPILOT.md", category: "rules", agent: "aicopilot", format: "markdown" },
|
|
2022
|
+
{ file: ".cursor/mcp.json", category: "mcp", agent: "cursor", format: "json" },
|
|
2023
|
+
{ file: ".agents/mcp_config.json", category: "mcp", agent: "antigravity", format: "json" }
|
|
1951
2024
|
];
|
|
1952
2025
|
});
|
|
1953
2026
|
|
|
@@ -2040,7 +2113,7 @@ var init_sync_dir = __esm(() => {
|
|
|
2040
2113
|
var require_package = __commonJS((exports, module) => {
|
|
2041
2114
|
module.exports = {
|
|
2042
2115
|
name: "@hasna/instructions",
|
|
2043
|
-
version: "0.4.
|
|
2116
|
+
version: "0.4.5",
|
|
2044
2117
|
description: "AI coding agent instruction & configuration manager \u2014 store, version, apply, and share all your AI coding configs. CLI + MCP + HTTP API (instructions-serve) + generated SDK + Dashboard.",
|
|
2045
2118
|
type: "module",
|
|
2046
2119
|
main: "dist/index.js",
|
|
@@ -2088,7 +2161,7 @@ var require_package = __commonJS((exports, module) => {
|
|
|
2088
2161
|
"agent-config",
|
|
2089
2162
|
"claude",
|
|
2090
2163
|
"codex",
|
|
2091
|
-
"
|
|
2164
|
+
"antigravity",
|
|
2092
2165
|
"mcp",
|
|
2093
2166
|
"ai",
|
|
2094
2167
|
"coding-agent",
|