@codedrifters/configulator 0.0.166 → 0.0.168

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -678,7 +678,7 @@ const project = new MonorepoProject({
678
678
  name: 'my-monorepo',
679
679
  pnpmOptions: {
680
680
  pnpmWorkspaceOptions: {
681
- minimumReleaseAge: MIMIMUM_RELEASE_AGE.ONE_DAY,
681
+ minimumReleaseAge: MINIMUM_RELEASE_AGE.ONE_DAY,
682
682
  minimumReleaseAgeExclude: ['@codedrifters/*'],
683
683
  onlyBuiltDependencies: ['@swc/core', 'esbuild'],
684
684
  defaultCatalog: {
package/lib/index.d.mts CHANGED
@@ -394,6 +394,15 @@ interface AgentRuleBundle {
394
394
  readonly skills?: ReadonlyArray<AgentSkill>;
395
395
  /** Sub-agents included in this bundle. */
396
396
  readonly subAgents?: ReadonlyArray<AgentSubAgent>;
397
+ /**
398
+ * Claude Code permission entries contributed by this bundle.
399
+ * Allow and deny entries are merged with the default and user-supplied
400
+ * permissions when the bundle is active.
401
+ */
402
+ readonly claudePermissions?: {
403
+ readonly allow?: ReadonlyArray<string>;
404
+ readonly deny?: ReadonlyArray<string>;
405
+ };
397
406
  }
398
407
  /*******************************************************************************
399
408
  *
@@ -815,6 +824,13 @@ declare class AgentConfig extends Component {
815
824
  * Find the AgentConfig component on a project.
816
825
  */
817
826
  static of(project: Project$1): AgentConfig | undefined;
827
+ /**
828
+ * Merges default Claude permissions with bundle and user-supplied settings.
829
+ *
830
+ * Merge order: defaults → bundle permissions → user-supplied entries.
831
+ * `defaultMode` defaults to `"dontAsk"` unless overridden.
832
+ */
833
+ private static mergeClaudeDefaults;
818
834
  private readonly options;
819
835
  constructor(project: Project$1, options?: AgentConfigOptions);
820
836
  preSynthesize(): void;
@@ -835,6 +851,10 @@ declare class AgentConfig extends Component {
835
851
  * Resolves template variables in sub-agent prompts using project metadata.
836
852
  */
837
853
  private resolveSubAgentTemplates;
854
+ /**
855
+ * Collects Claude permission entries from all active bundles.
856
+ */
857
+ private resolveBundlePermissions;
838
858
  }
839
859
 
840
860
  /**
@@ -1618,7 +1638,7 @@ declare class JsiiFaker extends Component {
1618
1638
  /**
1619
1639
  * Predefined minimum release age values in minutes.
1620
1640
  */
1621
- declare const MIMIMUM_RELEASE_AGE: {
1641
+ declare const MINIMUM_RELEASE_AGE: {
1622
1642
  ZERO_DAYS: number;
1623
1643
  ONE_HOUR: number;
1624
1644
  SIX_HOURS: number;
@@ -1651,9 +1671,9 @@ interface PnpmWorkspaceOptions {
1651
1671
  *
1652
1672
  * See: https://pnpm.io/settings#minimumreleaseage
1653
1673
  *
1654
- * @default MIMIMUM_RELEASE_AGE.ONE_DAY
1674
+ * @default MINIMUM_RELEASE_AGE.ONE_DAY
1655
1675
  */
1656
- readonly minimumReleaseAge?: ValueOf<typeof MIMIMUM_RELEASE_AGE>;
1676
+ readonly minimumReleaseAge?: ValueOf<typeof MINIMUM_RELEASE_AGE>;
1657
1677
  /**
1658
1678
  * If you set minimumReleaseAge but need certain dependencies to always
1659
1679
  * install the newest version immediately, you can list them under
@@ -1791,7 +1811,7 @@ declare class PnpmWorkspace extends Component {
1791
1811
  *
1792
1812
  * See: https://pnpm.io/settings#minimumreleaseage
1793
1813
  */
1794
- minimumReleaseAge: ValueOf<typeof MIMIMUM_RELEASE_AGE>;
1814
+ minimumReleaseAge: ValueOf<typeof MINIMUM_RELEASE_AGE>;
1795
1815
  /**
1796
1816
  * If you set minimumReleaseAge but need certain dependencies to always
1797
1817
  * install the newest version immediately, you can list them under
@@ -1857,6 +1877,22 @@ declare class PnpmWorkspace extends Component {
1857
1877
  };
1858
1878
  constructor(project: Project$1, options?: PnpmWorkspaceOptions);
1859
1879
  }
1880
+ /**
1881
+ * @deprecated Use `MINIMUM_RELEASE_AGE` instead. This alias will be removed in a future major release.
1882
+ */
1883
+ declare const MIMIMUM_RELEASE_AGE: {
1884
+ ZERO_DAYS: number;
1885
+ ONE_HOUR: number;
1886
+ SIX_HOURS: number;
1887
+ TWELVE_HOURS: number;
1888
+ ONE_DAY: number;
1889
+ TWO_DAYS: number;
1890
+ THREE_DAYS: number;
1891
+ FOUR_DAYS: number;
1892
+ FIVE_DAYS: number;
1893
+ SIX_DAYS: number;
1894
+ ONE_WEEK: number;
1895
+ };
1860
1896
 
1861
1897
  /*******************************************************************************
1862
1898
  *
@@ -2798,4 +2834,4 @@ declare const COMPLETE_JOB_ID = "complete";
2798
2834
  */
2799
2835
  declare function addBuildCompleteJob(buildWorkflow: BuildWorkflow): void;
2800
2836
 
2801
- export { AGENT_MODEL, AGENT_PLATFORM, AGENT_RULE_SCOPE, AgentConfig, type AgentConfigOptions, type AgentModel, type AgentPlatform, type AgentPlatformOverrides, type AgentRule, type AgentRuleBundle, type AgentRuleScope, type AgentSkill, type AgentSubAgent, type AgentSubAgentPlatformOverrides, type ApproveMergeUpgradeOptions, type AwsAccount, AwsDeployWorkflow, AwsDeploymentConfig, AwsDeploymentTarget, type AwsDeploymentTargetOptions, type AwsLocalDeploymentConfig, type AwsOrganization, type AwsRegion, BUILT_IN_BUNDLES, CLAUDE_RULE_TARGET, COMPLETE_JOB_ID, type CiDeploymentConfig, type ClassTypeOptions, type ClaudeAutoModeConfig, type ClaudeHookAction, type ClaudeHookEntry, type ClaudeHooksConfig, type ClaudePermissionsConfig, type ClaudeRuleTarget, type ClaudeSandboxConfig, type ClaudeSettingsConfig, type CopilotHandoff, type CursorHookAction, type CursorHooksConfig, type CursorSettingsConfig, type DeployWorkflowOptions, type DeploymentMetadata, type GitBranch, type GitHubBoardMetadata, type GitHubProjectMetadata, type GitHubSprintMetadata, type IDependencyResolver, JsiiFaker, MCP_TRANSPORT, MERGE_METHODS, MIMIMUM_RELEASE_AGE, type McpServerConfig, type McpTransport, type MergeMethod, MonorepoProject, type MonorepoProjectOptions, type OrganizationMetadata, PROD_DEPLOY_NAME, PnpmWorkspace, type PnpmWorkspaceOptions, ProjectMetadata, type ProjectMetadataOptions, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, type RemoteCacheOptions, type RepositoryMetadata, ResetTask, type ResetTaskOptions, type ResolvedProjectMetadata, type SlackMetadata, type TemplateResolveResult, TestRunner, TurboRepo, type TurboRepoOptions, TurboRepoTask, type TurboRepoTaskOptions, TypeScriptConfig, TypeScriptProject, type TypeScriptProjectOptions, VERSION, VERSION_KEYS_SKIP, VERSION_NPM_PACKAGES, VSCodeConfig, type VersionKey, Vitest, type VitestConfigOptions, type VitestOptions, addApproveMergeUpgradeWorkflow, addBuildCompleteJob, awsCdkBundle, baseBundle, getLatestEligibleVersion, githubWorkflowBundle, jestBundle, pnpmBundle, projenBundle, resolveTemplateVariables, turborepoBundle, typescriptBundle, vitestBundle };
2837
+ export { AGENT_MODEL, AGENT_PLATFORM, AGENT_RULE_SCOPE, AgentConfig, type AgentConfigOptions, type AgentModel, type AgentPlatform, type AgentPlatformOverrides, type AgentRule, type AgentRuleBundle, type AgentRuleScope, type AgentSkill, type AgentSubAgent, type AgentSubAgentPlatformOverrides, type ApproveMergeUpgradeOptions, type AwsAccount, AwsDeployWorkflow, AwsDeploymentConfig, AwsDeploymentTarget, type AwsDeploymentTargetOptions, type AwsLocalDeploymentConfig, type AwsOrganization, type AwsRegion, BUILT_IN_BUNDLES, CLAUDE_RULE_TARGET, COMPLETE_JOB_ID, type CiDeploymentConfig, type ClassTypeOptions, type ClaudeAutoModeConfig, type ClaudeHookAction, type ClaudeHookEntry, type ClaudeHooksConfig, type ClaudePermissionsConfig, type ClaudeRuleTarget, type ClaudeSandboxConfig, type ClaudeSettingsConfig, type CopilotHandoff, type CursorHookAction, type CursorHooksConfig, type CursorSettingsConfig, type DeployWorkflowOptions, type DeploymentMetadata, type GitBranch, type GitHubBoardMetadata, type GitHubProjectMetadata, type GitHubSprintMetadata, type IDependencyResolver, JsiiFaker, MCP_TRANSPORT, MERGE_METHODS, MIMIMUM_RELEASE_AGE, MINIMUM_RELEASE_AGE, type McpServerConfig, type McpTransport, type MergeMethod, MonorepoProject, type MonorepoProjectOptions, type OrganizationMetadata, PROD_DEPLOY_NAME, PnpmWorkspace, type PnpmWorkspaceOptions, ProjectMetadata, type ProjectMetadataOptions, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, type RemoteCacheOptions, type RepositoryMetadata, ResetTask, type ResetTaskOptions, type ResolvedProjectMetadata, type SlackMetadata, type TemplateResolveResult, TestRunner, TurboRepo, type TurboRepoOptions, TurboRepoTask, type TurboRepoTaskOptions, TypeScriptConfig, TypeScriptProject, type TypeScriptProjectOptions, VERSION, VERSION_KEYS_SKIP, VERSION_NPM_PACKAGES, VSCodeConfig, type VersionKey, Vitest, type VitestConfigOptions, type VitestOptions, addApproveMergeUpgradeWorkflow, addBuildCompleteJob, awsCdkBundle, baseBundle, getLatestEligibleVersion, githubWorkflowBundle, jestBundle, pnpmBundle, projenBundle, resolveTemplateVariables, turborepoBundle, typescriptBundle, vitestBundle };
package/lib/index.d.ts CHANGED
@@ -443,6 +443,15 @@ interface AgentRuleBundle {
443
443
  readonly skills?: ReadonlyArray<AgentSkill>;
444
444
  /** Sub-agents included in this bundle. */
445
445
  readonly subAgents?: ReadonlyArray<AgentSubAgent>;
446
+ /**
447
+ * Claude Code permission entries contributed by this bundle.
448
+ * Allow and deny entries are merged with the default and user-supplied
449
+ * permissions when the bundle is active.
450
+ */
451
+ readonly claudePermissions?: {
452
+ readonly allow?: ReadonlyArray<string>;
453
+ readonly deny?: ReadonlyArray<string>;
454
+ };
446
455
  }
447
456
  /*******************************************************************************
448
457
  *
@@ -864,6 +873,13 @@ declare class AgentConfig extends Component {
864
873
  * Find the AgentConfig component on a project.
865
874
  */
866
875
  static of(project: Project): AgentConfig | undefined;
876
+ /**
877
+ * Merges default Claude permissions with bundle and user-supplied settings.
878
+ *
879
+ * Merge order: defaults → bundle permissions → user-supplied entries.
880
+ * `defaultMode` defaults to `"dontAsk"` unless overridden.
881
+ */
882
+ private static mergeClaudeDefaults;
867
883
  private readonly options;
868
884
  constructor(project: Project, options?: AgentConfigOptions);
869
885
  preSynthesize(): void;
@@ -884,6 +900,10 @@ declare class AgentConfig extends Component {
884
900
  * Resolves template variables in sub-agent prompts using project metadata.
885
901
  */
886
902
  private resolveSubAgentTemplates;
903
+ /**
904
+ * Collects Claude permission entries from all active bundles.
905
+ */
906
+ private resolveBundlePermissions;
887
907
  }
888
908
 
889
909
  /**
@@ -1667,7 +1687,7 @@ declare class JsiiFaker extends Component {
1667
1687
  /**
1668
1688
  * Predefined minimum release age values in minutes.
1669
1689
  */
1670
- declare const MIMIMUM_RELEASE_AGE: {
1690
+ declare const MINIMUM_RELEASE_AGE: {
1671
1691
  ZERO_DAYS: number;
1672
1692
  ONE_HOUR: number;
1673
1693
  SIX_HOURS: number;
@@ -1700,9 +1720,9 @@ interface PnpmWorkspaceOptions {
1700
1720
  *
1701
1721
  * See: https://pnpm.io/settings#minimumreleaseage
1702
1722
  *
1703
- * @default MIMIMUM_RELEASE_AGE.ONE_DAY
1723
+ * @default MINIMUM_RELEASE_AGE.ONE_DAY
1704
1724
  */
1705
- readonly minimumReleaseAge?: ValueOf<typeof MIMIMUM_RELEASE_AGE>;
1725
+ readonly minimumReleaseAge?: ValueOf<typeof MINIMUM_RELEASE_AGE>;
1706
1726
  /**
1707
1727
  * If you set minimumReleaseAge but need certain dependencies to always
1708
1728
  * install the newest version immediately, you can list them under
@@ -1840,7 +1860,7 @@ declare class PnpmWorkspace extends Component {
1840
1860
  *
1841
1861
  * See: https://pnpm.io/settings#minimumreleaseage
1842
1862
  */
1843
- minimumReleaseAge: ValueOf<typeof MIMIMUM_RELEASE_AGE>;
1863
+ minimumReleaseAge: ValueOf<typeof MINIMUM_RELEASE_AGE>;
1844
1864
  /**
1845
1865
  * If you set minimumReleaseAge but need certain dependencies to always
1846
1866
  * install the newest version immediately, you can list them under
@@ -1906,6 +1926,22 @@ declare class PnpmWorkspace extends Component {
1906
1926
  };
1907
1927
  constructor(project: Project, options?: PnpmWorkspaceOptions);
1908
1928
  }
1929
+ /**
1930
+ * @deprecated Use `MINIMUM_RELEASE_AGE` instead. This alias will be removed in a future major release.
1931
+ */
1932
+ declare const MIMIMUM_RELEASE_AGE: {
1933
+ ZERO_DAYS: number;
1934
+ ONE_HOUR: number;
1935
+ SIX_HOURS: number;
1936
+ TWELVE_HOURS: number;
1937
+ ONE_DAY: number;
1938
+ TWO_DAYS: number;
1939
+ THREE_DAYS: number;
1940
+ FOUR_DAYS: number;
1941
+ FIVE_DAYS: number;
1942
+ SIX_DAYS: number;
1943
+ ONE_WEEK: number;
1944
+ };
1909
1945
 
1910
1946
  /*******************************************************************************
1911
1947
  *
@@ -2847,5 +2883,5 @@ declare const COMPLETE_JOB_ID = "complete";
2847
2883
  */
2848
2884
  declare function addBuildCompleteJob(buildWorkflow: BuildWorkflow): void;
2849
2885
 
2850
- export { AGENT_MODEL, AGENT_PLATFORM, AGENT_RULE_SCOPE, AgentConfig, AwsDeployWorkflow, AwsDeploymentConfig, AwsDeploymentTarget, BUILT_IN_BUNDLES, CLAUDE_RULE_TARGET, COMPLETE_JOB_ID, JsiiFaker, MCP_TRANSPORT, MERGE_METHODS, MIMIMUM_RELEASE_AGE, MonorepoProject, PROD_DEPLOY_NAME, PnpmWorkspace, ProjectMetadata, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, ResetTask, TestRunner, TurboRepo, TurboRepoTask, TypeScriptConfig, TypeScriptProject, VERSION, VERSION_KEYS_SKIP, VERSION_NPM_PACKAGES, VSCodeConfig, Vitest, addApproveMergeUpgradeWorkflow, addBuildCompleteJob, awsCdkBundle, baseBundle, getLatestEligibleVersion, githubWorkflowBundle, jestBundle, pnpmBundle, projenBundle, resolveTemplateVariables, turborepoBundle, typescriptBundle, vitestBundle };
2886
+ export { AGENT_MODEL, AGENT_PLATFORM, AGENT_RULE_SCOPE, AgentConfig, AwsDeployWorkflow, AwsDeploymentConfig, AwsDeploymentTarget, BUILT_IN_BUNDLES, CLAUDE_RULE_TARGET, COMPLETE_JOB_ID, JsiiFaker, MCP_TRANSPORT, MERGE_METHODS, MIMIMUM_RELEASE_AGE, MINIMUM_RELEASE_AGE, MonorepoProject, PROD_DEPLOY_NAME, PnpmWorkspace, ProjectMetadata, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, ResetTask, TestRunner, TurboRepo, TurboRepoTask, TypeScriptConfig, TypeScriptProject, VERSION, VERSION_KEYS_SKIP, VERSION_NPM_PACKAGES, VSCodeConfig, Vitest, addApproveMergeUpgradeWorkflow, addBuildCompleteJob, awsCdkBundle, baseBundle, getLatestEligibleVersion, githubWorkflowBundle, jestBundle, pnpmBundle, projenBundle, resolveTemplateVariables, turborepoBundle, typescriptBundle, vitestBundle };
2851
2887
  export type { AgentConfigOptions, AgentModel, AgentPlatform, AgentPlatformOverrides, AgentRule, AgentRuleBundle, AgentRuleScope, AgentSkill, AgentSubAgent, AgentSubAgentPlatformOverrides, ApproveMergeUpgradeOptions, AwsAccount, AwsDeploymentTargetOptions, AwsLocalDeploymentConfig, AwsOrganization, AwsRegion, CiDeploymentConfig, ClassTypeOptions, ClaudeAutoModeConfig, ClaudeHookAction, ClaudeHookEntry, ClaudeHooksConfig, ClaudePermissionsConfig, ClaudeRuleTarget, ClaudeSandboxConfig, ClaudeSettingsConfig, CopilotHandoff, CursorHookAction, CursorHooksConfig, CursorSettingsConfig, DeployWorkflowOptions, DeploymentMetadata, GitBranch, GitHubBoardMetadata, GitHubProjectMetadata, GitHubSprintMetadata, IDependencyResolver, McpServerConfig, McpTransport, MergeMethod, MonorepoProjectOptions, OrganizationMetadata, PnpmWorkspaceOptions, ProjectMetadataOptions, RemoteCacheOptions, RepositoryMetadata, ResetTaskOptions, ResolvedProjectMetadata, SlackMetadata, TemplateResolveResult, TurboRepoOptions, TurboRepoTaskOptions, TypeScriptProjectOptions, VersionKey, VitestConfigOptions, VitestOptions };
package/lib/index.js CHANGED
@@ -189,6 +189,7 @@ __export(index_exports, {
189
189
  MCP_TRANSPORT: () => MCP_TRANSPORT,
190
190
  MERGE_METHODS: () => MERGE_METHODS,
191
191
  MIMIMUM_RELEASE_AGE: () => MIMIMUM_RELEASE_AGE,
192
+ MINIMUM_RELEASE_AGE: () => MINIMUM_RELEASE_AGE,
192
193
  MonorepoProject: () => MonorepoProject,
193
194
  PROD_DEPLOY_NAME: () => PROD_DEPLOY_NAME,
194
195
  PnpmWorkspace: () => PnpmWorkspace,
@@ -678,6 +679,17 @@ var baseBundle = {
678
679
  "| `release:` | Release preparation, version bumps |",
679
680
  "| `hotfix:` | Urgent production fixes |",
680
681
  "",
682
+ "## GitHub Issue Type",
683
+ "",
684
+ "When creating issues, always assign the appropriate **GitHub issue type** based on the title prefix:",
685
+ "",
686
+ "| Prefix | GitHub Issue Type |",
687
+ "|--------|------------------|",
688
+ "| `epic:` | Epic |",
689
+ "| `feat:` | Feature |",
690
+ "| `fix:` | Bug |",
691
+ "| `chore:`, `docs:`, `refactor:`, `release:`, `hotfix:` | Task |",
692
+ "",
681
693
  "## Prerequisite Issues",
682
694
  "",
683
695
  "Include any prerequisite (blocking) issues in the issue body when they exist.",
@@ -706,18 +718,20 @@ var githubWorkflowBundle = {
706
718
  "",
707
719
  "When the user says **work on issue X** (or similar), follow these steps exactly:",
708
720
  "",
709
- "1. **Fetch issue details** \u2014 use `gh issue view <number>` to get the title, body, and labels",
710
- "2. **Determine branch type** from the issue title prefix:",
721
+ "1. **Ensure you have the latest code** \u2014 switch to the default branch and pull:",
722
+ " - `git checkout {{repository.defaultBranch}} && git pull origin {{repository.defaultBranch}}`",
723
+ "2. **Fetch issue details** \u2014 use `gh issue view <number>` to get the title, body, and labels",
724
+ "3. **Determine branch type** from the issue title prefix:",
711
725
  " - `feat:` / `feature:` \u2192 `feat/`",
712
726
  " - `fix:` / `bug:` \u2192 `fix/`",
713
727
  " - `docs:` \u2192 `docs/`",
714
728
  " - `chore:` / `refactor:` \u2192 `chore/`",
715
729
  " - `test:` \u2192 `test/`",
716
730
  " - No prefix \u2192 `feat/`",
717
- "3. **Create a branch** following the naming convention: `<type>/<short-slug>-<issue-number>` (e.g., `feat/add-login-42`)",
718
- "4. **Checkout the branch** locally",
719
- "5. **Link the branch to the issue** by posting a comment: `gh issue comment <number> --body 'Branch: \\`<branch-name>\\`'`",
720
- "6. **Stop and wait** for user instructions \u2014 do **NOT** start implementing",
731
+ "4. **Create a branch** following the naming convention: `<type>/<short-slug>-<issue-number>` (e.g., `feat/add-login-42`)",
732
+ "5. **Checkout the branch** locally",
733
+ "6. **Link the branch to the issue** by posting a comment: `gh issue comment <number> --body 'Branch: \\`<branch-name>\\`'`",
734
+ "7. **Stop and wait** for user instructions \u2014 do **NOT** start implementing",
721
735
  "",
722
736
  "### Important",
723
737
  "",
@@ -834,13 +848,16 @@ var jestBundle = {
834
848
  ].join("\n"),
835
849
  tags: ["testing"]
836
850
  }
837
- ]
851
+ ],
852
+ claudePermissions: {
853
+ allow: ["Bash(npx jest:*)"]
854
+ }
838
855
  };
839
856
 
840
857
  // src/pnpm/pnpm-workspace.ts
841
858
  var import_path = require("path");
842
859
  var import_projen = require("projen");
843
- var MIMIMUM_RELEASE_AGE = {
860
+ var MINIMUM_RELEASE_AGE = {
844
861
  ZERO_DAYS: 0,
845
862
  ONE_HOUR: 60,
846
863
  SIX_HOURS: 360,
@@ -869,7 +886,7 @@ var PnpmWorkspace = class _PnpmWorkspace extends import_projen.Component {
869
886
  super(project);
870
887
  project.tryFindObjectFile("package.json")?.addDeletionOverride("pnpm");
871
888
  this.fileName = options.fileName ?? "pnpm-workspace.yaml";
872
- this.minimumReleaseAge = options.minimumReleaseAge ?? MIMIMUM_RELEASE_AGE.ONE_DAY;
889
+ this.minimumReleaseAge = options.minimumReleaseAge ?? MINIMUM_RELEASE_AGE.ONE_DAY;
873
890
  this.minimumReleaseAgeExclude = options.minimumReleaseAgeExclude ? ["@codedrifters/*", ...options.minimumReleaseAgeExclude] : ["@codedrifters/*"];
874
891
  this.onlyBuiltDependencies = options.onlyBuiltDependencies ? options.onlyBuiltDependencies : [];
875
892
  this.ignoredBuiltDependencies = options.ignoredBuiltDependencies ? options.ignoredBuiltDependencies : [];
@@ -916,6 +933,7 @@ var PnpmWorkspace = class _PnpmWorkspace extends import_projen.Component {
916
933
  });
917
934
  }
918
935
  };
936
+ var MIMIMUM_RELEASE_AGE = MINIMUM_RELEASE_AGE;
919
937
 
920
938
  // src/agent/bundles/pnpm.ts
921
939
  var pnpmBundle = {
@@ -1337,7 +1355,10 @@ var turborepoBundle = {
1337
1355
  ].join("\n"),
1338
1356
  tags: ["workflow"]
1339
1357
  }
1340
- ]
1358
+ ],
1359
+ claudePermissions: {
1360
+ allow: ["Bash(npx turbo:*)"]
1361
+ }
1341
1362
  };
1342
1363
 
1343
1364
  // src/agent/bundles/typescript.ts
@@ -1412,7 +1433,10 @@ var typescriptBundle = {
1412
1433
  ].join("\n"),
1413
1434
  tags: ["coding"]
1414
1435
  }
1415
- ]
1436
+ ],
1437
+ claudePermissions: {
1438
+ allow: ["Bash(npx tsc:*)"]
1439
+ }
1416
1440
  };
1417
1441
 
1418
1442
  // src/vitest/vitest-component.ts
@@ -1604,7 +1628,10 @@ var vitestBundle = {
1604
1628
  ].join("\n"),
1605
1629
  tags: ["testing"]
1606
1630
  }
1607
- ]
1631
+ ],
1632
+ claudePermissions: {
1633
+ allow: ["Bash(npx vitest:*)"]
1634
+ }
1608
1635
  };
