Skip to content

Conversation

@RomneyDa
Copy link
Collaborator

@RomneyDa RomneyDa commented Oct 15, 2025

Description

  • --mcp, --rule, --prompt, --agent (and agent model/rules/tools), etc slugs that have inputs. can now use fully-feature rendered secrets
  • If no model is present after config loading, hardcoded default model is pushed into config

Rearranges config loading to use the existing flow for injecting blocks for flags like --mcp and --agent model/tools etc., so that they can have secrets rendered. Replaces inputs. with secrets. for injected blocks, since they cannot use inputs.

As a side effect, also adds file path/URI support for various flags etc.


Summary by cubic

Fixes secret rendering for blocks injected via CLI flags (--mcp, --agent model/tools) by moving injection into the main config loading flow and auto-replacing inputs.* with secrets.* for injected blocks. Removes the old enhancer and aligns services with the unified loader.

  • Bug Fixes

    • Secrets now render for CLI-injected blocks.
    • Replaces inputs.* with secrets.* in injected blocks to support secret resolution.
    • Handles hub slugs and string rules consistently, reducing rule duplication.
  • Refactors

    • Removed ConfigEnhancer; injection happens in loadConfiguration with an injectBlocks parameter.
    • Uses mergeUnrolledAssistants and unrollAssistantFromContent for consistent config assembly.
    • Added replaceInputsWithSecrets and parseAgentFileRules in config-yaml.
    • Updated AgentFileService to parse rules/tools and load model configs from the hub.
    • Updated ConfigService to decode identifiers and merge injected blocks into the loaded config.
    • ModelService now reads agentFileModel object instead of a name.
    • Typed modelProcessor and exported HUB_SLUG_PATTERN in hubLoader.

@RomneyDa RomneyDa requested a review from a team as a code owner October 15, 2025 09:47
@RomneyDa RomneyDa requested review from sestinj and removed request for a team October 15, 2025 09:47
@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Oct 15, 2025
@github-actions
Copy link

github-actions bot commented Oct 15, 2025

✅ Review Complete

Code Review Summary

⚠️ Continue configuration error. Please verify that the assistant exists in Continue Hub.


Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found across 19 files

Prompt for AI agents (all 3 issues)

Understand the root cause of the following 3 issues and fix them.


<file name="packages/config-yaml/src/markdown/agentFiles.ts">

<violation number="1" location="packages/config-yaml/src/markdown/agentFiles.ts:160">
Whitespace-only rules survive because trimming happens after the Boolean filter. Reverse the order or trim inside the filter to prevent empty strings from being returned.</violation>
</file>

<file name="packages/config-yaml/src/load/unroll.ts">

<violation number="1" location="packages/config-yaml/src/load/unroll.ts:249">
replaceInputsWithSecrets never rewrites the injected ${ {inputs.*} } variables, so injected blocks continue referencing inputs.* and the CLI secret rendering fix does not take effect.</violation>
</file>

<file name="extensions/cli/src/hubLoader.ts">

<violation number="1" location="extensions/cli/src/hubLoader.ts:305">
isStringRule now returns true for Windows file paths (e.g., `C:\\rules.md`), so those rules are treated as inline strings and never loaded from disk. Add the missing `&quot;\\&quot;` check to keep Windows paths classified as files.</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

Copy link
Contributor

@sestinj sestinj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add tests that ensure the block loading with inputs works?

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Oct 15, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 5 files

use agent option for cn remote
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 14 files

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 16, 2025
@RomneyDa RomneyDa merged commit 579bcbf into main Oct 16, 2025
67 of 71 checks passed
@RomneyDa RomneyDa deleted the dallin/agent-file-model-fixes branch October 16, 2025 07:36
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Oct 16, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Oct 16, 2025
@sestinj
Copy link
Contributor

sestinj commented Oct 16, 2025

🎉 This PR is included in version 1.29.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor

sestinj commented Oct 17, 2025

🎉 This PR is included in version 1.26.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor

sestinj commented Oct 17, 2025

🎉 This PR is included in version 1.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor

sestinj commented Oct 21, 2025

🎉 This PR is included in version 1.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm This PR has been approved by a maintainer released size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants