@scheduler-systems/gal-run 0.0.668 → 0.1.62

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.
Files changed (2) hide show
  1. package/dist/index.cjs +1480 -569
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -3881,7 +3881,7 @@ var cliVersion, defaultApiUrl, BUILD_CONSTANTS, constants_default;
3881
3881
  var init_constants = __esm({
3882
3882
  "module_6"() {
3883
3883
  "use strict";
3884
- cliVersion = true ? "0.0.668" : "0.0.0-dev";
3884
+ cliVersion = true ? "0.1.62" : "0.0.0-dev";
3885
3885
  defaultApiUrl = true ? "https://api.gal.run" : "http://localhost:3000";
3886
3886
  BUILD_CONSTANTS = Object.freeze([cliVersion, defaultApiUrl]);
3887
3887
  constants_default = BUILD_CONSTANTS;
@@ -11930,7 +11930,7 @@ function detectEnvironment() {
11930
11930
  return "dev";
11931
11931
  }
11932
11932
  try {
11933
- const version2 = true ? "0.0.668" : void 0;
11933
+ const version2 = true ? "0.1.62" : void 0;
11934
11934
  if (version2 && version2.includes("-local")) {
11935
11935
  return "dev";
11936
11936
  }
@@ -14611,7 +14611,7 @@ function getId() {
14611
14611
  }
14612
14612
  function getCliVersion() {
14613
14613
  try {
14614
- return true ? "0.0.668" : "0.0.0-dev";
14614
+ return true ? "0.1.62" : "0.0.0-dev";
14615
14615
  } catch {
14616
14616
  return "0.0.0-dev";
14617
14617
  }
@@ -15066,7 +15066,8 @@ var init_feature_flags = __esm({
15066
15066
  "enforcement-system",
15067
15067
  "browser-profiles",
15068
15068
  "governance-playground",
15069
- "token-spend"
15069
+ "token-spend",
15070
+ "policies"
15070
15071
  ];
15071
15072
  }
15072
15073
  });
@@ -16166,6 +16167,205 @@ var init_rate_card = __esm({
16166
16167
  }
16167
16168
  });
16168
16169
 
16170
+ function createDefaultDistributionPolicy(orgName) {
16171
+ return {
16172
+ orgName,
16173
+ name: "distribution-first-v1",
16174
+ description: "Enforces product discipline by requiring distribution/market validation before feature expansion work.",
16175
+ type: "distribution-first",
16176
+ status: "draft",
16177
+ rules: DEFAULT_POLICY_RULES,
16178
+ enforcement: {
16179
+ enabled: true,
16180
+ mode: "warn",
16181
+ scope: "org"
16182
+ },
16183
+ createdBy: "system",
16184
+ version: 1
16185
+ };
16186
+ }
16187
+ function evaluatePolicyRule(rule, context2) {
16188
+ const { condition } = rule;
16189
+ let matches = false;
16190
+ switch (condition.type) {
16191
+ case "work_type": {
16192
+ const workType = context2.workType;
16193
+ if (!workType)
16194
+ break;
16195
+ matches = evaluateCondition(workType, condition.operator, condition.value);
16196
+ break;
16197
+ }
16198
+ case "repo_pattern": {
16199
+ const repo = context2.repo;
16200
+ if (!repo)
16201
+ break;
16202
+ matches = evaluateCondition(repo, condition.operator, condition.value);
16203
+ break;
16204
+ }
16205
+ case "label": {
16206
+ const labels = context2.issueLabels || [];
16207
+ if (labels.length === 0)
16208
+ break;
16209
+ if (condition.operator === "equals") {
16210
+ matches = labels.includes(String(condition.value));
16211
+ } else if (condition.operator === "in" && Array.isArray(condition.value)) {
16212
+ matches = labels.some((l) => condition.value.includes(l));
16213
+ } else if (condition.operator === "contains") {
16214
+ matches = labels.some((l) => l.includes(String(condition.value)));
16215
+ }
16216
+ break;
16217
+ }
16218
+ case "issue_title": {
16219
+ const title = context2.issueTitle;
16220
+ if (!title)
16221
+ break;
16222
+ matches = evaluateCondition(title, condition.operator, condition.value);
16223
+ break;
16224
+ }
16225
+ case "custom": {
16226
+ matches = false;
16227
+ break;
16228
+ }
16229
+ }
16230
+ if (matches) {
16231
+ return {
16232
+ matches: true,
16233
+ reason: {
16234
+ ruleId: rule.id,
16235
+ ruleName: rule.name,
16236
+ message: rule.message,
16237
+ severity: rule.severity || "warning",
16238
+ evidenceRequired: rule.evidenceRequired
16239
+ }
16240
+ };
16241
+ }
16242
+ return { matches: false };
16243
+ }
16244
+ function evaluateCondition(actual, operator, expected) {
16245
+ switch (operator) {
16246
+ case "equals":
16247
+ return actual === expected;
16248
+ case "contains":
16249
+ return actual.includes(String(expected));
16250
+ case "matches":
16251
+ try {
16252
+ return new RegExp(String(expected)).test(actual);
16253
+ } catch {
16254
+ return false;
16255
+ }
16256
+ case "in":
16257
+ return Array.isArray(expected) && expected.includes(actual);
16258
+ case "not_in":
16259
+ return Array.isArray(expected) && !expected.includes(actual);
16260
+ default:
16261
+ return false;
16262
+ }
16263
+ }
16264
+ function checkPolicy(policy, context2) {
16265
+ const reasons = [];
16266
+ const evidenceRequired = [];
16267
+ if (!policy.enforcement.enabled || policy.enforcement.mode === "off") {
16268
+ return {
16269
+ allowed: true,
16270
+ mode: "off",
16271
+ policyId: policy.id,
16272
+ policyName: policy.name,
16273
+ policyVersion: policy.version,
16274
+ reasons: [],
16275
+ evidenceRequired: [],
16276
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
16277
+ };
16278
+ }
16279
+ if (policy.enforcement.scope === "repo" && policy.enforcement.repoScope) {
16280
+ if (context2.repo && !policy.enforcement.repoScope.includes(context2.repo)) {
16281
+ return {
16282
+ allowed: true,
16283
+ mode: "off",
16284
+ policyId: policy.id,
16285
+ policyName: policy.name,
16286
+ policyVersion: policy.version,
16287
+ reasons: [],
16288
+ evidenceRequired: [],
16289
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
16290
+ };
16291
+ }
16292
+ }
16293
+ for (const rule of policy.rules) {
16294
+ const result = evaluatePolicyRule(rule, context2);
16295
+ if (result.matches && result.reason) {
16296
+ reasons.push(result.reason);
16297
+ if (result.reason.evidenceRequired) {
16298
+ evidenceRequired.push(...result.reason.evidenceRequired);
16299
+ }
16300
+ }
16301
+ }
16302
+ const hasBlock = reasons.some((r2) => r2.severity === "error");
16303
+ const hasWarn = reasons.some((r2) => r2.severity === "warning");
16304
+ let allowed = true;
16305
+ let mode = policy.enforcement.mode;
16306
+ if (hasBlock) {
16307
+ if (mode === "block") {
16308
+ allowed = false;
16309
+ } else if (mode === "warn") {
16310
+ allowed = true;
16311
+ }
16312
+ } else if (hasWarn) {
16313
+ allowed = true;
16314
+ }
16315
+ return {
16316
+ allowed,
16317
+ mode,
16318
+ policyId: policy.id,
16319
+ policyName: policy.name,
16320
+ policyVersion: policy.version,
16321
+ reasons,
16322
+ evidenceRequired: [...new Set(evidenceRequired)],
16323
+ overridePath: allowed ? void 0 : `/api/policies/${policy.id}/override`,
16324
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
16325
+ };
16326
+ }
16327
+ var DEFAULT_POLICY_RULES;
16328
+ var init_policy = __esm({
16329
+ "module_93"() {
16330
+ "use strict";
16331
+ DEFAULT_POLICY_RULES = [
16332
+ {
16333
+ id: "check-distribution-status",
16334
+ name: "Distribution Status Check",
16335
+ description: "Requires distribution/market validation before feature work",
16336
+ condition: {
16337
+ type: "work_type",
16338
+ operator: "in",
16339
+ value: [
16340
+ "feature",
16341
+ "migration",
16342
+ "isolation",
16343
+ "agentization",
16344
+ "platformization"
16345
+ ]
16346
+ },
16347
+ action: "warn",
16348
+ message: "This work type requires distribution status documentation. Ensure product-market research, early-adopter waitlist, or focused release planning is documented before proceeding.",
16349
+ severity: "warning",
16350
+ evidenceRequired: ["distribution-status-doc", "market-research-summary"]
16351
+ },
16352
+ {
16353
+ id: "block-without-distribution",
16354
+ name: "Block Without Distribution Review",
16355
+ description: "Blocks work that has been flagged for distribution review",
16356
+ condition: {
16357
+ type: "label",
16358
+ operator: "equals",
16359
+ value: "needs-distribution-review"
16360
+ },
16361
+ action: "block",
16362
+ message: "Work blocked pending distribution review. Complete distribution status documentation before proceeding.",
16363
+ severity: "error"
16364
+ }
16365
+ ];
16366
+ }
16367
+ });
16368
+
16169
16369
  var dist_exports = {};
16170
16370
  __export(dist_exports, {
16171
16371
  AB_ROUTING_MODES: () => AB_ROUTING_MODES,
@@ -16202,6 +16402,7 @@ __export(dist_exports, {
16202
16402
  DEFAULT_OSS_EVAL_THRESHOLDS: () => DEFAULT_OSS_EVAL_THRESHOLDS,
16203
16403
  DEFAULT_OSS_EVAL_WEIGHTS: () => DEFAULT_OSS_EVAL_WEIGHTS,
16204
16404
  DEFAULT_OSS_EVAL_WIN_CRITERIA: () => DEFAULT_OSS_EVAL_WIN_CRITERIA,
16405
+ DEFAULT_POLICY_RULES: () => DEFAULT_POLICY_RULES,
16205
16406
  DEFAULT_PROVIDER_PRECEDENCE: () => DEFAULT_PROVIDER_PRECEDENCE,
16206
16407
  DEFAULT_RUNNER_LABEL: () => DEFAULT_RUNNER_LABEL,
16207
16408
  DEFAULT_SESSION_AGENT: () => DEFAULT_SESSION_AGENT,
@@ -16241,7 +16442,10 @@ __export(dist_exports, {
16241
16442
  calculateHealthState: () => calculateHealthState,
16242
16443
  calculateUsagePercent: () => calculateUsagePercent,
16243
16444
  checkEnforcement: () => checkEnforcement,
16445
+ checkPolicy: () => checkPolicy,
16446
+ createDefaultDistributionPolicy: () => createDefaultDistributionPolicy,
16244
16447
  determineFallbackReason: () => determineFallbackReason,
16448
+ evaluatePolicyRule: () => evaluatePolicyRule,
16245
16449
  formatProviderSelection: () => formatProviderSelection,
16246
16450
  getCredentialProviderConfig: () => getCredentialProviderConfig,
16247
16451
  isActiveBackgroundAgentRunnerLabel: () => isActiveBackgroundAgentRunnerLabel,
@@ -16263,7 +16467,7 @@ __export(dist_exports, {
16263
16467
  });
16264
16468
  var GAL_TERMS_URL, GAL_PRIVACY_URL, PLATFORM_DIRECTORIES, PLATFORM_PATTERNS, DEFAULT_ENFORCEMENT_SETTINGS, DEFAULT_DISPATCH_CATEGORIES;
16265
16469
  var init_dist2 = __esm({
16266
- "module_93"() {
16470
+ "module_94"() {
16267
16471
  "use strict";
16268
16472
  init_platform_registry();
16269
16473
  init_platform_registry();
@@ -16331,6 +16535,7 @@ var init_dist2 = __esm({
16331
16535
  init_user_settings();
16332
16536
  init_token_budget();
16333
16537
  init_rate_card();
16538
+ init_policy();
16334
16539
  GAL_TERMS_URL = "https://scheduler-systems.com/legal/en/gal-terms.pdf";
16335
16540
  GAL_PRIVACY_URL = "https://scheduler-systems.com/legal/en/gal-privacy.pdf";
16336
16541
  PLATFORM_DIRECTORIES = PLATFORM_DIRECTORY_MAP;
@@ -16637,7 +16842,7 @@ async function checkTermsAcceptance() {
16637
16842
  }
16638
16843
  var import_fs10, import_path10, import_os9, readline3, GAL_DIR3, CONFIG_FILE, TERMS_URL, PRIVACY_URL, TERMS_VERSION;
16639
16844
  var init_terms_acceptance = __esm({
16640
- "module_94"() {
16845
+ "module_95"() {
16641
16846
  "use strict";
16642
16847
  import_fs10 = require("fs");
16643
16848
  import_path10 = require("path");
@@ -16720,7 +16925,7 @@ function showPeriodicReminder() {
16720
16925
  }
16721
16926
  var import_fs11, import_path11, import_os10, GAL_DIR4, PREVIEW_STATE_FILE, ONE_DAY_MS, FEEDBACK_URL;
16722
16927
  var init_research_preview = __esm({
16723
- "module_95"() {
16928
+ "module_96"() {
16724
16929
  "use strict";
16725
16930
  import_fs11 = require("fs");
16726
16931
  import_path11 = require("path");
@@ -16736,7 +16941,7 @@ var init_research_preview = __esm({
16736
16941
 
16737
16942
  var Organization;
16738
16943
  var init_organization = __esm({
16739
- "module_96"() {
16944
+ "module_97"() {
16740
16945
  "use strict";
16741
16946
  Organization = class {
16742
16947
  constructor(id, name, installationId3, accountType, totalRepos, totalConfigs, totalCommands, totalHooks, settings, commands, hooks, platforms, hookSettings, planTier, seatLimit, stripeCustomerId, stripeSubscriptionId, manualGrant, configRepoEnabled, configRepoUrl, configRepoCreatedAt, lastConfigSyncAt, lastScanAt, audienceTierRef, audienceTierSource, entitledFeatures, installedByGithubId, installedByLogin, createdAt = /* @__PURE__ */ new Date(), updatedAt = /* @__PURE__ */ new Date(), memberCount) {
@@ -16835,20 +17040,20 @@ var init_organization = __esm({
16835
17040
  });
16836
17041
 
16837
17042
  var init_user2 = __esm({
16838
- "module_97"() {
17043
+ "module_98"() {
16839
17044
  "use strict";
16840
17045
  }
16841
17046
  });
16842
17047
 
16843
17048
  var init_scan_result = __esm({
16844
- "module_98"() {
17049
+ "module_99"() {
16845
17050
  "use strict";
16846
17051
  }
16847
17052
  });
16848
17053
 
16849
17054
  var TeamMember;
16850
17055
  var init_team_member = __esm({
16851
- "module_99"() {
17056
+ "module_100"() {
16852
17057
  "use strict";
16853
17058
  TeamMember = class {
16854
17059
  constructor(userId, githubLogin, githubId, name, email, avatarUrl, githubOrgRole, galRole, roleAssignedBy, roleAssignedAt, lastActiveAt, createdAt = /* @__PURE__ */ new Date(), updatedAt = /* @__PURE__ */ new Date()) {
@@ -16945,146 +17150,146 @@ var init_team_member = __esm({
16945
17150
  });
16946
17151
 
16947
17152
  var init_subscription = __esm({
16948
- "module_100"() {
17153
+ "module_101"() {
16949
17154
  "use strict";
16950
17155
  }
16951
17156
  });
16952
17157
 
16953
17158
  var init_workspace2 = __esm({
16954
- "module_101"() {
17159
+ "module_102"() {
16955
17160
  "use strict";
16956
17161
  }
16957
17162
  });
16958
17163
 
16959
17164
  var init_workspace_membership = __esm({
16960
- "module_102"() {
17165
+ "module_103"() {
16961
17166
  "use strict";
16962
17167
  }
16963
17168
  });
16964
17169
 
16965
17170
  var init_IOrganizationRepository = __esm({
16966
- "module_103"() {
17171
+ "module_104"() {
16967
17172
  "use strict";
16968
17173
  }
16969
17174
  });
16970
17175
 
16971
17176
  var init_IUserRepository = __esm({
16972
- "module_104"() {
17177
+ "module_105"() {
16973
17178
  "use strict";
16974
17179
  }
16975
17180
  });
16976
17181
 
16977
17182
  var init_IScanResultRepository = __esm({
16978
- "module_105"() {
17183
+ "module_106"() {
16979
17184
  "use strict";
16980
17185
  }
16981
17186
  });
16982
17187
 
16983
17188
  var init_ISubscriptionRepository = __esm({
16984
- "module_106"() {
17189
+ "module_107"() {
16985
17190
  "use strict";
16986
17191
  }
16987
17192
  });
16988
17193
 
16989
17194
  var init_IPersonalGitHubRepository = __esm({
16990
- "module_107"() {
17195
+ "module_108"() {
16991
17196
  "use strict";
16992
17197
  }
16993
17198
  });
16994
17199
 
16995
17200
  var init_IWorkspacePreferenceRepository = __esm({
16996
- "module_108"() {
17201
+ "module_109"() {
16997
17202
  "use strict";
16998
17203
  }
16999
17204
  });
17000
17205
 
17001
17206
  var init_IWorkItemRepository = __esm({
17002
- "module_109"() {
17207
+ "module_110"() {
17003
17208
  "use strict";
17004
17209
  }
17005
17210
  });
17006
17211
 
17007
17212
  var init_IAuthRepository = __esm({
17008
- "module_110"() {
17213
+ "module_111"() {
17009
17214
  "use strict";
17010
17215
  }
17011
17216
  });
17012
17217
 
17013
17218
  var init_IWorkspaceRepository = __esm({
17014
- "module_111"() {
17219
+ "module_112"() {
17015
17220
  "use strict";
17016
17221
  }
17017
17222
  });
17018
17223
 
17019
17224
  var init_ISessionRepository = __esm({
17020
- "module_112"() {
17225
+ "module_113"() {
17021
17226
  "use strict";
17022
17227
  }
17023
17228
  });
17024
17229
 
17025
17230
  var init_IConfigRepository = __esm({
17026
- "module_113"() {
17231
+ "module_114"() {
17027
17232
  "use strict";
17028
17233
  }
17029
17234
  });
17030
17235
 
17031
17236
  var init_IProposalRepository = __esm({
17032
- "module_114"() {
17237
+ "module_115"() {
17033
17238
  "use strict";
17034
17239
  }
17035
17240
  });
17036
17241
 
17037
17242
  var init_ITrackedRepoRepository = __esm({
17038
- "module_115"() {
17243
+ "module_116"() {
17039
17244
  "use strict";
17040
17245
  }
17041
17246
  });
17042
17247
 
17043
17248
  var init_ISdlcRepository = __esm({
17044
- "module_116"() {
17249
+ "module_117"() {
17045
17250
  "use strict";
17046
17251
  }
17047
17252
  });
17048
17253
 
17049
17254
  var init_ICredentialRepository = __esm({
17050
- "module_117"() {
17255
+ "module_118"() {
17051
17256
  "use strict";
17052
17257
  }
17053
17258
  });
17054
17259
 
17055
17260
  var init_IInviteRepository = __esm({
17056
- "module_118"() {
17261
+ "module_119"() {
17057
17262
  "use strict";
17058
17263
  }
17059
17264
  });
17060
17265
 
17061
17266
  var init_IBillingRepository = __esm({
17062
- "module_119"() {
17267
+ "module_120"() {
17063
17268
  "use strict";
17064
17269
  }
17065
17270
  });
17066
17271
 
17067
17272
  var init_IFleetRepository = __esm({
17068
- "module_120"() {
17273
+ "module_121"() {
17069
17274
  "use strict";
17070
17275
  }
17071
17276
  });
17072
17277
 
17073
17278
  var init_ITelemetryRepository = __esm({
17074
- "module_121"() {
17279
+ "module_122"() {
17075
17280
  "use strict";
17076
17281
  }
17077
17282
  });
17078
17283
 
17079
17284
  var init_RedirectValidator = __esm({
17080
- "module_122"() {
17285
+ "module_123"() {
17081
17286
  "use strict";
17082
17287
  }
17083
17288
  });
17084
17289
 
17085
17290
  var DomainError;
17086
17291
  var init_DomainError = __esm({
17087
- "module_123"() {
17292
+ "module_124"() {
17088
17293
  "use strict";
17089
17294
  DomainError = class _DomainError extends Error {
17090
17295
  constructor(message, code) {
@@ -17099,7 +17304,7 @@ var init_DomainError = __esm({
17099
17304
 
17100
17305
  var OrganizationService;
17101
17306
  var init_OrganizationService = __esm({
17102
- "module_124"() {
17307
+ "module_125"() {
17103
17308
  "use strict";
17104
17309
  init_organization();
17105
17310
  init_DomainError();
@@ -17300,7 +17505,7 @@ var init_OrganizationService = __esm({
17300
17505
 
17301
17506
  var ValidationError;
17302
17507
  var init_ValidationError = __esm({
17303
- "module_125"() {
17508
+ "module_126"() {
17304
17509
  "use strict";
17305
17510
  init_DomainError();
17306
17511
  ValidationError = class _ValidationError extends DomainError {
@@ -17334,7 +17539,7 @@ var init_ValidationError = __esm({
17334
17539
 
17335
17540
  var TeamService;
17336
17541
  var init_TeamService = __esm({
17337
- "module_126"() {
17542
+ "module_127"() {
17338
17543
  "use strict";
17339
17544
  init_team_member();
17340
17545
  init_ValidationError();
@@ -17481,13 +17686,13 @@ var init_TeamService = __esm({
17481
17686
  });
17482
17687
 
17483
17688
  var init_TeamSyncService = __esm({
17484
- "module_127"() {
17689
+ "module_128"() {
17485
17690
  "use strict";
17486
17691
  }
17487
17692
  });
17488
17693
 
17489
17694
  var init_organizations = __esm({
17490
- "module_128"() {
17695
+ "module_129"() {
17491
17696
  "use strict";
17492
17697
  init_OrganizationService();
17493
17698
  init_TeamService();
@@ -17497,7 +17702,7 @@ var init_organizations = __esm({
17497
17702
 
17498
17703
  var SubscriptionService;
17499
17704
  var init_SubscriptionService = __esm({
17500
- "module_129"() {
17705
+ "module_130"() {
17501
17706
  "use strict";
17502
17707
  SubscriptionService = class {
17503
17708
  constructor(subscriptionRepository) {
@@ -17520,14 +17725,14 @@ var init_SubscriptionService = __esm({
17520
17725
  });
17521
17726
 
17522
17727
  var init_subscriptions = __esm({
17523
- "module_130"() {
17728
+ "module_131"() {
17524
17729
  "use strict";
17525
17730
  init_SubscriptionService();
17526
17731
  }
17527
17732
  });
17528
17733
 
17529
17734
  var init_WorkspaceService = __esm({
17530
- "module_131"() {
17735
+ "module_132"() {
17531
17736
  "use strict";
17532
17737
  init_workspace2();
17533
17738
  init_workspace_membership();
@@ -17535,20 +17740,20 @@ var init_WorkspaceService = __esm({
17535
17740
  });
17536
17741
 
17537
17742
  var init_workspace3 = __esm({
17538
- "module_132"() {
17743
+ "module_133"() {
17539
17744
  "use strict";
17540
17745
  init_WorkspaceService();
17541
17746
  }
17542
17747
  });
17543
17748
 
17544
17749
  var init_IEnvironmentConfig = __esm({
17545
- "module_133"() {
17750
+ "module_134"() {
17546
17751
  "use strict";
17547
17752
  }
17548
17753
  });
17549
17754
 
17550
17755
  var init_admin_orgs = __esm({
17551
- "module_134"() {
17756
+ "module_135"() {
17552
17757
  "use strict";
17553
17758
  }
17554
17759
  });
@@ -17558,7 +17763,7 @@ function meetsAudience(userTier, required = "public") {
17558
17763
  }
17559
17764
  var TIER_RANK;
17560
17765
  var init_audience_tier = __esm({
17561
- "module_135"() {
17766
+ "module_136"() {
17562
17767
  "use strict";
17563
17768
  TIER_RANK = {
17564
17769
  public: 0,
@@ -17569,7 +17774,7 @@ var init_audience_tier = __esm({
17569
17774
  });
17570
17775
 
17571
17776
  var init_browser_profile_storage_state = __esm({
17572
- "module_136"() {
17777
+ "module_137"() {
17573
17778
  "use strict";
17574
17779
  }
17575
17780
  });
@@ -17754,28 +17959,28 @@ function compileApprovedConfigEnforcementManifest(config) {
17754
17959
  };
17755
17960
  }
17756
17961
  var init_approved_config_enforcement = __esm({
17757
- "module_137"() {
17962
+ "module_138"() {
17758
17963
  "use strict";
17759
17964
  init_dist2();
17760
17965
  }
17761
17966
  });
17762
17967
 
17763
17968
  var init_AuthError = __esm({
17764
- "module_138"() {
17969
+ "module_139"() {
17765
17970
  "use strict";
17766
17971
  init_DomainError();
17767
17972
  }
17768
17973
  });
17769
17974
 
17770
17975
  var init_convenience_model_telemetry = __esm({
17771
- "module_139"() {
17976
+ "module_140"() {
17772
17977
  "use strict";
17773
17978
  }
17774
17979
  });
17775
17980
 
17776
17981
  var VALID_CONFIG_CLASSES, VALID_RISK_TAGS, VALID_SEVERITIES, VALID_COMPLEXITIES, VALID_SOURCES, CURRENT_SCHEMA_VERSION, MAX_BULLET_POINTS, MIN_BULLET_POINTS, MAX_ONE_LINER_LENGTH, MAX_RISK_DESCRIPTION_LENGTH, MAX_RISKS, DiscoveryInsightValidator, discoveryInsightValidator;
17777
17982
  var init_DiscoveryInsightValidator = __esm({
17778
- "module_140"() {
17983
+ "module_141"() {
17779
17984
  "use strict";
17780
17985
  VALID_CONFIG_CLASSES = [
17781
17986
  "security",
@@ -18008,19 +18213,19 @@ var init_DiscoveryInsightValidator = __esm({
18008
18213
  });
18009
18214
 
18010
18215
  var init_MigrationRegistry = __esm({
18011
- "module_141"() {
18216
+ "module_142"() {
18012
18217
  "use strict";
18013
18218
  }
18014
18219
  });
18015
18220
 
18016
18221
  var init_register_all_migrations = __esm({
18017
- "module_142"() {
18222
+ "module_143"() {
18018
18223
  "use strict";
18019
18224
  }
18020
18225
  });
18021
18226
 
18022
18227
  var init_src = __esm({
18023
- "module_143"() {
18228
+ "module_144"() {
18024
18229
  "use strict";
18025
18230
  init_organization();
18026
18231
  init_user2();
@@ -18270,7 +18475,7 @@ function getAllInternalFlags() {
18270
18475
  }
18271
18476
  var COMMAND_CATEGORIES, PREVIEW_COMMANDS, COMMAND_FLAGS, INTERNAL_OPTIONS, INTERNAL_SUBCOMMANDS;
18272
18477
  var init_feature_flags2 = __esm({
18273
- "module_144"() {
18478
+ "module_145"() {
18274
18479
  "use strict";
18275
18480
  init_src();
18276
18481
  init_gal_home();
@@ -18368,7 +18573,7 @@ function mimicFunction(to, from, { ignoreNonConfigurable = false } = {}) {
18368
18573
  }
18369
18574
  var copyProperty, canCopyProperty, changePrototype, wrappedToString, toStringDescriptor, toStringName, changeToString;
18370
18575
  var init_mimic_function = __esm({
18371
- "module_145"() {
18576
+ "module_146"() {
18372
18577
  copyProperty = (to, from, property, ignoreNonConfigurable) => {
18373
18578
  if (property === "length" || property === "prototype") {
18374
18579
  return;
@@ -18409,7 +18614,7 @@ ${fromBody}`;
18409
18614
 
18410
18615
  var calledFunctions, onetime, onetime_default;
18411
18616
  var init_onetime = __esm({
18412
- "module_146"() {
18617
+ "module_147"() {
18413
18618
  init_mimic_function();
18414
18619
  calledFunctions = /* @__PURE__ */ new WeakMap();
18415
18620
  onetime = (function_, options = {}) => {
@@ -18445,7 +18650,7 @@ var init_onetime = __esm({
18445
18650
 
18446
18651
  var signals;
18447
18652
  var init_signals = __esm({
18448
- "module_147"() {
18653
+ "module_148"() {
18449
18654
  signals = [];
18450
18655
  signals.push("SIGHUP", "SIGINT", "SIGTERM");
18451
18656
  if (process.platform !== "win32") {
@@ -18473,7 +18678,7 @@ var init_signals = __esm({
18473
18678
 
18474
18679
  var processOk, kExitEmitter, global2, ObjectDefineProperty, Emitter, SignalExitBase, signalExitWrap, SignalExitFallback, SignalExit, process3, onExit, load, unload;
18475
18680
  var init_mjs = __esm({
18476
- "module_148"() {
18681
+ "module_149"() {
18477
18682
  init_signals();
18478
18683
  processOk = (process9) => !!process9 && typeof process9 === "object" && typeof process9.removeListener === "function" && typeof process9.emit === "function" && typeof process9.reallyExit === "function" && typeof process9.listeners === "function" && typeof process9.kill === "function" && typeof process9.pid === "number" && typeof process9.on === "function";
18479
18684
  kExitEmitter = /* @__PURE__ */ Symbol.for("signal-exit emitter");
@@ -18711,7 +18916,7 @@ var init_mjs = __esm({
18711
18916
 
18712
18917
  var import_node_process2, terminal, restoreCursor, restore_cursor_default;
18713
18918
  var init_restore_cursor = __esm({
18714
- "module_149"() {
18919
+ "module_150"() {
18715
18920
  import_node_process2 = __toESM(require("node:process"), 1);
18716
18921
  init_onetime();
18717
18922
  init_mjs();
@@ -18728,7 +18933,7 @@ var init_restore_cursor = __esm({
18728
18933
 
18729
18934
  var import_node_process3, isHidden, cliCursor, cli_cursor_default;
18730
18935
  var init_cli_cursor = __esm({
18731
- "module_150"() {
18936
+ "module_151"() {
18732
18937
  import_node_process3 = __toESM(require("node:process"), 1);
18733
18938
  init_restore_cursor();
18734
18939
  isHidden = false;
@@ -18764,7 +18969,7 @@ var init_cli_cursor = __esm({
18764
18969
 
18765
18970
  var spinners_default;
18766
18971
  var init_spinners = __esm({
18767
- "module_151"() {
18972
+ "module_152"() {
18768
18973
  spinners_default = {
18769
18974
  dots: {
18770
18975
  interval: 80,
@@ -20467,7 +20672,7 @@ var init_spinners = __esm({
20467
20672
 
20468
20673
  var cli_spinners_default, spinnersList;
20469
20674
  var init_cli_spinners = __esm({
20470
- "module_152"() {
20675
+ "module_153"() {
20471
20676
  init_spinners();
20472
20677
  cli_spinners_default = spinners_default;
20473
20678
  spinnersList = Object.keys(spinners_default);
@@ -20476,7 +20681,7 @@ var init_cli_spinners = __esm({
20476
20681
 
20477
20682
  var import_node_tty2, hasColors, format, reset, bold, dim, italic, underline, overline, inverse, hidden, strikethrough, black, red, green, yellow, blue, magenta, cyan, white, gray, bgBlack, bgRed, bgGreen, bgYellow, bgBlue, bgMagenta, bgCyan, bgWhite, bgGray, redBright, greenBright, yellowBright, blueBright, magentaBright, cyanBright, whiteBright, bgRedBright, bgGreenBright, bgYellowBright, bgBlueBright, bgMagentaBright, bgCyanBright, bgWhiteBright;
20478
20683
  var init_base = __esm({
20479
- "module_153"() {
20684
+ "module_154"() {
20480
20685
  import_node_tty2 = __toESM(require("node:tty"), 1);
20481
20686
  hasColors = import_node_tty2.default?.WriteStream?.prototype?.hasColors?.() ?? false;
20482
20687
  format = (open, close) => {
@@ -20549,7 +20754,7 @@ var init_base = __esm({
20549
20754
  });
20550
20755
 
20551
20756
  var init_yoctocolors = __esm({
20552
- "module_154"() {
20757
+ "module_155"() {
20553
20758
  init_base();
20554
20759
  init_base();
20555
20760
  }
@@ -20565,7 +20770,7 @@ function isUnicodeSupported() {
20565
20770
  }
20566
20771
  var import_node_process4;
20567
20772
  var init_is_unicode_supported = __esm({
20568
- "module_155"() {
20773
+ "module_156"() {
20569
20774
  import_node_process4 = __toESM(require("node:process"), 1);
20570
20775
  }
20571
20776
  });
@@ -20579,7 +20784,7 @@ __export(symbols_exports, {
20579
20784
  });
20580
20785
  var _isUnicodeSupported, info, success, warning, error;
20581
20786
  var init_symbols = __esm({
20582
- "module_156"() {
20787
+ "module_157"() {
20583
20788
  init_yoctocolors();
20584
20789
  init_is_unicode_supported();
20585
20790
  _isUnicodeSupported = isUnicodeSupported();
@@ -20591,7 +20796,7 @@ var init_symbols = __esm({
20591
20796
  });
20592
20797
 
20593
20798
  var init_log_symbols = __esm({
20594
- "module_157"() {
20799
+ "module_158"() {
20595
20800
  init_symbols();
20596
20801
  }
20597
20802
  });
@@ -20604,7 +20809,7 @@ function ansiRegex({ onlyFirst = false } = {}) {
20604
20809
  return new RegExp(pattern, onlyFirst ? void 0 : "g");
20605
20810
  }
20606
20811
  var init_ansi_regex = __esm({
20607
- "module_158"() {
20812
+ "module_159"() {
20608
20813
  }
20609
20814
  });
20610
20815
 
@@ -20619,7 +20824,7 @@ function stripAnsi(string) {
20619
20824
  }
20620
20825
  var regex;
20621
20826
  var init_strip_ansi = __esm({
20622
- "module_159"() {
20827
+ "module_160"() {
20623
20828
  init_ansi_regex();
20624
20829
  regex = ansiRegex();
20625
20830
  }
@@ -20627,7 +20832,7 @@ var init_strip_ansi = __esm({
20627
20832
 
20628
20833
  var ambiguousRanges, fullwidthRanges, halfwidthRanges, narrowRanges, wideRanges;
20629
20834
  var init_lookup_data = __esm({
20630
- "module_160"() {
20835
+ "module_161"() {
20631
20836
  ambiguousRanges = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109];
20632
20837
  fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
20633
20838
  halfwidthRanges = [8361, 8361, 65377, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65512, 65518];
@@ -20638,7 +20843,7 @@ var init_lookup_data = __esm({
20638
20843
 
20639
20844
  var isInRange;
20640
20845
  var init_utilities2 = __esm({
20641
- "module_161"() {
20846
+ "module_162"() {
20642
20847
  isInRange = (ranges, codePoint) => {
20643
20848
  let low = 0;
20644
20849
  let high = Math.floor(ranges.length / 2) - 1;
@@ -20676,7 +20881,7 @@ function findWideFastPathRange(ranges) {
20676
20881
  }
20677
20882
  var minimumAmbiguousCodePoint, maximumAmbiguousCodePoint, minimumFullWidthCodePoint, maximumFullWidthCodePoint, minimumHalfWidthCodePoint, maximumHalfWidthCodePoint, minimumNarrowCodePoint, maximumNarrowCodePoint, minimumWideCodePoint, maximumWideCodePoint, commonCjkCodePoint, wideFastPathStart, wideFastPathEnd, isAmbiguous, isFullWidth, isWide;
20678
20883
  var init_lookup = __esm({
20679
- "module_162"() {
20884
+ "module_163"() {
20680
20885
  init_lookup_data();
20681
20886
  init_utilities2();
20682
20887
  minimumAmbiguousCodePoint = ambiguousRanges[0];
@@ -20728,7 +20933,7 @@ function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
20728
20933
  return 1;
20729
20934
  }
20730
20935
  var init_get_east_asian_width = __esm({
20731
- "module_163"() {
20936
+ "module_164"() {
20732
20937
  init_lookup();
20733
20938
  }
20734
20939
  });
@@ -20852,7 +21057,7 @@ function stringWidth(input, options = {}) {
20852
21057
  }
20853
21058
  var segmenter, zeroWidthClusterRegex, leadingNonPrintingRegex, rgiEmojiRegex, unqualifiedKeycapRegex, extendedPictographicRegex;
20854
21059
  var init_string_width = __esm({
20855
- "module_164"() {
21060
+ "module_165"() {
20856
21061
  init_strip_ansi();
20857
21062
  init_get_east_asian_width();
20858
21063
  segmenter = new Intl.Segmenter();
@@ -20870,13 +21075,13 @@ function isInteractive({ stream = process.stdout } = {}) {
20870
21075
  );
20871
21076
  }
20872
21077
  var init_is_interactive = __esm({
20873
- "module_165"() {
21078
+ "module_166"() {
20874
21079
  }
20875
21080
  });
20876
21081
 
20877
21082
  var import_node_process5, ASCII_ETX_CODE, StdinDiscarder, stdinDiscarder, stdin_discarder_default;
20878
21083
  var init_stdin_discarder = __esm({
20879
- "module_166"() {
21084
+ "module_167"() {
20880
21085
  import_node_process5 = __toESM(require("node:process"), 1);
20881
21086
  ASCII_ETX_CODE = 3;
20882
21087
  StdinDiscarder = class {
@@ -20949,7 +21154,7 @@ function ora(options) {
20949
21154
  }
20950
21155
  var import_node_process6, import_node_util, RENDER_DEFERRAL_TIMEOUT, SYNCHRONIZED_OUTPUT_ENABLE, SYNCHRONIZED_OUTPUT_DISABLE, activeHooksPerStream, validColors, Ora;
20951
21156
  var init_ora = __esm({
20952
- "module_167"() {
21157
+ "module_168"() {
20953
21158
  import_node_process6 = __toESM(require("node:process"), 1);
20954
21159
  import_node_util = require("node:util");
20955
21160
  init_source();
@@ -21421,7 +21626,7 @@ var init_ora = __esm({
21421
21626
 
21422
21627
  var DEFAULT_TIMEOUT_MS, DEFAULT_CREDENTIALS, normalizeHeaders, createHttpFetch;
21423
21628
  var init_http_client = __esm({
21424
- "module_168"() {
21629
+ "module_169"() {
21425
21630
  "use strict";
21426
21631
  DEFAULT_TIMEOUT_MS = 1e4;
21427
21632
  DEFAULT_CREDENTIALS = "include";
@@ -21493,7 +21698,7 @@ var init_http_client = __esm({
21493
21698
 
21494
21699
  var HttpClient;
21495
21700
  var init_HttpClient = __esm({
21496
- "module_169"() {
21701
+ "module_170"() {
21497
21702
  "use strict";
21498
21703
  HttpClient = class {
21499
21704
  constructor(config) {
@@ -21559,7 +21764,7 @@ var init_HttpClient = __esm({
21559
21764
 
21560
21765
  var HttpConfigRepository;
21561
21766
  var init_HttpConfigRepository = __esm({
21562
- "module_170"() {
21767
+ "module_171"() {
21563
21768
  "use strict";
21564
21769
  init_HttpClient();
21565
21770
  HttpConfigRepository = class extends HttpClient {
@@ -21835,7 +22040,7 @@ var init_HttpConfigRepository = __esm({
21835
22040
 
21836
22041
  var HttpFleetRepository;
21837
22042
  var init_HttpFleetRepository = __esm({
21838
- "module_171"() {
22043
+ "module_172"() {
21839
22044
  "use strict";
21840
22045
  init_HttpClient();
21841
22046
  HttpFleetRepository = class extends HttpClient {
@@ -21959,7 +22164,7 @@ var init_HttpFleetRepository = __esm({
21959
22164
 
21960
22165
  var HttpInviteRepository;
21961
22166
  var init_HttpInviteRepository = __esm({
21962
- "module_172"() {
22167
+ "module_173"() {
21963
22168
  "use strict";
21964
22169
  init_HttpClient();
21965
22170
  HttpInviteRepository = class extends HttpClient {
@@ -22019,7 +22224,7 @@ var init_HttpInviteRepository = __esm({
22019
22224
 
22020
22225
  var HttpProposalRepository;
22021
22226
  var init_HttpProposalRepository = __esm({
22022
- "module_173"() {
22227
+ "module_174"() {
22023
22228
  "use strict";
22024
22229
  init_HttpClient();
22025
22230
  HttpProposalRepository = class extends HttpClient {
@@ -22115,7 +22320,7 @@ var init_HttpProposalRepository = __esm({
22115
22320
 
22116
22321
  var HttpAuthRepository;
22117
22322
  var init_HttpAuthRepository = __esm({
22118
- "module_174"() {
22323
+ "module_175"() {
22119
22324
  "use strict";
22120
22325
  init_HttpClient();
22121
22326
  HttpAuthRepository = class extends HttpClient {
@@ -22268,7 +22473,7 @@ var init_HttpAuthRepository = __esm({
22268
22473
 
22269
22474
  var HttpTelemetryRepository;
22270
22475
  var init_HttpTelemetryRepository = __esm({
22271
- "module_175"() {
22476
+ "module_176"() {
22272
22477
  "use strict";
22273
22478
  init_HttpClient();
22274
22479
  HttpTelemetryRepository = class extends HttpClient {
@@ -22322,7 +22527,7 @@ var init_HttpTelemetryRepository = __esm({
22322
22527
 
22323
22528
  var Organization2;
22324
22529
  var init_organization2 = __esm({
22325
- "module_176"() {
22530
+ "module_177"() {
22326
22531
  "use strict";
22327
22532
  Organization2 = class {
22328
22533
  constructor(id, name, installationId3, accountType, totalRepos, totalConfigs, totalCommands, totalHooks, settings, commands, hooks, platforms, hookSettings, planTier, seatLimit, stripeCustomerId, stripeSubscriptionId, manualGrant, configRepoEnabled, configRepoUrl, configRepoCreatedAt, lastConfigSyncAt, lastScanAt, audienceTierRef, audienceTierSource, entitledFeatures, installedByGithubId, installedByLogin, createdAt = /* @__PURE__ */ new Date(), updatedAt = /* @__PURE__ */ new Date(), memberCount) {
@@ -22423,7 +22628,7 @@ var init_organization2 = __esm({
22423
22628
 
22424
22629
  var User;
22425
22630
  var init_user3 = __esm({
22426
- "module_177"() {
22631
+ "module_178"() {
22427
22632
  "use strict";
22428
22633
  User = class {
22429
22634
  constructor(githubId, login, email, name, avatarUrl, organizations, adminOrganizations, createdAt = /* @__PURE__ */ new Date(), updatedAt = /* @__PURE__ */ new Date(), providers = []) {
@@ -22577,7 +22782,7 @@ var init_user3 = __esm({
22577
22782
 
22578
22783
  var ScanResult;
22579
22784
  var init_scan_result2 = __esm({
22580
- "module_178"() {
22785
+ "module_179"() {
22581
22786
  "use strict";
22582
22787
  ScanResult = class {
22583
22788
  constructor(platform5, owner, repo, scannedAt, settings, rules = [], commands = [], hooks = [], agents = [], instructions, cursorRules, agentsMd, geminiMd, windsurfRules, copilotInstructions, mcpConfig) {
@@ -22677,7 +22882,7 @@ var init_scan_result2 = __esm({
22677
22882
 
22678
22883
  var TeamMember2;
22679
22884
  var init_team_member2 = __esm({
22680
- "module_179"() {
22885
+ "module_180"() {
22681
22886
  "use strict";
22682
22887
  TeamMember2 = class {
22683
22888
  constructor(userId, githubLogin, githubId, name, email, avatarUrl, githubOrgRole, galRole, roleAssignedBy, roleAssignedAt, lastActiveAt, createdAt = /* @__PURE__ */ new Date(), updatedAt = /* @__PURE__ */ new Date()) {
@@ -22776,7 +22981,7 @@ var init_team_member2 = __esm({
22776
22981
 
22777
22982
  var Subscription, TIER_LEVELS, FEATURE_REQUIREMENTS;
22778
22983
  var init_subscription2 = __esm({
22779
- "module_180"() {
22984
+ "module_181"() {
22780
22985
  "use strict";
22781
22986
  Subscription = class {
22782
22987
  constructor(organizationName, planTier, seatLimit, stripeCustomerId, stripeSubscriptionId, manualGrant, createdAt = /* @__PURE__ */ new Date(), updatedAt = /* @__PURE__ */ new Date()) {
@@ -22907,145 +23112,145 @@ var init_subscription2 = __esm({
22907
23112
  });
22908
23113
 
22909
23114
  var init_workspace4 = __esm({
22910
- "module_181"() {
23115
+ "module_182"() {
22911
23116
  "use strict";
22912
23117
  }
22913
23118
  });
22914
23119
 
22915
23120
  var init_workspace_membership2 = __esm({
22916
- "module_182"() {
23121
+ "module_183"() {
22917
23122
  "use strict";
22918
23123
  }
22919
23124
  });
22920
23125
 
22921
23126
  var init_IOrganizationRepository2 = __esm({
22922
- "module_183"() {
23127
+ "module_184"() {
22923
23128
  "use strict";
22924
23129
  }
22925
23130
  });
22926
23131
 
22927
23132
  var init_IUserRepository2 = __esm({
22928
- "module_184"() {
23133
+ "module_185"() {
22929
23134
  "use strict";
22930
23135
  }
22931
23136
  });
22932
23137
 
22933
23138
  var init_IScanResultRepository2 = __esm({
22934
- "module_185"() {
23139
+ "module_186"() {
22935
23140
  "use strict";
22936
23141
  }
22937
23142
  });
22938
23143
 
22939
23144
  var init_ISubscriptionRepository2 = __esm({
22940
- "module_186"() {
23145
+ "module_187"() {
22941
23146
  "use strict";
22942
23147
  }
22943
23148
  });
22944
23149
 
22945
23150
  var init_IPersonalGitHubRepository2 = __esm({
22946
- "module_187"() {
23151
+ "module_188"() {
22947
23152
  "use strict";
22948
23153
  }
22949
23154
  });
22950
23155
 
22951
23156
  var init_IWorkspacePreferenceRepository2 = __esm({
22952
- "module_188"() {
23157
+ "module_189"() {
22953
23158
  "use strict";
22954
23159
  }
22955
23160
  });
22956
23161
 
22957
23162
  var init_IWorkItemRepository2 = __esm({
22958
- "module_189"() {
23163
+ "module_190"() {
22959
23164
  "use strict";
22960
23165
  }
22961
23166
  });
22962
23167
 
22963
23168
  var init_IAuthRepository2 = __esm({
22964
- "module_190"() {
23169
+ "module_191"() {
22965
23170
  "use strict";
22966
23171
  }
22967
23172
  });
22968
23173
 
22969
23174
  var init_IWorkspaceRepository2 = __esm({
22970
- "module_191"() {
23175
+ "module_192"() {
22971
23176
  "use strict";
22972
23177
  }
22973
23178
  });
22974
23179
 
22975
23180
  var init_ISessionRepository2 = __esm({
22976
- "module_192"() {
23181
+ "module_193"() {
22977
23182
  "use strict";
22978
23183
  }
22979
23184
  });
22980
23185
 
22981
23186
  var init_IConfigRepository2 = __esm({
22982
- "module_193"() {
23187
+ "module_194"() {
22983
23188
  "use strict";
22984
23189
  }
22985
23190
  });
22986
23191
 
22987
23192
  var init_IProposalRepository2 = __esm({
22988
- "module_194"() {
23193
+ "module_195"() {
22989
23194
  "use strict";
22990
23195
  }
22991
23196
  });
22992
23197
 
22993
23198
  var init_ITrackedRepoRepository2 = __esm({
22994
- "module_195"() {
23199
+ "module_196"() {
22995
23200
  "use strict";
22996
23201
  }
22997
23202
  });
22998
23203
 
22999
23204
  var init_ISdlcRepository2 = __esm({
23000
- "module_196"() {
23205
+ "module_197"() {
23001
23206
  "use strict";
23002
23207
  }
23003
23208
  });
23004
23209
 
23005
23210
  var init_ICredentialRepository2 = __esm({
23006
- "module_197"() {
23211
+ "module_198"() {
23007
23212
  "use strict";
23008
23213
  }
23009
23214
  });
23010
23215
 
23011
23216
  var init_IInviteRepository2 = __esm({
23012
- "module_198"() {
23217
+ "module_199"() {
23013
23218
  "use strict";
23014
23219
  }
23015
23220
  });
23016
23221
 
23017
23222
  var init_IBillingRepository2 = __esm({
23018
- "module_199"() {
23223
+ "module_200"() {
23019
23224
  "use strict";
23020
23225
  }
23021
23226
  });
23022
23227
 
23023
23228
  var init_IFleetRepository2 = __esm({
23024
- "module_200"() {
23229
+ "module_201"() {
23025
23230
  "use strict";
23026
23231
  }
23027
23232
  });
23028
23233
 
23029
23234
  var init_ITelemetryRepository2 = __esm({
23030
- "module_201"() {
23235
+ "module_202"() {
23031
23236
  "use strict";
23032
23237
  }
23033
23238
  });
23034
23239
 
23035
23240
  var init_RedirectValidator2 = __esm({
23036
- "module_202"() {
23241
+ "module_203"() {
23037
23242
  "use strict";
23038
23243
  }
23039
23244
  });
23040
23245
 
23041
23246
  var init_DomainError2 = __esm({
23042
- "module_203"() {
23247
+ "module_204"() {
23043
23248
  "use strict";
23044
23249
  }
23045
23250
  });
23046
23251
 
23047
23252
  var init_OrganizationService2 = __esm({
23048
- "module_204"() {
23253
+ "module_205"() {
23049
23254
  "use strict";
23050
23255
  init_organization2();
23051
23256
  init_DomainError2();
@@ -23053,14 +23258,14 @@ var init_OrganizationService2 = __esm({
23053
23258
  });
23054
23259
 
23055
23260
  var init_ValidationError2 = __esm({
23056
- "module_205"() {
23261
+ "module_206"() {
23057
23262
  "use strict";
23058
23263
  init_DomainError2();
23059
23264
  }
23060
23265
  });
23061
23266
 
23062
23267
  var init_TeamService2 = __esm({
23063
- "module_206"() {
23268
+ "module_207"() {
23064
23269
  "use strict";
23065
23270
  init_team_member2();
23066
23271
  init_ValidationError2();
@@ -23069,13 +23274,13 @@ var init_TeamService2 = __esm({
23069
23274
  });
23070
23275
 
23071
23276
  var init_TeamSyncService2 = __esm({
23072
- "module_207"() {
23277
+ "module_208"() {
23073
23278
  "use strict";
23074
23279
  }
23075
23280
  });
23076
23281
 
23077
23282
  var init_organizations2 = __esm({
23078
- "module_208"() {
23283
+ "module_209"() {
23079
23284
  "use strict";
23080
23285
  init_OrganizationService2();
23081
23286
  init_TeamService2();
@@ -23084,20 +23289,20 @@ var init_organizations2 = __esm({
23084
23289
  });
23085
23290
 
23086
23291
  var init_SubscriptionService2 = __esm({
23087
- "module_209"() {
23292
+ "module_210"() {
23088
23293
  "use strict";
23089
23294
  }
23090
23295
  });
23091
23296
 
23092
23297
  var init_subscriptions2 = __esm({
23093
- "module_210"() {
23298
+ "module_211"() {
23094
23299
  "use strict";
23095
23300
  init_SubscriptionService2();
23096
23301
  }
23097
23302
  });
23098
23303
 
23099
23304
  var init_WorkspaceService2 = __esm({
23100
- "module_211"() {
23305
+ "module_212"() {
23101
23306
  "use strict";
23102
23307
  init_workspace4();
23103
23308
  init_workspace_membership2();
@@ -23105,59 +23310,59 @@ var init_WorkspaceService2 = __esm({
23105
23310
  });
23106
23311
 
23107
23312
  var init_workspace5 = __esm({
23108
- "module_212"() {
23313
+ "module_213"() {
23109
23314
  "use strict";
23110
23315
  init_WorkspaceService2();
23111
23316
  }
23112
23317
  });
23113
23318
 
23114
23319
  var init_IEnvironmentConfig2 = __esm({
23115
- "module_213"() {
23320
+ "module_214"() {
23116
23321
  "use strict";
23117
23322
  }
23118
23323
  });
23119
23324
 
23120
23325
  var init_admin_orgs2 = __esm({
23121
- "module_214"() {
23326
+ "module_215"() {
23122
23327
  "use strict";
23123
23328
  }
23124
23329
  });
23125
23330
 
23126
23331
  var init_audience_tier2 = __esm({
23127
- "module_215"() {
23332
+ "module_216"() {
23128
23333
  "use strict";
23129
23334
  }
23130
23335
  });
23131
23336
 
23132
23337
  var init_browser_profile_storage_state2 = __esm({
23133
- "module_216"() {
23338
+ "module_217"() {
23134
23339
  "use strict";
23135
23340
  }
23136
23341
  });
23137
23342
 
23138
23343
  var init_approved_config_enforcement2 = __esm({
23139
- "module_217"() {
23344
+ "module_218"() {
23140
23345
  "use strict";
23141
23346
  init_dist2();
23142
23347
  }
23143
23348
  });
23144
23349
 
23145
23350
  var init_AuthError2 = __esm({
23146
- "module_218"() {
23351
+ "module_219"() {
23147
23352
  "use strict";
23148
23353
  init_DomainError2();
23149
23354
  }
23150
23355
  });
23151
23356
 
23152
23357
  var init_convenience_model_telemetry2 = __esm({
23153
- "module_219"() {
23358
+ "module_220"() {
23154
23359
  "use strict";
23155
23360
  }
23156
23361
  });
23157
23362
 
23158
23363
  var VALID_CONFIG_CLASSES2, VALID_RISK_TAGS2, VALID_SEVERITIES2, VALID_COMPLEXITIES2, VALID_SOURCES2, CURRENT_SCHEMA_VERSION2, MAX_BULLET_POINTS2, MIN_BULLET_POINTS2, MAX_ONE_LINER_LENGTH2, MAX_RISK_DESCRIPTION_LENGTH2, MAX_RISKS2, DiscoveryInsightValidator2, discoveryInsightValidator2;
23159
23364
  var init_DiscoveryInsightValidator2 = __esm({
23160
- "module_220"() {
23365
+ "module_221"() {
23161
23366
  "use strict";
23162
23367
  VALID_CONFIG_CLASSES2 = [
23163
23368
  "security",
@@ -23369,19 +23574,19 @@ var init_DiscoveryInsightValidator2 = __esm({
23369
23574
  });
23370
23575
 
23371
23576
  var init_MigrationRegistry2 = __esm({
23372
- "module_221"() {
23577
+ "module_222"() {
23373
23578
  "use strict";
23374
23579
  }
23375
23580
  });
23376
23581
 
23377
23582
  var init_register_all_migrations2 = __esm({
23378
- "module_222"() {
23583
+ "module_223"() {
23379
23584
  "use strict";
23380
23585
  }
23381
23586
  });
23382
23587
 
23383
23588
  var init_dist3 = __esm({
23384
- "module_223"() {
23589
+ "module_224"() {
23385
23590
  "use strict";
23386
23591
  init_organization2();
23387
23592
  init_user3();
@@ -23430,7 +23635,7 @@ var init_dist3 = __esm({
23430
23635
 
23431
23636
  var HttpOrganizationRepository;
23432
23637
  var init_HttpOrganizationRepository = __esm({
23433
- "module_224"() {
23638
+ "module_225"() {
23434
23639
  "use strict";
23435
23640
  init_dist3();
23436
23641
  init_HttpClient();
@@ -23716,7 +23921,7 @@ var init_HttpOrganizationRepository = __esm({
23716
23921
 
23717
23922
  var HttpUserRepository;
23718
23923
  var init_HttpUserRepository = __esm({
23719
- "module_225"() {
23924
+ "module_226"() {
23720
23925
  "use strict";
23721
23926
  init_dist3();
23722
23927
  init_HttpClient();
@@ -23844,7 +24049,7 @@ var init_HttpUserRepository = __esm({
23844
24049
 
23845
24050
  var HttpScanResultRepository;
23846
24051
  var init_HttpScanResultRepository = __esm({
23847
- "module_226"() {
24052
+ "module_227"() {
23848
24053
  "use strict";
23849
24054
  init_dist3();
23850
24055
  init_http_client();
@@ -24028,7 +24233,7 @@ var init_HttpScanResultRepository = __esm({
24028
24233
 
24029
24234
  var HttpSubscriptionRepository;
24030
24235
  var init_HttpSubscriptionRepository = __esm({
24031
- "module_227"() {
24236
+ "module_228"() {
24032
24237
  "use strict";
24033
24238
  init_dist3();
24034
24239
  init_HttpClient();
@@ -24201,7 +24406,7 @@ var init_HttpSubscriptionRepository = __esm({
24201
24406
 
24202
24407
  var HttpWorkItemRepository;
24203
24408
  var init_HttpWorkItemRepository = __esm({
24204
- "module_228"() {
24409
+ "module_229"() {
24205
24410
  "use strict";
24206
24411
  init_HttpClient();
24207
24412
  HttpWorkItemRepository = class extends HttpClient {
@@ -24364,7 +24569,7 @@ var init_HttpWorkItemRepository = __esm({
24364
24569
 
24365
24570
  var HttpWorkflowTestRepository;
24366
24571
  var init_HttpWorkflowTestRepository = __esm({
24367
- "module_229"() {
24572
+ "module_230"() {
24368
24573
  "use strict";
24369
24574
  init_HttpClient();
24370
24575
  HttpWorkflowTestRepository = class extends HttpClient {
@@ -24397,7 +24602,7 @@ var init_HttpWorkflowTestRepository = __esm({
24397
24602
 
24398
24603
  var HttpAdminRepository;
24399
24604
  var init_HttpAdminRepository = __esm({
24400
- "module_230"() {
24605
+ "module_231"() {
24401
24606
  "use strict";
24402
24607
  init_HttpClient();
24403
24608
  HttpAdminRepository = class extends HttpClient {
@@ -24422,7 +24627,7 @@ var init_HttpAdminRepository = __esm({
24422
24627
 
24423
24628
  var HttpRunnerRepository;
24424
24629
  var init_HttpRunnerRepository = __esm({
24425
- "module_231"() {
24630
+ "module_232"() {
24426
24631
  "use strict";
24427
24632
  init_HttpClient();
24428
24633
  HttpRunnerRepository = class extends HttpClient {
@@ -24440,7 +24645,7 @@ var init_HttpRunnerRepository = __esm({
24440
24645
 
24441
24646
  var HttpSessionRepository;
24442
24647
  var init_HttpSessionRepository = __esm({
24443
- "module_232"() {
24648
+ "module_233"() {
24444
24649
  "use strict";
24445
24650
  init_HttpClient();
24446
24651
  HttpSessionRepository = class extends HttpClient {
@@ -24523,7 +24728,7 @@ var init_HttpSessionRepository = __esm({
24523
24728
  });
24524
24729
 
24525
24730
  var init_client = __esm({
24526
- "module_233"() {
24731
+ "module_234"() {
24527
24732
  "use strict";
24528
24733
  init_http_client();
24529
24734
  init_HttpClient();
@@ -24636,7 +24841,7 @@ Organizations (${total}):
24636
24841
  }
24637
24842
  var defaultApiUrl2;
24638
24843
  var init_admin = __esm({
24639
- "module_234"() {
24844
+ "module_235"() {
24640
24845
  "use strict";
24641
24846
  init_esm();
24642
24847
  init_source();
@@ -24694,7 +24899,7 @@ function buildSummary(warnings, capabilities) {
24694
24899
  }
24695
24900
  var RULES;
24696
24901
  var init_capability_analyzer = __esm({
24697
- "module_235"() {
24902
+ "module_236"() {
24698
24903
  "use strict";
24699
24904
  RULES = [
24700
24905
  // 1. GitHub Actions / workflow files
@@ -25009,7 +25214,7 @@ async function fetchClaudeTokenExpiryStatus(params) {
25009
25214
  }
25010
25215
  var CLAUDE_TOKEN_WARNING_THRESHOLD_MS;
25011
25216
  var init_claude_token_expiry = __esm({
25012
- "module_236"() {
25217
+ "module_237"() {
25013
25218
  "use strict";
25014
25219
  CLAUDE_TOKEN_WARNING_THRESHOLD_MS = 2 * 60 * 60 * 1e3;
25015
25220
  }
@@ -25553,7 +25758,7 @@ Examples:
25553
25758
  }
25554
25759
  var import_fs12, import_path12, SEVERITY_COLOR, SEVERITY_ICON;
25555
25760
  var init_agent_session = __esm({
25556
- "module_237"() {
25761
+ "module_238"() {
25557
25762
  "use strict";
25558
25763
  init_esm();
25559
25764
  init_source();
@@ -25580,7 +25785,7 @@ var init_agent_session = __esm({
25580
25785
 
25581
25786
  var import_fs13, import_os11, import_path13, DEFAULT_WORKFLOW_REPOSITORY, CONFIG_DIR, CONFIG_FILE2, PID_FILE, LEGACY_DIR, LEGACY_CONFIG_FILE, LEGACY_PID_FILE, AgentQueueConfigManager;
25582
25787
  var init_AgentQueueConfigManager = __esm({
25583
- "module_238"() {
25788
+ "module_239"() {
25584
25789
  "use strict";
25585
25790
  import_fs13 = require("fs");
25586
25791
  import_os11 = require("os");
@@ -30107,7 +30312,7 @@ function detectSeaRuntime() {
30107
30312
  }
30108
30313
  var import_pino, import_fs14, isProduction, isSea, isBundledCli, baseLogger;
30109
30314
  var init_agent_queue_logger = __esm({
30110
- "module_239"() {
30315
+ "module_240"() {
30111
30316
  "use strict";
30112
30317
  import_pino = __toESM(require_pino(), 1);
30113
30318
  import_fs14 = require("fs");
@@ -30172,7 +30377,7 @@ function isInsideWindow(currentMinutes, startMinutes, endMinutes) {
30172
30377
  }
30173
30378
  var logger, SteadyModeController;
30174
30379
  var init_SteadyModeController = __esm({
30175
- "module_240"() {
30380
+ "module_241"() {
30176
30381
  "use strict";
30177
30382
  init_agent_queue_logger();
30178
30383
  logger = createLogger("steady-mode");
@@ -30397,7 +30602,7 @@ function createGalAgent(config) {
30397
30602
  }
30398
30603
  var import_os12, import_child_process5, logger2, cliVersion3, DEFAULT_WORKFLOW_REPOSITORY2, GalAgent;
30399
30604
  var init_AgentQueueService = __esm({
30400
- "module_241"() {
30605
+ "module_242"() {
30401
30606
  "use strict";
30402
30607
  import_os12 = require("os");
30403
30608
  import_child_process5 = require("child_process");
@@ -31559,7 +31764,7 @@ function createAgentQueueCommand() {
31559
31764
  }
31560
31765
  var import_os13, import_fs15, import_path14, import_os14;
31561
31766
  var init_queue = __esm({
31562
- "module_242"() {
31767
+ "module_243"() {
31563
31768
  "use strict";
31564
31769
  init_esm();
31565
31770
  init_source();
@@ -31581,7 +31786,7 @@ function createAgentCommand() {
31581
31786
  return cmd;
31582
31787
  }
31583
31788
  var init_agent = __esm({
31584
- "module_243"() {
31789
+ "module_244"() {
31585
31790
  "use strict";
31586
31791
  init_esm();
31587
31792
  init_agent_session();
@@ -31591,7 +31796,7 @@ var init_agent = __esm({
31591
31796
 
31592
31797
  var CoreServiceProvider;
31593
31798
  var init_CoreServiceProvider = __esm({
31594
- "module_244"() {
31799
+ "module_245"() {
31595
31800
  "use strict";
31596
31801
  init_src();
31597
31802
  init_client();
@@ -32272,7 +32477,7 @@ function injectGalBrowserServer(directory, projectPath2, profileDir, disabledSer
32272
32477
  }
32273
32478
  var import_fs16, import_path15, import_os15, GAL_MCP_URL, GAL_BROWSER_MCP_ENV, MANAGED_CODEX_MCP_SECTIONS, CODEX_MEMORY_HOOK_MARKER, CODEX_MEMORY_HOOK_ENV, injectGalAutomationServers;
32274
32479
  var init_mcp_config_writer = __esm({
32275
- "module_245"() {
32480
+ "module_246"() {
32276
32481
  "use strict";
32277
32482
  import_fs16 = require("fs");
32278
32483
  import_path15 = require("path");
@@ -32438,7 +32643,7 @@ function mergeStorageStateFiles(filePaths, outputPath) {
32438
32643
  }
32439
32644
  var import_fs17, import_path16, MERGED_FILENAME;
32440
32645
  var init_browser_profile_sync = __esm({
32441
- "module_246"() {
32646
+ "module_247"() {
32442
32647
  "use strict";
32443
32648
  import_fs17 = require("fs");
32444
32649
  import_path16 = require("path");
@@ -32495,7 +32700,7 @@ async function pushProfileStorageState(config, profileName, storageStateJson) {
32495
32700
  }
32496
32701
  var import_fs18;
32497
32702
  var init_profile_sync = __esm({
32498
- "module_247"() {
32703
+ "module_248"() {
32499
32704
  "use strict";
32500
32705
  import_fs18 = require("fs");
32501
32706
  }
@@ -68882,7 +69087,7 @@ function rng() {
68882
69087
  }
68883
69088
  var import_crypto3, rnds8Pool, poolPtr;
68884
69089
  var init_rng = __esm({
68885
- "module_248"() {
69090
+ "module_249"() {
68886
69091
  import_crypto3 = __toESM(require("crypto"));
68887
69092
  rnds8Pool = new Uint8Array(256);
68888
69093
  poolPtr = rnds8Pool.length;
@@ -68891,7 +69096,7 @@ var init_rng = __esm({
68891
69096
 
68892
69097
  var regex_default;
68893
69098
  var init_regex = __esm({
68894
- "module_249"() {
69099
+ "module_250"() {
68895
69100
  regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
68896
69101
  }
68897
69102
  });
@@ -68901,7 +69106,7 @@ function validate2(uuid) {
68901
69106
  }
68902
69107
  var validate_default;
68903
69108
  var init_validate = __esm({
68904
- "module_250"() {
69109
+ "module_251"() {
68905
69110
  init_regex();
68906
69111
  validate_default = validate2;
68907
69112
  }
@@ -68919,7 +69124,7 @@ function stringify(arr, offset = 0) {
68919
69124
  }
68920
69125
  var byteToHex, stringify_default;
68921
69126
  var init_stringify = __esm({
68922
- "module_251"() {
69127
+ "module_252"() {
68923
69128
  init_validate();
68924
69129
  byteToHex = [];
68925
69130
  for (let i2 = 0; i2 < 256; ++i2) {
@@ -68979,7 +69184,7 @@ function v1(options, buf, offset) {
68979
69184
  }
68980
69185
  var _nodeId, _clockseq, _lastMSecs, _lastNSecs, v1_default;
68981
69186
  var init_v1 = __esm({
68982
- "module_252"() {
69187
+ "module_253"() {
68983
69188
  init_rng();
68984
69189
  init_stringify();
68985
69190
  _lastMSecs = 0;
@@ -69014,7 +69219,7 @@ function parse(uuid) {
69014
69219
  }
69015
69220
  var parse_default;
69016
69221
  var init_parse = __esm({
69017
- "module_253"() {
69222
+ "module_254"() {
69018
69223
  init_validate();
69019
69224
  parse_default = parse;
69020
69225
  }
@@ -69065,7 +69270,7 @@ function v35(name, version2, hashfunc) {
69065
69270
  }
69066
69271
  var DNS, URL2;
69067
69272
  var init_v35 = __esm({
69068
- "module_254"() {
69273
+ "module_255"() {
69069
69274
  init_stringify();
69070
69275
  init_parse();
69071
69276
  DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
@@ -69083,7 +69288,7 @@ function md5(bytes) {
69083
69288
  }
69084
69289
  var import_crypto4, md5_default;
69085
69290
  var init_md5 = __esm({
69086
- "module_255"() {
69291
+ "module_256"() {
69087
69292
  import_crypto4 = __toESM(require("crypto"));
69088
69293
  md5_default = md5;
69089
69294
  }
@@ -69091,7 +69296,7 @@ var init_md5 = __esm({
69091
69296
 
69092
69297
  var v3, v3_default;
69093
69298
  var init_v3 = __esm({
69094
- "module_256"() {
69299
+ "module_257"() {
69095
69300
  init_v35();
69096
69301
  init_md5();
69097
69302
  v3 = v35("v3", 48, md5_default);
@@ -69101,7 +69306,7 @@ var init_v3 = __esm({
69101
69306
 
69102
69307
  var import_crypto5, native_default;
69103
69308
  var init_native = __esm({
69104
- "module_257"() {
69309
+ "module_258"() {
69105
69310
  import_crypto5 = __toESM(require("crypto"));
69106
69311
  native_default = {
69107
69312
  randomUUID: import_crypto5.default.randomUUID
@@ -69128,7 +69333,7 @@ function v4(options, buf, offset) {
69128
69333
  }
69129
69334
  var v4_default;
69130
69335
  var init_v4 = __esm({
69131
- "module_258"() {
69336
+ "module_259"() {
69132
69337
  init_native();
69133
69338
  init_rng();
69134
69339
  init_stringify();
@@ -69146,7 +69351,7 @@ function sha1(bytes) {
69146
69351
  }
69147
69352
  var import_crypto6, sha1_default;
69148
69353
  var init_sha1 = __esm({
69149
- "module_259"() {
69354
+ "module_260"() {
69150
69355
  import_crypto6 = __toESM(require("crypto"));
69151
69356
  sha1_default = sha1;
69152
69357
  }
@@ -69154,7 +69359,7 @@ var init_sha1 = __esm({
69154
69359
 
69155
69360
  var v5, v5_default;
69156
69361
  var init_v5 = __esm({
69157
- "module_260"() {
69362
+ "module_261"() {
69158
69363
  init_v35();
69159
69364
  init_sha1();
69160
69365
  v5 = v35("v5", 80, sha1_default);
@@ -69164,7 +69369,7 @@ var init_v5 = __esm({
69164
69369
 
69165
69370
  var nil_default;
69166
69371
  var init_nil = __esm({
69167
- "module_261"() {
69372
+ "module_262"() {
69168
69373
  nil_default = "00000000-0000-0000-0000-000000000000";
69169
69374
  }
69170
69375
  });
@@ -69177,7 +69382,7 @@ function version(uuid) {
69177
69382
  }
69178
69383
  var version_default;
69179
69384
  var init_version = __esm({
69180
- "module_262"() {
69385
+ "module_263"() {
69181
69386
  init_validate();
69182
69387
  version_default = version;
69183
69388
  }
@@ -69196,7 +69401,7 @@ __export(esm_node_exports, {
69196
69401
  version: () => version_default
69197
69402
  });
69198
69403
  var init_esm_node = __esm({
69199
- "module_263"() {
69404
+ "module_264"() {
69200
69405
  init_v1();
69201
69406
  init_v3();
69202
69407
  init_v4();
@@ -151684,7 +151889,7 @@ var require_app = __commonJS({
151684
151889
 
151685
151890
  var import_app, AppErrorCodes, FirebaseAppError, SDK_VERSION, applicationDefault, cert, deleteApp, getApp, getApps, initializeApp, refreshToken;
151686
151891
  var init_app = __esm({
151687
- "module_264"() {
151892
+ "module_265"() {
151688
151893
  import_app = __toESM(require_app(), 1);
151689
151894
  AppErrorCodes = import_app.default.AppErrorCodes;
151690
151895
  FirebaseAppError = import_app.default.FirebaseAppError;
@@ -168328,7 +168533,7 @@ var require_disabled_trace_util = __commonJS({
168328
168533
 
168329
168534
  var VERSION;
168330
168535
  var init_version2 = __esm({
168331
- "module_265"() {
168536
+ "module_266"() {
168332
168537
  VERSION = "1.9.1";
168333
168538
  }
168334
168539
  });
@@ -168396,7 +168601,7 @@ function _makeCompatibilityCheck(ownVersion) {
168396
168601
  }
168397
168602
  var re, isCompatible;
168398
168603
  var init_semver = __esm({
168399
- "module_266"() {
168604
+ "module_267"() {
168400
168605
  init_version2();
168401
168606
  re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
168402
168607
  isCompatible = _makeCompatibilityCheck(VERSION);
@@ -168439,7 +168644,7 @@ function unregisterGlobal(type, diag3) {
168439
168644
  }
168440
168645
  var major, GLOBAL_OPENTELEMETRY_API_KEY, _global;
168441
168646
  var init_global_utils = __esm({
168442
- "module_267"() {
168647
+ "module_268"() {
168443
168648
  init_version2();
168444
168649
  init_semver();
168445
168650
  major = VERSION.split(".")[0];
@@ -168457,7 +168662,7 @@ function logProxy(funcName, namespace, args2) {
168457
168662
  }
168458
168663
  var DiagComponentLogger;
168459
168664
  var init_ComponentLogger = __esm({
168460
- "module_268"() {
168665
+ "module_269"() {
168461
168666
  init_global_utils();
168462
168667
  DiagComponentLogger = class {
168463
168668
  constructor(props) {
@@ -168484,7 +168689,7 @@ var init_ComponentLogger = __esm({
168484
168689
 
168485
168690
  var DiagLogLevel;
168486
168691
  var init_types = __esm({
168487
- "module_269"() {
168692
+ "module_270"() {
168488
168693
  (function(DiagLogLevel2) {
168489
168694
  DiagLogLevel2[DiagLogLevel2["NONE"] = 0] = "NONE";
168490
168695
  DiagLogLevel2[DiagLogLevel2["ERROR"] = 30] = "ERROR";
@@ -168521,14 +168726,14 @@ function createLogLevelDiagLogger(maxLevel, logger3) {
168521
168726
  };
168522
168727
  }
168523
168728
  var init_logLevelLogger = __esm({
168524
- "module_270"() {
168729
+ "module_271"() {
168525
168730
  init_types();
168526
168731
  }
168527
168732
  });
168528
168733
 
168529
168734
  var API_NAME, DiagAPI;
168530
168735
  var init_diag = __esm({
168531
- "module_271"() {
168736
+ "module_272"() {
168532
168737
  init_ComponentLogger();
168533
168738
  init_logLevelLogger();
168534
168739
  init_types();
@@ -168596,7 +168801,7 @@ var init_diag = __esm({
168596
168801
 
168597
168802
  var BaggageImpl;
168598
168803
  var init_baggage_impl = __esm({
168599
- "module_272"() {
168804
+ "module_273"() {
168600
168805
  BaggageImpl = class _BaggageImpl {
168601
168806
  constructor(entries) {
168602
168807
  this._entries = entries ? new Map(entries) : /* @__PURE__ */ new Map();
@@ -168637,7 +168842,7 @@ var init_baggage_impl = __esm({
168637
168842
 
168638
168843
  var baggageEntryMetadataSymbol;
168639
168844
  var init_symbol = __esm({
168640
- "module_273"() {
168845
+ "module_274"() {
168641
168846
  baggageEntryMetadataSymbol = /* @__PURE__ */ Symbol("BaggageEntryMetadata");
168642
168847
  }
168643
168848
  });
@@ -168659,7 +168864,7 @@ function baggageEntryMetadataFromString(str) {
168659
168864
  }
168660
168865
  var diag;
168661
168866
  var init_utils = __esm({
168662
- "module_274"() {
168867
+ "module_275"() {
168663
168868
  init_diag();
168664
168869
  init_baggage_impl();
168665
168870
  init_symbol();
@@ -168672,7 +168877,7 @@ function createContextKey(description) {
168672
168877
  }
168673
168878
  var BaseContext, ROOT_CONTEXT;
168674
168879
  var init_context = __esm({
168675
- "module_275"() {
168880
+ "module_276"() {
168676
168881
  BaseContext = class _BaseContext {
168677
168882
  /**
168678
168883
  * Construct a new context which inherits values from an optional parent context.
@@ -168701,7 +168906,7 @@ var init_context = __esm({
168701
168906
 
168702
168907
  var consoleMap, _originalConsoleMethods, DiagConsoleLogger;
168703
168908
  var init_consoleLogger = __esm({
168704
- "module_276"() {
168909
+ "module_277"() {
168705
168910
  consoleMap = [
168706
168911
  { n: "error", c: "error" },
168707
168912
  { n: "warn", c: "warn" },
@@ -168757,7 +168962,7 @@ function createNoopMeter() {
168757
168962
  }
168758
168963
  var NoopMeter, NoopMetric, NoopCounterMetric, NoopUpDownCounterMetric, NoopGaugeMetric, NoopHistogramMetric, NoopObservableMetric, NoopObservableCounterMetric, NoopObservableGaugeMetric, NoopObservableUpDownCounterMetric, NOOP_METER, NOOP_COUNTER_METRIC, NOOP_GAUGE_METRIC, NOOP_HISTOGRAM_METRIC, NOOP_UP_DOWN_COUNTER_METRIC, NOOP_OBSERVABLE_COUNTER_METRIC, NOOP_OBSERVABLE_GAUGE_METRIC, NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
168759
168964
  var init_NoopMeter = __esm({
168760
- "module_277"() {
168965
+ "module_278"() {
168761
168966
  NoopMeter = class {
168762
168967
  constructor() {
168763
168968
  }
@@ -168857,7 +169062,7 @@ var init_NoopMeter = __esm({
168857
169062
 
168858
169063
  var ValueType;
168859
169064
  var init_Metric = __esm({
168860
- "module_278"() {
169065
+ "module_279"() {
168861
169066
  (function(ValueType2) {
168862
169067
  ValueType2[ValueType2["INT"] = 0] = "INT";
168863
169068
  ValueType2[ValueType2["DOUBLE"] = 1] = "DOUBLE";
@@ -168867,7 +169072,7 @@ var init_Metric = __esm({
168867
169072
 
168868
169073
  var defaultTextMapGetter, defaultTextMapSetter;
168869
169074
  var init_TextMapPropagator = __esm({
168870
- "module_279"() {
169075
+ "module_280"() {
168871
169076
  defaultTextMapGetter = {
168872
169077
  get(carrier, key) {
168873
169078
  if (carrier == null) {
@@ -168895,7 +169100,7 @@ var init_TextMapPropagator = __esm({
168895
169100
 
168896
169101
  var NoopContextManager;
168897
169102
  var init_NoopContextManager = __esm({
168898
- "module_280"() {
169103
+ "module_281"() {
168899
169104
  init_context();
168900
169105
  NoopContextManager = class {
168901
169106
  active() {
@@ -168919,7 +169124,7 @@ var init_NoopContextManager = __esm({
168919
169124
 
168920
169125
  var API_NAME2, NOOP_CONTEXT_MANAGER, ContextAPI;
168921
169126
  var init_context2 = __esm({
168922
- "module_281"() {
169127
+ "module_282"() {
168923
169128
  init_NoopContextManager();
168924
169129
  init_global_utils();
168925
169130
  init_diag();
@@ -168984,7 +169189,7 @@ var init_context2 = __esm({
168984
169189
 
168985
169190
  var TraceFlags;
168986
169191
  var init_trace_flags = __esm({
168987
- "module_282"() {
169192
+ "module_283"() {
168988
169193
  (function(TraceFlags2) {
168989
169194
  TraceFlags2[TraceFlags2["NONE"] = 0] = "NONE";
168990
169195
  TraceFlags2[TraceFlags2["SAMPLED"] = 1] = "SAMPLED";
@@ -168994,7 +169199,7 @@ var init_trace_flags = __esm({
168994
169199
 
168995
169200
  var INVALID_SPANID, INVALID_TRACEID, INVALID_SPAN_CONTEXT;
168996
169201
  var init_invalid_span_constants = __esm({
168997
- "module_283"() {
169202
+ "module_284"() {
168998
169203
  init_trace_flags();
168999
169204
  INVALID_SPANID = "0000000000000000";
169000
169205
  INVALID_TRACEID = "00000000000000000000000000000000";
@@ -169008,7 +169213,7 @@ var init_invalid_span_constants = __esm({
169008
169213
 
169009
169214
  var NonRecordingSpan;
169010
169215
  var init_NonRecordingSpan = __esm({
169011
- "module_284"() {
169216
+ "module_285"() {
169012
169217
  init_invalid_span_constants();
169013
169218
  NonRecordingSpan = class {
169014
169219
  constructor(spanContext = INVALID_SPAN_CONTEXT) {
@@ -169079,7 +169284,7 @@ function getSpanContext(context2) {
169079
169284
  }
169080
169285
  var SPAN_KEY;
169081
169286
  var init_context_utils = __esm({
169082
- "module_285"() {
169287
+ "module_286"() {
169083
169288
  init_context();
169084
169289
  init_NonRecordingSpan();
169085
169290
  init_context2();
@@ -169110,7 +169315,7 @@ function wrapSpanContext(spanContext) {
169110
169315
  }
169111
169316
  var isHex;
169112
169317
  var init_spancontext_utils = __esm({
169113
- "module_286"() {
169318
+ "module_287"() {
169114
169319
  init_invalid_span_constants();
169115
169320
  init_NonRecordingSpan();
169116
169321
  isHex = new Uint8Array([
@@ -169226,7 +169431,7 @@ function isSpanContext(spanContext) {
169226
169431
  }
169227
169432
  var contextApi, NoopTracer;
169228
169433
  var init_NoopTracer = __esm({
169229
- "module_287"() {
169434
+ "module_288"() {
169230
169435
  init_context2();
169231
169436
  init_context_utils();
169232
169437
  init_NonRecordingSpan();
@@ -169273,7 +169478,7 @@ var init_NoopTracer = __esm({
169273
169478
 
169274
169479
  var NOOP_TRACER, ProxyTracer;
169275
169480
  var init_ProxyTracer = __esm({
169276
- "module_288"() {
169481
+ "module_289"() {
169277
169482
  init_NoopTracer();
169278
169483
  NOOP_TRACER = new NoopTracer();
169279
169484
  ProxyTracer = class {
@@ -169311,7 +169516,7 @@ var init_ProxyTracer = __esm({
169311
169516
 
169312
169517
  var NoopTracerProvider;
169313
169518
  var init_NoopTracerProvider = __esm({
169314
- "module_289"() {
169519
+ "module_290"() {
169315
169520
  init_NoopTracer();
169316
169521
  NoopTracerProvider = class {
169317
169522
  getTracer(_name, _version, _options) {
@@ -169323,7 +169528,7 @@ var init_NoopTracerProvider = __esm({
169323
169528
 
169324
169529
  var NOOP_TRACER_PROVIDER, ProxyTracerProvider;
169325
169530
  var init_ProxyTracerProvider = __esm({
169326
- "module_290"() {
169531
+ "module_291"() {
169327
169532
  init_ProxyTracer();
169328
169533
  init_NoopTracerProvider();
169329
169534
  NOOP_TRACER_PROVIDER = new NoopTracerProvider();
@@ -169355,7 +169560,7 @@ var init_ProxyTracerProvider = __esm({
169355
169560
 
169356
169561
  var SamplingDecision;
169357
169562
  var init_SamplingResult = __esm({
169358
- "module_291"() {
169563
+ "module_292"() {
169359
169564
  (function(SamplingDecision2) {
169360
169565
  SamplingDecision2[SamplingDecision2["NOT_RECORD"] = 0] = "NOT_RECORD";
169361
169566
  SamplingDecision2[SamplingDecision2["RECORD"] = 1] = "RECORD";
@@ -169366,7 +169571,7 @@ var init_SamplingResult = __esm({
169366
169571
 
169367
169572
  var SpanKind;
169368
169573
  var init_span_kind = __esm({
169369
- "module_292"() {
169574
+ "module_293"() {
169370
169575
  (function(SpanKind2) {
169371
169576
  SpanKind2[SpanKind2["INTERNAL"] = 0] = "INTERNAL";
169372
169577
  SpanKind2[SpanKind2["SERVER"] = 1] = "SERVER";
@@ -169379,7 +169584,7 @@ var init_span_kind = __esm({
169379
169584
 
169380
169585
  var SpanStatusCode;
169381
169586
  var init_status = __esm({
169382
- "module_293"() {
169587
+ "module_294"() {
169383
169588
  (function(SpanStatusCode2) {
169384
169589
  SpanStatusCode2[SpanStatusCode2["UNSET"] = 0] = "UNSET";
169385
169590
  SpanStatusCode2[SpanStatusCode2["OK"] = 1] = "OK";
@@ -169396,7 +169601,7 @@ function validateValue(value) {
169396
169601
  }
169397
169602
  var VALID_KEY_CHAR_RANGE, VALID_KEY, VALID_VENDOR_KEY, VALID_KEY_REGEX, VALID_VALUE_BASE_REGEX, INVALID_VALUE_COMMA_EQUAL_REGEX;
169398
169603
  var init_tracestate_validators = __esm({
169399
- "module_294"() {
169604
+ "module_295"() {
169400
169605
  VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
169401
169606
  VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
169402
169607
  VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
@@ -169408,7 +169613,7 @@ var init_tracestate_validators = __esm({
169408
169613
 
169409
169614
  var MAX_TRACE_STATE_ITEMS, MAX_TRACE_STATE_LEN, LIST_MEMBERS_SEPARATOR, LIST_MEMBER_KEY_VALUE_SPLITTER, TraceStateImpl;
169410
169615
  var init_tracestate_impl = __esm({
169411
- "module_295"() {
169616
+ "module_296"() {
169412
169617
  init_tracestate_validators();
169413
169618
  MAX_TRACE_STATE_ITEMS = 32;
169414
169619
  MAX_TRACE_STATE_LEN = 512;
@@ -169479,14 +169684,14 @@ function createTraceState(rawTraceState) {
169479
169684
  return new TraceStateImpl(rawTraceState);
169480
169685
  }
169481
169686
  var init_utils2 = __esm({
169482
- "module_296"() {
169687
+ "module_297"() {
169483
169688
  init_tracestate_impl();
169484
169689
  }
169485
169690
  });
169486
169691
 
169487
169692
  var context;
169488
169693
  var init_context_api = __esm({
169489
- "module_297"() {
169694
+ "module_298"() {
169490
169695
  init_context2();
169491
169696
  context = ContextAPI.getInstance();
169492
169697
  }
@@ -169494,7 +169699,7 @@ var init_context_api = __esm({
169494
169699
 
169495
169700
  var diag2;
169496
169701
  var init_diag_api = __esm({
169497
- "module_298"() {
169702
+ "module_299"() {
169498
169703
  init_diag();
169499
169704
  diag2 = DiagAPI.instance();
169500
169705
  }
@@ -169502,7 +169707,7 @@ var init_diag_api = __esm({
169502
169707
 
169503
169708
  var NoopMeterProvider, NOOP_METER_PROVIDER;
169504
169709
  var init_NoopMeterProvider = __esm({
169505
- "module_299"() {
169710
+ "module_300"() {
169506
169711
  init_NoopMeter();
169507
169712
  NoopMeterProvider = class {
169508
169713
  getMeter(_name, _version, _options) {
@@ -169515,7 +169720,7 @@ var init_NoopMeterProvider = __esm({
169515
169720
 
169516
169721
  var API_NAME3, MetricsAPI;
169517
169722
  var init_metrics = __esm({
169518
- "module_300"() {
169723
+ "module_301"() {
169519
169724
  init_NoopMeterProvider();
169520
169725
  init_global_utils();
169521
169726
  init_diag();
@@ -169560,7 +169765,7 @@ var init_metrics = __esm({
169560
169765
 
169561
169766
  var metrics;
169562
169767
  var init_metrics_api = __esm({
169563
- "module_301"() {
169768
+ "module_302"() {
169564
169769
  init_metrics();
169565
169770
  metrics = MetricsAPI.getInstance();
169566
169771
  }
@@ -169568,7 +169773,7 @@ var init_metrics_api = __esm({
169568
169773
 
169569
169774
  var NoopTextMapPropagator;
169570
169775
  var init_NoopTextMapPropagator = __esm({
169571
- "module_302"() {
169776
+ "module_303"() {
169572
169777
  NoopTextMapPropagator = class {
169573
169778
  /** Noop inject function does nothing */
169574
169779
  inject(_context, _carrier) {
@@ -169598,7 +169803,7 @@ function deleteBaggage(context2) {
169598
169803
  }
169599
169804
  var BAGGAGE_KEY;
169600
169805
  var init_context_helpers = __esm({
169601
- "module_303"() {
169806
+ "module_304"() {
169602
169807
  init_context2();
169603
169808
  init_context();
169604
169809
  BAGGAGE_KEY = createContextKey("OpenTelemetry Baggage Key");
@@ -169607,7 +169812,7 @@ var init_context_helpers = __esm({
169607
169812
 
169608
169813
  var API_NAME4, NOOP_TEXT_MAP_PROPAGATOR, PropagationAPI;
169609
169814
  var init_propagation = __esm({
169610
- "module_304"() {
169815
+ "module_305"() {
169611
169816
  init_global_utils();
169612
169817
  init_NoopTextMapPropagator();
169613
169818
  init_TextMapPropagator();
@@ -169679,7 +169884,7 @@ var init_propagation = __esm({
169679
169884
 
169680
169885
  var propagation;
169681
169886
  var init_propagation_api = __esm({
169682
- "module_305"() {
169887
+ "module_306"() {
169683
169888
  init_propagation();
169684
169889
  propagation = PropagationAPI.getInstance();
169685
169890
  }
@@ -169687,7 +169892,7 @@ var init_propagation_api = __esm({
169687
169892
 
169688
169893
  var API_NAME5, TraceAPI;
169689
169894
  var init_trace = __esm({
169690
- "module_306"() {
169895
+ "module_307"() {
169691
169896
  init_global_utils();
169692
169897
  init_ProxyTracerProvider();
169693
169898
  init_spancontext_utils();
@@ -169749,7 +169954,7 @@ var init_trace = __esm({
169749
169954
 
169750
169955
  var trace;
169751
169956
  var init_trace_api = __esm({
169752
- "module_307"() {
169957
+ "module_308"() {
169753
169958
  init_trace();
169754
169959
  trace = TraceAPI.getInstance();
169755
169960
  }
@@ -169788,7 +169993,7 @@ __export(esm_exports, {
169788
169993
  });
169789
169994
  var esm_default;
169790
169995
  var init_esm2 = __esm({
169791
- "module_308"() {
169996
+ "module_309"() {
169792
169997
  init_utils();
169793
169998
  init_context();
169794
169999
  init_consoleLogger();
@@ -175512,7 +175717,7 @@ var require_firestore = __commonJS({
175512
175717
 
175513
175718
  var import_firestore, AggregateField, AggregateQuery, AggregateQuerySnapshot, BulkWriter, BundleBuilder, CollectionGroup, CollectionReference, DocumentReference, DocumentSnapshot, FieldPath, FieldValue, Filter, FirebaseFirestoreError, Firestore, GeoPoint, GrpcStatus, Query, QueryDocumentSnapshot, QueryPartition, QuerySnapshot, Timestamp, Transaction, WriteBatch, WriteResult, getFirestore, initializeFirestore, setLogFunction, v12;
175514
175719
  var init_firestore = __esm({
175515
- "module_309"() {
175720
+ "module_310"() {
175516
175721
  import_firestore = __toESM(require_firestore(), 1);
175517
175722
  AggregateField = import_firestore.default.AggregateField;
175518
175723
  AggregateQuery = import_firestore.default.AggregateQuery;
@@ -175750,7 +175955,7 @@ function getBrowserProfilePath(profileName) {
175750
175955
  }
175751
175956
  var import_secret_manager, import_fs19, import_os16, import_path17, secretClient, firestoreDb, FIRESTORE_COLLECTION, FIRESTORE_DOC, GROWTH_CONSOLE_URL;
175752
175957
  var init_credential_resolver = __esm({
175753
- "module_310"() {
175958
+ "module_311"() {
175754
175959
  "use strict";
175755
175960
  import_secret_manager = __toESM(require_src13(), 1);
175756
175961
  init_app();
@@ -176510,7 +176715,7 @@ async function startGalBrowserServer(config = {}) {
176510
176715
  }
176511
176716
  var import_child_process6, import_server, import_stdio, import_types11, import_fs20, import_path18, MERGED_STORAGE_STATE_FILENAME, GAL_BROWSER_TOOLS;
176512
176717
  var init_browser_server = __esm({
176513
- "module_311"() {
176718
+ "module_312"() {
176514
176719
  "use strict";
176515
176720
  import_child_process6 = require("child_process");
176516
176721
  import_server = require("@modelcontextprotocol/sdk/server/index.js");
@@ -177037,7 +177242,7 @@ __export(dist_exports2, {
177037
177242
  validateCredential: () => validateCredential
177038
177243
  });
177039
177244
  var init_dist4 = __esm({
177040
- "module_312"() {
177245
+ "module_313"() {
177041
177246
  "use strict";
177042
177247
  init_browser_server();
177043
177248
  init_profile_sync();
@@ -177430,7 +177635,7 @@ function createBrowserCommand() {
177430
177635
  }
177431
177636
  var import_fs21, import_child_process7, import_path19, GAL_BINARY, BROWSER_SERVER_SUBCMD, PID_FILE_NAME;
177432
177637
  var init_browser = __esm({
177433
- "module_313"() {
177638
+ "module_314"() {
177434
177639
  "use strict";
177435
177640
  init_esm();
177436
177641
  init_source();
@@ -177807,7 +178012,7 @@ async function startChromeExtensionGalServer(config = {}) {
177807
178012
  }
177808
178013
  var import_fs22, import_path20, import_os17, import_server2, import_stdio2, import_types12, CHROME_EXTENSION_GAL_TOOLS;
177809
178014
  var init_chrome_extension_gal_server = __esm({
177810
- "module_314"() {
178015
+ "module_315"() {
177811
178016
  "use strict";
177812
178017
  import_fs22 = require("fs");
177813
178018
  import_path20 = require("path");
@@ -177942,7 +178147,7 @@ function createChromeExtensionCommand() {
177942
178147
  }
177943
178148
  var import_path21;
177944
178149
  var init_chrome_extension = __esm({
177945
- "module_315"() {
178150
+ "module_316"() {
177946
178151
  "use strict";
177947
178152
  init_esm();
177948
178153
  import_path21 = require("path");
@@ -178260,7 +178465,7 @@ function createApprovedConfigCommand() {
178260
178465
  return command;
178261
178466
  }
178262
178467
  var init_approved_config = __esm({
178263
- "module_316"() {
178468
+ "module_317"() {
178264
178469
  "use strict";
178265
178470
  init_esm();
178266
178471
  init_source();
@@ -178313,7 +178518,7 @@ Your role in ${orgName}: ${source_default.white(org.githubRole)}`));
178313
178518
  }
178314
178519
  }
178315
178520
  var init_capability_checker = __esm({
178316
- "module_317"() {
178521
+ "module_318"() {
178317
178522
  "use strict";
178318
178523
  init_source();
178319
178524
  }
@@ -178321,7 +178526,7 @@ var init_capability_checker = __esm({
178321
178526
 
178322
178527
  var import_fs23, import_path22, import_crypto7, import_os18, import_yaml2, PLATFORM_DIRS, PLATFORM_INSTRUCTION_FILES, GalConfigService;
178323
178528
  var init_gal_config_service = __esm({
178324
- "module_318"() {
178529
+ "module_319"() {
178325
178530
  "use strict";
178326
178531
  import_fs23 = require("fs");
178327
178532
  import_path22 = require("path");
@@ -179757,7 +179962,7 @@ Content hash: ${hash}`));
179757
179962
  }
179758
179963
  var import_crypto8, import_fs24, import_path23;
179759
179964
  var init_approve = __esm({
179760
- "module_319"() {
179965
+ "module_320"() {
179761
179966
  "use strict";
179762
179967
  init_esm();
179763
179968
  init_source();
@@ -180135,7 +180340,7 @@ Generated by GAL Token Security Audit
180135
180340
  }
180136
180341
  var import_child_process8, import_fs25, import_path24, import_readline2, defaultApiUrl3, TokenAuditor;
180137
180342
  var init_audit = __esm({
180138
- "module_320"() {
180343
+ "module_321"() {
180139
180344
  "use strict";
180140
180345
  init_esm();
180141
180346
  init_source();
@@ -180501,7 +180706,7 @@ function findProjectRoot(startPath = process.cwd()) {
180501
180706
  }
180502
180707
  var import_fs26, import_path25, cachedProjectRoot, cachedStartPath, DEBUG;
180503
180708
  var init_project_detection = __esm({
180504
- "module_321"() {
180709
+ "module_322"() {
180505
180710
  "use strict";
180506
180711
  import_fs26 = require("fs");
180507
180712
  import_path25 = require("path");
@@ -180513,7 +180718,7 @@ var init_project_detection = __esm({
180513
180718
 
180514
180719
  var SYNC_STATE_SCHEMA_VERSION;
180515
180720
  var init_types2 = __esm({
180516
- "module_322"() {
180721
+ "module_323"() {
180517
180722
  "use strict";
180518
180723
  SYNC_STATE_SCHEMA_VERSION = 2;
180519
180724
  }
@@ -180715,7 +180920,7 @@ function writeCopilotConfig(directory, configData, syncedFiles, syncedItems) {
180715
180920
  }
180716
180921
  var import_fs27, import_path26;
180717
180922
  var init_copilot_writer = __esm({
180718
- "module_323"() {
180923
+ "module_324"() {
180719
180924
  "use strict";
180720
180925
  import_fs27 = require("fs");
180721
180926
  import_path26 = require("path");
@@ -180736,7 +180941,7 @@ function getValidDispatchCategories(categories) {
180736
180941
  return categories.filter(isDispatchCategory);
180737
180942
  }
180738
180943
  var init_dispatch_categories = __esm({
180739
- "module_324"() {
180944
+ "module_325"() {
180740
180945
  "use strict";
180741
180946
  }
180742
180947
  });
@@ -180807,7 +181012,7 @@ function generateDispatchSection(config) {
180807
181012
  return lines.join("\n");
180808
181013
  }
180809
181014
  var init_agents_md_generator = __esm({
180810
- "module_325"() {
181015
+ "module_326"() {
180811
181016
  "use strict";
180812
181017
  init_dispatch_categories();
180813
181018
  }
@@ -180840,7 +181045,7 @@ function getPatternsByCategory(category) {
180840
181045
  }
180841
181046
  var DANGEROUS_PATTERNS;
180842
181047
  var init_dangerous_patterns = __esm({
180843
- "module_326"() {
181048
+ "module_327"() {
180844
181049
  "use strict";
180845
181050
  DANGEROUS_PATTERNS = [
180846
181051
  // Critical - Destructive file system operations
@@ -181060,7 +181265,7 @@ function seccompProfileToJson(profile) {
181060
181265
  }
181061
181266
  var DANGEROUS_SYSCALLS, ALLOWED_SYSCALLS;
181062
181267
  var init_seccomp_generator = __esm({
181063
- "module_327"() {
181268
+ "module_328"() {
181064
181269
  "use strict";
181065
181270
  DANGEROUS_SYSCALLS = [
181066
181271
  "ptrace",
@@ -181280,13 +181485,13 @@ function macOSSandboxToSchemeLisp(profile) {
181280
181485
  return lines.join("\n");
181281
181486
  }
181282
181487
  var init_macos_sandbox_generator = __esm({
181283
- "module_328"() {
181488
+ "module_329"() {
181284
181489
  "use strict";
181285
181490
  }
181286
181491
  });
181287
181492
 
181288
181493
  var init_types3 = __esm({
181289
- "module_329"() {
181494
+ "module_330"() {
181290
181495
  "use strict";
181291
181496
  }
181292
181497
  });
@@ -181407,7 +181612,7 @@ function getDockerRunFlags(config) {
181407
181612
  }
181408
181613
  var import_node_os2;
181409
181614
  var init_kernel = __esm({
181410
- "module_330"() {
181615
+ "module_331"() {
181411
181616
  "use strict";
181412
181617
  import_node_os2 = require("node:os");
181413
181618
  init_seccomp_generator();
@@ -182061,7 +182266,7 @@ if __name__ == "__main__":
182061
182266
  `;
182062
182267
  }
182063
182268
  var init_hook_generator = __esm({
182064
- "module_331"() {
182269
+ "module_332"() {
182065
182270
  "use strict";
182066
182271
  init_dangerous_patterns();
182067
182272
  init_kernel();
@@ -182180,7 +182385,7 @@ async function autoInstallSdlcHooksIfNeeded(basePath, apiUrl, orgName, policyNam
182180
182385
  }
182181
182386
  var import_node_fs, import_promises, import_node_path, BUILTIN_SDLC_POLICY_NAME, GAL_SDLC_PREPUSH_MARKER;
182182
182387
  var init_sdlc_enforcement_install = __esm({
182183
- "module_332"() {
182388
+ "module_333"() {
182184
182389
  "use strict";
182185
182390
  init_source();
182186
182391
  init_ora();
@@ -182233,7 +182438,7 @@ function quoteIfNeeded(path11) {
182233
182438
  }
182234
182439
  var import_promises2, import_node_path2;
182235
182440
  var init_compiler = __esm({
182236
- "module_333"() {
182441
+ "module_334"() {
182237
182442
  "use strict";
182238
182443
  import_promises2 = require("node:fs/promises");
182239
182444
  import_node_path2 = require("node:path");
@@ -182248,7 +182453,7 @@ function stripRegexSlashes(pattern) {
182248
182453
  }
182249
182454
  var import_yaml3;
182250
182455
  var init_parser = __esm({
182251
- "module_334"() {
182456
+ "module_335"() {
182252
182457
  "use strict";
182253
182458
  import_yaml3 = __toESM(require_dist(), 1);
182254
182459
  }
@@ -182265,20 +182470,20 @@ function findMatchingCommandRule(rules, command) {
182265
182470
  return rules.find((rule) => matchesCommand(rule, command));
182266
182471
  }
182267
182472
  var init_match = __esm({
182268
- "module_335"() {
182473
+ "module_336"() {
182269
182474
  "use strict";
182270
182475
  init_parser();
182271
182476
  }
182272
182477
  });
182273
182478
 
182274
182479
  var init_merge = __esm({
182275
- "module_336"() {
182480
+ "module_337"() {
182276
182481
  "use strict";
182277
182482
  }
182278
182483
  });
182279
182484
 
182280
182485
  var init_dist5 = __esm({
182281
- "module_337"() {
182486
+ "module_338"() {
182282
182487
  "use strict";
182283
182488
  init_parser();
182284
182489
  init_match();
@@ -182314,7 +182519,7 @@ function isRecord(value) {
182314
182519
  }
182315
182520
  var MAPPING;
182316
182521
  var init_tool_mapping = __esm({
182317
- "module_338"() {
182522
+ "module_339"() {
182318
182523
  "use strict";
182319
182524
  MAPPING = {
182320
182525
  Bash: "command",
@@ -182431,7 +182636,7 @@ function globToRegex(pattern) {
182431
182636
  return new RegExp("^" + out + "$");
182432
182637
  }
182433
182638
  var init_handler = __esm({
182434
- "module_339"() {
182639
+ "module_340"() {
182435
182640
  "use strict";
182436
182641
  init_dist5();
182437
182642
  init_tool_mapping();
@@ -182439,7 +182644,7 @@ var init_handler = __esm({
182439
182644
  });
182440
182645
 
182441
182646
  var init_src2 = __esm({
182442
- "module_340"() {
182647
+ "module_341"() {
182443
182648
  "use strict";
182444
182649
  init_compiler();
182445
182650
  init_handler();
@@ -182511,7 +182716,7 @@ function errMsg(err) {
182511
182716
  }
182512
182717
  var import_promises3, import_meta2, cached, invokedDirectly;
182513
182718
  var init_handler_bin = __esm({
182514
- "module_341"() {
182719
+ "module_342"() {
182515
182720
  "use strict";
182516
182721
  import_promises3 = require("node:fs/promises");
182517
182722
  init_handler();
@@ -182582,7 +182787,7 @@ function stableUnique(values) {
182582
182787
  }
182583
182788
  var import_promises4, import_node_path3;
182584
182789
  var init_compiler2 = __esm({
182585
- "module_342"() {
182790
+ "module_343"() {
182586
182791
  "use strict";
182587
182792
  import_promises4 = require("node:fs/promises");
182588
182793
  import_node_path3 = require("node:path");
@@ -182590,7 +182795,7 @@ var init_compiler2 = __esm({
182590
182795
  });
182591
182796
 
182592
182797
  var init_src3 = __esm({
182593
- "module_343"() {
182798
+ "module_344"() {
182594
182799
  "use strict";
182595
182800
  init_compiler2();
182596
182801
  }
@@ -182601,27 +182806,27 @@ function emptyRuleSet2() {
182601
182806
  }
182602
182807
  var import_yaml4;
182603
182808
  var init_parser2 = __esm({
182604
- "module_344"() {
182809
+ "module_345"() {
182605
182810
  "use strict";
182606
182811
  import_yaml4 = __toESM(require_dist(), 1);
182607
182812
  }
182608
182813
  });
182609
182814
 
182610
182815
  var init_match2 = __esm({
182611
- "module_345"() {
182816
+ "module_346"() {
182612
182817
  "use strict";
182613
182818
  init_parser2();
182614
182819
  }
182615
182820
  });
182616
182821
 
182617
182822
  var init_merge2 = __esm({
182618
- "module_346"() {
182823
+ "module_347"() {
182619
182824
  "use strict";
182620
182825
  }
182621
182826
  });
182622
182827
 
182623
182828
  var init_src4 = __esm({
182624
- "module_347"() {
182829
+ "module_348"() {
182625
182830
  "use strict";
182626
182831
  init_parser2();
182627
182832
  init_match2();
@@ -182834,7 +183039,7 @@ function shellQuote(value) {
182834
183039
  }
182835
183040
  var import_promises5, import_node_fs2, import_node_child_process, import_node_os3, import_node_path4, SRT_PACKAGE_NAME, SRT_PACKAGE_VERSION, PRE_TOOL_USE_HANDLER_FILENAME;
182836
183041
  var init_unified_runtime = __esm({
182837
- "module_348"() {
183042
+ "module_349"() {
182838
183043
  "use strict";
182839
183044
  import_promises5 = require("node:fs/promises");
182840
183045
  import_node_fs2 = require("node:fs");
@@ -182986,7 +183191,7 @@ function removeInitializedDirectory(directory) {
182986
183191
  }
182987
183192
  var import_fs28, import_os19, import_path27, REGISTRY_SCHEMA_VERSION, DEFAULT_REGISTRY_PATH;
182988
183193
  var init_sync_initialization = __esm({
182989
- "module_349"() {
183194
+ "module_350"() {
182990
183195
  "use strict";
182991
183196
  import_fs28 = require("fs");
182992
183197
  import_os19 = require("os");
@@ -183049,7 +183254,7 @@ function checkGitConflict(filePath, repoRoot) {
183049
183254
  }
183050
183255
  var import_child_process9, import_fs29, import_path28, cachedGitInstalled;
183051
183256
  var init_git_utils = __esm({
183052
- "module_350"() {
183257
+ "module_351"() {
183053
183258
  "use strict";
183054
183259
  import_child_process9 = require("child_process");
183055
183260
  import_fs29 = require("fs");
@@ -183170,7 +183375,7 @@ async function runSessionDriftCheck(projectRoot) {
183170
183375
  }
183171
183376
  var import_fs30, import_path29, import_os20, import_crypto9;
183172
183377
  var init_drift_check = __esm({
183173
- "module_351"() {
183378
+ "module_352"() {
183174
183379
  "use strict";
183175
183380
  import_fs30 = require("fs");
183176
183381
  import_path29 = require("path");
@@ -185858,7 +186063,7 @@ async function checkApprovedConfig(configRepo, orgName, directory, platformFilte
185858
186063
  }
185859
186064
  var import_fs31, import_path30, import_os21, import_crypto10, cliVersion4, defaultApiUrl4, GAL_CLI_CURSOR_RULES_VERSION, GAL_CLI_CURSOR_RULES, CODEX_PROMPT_PREFIX, GEMINI_COMMANDS_DIR, GEMINI_SKILLS_DIR;
185860
186065
  var init_sync = __esm({
185861
- "module_352"() {
186066
+ "module_353"() {
185862
186067
  "use strict";
185863
186068
  init_esm();
185864
186069
  init_source();
@@ -187093,7 +187298,7 @@ Source: ${credentialSource}`));
187093
187298
  }
187094
187299
  var import_http, import_child_process10, import_os22, import_fs32, import_path31, import_readline3, CLI_CALLBACK_PORT, CLI_CALLBACK_PATH, cliVersion5, defaultApiUrl5;
187095
187300
  var init_auth2 = __esm({
187096
- "module_353"() {
187301
+ "module_354"() {
187097
187302
  "use strict";
187098
187303
  init_esm();
187099
187304
  init_source();
@@ -187151,7 +187356,7 @@ Error: Path is not a directory: ${options.path}
187151
187356
  }
187152
187357
  var import_fs33, import_path32, import_child_process11, SECRET_PATTERNS, DANGEROUS_PATTERNS2, FORBIDDEN_FILES, PreEnforcementChecker;
187153
187358
  var init_check = __esm({
187154
- "module_354"() {
187359
+ "module_355"() {
187155
187360
  "use strict";
187156
187361
  init_esm();
187157
187362
  init_source();
@@ -187701,7 +187906,7 @@ function runGalCode(binaryPath, args2, childEnv, spawnImpl = import_child_proces
187701
187906
  }
187702
187907
  var import_child_process12;
187703
187908
  var init_code_process = __esm({
187704
- "module_355"() {
187909
+ "module_356"() {
187705
187910
  "use strict";
187706
187911
  import_child_process12 = require("child_process");
187707
187912
  }
@@ -187721,7 +187926,7 @@ function buildToolsetEnv(toolset, baseEnv) {
187721
187926
  }
187722
187927
  var TOOLSET_PRESETS;
187723
187928
  var init_toolset = __esm({
187724
- "module_356"() {
187929
+ "module_357"() {
187725
187930
  "use strict";
187726
187931
  TOOLSET_PRESETS = {
187727
187932
  research: {
@@ -187768,7 +187973,7 @@ function buildProfileEnv(profile, baseEnv) {
187768
187973
  }
187769
187974
  var import_node_os4, import_node_path5;
187770
187975
  var init_code_profile = __esm({
187771
- "module_357"() {
187976
+ "module_358"() {
187772
187977
  "use strict";
187773
187978
  import_node_os4 = require("node:os");
187774
187979
  import_node_path5 = require("node:path");
@@ -187860,7 +188065,7 @@ function isComputerUseBinaryAvailable(projectPath2, env2 = process.env, cwd = pr
187860
188065
  }
187861
188066
  var import_node_fs3, import_node_path6, GAL_COMPUTER_USE_BINARY_ENV_KEY, COMPUTER_USE_BINARY_NAME;
187862
188067
  var init_computer_use_binary = __esm({
187863
- "module_358"() {
188068
+ "module_359"() {
187864
188069
  "use strict";
187865
188070
  import_node_fs3 = require("node:fs");
187866
188071
  import_node_path6 = require("node:path");
@@ -187870,7 +188075,7 @@ var init_computer_use_binary = __esm({
187870
188075
  });
187871
188076
 
187872
188077
  function resolveCliVersion() {
187873
- return true ? "0.0.668" : "0.0.0-dev";
188078
+ return true ? "0.1.62" : "0.0.0-dev";
187874
188079
  }
187875
188080
  function resolveGalCodeRunnerAsset(version2) {
187876
188081
  const platformMap = {
@@ -187979,7 +188184,7 @@ async function ensureManagedGalCodeRunner(childEnv) {
187979
188184
  }
187980
188185
  var import_node_os5, import_node_path7, import_node_fs4, import_node_child_process2, import_node_https, import_promises6, GAL_CODE_RUNNER_ENV_KEY, GAL_CODE_ALLOW_EXTERNAL_RUNNER_ENV_KEY, GAL_CODE_DISABLE_AUTO_INSTALL_ENV_KEY, GAL_CODE_RELEASE_BASE_URL_ENV_KEY, GAL_CODE_RUNNER_URL_ENV_KEY, GAL_CODE_MANAGED_RUNNER_DIR;
187981
188186
  var init_gal_code_runner_install = __esm({
187982
- "module_359"() {
188187
+ "module_360"() {
187983
188188
  "use strict";
187984
188189
  import_node_os5 = __toESM(require("node:os"), 1);
187985
188190
  import_node_path7 = __toESM(require("node:path"), 1);
@@ -187998,7 +188203,7 @@ var init_gal_code_runner_install = __esm({
187998
188203
  });
187999
188204
 
188000
188205
  function resolveCliVersion2() {
188001
- return true ? "0.0.668" : "0.0.0-dev";
188206
+ return true ? "0.1.62" : "0.0.0-dev";
188002
188207
  }
188003
188208
  function resolveComputerUseHelperAsset(version2 = resolveCliVersion2(), platform5 = process.platform, arch3 = process.arch) {
188004
188209
  if (platform5 !== "darwin") {
@@ -188096,7 +188301,7 @@ async function ensureManagedComputerUseBinary(childEnv) {
188096
188301
  }
188097
188302
  var import_node_os6, import_node_path8, import_node_fs5, import_node_child_process3, import_node_https2, import_promises7, COMPUTER_USE_RELEASE_BASE_URL_ENV_KEY, COMPUTER_USE_BINARY_URL_ENV_KEY, COMPUTER_USE_DISABLE_AUTO_INSTALL_ENV_KEY;
188098
188303
  var init_computer_use_runner_install = __esm({
188099
- "module_360"() {
188304
+ "module_361"() {
188100
188305
  "use strict";
188101
188306
  import_node_os6 = __toESM(require("node:os"), 1);
188102
188307
  import_node_path8 = __toESM(require("node:path"), 1);
@@ -188201,7 +188406,7 @@ async function uploadGalCodeSessionArchive(context2, fetchImpl = fetch) {
188201
188406
  }
188202
188407
  var import_fs34, import_path33, SESSION_DIR, SETTINGS_TIMEOUT_MS, UPLOAD_TIMEOUT_MS;
188203
188408
  var init_gal_code_session_collection = __esm({
188204
- "module_361"() {
188409
+ "module_362"() {
188205
188410
  "use strict";
188206
188411
  import_fs34 = require("fs");
188207
188412
  import_path33 = require("path");
@@ -188594,7 +188799,7 @@ async function uploadSessionArchive(config, cwd, commandArgs, startedAt, exitCod
188594
188799
  return;
188595
188800
  }
188596
188801
  const endedAt = /* @__PURE__ */ new Date();
188597
- const wrapperVersion = true ? "0.0.668" : "0.0.0-dev";
188802
+ const wrapperVersion = true ? "0.1.62" : "0.0.0-dev";
188598
188803
  const model = childEnv.GAL_CODE_MODEL ?? "glm-vertex/glm-5";
188599
188804
  await uploadGalCodeSessionArchive(
188600
188805
  {
@@ -188677,7 +188882,7 @@ function createCodeCommand(runVariant = runCodeVariant) {
188677
188882
  }
188678
188883
  var import_node_os7, import_node_path9, import_node_fs6, import_node_url, GAL_CODE_DESCRIPTION, GAL_CODE_CONFIG_PATH, GAL_CODE_RUNTIME_PLUGIN_DIR, GAL_CODE_BRANDING_PLUGIN_FILENAME, GAL_CODE_DEV_RUNNER_PATH, OFFICIAL_VARIANT_BINARIES, GLM_5_CONTEXT_LIMIT, GLM_5_OUTPUT_LIMIT, GLM_5_COMPACTION_RESERVE, GLM_4_7_CONTEXT_LIMIT, GLM_4_7_OUTPUT_LIMIT, GAL_VISION_ENV_KEYS, GAL_CODE_BRANDING_PLUGIN_CONTENT;
188679
188884
  var init_code = __esm({
188680
- "module_362"() {
188885
+ "module_363"() {
188681
188886
  "use strict";
188682
188887
  import_node_os7 = __toESM(require("node:os"), 1);
188683
188888
  import_node_path9 = __toESM(require("node:path"), 1);
@@ -188735,7 +188940,7 @@ export default plugin
188735
188940
  });
188736
188941
 
188737
188942
  var init_types4 = __esm({
188738
- "module_363"() {
188943
+ "module_364"() {
188739
188944
  "use strict";
188740
188945
  }
188741
188946
  });
@@ -188745,7 +188950,7 @@ function getRequirementsByFramework(framework) {
188745
188950
  }
188746
188951
  var COMPLIANCE_REQUIREMENTS;
188747
188952
  var init_requirements = __esm({
188748
- "module_364"() {
188953
+ "module_365"() {
188749
188954
  "use strict";
188750
188955
  COMPLIANCE_REQUIREMENTS = [
188751
188956
  // SOC 2 - Security
@@ -188974,7 +189179,7 @@ var init_requirements = __esm({
188974
189179
 
188975
189180
  var ComplianceScoringEngine;
188976
189181
  var init_scoring_engine = __esm({
188977
- "module_365"() {
189182
+ "module_366"() {
188978
189183
  "use strict";
188979
189184
  init_requirements();
188980
189185
  ComplianceScoringEngine = class {
@@ -189402,7 +189607,7 @@ var init_scoring_engine = __esm({
189402
189607
  });
189403
189608
 
189404
189609
  var init_compliance = __esm({
189405
- "module_366"() {
189610
+ "module_367"() {
189406
189611
  "use strict";
189407
189612
  init_types4();
189408
189613
  init_requirements();
@@ -189411,14 +189616,14 @@ var init_compliance = __esm({
189411
189616
  });
189412
189617
 
189413
189618
  var init_types5 = __esm({
189414
- "module_367"() {
189619
+ "module_368"() {
189415
189620
  "use strict";
189416
189621
  }
189417
189622
  });
189418
189623
 
189419
189624
  var PolicyEngine, defaultPolicyEngine;
189420
189625
  var init_policy_engine = __esm({
189421
- "module_368"() {
189626
+ "module_369"() {
189422
189627
  "use strict";
189423
189628
  init_dangerous_patterns();
189424
189629
  PolicyEngine = class {
@@ -189716,7 +189921,7 @@ async function validateLocalConfigs(basePath) {
189716
189921
  }
189717
189922
  var import_promises8, import_node_path10, PLATFORM_DIRS2, ConfigValidator;
189718
189923
  var init_config_validator = __esm({
189719
- "module_369"() {
189924
+ "module_370"() {
189720
189925
  "use strict";
189721
189926
  import_promises8 = require("node:fs/promises");
189722
189927
  import_node_path10 = require("node:path");
@@ -189935,7 +190140,7 @@ async function createSystemEnforcer(config = {}) {
189935
190140
  }
189936
190141
  var import_node_fs7, import_promises9, import_node_path11, import_node_events, import_node_os8, ViolationBlockedError, SystemEnforcer;
189937
190142
  var init_system_enforcer = __esm({
189938
- "module_370"() {
190143
+ "module_371"() {
189939
190144
  "use strict";
189940
190145
  import_node_fs7 = require("node:fs");
189941
190146
  import_promises9 = require("node:fs/promises");
@@ -190701,14 +190906,14 @@ rl.on('close', async () => {
190701
190906
  };
190702
190907
  }
190703
190908
  var init_workflow_enforcement_hook = __esm({
190704
- "module_371"() {
190909
+ "module_372"() {
190705
190910
  "use strict";
190706
190911
  init_dist2();
190707
190912
  }
190708
190913
  });
190709
190914
 
190710
190915
  var init_enforcement = __esm({
190711
- "module_372"() {
190916
+ "module_373"() {
190712
190917
  "use strict";
190713
190918
  init_types5();
190714
190919
  init_dangerous_patterns();
@@ -191156,7 +191361,7 @@ function groupBy(array, key) {
191156
191361
  }
191157
191362
  var import_promises10, defaultApiUrl6;
191158
191363
  var init_compliance2 = __esm({
191159
- "module_373"() {
191364
+ "module_374"() {
191160
191365
  "use strict";
191161
191366
  init_esm();
191162
191367
  init_source();
@@ -191192,7 +191397,7 @@ function setTheme(theme) {
191192
191397
  }
191193
191398
  var subtleTheme, vividTheme, currentTheme, themeLoaded;
191194
191399
  var init_theme = __esm({
191195
- "module_374"() {
191400
+ "module_375"() {
191196
191401
  "use strict";
191197
191402
  init_source();
191198
191403
  init_config_manager();
@@ -191379,7 +191584,7 @@ function createConfigCommand2() {
191379
191584
  return command;
191380
191585
  }
191381
191586
  var init_config = __esm({
191382
- "module_375"() {
191587
+ "module_376"() {
191383
191588
  "use strict";
191384
191589
  init_esm();
191385
191590
  init_source();
@@ -191581,7 +191786,7 @@ Config: ${repo}/${path11}
191581
191786
  }
191582
191787
  var VALID_PLATFORMS, POLL_INTERVAL, SCAN_TIMEOUT;
191583
191788
  var init_discover = __esm({
191584
- "module_376"() {
191789
+ "module_377"() {
191585
191790
  "use strict";
191586
191791
  init_esm();
191587
191792
  init_source();
@@ -191636,7 +191841,7 @@ function createDispatchCommand() {
191636
191841
  }
191637
191842
  var DEFAULT_DISPATCH_RUNNER_LABEL;
191638
191843
  var init_dispatch = __esm({
191639
- "module_377"() {
191844
+ "module_378"() {
191640
191845
  "use strict";
191641
191846
  init_esm();
191642
191847
  DEFAULT_DISPATCH_RUNNER_LABEL = "agents-standard-runc-x64";
@@ -191688,7 +191893,7 @@ function createSyncAllCommand() {
191688
191893
  });
191689
191894
  }
191690
191895
  var init_distribute = __esm({
191691
- "module_378"() {
191896
+ "module_379"() {
191692
191897
  "use strict";
191693
191898
  init_esm();
191694
191899
  init_source();
@@ -192470,7 +192675,7 @@ function discoverEvalCases(evalsDir) {
192470
192675
  }
192471
192676
  var fs, path4, DOCS_BASE_URL, DASHBOARD_URL;
192472
192677
  var init_docs = __esm({
192473
- "module_379"() {
192678
+ "module_380"() {
192474
192679
  "use strict";
192475
192680
  init_esm();
192476
192681
  init_source();
@@ -193955,7 +194160,7 @@ async function removeGitPrecommitHook(basePath) {
193955
194160
  }
193956
194161
  var import_promises11, import_node_child_process4, import_node_os9, import_node_fs8, import_node_path12, import_node_crypto, defaultApiUrl7, PLATFORM_DIRS3, SCAN_PLATFORM_DIRS, ENFORCEMENT_HOOK_SUPPORT, GAL_PRECOMMIT_MARKER, GAL_PRECOMMIT_CONTENT;
193957
194162
  var init_enforce = __esm({
193958
- "module_380"() {
194163
+ "module_381"() {
193959
194164
  "use strict";
193960
194165
  init_esm();
193961
194166
  init_source();
@@ -194169,7 +194374,7 @@ function createFeedbackCommand() {
194169
194374
  }
194170
194375
  var import_readline4, VALID_RATINGS, VALID_REASONS, REASON_LABELS;
194171
194376
  var init_feedback2 = __esm({
194172
- "module_381"() {
194377
+ "module_382"() {
194173
194378
  "use strict";
194174
194379
  init_esm();
194175
194380
  init_source();
@@ -194343,7 +194548,7 @@ Files written to ${outputDir}`));
194343
194548
  }
194344
194549
  var import_fs35, import_path34, PLATFORM_DIRS4, CATEGORY_DIRS, FILE_EXTENSIONS;
194345
194550
  var init_fetch = __esm({
194346
- "module_382"() {
194551
+ "module_383"() {
194347
194552
  "use strict";
194348
194553
  init_esm();
194349
194554
  init_source();
@@ -194479,7 +194684,7 @@ function createFlagsCommand() {
194479
194684
  return cmd;
194480
194685
  }
194481
194686
  var init_flags = __esm({
194482
- "module_383"() {
194687
+ "module_384"() {
194483
194688
  "use strict";
194484
194689
  init_esm();
194485
194690
  init_source();
@@ -194571,7 +194776,7 @@ function createGovernanceCommand() {
194571
194776
  }
194572
194777
  var VALID_PROCESS_TYPES;
194573
194778
  var init_governance = __esm({
194574
- "module_384"() {
194779
+ "module_385"() {
194575
194780
  "use strict";
194576
194781
  init_esm();
194577
194782
  init_source();
@@ -194987,7 +195192,7 @@ Fleet Status: ${orgName}
194987
195192
  }
194988
195193
  var import_node_os10, import_node_child_process5, import_node_crypto2, import_promises12, import_meta3, defaultApiUrl8;
194989
195194
  var init_fleet = __esm({
194990
- "module_385"() {
195195
+ "module_386"() {
194991
195196
  "use strict";
194992
195197
  init_esm();
194993
195198
  init_source();
@@ -195094,7 +195299,7 @@ Task not running: ${taskId}
195094
195299
  }
195095
195300
  var import_child_process13, import_fs36, import_path35, DEFAULT_CONFIG, TASK_TEMPLATES, HeadlessRunner;
195096
195301
  var init_headless = __esm({
195097
- "module_386"() {
195302
+ "module_387"() {
195098
195303
  "use strict";
195099
195304
  init_esm();
195100
195305
  init_source();
@@ -195501,7 +195706,7 @@ function createInitCommand() {
195501
195706
  }
195502
195707
  var import_path36;
195503
195708
  var init_init = __esm({
195504
- "module_387"() {
195709
+ "module_388"() {
195505
195710
  "use strict";
195506
195711
  init_esm();
195507
195712
  init_source();
@@ -195836,7 +196041,7 @@ function createInstallCommand() {
195836
196041
  }
195837
196042
  var import_fs37, import_path37, import_os23, INSTALL_METHODS, CLAUDE_DIR2, SETTINGS_PATH2, MEMORY_HOOK_VERSION, MEMORY_HOOK_MARKER, CLAUDE_MD_MARKER_START, CLAUDE_MD_MARKER_END, CLAUDE_MD_TEMPLATE, AGENTS_MD_MARKER_START, AGENTS_MD_MARKER_END, AGENTS_MD_TEMPLATE;
195838
196043
  var init_install2 = __esm({
195839
- "module_388"() {
196044
+ "module_389"() {
195840
196045
  "use strict";
195841
196046
  init_esm();
195842
196047
  init_source();
@@ -196168,7 +196373,7 @@ Error: ${useResult.error || "Unknown error"}`));
196168
196373
  }
196169
196374
  var import_node_os11, import_node_child_process6, import_node_crypto3, import_promises13, import_node_path13, defaultApiUrl9;
196170
196375
  var init_join = __esm({
196171
- "module_389"() {
196376
+ "module_390"() {
196172
196377
  "use strict";
196173
196378
  init_esm();
196174
196379
  init_source();
@@ -196391,7 +196596,7 @@ function formatBytes(bytes) {
196391
196596
  }
196392
196597
  var MaintenanceHooks;
196393
196598
  var init_maintain = __esm({
196394
- "module_390"() {
196599
+ "module_391"() {
196395
196600
  "use strict";
196396
196601
  init_esm();
196397
196602
  init_source();
@@ -196783,7 +196988,7 @@ function createSyncMemoryCommand() {
196783
196988
  }
196784
196989
  var import_child_process14, import_fs38, import_os24, import_path38, SYNC_TIMEOUT_MS, GAL_SYNC_MARKER, SYNC_STATE_DIR, SYNC_STATE_FILE, defaultApiUrl10;
196785
196990
  var init_sync_memory = __esm({
196786
- "module_391"() {
196991
+ "module_392"() {
196787
196992
  "use strict";
196788
196993
  import_child_process14 = require("child_process");
196789
196994
  init_esm();
@@ -196804,7 +197009,7 @@ var init_sync_memory = __esm({
196804
197009
 
196805
197010
  var GalApiClient;
196806
197011
  var init_api_client = __esm({
196807
- "module_392"() {
197012
+ "module_393"() {
196808
197013
  "use strict";
196809
197014
  GalApiClient = class {
196810
197015
  baseUrl;
@@ -196817,7 +197022,7 @@ var init_api_client = __esm({
196817
197022
  const url = `${this.baseUrl}${path11}`;
196818
197023
  const headers = {
196819
197024
  "Content-Type": "application/json",
196820
- "Authorization": `Bearer ${this.authToken}`
197025
+ Authorization: `Bearer ${this.authToken}`
196821
197026
  };
196822
197027
  const response = await fetch(url, {
196823
197028
  method,
@@ -197204,13 +197409,43 @@ var init_api_client = __esm({
197204
197409
  getSessionStreamUrl(sessionId) {
197205
197410
  return `${this.baseUrl}/api/sessions/${encodeURIComponent(sessionId)}/stream`;
197206
197411
  }
197412
+ // =========================================================================
197413
+ // Policy Agent Service (#6878)
197414
+ // =========================================================================
197415
+ async createPolicy(orgName, data) {
197416
+ return this.request("POST", `/api/orgs/${encodeURIComponent(orgName)}/policies`, data);
197417
+ }
197418
+ async listPolicies(orgName, opts) {
197419
+ const qs = new URLSearchParams();
197420
+ if (opts?.status)
197421
+ qs.append("status", opts.status);
197422
+ if (opts?.type)
197423
+ qs.append("type", opts.type);
197424
+ const query = qs.toString() ? `?${qs.toString()}` : "";
197425
+ return this.request("GET", `/api/orgs/${encodeURIComponent(orgName)}/policies${query}`);
197426
+ }
197427
+ async getPolicy(orgName, policyId) {
197428
+ return this.request("GET", `/api/policies/${encodeURIComponent(policyId)}?orgName=${encodeURIComponent(orgName)}`);
197429
+ }
197430
+ async reviewPolicy(orgName, policyId, data) {
197431
+ return this.request("PATCH", `/api/policies/${encodeURIComponent(policyId)}/review?orgName=${encodeURIComponent(orgName)}`, data);
197432
+ }
197433
+ async updatePolicyEnforcement(orgName, policyId, data) {
197434
+ return this.request("PATCH", `/api/policies/${encodeURIComponent(policyId)}/enforcement?orgName=${encodeURIComponent(orgName)}`, data);
197435
+ }
197436
+ async checkOrgPolicy(orgName, context2) {
197437
+ return this.request("POST", `/api/orgs/${encodeURIComponent(orgName)}/policies/check`, { context: context2 });
197438
+ }
197439
+ async checkSpecificPolicy(orgName, policyId, context2) {
197440
+ return this.request("POST", `/api/policies/${encodeURIComponent(policyId)}/check?orgName=${encodeURIComponent(orgName)}`, { context: context2 });
197441
+ }
197207
197442
  };
197208
197443
  }
197209
197444
  });
197210
197445
 
197211
197446
  var util, objectUtil, ZodParsedType, getParsedType;
197212
197447
  var init_util = __esm({
197213
- "module_393"() {
197448
+ "module_394"() {
197214
197449
  (function(util2) {
197215
197450
  util2.assertEqual = (_) => {
197216
197451
  };
@@ -197346,7 +197581,7 @@ var init_util = __esm({
197346
197581
 
197347
197582
  var ZodIssueCode, quotelessJson, ZodError;
197348
197583
  var init_ZodError = __esm({
197349
- "module_394"() {
197584
+ "module_395"() {
197350
197585
  init_util();
197351
197586
  ZodIssueCode = util.arrayToEnum([
197352
197587
  "invalid_type",
@@ -197469,7 +197704,7 @@ var init_ZodError = __esm({
197469
197704
 
197470
197705
  var errorMap, en_default;
197471
197706
  var init_en = __esm({
197472
- "module_395"() {
197707
+ "module_396"() {
197473
197708
  init_ZodError();
197474
197709
  init_util();
197475
197710
  errorMap = (issue, _ctx) => {
@@ -197584,7 +197819,7 @@ function getErrorMap() {
197584
197819
  }
197585
197820
  var overrideErrorMap;
197586
197821
  var init_errors = __esm({
197587
- "module_396"() {
197822
+ "module_397"() {
197588
197823
  init_en();
197589
197824
  overrideErrorMap = en_default;
197590
197825
  }
@@ -197611,7 +197846,7 @@ function addIssueToContext(ctx, issueData) {
197611
197846
  }
197612
197847
  var makeIssue, EMPTY_PATH, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync;
197613
197848
  var init_parseUtil = __esm({
197614
- "module_397"() {
197849
+ "module_398"() {
197615
197850
  init_errors();
197616
197851
  init_en();
197617
197852
  makeIssue = (params) => {
@@ -197707,13 +197942,13 @@ var init_parseUtil = __esm({
197707
197942
  });
197708
197943
 
197709
197944
  var init_typeAliases = __esm({
197710
- "module_398"() {
197945
+ "module_399"() {
197711
197946
  }
197712
197947
  });
197713
197948
 
197714
197949
  var errorUtil;
197715
197950
  var init_errorUtil = __esm({
197716
- "module_399"() {
197951
+ "module_400"() {
197717
197952
  (function(errorUtil2) {
197718
197953
  errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
197719
197954
  errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
@@ -197914,7 +198149,7 @@ function custom(check, _params = {}, fatal) {
197914
198149
  }
197915
198150
  var ParseInputLazyPath, handleResult, ZodType, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, jwtRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex, ipv4Regex, ipv4CidrRegex, ipv6Regex, ipv6CidrRegex, base64Regex, base64urlRegex, dateRegexSource, dateRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, BRAND, ZodBranded, ZodPipeline, ZodReadonly, late, ZodFirstPartyTypeKind, instanceOfType, stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType, ostring, onumber, oboolean, coerce, NEVER;
197916
198151
  var init_types6 = __esm({
197917
- "module_400"() {
198152
+ "module_401"() {
197918
198153
  init_ZodError();
197919
198154
  init_errors();
197920
198155
  init_errorUtil();
@@ -201287,7 +201522,7 @@ __export(external_exports, {
201287
201522
  void: () => voidType
201288
201523
  });
201289
201524
  var init_external = __esm({
201290
- "module_401"() {
201525
+ "module_402"() {
201291
201526
  init_errors();
201292
201527
  init_parseUtil();
201293
201528
  init_typeAliases();
@@ -201298,7 +201533,7 @@ var init_external = __esm({
201298
201533
  });
201299
201534
 
201300
201535
  var init_zod = __esm({
201301
- "module_402"() {
201536
+ "module_403"() {
201302
201537
  init_external();
201303
201538
  init_external();
201304
201539
  }
@@ -201325,7 +201560,7 @@ function resolveWorkspace(orgName) {
201325
201560
  }
201326
201561
  var ACTIVE_WORKSPACE_DESCRIPTION, activeWorkspace;
201327
201562
  var init_workspace_context = __esm({
201328
- "module_403"() {
201563
+ "module_404"() {
201329
201564
  "use strict";
201330
201565
  init_zod();
201331
201566
  ACTIVE_WORKSPACE_DESCRIPTION = "Workspace name (GitHub organization or personal account). If omitted, the active workspace set by gal_set_active_workspace is used.";
@@ -201442,7 +201677,7 @@ function registerOrganizationTools(server, apiClient) {
201442
201677
  });
201443
201678
  }
201444
201679
  var init_organization_tools = __esm({
201445
- "module_404"() {
201680
+ "module_405"() {
201446
201681
  "use strict";
201447
201682
  init_workspace_context();
201448
201683
  }
@@ -201517,7 +201752,7 @@ function registerDiscoveryTools(server, apiClient) {
201517
201752
  });
201518
201753
  }
201519
201754
  var init_discovery_tools = __esm({
201520
- "module_405"() {
201755
+ "module_406"() {
201521
201756
  "use strict";
201522
201757
  init_zod();
201523
201758
  init_workspace_context();
@@ -201562,7 +201797,7 @@ function registerConfigTools(server, apiClient) {
201562
201797
  });
201563
201798
  }
201564
201799
  var init_config_tools = __esm({
201565
- "module_406"() {
201800
+ "module_407"() {
201566
201801
  "use strict";
201567
201802
  init_zod();
201568
201803
  init_workspace_context();
@@ -201757,7 +201992,7 @@ function registerGovernanceTools(server, apiClient, options) {
201757
201992
  });
201758
201993
  }
201759
201994
  var init_governance_tools = __esm({
201760
- "module_407"() {
201995
+ "module_408"() {
201761
201996
  "use strict";
201762
201997
  init_zod();
201763
201998
  init_workspace_context();
@@ -201817,7 +202052,7 @@ function registerTeamTools(server, apiClient) {
201817
202052
  });
201818
202053
  }
201819
202054
  var init_team_tools = __esm({
201820
- "module_408"() {
202055
+ "module_409"() {
201821
202056
  "use strict";
201822
202057
  init_zod();
201823
202058
  init_workspace_context();
@@ -201943,7 +202178,7 @@ function registerComplianceTools(server, apiClient) {
201943
202178
  });
201944
202179
  }
201945
202180
  var init_compliance_tools = __esm({
201946
- "module_409"() {
202181
+ "module_410"() {
201947
202182
  "use strict";
201948
202183
  init_zod();
201949
202184
  init_workspace_context();
@@ -202056,7 +202291,7 @@ function detectProcesses(entries) {
202056
202291
  }
202057
202292
  var DETECTION_PATTERNS;
202058
202293
  var init_process_detection = __esm({
202059
- "module_410"() {
202294
+ "module_411"() {
202060
202295
  "use strict";
202061
202296
  DETECTION_PATTERNS = [
202062
202297
  // CI/CD patterns
@@ -203307,7 +203542,7 @@ function registerSessionTools(server, apiClient) {
203307
203542
  }
203308
203543
  var HUMAN_REQUIRED_KEYWORDS, HUMAN_REQUIRED_LABELS, CAPABILITY_RULES, storedSessionId, installationId2, MAX_TOTAL_RESPONSE_CHARS;
203309
203544
  var init_session_tools = __esm({
203310
- "module_411"() {
203545
+ "module_412"() {
203311
203546
  "use strict";
203312
203547
  init_zod();
203313
203548
  init_workspace_context();
@@ -203491,28 +203726,278 @@ function registerMemoryTools(server, apiClient) {
203491
203726
  });
203492
203727
  }
203493
203728
  var init_memory_tools = __esm({
203494
- "module_412"() {
203729
+ "module_413"() {
203495
203730
  "use strict";
203496
203731
  init_zod();
203497
203732
  init_session_tools();
203498
203733
  }
203499
203734
  });
203500
203735
 
203736
+ function registerPolicyTools(server, apiClient) {
203737
+ server.tool("gal_policy_propose", "Create a policy proposal for the workspace. Policies define governance rules that can be approved and enforced. Requires admin to approve.", {
203738
+ orgName: createWorkspaceParamSchema(),
203739
+ name: external_exports.string().describe("Policy name"),
203740
+ description: external_exports.string().describe("Policy description"),
203741
+ type: external_exports.enum(["distribution-first", "security", "custom"]).describe("Policy type"),
203742
+ rationale: external_exports.string().describe("Why this policy is needed"),
203743
+ rules: external_exports.array(external_exports.object({
203744
+ id: external_exports.string().describe("Unique rule identifier"),
203745
+ name: external_exports.string().describe("Rule name"),
203746
+ description: external_exports.string().optional().describe("Rule description"),
203747
+ condition: external_exports.object({
203748
+ type: external_exports.enum([
203749
+ "work_type",
203750
+ "repo_pattern",
203751
+ "label",
203752
+ "issue_title",
203753
+ "custom"
203754
+ ]),
203755
+ operator: external_exports.enum([
203756
+ "equals",
203757
+ "contains",
203758
+ "matches",
203759
+ "in",
203760
+ "not_in"
203761
+ ]),
203762
+ value: external_exports.union([external_exports.string(), external_exports.array(external_exports.string())])
203763
+ }).describe("When this rule applies"),
203764
+ action: external_exports.enum(["allow", "warn", "block"]).describe("What action to take"),
203765
+ message: external_exports.string().describe("Message to show when rule triggers"),
203766
+ severity: external_exports.enum(["info", "warning", "error"]).optional(),
203767
+ evidenceRequired: external_exports.array(external_exports.string()).optional().describe("Evidence needed to proceed")
203768
+ })).describe("Policy rules"),
203769
+ enforcement: external_exports.object({
203770
+ enabled: external_exports.boolean().describe("Whether enforcement is active"),
203771
+ mode: external_exports.enum(["off", "warn", "block"]).describe("Enforcement mode"),
203772
+ scope: external_exports.enum(["org", "repo"]).describe("Scope of enforcement"),
203773
+ repoScope: external_exports.array(external_exports.string()).optional().describe("Repos if scope is repo")
203774
+ }).describe("Enforcement settings")
203775
+ }, async ({ orgName, name, description, type, rationale, rules, enforcement }) => {
203776
+ try {
203777
+ const result = await apiClient.createPolicy(resolveWorkspace(orgName), {
203778
+ name,
203779
+ description,
203780
+ type,
203781
+ rationale,
203782
+ rules,
203783
+ enforcement
203784
+ });
203785
+ return {
203786
+ content: [
203787
+ { type: "text", text: JSON.stringify(result, null, 2) }
203788
+ ]
203789
+ };
203790
+ } catch (error2) {
203791
+ const message = error2 instanceof Error ? error2.message : String(error2);
203792
+ return {
203793
+ content: [
203794
+ {
203795
+ type: "text",
203796
+ text: `Error creating policy: ${message}`
203797
+ }
203798
+ ],
203799
+ isError: true
203800
+ };
203801
+ }
203802
+ });
203803
+ server.tool("gal_policy_list", "List policies for a workspace. Optionally filter by status or type. If orgName is omitted, the active workspace set by gal_set_active_workspace is used.", {
203804
+ orgName: createWorkspaceParamSchema(),
203805
+ status: external_exports.enum(["draft", "pending", "approved", "rejected", "deprecated"]).optional().describe("Filter by status"),
203806
+ type: external_exports.enum(["distribution-first", "security", "custom"]).optional().describe("Filter by type")
203807
+ }, async ({ orgName, status, type }) => {
203808
+ try {
203809
+ const opts = status || type ? { status, type } : void 0;
203810
+ const result = await apiClient.listPolicies(resolveWorkspace(orgName), opts);
203811
+ return {
203812
+ content: [
203813
+ { type: "text", text: JSON.stringify(result, null, 2) }
203814
+ ]
203815
+ };
203816
+ } catch (error2) {
203817
+ const message = error2 instanceof Error ? error2.message : String(error2);
203818
+ return {
203819
+ content: [
203820
+ {
203821
+ type: "text",
203822
+ text: `Error listing policies: ${message}`
203823
+ }
203824
+ ],
203825
+ isError: true
203826
+ };
203827
+ }
203828
+ });
203829
+ server.tool("gal_policy_get", "Get details of a specific policy by ID.", {
203830
+ policyId: external_exports.string().describe("Policy ID"),
203831
+ orgName: createWorkspaceParamSchema()
203832
+ }, async ({ policyId, orgName }) => {
203833
+ try {
203834
+ const result = await apiClient.getPolicy(resolveWorkspace(orgName), policyId);
203835
+ return {
203836
+ content: [
203837
+ { type: "text", text: JSON.stringify(result, null, 2) }
203838
+ ]
203839
+ };
203840
+ } catch (error2) {
203841
+ const message = error2 instanceof Error ? error2.message : String(error2);
203842
+ return {
203843
+ content: [
203844
+ { type: "text", text: `Error getting policy: ${message}` }
203845
+ ],
203846
+ isError: true
203847
+ };
203848
+ }
203849
+ });
203850
+ server.tool("gal_policy_approve", "Approve a policy proposal (admin only). Once approved, the policy can be enabled for enforcement.", {
203851
+ policyId: external_exports.string().describe("Policy ID to approve"),
203852
+ orgName: createWorkspaceParamSchema(),
203853
+ comment: external_exports.string().optional().describe("Optional approval comment")
203854
+ }, async ({ policyId, orgName, comment }) => {
203855
+ try {
203856
+ const result = await apiClient.reviewPolicy(resolveWorkspace(orgName), policyId, {
203857
+ action: "approve",
203858
+ comment
203859
+ });
203860
+ return {
203861
+ content: [
203862
+ { type: "text", text: JSON.stringify(result, null, 2) }
203863
+ ]
203864
+ };
203865
+ } catch (error2) {
203866
+ const message = error2 instanceof Error ? error2.message : String(error2);
203867
+ return {
203868
+ content: [
203869
+ {
203870
+ type: "text",
203871
+ text: `Error approving policy: ${message}`
203872
+ }
203873
+ ],
203874
+ isError: true
203875
+ };
203876
+ }
203877
+ });
203878
+ server.tool("gal_policy_reject", "Reject a policy proposal (admin only). The policy will be marked as rejected and cannot be enabled.", {
203879
+ policyId: external_exports.string().describe("Policy ID to reject"),
203880
+ orgName: createWorkspaceParamSchema(),
203881
+ comment: external_exports.string().describe("Reason for rejection")
203882
+ }, async ({ policyId, orgName, comment }) => {
203883
+ try {
203884
+ const result = await apiClient.reviewPolicy(resolveWorkspace(orgName), policyId, {
203885
+ action: "reject",
203886
+ comment
203887
+ });
203888
+ return {
203889
+ content: [
203890
+ { type: "text", text: JSON.stringify(result, null, 2) }
203891
+ ]
203892
+ };
203893
+ } catch (error2) {
203894
+ const message = error2 instanceof Error ? error2.message : String(error2);
203895
+ return {
203896
+ content: [
203897
+ {
203898
+ type: "text",
203899
+ text: `Error rejecting policy: ${message}`
203900
+ }
203901
+ ],
203902
+ isError: true
203903
+ };
203904
+ }
203905
+ });
203906
+ server.tool("gal_policy_check", "Check if work context is allowed by policy. Returns enforcement decision with reasons and evidence requirements.", {
203907
+ orgName: createWorkspaceParamSchema(),
203908
+ policyId: external_exports.string().optional().describe("Specific policy ID to check (optional, checks all org policies if omitted)"),
203909
+ context: external_exports.object({
203910
+ workType: external_exports.string().optional().describe("Type of work (feature, bugfix, migration, etc.)"),
203911
+ repo: external_exports.string().optional().describe("Repository name (owner/repo)"),
203912
+ issueNumber: external_exports.number().optional().describe("Issue number"),
203913
+ issueLabels: external_exports.array(external_exports.string()).optional().describe("Issue labels"),
203914
+ issueTitle: external_exports.string().optional().describe("Issue title"),
203915
+ issueBody: external_exports.string().optional().describe("Issue body"),
203916
+ userLogin: external_exports.string().optional().describe("User login"),
203917
+ branch: external_exports.string().optional().describe("Branch name"),
203918
+ customContext: external_exports.record(external_exports.unknown()).optional().describe("Additional context")
203919
+ }).describe("Work context to check against policy")
203920
+ }, async ({ orgName, policyId, context: context2 }) => {
203921
+ try {
203922
+ const result = policyId ? await apiClient.checkSpecificPolicy(resolveWorkspace(orgName), policyId, context2) : await apiClient.checkOrgPolicy(resolveWorkspace(orgName), context2);
203923
+ return {
203924
+ content: [
203925
+ { type: "text", text: JSON.stringify(result, null, 2) }
203926
+ ]
203927
+ };
203928
+ } catch (error2) {
203929
+ const message = error2 instanceof Error ? error2.message : String(error2);
203930
+ return {
203931
+ content: [
203932
+ {
203933
+ type: "text",
203934
+ text: `Error checking policy: ${message}`
203935
+ }
203936
+ ],
203937
+ isError: true
203938
+ };
203939
+ }
203940
+ });
203941
+ server.tool("gal_policy_set_enforcement", "Update policy enforcement settings (admin only). Can toggle enforcement on/off, change mode, or update scope.", {
203942
+ policyId: external_exports.string().describe("Policy ID to update"),
203943
+ orgName: createWorkspaceParamSchema(),
203944
+ enabled: external_exports.boolean().optional().describe("Enable or disable enforcement"),
203945
+ mode: external_exports.enum(["off", "warn", "block"]).optional().describe("Enforcement mode"),
203946
+ scope: external_exports.enum(["org", "repo"]).optional().describe("Enforcement scope"),
203947
+ repoScope: external_exports.array(external_exports.string()).optional().describe("Repos if scope is repo")
203948
+ }, async ({ policyId, orgName, enabled, mode, scope, repoScope }) => {
203949
+ try {
203950
+ const result = await apiClient.updatePolicyEnforcement(resolveWorkspace(orgName), policyId, {
203951
+ enabled,
203952
+ mode,
203953
+ scope,
203954
+ repoScope
203955
+ });
203956
+ return {
203957
+ content: [
203958
+ { type: "text", text: JSON.stringify(result, null, 2) }
203959
+ ]
203960
+ };
203961
+ } catch (error2) {
203962
+ const message = error2 instanceof Error ? error2.message : String(error2);
203963
+ return {
203964
+ content: [
203965
+ {
203966
+ type: "text",
203967
+ text: `Error updating enforcement: ${message}`
203968
+ }
203969
+ ],
203970
+ isError: true
203971
+ };
203972
+ }
203973
+ });
203974
+ }
203975
+ var init_policy_tools = __esm({
203976
+ "module_414"() {
203977
+ "use strict";
203978
+ init_zod();
203979
+ init_workspace_context();
203980
+ }
203981
+ });
203982
+
203501
203983
  function registerTools(server, apiClient, options) {
203502
203984
  const enableAgentTools = options?.internalOnly ?? false;
203503
203985
  registerOrganizationTools(server, apiClient);
203504
203986
  registerDiscoveryTools(server, apiClient);
203505
203987
  registerConfigTools(server, apiClient);
203506
- registerGovernanceTools(server, apiClient, { enableProposals: enableAgentTools });
203988
+ registerGovernanceTools(server, apiClient, {
203989
+ enableProposals: enableAgentTools
203990
+ });
203507
203991
  registerTeamTools(server, apiClient);
203508
203992
  registerComplianceTools(server, apiClient);
203509
203993
  registerMemoryTools(server, apiClient);
203994
+ registerPolicyTools(server, apiClient);
203510
203995
  if (enableAgentTools) {
203511
203996
  registerSessionTools(server, apiClient);
203512
203997
  }
203513
203998
  }
203514
203999
  var init_tools = __esm({
203515
- "module_413"() {
204000
+ "module_415"() {
203516
204001
  "use strict";
203517
204002
  init_organization_tools();
203518
204003
  init_discovery_tools();
@@ -203522,6 +204007,7 @@ var init_tools = __esm({
203522
204007
  init_compliance_tools();
203523
204008
  init_session_tools();
203524
204009
  init_memory_tools();
204010
+ init_policy_tools();
203525
204011
  }
203526
204012
  });
203527
204013
 
@@ -203652,7 +204138,7 @@ async function startGalMcpServer() {
203652
204138
  }
203653
204139
  var import_node_fs9, import_node_path14, import_node_os12, import_mcp, import_stdio3, SERVER_NAME, SERVER_VERSION, DEFAULT_GAL_API_URL;
203654
204140
  var init_server = __esm({
203655
- "module_414"() {
204141
+ "module_416"() {
203656
204142
  "use strict";
203657
204143
  import_node_fs9 = require("node:fs");
203658
204144
  import_node_path14 = require("node:path");
@@ -204033,7 +204519,7 @@ function createMcpCommand() {
204033
204519
  }
204034
204520
  var import_fs39, import_path39, DEFAULT_SERVER_NAME, defaultApiUrl11;
204035
204521
  var init_mcp = __esm({
204036
- "module_415"() {
204522
+ "module_417"() {
204037
204523
  "use strict";
204038
204524
  init_esm();
204039
204525
  init_source();
@@ -204337,7 +204823,7 @@ Notes:
204337
204823
  }
204338
204824
  var import_fs40, import_path40, import_os25;
204339
204825
  var init_memory2 = __esm({
204340
- "module_416"() {
204826
+ "module_418"() {
204341
204827
  "use strict";
204342
204828
  init_esm();
204343
204829
  init_source();
@@ -204492,7 +204978,7 @@ function parseAgentOutput(output, options = {}) {
204492
204978
  }
204493
204979
  var draftIssueSchema, draftIssueArraySchema, DEFAULT_CHUNK_SIZE, DEFAULT_CHUNK_OVERLAP;
204494
204980
  var init_transcript_processor = __esm({
204495
- "module_417"() {
204981
+ "module_419"() {
204496
204982
  "use strict";
204497
204983
  init_zod();
204498
204984
  draftIssueSchema = external_exports.object({
@@ -204639,7 +205125,7 @@ async function readLocalTranscriptFile(filePath) {
204639
205125
  }
204640
205126
  var import_promises14, import_node_os13, import_node_path15, GoogleDriveService;
204641
205127
  var init_google_drive = __esm({
204642
- "module_418"() {
205128
+ "module_420"() {
204643
205129
  "use strict";
204644
205130
  import_promises14 = require("node:fs/promises");
204645
205131
  import_node_os13 = require("node:os");
@@ -204769,7 +205255,7 @@ async function collectSessionOutput(options) {
204769
205255
  }
204770
205256
  }
204771
205257
  var init_session_output_stream = __esm({
204772
- "module_419"() {
205258
+ "module_421"() {
204773
205259
  "use strict";
204774
205260
  }
204775
205261
  });
@@ -204854,7 +205340,7 @@ async function createIssues(drafts, context2, onProgress) {
204854
205340
  }
204855
205341
  var import_node_child_process7, import_promises15, import_node_os14, import_node_path16, import_node_util2, execFile;
204856
205342
  var init_issue_creator = __esm({
204857
- "module_420"() {
205343
+ "module_422"() {
204858
205344
  "use strict";
204859
205345
  import_node_child_process7 = require("node:child_process");
204860
205346
  import_promises15 = require("node:fs/promises");
@@ -204948,7 +205434,7 @@ async function reviewDraftIssues(transcript, drafts, options = {}) {
204948
205434
  }
204949
205435
  var import_node_readline, import_node_child_process8, import_promises16, import_node_os15, import_node_path17;
204950
205436
  var init_transcript_review = __esm({
204951
- "module_421"() {
205437
+ "module_423"() {
204952
205438
  "use strict";
204953
205439
  import_node_readline = require("node:readline");
204954
205440
  import_node_child_process8 = require("node:child_process");
@@ -205174,7 +205660,7 @@ function createOpsCommand() {
205174
205660
  }
205175
205661
  var import_node_child_process9, import_promises17, DEFAULT_TRANSCRIPT_REPO;
205176
205662
  var init_ops = __esm({
205177
- "module_422"() {
205663
+ "module_424"() {
205178
205664
  "use strict";
205179
205665
  import_node_child_process9 = require("node:child_process");
205180
205666
  import_promises17 = require("node:fs/promises");
@@ -205233,7 +205719,11 @@ async function fetchBusinessOpsDecision(options) {
205233
205719
  });
205234
205720
  const body = await res.json().catch(() => ({}));
205235
205721
  if (!res.ok) {
205236
- throw new Error(String(body.error || `Business Ops Admin agent returned HTTP ${res.status}`));
205722
+ throw new Error(
205723
+ String(
205724
+ body.error || `Business Ops Admin agent returned HTTP ${res.status}`
205725
+ )
205726
+ );
205237
205727
  }
205238
205728
  return body;
205239
205729
  } finally {
@@ -205256,7 +205746,9 @@ function createPolicyCommand() {
205256
205746
  }
205257
205747
  const orgName = config.defaultOrg;
205258
205748
  if (!orgName) {
205259
- console.error(source_default.red("No default organization set. Run: gal auth login"));
205749
+ console.error(
205750
+ source_default.red("No default organization set. Run: gal auth login")
205751
+ );
205260
205752
  process.exit(1);
205261
205753
  }
205262
205754
  const apiUrl = config.apiUrl || defaultApiUrl12;
@@ -205276,15 +205768,25 @@ function createPolicyCommand() {
205276
205768
  console.log(JSON.stringify(data, null, 2));
205277
205769
  } else {
205278
205770
  if (data.policies.length === 0) {
205279
- console.log(source_default.dim("No active policies found for this organization."));
205771
+ console.log(
205772
+ source_default.dim("No active policies found for this organization.")
205773
+ );
205280
205774
  } else {
205281
- console.log(source_default.green(`Pulled ${data.policies.length} active policies:`));
205775
+ console.log(
205776
+ source_default.green(`Pulled ${data.policies.length} active policies:`)
205777
+ );
205282
205778
  console.log();
205283
205779
  for (const p of data.policies) {
205284
- console.log(` ${source_default.bold(p.name)} ${source_default.dim(`(${p.type})`)}`);
205285
- console.log(` Version: ${p.version} Status: ${source_default.green(p.status)}`);
205780
+ console.log(
205781
+ ` ${source_default.bold(p.name)} ${source_default.dim(`(${p.type})`)}`
205782
+ );
205783
+ console.log(
205784
+ ` Version: ${p.version} Status: ${source_default.green(p.status)}`
205785
+ );
205286
205786
  if (p.distributedAt) {
205287
- console.log(` Distributed: ${new Date(p.distributedAt).toLocaleString()}`);
205787
+ console.log(
205788
+ ` Distributed: ${new Date(p.distributedAt).toLocaleString()}`
205789
+ );
205288
205790
  }
205289
205791
  console.log();
205290
205792
  }
@@ -205310,7 +205812,9 @@ function createPolicyCommand() {
205310
205812
  }
205311
205813
  const orgName = config.defaultOrg;
205312
205814
  if (!orgName) {
205313
- console.error(source_default.red("No default organization set. Run: gal auth login"));
205815
+ console.error(
205816
+ source_default.red("No default organization set. Run: gal auth login")
205817
+ );
205314
205818
  process.exit(1);
205315
205819
  }
205316
205820
  const apiUrl = config.apiUrl || defaultApiUrl12;
@@ -205339,7 +205843,9 @@ function createPolicyCommand() {
205339
205843
  console.log(
205340
205844
  ` ${source_default.bold(p.name)} ${source_default.dim(`(${p.type})`)} ${statusColor(p.status)}`
205341
205845
  );
205342
- console.log(` Version: ${p.version} Created by: ${p.createdBy}`);
205846
+ console.log(
205847
+ ` Version: ${p.version} Created by: ${p.createdBy}`
205848
+ );
205343
205849
  console.log();
205344
205850
  }
205345
205851
  }
@@ -205355,7 +205861,23 @@ function createPolicyCommand() {
205355
205861
  process.exit(1);
205356
205862
  }
205357
205863
  });
205358
- command.command("create").description("Create a new agent security policy (admin only)").requiredOption("--name <name>", "Policy name").requiredOption("--description <desc>", "Policy description").option("--allowed-tools <tools>", "Comma-separated allowed tools", "").option("--blocked-tools <tools>", "Comma-separated blocked tools", "").option("--allowed-file-patterns <patterns>", "Comma-separated allowed file patterns", "").option("--blocked-file-patterns <patterns>", "Comma-separated blocked file patterns", "").option("--allowed-domains <domains>", "Comma-separated allowed domains", "").option("--blocked-domains <domains>", "Comma-separated blocked domains", "").option("--priority <n>", "Policy priority (higher overrides lower)", "0").option("--disabled", "Create policy in disabled state").option("--json", "Output as JSON").action(async (options) => {
205864
+ command.command("create").description("Create a new agent security policy (admin only)").requiredOption("--name <name>", "Policy name").requiredOption("--description <desc>", "Policy description").option("--allowed-tools <tools>", "Comma-separated allowed tools", "").option("--blocked-tools <tools>", "Comma-separated blocked tools", "").option(
205865
+ "--allowed-file-patterns <patterns>",
205866
+ "Comma-separated allowed file patterns",
205867
+ ""
205868
+ ).option(
205869
+ "--blocked-file-patterns <patterns>",
205870
+ "Comma-separated blocked file patterns",
205871
+ ""
205872
+ ).option(
205873
+ "--allowed-domains <domains>",
205874
+ "Comma-separated allowed domains",
205875
+ ""
205876
+ ).option(
205877
+ "--blocked-domains <domains>",
205878
+ "Comma-separated blocked domains",
205879
+ ""
205880
+ ).option("--priority <n>", "Policy priority (higher overrides lower)", "0").option("--disabled", "Create policy in disabled state").option("--json", "Output as JSON").action(async (options) => {
205359
205881
  const config = ConfigManager.load();
205360
205882
  const authToken = config.authToken || config.apiKey;
205361
205883
  if (!authToken) {
@@ -205364,7 +205886,9 @@ function createPolicyCommand() {
205364
205886
  }
205365
205887
  const orgName = config.defaultOrg;
205366
205888
  if (!orgName) {
205367
- console.error(source_default.red("No default organization set. Run: gal auth login"));
205889
+ console.error(
205890
+ source_default.red("No default organization set. Run: gal auth login")
205891
+ );
205368
205892
  process.exit(1);
205369
205893
  }
205370
205894
  const apiUrl = config.apiUrl || defaultApiUrl12;
@@ -205405,7 +205929,9 @@ function createPolicyCommand() {
205405
205929
  } else {
205406
205930
  console.log(` ID: ${source_default.bold(data.policy.id)}`);
205407
205931
  console.log(` Name: ${data.policy.name}`);
205408
- console.log(` Enabled: ${data.policy.enabled ? source_default.green("yes") : source_default.yellow("no")}`);
205932
+ console.log(
205933
+ ` Enabled: ${data.policy.enabled ? source_default.green("yes") : source_default.yellow("no")}`
205934
+ );
205409
205935
  }
205410
205936
  } catch (error2) {
205411
205937
  spinner?.stop();
@@ -205418,69 +205944,89 @@ function createPolicyCommand() {
205418
205944
  process.exit(1);
205419
205945
  }
205420
205946
  });
205421
- command.command("update <id>").description("Update an agent security policy (admin only)").requiredOption("--name <name>", "Policy name").requiredOption("--description <desc>", "Policy description").option("--allowed-tools <tools>", "Comma-separated allowed tools", "").option("--blocked-tools <tools>", "Comma-separated blocked tools", "").option("--allowed-file-patterns <patterns>", "Comma-separated allowed file patterns", "").option("--blocked-file-patterns <patterns>", "Comma-separated blocked file patterns", "").option("--allowed-domains <domains>", "Comma-separated allowed domains", "").option("--blocked-domains <domains>", "Comma-separated blocked domains", "").option("--priority <n>", "Policy priority", "0").option("--enabled", "Enable policy").option("--disabled", "Disable policy").option("--json", "Output as JSON").action(async (id, options) => {
205422
- const config = ConfigManager.load();
205423
- const authToken = config.authToken || config.apiKey;
205424
- if (!authToken) {
205425
- console.error(source_default.red("Not authenticated. Run: gal auth login"));
205426
- process.exit(1);
205427
- }
205428
- const orgName = config.defaultOrg;
205429
- if (!orgName) {
205430
- console.error(source_default.red("No default organization set. Run: gal auth login"));
205431
- process.exit(1);
205432
- }
205433
- const apiUrl = config.apiUrl || defaultApiUrl12;
205434
- const spinner = options.json ? null : ora("Updating policy...").start();
205435
- const splitCsv = (val) => {
205436
- if (!val || typeof val !== "string") return [];
205437
- return val.split(",").map((s2) => s2.trim()).filter(Boolean);
205438
- };
205439
- try {
205440
- const enabled = options.disabled ? false : options.enabled ? true : void 0;
205441
- const body = {
205442
- name: options.name,
205443
- description: options.description,
205444
- allowedTools: splitCsv(options.allowedTools),
205445
- blockedTools: splitCsv(options.blockedTools),
205446
- allowedFilePatterns: splitCsv(options.allowedFilePatterns),
205447
- blockedFilePatterns: splitCsv(options.blockedFilePatterns),
205448
- networkRestrictions: {
205449
- allowedDomains: splitCsv(options.allowedDomains),
205450
- blockedDomains: splitCsv(options.blockedDomains)
205451
- },
205452
- priority: parseInt(String(options.priority || "0"), 10),
205453
- ...enabled !== void 0 ? { enabled } : {}
205454
- };
205455
- const res = await fetchWithAuth2(
205456
- `${apiUrl}/organizations/${encodeURIComponent(orgName)}/agent-security-policies/${encodeURIComponent(id)}`,
205457
- authToken,
205458
- "PUT",
205459
- body
205460
- );
205461
- if (!res.ok) {
205462
- const data2 = await res.json().catch(() => ({}));
205463
- throw new Error(data2.error || `HTTP ${res.status}`);
205947
+ command.command("update <id>").description("Update an agent security policy (admin only)").requiredOption("--name <name>", "Policy name").requiredOption("--description <desc>", "Policy description").option("--allowed-tools <tools>", "Comma-separated allowed tools", "").option("--blocked-tools <tools>", "Comma-separated blocked tools", "").option(
205948
+ "--allowed-file-patterns <patterns>",
205949
+ "Comma-separated allowed file patterns",
205950
+ ""
205951
+ ).option(
205952
+ "--blocked-file-patterns <patterns>",
205953
+ "Comma-separated blocked file patterns",
205954
+ ""
205955
+ ).option(
205956
+ "--allowed-domains <domains>",
205957
+ "Comma-separated allowed domains",
205958
+ ""
205959
+ ).option(
205960
+ "--blocked-domains <domains>",
205961
+ "Comma-separated blocked domains",
205962
+ ""
205963
+ ).option("--priority <n>", "Policy priority", "0").option("--enabled", "Enable policy").option("--disabled", "Disable policy").option("--json", "Output as JSON").action(
205964
+ async (id, options) => {
205965
+ const config = ConfigManager.load();
205966
+ const authToken = config.authToken || config.apiKey;
205967
+ if (!authToken) {
205968
+ console.error(source_default.red("Not authenticated. Run: gal auth login"));
205969
+ process.exit(1);
205464
205970
  }
205465
- const data = await res.json();
205466
- spinner?.succeed("Policy updated");
205467
- if (options.json) {
205468
- console.log(JSON.stringify(data, null, 2));
205469
- } else {
205470
- console.log(` ID: ${source_default.bold(data.policy.id)}`);
205471
- console.log(` Name: ${data.policy.name}`);
205971
+ const orgName = config.defaultOrg;
205972
+ if (!orgName) {
205973
+ console.error(
205974
+ source_default.red("No default organization set. Run: gal auth login")
205975
+ );
205976
+ process.exit(1);
205472
205977
  }
205473
- } catch (error2) {
205474
- spinner?.stop();
205475
- const msg = error2 instanceof Error ? error2.message : String(error2);
205476
- if (options.json) {
205477
- console.log(JSON.stringify({ error: msg }));
205478
- } else {
205479
- console.error(source_default.red("Error updating policy:"), msg);
205978
+ const apiUrl = config.apiUrl || defaultApiUrl12;
205979
+ const spinner = options.json ? null : ora("Updating policy...").start();
205980
+ const splitCsv = (val) => {
205981
+ if (!val || typeof val !== "string") return [];
205982
+ return val.split(",").map((s2) => s2.trim()).filter(Boolean);
205983
+ };
205984
+ try {
205985
+ const enabled = options.disabled ? false : options.enabled ? true : void 0;
205986
+ const body = {
205987
+ name: options.name,
205988
+ description: options.description,
205989
+ allowedTools: splitCsv(options.allowedTools),
205990
+ blockedTools: splitCsv(options.blockedTools),
205991
+ allowedFilePatterns: splitCsv(options.allowedFilePatterns),
205992
+ blockedFilePatterns: splitCsv(options.blockedFilePatterns),
205993
+ networkRestrictions: {
205994
+ allowedDomains: splitCsv(options.allowedDomains),
205995
+ blockedDomains: splitCsv(options.blockedDomains)
205996
+ },
205997
+ priority: parseInt(String(options.priority || "0"), 10),
205998
+ ...enabled !== void 0 ? { enabled } : {}
205999
+ };
206000
+ const res = await fetchWithAuth2(
206001
+ `${apiUrl}/organizations/${encodeURIComponent(orgName)}/agent-security-policies/${encodeURIComponent(id)}`,
206002
+ authToken,
206003
+ "PUT",
206004
+ body
206005
+ );
206006
+ if (!res.ok) {
206007
+ const data2 = await res.json().catch(() => ({}));
206008
+ throw new Error(data2.error || `HTTP ${res.status}`);
206009
+ }
206010
+ const data = await res.json();
206011
+ spinner?.succeed("Policy updated");
206012
+ if (options.json) {
206013
+ console.log(JSON.stringify(data, null, 2));
206014
+ } else {
206015
+ console.log(` ID: ${source_default.bold(data.policy.id)}`);
206016
+ console.log(` Name: ${data.policy.name}`);
206017
+ }
206018
+ } catch (error2) {
206019
+ spinner?.stop();
206020
+ const msg = error2 instanceof Error ? error2.message : String(error2);
206021
+ if (options.json) {
206022
+ console.log(JSON.stringify({ error: msg }));
206023
+ } else {
206024
+ console.error(source_default.red("Error updating policy:"), msg);
206025
+ }
206026
+ process.exit(1);
205480
206027
  }
205481
- process.exit(1);
205482
206028
  }
205483
- });
206029
+ );
205484
206030
  command.command("delete <id>").description("Delete an agent security policy (admin only)").option("--json", "Output as JSON").action(async (id, options) => {
205485
206031
  const config = ConfigManager.load();
205486
206032
  const authToken = config.authToken || config.apiKey;
@@ -205490,7 +206036,9 @@ function createPolicyCommand() {
205490
206036
  }
205491
206037
  const orgName = config.defaultOrg;
205492
206038
  if (!orgName) {
205493
- console.error(source_default.red("No default organization set. Run: gal auth login"));
206039
+ console.error(
206040
+ source_default.red("No default organization set. Run: gal auth login")
206041
+ );
205494
206042
  process.exit(1);
205495
206043
  }
205496
206044
  const apiUrl = config.apiUrl || defaultApiUrl12;
@@ -205532,7 +206080,9 @@ function createPolicyCommand() {
205532
206080
  }
205533
206081
  const orgName = config.defaultOrg;
205534
206082
  if (!orgName) {
205535
- console.error(source_default.red("No default organization set. Run: gal auth login"));
206083
+ console.error(
206084
+ source_default.red("No default organization set. Run: gal auth login")
206085
+ );
205536
206086
  process.exit(1);
205537
206087
  }
205538
206088
  const apiUrl = config.apiUrl || defaultApiUrl12;
@@ -205553,10 +206103,14 @@ function createPolicyCommand() {
205553
206103
  } else {
205554
206104
  const p = data.policy || data;
205555
206105
  console.log();
205556
- console.log(` ${source_default.bold(p.name)} ${source_default.dim(`(${p.type || "policy"})`)}`);
206106
+ console.log(
206107
+ ` ${source_default.bold(p.name)} ${source_default.dim(`(${p.type || "policy"})`)}`
206108
+ );
205557
206109
  console.log(` ID: ${source_default.bold(p.id)}`);
205558
206110
  console.log(` Description: ${p.description || ""}`);
205559
- console.log(` Enabled: ${p.enabled ? source_default.green("yes") : source_default.yellow("no")}`);
206111
+ console.log(
206112
+ ` Enabled: ${p.enabled ? source_default.green("yes") : source_default.yellow("no")}`
206113
+ );
205560
206114
  console.log(` Version: ${p.version || "N/A"}`);
205561
206115
  console.log(` Created by: ${p.createdBy || "unknown"}`);
205562
206116
  if (p.allowedTools?.length > 0) {
@@ -205587,7 +206141,9 @@ function createPolicyCommand() {
205587
206141
  }
205588
206142
  const orgName = config.defaultOrg;
205589
206143
  if (!orgName) {
205590
- console.error(source_default.red("No default organization set. Run: gal auth login"));
206144
+ console.error(
206145
+ source_default.red("No default organization set. Run: gal auth login")
206146
+ );
205591
206147
  process.exit(1);
205592
206148
  }
205593
206149
  const apiUrl = config.apiUrl || defaultApiUrl12;
@@ -205608,7 +206164,9 @@ function createPolicyCommand() {
205608
206164
  if (options.json) {
205609
206165
  console.log(JSON.stringify(data, null, 2));
205610
206166
  } else {
205611
- console.log(` Policy ${source_default.bold(id)} is now ${source_default.green("enabled")}.`);
206167
+ console.log(
206168
+ ` Policy ${source_default.bold(id)} is now ${source_default.green("enabled")}.`
206169
+ );
205612
206170
  }
205613
206171
  } catch (error2) {
205614
206172
  spinner?.stop();
@@ -205630,7 +206188,9 @@ function createPolicyCommand() {
205630
206188
  }
205631
206189
  const orgName = config.defaultOrg;
205632
206190
  if (!orgName) {
205633
- console.error(source_default.red("No default organization set. Run: gal auth login"));
206191
+ console.error(
206192
+ source_default.red("No default organization set. Run: gal auth login")
206193
+ );
205634
206194
  process.exit(1);
205635
206195
  }
205636
206196
  const apiUrl = config.apiUrl || defaultApiUrl12;
@@ -205650,7 +206210,9 @@ function createPolicyCommand() {
205650
206210
  if (options.json) {
205651
206211
  console.log(JSON.stringify(data, null, 2));
205652
206212
  } else {
205653
- console.log(` Policy ${source_default.bold(id)} distributed at ${data.distributedAt}`);
206213
+ console.log(
206214
+ ` Policy ${source_default.bold(id)} distributed at ${data.distributedAt}`
206215
+ );
205654
206216
  }
205655
206217
  } catch (error2) {
205656
206218
  spinner?.stop();
@@ -205663,86 +206225,116 @@ function createPolicyCommand() {
205663
206225
  process.exit(1);
205664
206226
  }
205665
206227
  });
205666
- command.command("check").description("Check a product/work-class decision through the Business Ops Admin agent").requiredOption("--product <id>", "Product id, e.g. gal or stratus").requiredOption("--work-class <class>", "Requested work class, e.g. feature_depth or release_integrity").option("--agent-url <url>", "Business Ops Admin agent URL (defaults to GAL_BUSINESS_OPS_AGENT_URL or localhost)").option("--agent-token <token>", "Bearer token for the Business Ops Admin agent").option("--enforcement-mode <mode>", "off, warn, or block (default: GAL_POLICY_ENFORCEMENT_MODE or warn)").option("--json", "Output as JSON").action(async (options) => {
205667
- const enforcementMode = resolveEnforcementMode(options.enforcementMode);
205668
- const agentUrl = resolveBusinessOpsAgentUrl(options.agentUrl);
205669
- const agentToken = options.agentToken || process.env.GAL_BUSINESS_OPS_AGENT_TOKEN || process.env.BUSINESS_OPS_AGENT_TOKEN;
205670
- if (enforcementMode === "off") {
205671
- const payload = {
205672
- schema_version: "gal-policy-check.v1",
205673
- source: "gal-cli",
205674
- checked_at: (/* @__PURE__ */ new Date()).toISOString(),
205675
- enforcement_mode: enforcementMode,
205676
- product_id: options.product,
205677
- requested_work_class: options.workClass,
205678
- decision: "allow",
205679
- decision_reason: "enforcement_off"
205680
- };
205681
- if (options.json) {
205682
- console.log(JSON.stringify(payload, null, 2));
205683
- } else {
205684
- console.log(source_default.yellow("Policy enforcement is off."));
206228
+ command.command("check").description(
206229
+ "Check a product/work-class decision through the Business Ops Admin agent"
206230
+ ).requiredOption("--product <id>", "Product id, e.g. gal or stratus").requiredOption(
206231
+ "--work-class <class>",
206232
+ "Requested work class, e.g. feature_depth or release_integrity"
206233
+ ).option(
206234
+ "--agent-url <url>",
206235
+ "Business Ops Admin agent URL (defaults to GAL_BUSINESS_OPS_AGENT_URL or localhost)"
206236
+ ).option(
206237
+ "--agent-token <token>",
206238
+ "Bearer token for the Business Ops Admin agent"
206239
+ ).option(
206240
+ "--enforcement-mode <mode>",
206241
+ "off, warn, or block (default: GAL_POLICY_ENFORCEMENT_MODE or warn)"
206242
+ ).option("--json", "Output as JSON").action(
206243
+ async (options) => {
206244
+ const enforcementMode = resolveEnforcementMode(options.enforcementMode);
206245
+ const agentUrl = resolveBusinessOpsAgentUrl(options.agentUrl);
206246
+ const agentToken = options.agentToken || process.env.GAL_BUSINESS_OPS_AGENT_TOKEN || process.env.BUSINESS_OPS_AGENT_TOKEN;
206247
+ if (enforcementMode === "off") {
206248
+ const payload = {
206249
+ schema_version: "gal-policy-check.v1",
206250
+ source: "gal-cli",
206251
+ checked_at: (/* @__PURE__ */ new Date()).toISOString(),
206252
+ enforcement_mode: enforcementMode,
206253
+ product_id: options.product,
206254
+ requested_work_class: options.workClass,
206255
+ decision: "allow",
206256
+ decision_reason: "enforcement_off"
206257
+ };
206258
+ if (options.json) {
206259
+ console.log(JSON.stringify(payload, null, 2));
206260
+ } else {
206261
+ console.log(source_default.yellow("Policy enforcement is off."));
206262
+ }
206263
+ return;
205685
206264
  }
205686
- return;
205687
- }
205688
- const spinner = options.json ? null : ora("Checking product policy...").start();
205689
- try {
205690
- const decision = await fetchBusinessOpsDecision({
205691
- agentUrl,
205692
- agentToken,
205693
- product: options.product,
205694
- workClass: options.workClass
205695
- });
205696
- const payload = {
205697
- schema_version: "gal-policy-check.v1",
205698
- source: "gal-cli",
205699
- checked_at: (/* @__PURE__ */ new Date()).toISOString(),
205700
- enforcement_mode: enforcementMode,
205701
- business_ops_agent_url: agentUrl,
205702
- decision
205703
- };
205704
- spinner?.stop();
205705
- if (options.json) {
205706
- console.log(JSON.stringify(payload, null, 2));
205707
- } else {
205708
- const decisionText = String(decision.decision || "warn").toUpperCase();
205709
- const color = decision.decision === "block" ? source_default.red : decision.decision === "allow" ? source_default.green : source_default.yellow;
205710
- console.log(`${color(decisionText)} ${decision.product_id || options.product}`);
205711
- console.log(`Reason: ${decision.decision_reason || "unknown"}`);
205712
- console.log(`Requested work: ${decision.requested_work_class || options.workClass}`);
205713
- console.log(`Recommended work: ${decision.recommended_work_class || "(none)"}`);
205714
- if (decision.priority_class) {
205715
- console.log(`Priority: ${decision.priority_class} ${decision.priority_score ?? ""}`.trim());
206265
+ const spinner = options.json ? null : ora("Checking product policy...").start();
206266
+ try {
206267
+ const decision = await fetchBusinessOpsDecision({
206268
+ agentUrl,
206269
+ agentToken,
206270
+ product: options.product,
206271
+ workClass: options.workClass
206272
+ });
206273
+ const payload = {
206274
+ schema_version: "gal-policy-check.v1",
206275
+ source: "gal-cli",
206276
+ checked_at: (/* @__PURE__ */ new Date()).toISOString(),
206277
+ enforcement_mode: enforcementMode,
206278
+ business_ops_agent_url: agentUrl,
206279
+ decision
206280
+ };
206281
+ spinner?.stop();
206282
+ if (options.json) {
206283
+ console.log(JSON.stringify(payload, null, 2));
206284
+ } else {
206285
+ const decisionText = String(
206286
+ decision.decision || "warn"
206287
+ ).toUpperCase();
206288
+ const color = decision.decision === "block" ? source_default.red : decision.decision === "allow" ? source_default.green : source_default.yellow;
206289
+ console.log(
206290
+ `${color(decisionText)} ${decision.product_id || options.product}`
206291
+ );
206292
+ console.log(`Reason: ${decision.decision_reason || "unknown"}`);
206293
+ console.log(
206294
+ `Requested work: ${decision.requested_work_class || options.workClass}`
206295
+ );
206296
+ console.log(
206297
+ `Recommended work: ${decision.recommended_work_class || "(none)"}`
206298
+ );
206299
+ if (decision.priority_class) {
206300
+ console.log(
206301
+ `Priority: ${decision.priority_class} ${decision.priority_score ?? ""}`.trim()
206302
+ );
206303
+ }
206304
+ const gates = activeGateNames(decision.gates);
206305
+ console.log(`Gates: ${gates.length ? gates.join(",") : "none"}`);
206306
+ if (decision.required_actions?.length) {
206307
+ console.log("Required actions:");
206308
+ for (const action of decision.required_actions)
206309
+ console.log(`- ${action}`);
206310
+ }
205716
206311
  }
205717
- const gates = activeGateNames(decision.gates);
205718
- console.log(`Gates: ${gates.length ? gates.join(",") : "none"}`);
205719
- if (decision.required_actions?.length) {
205720
- console.log("Required actions:");
205721
- for (const action of decision.required_actions) console.log(`- ${action}`);
206312
+ if (decision.decision === "block" && enforcementMode === "block") {
206313
+ process.exit(2);
205722
206314
  }
206315
+ } catch (error2) {
206316
+ spinner?.stop();
206317
+ const msg = error2 instanceof Error ? error2.message : String(error2);
206318
+ const payload = {
206319
+ schema_version: "gal-policy-check.v1",
206320
+ source: "gal-cli",
206321
+ checked_at: (/* @__PURE__ */ new Date()).toISOString(),
206322
+ enforcement_mode: enforcementMode,
206323
+ business_ops_agent_url: agentUrl,
206324
+ error: msg
206325
+ };
206326
+ if (options.json) {
206327
+ console.log(JSON.stringify(payload, null, 2));
206328
+ } else {
206329
+ console.error(
206330
+ source_default.yellow("Could not reach Business Ops Admin agent:"),
206331
+ msg
206332
+ );
206333
+ }
206334
+ if (enforcementMode === "block") process.exit(2);
205723
206335
  }
205724
- if (decision.decision === "block" && enforcementMode === "block") {
205725
- process.exit(2);
205726
- }
205727
- } catch (error2) {
205728
- spinner?.stop();
205729
- const msg = error2 instanceof Error ? error2.message : String(error2);
205730
- const payload = {
205731
- schema_version: "gal-policy-check.v1",
205732
- source: "gal-cli",
205733
- checked_at: (/* @__PURE__ */ new Date()).toISOString(),
205734
- enforcement_mode: enforcementMode,
205735
- business_ops_agent_url: agentUrl,
205736
- error: msg
205737
- };
205738
- if (options.json) {
205739
- console.log(JSON.stringify(payload, null, 2));
205740
- } else {
205741
- console.error(source_default.yellow("Could not reach Business Ops Admin agent:"), msg);
205742
- }
205743
- if (enforcementMode === "block") process.exit(2);
205744
206336
  }
205745
- });
206337
+ );
205746
206338
  command.command("status").description("Show merged effective policy for the organization").option("--json", "Output as JSON").action(async (options) => {
205747
206339
  const config = ConfigManager.load();
205748
206340
  const authToken = config.authToken || config.apiKey;
@@ -205752,7 +206344,9 @@ function createPolicyCommand() {
205752
206344
  }
205753
206345
  const orgName = config.defaultOrg;
205754
206346
  if (!orgName) {
205755
- console.error(source_default.red("No default organization set. Run: gal auth login"));
206347
+ console.error(
206348
+ source_default.red("No default organization set. Run: gal auth login")
206349
+ );
205756
206350
  process.exit(1);
205757
206351
  }
205758
206352
  const apiUrl = config.apiUrl || defaultApiUrl12;
@@ -205769,12 +206363,16 @@ function createPolicyCommand() {
205769
206363
  const data = await res.json();
205770
206364
  spinner?.stop();
205771
206365
  if (options.json) {
205772
- console.log(JSON.stringify({ organization: orgName, ...data }, null, 2));
206366
+ console.log(
206367
+ JSON.stringify({ organization: orgName, ...data }, null, 2)
206368
+ );
205773
206369
  } else {
205774
206370
  const p = data.policy;
205775
206371
  console.log();
205776
206372
  console.log(` Organization: ${source_default.bold(orgName)}`);
205777
- console.log(` Source policies: ${source_default.cyan(String(p.sourcePolicyIds?.length || 0))}`);
206373
+ console.log(
206374
+ ` Source policies: ${source_default.cyan(String(p.sourcePolicyIds?.length || 0))}`
206375
+ );
205778
206376
  console.log(` Merged at: ${p.mergedAt || "N/A"}`);
205779
206377
  console.log();
205780
206378
  if (p.blockedTools?.length > 0) {
@@ -205784,10 +206382,14 @@ function createPolicyCommand() {
205784
206382
  console.log(` Allowed tools: ${p.allowedTools.join(", ")}`);
205785
206383
  }
205786
206384
  if (p.networkRestrictions?.blockedDomains?.length > 0) {
205787
- console.log(` Blocked domains: ${p.networkRestrictions.blockedDomains.join(", ")}`);
206385
+ console.log(
206386
+ ` Blocked domains: ${p.networkRestrictions.blockedDomains.join(", ")}`
206387
+ );
205788
206388
  }
205789
206389
  if (p.networkRestrictions?.allowedDomains?.length > 0) {
205790
- console.log(` Allowed domains: ${p.networkRestrictions.allowedDomains.join(", ")}`);
206390
+ console.log(
206391
+ ` Allowed domains: ${p.networkRestrictions.allowedDomains.join(", ")}`
206392
+ );
205791
206393
  }
205792
206394
  if (!p.blockedTools?.length && !p.allowedTools?.length && !p.networkRestrictions?.blockedDomains?.length) {
205793
206395
  console.log(source_default.dim(" No restrictions configured."));
@@ -205805,11 +206407,320 @@ function createPolicyCommand() {
205805
206407
  process.exit(1);
205806
206408
  }
205807
206409
  });
206410
+ command.command("propose").description("Create a policy proposal from a YAML file").requiredOption("--org <org>", "Organization name").requiredOption("--file <path>", "Path to policy YAML file").option("--json", "Output as JSON").action(async (options) => {
206411
+ const config = ConfigManager.load();
206412
+ const authToken = config.authToken || config.apiKey;
206413
+ if (!authToken) {
206414
+ console.error(source_default.red("Not authenticated. Run: gal auth login"));
206415
+ process.exit(1);
206416
+ }
206417
+ const apiUrl = config.apiUrl || defaultApiUrl12;
206418
+ const spinner = options.json ? null : ora("Reading policy file...").start();
206419
+ try {
206420
+ const fs9 = await import("fs");
206421
+ const path11 = await import("path");
206422
+ if (!fs9.existsSync(options.file)) {
206423
+ spinner?.fail(source_default.red(`File not found: ${options.file}`));
206424
+ process.exit(1);
206425
+ }
206426
+ const yaml = await Promise.resolve().then(() => __toESM(require_dist(), 1));
206427
+ const content = fs9.readFileSync(options.file, "utf-8");
206428
+ const policyData = yaml.parse(content);
206429
+ if (spinner) spinner.text = "Creating policy proposal...";
206430
+ const body = {
206431
+ name: policyData.name,
206432
+ description: policyData.description || "",
206433
+ config: policyData.config || {},
206434
+ isActive: false
206435
+ };
206436
+ if (!body.name) {
206437
+ spinner?.fail(source_default.red("Policy name is required in YAML file"));
206438
+ process.exit(1);
206439
+ }
206440
+ const res = await fetchWithAuth2(
206441
+ `${apiUrl}/organizations/${encodeURIComponent(options.org)}/policies`,
206442
+ authToken,
206443
+ "POST",
206444
+ body
206445
+ );
206446
+ if (!res.ok) {
206447
+ const data2 = await res.json().catch(() => ({}));
206448
+ throw new Error(data2.error || `HTTP ${res.status}`);
206449
+ }
206450
+ const data = await res.json();
206451
+ spinner?.succeed("Policy proposal created");
206452
+ if (options.json) {
206453
+ console.log(JSON.stringify(data, null, 2));
206454
+ } else {
206455
+ console.log(` ID: ${source_default.bold(data.policy.id)}`);
206456
+ console.log(` Name: ${data.policy.name}`);
206457
+ console.log(` Status: ${source_default.yellow("pending approval")}`);
206458
+ console.log();
206459
+ console.log(
206460
+ source_default.dim(
206461
+ " An admin must approve this policy before it becomes active."
206462
+ )
206463
+ );
206464
+ }
206465
+ } catch (error2) {
206466
+ spinner?.stop();
206467
+ const msg = error2 instanceof Error ? error2.message : String(error2);
206468
+ if (options.json) {
206469
+ console.log(JSON.stringify({ error: msg }));
206470
+ } else {
206471
+ console.error(source_default.red("Error creating policy proposal:"), msg);
206472
+ }
206473
+ process.exit(1);
206474
+ }
206475
+ });
206476
+ command.command("reject <id>").description("Reject/delete a policy proposal (admin only)").requiredOption("--org <org>", "Organization name").requiredOption("--reason <reason>", "Reason for rejection").option("--json", "Output as JSON").action(
206477
+ async (id, options) => {
206478
+ const config = ConfigManager.load();
206479
+ const authToken = config.authToken || config.apiKey;
206480
+ if (!authToken) {
206481
+ console.error(source_default.red("Not authenticated. Run: gal auth login"));
206482
+ process.exit(1);
206483
+ }
206484
+ const apiUrl = config.apiUrl || defaultApiUrl12;
206485
+ const spinner = options.json ? null : ora(`Rejecting policy "${id}"...`).start();
206486
+ try {
206487
+ const res = await fetchWithAuth2(
206488
+ `${apiUrl}/organizations/${encodeURIComponent(options.org)}/policies/${encodeURIComponent(id)}`,
206489
+ authToken,
206490
+ "DELETE"
206491
+ );
206492
+ if (!res.ok) {
206493
+ const data2 = await res.json().catch(() => ({}));
206494
+ throw new Error(data2.error || `HTTP ${res.status}`);
206495
+ }
206496
+ const data = await res.json();
206497
+ spinner?.succeed(`Policy "${id}" rejected`);
206498
+ if (options.json) {
206499
+ console.log(
206500
+ JSON.stringify({ ...data, reason: options.reason }, null, 2)
206501
+ );
206502
+ } else {
206503
+ console.log(
206504
+ ` Policy ${source_default.bold(id)} has been ${source_default.red("rejected")}.`
206505
+ );
206506
+ console.log(` Reason: ${options.reason}`);
206507
+ }
206508
+ } catch (error2) {
206509
+ spinner?.stop();
206510
+ const msg = error2 instanceof Error ? error2.message : String(error2);
206511
+ if (options.json) {
206512
+ console.log(JSON.stringify({ error: msg }));
206513
+ } else {
206514
+ console.error(source_default.red("Error rejecting policy:"), msg);
206515
+ }
206516
+ process.exit(1);
206517
+ }
206518
+ }
206519
+ );
206520
+ command.command("enforcement <id>").description("Update policy enforcement mode (admin only)").requiredOption("--org <org>", "Organization name").requiredOption("--mode <mode>", "Enforcement mode: off, warn, or block").option("--json", "Output as JSON").action(
206521
+ async (id, options) => {
206522
+ const mode = options.mode.toLowerCase();
206523
+ if (!["off", "warn", "block"].includes(mode)) {
206524
+ console.error(
206525
+ source_default.red("Invalid mode. Must be: off, warn, or block")
206526
+ );
206527
+ process.exit(1);
206528
+ }
206529
+ const config = ConfigManager.load();
206530
+ const authToken = config.authToken || config.apiKey;
206531
+ if (!authToken) {
206532
+ console.error(source_default.red("Not authenticated. Run: gal auth login"));
206533
+ process.exit(1);
206534
+ }
206535
+ const apiUrl = config.apiUrl || defaultApiUrl12;
206536
+ const spinner = options.json ? null : ora(`Updating enforcement mode...`).start();
206537
+ try {
206538
+ if (mode === "off") {
206539
+ const res = await fetchWithAuth2(
206540
+ `${apiUrl}/organizations/${encodeURIComponent(options.org)}/policies/${encodeURIComponent(id)}`,
206541
+ authToken,
206542
+ "PUT",
206543
+ { enabled: false }
206544
+ );
206545
+ if (!res.ok) {
206546
+ const data2 = await res.json().catch(() => ({}));
206547
+ throw new Error(data2.error || `HTTP ${res.status}`);
206548
+ }
206549
+ const data = await res.json();
206550
+ spinner?.succeed(`Enforcement mode set to ${source_default.gray("off")}`);
206551
+ if (options.json) {
206552
+ console.log(
206553
+ JSON.stringify(
206554
+ { policyId: id, mode: "off", enabled: false },
206555
+ null,
206556
+ 2
206557
+ )
206558
+ );
206559
+ } else {
206560
+ console.log(
206561
+ ` Policy ${source_default.bold(id)} enforcement is now ${source_default.gray("off")}.`
206562
+ );
206563
+ console.log(source_default.dim(" The policy will not be enforced."));
206564
+ }
206565
+ } else if (mode === "block") {
206566
+ const res = await fetchWithAuth2(
206567
+ `${apiUrl}/organizations/${encodeURIComponent(options.org)}/policies/${encodeURIComponent(id)}/activate`,
206568
+ authToken,
206569
+ "POST"
206570
+ );
206571
+ if (!res.ok) {
206572
+ const data = await res.json().catch(() => ({}));
206573
+ throw new Error(data.error || `HTTP ${res.status}`);
206574
+ }
206575
+ spinner?.succeed(`Enforcement mode set to ${source_default.red("block")}`);
206576
+ if (options.json) {
206577
+ console.log(
206578
+ JSON.stringify(
206579
+ { policyId: id, mode: "block", enabled: true },
206580
+ null,
206581
+ 2
206582
+ )
206583
+ );
206584
+ } else {
206585
+ console.log(
206586
+ ` Policy ${source_default.bold(id)} enforcement is now ${source_default.red("block")}.`
206587
+ );
206588
+ console.log(source_default.dim(" Violations will be blocked."));
206589
+ }
206590
+ } else {
206591
+ const res = await fetchWithAuth2(
206592
+ `${apiUrl}/organizations/${encodeURIComponent(options.org)}/policies/${encodeURIComponent(id)}`,
206593
+ authToken,
206594
+ "PUT",
206595
+ { enabled: true }
206596
+ );
206597
+ if (!res.ok) {
206598
+ const data = await res.json().catch(() => ({}));
206599
+ throw new Error(data.error || `HTTP ${res.status}`);
206600
+ }
206601
+ spinner?.succeed(`Enforcement mode set to ${source_default.yellow("warn")}`);
206602
+ if (options.json) {
206603
+ console.log(
206604
+ JSON.stringify(
206605
+ { policyId: id, mode: "warn", enabled: true },
206606
+ null,
206607
+ 2
206608
+ )
206609
+ );
206610
+ } else {
206611
+ console.log(
206612
+ ` Policy ${source_default.bold(id)} enforcement is now ${source_default.yellow("warn")}.`
206613
+ );
206614
+ console.log(
206615
+ source_default.dim(" Violations will be logged but not blocked.")
206616
+ );
206617
+ }
206618
+ }
206619
+ } catch (error2) {
206620
+ spinner?.stop();
206621
+ const msg = error2 instanceof Error ? error2.message : String(error2);
206622
+ if (options.json) {
206623
+ console.log(JSON.stringify({ error: msg }));
206624
+ } else {
206625
+ console.error(source_default.red("Error updating enforcement mode:"), msg);
206626
+ }
206627
+ process.exit(1);
206628
+ }
206629
+ }
206630
+ );
206631
+ command.command("get <id>").description("Get policy details").requiredOption("--org <org>", "Organization name").option("--json", "Output as JSON").action(async (id, options) => {
206632
+ const config = ConfigManager.load();
206633
+ const authToken = config.authToken || config.apiKey;
206634
+ if (!authToken) {
206635
+ console.error(source_default.red("Not authenticated. Run: gal auth login"));
206636
+ process.exit(1);
206637
+ }
206638
+ const apiUrl = config.apiUrl || defaultApiUrl12;
206639
+ const spinner = options.json ? null : ora(`Fetching policy "${id}"...`).start();
206640
+ try {
206641
+ const res = await fetchWithAuth2(
206642
+ `${apiUrl}/organizations/${encodeURIComponent(options.org)}/policies/${encodeURIComponent(id)}`,
206643
+ authToken
206644
+ );
206645
+ if (!res.ok) {
206646
+ const body = await res.json().catch(() => ({}));
206647
+ throw new Error(body.error || `HTTP ${res.status}`);
206648
+ }
206649
+ const data = await res.json();
206650
+ spinner?.stop();
206651
+ if (options.json) {
206652
+ console.log(JSON.stringify(data, null, 2));
206653
+ } else {
206654
+ const p = data.policy || data;
206655
+ console.log();
206656
+ console.log(` ${source_default.bold(p.name)}`);
206657
+ console.log(` ID: ${source_default.bold(p.id)}`);
206658
+ console.log(` Description: ${p.description || "(none)"}`);
206659
+ console.log(
206660
+ ` Active: ${p.isActive ? source_default.green("yes") : source_default.yellow("no")}`
206661
+ );
206662
+ console.log(
206663
+ ` Built-in: ${p.isBuiltin ? source_default.cyan("yes") : "no"}`
206664
+ );
206665
+ console.log(` Created by: ${p.createdBy || "unknown"}`);
206666
+ console.log(` Created at: ${p.createdAt || "N/A"}`);
206667
+ console.log();
206668
+ }
206669
+ } catch (error2) {
206670
+ spinner?.stop();
206671
+ const msg = error2 instanceof Error ? error2.message : String(error2);
206672
+ if (options.json) {
206673
+ console.log(JSON.stringify({ error: msg }));
206674
+ } else {
206675
+ console.error(source_default.red("Error fetching policy:"), msg);
206676
+ }
206677
+ process.exit(1);
206678
+ }
206679
+ });
206680
+ command.command("approve <id>").description("Approve and activate a policy (admin only)").requiredOption("--org <org>", "Organization name").option("--json", "Output as JSON").action(async (id, options) => {
206681
+ const config = ConfigManager.load();
206682
+ const authToken = config.authToken || config.apiKey;
206683
+ if (!authToken) {
206684
+ console.error(source_default.red("Not authenticated. Run: gal auth login"));
206685
+ process.exit(1);
206686
+ }
206687
+ const apiUrl = config.apiUrl || defaultApiUrl12;
206688
+ const spinner = options.json ? null : ora(`Approving policy "${id}"...`).start();
206689
+ try {
206690
+ const res = await fetchWithAuth2(
206691
+ `${apiUrl}/organizations/${encodeURIComponent(options.org)}/policies/${encodeURIComponent(id)}/activate`,
206692
+ authToken,
206693
+ "POST"
206694
+ );
206695
+ if (!res.ok) {
206696
+ const data2 = await res.json().catch(() => ({}));
206697
+ throw new Error(data2.error || `HTTP ${res.status}`);
206698
+ }
206699
+ const data = await res.json();
206700
+ spinner?.succeed(`Policy "${id}" approved and activated`);
206701
+ if (options.json) {
206702
+ console.log(JSON.stringify(data, null, 2));
206703
+ } else {
206704
+ console.log(
206705
+ ` Policy ${source_default.bold(id)} has been ${source_default.green("approved and activated")}.`
206706
+ );
206707
+ }
206708
+ } catch (error2) {
206709
+ spinner?.stop();
206710
+ const msg = error2 instanceof Error ? error2.message : String(error2);
206711
+ if (options.json) {
206712
+ console.log(JSON.stringify({ error: msg }));
206713
+ } else {
206714
+ console.error(source_default.red("Error approving policy:"), msg);
206715
+ }
206716
+ process.exit(1);
206717
+ }
206718
+ });
205808
206719
  return command;
205809
206720
  }
205810
206721
  var defaultApiUrl12, defaultBusinessOpsAgentUrl;
205811
- var init_policy = __esm({
205812
- "module_423"() {
206722
+ var init_policy2 = __esm({
206723
+ "module_425"() {
205813
206724
  "use strict";
205814
206725
  init_esm();
205815
206726
  init_source();
@@ -205975,7 +206886,7 @@ function readDirRecursive(dir, extension) {
205975
206886
  }
205976
206887
  var import_fs41, import_path41, import_os26, import_yaml5;
205977
206888
  var init_config_reader = __esm({
205978
- "module_424"() {
206889
+ "module_426"() {
205979
206890
  "use strict";
205980
206891
  import_fs41 = require("fs");
205981
206892
  import_path41 = require("path");
@@ -206124,7 +207035,7 @@ function createProposeCommand() {
206124
207035
  }
206125
207036
  var import_fs42, import_path42, import_child_process15;
206126
207037
  var init_propose = __esm({
206127
- "module_425"() {
207038
+ "module_427"() {
206128
207039
  "use strict";
206129
207040
  init_esm();
206130
207041
  init_source();
@@ -206314,7 +207225,7 @@ function formatWatchStatus(status) {
206314
207225
  }
206315
207226
  var RecursionGuard;
206316
207227
  var init_protect = __esm({
206317
- "module_426"() {
207228
+ "module_428"() {
206318
207229
  "use strict";
206319
207230
  init_esm();
206320
207231
  init_source();
@@ -206750,7 +207661,7 @@ function formatMinutes(minutes) {
206750
207661
  }
206751
207662
  var fs2, path5, DEFAULT_CONFIG2;
206752
207663
  var init_quality = __esm({
206753
- "module_427"() {
207664
+ "module_429"() {
206754
207665
  "use strict";
206755
207666
  init_esm();
206756
207667
  init_source();
@@ -207065,7 +207976,7 @@ function createCancelCommand() {
207065
207976
  }
207066
207977
  var import_fs43, defaultApiUrl13, PRIORITY_LABELS, PRIORITY_COLORS, STATUS_COLORS;
207067
207978
  var init_queue_mgmt = __esm({
207068
- "module_428"() {
207979
+ "module_430"() {
207069
207980
  "use strict";
207070
207981
  init_esm();
207071
207982
  init_source();
@@ -207506,7 +208417,7 @@ function createQueueCommand() {
207506
208417
  }
207507
208418
  var import_fs44, defaultApiUrl14, GH_API_BASE, DEFAULT_TEMPLATE_BY_LABEL, DEFAULT_TEMPLATE;
207508
208419
  var init_queue_seed = __esm({
207509
- "module_429"() {
208420
+ "module_431"() {
207510
208421
  "use strict";
207511
208422
  init_esm();
207512
208423
  init_source();
@@ -207650,7 +208561,7 @@ function createReportUsageCommand() {
207650
208561
  }
207651
208562
  var defaultApiUrl15, MAX_USAGE_CHUNK_SECONDS;
207652
208563
  var init_report_usage = __esm({
207653
- "module_430"() {
208564
+ "module_432"() {
207654
208565
  "use strict";
207655
208566
  init_esm();
207656
208567
  init_source();
@@ -207796,7 +208707,7 @@ function substituteArguments(commandBody, args2) {
207796
208707
  }
207797
208708
  var import_fs45, import_path43;
207798
208709
  var init_command_parser = __esm({
207799
- "module_431"() {
208710
+ "module_433"() {
207800
208711
  "use strict";
207801
208712
  import_fs45 = require("fs");
207802
208713
  import_path43 = require("path");
@@ -208031,7 +208942,7 @@ function parseCommandArguments(args2) {
208031
208942
  return { positional, flags, combined };
208032
208943
  }
208033
208944
  var init_headless_executor = __esm({
208034
- "module_432"() {
208945
+ "module_434"() {
208035
208946
  "use strict";
208036
208947
  init_command_parser();
208037
208948
  }
@@ -208215,7 +209126,7 @@ Executing command: ${command.name}`));
208215
209126
  }
208216
209127
  var import_os27, import_path44, import_fs46;
208217
209128
  var init_run = __esm({
208218
- "module_433"() {
209129
+ "module_435"() {
208219
209130
  "use strict";
208220
209131
  init_esm();
208221
209132
  init_source();
@@ -208561,7 +209472,7 @@ function createRunDesignCommand() {
208561
209472
  }
208562
209473
  var import_os28, import_path45, import_fs47, DESIGN_PROJECTS_DIR, ACTIVE_FILE, IMAGE_STATUS_ICON, VIDEO_STATUS_ICON;
208563
209474
  var init_run_design = __esm({
208564
- "module_434"() {
209475
+ "module_436"() {
208565
209476
  "use strict";
208566
209477
  init_esm();
208567
209478
  init_source();
@@ -208910,7 +209821,7 @@ function createScanCommand() {
208910
209821
  }
208911
209822
  var import_fs48, import_path46, import_os29, GLOBAL_MEMORY_LOCATIONS, PLATFORM_LABELS, PLATFORM_COLORS;
208912
209823
  var init_scan = __esm({
208913
- "module_435"() {
209824
+ "module_437"() {
208914
209825
  "use strict";
208915
209826
  init_esm();
208916
209827
  init_source();
@@ -209060,7 +209971,7 @@ function listApprovedConfigItems(config, type) {
209060
209971
  }
209061
209972
  var import_node_os16, import_node_path18;
209062
209973
  var init_approved_config_enforcement3 = __esm({
209063
- "module_436"() {
209974
+ "module_438"() {
209064
209975
  "use strict";
209065
209976
  import_node_os16 = require("node:os");
209066
209977
  import_node_path18 = require("node:path");
@@ -209178,7 +210089,7 @@ function createSandboxProfilesCommand() {
209178
210089
  }
209179
210090
  var import_promises18, import_node_path19;
209180
210091
  var init_sandbox_profiles = __esm({
209181
- "module_437"() {
210092
+ "module_439"() {
209182
210093
  "use strict";
209183
210094
  init_esm();
209184
210095
  init_source();
@@ -209208,7 +210119,7 @@ function createSandboxService(config) {
209208
210119
  }
209209
210120
  var import_node_module2, import_meta4, sandboxClass, E2BSandboxService;
209210
210121
  var init_e2b_sandbox = __esm({
209211
- "module_438"() {
210122
+ "module_440"() {
209212
210123
  "use strict";
209213
210124
  import_node_module2 = require("node:module");
209214
210125
  init_source();
@@ -209873,7 +210784,7 @@ async function startInteractiveSession(sandbox) {
209873
210784
  }
209874
210785
  var import_promises19, import_path47;
209875
210786
  var init_sandbox = __esm({
209876
- "module_439"() {
210787
+ "module_441"() {
209877
210788
  "use strict";
209878
210789
  init_esm();
209879
210790
  init_source();
@@ -210550,7 +211461,7 @@ function createSdlcCommand() {
210550
211461
  }
210551
211462
  var import_fs49, import_path48, import_child_process16, IMPL_EXTENSIONS, IGNORE_DIRS, IGNORE_FILES;
210552
211463
  var init_sdlc = __esm({
210553
- "module_440"() {
211464
+ "module_442"() {
210554
211465
  "use strict";
210555
211466
  init_esm();
210556
211467
  init_source();
@@ -210661,7 +211572,7 @@ function createSecurityCommand() {
210661
211572
  }
210662
211573
  var defaultApiUrl16;
210663
211574
  var init_security = __esm({
210664
- "module_441"() {
211575
+ "module_443"() {
210665
211576
  "use strict";
210666
211577
  init_esm();
210667
211578
  init_source();
@@ -210719,7 +211630,7 @@ function removeScrollRegion(write, rows) {
210719
211630
  }
210720
211631
  var ESC, CSI;
210721
211632
  var init_session_status_bar = __esm({
210722
- "module_442"() {
211633
+ "module_444"() {
210723
211634
  "use strict";
210724
211635
  init_source();
210725
211636
  ESC = "\x1B";
@@ -210780,7 +211691,7 @@ function clearOverlay(write, rows, cols) {
210780
211691
  write(output);
210781
211692
  }
210782
211693
  var init_session_overlay = __esm({
210783
- "module_443"() {
211694
+ "module_445"() {
210784
211695
  "use strict";
210785
211696
  init_source();
210786
211697
  init_session_status_bar();
@@ -210936,7 +211847,7 @@ async function runSession(cli, args2) {
210936
211847
  }
210937
211848
  var import_fs50, import_path49, CTRL_G;
210938
211849
  var init_session2 = __esm({
210939
- "module_444"() {
211850
+ "module_446"() {
210940
211851
  "use strict";
210941
211852
  init_esm();
210942
211853
  init_source();
@@ -211324,7 +212235,7 @@ function createStatusCommand3() {
211324
212235
  }
211325
212236
  var import_path50, import_os30, import_fs51, cliVersion6, defaultApiUrl17, PLATFORM_LABELS2, RATE_LIMIT_MS, DRIFT_REPORT_CACHE_PATH;
211326
212237
  var init_status2 = __esm({
211327
- "module_445"() {
212238
+ "module_447"() {
211328
212239
  "use strict";
211329
212240
  init_esm();
211330
212241
  init_source();
@@ -211500,7 +212411,7 @@ Extracted ${files.length} configuration files.`);
211500
212411
  }
211501
212412
  var fs4, path7, DevEnvironmentTemplates;
211502
212413
  var init_template = __esm({
211503
- "module_446"() {
212414
+ "module_448"() {
211504
212415
  "use strict";
211505
212416
  init_esm();
211506
212417
  init_source();
@@ -211983,7 +212894,7 @@ async function startComputerUseServer(config = {}) {
211983
212894
  }
211984
212895
  var import_node_child_process10, import_node_path20, import_mcp2, import_stdio4, SERVER_NAME2, SERVER_VERSION2;
211985
212896
  var init_computer_use_server = __esm({
211986
- "module_447"() {
212897
+ "module_449"() {
211987
212898
  "use strict";
211988
212899
  import_node_child_process10 = require("node:child_process");
211989
212900
  import_node_path20 = require("node:path");
@@ -212018,7 +212929,7 @@ function createComputerUseCommand() {
212018
212929
  }
212019
212930
  var import_path51;
212020
212931
  var init_computer_use = __esm({
212021
- "module_448"() {
212932
+ "module_450"() {
212022
212933
  "use strict";
212023
212934
  init_esm();
212024
212935
  import_path51 = require("path");
@@ -212454,7 +213365,7 @@ async function startTerminalGalServer(config = {}) {
212454
213365
  }
212455
213366
  var import_child_process17, import_crypto11, import_server3, import_stdio5, import_types26, SpawnBasedProcess, TERMINAL_GAL_TOOLS;
212456
213367
  var init_terminal_gal_server = __esm({
212457
- "module_449"() {
213368
+ "module_451"() {
212458
213369
  "use strict";
212459
213370
  import_child_process17 = require("child_process");
212460
213371
  import_crypto11 = require("crypto");
@@ -212676,7 +213587,7 @@ function createTerminalCommand() {
212676
213587
  }
212677
213588
  var import_path52;
212678
213589
  var init_terminal = __esm({
212679
- "module_450"() {
213590
+ "module_452"() {
212680
213591
  "use strict";
212681
213592
  init_esm();
212682
213593
  import_path52 = require("path");
@@ -212807,7 +213718,7 @@ function formatTestResult(result) {
212807
213718
  }
212808
213719
  var GovernanceTestFramework;
212809
213720
  var init_test = __esm({
212810
- "module_451"() {
213721
+ "module_453"() {
212811
213722
  "use strict";
212812
213723
  init_esm();
212813
213724
  init_source();
@@ -213138,7 +214049,7 @@ function parseDuration(input) {
213138
214049
  }
213139
214050
  var fs5, path8, os5, SESSION_FILE, TimeTracker, WorkflowRulesEngine, ComplianceTracker;
213140
214051
  var init_time = __esm({
213141
- "module_452"() {
214052
+ "module_454"() {
213142
214053
  "use strict";
213143
214054
  init_esm();
213144
214055
  init_source();
@@ -213259,7 +214170,7 @@ var init_time = __esm({
213259
214170
  });
213260
214171
 
213261
214172
  var init_types7 = __esm({
213262
- "module_453"() {
214173
+ "module_455"() {
213263
214174
  "use strict";
213264
214175
  }
213265
214176
  });
@@ -213272,7 +214183,7 @@ function getDefaultRegistry() {
213272
214183
  }
213273
214184
  var import_events, import_crypto12, DEFAULT_CONFIG3, TriggerRegistry, defaultRegistry;
213274
214185
  var init_triggers = __esm({
213275
- "module_454"() {
214186
+ "module_456"() {
213276
214187
  "use strict";
213277
214188
  import_events = require("events");
213278
214189
  import_crypto12 = require("crypto");
@@ -213624,7 +214535,7 @@ function getGitHookManager() {
213624
214535
  }
213625
214536
  var import_child_process18, import_fs52, import_path53, DEFAULT_GIT_HOOK_CONFIG, GitHookManager, defaultManager;
213626
214537
  var init_git_hooks = __esm({
213627
- "module_455"() {
214538
+ "module_457"() {
213628
214539
  "use strict";
213629
214540
  import_child_process18 = require("child_process");
213630
214541
  import_fs52 = require("fs");
@@ -213996,7 +214907,7 @@ function getFileWatcher() {
213996
214907
  }
213997
214908
  var import_fs53, import_path54, DEFAULT_FILE_WATCHER_CONFIG, AGENT_CONFIG_PATTERNS, FileWatcher, defaultWatcher;
213998
214909
  var init_file_watcher = __esm({
213999
- "module_456"() {
214910
+ "module_458"() {
214000
214911
  "use strict";
214001
214912
  import_fs53 = require("fs");
214002
214913
  import_path54 = require("path");
@@ -214598,7 +215509,7 @@ Recent Events (${events.length}):
214598
215509
  return command;
214599
215510
  }
214600
215511
  var init_trigger = __esm({
214601
- "module_457"() {
215512
+ "module_459"() {
214602
215513
  "use strict";
214603
215514
  init_esm();
214604
215515
  init_source();
@@ -215061,7 +215972,7 @@ function createUninstallCommand() {
215061
215972
  }
215062
215973
  var import_fs54, import_path55, import_os31, import_readline5;
215063
215974
  var init_uninstall = __esm({
215064
- "module_458"() {
215975
+ "module_460"() {
215065
215976
  "use strict";
215066
215977
  init_esm();
215067
215978
  init_source();
@@ -215286,7 +216197,7 @@ function detectPlatforms2(projectPath2) {
215286
216197
  }
215287
216198
  var fs6, path9, SUPPORTED_PLATFORMS, UNIVERSAL_COMMANDS;
215288
216199
  var init_universal = __esm({
215289
- "module_459"() {
216200
+ "module_461"() {
215290
216201
  "use strict";
215291
216202
  init_esm();
215292
216203
  init_source();
@@ -215708,7 +216619,7 @@ Retry manually with: ${source_default.cyan(installCommand)}`);
215708
216619
  }
215709
216620
  var import_https, import_child_process19, import_fs55, import_path56, import_os32, UPDATE_LOCK_FILE, cliVersion7, REGISTRY_URL;
215710
216621
  var init_update = __esm({
215711
- "module_460"() {
216622
+ "module_462"() {
215712
216623
  "use strict";
215713
216624
  init_esm();
215714
216625
  init_source();
@@ -216316,7 +217227,7 @@ async function batchEmbedContents(apiKey, model, params, requestOptions) {
216316
217227
  }
216317
217228
  var SchemaType, ExecutableCodeLanguage, Outcome, POSSIBLE_ROLES, HarmCategory, HarmBlockThreshold, HarmProbability, BlockReason, FinishReason, TaskType, FunctionCallingMode, DynamicRetrievalMode, GoogleGenerativeAIError, GoogleGenerativeAIResponseError, GoogleGenerativeAIFetchError, GoogleGenerativeAIRequestInputError, GoogleGenerativeAIAbortError, DEFAULT_BASE_URL, DEFAULT_API_VERSION, PACKAGE_VERSION, PACKAGE_LOG_HEADER, Task, RequestUrl, badFinishReasons, responseLineRE, VALID_PART_FIELDS, VALID_PARTS_PER_ROLE, SILENT_ERROR, ChatSession, GenerativeModel, GoogleGenerativeAI;
216318
217229
  var init_dist6 = __esm({
216319
- "module_461"() {
217230
+ "module_463"() {
216320
217231
  (function(SchemaType2) {
216321
217232
  SchemaType2["STRING"] = "string";
216322
217233
  SchemaType2["NUMBER"] = "number";
@@ -217544,7 +218455,7 @@ function dataUriToBuffer(uri) {
217544
218455
  }
217545
218456
  var dist_default;
217546
218457
  var init_dist7 = __esm({
217547
- "module_462"() {
218458
+ "module_464"() {
217548
218459
  dist_default = dataUriToBuffer;
217549
218460
  }
217550
218461
  });
@@ -221824,7 +222735,7 @@ var require_ponyfill_es2018 = __commonJS({
221824
222735
  });
221825
222736
 
221826
222737
  var require_streams2 = __commonJS({
221827
- "module_463"() {
222738
+ "module_465"() {
221828
222739
  var POOL_SIZE2 = 65536;
221829
222740
  if (!globalThis.ReadableStream) {
221830
222741
  try {
@@ -221904,7 +222815,7 @@ async function* toIterator(parts, clone2 = true) {
221904
222815
  }
221905
222816
  var import_streams, POOL_SIZE, _Blob, Blob3, fetch_blob_default;
221906
222817
  var init_fetch_blob = __esm({
221907
- "module_464"() {
222818
+ "module_466"() {
221908
222819
  import_streams = __toESM(require_streams2(), 1);
221909
222820
  POOL_SIZE = 65536;
221910
222821
  _Blob = class Blob2 {
@@ -222073,7 +222984,7 @@ var init_fetch_blob = __esm({
222073
222984
 
222074
222985
  var _File, File3, file_default;
222075
222986
  var init_file = __esm({
222076
- "module_465"() {
222987
+ "module_467"() {
222077
222988
  init_fetch_blob();
222078
222989
  _File = class File2 extends fetch_blob_default {
222079
222990
  #lastModified = 0;
@@ -222129,7 +223040,7 @@ Content-Type: ${v.type || "application/octet-stream"}\r
222129
223040
  }
222130
223041
  var t, i, h, r, m, f, e, x, FormData2;
222131
223042
  var init_esm_min = __esm({
222132
- "module_466"() {
223043
+ "module_468"() {
222133
223044
  init_fetch_blob();
222134
223045
  init_file();
222135
223046
  ({ toStringTag: t, iterator: i, hasInstance: h } = Symbol);
@@ -222212,7 +223123,7 @@ var init_esm_min = __esm({
222212
223123
 
222213
223124
  var FetchBaseError;
222214
223125
  var init_base2 = __esm({
222215
- "module_467"() {
223126
+ "module_469"() {
222216
223127
  FetchBaseError = class extends Error {
222217
223128
  constructor(message, type) {
222218
223129
  super(message);
@@ -222231,7 +223142,7 @@ var init_base2 = __esm({
222231
223142
 
222232
223143
  var FetchError;
222233
223144
  var init_fetch_error = __esm({
222234
- "module_468"() {
223145
+ "module_470"() {
222235
223146
  init_base2();
222236
223147
  FetchError = class extends FetchBaseError {
222237
223148
  /**
@@ -222252,7 +223163,7 @@ var init_fetch_error = __esm({
222252
223163
 
222253
223164
  var NAME, isURLSearchParameters, isBlob, isAbortSignal, isDomainOrSubdomain, isSameProtocol;
222254
223165
  var init_is = __esm({
222255
- "module_469"() {
223166
+ "module_471"() {
222256
223167
  NAME = Symbol.toStringTag;
222257
223168
  isURLSearchParameters = (object) => {
222258
223169
  return typeof object === "object" && typeof object.append === "function" && typeof object.delete === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.has === "function" && typeof object.set === "function" && typeof object.sort === "function" && object[NAME] === "URLSearchParams";
@@ -222292,7 +223203,7 @@ var require_node_domexception = __commonJS({
222292
223203
 
222293
223204
  var import_node_fs10, import_node_path21, import_node_domexception, stat6, blobFromSync, blobFrom, fileFrom, fileFromSync, fromBlob, fromFile, BlobDataItem;
222294
223205
  var init_from = __esm({
222295
- "module_470"() {
223206
+ "module_472"() {
222296
223207
  import_node_fs10 = require("node:fs");
222297
223208
  import_node_path21 = require("node:path");
222298
223209
  import_node_domexception = __toESM(require_node_domexception(), 1);
@@ -222446,7 +223357,7 @@ async function toFormData(Body2, ct) {
222446
223357
  }
222447
223358
  var s, S, f2, F, LF, CR, SPACE, HYPHEN, COLON, A, Z, lower, noop, MultipartParser;
222448
223359
  var init_multipart_parser = __esm({
222449
- "module_471"() {
223360
+ "module_473"() {
222450
223361
  init_from();
222451
223362
  init_esm_min();
222452
223363
  s = 0;
@@ -222760,7 +223671,7 @@ async function consumeBody(data) {
222760
223671
  }
222761
223672
  var import_node_stream, import_node_util3, import_node_buffer, pipeline3, INTERNALS, Body, clone, getNonSpecFormDataBoundary, extractContentType, getTotalBytes, writeToStream;
222762
223673
  var init_body = __esm({
222763
- "module_472"() {
223674
+ "module_474"() {
222764
223675
  import_node_stream = __toESM(require("node:stream"), 1);
222765
223676
  import_node_util3 = require("node:util");
222766
223677
  import_node_buffer = require("node:buffer");
@@ -222991,7 +223902,7 @@ function fromRawHeaders(headers = []) {
222991
223902
  }
222992
223903
  var import_node_util4, import_node_http, validateHeaderName, validateHeaderValue, Headers2;
222993
223904
  var init_headers = __esm({
222994
- "module_473"() {
223905
+ "module_475"() {
222995
223906
  import_node_util4 = require("node:util");
222996
223907
  import_node_http = __toESM(require("node:http"), 1);
222997
223908
  validateHeaderName = typeof import_node_http.default.validateHeaderName === "function" ? import_node_http.default.validateHeaderName : (name) => {
@@ -223163,7 +224074,7 @@ var init_headers = __esm({
223163
224074
 
223164
224075
  var redirectStatus, isRedirect;
223165
224076
  var init_is_redirect = __esm({
223166
- "module_474"() {
224077
+ "module_476"() {
223167
224078
  redirectStatus = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]);
223168
224079
  isRedirect = (code) => {
223169
224080
  return redirectStatus.has(code);
@@ -223173,7 +224084,7 @@ var init_is_redirect = __esm({
223173
224084
 
223174
224085
  var INTERNALS2, Response2;
223175
224086
  var init_response = __esm({
223176
- "module_475"() {
224087
+ "module_477"() {
223177
224088
  init_headers();
223178
224089
  init_body();
223179
224090
  init_is_redirect();
@@ -223298,7 +224209,7 @@ var init_response = __esm({
223298
224209
 
223299
224210
  var getSearch;
223300
224211
  var init_get_search = __esm({
223301
- "module_476"() {
224212
+ "module_478"() {
223302
224213
  getSearch = (parsedURL) => {
223303
224214
  if (parsedURL.search) {
223304
224215
  return parsedURL.search;
@@ -223437,7 +224348,7 @@ function parseReferrerPolicyFromHeader(headers) {
223437
224348
  }
223438
224349
  var import_node_net, ReferrerPolicy, DEFAULT_REFERRER_POLICY;
223439
224350
  var init_referrer = __esm({
223440
- "module_477"() {
224351
+ "module_479"() {
223441
224352
  import_node_net = require("node:net");
223442
224353
  ReferrerPolicy = /* @__PURE__ */ new Set([
223443
224354
  "",
@@ -223456,7 +224367,7 @@ var init_referrer = __esm({
223456
224367
 
223457
224368
  var import_node_url2, import_node_util5, INTERNALS3, isRequest, doBadDataWarn, Request, getNodeRequestOptions;
223458
224369
  var init_request = __esm({
223459
- "module_478"() {
224370
+ "module_480"() {
223460
224371
  import_node_url2 = require("node:url");
223461
224372
  import_node_util5 = require("node:util");
223462
224373
  init_headers();
@@ -223660,7 +224571,7 @@ var init_request = __esm({
223660
224571
 
223661
224572
  var AbortError;
223662
224573
  var init_abort_error = __esm({
223663
- "module_479"() {
224574
+ "module_481"() {
223664
224575
  init_base2();
223665
224576
  AbortError = class extends FetchBaseError {
223666
224577
  constructor(message, type = "aborted") {
@@ -223950,7 +224861,7 @@ function fixResponseChunkedTransferBadEnding(request, errorCallback) {
223950
224861
  }
223951
224862
  var import_node_http2, import_node_https3, import_node_zlib, import_node_stream2, import_node_buffer2, supportedSchemas;
223952
224863
  var init_src5 = __esm({
223953
- "module_480"() {
224864
+ "module_482"() {
223954
224865
  import_node_http2 = __toESM(require("node:http"), 1);
223955
224866
  import_node_https3 = __toESM(require("node:https"), 1);
223956
224867
  import_node_zlib = __toESM(require("node:zlib"), 1);
@@ -238471,7 +239382,7 @@ async function startVisionGalServer(options = {}) {
238471
239382
  }
238472
239383
  var import_node_fs11, import_node_path22, import_vertexai, import_mcp3, import_stdio6, SERVER_NAME3, SERVER_VERSION3, MAX_VIDEO_SIZE_MB;
238473
239384
  var init_vision_gal_server = __esm({
238474
- "module_481"() {
239385
+ "module_483"() {
238475
239386
  "use strict";
238476
239387
  import_node_fs11 = require("node:fs");
238477
239388
  import_node_path22 = require("node:path");
@@ -238502,7 +239413,7 @@ function createVisionCommand() {
238502
239413
  }
238503
239414
  var import_path57;
238504
239415
  var init_vision = __esm({
238505
- "module_482"() {
239416
+ "module_484"() {
238506
239417
  "use strict";
238507
239418
  init_esm();
238508
239419
  import_path57 = require("path");
@@ -238881,7 +239792,7 @@ async function startVscodeGalServer(config = {}) {
238881
239792
  }
238882
239793
  var import_child_process20, import_fs56, import_path58, import_os33, import_server4, import_stdio7, import_types27, VSCODE_GAL_TOOLS;
238883
239794
  var init_vscode_gal_server = __esm({
238884
- "module_483"() {
239795
+ "module_485"() {
238885
239796
  "use strict";
238886
239797
  import_child_process20 = require("child_process");
238887
239798
  import_fs56 = require("fs");
@@ -238999,7 +239910,7 @@ function createVscodeCommand() {
238999
239910
  }
239000
239911
  var import_path59;
239001
239912
  var init_vscode = __esm({
239002
- "module_484"() {
239913
+ "module_486"() {
239003
239914
  "use strict";
239004
239915
  init_esm();
239005
239916
  import_path59 = require("path");
@@ -239475,7 +240386,7 @@ ${source_default.dim(`Claim: gal work claim ${item.id.slice(0, 8)}`)}`);
239475
240386
  }
239476
240387
  var defaultApiUrl18, PRIORITY_COLORS2, STATUS_COLORS2;
239477
240388
  var init_work = __esm({
239478
- "module_485"() {
240389
+ "module_487"() {
239479
240390
  "use strict";
239480
240391
  init_esm();
239481
240392
  init_source();
@@ -239676,7 +240587,7 @@ function displayTestResult(result) {
239676
240587
  }
239677
240588
  var import_promises20, import_path60, defaultApiUrl19;
239678
240589
  var init_workflow2 = __esm({
239679
- "module_486"() {
240590
+ "module_488"() {
239680
240591
  "use strict";
239681
240592
  init_esm();
239682
240593
  init_source();
@@ -239863,7 +240774,7 @@ function createWorkspaceCommand() {
239863
240774
  return command;
239864
240775
  }
239865
240776
  var init_workspace6 = __esm({
239866
- "module_487"() {
240777
+ "module_489"() {
239867
240778
  "use strict";
239868
240779
  init_esm();
239869
240780
  init_source();
@@ -239873,7 +240784,7 @@ var init_workspace6 = __esm({
239873
240784
 
239874
240785
  var COMMAND_FACTORIES;
239875
240786
  var init_command_registry = __esm({
239876
- "module_488"() {
240787
+ "module_490"() {
239877
240788
  "use strict";
239878
240789
  init_admin();
239879
240790
  init_agent();
@@ -239906,7 +240817,7 @@ var init_command_registry = __esm({
239906
240817
  init_mcp();
239907
240818
  init_memory2();
239908
240819
  init_ops();
239909
- init_policy();
240820
+ init_policy2();
239910
240821
  init_propose();
239911
240822
  init_protect();
239912
240823
  init_quality();
@@ -240013,7 +240924,7 @@ function printBranding() {
240013
240924
  }
240014
240925
  var cliVersion8;
240015
240926
  var init_branding = __esm({
240016
- "module_489"() {
240927
+ "module_491"() {
240017
240928
  "use strict";
240018
240929
  init_source();
240019
240930
  init_constants();
@@ -240422,7 +241333,7 @@ function getRequestedCommand(argv) {
240422
241333
  }
240423
241334
  var import_dotenv, import_https2, import_readline6, import_child_process21, import_fs57, import_path61, import_os34, originalEmit, cliVersion9, isHiddenMcpEntrypoint, isHookEntrypoint, isMachineReadableEntrypoint, fatalErrorHandled, UPDATE_CACHE_DIR, UPDATE_CACHE_FILE, ONE_DAY, REGISTRY_URL2, REGISTRY_HOST, sessionStartTime, isReadOnlyStatusCommand, isMachineMode, exitHooksRan, featureFlags, knownCommands, isKnownCommand, program2, allInternalFlags;
240424
241335
  var init_index = __esm({
240425
- "module_490"() {
241336
+ "module_492"() {
240426
241337
  "use strict";
240427
241338
  init_esm();
240428
241339
  import_dotenv = __toESM(require_main(), 1);
@@ -240649,7 +241560,7 @@ var init_index = __esm({
240649
241560
  }
240650
241561
  });
240651
241562
 
240652
- var cliVersion10 = true ? "0.0.668" : "0.0.0-dev";
241563
+ var cliVersion10 = true ? "0.1.62" : "0.0.0-dev";
240653
241564
  var args = process.argv.slice(2);
240654
241565
  var requestedGlobalHelp = args.length === 1 && (args[0] === "--help" || args[0] === "-h");
240655
241566
  var requestedVersion = args.length === 1 && (args[0] === "--version" || args[0] === "-V");