Skip to content

Commit 3e3b4fc

Browse files
fix(config): accept space-form agent command keys in the config schema
The root `commands` schema came from RootCommandsConfig, which lists only the generic report keys, and every object is closed with additionalProperties: false. So the published schema rejected both `commands."codex daily"` and the already documented `commands."codex:daily"`, even though the runtime reads both. After the schema is generated, add both key forms for each report an agent supports, as JSON-pointer `$ref`s to `<agent>.commands.<report>`. They share that agent's report options, unsupported agent/report pairs stay rejected, and the inlined schema doesn't gain a copy per agent report and form. Co-authored-by: viniciusdsandrade <[email protected]>
1 parent 5edc4a5 commit 3e3b4fc

2 files changed

Lines changed: 414 additions & 2 deletions

File tree

‎apps/ccusage/config-schema.json‎

Lines changed: 348 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4039,6 +4039,42 @@
40394039
"description": "Command-specific configuration for all-agent reports.",
40404040
"markdownDescription": "Command-specific configuration for all-agent reports.",
40414041
"properties": {
4042+
"amp daily": {
4043+
"$ref": "#/definitions/ccusage-config/properties/amp/properties/commands/properties/daily"
4044+
},
4045+
"amp monthly": {
4046+
"$ref": "#/definitions/ccusage-config/properties/amp/properties/commands/properties/monthly"
4047+
},
4048+
"amp session": {
4049+
"$ref": "#/definitions/ccusage-config/properties/amp/properties/commands/properties/session"
4050+
},
4051+
"amp:daily": {
4052+
"$ref": "#/definitions/ccusage-config/properties/amp/properties/commands/properties/daily"
4053+
},
4054+
"amp:monthly": {
4055+
"$ref": "#/definitions/ccusage-config/properties/amp/properties/commands/properties/monthly"
4056+
},
4057+
"amp:session": {
4058+
"$ref": "#/definitions/ccusage-config/properties/amp/properties/commands/properties/session"
4059+
},
4060+
"antigravity daily": {
4061+
"$ref": "#/definitions/ccusage-config/properties/antigravity/properties/commands/properties/daily"
4062+
},
4063+
"antigravity monthly": {
4064+
"$ref": "#/definitions/ccusage-config/properties/antigravity/properties/commands/properties/monthly"
4065+
},
4066+
"antigravity session": {
4067+
"$ref": "#/definitions/ccusage-config/properties/antigravity/properties/commands/properties/session"
4068+
},
4069+
"antigravity:daily": {
4070+
"$ref": "#/definitions/ccusage-config/properties/antigravity/properties/commands/properties/daily"
4071+
},
4072+
"antigravity:monthly": {
4073+
"$ref": "#/definitions/ccusage-config/properties/antigravity/properties/commands/properties/monthly"
4074+
},
4075+
"antigravity:session": {
4076+
"$ref": "#/definitions/ccusage-config/properties/antigravity/properties/commands/properties/session"
4077+
},
40424078
"blocks": {
40434079
"additionalProperties": false,
40444080
"properties": {
@@ -4217,6 +4253,96 @@
42174253
},
42184254
"type": "object"
42194255
},
4256+
"claude blocks": {
4257+
"$ref": "#/definitions/ccusage-config/properties/claude/properties/commands/properties/blocks"
4258+
},
4259+
"claude daily": {
4260+
"$ref": "#/definitions/ccusage-config/properties/claude/properties/commands/properties/daily"
4261+
},
4262+
"claude monthly": {
4263+
"$ref": "#/definitions/ccusage-config/properties/claude/properties/commands/properties/monthly"
4264+
},
4265+
"claude session": {
4266+
"$ref": "#/definitions/ccusage-config/properties/claude/properties/commands/properties/session"
4267+
},
4268+
"claude statusline": {
4269+
"$ref": "#/definitions/ccusage-config/properties/claude/properties/commands/properties/statusline"
4270+
},
4271+
"claude weekly": {
4272+
"$ref": "#/definitions/ccusage-config/properties/claude/properties/commands/properties/weekly"
4273+
},
4274+
"claude:blocks": {
4275+
"$ref": "#/definitions/ccusage-config/properties/claude/properties/commands/properties/blocks"
4276+
},
4277+
"claude:daily": {
4278+
"$ref": "#/definitions/ccusage-config/properties/claude/properties/commands/properties/daily"
4279+
},
4280+
"claude:monthly": {
4281+
"$ref": "#/definitions/ccusage-config/properties/claude/properties/commands/properties/monthly"
4282+
},
4283+
"claude:session": {
4284+
"$ref": "#/definitions/ccusage-config/properties/claude/properties/commands/properties/session"
4285+
},
4286+
"claude:statusline": {
4287+
"$ref": "#/definitions/ccusage-config/properties/claude/properties/commands/properties/statusline"
4288+
},
4289+
"claude:weekly": {
4290+
"$ref": "#/definitions/ccusage-config/properties/claude/properties/commands/properties/weekly"
4291+
},
4292+
"codebuff daily": {
4293+
"$ref": "#/definitions/ccusage-config/properties/codebuff/properties/commands/properties/daily"
4294+
},
4295+
"codebuff monthly": {
4296+
"$ref": "#/definitions/ccusage-config/properties/codebuff/properties/commands/properties/monthly"
4297+
},
4298+
"codebuff session": {
4299+
"$ref": "#/definitions/ccusage-config/properties/codebuff/properties/commands/properties/session"
4300+
},
4301+
"codebuff:daily": {
4302+
"$ref": "#/definitions/ccusage-config/properties/codebuff/properties/commands/properties/daily"
4303+
},
4304+
"codebuff:monthly": {
4305+
"$ref": "#/definitions/ccusage-config/properties/codebuff/properties/commands/properties/monthly"
4306+
},
4307+
"codebuff:session": {
4308+
"$ref": "#/definitions/ccusage-config/properties/codebuff/properties/commands/properties/session"
4309+
},
4310+
"codex daily": {
4311+
"$ref": "#/definitions/ccusage-config/properties/codex/properties/commands/properties/daily"
4312+
},
4313+
"codex monthly": {
4314+
"$ref": "#/definitions/ccusage-config/properties/codex/properties/commands/properties/monthly"
4315+
},
4316+
"codex session": {
4317+
"$ref": "#/definitions/ccusage-config/properties/codex/properties/commands/properties/session"
4318+
},
4319+
"codex:daily": {
4320+
"$ref": "#/definitions/ccusage-config/properties/codex/properties/commands/properties/daily"
4321+
},
4322+
"codex:monthly": {
4323+
"$ref": "#/definitions/ccusage-config/properties/codex/properties/commands/properties/monthly"
4324+
},
4325+
"codex:session": {
4326+
"$ref": "#/definitions/ccusage-config/properties/codex/properties/commands/properties/session"
4327+
},
4328+
"copilot daily": {
4329+
"$ref": "#/definitions/ccusage-config/properties/copilot/properties/commands/properties/daily"
4330+
},
4331+
"copilot monthly": {
4332+
"$ref": "#/definitions/ccusage-config/properties/copilot/properties/commands/properties/monthly"
4333+
},
4334+
"copilot session": {
4335+
"$ref": "#/definitions/ccusage-config/properties/copilot/properties/commands/properties/session"
4336+
},
4337+
"copilot:daily": {
4338+
"$ref": "#/definitions/ccusage-config/properties/copilot/properties/commands/properties/daily"
4339+
},
4340+
"copilot:monthly": {
4341+
"$ref": "#/definitions/ccusage-config/properties/copilot/properties/commands/properties/monthly"
4342+
},
4343+
"copilot:session": {
4344+
"$ref": "#/definitions/ccusage-config/properties/copilot/properties/commands/properties/session"
4345+
},
42204346
"daily": {
42214347
"additionalProperties": false,
42224348
"properties": {
@@ -4388,6 +4514,132 @@
43884514
},
43894515
"type": "object"
43904516
},
4517+
"droid daily": {
4518+
"$ref": "#/definitions/ccusage-config/properties/droid/properties/commands/properties/daily"
4519+
},
4520+
"droid monthly": {
4521+
"$ref": "#/definitions/ccusage-config/properties/droid/properties/commands/properties/monthly"
4522+
},
4523+
"droid session": {
4524+
"$ref": "#/definitions/ccusage-config/properties/droid/properties/commands/properties/session"
4525+
},
4526+
"droid:daily": {
4527+
"$ref": "#/definitions/ccusage-config/properties/droid/properties/commands/properties/daily"
4528+
},
4529+
"droid:monthly": {
4530+
"$ref": "#/definitions/ccusage-config/properties/droid/properties/commands/properties/monthly"
4531+
},
4532+
"droid:session": {
4533+
"$ref": "#/definitions/ccusage-config/properties/droid/properties/commands/properties/session"
4534+
},
4535+
"gemini daily": {
4536+
"$ref": "#/definitions/ccusage-config/properties/gemini/properties/commands/properties/daily"
4537+
},
4538+
"gemini monthly": {
4539+
"$ref": "#/definitions/ccusage-config/properties/gemini/properties/commands/properties/monthly"
4540+
},
4541+
"gemini session": {
4542+
"$ref": "#/definitions/ccusage-config/properties/gemini/properties/commands/properties/session"
4543+
},
4544+
"gemini:daily": {
4545+
"$ref": "#/definitions/ccusage-config/properties/gemini/properties/commands/properties/daily"
4546+
},
4547+
"gemini:monthly": {
4548+
"$ref": "#/definitions/ccusage-config/properties/gemini/properties/commands/properties/monthly"
4549+
},
4550+
"gemini:session": {
4551+
"$ref": "#/definitions/ccusage-config/properties/gemini/properties/commands/properties/session"
4552+
},
4553+
"goose daily": {
4554+
"$ref": "#/definitions/ccusage-config/properties/goose/properties/commands/properties/daily"
4555+
},
4556+
"goose monthly": {
4557+
"$ref": "#/definitions/ccusage-config/properties/goose/properties/commands/properties/monthly"
4558+
},
4559+
"goose session": {
4560+
"$ref": "#/definitions/ccusage-config/properties/goose/properties/commands/properties/session"
4561+
},
4562+
"goose:daily": {
4563+
"$ref": "#/definitions/ccusage-config/properties/goose/properties/commands/properties/daily"
4564+
},
4565+
"goose:monthly": {
4566+
"$ref": "#/definitions/ccusage-config/properties/goose/properties/commands/properties/monthly"
4567+
},
4568+
"goose:session": {
4569+
"$ref": "#/definitions/ccusage-config/properties/goose/properties/commands/properties/session"
4570+
},
4571+
"grok daily": {
4572+
"$ref": "#/definitions/ccusage-config/properties/grok/properties/commands/properties/daily"
4573+
},
4574+
"grok monthly": {
4575+
"$ref": "#/definitions/ccusage-config/properties/grok/properties/commands/properties/monthly"
4576+
},
4577+
"grok session": {
4578+
"$ref": "#/definitions/ccusage-config/properties/grok/properties/commands/properties/session"
4579+
},
4580+
"grok:daily": {
4581+
"$ref": "#/definitions/ccusage-config/properties/grok/properties/commands/properties/daily"
4582+
},
4583+
"grok:monthly": {
4584+
"$ref": "#/definitions/ccusage-config/properties/grok/properties/commands/properties/monthly"
4585+
},
4586+
"grok:session": {
4587+
"$ref": "#/definitions/ccusage-config/properties/grok/properties/commands/properties/session"
4588+
},
4589+
"hermes daily": {
4590+
"$ref": "#/definitions/ccusage-config/properties/hermes/properties/commands/properties/daily"
4591+
},
4592+
"hermes monthly": {
4593+
"$ref": "#/definitions/ccusage-config/properties/hermes/properties/commands/properties/monthly"
4594+
},
4595+
"hermes session": {
4596+
"$ref": "#/definitions/ccusage-config/properties/hermes/properties/commands/properties/session"
4597+
},
4598+
"hermes:daily": {
4599+
"$ref": "#/definitions/ccusage-config/properties/hermes/properties/commands/properties/daily"
4600+
},
4601+
"hermes:monthly": {
4602+
"$ref": "#/definitions/ccusage-config/properties/hermes/properties/commands/properties/monthly"
4603+
},
4604+
"hermes:session": {
4605+
"$ref": "#/definitions/ccusage-config/properties/hermes/properties/commands/properties/session"
4606+
},
4607+
"kilo daily": {
4608+
"$ref": "#/definitions/ccusage-config/properties/kilo/properties/commands/properties/daily"
4609+
},
4610+
"kilo monthly": {
4611+
"$ref": "#/definitions/ccusage-config/properties/kilo/properties/commands/properties/monthly"
4612+
},
4613+
"kilo session": {
4614+
"$ref": "#/definitions/ccusage-config/properties/kilo/properties/commands/properties/session"
4615+
},
4616+
"kilo:daily": {
4617+
"$ref": "#/definitions/ccusage-config/properties/kilo/properties/commands/properties/daily"
4618+
},
4619+
"kilo:monthly": {
4620+
"$ref": "#/definitions/ccusage-config/properties/kilo/properties/commands/properties/monthly"
4621+
},
4622+
"kilo:session": {
4623+
"$ref": "#/definitions/ccusage-config/properties/kilo/properties/commands/properties/session"
4624+
},
4625+
"kimi daily": {
4626+
"$ref": "#/definitions/ccusage-config/properties/kimi/properties/commands/properties/daily"
4627+
},
4628+
"kimi monthly": {
4629+
"$ref": "#/definitions/ccusage-config/properties/kimi/properties/commands/properties/monthly"
4630+
},
4631+
"kimi session": {
4632+
"$ref": "#/definitions/ccusage-config/properties/kimi/properties/commands/properties/session"
4633+
},
4634+
"kimi:daily": {
4635+
"$ref": "#/definitions/ccusage-config/properties/kimi/properties/commands/properties/daily"
4636+
},
4637+
"kimi:monthly": {
4638+
"$ref": "#/definitions/ccusage-config/properties/kimi/properties/commands/properties/monthly"
4639+
},
4640+
"kimi:session": {
4641+
"$ref": "#/definitions/ccusage-config/properties/kimi/properties/commands/properties/session"
4642+
},
43914643
"monthly": {
43924644
"additionalProperties": false,
43934645
"properties": {
@@ -4558,6 +4810,84 @@
45584810
},
45594811
"type": "object"
45604812
},
4813+
"openclaw daily": {
4814+
"$ref": "#/definitions/ccusage-config/properties/openclaw/properties/commands/properties/daily"
4815+
},
4816+
"openclaw monthly": {
4817+
"$ref": "#/definitions/ccusage-config/properties/openclaw/properties/commands/properties/monthly"
4818+
},
4819+
"openclaw session": {
4820+
"$ref": "#/definitions/ccusage-config/properties/openclaw/properties/commands/properties/session"
4821+
},
4822+
"openclaw:daily": {
4823+
"$ref": "#/definitions/ccusage-config/properties/openclaw/properties/commands/properties/daily"
4824+
},
4825+
"openclaw:monthly": {
4826+
"$ref": "#/definitions/ccusage-config/properties/openclaw/properties/commands/properties/monthly"
4827+
},
4828+
"openclaw:session": {
4829+
"$ref": "#/definitions/ccusage-config/properties/openclaw/properties/commands/properties/session"
4830+
},
4831+
"opencode daily": {
4832+
"$ref": "#/definitions/ccusage-config/properties/opencode/properties/commands/properties/daily"
4833+
},
4834+
"opencode monthly": {
4835+
"$ref": "#/definitions/ccusage-config/properties/opencode/properties/commands/properties/monthly"
4836+
},
4837+
"opencode session": {
4838+
"$ref": "#/definitions/ccusage-config/properties/opencode/properties/commands/properties/session"
4839+
},
4840+
"opencode weekly": {
4841+
"$ref": "#/definitions/ccusage-config/properties/opencode/properties/commands/properties/weekly"
4842+
},
4843+
"opencode:daily": {
4844+
"$ref": "#/definitions/ccusage-config/properties/opencode/properties/commands/properties/daily"
4845+
},
4846+
"opencode:monthly": {
4847+
"$ref": "#/definitions/ccusage-config/properties/opencode/properties/commands/properties/monthly"
4848+
},
4849+
"opencode:session": {
4850+
"$ref": "#/definitions/ccusage-config/properties/opencode/properties/commands/properties/session"
4851+
},
4852+
"opencode:weekly": {
4853+
"$ref": "#/definitions/ccusage-config/properties/opencode/properties/commands/properties/weekly"
4854+
},
4855+
"pi daily": {
4856+
"$ref": "#/definitions/ccusage-config/properties/pi/properties/commands/properties/daily"
4857+
},
4858+
"pi monthly": {
4859+
"$ref": "#/definitions/ccusage-config/properties/pi/properties/commands/properties/monthly"
4860+
},
4861+
"pi session": {
4862+
"$ref": "#/definitions/ccusage-config/properties/pi/properties/commands/properties/session"
4863+
},
4864+
"pi:daily": {
4865+
"$ref": "#/definitions/ccusage-config/properties/pi/properties/commands/properties/daily"
4866+
},
4867+
"pi:monthly": {
4868+
"$ref": "#/definitions/ccusage-config/properties/pi/properties/commands/properties/monthly"
4869+
},
4870+
"pi:session": {
4871+
"$ref": "#/definitions/ccusage-config/properties/pi/properties/commands/properties/session"
4872+
},
4873+
"qwen daily": {
4874+
"$ref": "#/definitions/ccusage-config/properties/qwen/properties/commands/properties/daily"
4875+
},
4876+
"qwen monthly": {
4877+
"$ref": "#/definitions/ccusage-config/properties/qwen/properties/commands/properties/monthly"
4878+
},
4879+
"qwen session": {
4880+
"$ref": "#/definitions/ccusage-config/properties/qwen/properties/commands/properties/session"
4881+
},
4882+
"qwen:daily": {
4883+
"$ref": "#/definitions/ccusage-config/properties/qwen/properties/commands/properties/daily"
4884+
},
4885+
"qwen:monthly": {
4886+
"$ref": "#/definitions/ccusage-config/properties/qwen/properties/commands/properties/monthly"
4887+
},
4888+
"qwen:session": {
4889+
"$ref": "#/definitions/ccusage-config/properties/qwen/properties/commands/properties/session"
4890+
},
45614891
"session": {
45624892
"additionalProperties": false,
45634893
"properties": {
@@ -5041,6 +5371,24 @@
50415371
}
50425372
},
50435373
"type": "object"
5374+
},
5375+
"zcode daily": {
5376+
"$ref": "#/definitions/ccusage-config/properties/zcode/properties/commands/properties/daily"
5377+
},
5378+
"zcode monthly": {
5379+
"$ref": "#/definitions/ccusage-config/properties/zcode/properties/commands/properties/monthly"
5380+
},
5381+
"zcode session": {
5382+
"$ref": "#/definitions/ccusage-config/properties/zcode/properties/commands/properties/session"
5383+
},
5384+
"zcode:daily": {
5385+
"$ref": "#/definitions/ccusage-config/properties/zcode/properties/commands/properties/daily"
5386+
},
5387+
"zcode:monthly": {
5388+
"$ref": "#/definitions/ccusage-config/properties/zcode/properties/commands/properties/monthly"
5389+
},
5390+
"zcode:session": {
5391+
"$ref": "#/definitions/ccusage-config/properties/zcode/properties/commands/properties/session"
50445392
}
50455393
},
50465394
"type": "object"

0 commit comments

Comments
 (0)