rulesync 43.2.0 → 43.3.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/dist/cli/index.cjs +272 -64
- package/dist/cli/index.js +272 -64
- package/dist/cli/index.js.map +1 -1
- package/dist/{import-DPXjeK8q.js → import-BQNLyW5s.js} +43 -6
- package/dist/{import-DPXjeK8q.js.map → import-BQNLyW5s.js.map} +1 -1
- package/dist/{import-DAT3ge4z.cjs → import-CedO1sFP.cjs} +42 -5
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -11646,7 +11646,8 @@ const RulesyncSkillFrontmatterSchema = z.looseObject({
|
|
|
11646
11646
|
license: z.optional(z.string()),
|
|
11647
11647
|
compatibility: z.optional(z.union([z.string(), z.looseObject({})])),
|
|
11648
11648
|
metadata: z.optional(z.looseObject({})),
|
|
11649
|
-
"allowed-tools": z.optional(z.union([z.string(), z.array(z.string())]))
|
|
11649
|
+
"allowed-tools": z.optional(z.union([z.string(), z.array(z.string())])),
|
|
11650
|
+
"disable-model-invocation": z.optional(z.boolean())
|
|
11650
11651
|
})),
|
|
11651
11652
|
hermesagent: z.optional(z.looseObject({})),
|
|
11652
11653
|
vibe: z.optional(z.looseObject({
|
|
@@ -19600,7 +19601,8 @@ const AgentsSkillsSkillFrontmatterSchema = z.looseObject({
|
|
|
19600
19601
|
license: z.optional(z.string()),
|
|
19601
19602
|
compatibility: z.optional(z.union([z.string(), z.looseObject({})])),
|
|
19602
19603
|
metadata: z.optional(z.looseObject({})),
|
|
19603
|
-
"allowed-tools": z.optional(z.union([z.string(), z.array(z.string())]))
|
|
19604
|
+
"allowed-tools": z.optional(z.union([z.string(), z.array(z.string())])),
|
|
19605
|
+
"disable-model-invocation": z.optional(z.boolean())
|
|
19604
19606
|
});
|
|
19605
19607
|
const COMPATIBILITY_MAX_LENGTH = 500;
|
|
19606
19608
|
const AGENT_SKILLS_SPEC = "the Agent Skills spec";
|
|
@@ -19741,6 +19743,38 @@ function toSpecConformantAgentSkillFields(section, { coerceMetadata = true } = {
|
|
|
19741
19743
|
...allowedTools !== void 0 && allowedTools.length > 0 && { "allowed-tools": allowedTools }
|
|
19742
19744
|
};
|
|
19743
19745
|
}
|
|
19746
|
+
/**
|
|
19747
|
+
* The opt-in `disable-model-invocation` flag of the `agentsskills` block.
|
|
19748
|
+
*
|
|
19749
|
+
* The key is not part of the Agent Skills specification, so `skills-ref
|
|
19750
|
+
* validate` rejects a `SKILL.md` that carries it, but several clients reading
|
|
19751
|
+
* `.agents/skills/` (e.g. pi) honor it. To keep the default output
|
|
19752
|
+
* spec-conformant, only an explicit `agentsskills.disable-model-invocation`
|
|
19753
|
+
* value is written; the root-level rulesync flag is deliberately not inherited.
|
|
19754
|
+
*
|
|
19755
|
+
* Kept apart from {@link toSpecConformantAgentSkillFields} because that helper
|
|
19756
|
+
* is shared with writers of other tools' own locations, which have their own
|
|
19757
|
+
* sections for tool-specific keys. Only writers of the shared `.agents/skills/`
|
|
19758
|
+
* root (see {@link isSharedAgentSkillsRoot}) — the native target, GitLab Duo's
|
|
19759
|
+
* project scope and the simulated `agentsmd` — spread this, so they all emit
|
|
19760
|
+
* the same frontmatter for that file.
|
|
19761
|
+
*/
|
|
19762
|
+
function toAgentsSkillsInvocationField(section) {
|
|
19763
|
+
const value = section?.["disable-model-invocation"];
|
|
19764
|
+
return value === void 0 ? {} : { "disable-model-invocation": value };
|
|
19765
|
+
}
|
|
19766
|
+
/**
|
|
19767
|
+
* Whether a skill directory lives in the cross-client `.agents/skills/` root
|
|
19768
|
+
* (project, or `~/.agents/skills/` in global scope). The
|
|
19769
|
+
* `agentsskills.disable-model-invocation` opt-in exists for the clients that
|
|
19770
|
+
* read that root, so it is written and imported only there — not by the
|
|
19771
|
+
* subclasses that reuse this class for a tool's own location (Trae, Qoder, Xum,
|
|
19772
|
+
* …), where the key would otherwise leak into the `agentsskills` section on
|
|
19773
|
+
* import and from there into every `.agents/skills/` output.
|
|
19774
|
+
*/
|
|
19775
|
+
function isSharedAgentSkillsRoot(relativeDirPath) {
|
|
19776
|
+
return toPosixPath(relativeDirPath) === toPosixPath(AGENTSMD_SKILLS_DIR_PATH);
|
|
19777
|
+
}
|
|
19744
19778
|
/** The `SKILL.md` a diagnostic should point at, in the scope it is written to. */
|
|
19745
19779
|
function agentSkillFilePath({ outputRoot, relativeDirPath, dirName }) {
|
|
19746
19780
|
return join(outputRoot, relativeDirPath, dirName, SKILL_FILE_NAME);
|
|
@@ -19822,7 +19856,8 @@ var AgentsSkillsSkill = class AgentsSkillsSkill extends ToolSkill {
|
|
|
19822
19856
|
...frontmatter.license !== void 0 && { license: frontmatter.license },
|
|
19823
19857
|
...frontmatter.compatibility !== void 0 && { compatibility: frontmatter.compatibility },
|
|
19824
19858
|
...frontmatter.metadata !== void 0 && { metadata: frontmatter.metadata },
|
|
19825
|
-
...allowedTools !== void 0 && allowedTools.length > 0 && { "allowed-tools": allowedTools }
|
|
19859
|
+
...allowedTools !== void 0 && allowedTools.length > 0 && { "allowed-tools": allowedTools },
|
|
19860
|
+
...isSharedAgentSkillsRoot(this.getRelativeDirPath()) && frontmatter["disable-model-invocation"] !== void 0 && { "disable-model-invocation": frontmatter["disable-model-invocation"] }
|
|
19826
19861
|
};
|
|
19827
19862
|
const rulesyncFrontmatter = {
|
|
19828
19863
|
name: frontmatter.name,
|
|
@@ -19848,7 +19883,8 @@ var AgentsSkillsSkill = class AgentsSkillsSkill extends ToolSkill {
|
|
|
19848
19883
|
const agentsSkillsFrontmatter = {
|
|
19849
19884
|
name: rulesyncFrontmatter.name,
|
|
19850
19885
|
description: rulesyncFrontmatter.description,
|
|
19851
|
-
...toSpecConformantAgentSkillFields(resolveAgentsSkillsSection(rulesyncFrontmatter))
|
|
19886
|
+
...toSpecConformantAgentSkillFields(resolveAgentsSkillsSection(rulesyncFrontmatter)),
|
|
19887
|
+
...isSharedAgentSkillsRoot(settablePaths.relativeDirPath) && toAgentsSkillsInvocationField(rulesyncFrontmatter.agentsskills)
|
|
19852
19888
|
};
|
|
19853
19889
|
AgentsSkillsSkill.reportSpecViolations({
|
|
19854
19890
|
outputRoot,
|
|
@@ -24922,7 +24958,8 @@ var AgentsmdSkill = class AgentsmdSkill extends SimulatedSkill {
|
|
|
24922
24958
|
const relativeDirPath = this.getSettablePaths().relativeDirPath;
|
|
24923
24959
|
const frontmatter = {
|
|
24924
24960
|
...defaults.frontmatter,
|
|
24925
|
-
...toSpecConformantAgentSkillFields(resolveAgentsSkillsSection(params.rulesyncSkill.getFrontmatter()))
|
|
24961
|
+
...toSpecConformantAgentSkillFields(resolveAgentsSkillsSection(params.rulesyncSkill.getFrontmatter())),
|
|
24962
|
+
...toAgentsSkillsInvocationField(params.rulesyncSkill.getFrontmatter().agentsskills)
|
|
24926
24963
|
};
|
|
24927
24964
|
AgentsSkillsSkill.reportSpecViolations({
|
|
24928
24965
|
outputRoot: params.outputRoot ?? process.cwd(),
|
|
@@ -107003,4 +107040,4 @@ async function importChecksCore(params) {
|
|
|
107003
107040
|
}
|
|
107004
107041
|
export { RulesyncPermissions as $, formatError as $n, isSymlink as $t, CODEBUDDY_DIR as A, MAX_FILE_SIZE as An, withFallbackLoggerTarget as At, CLAUDECODE_LOCAL_RULE_FILE_NAME as B, RULESYNC_LOCAL_CONFIG_RELATIVE_FILE_PATH as Bn, assertTreeContainsNoSymlinks as Bt, QWENCODE_LOCAL_RULE_FILE_NAME as C, PACKAGING_TOOL_TARGETS as Cn, getSourceTransport as Ct, FACTORYDROID_SETTINGS_LOCAL_FILE_NAME as D, DEPRECATED_FEATURE_REPLACEMENTS as Dn, WarningCollectingLogger as Dt, FACTORYDROID_DIR as E, ALL_FEATURES_WITH_WILDCARD as En, JsonLogger as Et, groupSpellingsByCaseFoldedIdentity as F, RULESYNC_CONFIG_SCHEMA_URL as Fn, PathOutsideRootError as Ft, toInstructionBudgetFile as G, RULESYNC_PERMISSIONS_SCHEMA_URL as Gn, ensureDir as Gt, CLAUDECODE_SETTINGS_LOCAL_FILE_NAME as H, RULESYNC_MCP_SCHEMA_URL as Hn, checkPathTraversal as Ht, CODEXCLI_BASH_RULES_FILE_NAME as I, RULESYNC_CURATED_RULES_RELATIVE_DIR_PATH as In, applyFileMode as It, RulesyncSubagentFrontmatterSchema as J, RULESYNC_SKILLS_RELATIVE_DIR_PATH as Jn, findFilesByGlobs as Jt, getLocalSkillDirNames as K, RULESYNC_RELATIVE_DIR_PATH as Kn, fileExists as Kt, CODEXCLI_DIR as L, RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH as Ln, assertDirectoryIfExists as Lt, AUGMENTCODE_DIR as M, RULESYNC_CHECKS_RELATIVE_DIR_PATH as Mn, withWarnOnceScope as Mt, AUGMENTCODE_SETTINGS_LOCAL_FILE_NAME as N, RULESYNC_COMMANDS_RELATIVE_DIR_PATH as Nn, CLIError as Nt, COMMANDCODE_DIR as O, CURATED_RULES_FEATURE_SUBDIR as On, fallbackLogger as Ot, caseFoldIdentity as P, RULESYNC_CONFIG_RELATIVE_FILE_PATH as Pn, ErrorCodes as Pt, RulesyncRuleFrontmatterSchema as Q, RULESYNC_XDG_CONFIG_HOME_DEFAULT_DIR_NAME as Qn, isFileSystemError as Qt, CLAUDECODE_AGENT_MEMORY_LOCAL_DIR_NAME as R, RULESYNC_HOOKS_RELATIVE_FILE_PATH as Rn, assertNoSymlinkBelowRoot as Rt, QWENCODE_DIR as S, ALL_TOOL_TARGETS_WITH_WILDCARD as Sn, assertTargetsFeaturesExclusive as St, LETTACODE_SETTINGS_LOCAL_FILE_NAME as T, ALL_FEATURES as Tn, ConsoleLogger as Tt, CLAUDECODE_SKILLS_DIR_PATH as U, RULESYNC_NPM_SOURCES_LOCK_RELATIVE_FILE_PATH as Un, createTempDirectory as Ut, CLAUDECODE_MEMORIES_DIR_NAME as V, RULESYNC_MCP_RELATIVE_FILE_PATH as Vn, assertWritablePathInsideRoot as Vt, findProjectInstructionBudgetFindings as W, RULESYNC_PERMISSIONS_RELATIVE_FILE_PATH as Wn, directoryExists as Wt, RulesyncSkillFrontmatterSchema as X, RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH as Xn, getHomeDirectory as Xt, RulesyncSkill as Y, RULESYNC_SOURCES_LOCK_RELATIVE_FILE_PATH as Yn, getFileSizeAndExecutableBit as Yt, RulesyncRule as Z, RULESYNC_USER_CONFIG_DIR_NAME as Zn, isFileNotFoundError as Zt, SubagentsProcessor as _, toPosixPath as _n, resolveEffectiveInputRoots as _t, convertFromTool as a, readFileContent as an, stripControlCharactersKeepingLineFeeds as ar, parseJsonc as at, CommandsProcessor as b, mapWithConcurrency as bn, GITIGNORE_DESTINATION_KEY as bt, parseCommaSeparatedList as c, removeDirectoryStrict as cn, RulesyncCheck as ct, shortenToWidth as d, removeFileWithoutFollowingSymlinks as dn, loadYaml as dt, listDirectoryEntryNames as en, truncateText as er, RulesyncMcp as et, McpProcessor as f, removeTempDirectory as fn, isRecord as ft, RulesProcessor as g, splitPathSegments as gn, mergeInputRootConfigs as gt, ChecksProcessor as h, runWithDirectoryRollback as hn, ConfigResolver as ht, inspectInputRoots as i, posixRelativePathEscapesRoot as in, stripControlCharacters as ir, resolveRulesyncSourceWritePath as it, CODEBUDDY_LOCAL_RULE_FILE_NAME as j, RULESYNC_AIIGNORE_RELATIVE_FILE_PATH as jn, resetRunWarningState as jt, COMMANDCODE_SETTINGS_LOCAL_FILE_NAME as k, FEATURE_SOURCE_TREE_ENTRIES as kn, warnOnConflictingFlags as kt, ELLIPSIS_WIDTH as l, removeFile as ln, RulesyncCheckFrontmatterSchema as lt, HooksProcessor as m, resolvedRelativePath as mn, SKILL_FILE_NAME as mt, formatSourceLoadFailure as n, listSubdirectoryNames as nn, hasEnclosingMarkOutsideKeycap as nr, RulesyncHooks as nt, isPackagingToolTarget as o, readFileContentOrNull as on, stripControlCharactersKeepingLineFeedsAndTabs as or, RulesyncCommand as ot, IgnoreProcessor as p, resolvePath as pn, SHARED_USER_MANAGED_CONFIG_PATHS as pt, RulesyncSubagent as q, RULESYNC_RULES_RELATIVE_DIR_PATH as qn, fileExistsStrict as qt, generate as r, pathEscapesRoot as rn, quoteForLog as rr, getRulesyncSourceCandidates as rt, getProcessorRegistryEntry as s, removeDirectory as sn, stripHiddenCharacters as sr, RulesyncCommandFrontmatterSchema as st, importFromTool as t, listFilePathsRecursively as tn, hasDeceptiveHiddenCharacters as tr, RulesyncIgnore as tt, displayWidthOf as u, removeFileStrict as un, stringifyFrontmatter as ut, SkillsProcessor as v, writeFileBuffer as vn, CONFLICTING_TARGET_PAIRS as vt, LETTACODE_DIR as w, ToolTargetSchema as wn, findControlCharacter as wt, REASONIX_LOCAL_RULE_FILE_NAME as x, ALL_TOOL_TARGETS as xn, SourceEntrySchema as xt, CRUSH_LOCAL_RULE_FILE_NAME as y, writeFileContent as yn, ConfigFileSchema as yt, CLAUDECODE_DIR as z, RULESYNC_IGNORE_RELATIVE_FILE_PATH as zn, assertPathResolvesInsideRoot as zt };
|
|
107005
107042
|
|
|
107006
|
-
//# sourceMappingURL=import-
|
|
107043
|
+
//# sourceMappingURL=import-BQNLyW5s.js.map
|