rulesync 43.4.1 → 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-BKyt4qe5.js → import-BWOC-Tig.js} +48 -9
- package/dist/{import-BKyt4qe5.js.map → import-BWOC-Tig.js.map} +1 -1
- package/dist/{import-B3x-pkWH.cjs → import-ClFasGQ6.cjs} +47 -8
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +12 -17
|
@@ -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;
|
|
@@ -42985,6 +42985,12 @@ const OpencodeMcpFeatureOptionsSchema = z.looseObject({ configShape: z.optional(
|
|
|
42985
42985
|
var OpencodeMcp = class extends ToolMcp {
|
|
42986
42986
|
/** Directory layout; OpenCode forks (MiMo Code) override it. */
|
|
42987
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 = [];
|
|
42988
42994
|
json;
|
|
42989
42995
|
/**
|
|
42990
42996
|
* With a `logger`, the V2 values that lowering the content drops are warned
|
|
@@ -43103,6 +43109,10 @@ var OpencodeMcp = class extends ToolMcp {
|
|
|
43103
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.`);
|
|
43104
43110
|
}
|
|
43105
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
|
+
});
|
|
43106
43116
|
if (this.layout.configVersion === "v2") warnAboutOpencodeV2SseServers({
|
|
43107
43117
|
mcpServers: transformedServers,
|
|
43108
43118
|
convertedMcp,
|
|
@@ -43152,6 +43162,21 @@ var OpencodeMcp = class extends ToolMcp {
|
|
|
43152
43162
|
});
|
|
43153
43163
|
}
|
|
43154
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
|
+
/**
|
|
43155
43180
|
* Builds the V2 `mcp` value: each server raised to the V2 spelling under the
|
|
43156
43181
|
* `mcp.servers` envelope, keeping what the existing file has that Rulesync
|
|
43157
43182
|
* cannot express (see {@link raiseOpencodeServerToV2}), plus the existing
|
|
@@ -43281,16 +43306,30 @@ var OpencodeMcp = class extends ToolMcp {
|
|
|
43281
43306
|
* `.mimocode/mimocode.jsonc` (project) and `~/.config/mimocode/mimocode.jsonc`
|
|
43282
43307
|
* (global), so this target reuses {@link OpencodeMcp} with that layout.
|
|
43283
43308
|
*
|
|
43284
|
-
* @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
|
|
43285
43310
|
*/
|
|
43286
43311
|
var MimocodeMcp = class extends OpencodeMcp {
|
|
43287
43312
|
static layout = MIMOCODE_LAYOUT;
|
|
43288
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
|
+
/**
|
|
43289
43328
|
* MiMo Code resolves a relative `instructions` entry against the project
|
|
43290
43329
|
* directory, not the config directory, so a global rule is written as a
|
|
43291
43330
|
* `~/`-rooted path (which MiMo Code expands to the home directory).
|
|
43292
43331
|
*
|
|
43293
|
-
* @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
|
|
43294
43333
|
*/
|
|
43295
43334
|
static toGlobalInstructionEntry({ path }) {
|
|
43296
43335
|
return `~/${path}`;
|
|
@@ -48660,7 +48699,7 @@ var OpenCodeRule = class extends ToolRule {
|
|
|
48660
48699
|
* `instructions` list of its config, so this target reuses {@link OpenCodeRule}
|
|
48661
48700
|
* with the `.mimocode/` layout.
|
|
48662
48701
|
*
|
|
48663
|
-
* @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
|
|
48664
48703
|
*/
|
|
48665
48704
|
var MimocodeRule = class extends OpenCodeRule {
|
|
48666
48705
|
static layout = MIMOCODE_LAYOUT;
|
|
@@ -63862,7 +63901,7 @@ var OpencodeHooks = class extends ToolHooks {
|
|
|
63862
63901
|
* `~/.config/mimocode/plugins/` (global) and keeps OpenCode's plugin event
|
|
63863
63902
|
* names, so this target reuses {@link OpencodeHooks} with that layout.
|
|
63864
63903
|
*
|
|
63865
|
-
* @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
|
|
63866
63905
|
*/
|
|
63867
63906
|
var MimocodeHooks = class extends OpencodeHooks {
|
|
63868
63907
|
static layout = MIMOCODE_LAYOUT;
|
|
@@ -95988,7 +96027,7 @@ var OpencodePermissions = class extends ToolPermissions {
|
|
|
95988
96027
|
* `.mimocode/` layout. Tool-only categories round-trip through the `mimocode`
|
|
95989
96028
|
* override block.
|
|
95990
96029
|
*
|
|
95991
|
-
* @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
|
|
95992
96031
|
*/
|
|
95993
96032
|
var MimocodePermissions = class extends OpencodePermissions {
|
|
95994
96033
|
static layout = MIMOCODE_LAYOUT;
|
|
@@ -107313,4 +107352,4 @@ async function importChecksCore(params) {
|
|
|
107313
107352
|
}
|
|
107314
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 };
|
|
107315
107354
|
|
|
107316
|
-
//# sourceMappingURL=import-
|
|
107355
|
+
//# sourceMappingURL=import-BWOC-Tig.js.map
|