scc-cli 1.5.3__py3-none-any.whl

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.

Potentially problematic release.


This version of scc-cli might be problematic. Click here for more details.

Files changed (153) hide show
  1. scc_cli/__init__.py +15 -0
  2. scc_cli/audit/__init__.py +37 -0
  3. scc_cli/audit/parser.py +191 -0
  4. scc_cli/audit/reader.py +180 -0
  5. scc_cli/auth.py +145 -0
  6. scc_cli/claude_adapter.py +485 -0
  7. scc_cli/cli.py +311 -0
  8. scc_cli/cli_common.py +190 -0
  9. scc_cli/cli_helpers.py +244 -0
  10. scc_cli/commands/__init__.py +20 -0
  11. scc_cli/commands/admin.py +708 -0
  12. scc_cli/commands/audit.py +246 -0
  13. scc_cli/commands/config.py +528 -0
  14. scc_cli/commands/exceptions.py +696 -0
  15. scc_cli/commands/init.py +272 -0
  16. scc_cli/commands/launch/__init__.py +73 -0
  17. scc_cli/commands/launch/app.py +1247 -0
  18. scc_cli/commands/launch/render.py +309 -0
  19. scc_cli/commands/launch/sandbox.py +135 -0
  20. scc_cli/commands/launch/workspace.py +339 -0
  21. scc_cli/commands/org/__init__.py +49 -0
  22. scc_cli/commands/org/_builders.py +264 -0
  23. scc_cli/commands/org/app.py +41 -0
  24. scc_cli/commands/org/import_cmd.py +267 -0
  25. scc_cli/commands/org/init_cmd.py +269 -0
  26. scc_cli/commands/org/schema_cmd.py +76 -0
  27. scc_cli/commands/org/status_cmd.py +157 -0
  28. scc_cli/commands/org/update_cmd.py +330 -0
  29. scc_cli/commands/org/validate_cmd.py +138 -0
  30. scc_cli/commands/support.py +323 -0
  31. scc_cli/commands/team.py +910 -0
  32. scc_cli/commands/worktree/__init__.py +72 -0
  33. scc_cli/commands/worktree/_helpers.py +57 -0
  34. scc_cli/commands/worktree/app.py +170 -0
  35. scc_cli/commands/worktree/container_commands.py +385 -0
  36. scc_cli/commands/worktree/context_commands.py +61 -0
  37. scc_cli/commands/worktree/session_commands.py +128 -0
  38. scc_cli/commands/worktree/worktree_commands.py +734 -0
  39. scc_cli/config.py +647 -0
  40. scc_cli/confirm.py +20 -0
  41. scc_cli/console.py +562 -0
  42. scc_cli/contexts.py +394 -0
  43. scc_cli/core/__init__.py +68 -0
  44. scc_cli/core/constants.py +101 -0
  45. scc_cli/core/errors.py +297 -0
  46. scc_cli/core/exit_codes.py +91 -0
  47. scc_cli/core/workspace.py +57 -0
  48. scc_cli/deprecation.py +54 -0
  49. scc_cli/deps.py +189 -0
  50. scc_cli/docker/__init__.py +127 -0
  51. scc_cli/docker/core.py +467 -0
  52. scc_cli/docker/credentials.py +726 -0
  53. scc_cli/docker/launch.py +595 -0
  54. scc_cli/doctor/__init__.py +105 -0
  55. scc_cli/doctor/checks/__init__.py +166 -0
  56. scc_cli/doctor/checks/cache.py +314 -0
  57. scc_cli/doctor/checks/config.py +107 -0
  58. scc_cli/doctor/checks/environment.py +182 -0
  59. scc_cli/doctor/checks/json_helpers.py +157 -0
  60. scc_cli/doctor/checks/organization.py +264 -0
  61. scc_cli/doctor/checks/worktree.py +278 -0
  62. scc_cli/doctor/render.py +365 -0
  63. scc_cli/doctor/types.py +66 -0
  64. scc_cli/evaluation/__init__.py +27 -0
  65. scc_cli/evaluation/apply_exceptions.py +207 -0
  66. scc_cli/evaluation/evaluate.py +97 -0
  67. scc_cli/evaluation/models.py +80 -0
  68. scc_cli/git.py +84 -0
  69. scc_cli/json_command.py +166 -0
  70. scc_cli/json_output.py +159 -0
  71. scc_cli/kinds.py +65 -0
  72. scc_cli/marketplace/__init__.py +123 -0
  73. scc_cli/marketplace/adapter.py +74 -0
  74. scc_cli/marketplace/compute.py +377 -0
  75. scc_cli/marketplace/constants.py +87 -0
  76. scc_cli/marketplace/managed.py +135 -0
  77. scc_cli/marketplace/materialize.py +846 -0
  78. scc_cli/marketplace/normalize.py +548 -0
  79. scc_cli/marketplace/render.py +281 -0
  80. scc_cli/marketplace/resolve.py +459 -0
  81. scc_cli/marketplace/schema.py +506 -0
  82. scc_cli/marketplace/sync.py +279 -0
  83. scc_cli/marketplace/team_cache.py +195 -0
  84. scc_cli/marketplace/team_fetch.py +689 -0
  85. scc_cli/marketplace/trust.py +244 -0
  86. scc_cli/models/__init__.py +41 -0
  87. scc_cli/models/exceptions.py +273 -0
  88. scc_cli/models/plugin_audit.py +434 -0
  89. scc_cli/org_templates.py +269 -0
  90. scc_cli/output_mode.py +167 -0
  91. scc_cli/panels.py +113 -0
  92. scc_cli/platform.py +350 -0
  93. scc_cli/profiles.py +960 -0
  94. scc_cli/remote.py +443 -0
  95. scc_cli/schemas/__init__.py +1 -0
  96. scc_cli/schemas/org-v1.schema.json +456 -0
  97. scc_cli/schemas/team-config.v1.schema.json +163 -0
  98. scc_cli/services/__init__.py +1 -0
  99. scc_cli/services/git/__init__.py +79 -0
  100. scc_cli/services/git/branch.py +151 -0
  101. scc_cli/services/git/core.py +216 -0
  102. scc_cli/services/git/hooks.py +108 -0
  103. scc_cli/services/git/worktree.py +444 -0
  104. scc_cli/services/workspace/__init__.py +36 -0
  105. scc_cli/services/workspace/resolver.py +223 -0
  106. scc_cli/services/workspace/suspicious.py +200 -0
  107. scc_cli/sessions.py +425 -0
  108. scc_cli/setup.py +589 -0
  109. scc_cli/source_resolver.py +470 -0
  110. scc_cli/stats.py +378 -0
  111. scc_cli/stores/__init__.py +13 -0
  112. scc_cli/stores/exception_store.py +251 -0
  113. scc_cli/subprocess_utils.py +88 -0
  114. scc_cli/teams.py +383 -0
  115. scc_cli/templates/__init__.py +2 -0
  116. scc_cli/templates/org/__init__.py +0 -0
  117. scc_cli/templates/org/minimal.json +19 -0
  118. scc_cli/templates/org/reference.json +74 -0
  119. scc_cli/templates/org/strict.json +38 -0
  120. scc_cli/templates/org/teams.json +42 -0
  121. scc_cli/templates/statusline.sh +75 -0
  122. scc_cli/theme.py +348 -0
  123. scc_cli/ui/__init__.py +154 -0
  124. scc_cli/ui/branding.py +68 -0
  125. scc_cli/ui/chrome.py +401 -0
  126. scc_cli/ui/dashboard/__init__.py +62 -0
  127. scc_cli/ui/dashboard/_dashboard.py +794 -0
  128. scc_cli/ui/dashboard/loaders.py +452 -0
  129. scc_cli/ui/dashboard/models.py +185 -0
  130. scc_cli/ui/dashboard/orchestrator.py +735 -0
  131. scc_cli/ui/formatters.py +444 -0
  132. scc_cli/ui/gate.py +350 -0
  133. scc_cli/ui/git_interactive.py +869 -0
  134. scc_cli/ui/git_render.py +176 -0
  135. scc_cli/ui/help.py +157 -0
  136. scc_cli/ui/keys.py +615 -0
  137. scc_cli/ui/list_screen.py +437 -0
  138. scc_cli/ui/picker.py +763 -0
  139. scc_cli/ui/prompts.py +201 -0
  140. scc_cli/ui/quick_resume.py +116 -0
  141. scc_cli/ui/wizard.py +576 -0
  142. scc_cli/update.py +680 -0
  143. scc_cli/utils/__init__.py +39 -0
  144. scc_cli/utils/fixit.py +264 -0
  145. scc_cli/utils/fuzzy.py +124 -0
  146. scc_cli/utils/locks.py +114 -0
  147. scc_cli/utils/ttl.py +376 -0
  148. scc_cli/validate.py +455 -0
  149. scc_cli-1.5.3.dist-info/METADATA +401 -0
  150. scc_cli-1.5.3.dist-info/RECORD +153 -0
  151. scc_cli-1.5.3.dist-info/WHEEL +4 -0
  152. scc_cli-1.5.3.dist-info/entry_points.txt +2 -0
  153. scc_cli-1.5.3.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,456 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://scc-cli.dev/schemas/org-v1.json",
