rulesync 43.10.1 → 43.11.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/README.md +2 -2
- package/dist/cli/index.cjs +4 -4
- package/dist/cli/index.js +4 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/{import-DT6BSklJ.cjs → import-1cdCo1uU.cjs} +335 -77
- package/dist/{import-fiaj0fDK.js → import-BVWVIY-6.js} +320 -62
- package/dist/{import-fiaj0fDK.js.map → import-BVWVIY-6.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { ZodError } from "zod";
|
|
|
2
2
|
import { cp, lstat, mkdir, mkdtemp, open, readFile, readdir, readlink, realpath, rm, stat, writeFile } from "node:fs/promises";
|
|
3
3
|
import path, { basename, dirname, extname, isAbsolute, join, normalize, parse, posix, relative, resolve, sep, win32 } from "node:path";
|
|
4
4
|
import { applyEdits, findNodeAtLocation, getNodeValue, modify, parse as parse$1, parseTree, printParseErrorCode } from "jsonc-parser";
|
|
5
|
-
import { meta, minLength, nonnegative, optional, refine, z } from "zod/mini";
|
|
5
|
+
import { meta, minLength, nonnegative, optional, positive, refine, z } from "zod/mini";
|
|
6
6
|
import { constants, readdirSync, realpathSync, statSync } from "node:fs";
|
|
7
7
|
import os from "node:os";
|
|
8
8
|
import { intersection, kebabCase, uniq } from "es-toolkit";
|
|
@@ -742,6 +742,7 @@ const subagentsProcessorToolTargetTuple = [
|
|
|
742
742
|
"kiro-ide",
|
|
743
743
|
"lettacode",
|
|
744
744
|
"mimocode",
|
|
745
|
+
"musecode",
|
|
745
746
|
"omp",
|
|
746
747
|
"opencode",
|
|
747
748
|
"opencodev1",
|
|
@@ -5172,6 +5173,8 @@ const HookDefinitionSchema = z.looseObject({
|
|
|
5172
5173
|
tool: z.optional(safeString),
|
|
5173
5174
|
input: z.optional(z.looseObject({})),
|
|
5174
5175
|
model: z.optional(safeString),
|
|
5176
|
+
tools: z.optional(z.array(safeString)),
|
|
5177
|
+
maxTurns: z.optional(z.int().check(positive())),
|
|
5175
5178
|
args: z.optional(z.array(safeString)),
|
|
5176
5179
|
metadata: z.optional(z.looseObject({})),
|
|
5177
5180
|
source: z.optional(z.looseObject({
|
|
@@ -8531,15 +8534,15 @@ const CursorPermissionsOverrideSchema = z.looseObject({
|
|
|
8531
8534
|
* `tools` (`approvalMode` = plan/default/auto-edit/auto/yolo, `autoAccept`,
|
|
8532
8535
|
* `sandbox`, `sandboxImage`, `disabled`, `visible`, `eager`, `listDirectory`,
|
|
8533
8536
|
* `todoWrite`, `codeModeOnly`, `freeform`, `workflowsEnabled`, `workflowNameOnly`,
|
|
8534
|
-
* `executionSandbox`) and
|
|
8537
|
+
* `executionSandbox`, `lspEnabled`) and
|
|
8535
8538
|
* `security` (`folderTrust`, `allowedHttpHookUrls`, `allowPrivateNetworkHooks`,
|
|
8536
8539
|
* `allowedInsecureVoiceBaseUrls`) and `skills` (the skill kill-switches
|
|
8537
8540
|
* `disabled`, `defaultDisabled`, `enabled`, `disabledLevels`, each a list Qwen
|
|
8538
8541
|
* Code unions across scopes) and `general` (`outputStyle`, the output style
|
|
8539
8542
|
* that reshapes how responses are written). Qwen Code strips `tools.workflowsEnabled`,
|
|
8540
|
-
* `tools.executionSandbox`, `security.allowPrivateNetworkHooks` and
|
|
8543
|
+
* `tools.executionSandbox`, `tools.lspEnabled`, `security.allowPrivateNetworkHooks` and
|
|
8541
8544
|
* `security.allowedInsecureVoiceBaseUrls` out of workspace settings, so generate
|
|
8542
|
-
* skips those
|
|
8545
|
+
* skips those five in project scope and announces a granting value in global
|
|
8543
8546
|
* scope (any `executionSandbox` change counts). `tools.workflowNameOnly` is
|
|
8544
8547
|
* written in both scopes, but a workspace may only turn it on, which the
|
|
8545
8548
|
* project-scope note says. `security.allowedHttpHookUrls` (honored in a workspace only while no
|
|
@@ -8706,8 +8709,10 @@ const ReasonixPermissionsOverrideSchema = z.looseObject({
|
|
|
8706
8709
|
* holds: `general.defaultPermissionMode`, `tools.core` / `tools.exclude`, the
|
|
8707
8710
|
* MCP approval and loading keys under `mcp` (`allowed`, `excluded`,
|
|
8708
8711
|
* `enableAllProjectMcpServers`, `enabledProjectMcpServers`, `lazyLoad`),
|
|
8709
|
-
* `agents.overrides`,
|
|
8710
|
-
* `
|
|
8712
|
+
* `agents.overrides`, `security.disableYoloMode` (turns off the
|
|
8713
|
+
* `bypass_permissions` / YOLO mode; it only hardens, so it is not announced),
|
|
8714
|
+
* the top-level `agentsMdExcludes` and the top-level `autoMode` classifier
|
|
8715
|
+
* guidance (`allow` / `soft_deny` / `environment`).
|
|
8711
8716
|
* Qoder reads `autoMode` from the user settings only, so it is written by
|
|
8712
8717
|
* `--global` generate alone. Only the keys listed here are written; any other
|
|
8713
8718
|
* key of these groups or of `autoMode` (`tools.shell.pager`,
|
|
@@ -8741,6 +8746,7 @@ const QoderPermissionsOverrideSchema = z.looseObject({
|
|
|
8741
8746
|
lazyLoad: z.optional(z.boolean())
|
|
8742
8747
|
})),
|
|
8743
8748
|
agents: z.optional(z.looseObject({ overrides: z.optional(z.record(z.string(), z.looseObject({}))) })),
|
|
8749
|
+
security: z.optional(z.looseObject({ disableYoloMode: z.optional(z.boolean()) })),
|
|
8744
8750
|
autoMode: z.optional(z.looseObject({
|
|
8745
8751
|
allow: z.optional(z.array(z.string())),
|
|
8746
8752
|
soft_deny: z.optional(z.array(z.string())),
|
|
@@ -9217,7 +9223,9 @@ const ANTIGRAVITY_CLI_ARTIFACT_REVIEW_POLICIES = [
|
|
|
9217
9223
|
* import filter for the same reason as {@link ANTIGRAVITY_CLI_TOOL_PERMISSIONS}.
|
|
9218
9224
|
* `auto` (Preview) requires the terminal sandbox (`enableTerminalSandbox`), is
|
|
9219
9225
|
* not offered to business or enterprise accounts, and falls back to `default`
|
|
9220
|
-
* when unavailable.
|
|
9226
|
+
* when unavailable. Canonical `default` is stored by the CLI as `""` (the
|
|
9227
|
+
* translation lives in `antigravity-cli-permissions.ts`), and since CLI 1.5.7
|
|
9228
|
+
* an omitted `agentMode` starts in `auto` where available.
|
|
9221
9229
|
* @see https://antigravity.google/docs/cli/modes
|
|
9222
9230
|
*/
|
|
9223
9231
|
const ANTIGRAVITY_CLI_AGENT_MODES = [
|
|
@@ -14241,6 +14249,7 @@ const SHARED_CONFIG_OWNERSHIP = {
|
|
|
14241
14249
|
"tools",
|
|
14242
14250
|
"mcp",
|
|
14243
14251
|
"agents",
|
|
14252
|
+
"security",
|
|
14244
14253
|
"autoMode",
|
|
14245
14254
|
"agentsMdExcludes"
|
|
14246
14255
|
]
|
|
@@ -27720,6 +27729,8 @@ const MUSECODE_RULE_FILE_NAME = "AGENTS.md";
|
|
|
27720
27729
|
const MUSECODE_SKILLS_DIR_PATH = AGENTSMD_SKILLS_DIR_PATH;
|
|
27721
27730
|
const MUSECODE_GLOBAL_CONFIG_DIR_PATH = join(".config", "muse");
|
|
27722
27731
|
const MUSECODE_GLOBAL_SKILLS_DIR_PATH = join(MUSECODE_GLOBAL_CONFIG_DIR_PATH, "skills");
|
|
27732
|
+
const MUSECODE_SUBAGENTS_DIR_PATH = AGENTSMD_SUBAGENTS_DIR_PATH;
|
|
27733
|
+
const MUSECODE_GLOBAL_SUBAGENTS_DIR_PATH = join(MUSECODE_GLOBAL_CONFIG_DIR_PATH, "agents");
|
|
27723
27734
|
const MUSECODE_SETTINGS_FILE_NAME = "settings.json";
|
|
27724
27735
|
// src/features/skills/musecode-skill.ts
|
|
27725
27736
|
const MusecodeSkillFrontmatterSchema = z.looseObject({
|
|
@@ -30711,6 +30722,17 @@ const AntigravitySubagentFrontmatterSchema = z.looseObject({
|
|
|
30711
30722
|
*/
|
|
30712
30723
|
const ANTIGRAVITY_SHARED_SUBAGENT_SECTION_KEYS = ["antigravity-ide", "antigravity-cli"];
|
|
30713
30724
|
/**
|
|
30725
|
+
* Tool-specific rulesync sections every writer of the project
|
|
30726
|
+
* `.agents/agents/<name>.md` file merges, in increasing precedence order.
|
|
30727
|
+
*
|
|
30728
|
+
* Muse Code loads its project agents from the same directory, so its section
|
|
30729
|
+
* is merged into the shared file too, below the Antigravity blocks: a key both
|
|
30730
|
+
* set keeps the Antigravity value the file carried before Muse Code joined.
|
|
30731
|
+
* Global agents live in per-tool directories, so this list applies to the
|
|
30732
|
+
* project file only.
|
|
30733
|
+
*/
|
|
30734
|
+
const AGENTS_DIR_SHARED_SUBAGENT_SECTION_KEYS = ["musecode", ...ANTIGRAVITY_SHARED_SUBAGENT_SECTION_KEYS];
|
|
30735
|
+
/**
|
|
30714
30736
|
* Build the frontmatter an `.agents/agents/<name>.md` file carries.
|
|
30715
30737
|
*
|
|
30716
30738
|
* That path is shared: every Antigravity target writes it, and so does the
|
|
@@ -30808,11 +30830,13 @@ var AntigravitySharedSubagent = class extends ToolSubagent {
|
|
|
30808
30830
|
* therefore merges the shared `antigravity-ide` → `antigravity-cli` sections
|
|
30809
30831
|
* (the CLI block wins, matching the fixed order the MCP feature already uses
|
|
30810
30832
|
* for the same shared-output reason), and the plugin target layers its own
|
|
30811
|
-
* section on top of that.
|
|
30812
|
-
*
|
|
30833
|
+
* section on top of that. The project file is also read by Muse Code, so in
|
|
30834
|
+
* project scope the `musecode` section is merged underneath (see
|
|
30835
|
+
* {@link AGENTS_DIR_SHARED_SUBAGENT_SECTION_KEYS}). Only `getToolTarget()`
|
|
30836
|
+
* decides which section an import writes back into.
|
|
30813
30837
|
*/
|
|
30814
|
-
static getReadSectionKeys() {
|
|
30815
|
-
return [...ANTIGRAVITY_SHARED_SUBAGENT_SECTION_KEYS];
|
|
30838
|
+
static getReadSectionKeys({ global = false } = {}) {
|
|
30839
|
+
return global ? [...ANTIGRAVITY_SHARED_SUBAGENT_SECTION_KEYS] : [...AGENTS_DIR_SHARED_SUBAGENT_SECTION_KEYS];
|
|
30816
30840
|
}
|
|
30817
30841
|
static getSettablePaths({ global = false } = {}) {
|
|
30818
30842
|
return { relativeDirPath: global ? ANTIGRAVITY_GLOBAL_AGENTS_DIR_PATH : ANTIGRAVITY_AGENTS_DIR_PATH };
|
|
@@ -30842,7 +30866,7 @@ var AntigravitySharedSubagent = class extends ToolSubagent {
|
|
|
30842
30866
|
static fromRulesyncSubagent({ outputRoot = process.cwd(), rulesyncSubagent, validate = true, global = false }) {
|
|
30843
30867
|
const frontmatter = toAntigravitySubagentFrontmatter({
|
|
30844
30868
|
rulesyncSubagent,
|
|
30845
|
-
sectionKeys: this.getReadSectionKeys(),
|
|
30869
|
+
sectionKeys: this.getReadSectionKeys({ global }),
|
|
30846
30870
|
toolTarget: this.getToolTarget()
|
|
30847
30871
|
});
|
|
30848
30872
|
const body = rulesyncSubagent.getBody();
|
|
@@ -31032,7 +31056,7 @@ var AgentsmdSubagent = class AgentsmdSubagent extends SimulatedSubagent {
|
|
|
31032
31056
|
const defaults = this.fromRulesyncSubagentDefault(params);
|
|
31033
31057
|
const frontmatter = toAntigravitySubagentFrontmatter({
|
|
31034
31058
|
rulesyncSubagent: params.rulesyncSubagent,
|
|
31035
|
-
sectionKeys:
|
|
31059
|
+
sectionKeys: AGENTS_DIR_SHARED_SUBAGENT_SECTION_KEYS,
|
|
31036
31060
|
toolTarget: "agentsmd"
|
|
31037
31061
|
});
|
|
31038
31062
|
return new AgentsmdSubagent({
|
|
@@ -31095,7 +31119,7 @@ var AntigravityPluginSubagent = class extends AntigravitySharedSubagent {
|
|
|
31095
31119
|
return "antigravity-plugin";
|
|
31096
31120
|
}
|
|
31097
31121
|
static getReadSectionKeys() {
|
|
31098
|
-
return [...
|
|
31122
|
+
return [...ANTIGRAVITY_SHARED_SUBAGENT_SECTION_KEYS, "antigravity-plugin"];
|
|
31099
31123
|
}
|
|
31100
31124
|
static getSettablePaths() {
|
|
31101
31125
|
return { relativeDirPath: ANTIGRAVITY_PLUGIN_AGENTS_DIR };
|
|
@@ -31439,7 +31463,7 @@ var RooSubagent = class extends ToolSubagent {
|
|
|
31439
31463
|
* Aggregate every targeted rulesync subagent into a single `.roomodes` file.
|
|
31440
31464
|
* Modes are de-duplicated by `slug` (last one wins) to keep the array unique.
|
|
31441
31465
|
*/
|
|
31442
|
-
static fromRulesyncSubagents({ outputRoot = process.cwd(), rulesyncSubagents, validate = true }) {
|
|
31466
|
+
static fromRulesyncSubagents({ outputRoot = process.cwd(), rulesyncSubagents, validate = true, global = false }) {
|
|
31443
31467
|
const bySlug = /* @__PURE__ */ new Map();
|
|
31444
31468
|
for (const rulesyncSubagent of rulesyncSubagents) {
|
|
31445
31469
|
const mode = this.toRooMode(rulesyncSubagent);
|
|
@@ -31447,17 +31471,19 @@ var RooSubagent = class extends ToolSubagent {
|
|
|
31447
31471
|
}
|
|
31448
31472
|
return new this({
|
|
31449
31473
|
outputRoot,
|
|
31450
|
-
relativeDirPath: this.getSettablePaths().relativeDirPath,
|
|
31474
|
+
relativeDirPath: this.getSettablePaths({ global }).relativeDirPath,
|
|
31451
31475
|
relativeFilePath: this.modesFileName,
|
|
31452
31476
|
modes: [...bySlug.values()],
|
|
31453
|
-
validate
|
|
31477
|
+
validate,
|
|
31478
|
+
global
|
|
31454
31479
|
});
|
|
31455
31480
|
}
|
|
31456
|
-
static fromRulesyncSubagent({ outputRoot = process.cwd(), rulesyncSubagent, validate = true }) {
|
|
31481
|
+
static fromRulesyncSubagent({ outputRoot = process.cwd(), rulesyncSubagent, validate = true, global = false }) {
|
|
31457
31482
|
return this.fromRulesyncSubagents({
|
|
31458
31483
|
outputRoot,
|
|
31459
31484
|
rulesyncSubagents: [rulesyncSubagent],
|
|
31460
|
-
validate
|
|
31485
|
+
validate,
|
|
31486
|
+
global
|
|
31461
31487
|
});
|
|
31462
31488
|
}
|
|
31463
31489
|
/**
|
|
@@ -31513,8 +31539,8 @@ var RooSubagent = class extends ToolSubagent {
|
|
|
31513
31539
|
toolTarget: "roo"
|
|
31514
31540
|
});
|
|
31515
31541
|
}
|
|
31516
|
-
static async fromFile({ outputRoot = process.cwd(), relativeFilePath, validate = true }) {
|
|
31517
|
-
const paths = this.getSettablePaths();
|
|
31542
|
+
static async fromFile({ outputRoot = process.cwd(), relativeFilePath, validate = true, global = false }) {
|
|
31543
|
+
const paths = this.getSettablePaths({ global });
|
|
31518
31544
|
const filePath = join(outputRoot, paths.relativeDirPath, relativeFilePath);
|
|
31519
31545
|
const fileContent = await readFileContent(filePath);
|
|
31520
31546
|
let parsed;
|
|
@@ -31530,16 +31556,18 @@ var RooSubagent = class extends ToolSubagent {
|
|
|
31530
31556
|
relativeDirPath: paths.relativeDirPath,
|
|
31531
31557
|
relativeFilePath: basename(relativeFilePath),
|
|
31532
31558
|
modes: result.data.customModes,
|
|
31533
|
-
validate
|
|
31559
|
+
validate,
|
|
31560
|
+
global
|
|
31534
31561
|
});
|
|
31535
31562
|
}
|
|
31536
|
-
static forDeletion({ outputRoot = process.cwd(), relativeDirPath, relativeFilePath }) {
|
|
31563
|
+
static forDeletion({ outputRoot = process.cwd(), relativeDirPath, relativeFilePath, global = false }) {
|
|
31537
31564
|
return new this({
|
|
31538
31565
|
outputRoot,
|
|
31539
31566
|
relativeDirPath,
|
|
31540
31567
|
relativeFilePath,
|
|
31541
31568
|
modes: [],
|
|
31542
|
-
validate: false
|
|
31569
|
+
validate: false,
|
|
31570
|
+
global
|
|
31543
31571
|
});
|
|
31544
31572
|
}
|
|
31545
31573
|
};
|
|
@@ -31551,8 +31579,13 @@ var RooSubagent = class extends ToolSubagent {
|
|
|
31551
31579
|
* presets `explore` and `general` — but it reads custom modes from an
|
|
31552
31580
|
* aggregated `customModes` YAML file in Roo's format, so every targeted rulesync
|
|
31553
31581
|
* subagent becomes one mode in `.bob/custom_modes.yaml`, exactly as the `roo`
|
|
31554
|
-
* target fills `.roomodes`.
|
|
31555
|
-
*
|
|
31582
|
+
* target fills `.roomodes`. In global mode the same array goes to
|
|
31583
|
+
* `~/.bob/settings/custom_modes.yaml`, the user file both the Bob IDE and Bob
|
|
31584
|
+
* Shell custom-modes pages name. That file is unversioned and Bob IDE's "Edit
|
|
31585
|
+
* Global Modes" setting writes it too, so rulesync does not own it: a global
|
|
31586
|
+
* generate merges the generated modes into it by `slug`, keeps every other
|
|
31587
|
+
* mode, and the file is never deleted. The project file stays wholly owned by
|
|
31588
|
+
* rulesync, like Roo's `.roomodes`.
|
|
31556
31589
|
*
|
|
31557
31590
|
* The mode fields ride a `bob:` frontmatter section rather than Roo's `roo:`
|
|
31558
31591
|
* one, because Bob's tool groups are spelled differently (`execute` where Roo
|
|
@@ -31569,7 +31602,7 @@ var RooSubagent = class extends ToolSubagent {
|
|
|
31569
31602
|
* @see https://bob.ibm.com/docs/shell/configuration/custom-modes-bobshell
|
|
31570
31603
|
* @see https://bob.ibm.com/docs/ide/features/subagents
|
|
31571
31604
|
*/
|
|
31572
|
-
var BobSubagent = class extends RooSubagent {
|
|
31605
|
+
var BobSubagent = class BobSubagent extends RooSubagent {
|
|
31573
31606
|
static modesFileName = BOB_CUSTOM_MODES_FILE_NAME;
|
|
31574
31607
|
static modeSectionKey = "bob";
|
|
31575
31608
|
static defaultGroups = [
|
|
@@ -31579,12 +31612,74 @@ var BobSubagent = class extends RooSubagent {
|
|
|
31579
31612
|
"mcp"
|
|
31580
31613
|
];
|
|
31581
31614
|
static importTarget = "bob";
|
|
31582
|
-
static getSettablePaths(
|
|
31615
|
+
static getSettablePaths({ global = false } = {}) {
|
|
31583
31616
|
return {
|
|
31584
|
-
relativeDirPath: BOB_DIR,
|
|
31617
|
+
relativeDirPath: global ? BOB_GLOBAL_SETTINGS_DIR_PATH : BOB_DIR,
|
|
31585
31618
|
relativeFilePath: BOB_CUSTOM_MODES_FILE_NAME
|
|
31586
31619
|
};
|
|
31587
31620
|
}
|
|
31621
|
+
/** Receives the merge warnings; set by {@link BobSubagent.fromRulesyncSubagents}. */
|
|
31622
|
+
bobLogger;
|
|
31623
|
+
static fromRulesyncSubagents(params) {
|
|
31624
|
+
const subagent = super.fromRulesyncSubagents(params);
|
|
31625
|
+
if (subagent instanceof BobSubagent) subagent.bobLogger = params.logger;
|
|
31626
|
+
return subagent;
|
|
31627
|
+
}
|
|
31628
|
+
isDeletable() {
|
|
31629
|
+
return !this.global;
|
|
31630
|
+
}
|
|
31631
|
+
shouldMergeExistingFileContent() {
|
|
31632
|
+
return this.global;
|
|
31633
|
+
}
|
|
31634
|
+
/**
|
|
31635
|
+
* Merge the generated modes into the existing global file: a mode whose
|
|
31636
|
+
* `slug` rulesync generates is replaced in place, every other entry is kept
|
|
31637
|
+
* as written, and new modes are appended. A file that cannot be read as a
|
|
31638
|
+
* `customModes` document is an error rather than something to overwrite.
|
|
31639
|
+
*/
|
|
31640
|
+
setFileContent(existingContent) {
|
|
31641
|
+
if (!this.global) {
|
|
31642
|
+
super.setFileContent(existingContent);
|
|
31643
|
+
return;
|
|
31644
|
+
}
|
|
31645
|
+
const filePath = join(this.getOutputRoot(), this.getRelativeDirPath(), this.getRelativeFilePath());
|
|
31646
|
+
let parsed;
|
|
31647
|
+
try {
|
|
31648
|
+
parsed = loadYaml(existingContent);
|
|
31649
|
+
} catch (error) {
|
|
31650
|
+
throw new Error(`Failed to parse custom modes (${filePath}); not overwriting it: ${formatError(error)}`, { cause: error });
|
|
31651
|
+
}
|
|
31652
|
+
const existingModes = isRecord(parsed) ? parsed.customModes : void 0;
|
|
31653
|
+
if (!(parsed === null || parsed === void 0 || isRecord(parsed)) || !(existingModes === null || existingModes === void 0 || Array.isArray(existingModes))) throw new Error(`Invalid custom modes in ${filePath}; not overwriting it: expected a "customModes" list.`);
|
|
31654
|
+
const generatedModes = this.getModes();
|
|
31655
|
+
const generatedSlugs = new Set(generatedModes.map((mode) => mode.slug));
|
|
31656
|
+
const pending = new Map(generatedModes.map((mode) => [mode.slug, mode]));
|
|
31657
|
+
const duplicateSlugs = /* @__PURE__ */ new Set();
|
|
31658
|
+
const merged = [];
|
|
31659
|
+
for (const entry of Array.isArray(existingModes) ? existingModes : []) {
|
|
31660
|
+
const slug = isRecord(entry) ? entry.slug : void 0;
|
|
31661
|
+
if (typeof slug !== "string" || !generatedSlugs.has(slug)) {
|
|
31662
|
+
merged.push(entry);
|
|
31663
|
+
continue;
|
|
31664
|
+
}
|
|
31665
|
+
const mode = pending.get(slug);
|
|
31666
|
+
if (mode === void 0) {
|
|
31667
|
+
duplicateSlugs.add(slug);
|
|
31668
|
+
continue;
|
|
31669
|
+
}
|
|
31670
|
+
merged.push(mode);
|
|
31671
|
+
pending.delete(slug);
|
|
31672
|
+
}
|
|
31673
|
+
merged.push(...pending.values());
|
|
31674
|
+
if (duplicateSlugs.size > 0) this.bobLogger?.warn(`Removed duplicate Bob custom mode(s) ${[...duplicateSlugs].map(quoteValueForWarning).join(", ")} from ${filePath}: rulesync generates these slugs and keeps only one entry for each.`);
|
|
31675
|
+
super.setFileContent(dump({
|
|
31676
|
+
...isRecord(parsed) ? parsed : {},
|
|
31677
|
+
customModes: merged
|
|
31678
|
+
}, {
|
|
31679
|
+
lineWidth: -1,
|
|
31680
|
+
noRefs: true
|
|
31681
|
+
}));
|
|
31682
|
+
}
|
|
31588
31683
|
static isTargetedByRulesyncSubagent(rulesyncSubagent) {
|
|
31589
31684
|
return this.isTargetedByRulesyncSubagentDefault({
|
|
31590
31685
|
rulesyncSubagent,
|
|
@@ -35662,6 +35757,87 @@ var OpenCodeSubagent = class extends OpenCodeStyleSubagent {
|
|
|
35662
35757
|
var MimocodeSubagent = class extends OpenCodeSubagent {
|
|
35663
35758
|
static layout = MIMOCODE_LAYOUT;
|
|
35664
35759
|
};
|
|
35760
|
+
// src/features/subagents/musecode-subagent.ts
|
|
35761
|
+
/**
|
|
35762
|
+
* Muse Code agent names are lowercase words joined by single hyphens
|
|
35763
|
+
* (`test-writer`).
|
|
35764
|
+
*
|
|
35765
|
+
* @see https://dev.meta.ai/docs/muse-code/agents
|
|
35766
|
+
*/
|
|
35767
|
+
const MUSECODE_AGENT_NAME_PATTERN = /^[a-z]+(?:-[a-z]+)*$/;
|
|
35768
|
+
/**
|
|
35769
|
+
* The frontmatter keys the Muse Code agents page documents.
|
|
35770
|
+
*
|
|
35771
|
+
* @see https://dev.meta.ai/docs/muse-code/agents
|
|
35772
|
+
*/
|
|
35773
|
+
const MUSECODE_DOCUMENTED_FRONTMATTER_KEYS = /* @__PURE__ */ new Set([
|
|
35774
|
+
"name",
|
|
35775
|
+
"description",
|
|
35776
|
+
"model",
|
|
35777
|
+
"effort",
|
|
35778
|
+
"tools",
|
|
35779
|
+
"disallowedTools"
|
|
35780
|
+
]);
|
|
35781
|
+
/**
|
|
35782
|
+
* Meta Muse Code custom agent (subagent): a Markdown file with YAML
|
|
35783
|
+
* frontmatter (`name`, `description`, and optionally `model`, `effort`,
|
|
35784
|
+
* `tools`, `disallowedTools`) whose body is the agent's prompt.
|
|
35785
|
+
*
|
|
35786
|
+
* Project agents load from `.agents/agents/`, the directory the Antigravity
|
|
35787
|
+
* targets and the simulated `agentsmd` writer already generate into, so the
|
|
35788
|
+
* project file is rendered exactly like theirs (the `musecode` section is part
|
|
35789
|
+
* of the merge every writer of that file performs) and the file on disk does
|
|
35790
|
+
* not depend on which target ran last. User agents load from
|
|
35791
|
+
* `~/.config/muse/agents/`, which only this target writes, so only the
|
|
35792
|
+
* `musecode` section is merged there.
|
|
35793
|
+
*
|
|
35794
|
+
* @see https://dev.meta.ai/docs/muse-code/agents
|
|
35795
|
+
*/
|
|
35796
|
+
var MusecodeSubagent = class extends AntigravitySharedSubagent {
|
|
35797
|
+
static getToolTarget() {
|
|
35798
|
+
return "musecode";
|
|
35799
|
+
}
|
|
35800
|
+
static getReadSectionKeys({ global = false } = {}) {
|
|
35801
|
+
return global ? ["musecode"] : super.getReadSectionKeys({ global });
|
|
35802
|
+
}
|
|
35803
|
+
static getSettablePaths({ global = false } = {}) {
|
|
35804
|
+
return { relativeDirPath: global ? MUSECODE_GLOBAL_SUBAGENTS_DIR_PATH : MUSECODE_SUBAGENTS_DIR_PATH };
|
|
35805
|
+
}
|
|
35806
|
+
static fromRulesyncSubagent(params) {
|
|
35807
|
+
const name = params.rulesyncSubagent.getFrontmatter().name;
|
|
35808
|
+
if (!MUSECODE_AGENT_NAME_PATTERN.test(name)) params.logger?.warn(`Muse Code subagent name '${name}' in ${params.rulesyncSubagent.getRelativeFilePath()} is not lowercase words joined by single hyphens (e.g. 'test-writer'); Muse Code may not load it.`);
|
|
35809
|
+
const subagent = super.fromRulesyncSubagent(params);
|
|
35810
|
+
if (!params.global && subagent instanceof AntigravitySharedSubagent) this.warnAboutSharedProjectFile({
|
|
35811
|
+
params,
|
|
35812
|
+
subagent
|
|
35813
|
+
});
|
|
35814
|
+
return subagent;
|
|
35815
|
+
}
|
|
35816
|
+
/**
|
|
35817
|
+
* The project file is shared with the Antigravity writers, so its content
|
|
35818
|
+
* cannot be narrowed to what Muse Code documents. Say so instead when the
|
|
35819
|
+
* merged file differs from what the `musecode` block alone would produce.
|
|
35820
|
+
*/
|
|
35821
|
+
static warnAboutSharedProjectFile({ params, subagent }) {
|
|
35822
|
+
const { logger, rulesyncSubagent } = params;
|
|
35823
|
+
const relativeFilePath = rulesyncSubagent.getRelativeFilePath();
|
|
35824
|
+
const undocumentedKeys = Object.keys(subagent.getFrontmatter()).filter((key) => !MUSECODE_DOCUMENTED_FRONTMATTER_KEYS.has(key));
|
|
35825
|
+
if (undocumentedKeys.length > 0) logger?.warn(`Muse Code subagent ${relativeFilePath}: the shared .agents/agents/ file carries keys Muse Code does not document (${undocumentedKeys.join(", ")}), set in a musecode or antigravity-* block; Muse Code may refuse to load the agent.`);
|
|
35826
|
+
const rulesyncFrontmatter = rulesyncSubagent.getFrontmatter();
|
|
35827
|
+
const musecodeSection = rulesyncFrontmatter.musecode;
|
|
35828
|
+
if (!isPlainObject(musecodeSection)) return;
|
|
35829
|
+
for (const key of Object.keys(musecodeSection)) {
|
|
35830
|
+
if (key === "name" || key === "description") continue;
|
|
35831
|
+
const overridingSection = ANTIGRAVITY_SHARED_SUBAGENT_SECTION_KEYS.toReversed().find((sectionKey) => {
|
|
35832
|
+
const section = rulesyncFrontmatter[sectionKey];
|
|
35833
|
+
return isPlainObject(section) && section[key] !== void 0;
|
|
35834
|
+
});
|
|
35835
|
+
if (overridingSection === void 0) continue;
|
|
35836
|
+
const overridingValue = rulesyncFrontmatter[overridingSection][key];
|
|
35837
|
+
if (!isDeepStrictEqual(overridingValue, musecodeSection[key])) logger?.warn(`Muse Code subagent ${relativeFilePath}: '${key}' from the musecode block is overridden by the ${overridingSection} block in the shared .agents/agents/ file.`);
|
|
35838
|
+
}
|
|
35839
|
+
}
|
|
35840
|
+
};
|
|
35665
35841
|
// src/features/subagents/omp-subagent.ts
|
|
35666
35842
|
/**
|
|
35667
35843
|
* Frontmatter of an oh-my-pi agent definition (`parseAgentFields` in
|
|
@@ -37435,7 +37611,7 @@ const toolSubagentFactories = /* @__PURE__ */ new Map([
|
|
|
37435
37611
|
meta: {
|
|
37436
37612
|
supportsProject: true,
|
|
37437
37613
|
supportsSimulated: false,
|
|
37438
|
-
supportsGlobal:
|
|
37614
|
+
supportsGlobal: true,
|
|
37439
37615
|
filePattern: "custom_modes.yaml"
|
|
37440
37616
|
}
|
|
37441
37617
|
}],
|
|
@@ -37713,6 +37889,15 @@ const toolSubagentFactories = /* @__PURE__ */ new Map([
|
|
|
37713
37889
|
filePattern: "*.md"
|
|
37714
37890
|
}
|
|
37715
37891
|
}],
|
|
37892
|
+
["musecode", {
|
|
37893
|
+
class: MusecodeSubagent,
|
|
37894
|
+
meta: {
|
|
37895
|
+
supportsProject: true,
|
|
37896
|
+
supportsSimulated: false,
|
|
37897
|
+
supportsGlobal: true,
|
|
37898
|
+
filePattern: "*.md"
|
|
37899
|
+
}
|
|
37900
|
+
}],
|
|
37716
37901
|
["omp", {
|
|
37717
37902
|
class: OmpSubagent,
|
|
37718
37903
|
meta: {
|
|
@@ -53899,13 +54084,29 @@ function isEventApplicable({ events, eventName }) {
|
|
|
53899
54084
|
function describeEvents(names) {
|
|
53900
54085
|
return [...names].map((name) => `"${name}"`).join(", ");
|
|
53901
54086
|
}
|
|
54087
|
+
const COMMAND_HOOK_TYPES = /* @__PURE__ */ new Set(["command"]);
|
|
53902
54088
|
/**
|
|
53903
|
-
*
|
|
53904
|
-
*
|
|
53905
|
-
* the exporter would then drop is silently deleted on the next generate.
|
|
54089
|
+
* The hook types a field is documented on, or `undefined` when unrestricted.
|
|
54090
|
+
* `commandOnly` is shorthand for `command` alone.
|
|
53906
54091
|
*/
|
|
53907
|
-
function
|
|
53908
|
-
return commandOnly
|
|
54092
|
+
function documentedHookTypes({ commandOnly, hookTypes }) {
|
|
54093
|
+
return commandOnly === true ? COMMAND_HOOK_TYPES : hookTypes;
|
|
54094
|
+
}
|
|
54095
|
+
/** Quote the hook types a restricted field is documented on, for a warning. */
|
|
54096
|
+
function describeDocumentedHookTypes(spec) {
|
|
54097
|
+
return describeEvents(documentedHookTypes(spec) ?? COMMAND_HOOK_TYPES);
|
|
54098
|
+
}
|
|
54099
|
+
/**
|
|
54100
|
+
* Whether a field registered for some hook types only (`command` hooks, or
|
|
54101
|
+
* the listed `hookTypes`) applies to this hook. Applied on both export and
|
|
54102
|
+
* import: a value imported into a canonical field the exporter would then
|
|
54103
|
+
* drop is silently deleted on the next generate.
|
|
54104
|
+
*/
|
|
54105
|
+
function isFieldApplicable({ commandOnly, hookTypes, hookType }) {
|
|
54106
|
+
return documentedHookTypes({
|
|
54107
|
+
commandOnly,
|
|
54108
|
+
hookTypes
|
|
54109
|
+
})?.has(hookType) ?? true;
|
|
53909
54110
|
}
|
|
53910
54111
|
/**
|
|
53911
54112
|
* Emit the configured passthrough fields on the tool side, mapping each
|
|
@@ -53920,14 +54121,18 @@ function isFieldApplicable({ commandOnly, hookType }) {
|
|
|
53920
54121
|
* silence — the mirror of the import side.
|
|
53921
54122
|
*/
|
|
53922
54123
|
function emitPassthroughFields({ def, hookType, eventName, fields, isValid, warn }) {
|
|
53923
|
-
for (const { canonical, tool, commandOnly, maxLength, collapseWhitespaceForLength, onlyWithFlag, events } of fields) {
|
|
54124
|
+
for (const { canonical, tool, commandOnly, hookTypes, maxLength, collapseWhitespaceForLength, onlyWithFlag, events } of fields) {
|
|
53924
54125
|
const value = def[canonical];
|
|
53925
54126
|
if (value === void 0) continue;
|
|
53926
54127
|
if (!isFieldApplicable({
|
|
53927
54128
|
commandOnly,
|
|
54129
|
+
hookTypes,
|
|
53928
54130
|
hookType
|
|
53929
54131
|
})) {
|
|
53930
|
-
warn?.(`Dropping "${canonical}" from a "${hookType}" hook on "${eventName}": this tool documents "${tool}" on
|
|
54132
|
+
warn?.(`Dropping "${canonical}" from a "${hookType}" hook on "${eventName}": this tool documents "${tool}" on ${describeDocumentedHookTypes({
|
|
54133
|
+
commandOnly,
|
|
54134
|
+
hookTypes
|
|
54135
|
+
})} hooks only, so it is not generated.`);
|
|
53931
54136
|
continue;
|
|
53932
54137
|
}
|
|
53933
54138
|
if (events !== void 0 && !isEventApplicable({
|
|
@@ -53950,8 +54155,9 @@ function emitPassthroughFields({ def, hookType, eventName, fields, isValid, warn
|
|
|
53950
54155
|
if (length > maxLength) warn?.(`"${canonical}" on a "${hookType}" hook on "${eventName}" is ${length} characters long${collapseWhitespaceForLength ? " after collapsing whitespace" : ""}; this tool caps "${tool}" at ${maxLength} characters and will shorten it.`);
|
|
53951
54156
|
}
|
|
53952
54157
|
}
|
|
53953
|
-
return Object.fromEntries(fields.filter(({ canonical, commandOnly, events }) => isFieldApplicable({
|
|
54158
|
+
return Object.fromEntries(fields.filter(({ canonical, commandOnly, hookTypes, events }) => isFieldApplicable({
|
|
53954
54159
|
commandOnly,
|
|
54160
|
+
hookTypes,
|
|
53955
54161
|
hookType
|
|
53956
54162
|
}) && isEventApplicable({
|
|
53957
54163
|
events,
|
|
@@ -53969,19 +54175,24 @@ function emitPassthroughFields({ def, hookType, eventName, fields, isValid, warn
|
|
|
53969
54175
|
* value into a warning instead of a silent drop.
|
|
53970
54176
|
*/
|
|
53971
54177
|
function importPassthroughFields({ h, hookType, eventName, fields, isValid, describeInvalid, warn }) {
|
|
53972
|
-
const typeApplicable = fields.filter(({ commandOnly }) => isFieldApplicable({
|
|
54178
|
+
const typeApplicable = fields.filter(({ commandOnly, hookTypes }) => isFieldApplicable({
|
|
53973
54179
|
commandOnly,
|
|
54180
|
+
hookTypes,
|
|
53974
54181
|
hookType
|
|
53975
54182
|
}));
|
|
53976
54183
|
const applicable = typeApplicable.filter(({ events }) => isEventApplicable({
|
|
53977
54184
|
events,
|
|
53978
54185
|
eventName
|
|
53979
54186
|
}));
|
|
53980
|
-
const skipped = fields.filter(({ commandOnly }) => !isFieldApplicable({
|
|
54187
|
+
const skipped = fields.filter(({ commandOnly, hookTypes }) => !isFieldApplicable({
|
|
53981
54188
|
commandOnly,
|
|
54189
|
+
hookTypes,
|
|
53982
54190
|
hookType
|
|
53983
54191
|
}));
|
|
53984
|
-
for (const { tool } of skipped) if (h[tool] !== void 0) warn?.(`Dropping "${tool}" from an imported "${hookType}" hook: this tool documents it on
|
|
54192
|
+
for (const { tool, commandOnly, hookTypes } of skipped) if (h[tool] !== void 0) warn?.(`Dropping "${tool}" from an imported "${hookType}" hook: this tool documents it on ${describeDocumentedHookTypes({
|
|
54193
|
+
commandOnly,
|
|
54194
|
+
hookTypes
|
|
54195
|
+
})} hooks only, so it is not imported.`);
|
|
53985
54196
|
for (const { tool, events } of typeApplicable) if (events !== void 0 && !isEventApplicable({
|
|
53986
54197
|
events,
|
|
53987
54198
|
eventName
|
|
@@ -54155,13 +54366,13 @@ function isKeywordFieldApplicable({ spec, hookType, eventName, flags, direction,
|
|
|
54155
54366
|
const field = direction === "generated" ? canonical : tool;
|
|
54156
54367
|
if (!isFieldApplicable({
|
|
54157
54368
|
commandOnly,
|
|
54369
|
+
hookTypes,
|
|
54158
54370
|
hookType
|
|
54159
54371
|
})) {
|
|
54160
|
-
warn?.(`Dropping "${field}" from a "${hookType}" hook on "${eventName}": this tool documents "${tool}" on
|
|
54161
|
-
|
|
54162
|
-
|
|
54163
|
-
|
|
54164
|
-
warn?.(`Dropping "${field}" from a "${hookType}" hook on "${eventName}": this tool documents "${tool}" on ${describeEvents(hookTypes)} hooks only, so it is not ${direction}.`);
|
|
54372
|
+
warn?.(`Dropping "${field}" from a "${hookType}" hook on "${eventName}": this tool documents "${tool}" on ${describeDocumentedHookTypes({
|
|
54373
|
+
commandOnly,
|
|
54374
|
+
hookTypes
|
|
54375
|
+
})} hooks only, so it is not ${direction}.`);
|
|
54165
54376
|
return false;
|
|
54166
54377
|
}
|
|
54167
54378
|
if (events !== void 0 && !events.has(eventName)) {
|
|
@@ -59108,6 +59319,18 @@ const FACTORYDROID_CONVERTER_CONFIG = {
|
|
|
59108
59319
|
tool: "commandRegex",
|
|
59109
59320
|
valueType: "string",
|
|
59110
59321
|
subdividesGroup: true
|
|
59322
|
+
}],
|
|
59323
|
+
keywordPassthroughFields: [{
|
|
59324
|
+
canonical: "failClosed",
|
|
59325
|
+
tool: "onFailure",
|
|
59326
|
+
trueValue: "block",
|
|
59327
|
+
falseValue: "continue",
|
|
59328
|
+
events: /* @__PURE__ */ new Set([
|
|
59329
|
+
"preToolUse",
|
|
59330
|
+
"postToolUse",
|
|
59331
|
+
"beforeSubmitPrompt",
|
|
59332
|
+
"preCompact"
|
|
59333
|
+
])
|
|
59111
59334
|
}]
|
|
59112
59335
|
};
|
|
59113
59336
|
/** Droid's nine event names, the keys a standalone `hooks.json` is made of. */
|
|
@@ -62480,6 +62703,17 @@ var PoolHooks = class PoolHooks extends ToolHooks {
|
|
|
62480
62703
|
}
|
|
62481
62704
|
};
|
|
62482
62705
|
// src/features/hooks/qoder-hooks.ts
|
|
62706
|
+
const QODER_NO_MATCHER_EVENTS = /* @__PURE__ */ new Set([
|
|
62707
|
+
"beforeSubmitPrompt",
|
|
62708
|
+
"stop",
|
|
62709
|
+
"cwdChanged",
|
|
62710
|
+
"worktreeCreate",
|
|
62711
|
+
"worktreeRemove",
|
|
62712
|
+
"taskCreated",
|
|
62713
|
+
"taskCompleted",
|
|
62714
|
+
"teammateIdle"
|
|
62715
|
+
]);
|
|
62716
|
+
const QODER_AGENT_HOOK_TYPES = /* @__PURE__ */ new Set(["agent"]);
|
|
62483
62717
|
const QODER_SPEC = {
|
|
62484
62718
|
displayName: "Qoder",
|
|
62485
62719
|
overrideKey: "qoder",
|
|
@@ -62489,16 +62723,7 @@ const QODER_SPEC = {
|
|
|
62489
62723
|
toolToCanonicalEventNames: QODER_TO_CANONICAL_EVENT_NAMES,
|
|
62490
62724
|
projectDirVar: "$QODER_PROJECT_DIR",
|
|
62491
62725
|
prefixDotRelativeCommandsOnly: true,
|
|
62492
|
-
noMatcherEvents:
|
|
62493
|
-
"beforeSubmitPrompt",
|
|
62494
|
-
"stop",
|
|
62495
|
-
"cwdChanged",
|
|
62496
|
-
"worktreeCreate",
|
|
62497
|
-
"worktreeRemove",
|
|
62498
|
-
"taskCreated",
|
|
62499
|
-
"taskCompleted",
|
|
62500
|
-
"teammateIdle"
|
|
62501
|
-
]),
|
|
62726
|
+
noMatcherEvents: QODER_NO_MATCHER_EVENTS,
|
|
62502
62727
|
supportedHookTypes: /* @__PURE__ */ new Set([
|
|
62503
62728
|
"command",
|
|
62504
62729
|
"http",
|
|
@@ -62555,6 +62780,15 @@ const QODER_SPEC = {
|
|
|
62555
62780
|
canonical: "args",
|
|
62556
62781
|
tool: "args",
|
|
62557
62782
|
commandOnly: true
|
|
62783
|
+
}, {
|
|
62784
|
+
canonical: "tools",
|
|
62785
|
+
tool: "tools",
|
|
62786
|
+
hookTypes: QODER_AGENT_HOOK_TYPES
|
|
62787
|
+
}],
|
|
62788
|
+
numberPassthroughFields: [{
|
|
62789
|
+
canonical: "maxTurns",
|
|
62790
|
+
tool: "maxTurns",
|
|
62791
|
+
hookTypes: QODER_AGENT_HOOK_TYPES
|
|
62558
62792
|
}],
|
|
62559
62793
|
recordPassthroughFields: [{
|
|
62560
62794
|
canonical: "env",
|
|
@@ -82089,6 +82323,22 @@ const ANTIGRAVITY_CLI_OVERRIDE_KEYS = [
|
|
|
82089
82323
|
];
|
|
82090
82324
|
const moduleLogger$4 = fallbackLogger;
|
|
82091
82325
|
/**
|
|
82326
|
+
* The value the CLI stores in `agentMode` for its Default mode. Since CLI 1.5.7
|
|
82327
|
+
* an omitted `agentMode` starts the CLI in `auto` where available, and the
|
|
82328
|
+
* documented stored values are `""` (Default), `"accept-edits"`, `"auto"` and
|
|
82329
|
+
* `"plan"` — there is no `"default"` string.
|
|
82330
|
+
* @see https://antigravity.google/docs/cli/modes
|
|
82331
|
+
* @see https://github.com/google-antigravity/antigravity-cli/releases/tag/1.5.7
|
|
82332
|
+
*/
|
|
82333
|
+
const ANTIGRAVITY_CLI_STORED_DEFAULT_AGENT_MODE = "";
|
|
82334
|
+
/**
|
|
82335
|
+
* Translate the canonical `agentMode` override value to the value the CLI
|
|
82336
|
+
* stores: canonical `default` becomes `""`, other modes pass through.
|
|
82337
|
+
*/
|
|
82338
|
+
function toStoredAgentMode(value) {
|
|
82339
|
+
return value === "default" ? ANTIGRAVITY_CLI_STORED_DEFAULT_AGENT_MODE : value;
|
|
82340
|
+
}
|
|
82341
|
+
/**
|
|
82092
82342
|
* Narrow an imported `settings.json` value to one of the documented values of
|
|
82093
82343
|
* an enum-typed override key. The override schema declares `toolPermission`,
|
|
82094
82344
|
* `artifactReviewPolicy` and `agentMode` as `z.enum`, so carrying an
|
|
@@ -82225,7 +82475,7 @@ var AntigravityCliPermissions = class AntigravityCliPermissions extends ToolPerm
|
|
|
82225
82475
|
const override = config["antigravity-cli"];
|
|
82226
82476
|
for (const key of ANTIGRAVITY_CLI_OVERRIDE_KEYS) {
|
|
82227
82477
|
const value = override?.[key];
|
|
82228
|
-
if (value !== void 0) merged[key] = value;
|
|
82478
|
+
if (value !== void 0) merged[key] = key === "agentMode" ? toStoredAgentMode(value) : value;
|
|
82229
82479
|
}
|
|
82230
82480
|
const fileContent = JSON.stringify(merged, null, 2);
|
|
82231
82481
|
return new AntigravityCliPermissions({
|
|
@@ -82269,7 +82519,7 @@ var AntigravityCliPermissions = class AntigravityCliPermissions extends ToolPerm
|
|
|
82269
82519
|
});
|
|
82270
82520
|
if (artifactReviewPolicy !== void 0) override.artifactReviewPolicy = artifactReviewPolicy;
|
|
82271
82521
|
if (typeof settings.allowNonWorkspaceAccess === "boolean") override.allowNonWorkspaceAccess = settings.allowNonWorkspaceAccess;
|
|
82272
|
-
const agentMode = pickDocumentedValue({
|
|
82522
|
+
const agentMode = settings.agentMode === ANTIGRAVITY_CLI_STORED_DEFAULT_AGENT_MODE ? "default" : pickDocumentedValue({
|
|
82273
82523
|
key: "agentMode",
|
|
82274
82524
|
value: settings.agentMode,
|
|
82275
82525
|
documented: ANTIGRAVITY_CLI_AGENT_MODES
|
|
@@ -96871,7 +97121,8 @@ const QODER_OVERRIDE_GROUP_KEYS = {
|
|
|
96871
97121
|
"enabledProjectMcpServers",
|
|
96872
97122
|
"lazyLoad"
|
|
96873
97123
|
],
|
|
96874
|
-
agents: ["overrides"]
|
|
97124
|
+
agents: ["overrides"],
|
|
97125
|
+
security: ["disableYoloMode"]
|
|
96875
97126
|
};
|
|
96876
97127
|
const QODER_OVERRIDE_GROUPS = Object.keys(QODER_OVERRIDE_GROUP_KEYS);
|
|
96877
97128
|
/**
|
|
@@ -97134,7 +97385,8 @@ function isLiftableQoderValue(key, value) {
|
|
|
97134
97385
|
switch (key) {
|
|
97135
97386
|
case "defaultPermissionMode": return typeof value === "string" && value.trim() !== "";
|
|
97136
97387
|
case "enableAllProjectMcpServers":
|
|
97137
|
-
case "lazyLoad":
|
|
97388
|
+
case "lazyLoad":
|
|
97389
|
+
case "disableYoloMode": return typeof value === "boolean";
|
|
97138
97390
|
case "overrides": return isRecord(value) && Object.values(value).every(isRecord);
|
|
97139
97391
|
default: return isStringArray(value);
|
|
97140
97392
|
}
|
|
@@ -97395,7 +97647,8 @@ const QWEN_OVERRIDE_TOOLS_KEYS = [
|
|
|
97395
97647
|
"freeform",
|
|
97396
97648
|
"workflowsEnabled",
|
|
97397
97649
|
"workflowNameOnly",
|
|
97398
|
-
"executionSandbox"
|
|
97650
|
+
"executionSandbox",
|
|
97651
|
+
"lspEnabled"
|
|
97399
97652
|
];
|
|
97400
97653
|
const QWEN_OVERRIDE_SECURITY_KEYS = [
|
|
97401
97654
|
"folderTrust",
|
|
@@ -97473,6 +97726,11 @@ const QWEN_SCOPED_TOOLS_KEYS = {
|
|
|
97473
97726
|
grants: () => true,
|
|
97474
97727
|
globalNote: "Qwen Code ignores this key in workspace settings so a repository cannot choose its own sandbox; in the global scope it sets the filesystem and network policy every tool command runs under for every project on this machine (a System value still replaces it, and Qwen Code needs a restart to pick it up)."
|
|
97475
97728
|
},
|
|
97729
|
+
lspEnabled: {
|
|
97730
|
+
rule: "workspace-stripped",
|
|
97731
|
+
grants: (value) => value === true,
|
|
97732
|
+
globalNote: "Qwen Code ignores this key in workspace settings so a repository cannot start language servers on its own behalf; in the global scope it turns on LSP code intelligence for every project on this machine, and the servers run with your permissions. A server declared in a workspace `.lsp.json` still needs an explicitly trusted folder, LSP is refused at startup when `tools.executionSandbox` is set, and the `QWEN_CODE_ENABLE_LSP` / `QWEN_CODE_DISABLE_LSP` environment variables override this setting (disable wins)."
|
|
97733
|
+
},
|
|
97476
97734
|
workflowNameOnly: {
|
|
97477
97735
|
rule: "global-machine-wide",
|
|
97478
97736
|
projectNote: ({ qualifiedKey, quotedValue, filePath }) => `${qualifiedKey} = ${quotedValue} was written to the project-scoped ${filePath}. Qwen Code lets a workspace only turn this key on: \`true\` restricts the model to named workflows in this repository, while any other value cannot lift a restriction set in user or system settings.`,
|
|
@@ -107131,4 +107389,4 @@ const CHECKS_IMPORT_STRATEGY = {
|
|
|
107131
107389
|
};
|
|
107132
107390
|
export { RulesyncRule as $, RULESYNC_RULES_RELATIVE_DIR_PATH as $n, getFileSizeAndExecutableBit as $t, CODEBUDDY_LOCAL_RULE_FILE_NAME as A, ToolTargetSchema as An, fallbackLogger as At, CLAUDECODE_LOCAL_RULE_FILE_NAME as B, RULESYNC_CONFIG_RELATIVE_FILE_PATH as Bn, assertDirectoryIfExists as Bt, LETTACODE_DIR as C, toPosixPath as Cn, SourceEntrySchema as Ct, COMMANDCODE_DIR as D, ALL_TOOL_TARGETS as Dn, ConsoleLogger as Dt, FACTORYDROID_SETTINGS_LOCAL_FILE_NAME as E, mapWithConcurrency as En, findControlCharacter as Et, sweepRefusalReason as F, FEATURE_SOURCE_TREE_ENTRIES as Fn, CLIError as Ft, toInstructionBudgetFile as G, RULESYNC_IGNORE_RELATIVE_FILE_PATH as Gn, assertWritablePathInsideRoot as Gt, CLAUDECODE_SETTINGS_LOCAL_FILE_NAME as H, RULESYNC_CURATED_RULES_RELATIVE_DIR_PATH as Hn, assertNoSymlinkBelowRoot as Ht, CODEXCLI_BASH_RULES_FILE_NAME as I, MAX_FILE_SIZE as In, ErrorCodes as It, getLocalSkillDirNames as J, RULESYNC_MCP_SCHEMA_URL as Jn, directoryExists as Jt, classifyRemoteName as K, RULESYNC_LOCAL_CONFIG_RELATIVE_FILE_PATH as Kn, checkPathTraversal as Kt, CODEXCLI_DIR as L, RULESYNC_AIIGNORE_RELATIVE_FILE_PATH as Ln, parseJsonc as Lt, AUGMENTCODE_SETTINGS_LOCAL_FILE_NAME as M, ALL_FEATURES_WITH_WILDCARD as Mn, withFallbackLoggerTarget as Mt, caseFoldIdentity as N, DEPRECATED_FEATURE_REPLACEMENTS as Nn, resetRunWarningState as Nt, COMMANDCODE_SETTINGS_LOCAL_FILE_NAME as O, ALL_TOOL_TARGETS_WITH_WILDCARD as On, JsonLogger as Ot, groupSpellingsByCaseFoldedIdentity as P, CURATED_RULES_FEATURE_SUBDIR as Pn, withWarnOnceScope as Pt, RulesyncSkillFrontmatterSchema as Q, RULESYNC_RELATIVE_DIR_PATH as Qn, findFilesByGlobs as Qt, CLAUDECODE_AGENT_MEMORY_LOCAL_DIR_NAME as R, RULESYNC_CHECKS_RELATIVE_DIR_PATH as Rn, PathOutsideRootError as Rt, QWENCODE_LOCAL_RULE_FILE_NAME as S, splitPathSegments as Sn, GITIGNORE_DESTINATION_KEY as St, FACTORYDROID_DIR as T, writeFileContent as Tn, getSourceTransport as Tt, CLAUDECODE_SKILLS_DIR_PATH as U, RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH as Un, assertPathResolvesInsideRoot as Ut, CLAUDECODE_MEMORIES_DIR_NAME as V, RULESYNC_CONFIG_SCHEMA_URL as Vn, assertLandingOutsideVcsMetadata as Vt, findProjectInstructionBudgetFindings as W, RULESYNC_HOOKS_RELATIVE_FILE_PATH as Wn, assertTreeContainsNoSymlinks as Wt, RulesyncSubagentFrontmatterSchema as X, RULESYNC_PERMISSIONS_RELATIVE_FILE_PATH as Xn, fileExists as Xt, RulesyncSubagent as Y, RULESYNC_NPM_SOURCES_LOCK_RELATIVE_FILE_PATH as Yn, ensureDir as Yt, RulesyncSkill as Z, RULESYNC_PERMISSIONS_SCHEMA_URL as Zn, fileExistsStrict as Zt, SkillsProcessor as _, removeFileWithoutFollowingSymlinks as _n, mergeInputRootConfigs as _t, convertFromTool as a, listDirectoryEntryNames as an, formatMegabytes as ar, getRulesyncSourceCandidates as at, REASONIX_LOCAL_RULE_FILE_NAME as b, resolvedRelativePath as bn, CONFLICTING_TARGET_PAIRS as bt, ELLIPSIS_WIDTH as c, normalizePosixDirPath as cn, hasEnclosingMarkOutsideKeycap as cr, RulesyncCommandFrontmatterSchema as ct, McpProcessor as d, readFileContent as dn, stripControlCharactersKeepingLineFeeds as dr, stringifyFrontmatter as dt, getHomeDirectory as en, RULESYNC_SKILLS_RELATIVE_DIR_PATH as er, RulesyncRuleFrontmatterSchema as et, IgnoreProcessor as f, readFileContentOrNull as fn, stripControlCharactersKeepingLineFeedsAndTabs as fr, loadYaml as ft, SubagentsProcessor as g, removeFileStrict as gn, ConfigResolver as gt, RulesProcessor as h, removeFile as hn, SKILL_FILE_NAME as ht, inspectInputRoots as i, isSymlink as in, RULESYNC_XDG_CONFIG_HOME_DEFAULT_DIR_NAME as ir, RulesyncHooks as it, AUGMENTCODE_DIR as j, ALL_FEATURES as jn, warnOnConflictingFlags as jt, CODEBUDDY_DIR as k, PACKAGING_TOOL_TARGETS as kn, WarningCollectingLogger as kt, displayWidthOf as l, pathEscapesRoot as ln, quoteForLog as lr, RulesyncCheck as lt, ChecksProcessor as m, removeDirectoryStrict as mn, SHARED_USER_MANAGED_CONFIG_PATHS as mt, formatSourceLoadFailure as n, isFileSystemError as nn, RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH as nr, RulesyncMcp as nt, getProcessorRegistryEntry as o, listFilePathsRecursively as on, formatError as or, resolveRulesyncSourceWritePath as ot, HooksProcessor as p, removeDirectory as pn, stripHiddenCharacters as pr, isRecord as pt, hasWindowsFoldableName as q, RULESYNC_MCP_RELATIVE_FILE_PATH as qn, createTempDirectory as qt, generate as r, isRootDirPath as rn, RULESYNC_USER_CONFIG_DIR_NAME as rr, RulesyncIgnore as rt, parseCommaSeparatedList as s, listSubdirectoryNames as sn, truncateText as sr, RulesyncCommand as st, importFromTool as t, isFileNotFoundError as tn, RULESYNC_SOURCES_LOCK_RELATIVE_FILE_PATH as tr, RulesyncPermissions as tt, shortenToWidth as u, posixRelativePathEscapesRoot as un, stripControlCharacters as ur, RulesyncCheckFrontmatterSchema as ut, CRUSH_LOCAL_RULE_FILE_NAME as v, removeTempDirectory as vn, parseConfigFileContent as vt, LETTACODE_SETTINGS_LOCAL_FILE_NAME as w, writeFileBuffer as wn, assertTargetsFeaturesExclusive as wt, QWENCODE_DIR as x, runWithDirectoryRollback as xn, ConfigFileSchema as xt, CommandsProcessor as y, resolvePath as yn, resolveEffectiveInputRoots as yt, CLAUDECODE_DIR as z, RULESYNC_COMMANDS_RELATIVE_DIR_PATH as zn, applyFileMode as zt };
|
|
107133
107391
|
|
|
107134
|
-
//# sourceMappingURL=import-
|
|
107392
|
+
//# sourceMappingURL=import-BVWVIY-6.js.map
|