1609
1636
 
1610
1637
  // src/agent/bundles/index.ts
@@ -2229,6 +2256,110 @@ function resolveTemplateVariables(template, metadata) {
2229
2256
  }
2230
2257
 
2231
2258
  // src/agent/agent-config.ts
2259
+ var DEFAULT_CLAUDE_ALLOW = [
2260
+ // ── Git ──────────────────────────────────────────────────────────────
2261
+ "Bash(git add *)",
2262
+ "Bash(git branch *)",
2263
+ "Bash(git checkout *)",
2264
+ "Bash(git commit *)",
2265
+ "Bash(git diff *)",
2266
+ "Bash(git fetch *)",
2267
+ "Bash(git log *)",
2268
+ "Bash(git merge *)",
2269
+ "Bash(git mv *)",
2270
+ "Bash(git pull *)",
2271
+ "Bash(git push *)",
2272
+ "Bash(git rebase *)",
2273
+ "Bash(git rm *)",
2274
+ "Bash(git stash *)",
2275
+ "Bash(git status *)",
2276
+ "Bash(git show *)",
2277
+ "Bash(git rev-parse *)",
2278
+ // ── GitHub CLI ───────────────────────────────────────────────────────
2279
+ "Bash(gh issue *)",
2280
+ "Bash(gh pr *)",
2281
+ "Bash(gh repo *)",
2282
+ "Bash(gh api *)",
2283
+ "Bash(gh label *)",
2284
+ "Bash(gh run *)",
2285
+ "Bash(gh search *)",
2286
+ "Bash(gh browse *)",
2287
+ "Bash(gh status *)",
2288
+ // ── Package manager ──────────────────────────────────────────────────
2289
+ "Bash(pnpm *)",
2290
+ // ── Read-only shell utilities ────────────────────────────────────────
2291
+ "Bash(ls *)",
2292
+ "Bash(find *)",
2293
+ "Bash(cat *)",
2294
+ "Bash(head *)",
2295
+ "Bash(tail *)",
2296
+ "Bash(wc *)",
2297
+ "Bash(grep *)",
2298
+ "Bash(sort *)",
2299
+ "Bash(uniq *)",
2300
+ "Bash(dirname *)",
2301
+ "Bash(basename *)",
2302
+ "Bash(which *)",
2303
+ "Bash(diff *)",
2304
+ "Bash(jq *)",
2305
+ "Bash(date *)",
2306
+ // ── Safe output / test utilities ─────────────────────────────────────
2307
+ "Bash(echo *)",
2308
+ "Bash(printf *)",
2309
+ "Bash(test *)",
2310
+ "Bash([ *)",
2311
+ "Bash(true *)",
2312
+ "Bash(false *)",
2313
+ // ── Safe directory operations ────────────────────────────────────────
2314
+ "Bash(mkdir *)",
2315
+ "Bash(rmdir *)",
2316
+ // ── Built-in tools ───────────────────────────────────────────────────
2317
+ "Read(/**)",
2318
+ "Edit(/**)",
2319
+ "Write(/**)",
2320
+ "WebFetch",
2321
+ "WebSearch"
2322
+ ];
2323
+ var DEFAULT_CLAUDE_DENY = [
2324
+ // ── Destructive git ──────────────────────────────────────────────────
2325
+ "Bash(git push --force *)",
2326
+ "Bash(git push -f *)",
2327
+ "Bash(git push origin --force *)",
2328
+ "Bash(git push origin -f *)",
2329
+ "Bash(git reset --hard *)",
2330
+ "Bash(git clean -f *)",
2331
+ "Bash(git remote *)",
2332
+ // ── Destructive file operations ──────────────────────────────────────
2333
+ "Bash(rm -rf *)",
2334
+ "Bash(rm -r *)",
2335
+ "Bash(rm *)",
2336
+ // ── Network / remote access ──────────────────────────────────────────
2337
+ "Bash(curl *)",
2338
+ "Bash(wget *)",
2339
+ "Bash(ssh *)",
2340
+ "Bash(scp *)",
2341
+ // ── System administration ────────────────────────────────────────────
2342
+ "Bash(sudo *)",
2343
+ "Bash(chmod *)",
2344
+ "Bash(chown *)",
2345
+ "Bash(kill *)",
2346
+ "Bash(killall *)",
2347
+ "Bash(pkill *)",
2348
+ // ── Code execution / shell spawning ──────────────────────────────────
2349
+ "Bash(eval *)",
2350
+ "Bash(exec *)",
2351
+ "Bash(source *)",
2352
+ "Bash(. *)",
2353
+ "Bash(bash *)",
2354
+ "Bash(sh *)",
2355
+ "Bash(zsh *)",
2356
+ // ── App launching ────────────────────────────────────────────────────
2357
+ "Bash(open *)",
2358
+ "Bash(xdg-open *)",
2359
+ // ── Environment manipulation ─────────────────────────────────────────
2360
+ "Bash(export *)",
2361
+ "Bash(env *)"
2362
+ ];
2232
2363
  var AgentConfig = class _AgentConfig extends import_projen8.Component {
2233
2364
  /**
2234
2365
  * Find the AgentConfig component on a project.
@@ -2237,6 +2368,27 @@ var AgentConfig = class _AgentConfig extends import_projen8.Component {
2237
2368
  const isAgentConfig = (c) => c instanceof _AgentConfig;
2238
2369
  return project.components.find(isAgentConfig);
2239
2370
  }
2371
+ /**
2372
+ * Merges default Claude permissions with bundle and user-supplied settings.
2373
+ *
2374
+ * Merge order: defaults → bundle permissions → user-supplied entries.
2375
+ * `defaultMode` defaults to `"dontAsk"` unless overridden.
2376
+ */
2377
+ static mergeClaudeDefaults(userSettings, bundlePermissions) {
2378
+ const bundleAllow = bundlePermissions?.allow ?? [];
2379
+ const bundleDeny = bundlePermissions?.deny ?? [];
2380
+ const userAllow = userSettings?.permissions?.allow ?? [];
2381
+ const userDeny = userSettings?.permissions?.deny ?? [];
2382
+ return {
2383
+ ...userSettings,
2384
+ defaultMode: userSettings?.defaultMode ?? "dontAsk",
2385
+ permissions: {
2386
+ ...userSettings?.permissions,
2387
+ allow: [...DEFAULT_CLAUDE_ALLOW, ...bundleAllow, ...userAllow],
2388
+ deny: [...DEFAULT_CLAUDE_DENY, ...bundleDeny, ...userDeny]
2389
+ }
2390
+ };
2391
+ }
2240
2392
  constructor(project, options = {}) {
2241
2393
  super(project);
2242
2394
  this.options = options;
@@ -2267,13 +2419,17 @@ var AgentConfig = class _AgentConfig extends import_projen8.Component {
2267
2419
  );
2268
2420
  }
2269
2421
  if (platforms.includes(AGENT_PLATFORM.CLAUDE)) {
2422
+ const bundlePermissions = this.resolveBundlePermissions();
2270
2423
  ClaudeRenderer.render(
2271
2424
  this,
2272
2425
  resolvedRules,
2273
2426
  resolvedSkills,
2274
2427
  resolvedSubAgents,
2275
2428
  mcpServers,
2276
- this.options.claudeSettings
2429
+ _AgentConfig.mergeClaudeDefaults(
2430
+ this.options.claudeSettings,
2431
+ bundlePermissions
2432
+ )
2277
2433
  );
2278
2434
  }
2279
2435
  if (platforms.includes(AGENT_PLATFORM.CODEX)) {
@@ -2445,6 +2601,40 @@ ${extra}`
2445
2601
  return resolved !== agent.prompt ? { ...agent, prompt: resolved } : agent;
2446
2602
  });
2447
2603
  }
2604
+ /**
2605
+ * Collects Claude permission entries from all active bundles.
2606
+ */
2607
+ resolveBundlePermissions() {
2608
+ const allow = [];
2609
+ const deny = [];
2610
+ if (this.options.autoDetectBundles !== false) {
2611
+ for (const bundle of BUILT_IN_BUNDLES) {
2612
+ if (this.options.excludeBundles?.includes(bundle.name)) continue;
2613
+ if (bundle.appliesWhen(this.project) && bundle.claudePermissions) {
2614
+ if (bundle.claudePermissions.allow) {
2615
+ allow.push(...bundle.claudePermissions.allow);
2616
+ }
2617
+ if (bundle.claudePermissions.deny) {
2618
+ deny.push(...bundle.claudePermissions.deny);
2619
+ }
2620
+ }
2621
+ }
2622
+ }
2623
+ if (this.options.includeBundles) {
2624
+ for (const bundleName of this.options.includeBundles) {
2625
+ const bundle = BUILT_IN_BUNDLES.find((b) => b.name === bundleName);
2626
+ if (bundle?.claudePermissions) {
2627
+ if (bundle.claudePermissions.allow) {
2628
+ allow.push(...bundle.claudePermissions.allow);
2629
+ }
2630
+ if (bundle.claudePermissions.deny) {
2631
+ deny.push(...bundle.claudePermissions.deny);
2632
+ }
2633
+ }
2634
+ }
2635
+ }
2636
+ return { allow, deny };
2637
+ }
2448
2638
  };
2449
2639
 
2450
2640
  // src/aws/aws-deployment-config.ts
@@ -3858,6 +4048,7 @@ var AwsDeployWorkflow = class _AwsDeployWorkflow extends import_projen16.Compone
3858
4048
  MCP_TRANSPORT,
3859
4049
  MERGE_METHODS,
3860
4050
  MIMIMUM_RELEASE_AGE,
4051
+ MINIMUM_RELEASE_AGE,
3861
4052
  MonorepoProject,
3862
4053
  PROD_DEPLOY_NAME,
3863
4054
  PnpmWorkspace,