4
+ "title": "SCC Organization Config v1",
5
+ "description": "Schema for SCC organization configuration files with governance features. Supports Phase 2 federated team configs.",
6
+ "type": "object",
7
+ "$defs": {
8
+ "ConfigSource": {
9
+ "description": "Discriminated union for team config source types (no directory for security)",
10
+ "oneOf": [
11
+ {"$ref": "#/$defs/ConfigSourceGitHub"},
12
+ {"$ref": "#/$defs/ConfigSourceGit"},
13
+ {"$ref": "#/$defs/ConfigSourceURL"}
14
+ ]
15
+ },
16
+ "ConfigSourceGitHub": {
17
+ "type": "object",
18
+ "description": "GitHub repository config source for external team config files",
19
+ "properties": {
20
+ "source": {
21
+ "type": "string",
22
+ "const": "github",
23
+ "description": "Source type discriminator"
24
+ },
25
+ "owner": {
26
+ "type": "string",
27
+ "pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$",
28
+ "description": "GitHub organization or user name"
29
+ },
30
+ "repo": {
31
+ "type": "string",
32
+ "pattern": "^[a-zA-Z0-9._-]+$",
33
+ "description": "GitHub repository name"
34
+ },
35
+ "branch": {
36
+ "type": "string",
37
+ "default": "main",
38
+ "description": "Git branch to use"
39
+ },
40
+ "path": {
41
+ "type": "string",
42
+ "default": "",
43
+ "description": "Path within repository to config file (empty string = repo root)"
44
+ },
45
+ "headers": {
46
+ "type": "object",
47
+ "additionalProperties": {"type": "string"},
48
+ "description": "HTTP headers for authentication (supports ${VAR} expansion)"
49
+ }
50
+ },
51
+ "required": ["source", "owner", "repo"],
52
+ "additionalProperties": false
53
+ },
54
+ "ConfigSourceGit": {
55
+ "type": "object",
56
+ "description": "Generic Git repository config source for external team config files",
57
+ "properties": {
58
+ "source": {
59
+ "type": "string",
60
+ "const": "git",
61
+ "description": "Source type discriminator"
62
+ },
63
+ "url": {
64
+ "type": "string",
65
+ "pattern": "^(https://|git@)",
66
+ "description": "Git clone URL (HTTPS or SSH)"
67
+ },
68
+ "branch": {
69
+ "type": "string",
70
+ "default": "main",
71
+ "description": "Git branch to use"
72
+ },
73
+ "path": {
74
+ "type": "string",
75
+ "default": "",
76
+ "description": "Path within repository to config file (empty string = repo root)"
77
+ }
78
+ },
79
+ "required": ["source", "url"],
80
+ "additionalProperties": false
81
+ },
82
+ "ConfigSourceURL": {
83
+ "type": "object",
84
+ "description": "URL-based config source for external team config files (HTTPS only)",
85
+ "properties": {
86
+ "source": {
87
+ "type": "string",
88
+ "const": "url",
89
+ "description": "Source type discriminator"
90
+ },
91
+ "url": {
92
+ "type": "string",
93
+ "pattern": "^https://",
94
+ "description": "HTTPS URL to team config (HTTP forbidden)"
95
+ },
96
+ "headers": {
97
+ "type": "object",
98
+ "additionalProperties": {"type": "string"},
99
+ "description": "HTTP headers for authentication (supports ${VAR} expansion)"
100
+ }
101
+ },
102
+ "required": ["source", "url"],
103
+ "additionalProperties": false
104
+ },
105
+ "TrustGrant": {
106
+ "type": "object",
107
+ "description": "Trust delegation from org to federated team",
108
+ "properties": {
109
+ "inherit_org_marketplaces": {
110
+ "type": "boolean",
111
+ "default": true,
112
+ "description": "Whether team inherits org-level marketplace definitions"
113
+ },
114
+ "allow_additional_marketplaces": {
115
+ "type": "boolean",
116
+ "default": false,
117
+ "description": "Whether team can define additional marketplaces"
118
+ },
119
+ "marketplace_source_patterns": {
120
+ "type": "array",
121
+ "items": {"type": "string"},
122
+ "default": [],
123
+ "description": "URL patterns (with globstar) allowed for team marketplaces"
124
+ }
125
+ },
126
+ "additionalProperties": false
127
+ }
128
+ },
129
+ "properties": {
130
+ "$schema": {"type": "string", "description": "JSON Schema reference URL"},
131
+ "schema_version": {
132
+ "type": "string",
133
+ "pattern": "^1\\.[0-9]+\\.[0-9]+$",
134
+ "description": "Semantic version of this schema (must start with 1.x.x)"
135
+ },
136
+ "min_cli_version": {
137
+ "type": "string",
138
+ "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$",
139
+ "description": "Minimum SCC CLI version required to use this config"
140
+ },
141
+ "organization": {
142
+ "type": "object",
143
+ "description": "Organization identification",
144
+ "properties": {
145
+ "name": {
146
+ "type": "string",
147
+ "minLength": 1,
148
+ "description": "Display name of the organization"
149
+ },
150
+ "id": {
151
+ "type": "string",
152
+ "pattern": "^[a-z0-9-]+$",
153
+ "description": "URL-safe organization identifier"
154
+ },
155
+ "contact": {
156
+ "type": "string",
157
+ "description": "Contact email or URL for the organization"
158
+ }
159
+ },
160
+ "required": ["name", "id"]
161
+ },
162
+ "security": {
163
+ "type": "object",
164
+ "description": "Hard security boundaries (NEVER overridable by teams or projects)",
165
+ "properties": {
166
+ "blocked_plugins": {
167
+ "type": "array",
168
+ "items": {"type": "string"},
169
+ "description": "Plugin patterns to block (supports fnmatch wildcards)"
170
+ },
171
+ "blocked_mcp_servers": {
172
+ "type": "array",
173
+ "items": {"type": "string"},
174
+ "description": "fnmatch patterns to block MCP servers in SCC-managed config (org/team/project). Does NOT affect MCP servers bundled inside marketplace plugins."
175
+ },
176
+ "blocked_base_images": {
177
+ "type": "array",
178
+ "items": {"type": "string"},
179
+ "description": "Docker base image patterns to block (supports fnmatch wildcards)"
180
+ },
181
+ "allow_stdio_mcp": {
182
+ "type": "boolean",
183
+ "default": false,
184
+ "description": "Whether stdio-type MCP servers are allowed. Disabled by default because stdio servers have elevated privileges (mounted workspace, network, tokens)."
185
+ },
186
+ "allowed_stdio_prefixes": {
187
+ "type": "array",
188
+ "items": {"type": "string"},
189
+ "description": "Absolute path prefixes where stdio commands must reside. If not set, any absolute path is allowed (when allow_stdio_mcp is true). Uses realpath + commonpath for secure validation."
190
+ },
191
+ "safety_net": {
192
+ "type": "object",
193
+ "description": "Configuration for scc-safety-net plugin (blocks destructive git commands)",
194
+ "properties": {
195
+ "action": {
196
+ "type": "string",
197
+ "enum": ["block", "warn", "allow"],
198
+ "default": "block",
199
+ "description": "Action mode: block (stop execution), warn (show warning but allow), allow (no checks)"
200
+ },
201
+ "block_force_push": {
202
+ "type": "boolean",
203
+ "default": true,
204
+ "description": "Block git push --force and +refspec force pushes"
205
+ },
206
+ "block_reset_hard": {
207
+ "type": "boolean",
208
+ "default": true,
209
+ "description": "Block git reset --hard (destroys uncommitted changes)"
210
+ },
211
+ "block_branch_force_delete": {
212
+ "type": "boolean",
213
+ "default": true,
214
+ "description": "Block git branch -D (force delete without merge check)"
215
+ },
216
+ "block_checkout_restore": {
217
+ "type": "boolean",
218
+ "default": true,
219
+ "description": "Block git checkout -- <file> and git restore <file> (discards file changes)"
220
+ },
221
+ "block_clean": {
222
+ "type": "boolean",
223
+ "default": true,
224
+ "description": "Block git clean -f (deletes untracked files)"
225
+ },
226
+ "block_stash_destructive": {
227
+ "type": "boolean",
228
+ "default": true,
229
+ "description": "Block git stash drop/clear (permanently loses stashed work)"
230
+ }
231
+ },
232
+ "additionalProperties": false
233
+ }
234
+ },
235
+ "additionalProperties": false
236
+ },
237
+ "defaults": {
238
+ "type": "object",
239
+ "description": "Default settings (baseline, can be extended if delegated)",
240
+ "properties": {
241
+ "allowed_plugins": {
242
+ "type": "array",
243
+ "items": {"type": "string"},
244
+ "description": "Default allowed plugins (can be extended by teams)"
245
+ },
246
+ "allowed_mcp_servers": {
247
+ "type": "array",
248
+ "items": {"type": "string"},
249
+ "description": "Default allowed MCP server patterns"
250
+ },
251
+ "enabled_plugins": {
252
+ "type": "array",
253
+ "items": {"type": "string"},
254
+ "description": "Baseline enabled plugins for all teams (plugin@marketplace format)"
255
+ },
256
+ "disabled_plugins": {
257
+ "type": "array",
258
+ "items": {"type": "string"},
259
+ "description": "Plugins explicitly disabled (overrides enabled_plugins)"
260
+ },
261
+ "extra_marketplaces": {
262
+ "type": "array",
263
+ "items": {"type": "string"},
264
+ "description": "Additional marketplace names to include (references top-level marketplaces)"
265
+ },
266
+ "cache_ttl_hours": {
267
+ "type": "integer",
268
+ "minimum": 1,
269
+ "maximum": 168,
270
+ "default": 24,
271
+ "description": "Organization config cache TTL in hours (1-168, default 24)"
272
+ },
273
+ "network_policy": {
274
+ "type": "string",
275
+ "enum": ["corp-proxy-only", "unrestricted", "isolated"],
276
+ "description": "Network access policy"
277
+ },
278
+ "session": {
279
+ "type": "object",
280
+ "properties": {
281
+ "timeout_hours": {
282
+ "type": "integer",
283
+ "minimum": 1,
284
+ "maximum": 24,
285
+ "description": "Session timeout in hours (1-24)"
286
+ },
287
+ "auto_resume": {
288
+ "type": "boolean",
289
+ "description": "Whether sessions can be automatically resumed"
290
+ }
291
+ },
292
+ "additionalProperties": false
293
+ }
294
+ },
295
+ "additionalProperties": false
296
+ },
297
+ "delegation": {
298
+ "type": "object",
299
+ "description": "Delegation rules controlling what teams/projects can add",
300
+ "properties": {
301
+ "teams": {
302
+ "type": "object",
303
+ "description": "What teams are allowed to add",
304
+ "properties": {
305
+ "allow_additional_plugins": {
306
+ "type": "array",
307
+ "items": {"type": "string"},
308
+ "description": "Plugin patterns teams can add (use ['*'] for unrestricted)"
309
+ },
310
+ "allow_additional_mcp_servers": {
311
+ "type": "array",
312
+ "items": {"type": "string"},
313
+ "description": "Team names or patterns that can add MCP servers"
314
+ },
315
+ "allow_network_override": {
316
+ "type": "array",
317
+ "items": {"type": "string"},
318
+ "description": "Network policies teams can override to"
319
+ }
320
+ },
321
+ "additionalProperties": false
322
+ },
323
+ "projects": {
324
+ "type": "object",
325
+ "description": "Project-level delegation settings",
326
+ "properties": {
327
+ "inherit_team_delegation": {
328
+ "type": "boolean",
329
+ "description": "Whether teams can delegate to projects (master switch)"
330
+ }
331
+ },
332
+ "additionalProperties": false
333
+ }
334
+ },
335
+ "additionalProperties": false
336
+ },
337
+ "profiles": {
338
+ "type": "object",
339
+ "description": "Team profiles with configurations and delegation settings",
340
+ "additionalProperties": {
341
+ "type": "object",
342
+ "properties": {
343
+ "description": {
344
+ "type": "string",
345
+ "description": "Human-readable description of this team profile"
346
+ },
347
+ "additional_plugins": {
348
+ "type": "array",
349
+ "items": {"type": "string"},
350
+ "description": "Additional plugins enabled for this team"
351
+ },
352
+ "additional_mcp_servers": {
353
+ "type": "array",
354
+ "items": {
355
+ "type": "object",
356
+ "properties": {
357
+ "name": {"type": "string", "description": "MCP server name"},
358
+ "type": {
359
+ "type": "string",
360
+ "enum": ["sse", "stdio", "http"],
361
+ "description": "MCP server connection type (sse, stdio, or http)"
362
+ },
363
+ "url": {
364
+ "type": "string",
365
+ "format": "uri",
366
+ "description": "MCP server URL (required for sse and http types)"
367
+ },
368
+ "command": {
369
+ "type": "string",
370
+ "description": "Command to run (required for stdio type)"
371
+ },
372
+ "args": {
373
+ "type": "array",
374
+ "items": {"type": "string"},
375
+ "description": "Command arguments (for stdio type)"
376
+ },
377
+ "env": {
378
+ "type": "object",
379
+ "additionalProperties": {"type": "string"},
380
+ "description": "Environment variables for stdio type (values can use ${VAR} syntax)"
381
+ },
382
+ "headers": {
383
+ "type": "object",
384
+ "additionalProperties": {"type": "string"},
385
+ "description": "HTTP headers for sse/http types (values can use ${VAR} syntax)"
386
+ }
387
+ },
388
+ "required": ["name", "type"],
389
+ "oneOf": [
390
+ {"properties": {"type": {"const": "sse"}}, "required": ["url"]},
391
+ {"properties": {"type": {"const": "http"}}, "required": ["url"]},
392
+ {"properties": {"type": {"const": "stdio"}}, "required": ["command"]}
393
+ ]
394
+ },
395
+ "description": "Additional MCP servers for this team"
396
+ },
397
+ "network_policy": {
398
+ "type": "string",
399
+ "enum": ["corp-proxy-only", "unrestricted", "isolated"],
400
+ "description": "Override network policy for this team"
401
+ },
402
+ "session": {
403
+ "type": "object",
404
+ "properties": {
405
+ "timeout_hours": {"type": "integer", "minimum": 1, "maximum": 24},
406
+ "auto_resume": {"type": "boolean"}
407
+ },
408
+ "additionalProperties": false
409
+ },
410
+ "delegation": {
411
+ "type": "object",
412
+ "description": "Team-level delegation to projects",
413
+ "properties": {
414
+ "allow_project_overrides": {
415
+ "type": "boolean",
416
+ "description": "Whether projects can add to this team's config"
417
+ }
418
+ },
419
+ "additionalProperties": false
420
+ },
421
+ "config_source": {
422
+ "$ref": "#/$defs/ConfigSource",
423
+ "description": "External config source (if set, team is federated)"
424
+ },
425
+ "trust": {
426
+ "$ref": "#/$defs/TrustGrant",
427
+ "description": "Trust delegation controls for federated teams"
428
+ }
429
+ }
430
+ }
431
+ },
432
+ "stats": {
433
+ "type": "object",
434
+ "description": "Usage statistics configuration",
435
+ "properties": {
436
+ "enabled": {
437
+ "type": "boolean",
438
+ "description": "Whether to collect usage statistics"
439
+ },
440
+ "user_identity_mode": {
441
+ "type": "string",
442
+ "enum": ["hash", "clear", "anonymous"],
443
+ "description": "How to identify users in stats (hash=SHA256, clear=username, anonymous=no identifier)"
444
+ },
445
+ "retention_days": {
446
+ "type": "integer",
447
+ "minimum": 1,
448
+ "maximum": 365,
449
+ "description": "Number of days to retain stats (1-365)"
450
+ }
451
+ },
452
+ "additionalProperties": false
453
+ }
454
+ },
455
+ "required": ["schema_version", "organization"]
456
+ }
@@ -0,0 +1,163 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://scc-cli.dev/schemas/team-config.v1.json",
4
+ "title": "SCC Team Config v1",
5
+ "description": "Schema for external team configuration files (Phase 2: Federated Team Configs)",
6
+ "type": "object",
7
+ "properties": {
8
+ "$schema": {
9
+ "type": "string",
10
+ "description": "JSON Schema reference URL"
11
+ },
12
+ "schema_version": {
13
+ "type": "integer",
14
+ "const": 1,
15
+ "description": "Schema version (must be 1)"
16
+ },
17
+ "enabled_plugins": {
18
+ "type": "array",
19
+ "items": {"type": "string"},
20
+ "default": [],
21
+ "description": "Plugins enabled by this team config (format: plugin-name@marketplace)"
22
+ },
23
+ "disabled_plugins": {
24
+ "type": "array",
25
+ "items": {"type": "string"},
26
+ "default": [],
27
+ "description": "Glob patterns for plugins to disable (removes from org defaults)"
28
+ },
29
+ "marketplaces": {
30
+ "type": "object",
31
+ "description": "Team-defined marketplace sources (key = marketplace name)",
32
+ "additionalProperties": {
33
+ "$ref": "#/$defs/MarketplaceSource"
34
+ },
35
+ "default": {}
36
+ }
37
+ },
38
+ "required": ["schema_version"],
39
+ "additionalProperties": false,
40
+ "$defs": {
41
+ "MarketplaceSource": {
42
+ "description": "Discriminated union for marketplace source types",
43
+ "oneOf": [
44
+ {"$ref": "#/$defs/MarketplaceSourceGitHub"},
45
+ {"$ref": "#/$defs/MarketplaceSourceGit"},
46
+ {"$ref": "#/$defs/MarketplaceSourceURL"},
47
+ {"$ref": "#/$defs/MarketplaceSourceDirectory"}
48
+ ]
49
+ },
50
+ "MarketplaceSourceGitHub": {
51
+ "type": "object",
52
+ "description": "GitHub repository marketplace source",
53
+ "properties": {
54
+ "source": {
55
+ "type": "string",
56
+ "const": "github",
57
+ "description": "Source type discriminator"
58
+ },
59
+ "owner": {
60
+ "type": "string",
61
+ "pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$",
62
+ "description": "GitHub organization or user name"
63
+ },
64
+ "repo": {
65
+ "type": "string",
66
+ "pattern": "^[a-zA-Z0-9._-]+$",
67
+ "description": "GitHub repository name"
68
+ },
69
+ "branch": {
70
+ "type": "string",
71
+ "default": "main",
72
+ "description": "Git branch to use"
73
+ },
74
+ "path": {
75
+ "type": "string",
76
+ "default": "/",
77
+ "description": "Path within repository to marketplace root"
78
+ },
79
+ "headers": {
80
+ "type": "object",
81
+ "additionalProperties": {"type": "string"},
82
+ "description": "HTTP headers for authentication (supports ${VAR} expansion)"
83
+ }
84
+ },
85
+ "required": ["source", "owner", "repo"],
86
+ "additionalProperties": false
87
+ },
88
+ "MarketplaceSourceGit": {
89
+ "type": "object",
90
+ "description": "Generic Git repository marketplace source",
91
+ "properties": {
92
+ "source": {
93
+ "type": "string",
94
+ "const": "git",
95
+ "description": "Source type discriminator"
96
+ },
97
+ "url": {
98
+ "type": "string",
99
+ "pattern": "^(https://|git@)",
100
+ "description": "Git clone URL (HTTPS or SSH)"
101
+ },
102
+ "branch": {
103
+ "type": "string",
104
+ "default": "main",
105
+ "description": "Git branch to use"
106
+ },
107
+ "path": {
108
+ "type": "string",
109
+ "default": "/",
110
+ "description": "Path within repository to marketplace root"
111
+ }
112
+ },
113
+ "required": ["source", "url"],
114
+ "additionalProperties": false
115
+ },
116
+ "MarketplaceSourceURL": {
117
+ "type": "object",
118
+ "description": "URL-based marketplace source (HTTPS only)",
119
+ "properties": {
120
+ "source": {
121
+ "type": "string",
122
+ "const": "url",
123
+ "description": "Source type discriminator"
124
+ },
125
+ "url": {
126
+ "type": "string",
127
+ "pattern": "^https://",
128
+ "description": "HTTPS URL to marketplace manifest (HTTP forbidden)"
129
+ },
130
+ "headers": {
131
+ "type": "object",
132
+ "additionalProperties": {"type": "string"},
133
+ "description": "HTTP headers for authentication (supports ${VAR} expansion)"
134
+ },
135
+ "materialization_mode": {
136
+ "type": "string",
137
+ "enum": ["self_contained", "metadata_only", "best_effort"],
138
+ "default": "self_contained",
139
+ "description": "How to fetch marketplace content"
140
+ }
141
+ },
142
+ "required": ["source", "url"],
143
+ "additionalProperties": false
144
+ },
145
+ "MarketplaceSourceDirectory": {
146
+ "type": "object",
147
+ "description": "Local directory marketplace source",
148
+ "properties": {
149
+ "source": {
150
+ "type": "string",
151
+ "const": "directory",
152
+ "description": "Source type discriminator"
153
+ },
154
+ "path": {
155
+ "type": "string",
156
+ "description": "Local filesystem path (absolute or relative to org config)"
157
+ }
158
+ },
159
+ "required": ["source", "path"],
160
+ "additionalProperties": false
161
+ }
162
+ }
163
+ }
@@ -0,0 +1 @@
1
+ """Services layer - domain logic separated from UI."""