-
Notifications
You must be signed in to change notification settings - Fork 18
Add CLI support for the new app and ai_cost_model hives #308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| """AI cost model commands for LimaCharlie CLI v2.""" | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| from ._hive_shortcut import make_hive_group | ||
| from ..discovery import register_explain | ||
|
|
||
| group = make_hive_group("ai-cost-model", "ai_cost_model", "AI cost model") | ||
|
|
||
| # Override the generic hive explains with cost-model-specific documentation. | ||
|
|
||
| register_explain("ai-cost-model.list", """\ | ||
| List all AI cost-model profiles stored in the organization. Each | ||
| profile turns AI-agent activity into an auditable cost/savings figure | ||
| by pairing a fully-burdened analyst rate with the standard manual | ||
| handling time for one investigation of that kind of work. Because | ||
| this hive is per-org (OID-partitioned), the profiles are per-tenant. | ||
| """) | ||
|
|
||
| register_explain("ai-cost-model.get", """\ | ||
| Get a specific AI cost-model profile by key. Returns the full record | ||
| including the economic inputs and metadata. | ||
| """) | ||
|
|
||
| register_explain("ai-cost-model.set", """\ | ||
| Create or update an AI cost-model profile. | ||
|
|
||
| The data payload describes one costing profile: | ||
|
|
||
| data: | ||
| label: "SOC L1 Triage" # optional display name | ||
| loaded_hourly_rate: 95.0 # required: fully-burdened USD/hour | ||
| minutes_per_investigation: 30.0 # required: standard manual minutes | ||
| rate_source_note: "FY26 loaded SOC cost / 1,600 hrs" # optional provenance | ||
|
|
||
| loaded_hourly_rate and minutes_per_investigation are required and must | ||
| be non-negative; the backend rejects either value above 100000. | ||
|
|
||
| Profiles can be tagged and organized with usr_mtd: | ||
|
|
||
| data: | ||
| label: "SOC L1 Triage" | ||
| loaded_hourly_rate: 95.0 | ||
| minutes_per_investigation: 30.0 | ||
| usr_mtd: | ||
| tags: [soc, triage] | ||
| comment: "FY26 baseline" | ||
|
|
||
| Provide data via --input-file (YAML/JSON) or pipe through stdin. | ||
|
|
||
| Examples: | ||
| limacharlie ai-cost-model set --key soc-l1 --input-file model.yaml | ||
| """) | ||
|
|
||
| register_explain("ai-cost-model.delete", """\ | ||
| Delete an AI cost-model profile. Requires --confirm. | ||
| """) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.