rulesync 43.4.0 → 43.4.2
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 +3 -3
- package/dist/cli/index.js +3 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/{import-D2mUPFM0.js → import-BWOC-Tig.js} +52 -10
- package/dist/{import-D2mUPFM0.js.map → import-BWOC-Tig.js.map} +1 -1
- package/dist/{import-BU6Goa-J.cjs → import-ClFasGQ6.cjs} +51 -9
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +13 -18
|
@@ -22184,7 +22184,7 @@ var OpenCodeCommand = class extends ToolCommand {
|
|
|
22184
22184
|
* and `~/.config/mimocode/commands/` (global), so this target reuses
|
|
22185
22185
|
* {@link OpenCodeCommand} with that layout.
|
|
22186
22186
|
*
|
|
22187
|
-
* @see https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/
|
|
22187
|
+
* @see https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/cli/src/config/command.ts
|
|
22188
22188
|
*/
|
|
22189
22189
|
var MimocodeCommand = class extends OpenCodeCommand {
|
|
22190
22190
|
static layout = MIMOCODE_LAYOUT;
|
|
@@ -30107,7 +30107,7 @@ function normalizeDisableModelInvocation({ frontmatter, skillFilePath }) {
|
|
|
30107
30107
|
* `~/.config/mimocode/` (global), so this target reuses {@link OpenCodeSkill}
|
|
30108
30108
|
* with that layout.
|
|
30109
30109
|
*
|
|
30110
|
-
* @see https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/
|
|
30110
|
+
* @see https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/cli/src/skill/index.ts
|
|
30111
30111
|
*/
|
|
30112
30112
|
var MimocodeSkill = class extends OpenCodeSkill {
|
|
30113
30113
|
static layout = MIMOCODE_LAYOUT;
|
|
@@ -38580,7 +38580,7 @@ var OpenCodeSubagent = class extends OpenCodeStyleSubagent {
|
|
|
38580
38580
|
* `~/.config/mimocode/agents/` (global), so this target reuses
|
|
38581
38581
|
* {@link OpenCodeSubagent} with that layout.
|
|
38582
38582
|
*
|
|
38583
|
-
* @see https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/
|
|
38583
|
+
* @see https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/cli/src/config/agent.ts
|
|
38584
38584
|
*/
|
|
38585
38585
|
var MimocodeSubagent = class extends OpenCodeSubagent {
|
|
38586
38586
|
static layout = MIMOCODE_LAYOUT;
|
|
@@ -42971,7 +42971,10 @@ function convertToOpencodeFormat(mcpServers, existingMcp, configShape, logger) {
|
|
|
42971
42971
|
return {
|
|
42972
42972
|
mcp: Object.fromEntries(Object.entries(mcpServers).map(([serverName, serverConfig]) => {
|
|
42973
42973
|
const converted = convertServerToOpencodeFormat(serverName, serverConfig, existingMcp[serverName], configShape, logger);
|
|
42974
|
-
if (serverConfig.enabledTools) for (const tool of serverConfig.enabledTools)
|
|
42974
|
+
if (serverConfig.enabledTools) for (const tool of serverConfig.enabledTools) {
|
|
42975
|
+
const key = opencodeMcpToolPermissionKey(serverName, tool);
|
|
42976
|
+
tools[key] = tools[key] !== false;
|
|
42977
|
+
}
|
|
42975
42978
|
if (serverConfig.disabledTools) for (const tool of serverConfig.disabledTools) tools[opencodeMcpToolPermissionKey(serverName, tool)] = false;
|
|
42976
42979
|
return converted === null ? null : [serverName, converted];
|
|
42977
42980
|
}).filter((entry) => entry !== null)),
|
|
@@ -42982,6 +42985,12 @@ const OpencodeMcpFeatureOptionsSchema = z.looseObject({ configShape: z.optional(
|
|
|
42982
42985
|
var OpencodeMcp = class extends ToolMcp {
|
|
42983
42986
|
/** Directory layout; OpenCode forks (MiMo Code) override it. */
|
|
42984
42987
|
static layout = OPENCODE_LAYOUT;
|
|
42988
|
+
/**
|
|
42989
|
+
* Per-server keys a fork's MCP schema adds on top of OpenCode's. On generate
|
|
42990
|
+
* each one a canonical server carries is copied verbatim onto that server's
|
|
42991
|
+
* local or remote entry, as `timeout` and `oauth` are. OpenCode adds none.
|
|
42992
|
+
*/
|
|
42993
|
+
static extraPassthroughServerFields = [];
|
|
42985
42994
|
json;
|
|
42986
42995
|
/**
|
|
42987
42996
|
* With a `logger`, the V2 values that lowering the content drops are warned
|
|
@@ -43100,6 +43109,10 @@ var OpencodeMcp = class extends ToolMcp {
|
|
|
43100
43109
|
if (containers.length > 0) logger?.warn(`OpenCode MCP: the whole "mcp" key is rewritten in the flat V1 shape, so ${containers.map(quoteValueForWarning).join(" and ")} ${containers.length === 1 ? "is" : "are"} not kept.`);
|
|
43101
43110
|
}
|
|
43102
43111
|
const { mcp: convertedMcp, tools: mcpTools } = convertToOpencodeFormat(transformedServers, (existingMcp.success ? existingMcp.data.mcp : void 0) ?? {}, configShape, logger);
|
|
43112
|
+
this.copyExtraPassthroughServerFields({
|
|
43113
|
+
convertedMcp,
|
|
43114
|
+
mcpServers: transformedServers
|
|
43115
|
+
});
|
|
43103
43116
|
if (this.layout.configVersion === "v2") warnAboutOpencodeV2SseServers({
|
|
43104
43117
|
mcpServers: transformedServers,
|
|
43105
43118
|
convertedMcp,
|
|
@@ -43149,6 +43162,21 @@ var OpencodeMcp = class extends ToolMcp {
|
|
|
43149
43162
|
});
|
|
43150
43163
|
}
|
|
43151
43164
|
/**
|
|
43165
|
+
* Copies {@link OpencodeMcp.extraPassthroughServerFields} from each canonical
|
|
43166
|
+
* server onto its generated transport entry. A toggle entry is left alone:
|
|
43167
|
+
* it has no transport for these keys to configure.
|
|
43168
|
+
*/
|
|
43169
|
+
static copyExtraPassthroughServerFields({ convertedMcp, mcpServers }) {
|
|
43170
|
+
if (this.extraPassthroughServerFields.length === 0) return;
|
|
43171
|
+
for (const [serverName, entry] of Object.entries(convertedMcp)) {
|
|
43172
|
+
const source = Object.hasOwn(mcpServers, serverName) ? mcpServers[serverName] : void 0;
|
|
43173
|
+
if (source === void 0 || !isOpencodeTransportServer(entry)) continue;
|
|
43174
|
+
const sourceRecord = source;
|
|
43175
|
+
const entryRecord = entry;
|
|
43176
|
+
for (const key of this.extraPassthroughServerFields) if (sourceRecord[key] !== void 0) entryRecord[key] = sourceRecord[key];
|
|
43177
|
+
}
|
|
43178
|
+
}
|
|
43179
|
+
/**
|
|
43152
43180
|
* Builds the V2 `mcp` value: each server raised to the V2 spelling under the
|
|
43153
43181
|
* `mcp.servers` envelope, keeping what the existing file has that Rulesync
|
|
43154
43182
|
* cannot express (see {@link raiseOpencodeServerToV2}), plus the existing
|
|
@@ -43278,16 +43306,30 @@ var OpencodeMcp = class extends ToolMcp {
|
|
|
43278
43306
|
* `.mimocode/mimocode.jsonc` (project) and `~/.config/mimocode/mimocode.jsonc`
|
|
43279
43307
|
* (global), so this target reuses {@link OpencodeMcp} with that layout.
|
|
43280
43308
|
*
|
|
43281
|
-
* @see https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/
|
|
43309
|
+
* @see https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/cli/src/config/mcp.ts
|
|
43282
43310
|
*/
|
|
43283
43311
|
var MimocodeMcp = class extends OpencodeMcp {
|
|
43284
43312
|
static layout = MIMOCODE_LAYOUT;
|
|
43285
43313
|
/**
|
|
43314
|
+
* MiMo Code's local and remote server schemas add two keys OpenCode does not
|
|
43315
|
+
* have:
|
|
43316
|
+
* - `sampling` (`"deny"` | `"ask"` | `"allow"`): the policy for the server's
|
|
43317
|
+
* client-side sampling requests (since v0.1.10).
|
|
43318
|
+
* - `alwaysDirectTools` (string array): tools exposed as top-level tools
|
|
43319
|
+
* instead of through `mcp_tool_search` / `mcp_tool_use` (on `main`, not yet
|
|
43320
|
+
* released). Releases without it ignore the key, since MiMo Code only
|
|
43321
|
+
* rejects unknown keys at the top level of the config.
|
|
43322
|
+
*
|
|
43323
|
+
* @see https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/cli/src/config/mcp.ts
|
|
43324
|
+
* @see https://github.com/XiaomiMiMo/MiMo-Code/blob/v0.1.16/packages/cli/src/config/config.ts
|
|
43325
|
+
*/
|
|
43326
|
+
static extraPassthroughServerFields = ["sampling", "alwaysDirectTools"];
|
|
43327
|
+
/**
|
|
43286
43328
|
* MiMo Code resolves a relative `instructions` entry against the project
|
|
43287
43329
|
* directory, not the config directory, so a global rule is written as a
|
|
43288
43330
|
* `~/`-rooted path (which MiMo Code expands to the home directory).
|
|
43289
43331
|
*
|
|
43290
|
-
* @see https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/
|
|
43332
|
+
* @see https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/cli/src/session/instruction.ts
|
|
43291
43333
|
*/
|
|
43292
43334
|
static toGlobalInstructionEntry({ path }) {
|
|
43293
43335
|
return `~/${path}`;
|
|
@@ -48657,7 +48699,7 @@ var OpenCodeRule = class extends ToolRule {
|
|
|
48657
48699
|
* `instructions` list of its config, so this target reuses {@link OpenCodeRule}
|
|
48658
48700
|
* with the `.mimocode/` layout.
|
|
48659
48701
|
*
|
|
48660
|
-
* @see https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/
|
|
48702
|
+
* @see https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/cli/src/session/instruction.ts
|
|
48661
48703
|
*/
|
|
48662
48704
|
var MimocodeRule = class extends OpenCodeRule {
|
|
48663
48705
|
static layout = MIMOCODE_LAYOUT;
|
|
@@ -63859,7 +63901,7 @@ var OpencodeHooks = class extends ToolHooks {
|
|
|
63859
63901
|
* `~/.config/mimocode/plugins/` (global) and keeps OpenCode's plugin event
|
|
63860
63902
|
* names, so this target reuses {@link OpencodeHooks} with that layout.
|
|
63861
63903
|
*
|
|
63862
|
-
* @see https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/
|
|
63904
|
+
* @see https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/cli/src/config/plugin.ts
|
|
63863
63905
|
*/
|
|
63864
63906
|
var MimocodeHooks = class extends OpencodeHooks {
|
|
63865
63907
|
static layout = MIMOCODE_LAYOUT;
|
|
@@ -95985,7 +96027,7 @@ var OpencodePermissions = class extends ToolPermissions {
|
|
|
95985
96027
|
* `.mimocode/` layout. Tool-only categories round-trip through the `mimocode`
|
|
95986
96028
|
* override block.
|
|
95987
96029
|
*
|
|
95988
|
-
* @see https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/
|
|
96030
|
+
* @see https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/cli/src/config/permission.ts
|
|
95989
96031
|
*/
|
|
95990
96032
|
var MimocodePermissions = class extends OpencodePermissions {
|
|
95991
96033
|
static layout = MIMOCODE_LAYOUT;
|
|
@@ -107310,4 +107352,4 @@ async function importChecksCore(params) {
|
|
|
107310
107352
|
}
|
|
107311
107353
|
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 };
|
|
107312
107354
|
|
|
107313
|
-
//# sourceMappingURL=import-
|
|
107355
|
+
//# sourceMappingURL=import-BWOC-Tig.js.map
|