@sitecoreai-labs/sitecoreai-cli 0.0.4 → 0.1.0
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/AGENTS.md +146 -55
- package/README.md +372 -325
- package/dist/agents/api/agents.d.ts +27 -0
- package/dist/agents/api/agents.js +70 -0
- package/dist/agents/api/catalog.d.ts +8 -0
- package/dist/agents/api/catalog.js +33 -0
- package/dist/agents/api/custom-mcps.d.ts +26 -0
- package/dist/agents/api/custom-mcps.js +53 -0
- package/dist/agents/api/html-templates.d.ts +35 -0
- package/dist/agents/api/html-templates.js +116 -0
- package/dist/agents/api/request.d.ts +28 -0
- package/dist/agents/api/request.js +207 -0
- package/dist/agents/api/runs.d.ts +31 -0
- package/dist/agents/api/runs.js +82 -0
- package/dist/agents/api/schema.d.ts +182 -0
- package/dist/agents/api/schema.js +10 -0
- package/dist/agents/api/schemas.d.ts +37 -0
- package/dist/agents/api/schemas.js +95 -0
- package/dist/agents/api/skills.d.ts +25 -0
- package/dist/agents/api/skills.js +55 -0
- package/dist/agents/api/spaces.d.ts +34 -0
- package/dist/agents/api/spaces.js +72 -0
- package/dist/agents/api/tools.d.ts +4 -0
- package/dist/agents/api/tools.js +18 -0
- package/dist/agents/api/widgets.d.ts +32 -0
- package/dist/agents/api/widgets.js +89 -0
- package/dist/agents/client.d.ts +18 -0
- package/dist/agents/client.js +28 -0
- package/dist/agents/index.d.ts +31 -0
- package/dist/agents/index.js +51 -0
- package/dist/agents/recipe/agent.diff.d.ts +4 -0
- package/dist/agents/recipe/agent.diff.js +55 -0
- package/dist/agents/recipe/agent.kind.d.ts +12 -0
- package/dist/agents/recipe/agent.kind.js +107 -0
- package/dist/agents/recipe/agent.schema.d.ts +26 -0
- package/dist/agents/recipe/agent.schema.js +42 -0
- package/dist/agents/recipe/client.d.ts +4 -0
- package/dist/agents/recipe/client.js +15 -0
- package/dist/agents/recipe/converge.d.ts +11 -0
- package/dist/agents/recipe/converge.js +32 -0
- package/dist/agents/recipe/custom-mcp.kind.d.ts +4 -0
- package/dist/agents/recipe/custom-mcp.kind.js +42 -0
- package/dist/agents/recipe/custom-mcp.schema.d.ts +11 -0
- package/dist/agents/recipe/custom-mcp.schema.js +15 -0
- package/dist/agents/recipe/html-template.kind.d.ts +4 -0
- package/dist/agents/recipe/html-template.kind.js +50 -0
- package/dist/agents/recipe/html-template.schema.d.ts +13 -0
- package/dist/agents/recipe/html-template.schema.js +17 -0
- package/dist/agents/recipe/index.d.ts +43 -0
- package/dist/agents/recipe/index.js +81 -0
- package/dist/agents/recipe/schema.kind.d.ts +4 -0
- package/dist/agents/recipe/schema.kind.js +50 -0
- package/dist/agents/recipe/schema.schema.d.ts +15 -0
- package/dist/agents/recipe/schema.schema.js +21 -0
- package/dist/agents/recipe/skill.kind.d.ts +4 -0
- package/dist/agents/recipe/skill.kind.js +48 -0
- package/dist/agents/recipe/skill.schema.d.ts +14 -0
- package/dist/agents/recipe/skill.schema.js +18 -0
- package/dist/agents/recipe/widget.kind.d.ts +4 -0
- package/dist/agents/recipe/widget.kind.js +49 -0
- package/dist/agents/recipe/widget.schema.d.ts +20 -0
- package/dist/agents/recipe/widget.schema.js +23 -0
- package/dist/agents/session/index.d.ts +50 -0
- package/dist/agents/session/index.js +127 -0
- package/dist/agents/session/playwright-login.d.ts +11 -0
- package/dist/agents/session/playwright-login.js +169 -0
- package/dist/agents/session/types.d.ts +72 -0
- package/dist/agents/session/types.js +26 -0
- package/dist/agents/tasks/agent.d.ts +27 -0
- package/dist/agents/tasks/agent.js +183 -0
- package/dist/agents/tasks/index.d.ts +14 -0
- package/dist/agents/tasks/index.js +30 -0
- package/dist/agents/tasks/resources.d.ts +39 -0
- package/dist/agents/tasks/resources.js +219 -0
- package/dist/agents/tasks/session.d.ts +6 -0
- package/dist/agents/tasks/session.js +63 -0
- package/dist/agents/tasks/shared.d.ts +38 -0
- package/dist/agents/tasks/shared.js +72 -0
- package/dist/agents/tasks/space.d.ts +12 -0
- package/dist/agents/tasks/space.js +55 -0
- package/dist/brand/api/auth.d.ts +58 -0
- package/dist/brand/api/auth.js +141 -0
- package/dist/brand/api/client.d.ts +40 -0
- package/dist/brand/api/client.js +83 -0
- package/dist/brand/api/types.d.ts +119 -0
- package/dist/brand/api/types.js +9 -0
- package/dist/brand/credential.d.ts +55 -0
- package/dist/brand/credential.js +87 -0
- package/dist/brand/documents/list.d.ts +85 -0
- package/dist/brand/documents/list.js +53 -0
- package/dist/brand/documents/upload.d.ts +113 -0
- package/dist/brand/documents/upload.js +106 -0
- package/dist/brand/index.d.ts +33 -0
- package/dist/brand/index.js +76 -0
- package/dist/brand/kits/create.d.ts +58 -0
- package/dist/brand/kits/create.js +68 -0
- package/dist/brand/kits/list.d.ts +53 -0
- package/dist/brand/kits/list.js +36 -0
- package/dist/brand/kits/sections.d.ts +156 -0
- package/dist/brand/kits/sections.js +80 -0
- package/dist/brand/pipeline/run.d.ts +58 -0
- package/dist/brand/pipeline/run.js +63 -0
- package/dist/brand/recipe/client.d.ts +4 -0
- package/dist/brand/recipe/client.js +24 -0
- package/dist/brand/recipe/diff.d.ts +4 -0
- package/dist/brand/recipe/diff.js +74 -0
- package/dist/brand/recipe/index.d.ts +10 -0
- package/dist/brand/recipe/index.js +20 -0
- package/dist/brand/recipe/kind.d.ts +4 -0
- package/dist/brand/recipe/kind.js +0 -0
- package/dist/brand/recipe/schema.d.ts +54 -0
- package/dist/brand/recipe/schema.js +59 -0
- package/dist/brand/review/format-json.d.ts +33 -0
- package/dist/brand/review/format-json.js +36 -0
- package/dist/brand/review/format-sarif.d.ts +64 -0
- package/dist/brand/review/format-sarif.js +77 -0
- package/dist/brand/review/format-text.d.ts +24 -0
- package/dist/brand/review/format-text.js +60 -0
- package/dist/brand/review/generate.d.ts +37 -0
- package/dist/brand/review/generate.js +146 -0
- package/dist/brand/review/outcomes.d.ts +43 -0
- package/dist/brand/review/outcomes.js +58 -0
- package/dist/brand/seed.d.ts +81 -0
- package/dist/brand/seed.js +151 -0
- package/dist/brand/tasks/login.d.ts +37 -0
- package/dist/brand/tasks/login.js +192 -0
- package/dist/brand/tasks/review.d.ts +111 -0
- package/dist/brand/tasks/review.js +310 -0
- package/dist/brief/api/brief-types.d.ts +64 -0
- package/dist/brief/api/brief-types.js +103 -0
- package/dist/brief/api/briefs.d.ts +66 -0
- package/dist/brief/api/briefs.js +58 -0
- package/dist/brief/api/comments.d.ts +43 -0
- package/dist/brief/api/comments.js +29 -0
- package/dist/brief/api/request.d.ts +5 -0
- package/dist/brief/api/request.js +83 -0
- package/dist/brief/api/schema.d.ts +158 -0
- package/dist/brief/api/schema.js +18 -0
- package/dist/brief/api/tasks.d.ts +41 -0
- package/dist/brief/api/tasks.js +24 -0
- package/dist/brief/api/types.d.ts +17 -0
- package/dist/brief/api/types.js +21 -0
- package/dist/brief/auth.d.ts +44 -0
- package/dist/brief/auth.js +101 -0
- package/dist/brief/client.d.ts +25 -0
- package/dist/brief/client.js +56 -0
- package/dist/brief/index.d.ts +31 -0
- package/dist/brief/index.js +53 -0
- package/dist/brief/recipe/client.d.ts +4 -0
- package/dist/brief/recipe/client.js +52 -0
- package/dist/brief/recipe/diff.d.ts +4 -0
- package/dist/brief/recipe/diff.js +74 -0
- package/dist/brief/recipe/index.d.ts +10 -0
- package/dist/brief/recipe/index.js +23 -0
- package/dist/brief/recipe/kind.d.ts +4 -0
- package/dist/brief/recipe/kind.js +114 -0
- package/dist/brief/recipe/schema.d.ts +152 -0
- package/dist/brief/recipe/schema.js +99 -0
- package/dist/brief/tasks/index.d.ts +128 -0
- package/dist/brief/tasks/index.js +286 -0
- package/dist/campaigns/api/deliverables.d.ts +37 -0
- package/dist/campaigns/api/deliverables.js +30 -0
- package/dist/campaigns/api/projects.d.ts +49 -0
- package/dist/campaigns/api/projects.js +45 -0
- package/dist/campaigns/api/request.d.ts +5 -0
- package/dist/campaigns/api/request.js +119 -0
- package/dist/campaigns/api/schema.d.ts +144 -0
- package/dist/campaigns/api/schema.js +22 -0
- package/dist/campaigns/api/tasks.d.ts +42 -0
- package/dist/campaigns/api/tasks.js +68 -0
- package/dist/campaigns/api/types.d.ts +17 -0
- package/dist/campaigns/api/types.js +27 -0
- package/dist/campaigns/api/users.d.ts +13 -0
- package/dist/campaigns/api/users.js +16 -0
- package/dist/campaigns/auth.d.ts +19 -0
- package/dist/campaigns/auth.js +86 -0
- package/dist/campaigns/client.d.ts +25 -0
- package/dist/campaigns/client.js +48 -0
- package/dist/campaigns/index.d.ts +29 -0
- package/dist/campaigns/index.js +47 -0
- package/dist/campaigns/recipe/client.d.ts +4 -0
- package/dist/campaigns/recipe/client.js +41 -0
- package/dist/campaigns/recipe/diff.d.ts +4 -0
- package/dist/campaigns/recipe/diff.js +119 -0
- package/dist/campaigns/recipe/index.d.ts +10 -0
- package/dist/campaigns/recipe/index.js +19 -0
- package/dist/campaigns/recipe/kind.d.ts +4 -0
- package/dist/campaigns/recipe/kind.js +217 -0
- package/dist/campaigns/recipe/schema.d.ts +79 -0
- package/dist/campaigns/recipe/schema.js +67 -0
- package/dist/campaigns/tasks/index.d.ts +124 -0
- package/dist/campaigns/tasks/index.js +271 -0
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +84 -63
- package/dist/commands/agents/index.d.ts +28 -0
- package/dist/commands/agents/index.js +289 -0
- package/dist/commands/agents/sync.d.ts +13 -0
- package/dist/commands/agents/sync.js +139 -0
- package/dist/commands/audit/all.d.ts +2 -0
- package/dist/commands/audit/all.js +26 -0
- package/dist/commands/audit/alt-text-missing.d.ts +2 -0
- package/dist/commands/audit/alt-text-missing.js +19 -0
- package/dist/commands/audit/baseline.d.ts +2 -0
- package/dist/commands/audit/baseline.js +75 -0
- package/dist/commands/audit/broken-images.d.ts +2 -0
- package/dist/commands/audit/broken-images.js +25 -0
- package/dist/commands/audit/broken-links.d.ts +2 -0
- package/dist/commands/audit/broken-links.js +18 -0
- package/dist/commands/audit/datasource-missing.d.ts +2 -0
- package/dist/commands/audit/datasource-missing.js +19 -0
- package/dist/commands/audit/dead-templates.d.ts +2 -0
- package/dist/commands/audit/dead-templates.js +18 -0
- package/dist/commands/audit/duplicates.d.ts +2 -0
- package/dist/commands/audit/duplicates.js +21 -0
- package/dist/commands/audit/empty-items.d.ts +2 -0
- package/dist/commands/audit/empty-items.js +19 -0
- package/dist/commands/audit/empty-links.d.ts +2 -0
- package/dist/commands/audit/empty-links.js +25 -0
- package/dist/commands/audit/empty-roles.d.ts +2 -0
- package/dist/commands/audit/empty-roles.js +18 -0
- package/dist/commands/audit/fallback-drift.d.ts +2 -0
- package/dist/commands/audit/fallback-drift.js +22 -0
- package/dist/commands/audit/find-replace.d.ts +2 -0
- package/dist/commands/audit/find-replace.js +27 -0
- package/dist/commands/audit/heavy-templates.d.ts +2 -0
- package/dist/commands/audit/heavy-templates.js +19 -0
- package/dist/commands/audit/history.d.ts +2 -0
- package/dist/commands/audit/history.js +44 -0
- package/dist/commands/audit/index.d.ts +2 -0
- package/dist/commands/audit/index.js +100 -0
- package/dist/commands/audit/language-data.d.ts +2 -0
- package/dist/commands/audit/language-data.js +24 -0
- package/dist/commands/audit/large-fields.d.ts +2 -0
- package/dist/commands/audit/large-fields.js +21 -0
- package/dist/commands/audit/missing-meta.d.ts +2 -0
- package/dist/commands/audit/missing-meta.js +22 -0
- package/dist/commands/audit/orphans.d.ts +2 -0
- package/dist/commands/audit/orphans.js +22 -0
- package/dist/commands/audit/page-design-orphans.d.ts +2 -0
- package/dist/commands/audit/page-design-orphans.js +18 -0
- package/dist/commands/audit/personalization-broken.d.ts +2 -0
- package/dist/commands/audit/personalization-broken.js +18 -0
- package/dist/commands/audit/references.d.ts +2 -0
- package/dist/commands/audit/references.js +27 -0
- package/dist/commands/audit/role-bloat.d.ts +2 -0
- package/dist/commands/audit/role-bloat.js +19 -0
- package/dist/commands/audit/shared.d.ts +7 -0
- package/dist/commands/audit/shared.js +32 -0
- package/dist/commands/audit/site-residue.d.ts +2 -0
- package/dist/commands/audit/site-residue.js +22 -0
- package/dist/commands/audit/slug-conflicts.d.ts +2 -0
- package/dist/commands/audit/slug-conflicts.js +20 -0
- package/dist/commands/audit/stale-content.d.ts +2 -0
- package/dist/commands/audit/stale-content.js +21 -0
- package/dist/commands/audit/stale-users.d.ts +2 -0
- package/dist/commands/audit/stale-users.js +21 -0
- package/dist/commands/audit/stale-workflow.d.ts +2 -0
- package/dist/commands/audit/stale-workflow.js +19 -0
- package/dist/commands/audit/suite.d.ts +2 -0
- package/dist/commands/audit/suite.js +31 -0
- package/dist/commands/audit/template-dependencies.d.ts +2 -0
- package/dist/commands/audit/template-dependencies.js +22 -0
- package/dist/commands/audit/translation-coverage.d.ts +2 -0
- package/dist/commands/audit/translation-coverage.js +22 -0
- package/dist/commands/audit/unused-media.d.ts +2 -0
- package/dist/commands/audit/unused-media.js +21 -0
- package/dist/commands/brand/docs.d.ts +9 -0
- package/dist/commands/brand/docs.js +168 -0
- package/dist/commands/brand/index.d.ts +13 -0
- package/dist/commands/brand/index.js +37 -0
- package/dist/commands/brand/ingest-enrich.d.ts +3 -0
- package/dist/commands/brand/ingest-enrich.js +71 -0
- package/dist/commands/brand/kits.d.ts +18 -0
- package/dist/commands/brand/kits.js +361 -0
- package/dist/commands/brand/review.d.ts +13 -0
- package/dist/commands/brand/review.js +65 -0
- package/dist/commands/brand/seed.d.ts +9 -0
- package/dist/commands/brand/seed.js +136 -0
- package/dist/commands/brand/sync.d.ts +11 -0
- package/dist/commands/brand/sync.js +128 -0
- package/dist/commands/brief/comments.d.ts +11 -0
- package/dist/commands/brief/comments.js +55 -0
- package/dist/commands/brief/delete.d.ts +10 -0
- package/dist/commands/brief/delete.js +40 -0
- package/dist/commands/brief/index.d.ts +19 -0
- package/dist/commands/brief/index.js +53 -0
- package/dist/commands/brief/list.d.ts +2 -0
- package/dist/commands/brief/list.js +19 -0
- package/dist/commands/brief/set-status.d.ts +10 -0
- package/dist/commands/brief/set-status.js +33 -0
- package/dist/commands/brief/show.d.ts +2 -0
- package/dist/commands/brief/show.js +19 -0
- package/dist/commands/brief/sync.d.ts +12 -0
- package/dist/commands/brief/sync.js +121 -0
- package/dist/commands/brief/todos.d.ts +9 -0
- package/dist/commands/brief/todos.js +28 -0
- package/dist/commands/brief/types.d.ts +16 -0
- package/dist/commands/brief/types.js +129 -0
- package/dist/commands/campaign/index.d.ts +2 -0
- package/dist/commands/campaign/index.js +309 -0
- package/dist/commands/campaign/sync.d.ts +12 -0
- package/dist/commands/campaign/sync.js +121 -0
- package/dist/commands/cleanup/archive.d.ts +2 -0
- package/dist/commands/cleanup/archive.js +21 -0
- package/dist/commands/cleanup/dead-templates.d.ts +2 -0
- package/dist/commands/cleanup/dead-templates.js +21 -0
- package/dist/commands/cleanup/duplicates.d.ts +2 -0
- package/dist/commands/cleanup/duplicates.js +49 -0
- package/dist/commands/cleanup/empty-folders.d.ts +2 -0
- package/dist/commands/cleanup/empty-folders.js +18 -0
- package/dist/commands/cleanup/field-set.d.ts +2 -0
- package/dist/commands/cleanup/field-set.js +44 -0
- package/dist/commands/cleanup/find-replace.d.ts +2 -0
- package/dist/commands/cleanup/find-replace.js +35 -0
- package/dist/commands/cleanup/index.d.ts +2 -0
- package/dist/commands/cleanup/index.js +48 -0
- package/dist/commands/cleanup/language-versions.d.ts +2 -0
- package/dist/commands/cleanup/language-versions.js +25 -0
- package/dist/commands/cleanup/rename.d.ts +2 -0
- package/dist/commands/cleanup/rename.js +32 -0
- package/dist/commands/cleanup/roles.d.ts +2 -0
- package/dist/commands/cleanup/roles.js +20 -0
- package/dist/commands/cleanup/shared.d.ts +2 -0
- package/dist/commands/cleanup/shared.js +15 -0
- package/dist/commands/cleanup/site-residue.d.ts +2 -0
- package/dist/commands/cleanup/site-residue.js +32 -0
- package/dist/commands/cleanup/slug-conflicts.d.ts +2 -0
- package/dist/commands/cleanup/slug-conflicts.js +54 -0
- package/dist/commands/cleanup/subtree.d.ts +2 -0
- package/dist/commands/cleanup/subtree.js +25 -0
- package/dist/commands/cleanup/users.d.ts +2 -0
- package/dist/commands/cleanup/users.js +23 -0
- package/dist/commands/cleanup/versions.d.ts +2 -0
- package/dist/commands/cleanup/versions.js +42 -0
- package/dist/commands/cleanup/workflow.d.ts +2 -0
- package/dist/commands/cleanup/workflow.js +40 -0
- package/dist/commands/config.d.ts +0 -1
- package/dist/commands/config.js +3 -3
- package/dist/commands/content/index.d.ts +2 -0
- package/dist/commands/content/index.js +11 -0
- package/dist/commands/content/version/index.d.ts +2 -0
- package/dist/commands/content/version/index.js +19 -0
- package/dist/commands/content/version/inspect.d.ts +2 -0
- package/dist/commands/content/version/inspect.js +22 -0
- package/dist/commands/content/version/set-never-publish.d.ts +2 -0
- package/dist/commands/content/version/set-never-publish.js +40 -0
- package/dist/commands/content/version/set-validity.d.ts +2 -0
- package/dist/commands/content/version/set-validity.js +30 -0
- package/dist/commands/deploy/deployments.d.ts +0 -1
- package/dist/commands/deploy/deployments.js +9 -9
- package/dist/commands/deploy/editing-host.d.ts +0 -1
- package/dist/commands/deploy/editing-host.js +25 -13
- package/dist/commands/deploy/environments/deployments.d.ts +0 -1
- package/dist/commands/deploy/environments/deployments.js +3 -3
- package/dist/commands/deploy/environments/index.d.ts +0 -1
- package/dist/commands/deploy/environments/index.js +1 -0
- package/dist/commands/deploy/environments/mutations.d.ts +0 -1
- package/dist/commands/deploy/environments/mutations.js +18 -17
- package/dist/commands/deploy/environments/queries.d.ts +1 -1
- package/dist/commands/deploy/environments/queries.js +29 -8
- package/dist/commands/deploy/environments/variables.d.ts +0 -1
- package/dist/commands/deploy/environments/variables.js +9 -8
- package/dist/commands/deploy/environments.d.ts +0 -1
- package/dist/commands/deploy/index.d.ts +0 -1
- package/dist/commands/deploy/index.js +1 -1
- package/dist/commands/deploy/logs.d.ts +0 -1
- package/dist/commands/deploy/logs.js +4 -4
- package/dist/commands/deploy/organizations.d.ts +0 -1
- package/dist/commands/deploy/organizations.js +5 -5
- package/dist/commands/deploy/projects.d.ts +0 -1
- package/dist/commands/deploy/projects.js +32 -20
- package/dist/commands/deploy/shared.d.ts +0 -1
- package/dist/commands/deploy/shared.js +1 -0
- package/dist/commands/deploy/site.d.ts +2 -3
- package/dist/commands/deploy/site.js +6 -5
- package/dist/commands/deploy/source-control.d.ts +0 -1
- package/dist/commands/deploy/source-control.js +13 -13
- package/dist/commands/deploy.d.ts +0 -1
- package/dist/commands/explain/index.d.ts +14 -0
- package/dist/commands/explain/index.js +25 -0
- package/dist/commands/explain/orphan-site.d.ts +11 -0
- package/dist/commands/explain/orphan-site.js +36 -0
- package/dist/commands/explain/why-blocked.d.ts +13 -0
- package/dist/commands/explain/why-blocked.js +42 -0
- package/dist/commands/health.d.ts +2 -0
- package/dist/commands/health.js +28 -0
- package/dist/commands/history.d.ts +0 -1
- package/dist/commands/history.js +11 -42
- package/dist/commands/init.d.ts +0 -1
- package/dist/commands/init.js +42 -8
- package/dist/commands/login.d.ts +11 -1
- package/dist/commands/login.js +35 -4
- package/dist/commands/logout.d.ts +0 -1
- package/dist/commands/logout.js +3 -3
- package/dist/commands/mcp/serve.d.ts +27 -0
- package/dist/commands/mcp/serve.js +120 -0
- package/dist/commands/mcp/tools.d.ts +8 -0
- package/dist/commands/mcp/tools.js +75 -0
- package/dist/commands/mcp.d.ts +2 -0
- package/dist/commands/mcp.js +23 -0
- package/dist/commands/policy.d.ts +16 -0
- package/dist/commands/policy.js +296 -0
- package/dist/commands/publish/all.d.ts +2 -0
- package/dist/commands/publish/all.js +41 -0
- package/dist/commands/publish/cancel.d.ts +2 -0
- package/dist/commands/publish/cancel.js +25 -0
- package/dist/commands/publish/history.d.ts +2 -0
- package/dist/commands/publish/history.js +34 -0
- package/dist/commands/publish/index.d.ts +2 -0
- package/dist/commands/publish/index.js +30 -0
- package/dist/commands/publish/item.d.ts +2 -0
- package/dist/commands/publish/item.js +55 -0
- package/dist/commands/publish/status.d.ts +2 -0
- package/dist/commands/publish/status.js +34 -0
- package/dist/commands/publish/unpublish.d.ts +2 -0
- package/dist/commands/publish/unpublish.js +52 -0
- package/dist/commands/recipe/index.d.ts +0 -1
- package/dist/commands/recipe/index.js +19 -15
- package/dist/commands/serialization/index.d.ts +0 -1
- package/dist/commands/serialization/index.js +14 -9
- package/dist/commands/serialization/package.d.ts +0 -1
- package/dist/commands/serialization/package.js +3 -3
- package/dist/commands/setup-client.d.ts +17 -0
- package/dist/commands/setup-client.js +148 -0
- package/dist/commands/shared.d.ts +72 -2
- package/dist/commands/shared.js +151 -24
- package/dist/commands/shell.d.ts +0 -1
- package/dist/commands/shell.js +1 -1
- package/dist/commands/status.d.ts +0 -1
- package/dist/commands/status.js +3 -3
- package/dist/commands/sync.d.ts +23 -0
- package/dist/commands/sync.js +154 -0
- package/dist/commands/telemetry.d.ts +0 -1
- package/dist/commands/telemetry.js +40 -2
- package/dist/commands/topics/index.d.ts +5 -0
- package/dist/commands/topics/index.js +102 -0
- package/dist/commands/webhook/create.d.ts +2 -0
- package/dist/commands/webhook/create.js +52 -0
- package/dist/commands/webhook/delete.d.ts +2 -0
- package/dist/commands/webhook/delete.js +20 -0
- package/dist/commands/webhook/event-types.d.ts +2 -0
- package/dist/commands/webhook/event-types.js +22 -0
- package/dist/commands/webhook/index.d.ts +2 -0
- package/dist/commands/webhook/index.js +33 -0
- package/dist/commands/webhook/inspect.d.ts +2 -0
- package/dist/commands/webhook/inspect.js +17 -0
- package/dist/commands/webhook/list.d.ts +2 -0
- package/dist/commands/webhook/list.js +24 -0
- package/dist/commands/webhook/shared.d.ts +2 -0
- package/dist/commands/webhook/shared.js +11 -0
- package/dist/commands/workflow/advance.d.ts +2 -0
- package/dist/commands/workflow/advance.js +22 -0
- package/dist/commands/workflow/apply.d.ts +2 -0
- package/dist/commands/workflow/apply.js +22 -0
- package/dist/commands/workflow/assigned.d.ts +2 -0
- package/dist/commands/workflow/assigned.js +21 -0
- package/dist/commands/workflow/index.d.ts +2 -0
- package/dist/commands/workflow/index.js +35 -0
- package/dist/commands/workflow/inspect.d.ts +2 -0
- package/dist/commands/workflow/inspect.js +17 -0
- package/dist/commands/workflow/list-commands.d.ts +2 -0
- package/dist/commands/workflow/list-commands.js +17 -0
- package/dist/commands/workflow/list-defs.d.ts +2 -0
- package/dist/commands/workflow/list-defs.js +17 -0
- package/dist/commands/workflow/reset.d.ts +2 -0
- package/dist/commands/workflow/reset.js +20 -0
- package/dist/commands/workflow/shared.d.ts +3 -0
- package/dist/commands/workflow/shared.js +12 -0
- package/dist/commands/workflow/status.d.ts +2 -0
- package/dist/commands/workflow/status.js +18 -0
- package/dist/config/env-overrides.d.ts +0 -1
- package/dist/config/env-overrides.js +41 -5
- package/dist/config/index.d.ts +15 -3
- package/dist/config/index.js +43 -3
- package/dist/config/modules.d.ts +0 -1
- package/dist/config/modules.js +2 -2
- package/dist/config/paths.d.ts +0 -1
- package/dist/config/paths.js +11 -2
- package/dist/config/root-config.d.ts +24 -1
- package/dist/config/root-config.js +84 -7
- package/dist/config/schema.json +113 -25
- package/dist/config/types.d.ts +228 -13
- package/dist/config/types.js +1 -1
- package/dist/config/validation.d.ts +1 -4
- package/dist/content/api/version-fields.d.ts +129 -0
- package/dist/content/api/version-fields.js +193 -0
- package/dist/content/index.d.ts +15 -0
- package/dist/content/index.js +40 -0
- package/dist/content/tasks/shared.d.ts +86 -0
- package/dist/content/tasks/shared.js +130 -0
- package/dist/content/tasks/version-inspect.d.ts +13 -0
- package/dist/content/tasks/version-inspect.js +56 -0
- package/dist/content/tasks/version-never-publish.d.ts +16 -0
- package/dist/content/tasks/version-never-publish.js +115 -0
- package/dist/content/tasks/version-validity.d.ts +24 -0
- package/dist/content/tasks/version-validity.js +159 -0
- package/dist/deploy/api/client-naming.d.ts +80 -0
- package/dist/deploy/api/client-naming.js +124 -0
- package/dist/deploy/api/client.d.ts +72 -0
- package/dist/deploy/api/client.js +72 -0
- package/dist/deploy/api/clients.d.ts +126 -0
- package/dist/deploy/api/clients.js +89 -0
- package/dist/deploy/api/common/headers.d.ts +0 -1
- package/dist/deploy/api/common/request.d.ts +0 -5
- package/dist/deploy/api/common/request.js +93 -120
- package/dist/deploy/api/common/transport-events.d.ts +31 -0
- package/dist/deploy/api/common/transport-events.js +24 -0
- package/dist/deploy/api/common/types.d.ts +60 -1
- package/dist/deploy/api/deployment-logs.d.ts +0 -1
- package/dist/deploy/api/deployment-logs.js +5 -5
- package/dist/deploy/api/deployments.d.ts +1 -2
- package/dist/deploy/api/deployments.js +22 -20
- package/dist/deploy/api/environments.d.ts +28 -2
- package/dist/deploy/api/environments.js +103 -20
- package/dist/deploy/api/index.d.ts +31 -9
- package/dist/deploy/api/index.js +129 -22
- package/dist/deploy/api/logs.d.ts +1 -2
- package/dist/deploy/api/logs.js +9 -7
- package/dist/deploy/api/organizations.d.ts +1 -2
- package/dist/deploy/api/organizations.js +8 -7
- package/dist/deploy/api/projects.d.ts +19 -4
- package/dist/deploy/api/projects.js +75 -13
- package/dist/deploy/api/source-control.d.ts +1 -2
- package/dist/deploy/api/source-control.js +25 -24
- package/dist/deploy/api.d.ts +0 -1
- package/dist/deploy/context.d.ts +52 -0
- package/dist/deploy/context.js +234 -0
- package/dist/deploy/index.d.ts +11 -0
- package/dist/deploy/index.js +38 -0
- package/dist/deploy/tasks/deployment-result.d.ts +0 -1
- package/dist/deploy/tasks/deployments.d.ts +0 -1
- package/dist/deploy/tasks/deployments.js +12 -11
- package/dist/deploy/tasks/editing-host.d.ts +0 -1
- package/dist/deploy/tasks/editing-host.js +48 -18
- package/dist/deploy/tasks/environments.d.ts +3 -3
- package/dist/deploy/tasks/environments.js +108 -24
- package/dist/deploy/tasks/health.d.ts +23 -0
- package/dist/deploy/tasks/health.js +181 -0
- package/dist/deploy/tasks/logs.d.ts +0 -1
- package/dist/deploy/tasks/logs.js +4 -4
- package/dist/deploy/tasks/organizations.d.ts +0 -1
- package/dist/deploy/tasks/organizations.js +5 -5
- package/dist/deploy/tasks/projects.d.ts +6 -2
- package/dist/deploy/tasks/projects.js +61 -42
- package/dist/deploy/tasks/shared.d.ts +9 -52
- package/dist/deploy/tasks/shared.js +46 -222
- package/dist/deploy/tasks/site-bind.d.ts +1 -2
- package/dist/deploy/tasks/site-bind.js +7 -7
- package/dist/deploy/tasks/site.d.ts +2 -3
- package/dist/deploy/tasks/site.js +4 -4
- package/dist/deploy/tasks/source-control.d.ts +0 -1
- package/dist/deploy/tasks/source-control.js +14 -14
- package/dist/deploy/tasks/transport-spinner.d.ts +5 -0
- package/dist/deploy/tasks/transport-spinner.js +118 -0
- package/dist/deploy/tasks/types.d.ts +16 -3
- package/dist/deploy/tasks/types.js +1 -1
- package/dist/hygiene/api/client.d.ts +294 -0
- package/dist/hygiene/api/client.js +827 -0
- package/dist/hygiene/api/graphql.d.ts +4 -0
- package/dist/hygiene/api/graphql.js +18 -0
- package/dist/hygiene/audit-suite.d.ts +84 -0
- package/dist/hygiene/audit-suite.js +95 -0
- package/dist/hygiene/baseline.d.ts +56 -0
- package/dist/hygiene/baseline.js +248 -0
- package/dist/hygiene/cache.d.ts +35 -0
- package/dist/hygiene/cache.js +179 -0
- package/dist/hygiene/history.d.ts +70 -0
- package/dist/hygiene/history.js +148 -0
- package/dist/hygiene/index.d.ts +128 -0
- package/dist/hygiene/index.js +168 -0
- package/dist/hygiene/output-adapters.d.ts +49 -0
- package/dist/hygiene/output-adapters.js +270 -0
- package/dist/hygiene/tasks/audit/all.d.ts +58 -0
- package/dist/hygiene/tasks/audit/all.js +274 -0
- package/dist/hygiene/tasks/audit/alt-text-missing.d.ts +27 -0
- package/dist/hygiene/tasks/audit/alt-text-missing.js +87 -0
- package/dist/hygiene/tasks/audit/baseline.d.ts +66 -0
- package/dist/hygiene/tasks/audit/baseline.js +185 -0
- package/dist/hygiene/tasks/audit/broken-images.d.ts +41 -0
- package/dist/hygiene/tasks/audit/broken-images.js +183 -0
- package/dist/hygiene/tasks/audit/broken-links.d.ts +53 -0
- package/dist/hygiene/tasks/audit/broken-links.js +121 -0
- package/dist/hygiene/tasks/audit/datasource-missing.d.ts +44 -0
- package/dist/hygiene/tasks/audit/datasource-missing.js +146 -0
- package/dist/hygiene/tasks/audit/dead-templates.d.ts +46 -0
- package/dist/hygiene/tasks/audit/dead-templates.js +216 -0
- package/dist/hygiene/tasks/audit/duplicates.d.ts +48 -0
- package/dist/hygiene/tasks/audit/duplicates.js +94 -0
- package/dist/hygiene/tasks/audit/empty-items.d.ts +24 -0
- package/dist/hygiene/tasks/audit/empty-items.js +53 -0
- package/dist/hygiene/tasks/audit/empty-links.d.ts +37 -0
- package/dist/hygiene/tasks/audit/empty-links.js +145 -0
- package/dist/hygiene/tasks/audit/empty-roles.d.ts +41 -0
- package/dist/hygiene/tasks/audit/empty-roles.js +51 -0
- package/dist/hygiene/tasks/audit/fallback-drift.d.ts +53 -0
- package/dist/hygiene/tasks/audit/fallback-drift.js +115 -0
- package/dist/hygiene/tasks/audit/find-replace.d.ts +75 -0
- package/dist/hygiene/tasks/audit/find-replace.js +142 -0
- package/dist/hygiene/tasks/audit/heavy-templates.d.ts +46 -0
- package/dist/hygiene/tasks/audit/heavy-templates.js +73 -0
- package/dist/hygiene/tasks/audit/history.d.ts +30 -0
- package/dist/hygiene/tasks/audit/history.js +161 -0
- package/dist/hygiene/tasks/audit/language-data.d.ts +55 -0
- package/dist/hygiene/tasks/audit/language-data.js +126 -0
- package/dist/hygiene/tasks/audit/large-fields.d.ts +48 -0
- package/dist/hygiene/tasks/audit/large-fields.js +84 -0
- package/dist/hygiene/tasks/audit/missing-meta.d.ts +57 -0
- package/dist/hygiene/tasks/audit/missing-meta.js +97 -0
- package/dist/hygiene/tasks/audit/orphans.d.ts +47 -0
- package/dist/hygiene/tasks/audit/orphans.js +78 -0
- package/dist/hygiene/tasks/audit/page-design-orphans.d.ts +24 -0
- package/dist/hygiene/tasks/audit/page-design-orphans.js +80 -0
- package/dist/hygiene/tasks/audit/personalization-broken.d.ts +25 -0
- package/dist/hygiene/tasks/audit/personalization-broken.js +96 -0
- package/dist/hygiene/tasks/audit/references.d.ts +70 -0
- package/dist/hygiene/tasks/audit/references.js +142 -0
- package/dist/hygiene/tasks/audit/role-bloat.d.ts +42 -0
- package/dist/hygiene/tasks/audit/role-bloat.js +64 -0
- package/dist/hygiene/tasks/audit/site-residue.d.ts +39 -0
- package/dist/hygiene/tasks/audit/site-residue.js +164 -0
- package/dist/hygiene/tasks/audit/slug-conflicts.d.ts +58 -0
- package/dist/hygiene/tasks/audit/slug-conflicts.js +87 -0
- package/dist/hygiene/tasks/audit/stale-content.d.ts +68 -0
- package/dist/hygiene/tasks/audit/stale-content.js +133 -0
- package/dist/hygiene/tasks/audit/stale-users.d.ts +54 -0
- package/dist/hygiene/tasks/audit/stale-users.js +83 -0
- package/dist/hygiene/tasks/audit/stale-workflow.d.ts +50 -0
- package/dist/hygiene/tasks/audit/stale-workflow.js +109 -0
- package/dist/hygiene/tasks/audit/suite-run.d.ts +28 -0
- package/dist/hygiene/tasks/audit/suite-run.js +46 -0
- package/dist/hygiene/tasks/audit/template-dependencies.d.ts +72 -0
- package/dist/hygiene/tasks/audit/template-dependencies.js +97 -0
- package/dist/hygiene/tasks/audit/translation-coverage.d.ts +64 -0
- package/dist/hygiene/tasks/audit/translation-coverage.js +123 -0
- package/dist/hygiene/tasks/audit/unused-media.d.ts +58 -0
- package/dist/hygiene/tasks/audit/unused-media.js +144 -0
- package/dist/hygiene/tasks/browse.d.ts +49 -0
- package/dist/hygiene/tasks/browse.js +50 -0
- package/dist/hygiene/tasks/cleanup/archive-purge.d.ts +50 -0
- package/dist/hygiene/tasks/cleanup/archive-purge.js +129 -0
- package/dist/hygiene/tasks/cleanup/dead-templates.d.ts +74 -0
- package/dist/hygiene/tasks/cleanup/dead-templates.js +247 -0
- package/dist/hygiene/tasks/cleanup/duplicates.d.ts +86 -0
- package/dist/hygiene/tasks/cleanup/duplicates.js +189 -0
- package/dist/hygiene/tasks/cleanup/empty-folders.d.ts +75 -0
- package/dist/hygiene/tasks/cleanup/empty-folders.js +165 -0
- package/dist/hygiene/tasks/cleanup/field-set.d.ts +108 -0
- package/dist/hygiene/tasks/cleanup/field-set.js +230 -0
- package/dist/hygiene/tasks/cleanup/find-replace.d.ts +77 -0
- package/dist/hygiene/tasks/cleanup/find-replace.js +180 -0
- package/dist/hygiene/tasks/cleanup/language-version-add.d.ts +74 -0
- package/dist/hygiene/tasks/cleanup/language-version-add.js +136 -0
- package/dist/hygiene/tasks/cleanup/rename.d.ts +78 -0
- package/dist/hygiene/tasks/cleanup/rename.js +152 -0
- package/dist/hygiene/tasks/cleanup/roles.d.ts +58 -0
- package/dist/hygiene/tasks/cleanup/roles.js +177 -0
- package/dist/hygiene/tasks/cleanup/site-residue.d.ts +55 -0
- package/dist/hygiene/tasks/cleanup/site-residue.js +247 -0
- package/dist/hygiene/tasks/cleanup/slug-conflicts.d.ts +126 -0
- package/dist/hygiene/tasks/cleanup/slug-conflicts.js +296 -0
- package/dist/hygiene/tasks/cleanup/subtree-prune.d.ts +40 -0
- package/dist/hygiene/tasks/cleanup/subtree-prune.js +113 -0
- package/dist/hygiene/tasks/cleanup/subtree.d.ts +123 -0
- package/dist/hygiene/tasks/cleanup/subtree.js +312 -0
- package/dist/hygiene/tasks/cleanup/users.d.ts +48 -0
- package/dist/hygiene/tasks/cleanup/users.js +92 -0
- package/dist/hygiene/tasks/cleanup/versions-archive.d.ts +57 -0
- package/dist/hygiene/tasks/cleanup/versions-archive.js +162 -0
- package/dist/hygiene/tasks/cleanup/versions-prune.d.ts +76 -0
- package/dist/hygiene/tasks/cleanup/versions-prune.js +194 -0
- package/dist/hygiene/tasks/cleanup/workflow-advance.d.ts +76 -0
- package/dist/hygiene/tasks/cleanup/workflow-advance.js +185 -0
- package/dist/hygiene/tasks/cleanup/workflow-apply.d.ts +97 -0
- package/dist/hygiene/tasks/cleanup/workflow-apply.js +310 -0
- package/dist/hygiene/tasks/explain/orphan-site.d.ts +53 -0
- package/dist/hygiene/tasks/explain/orphan-site.js +83 -0
- package/dist/hygiene/tasks/explain/why-blocked.d.ts +81 -0
- package/dist/hygiene/tasks/explain/why-blocked.js +149 -0
- package/dist/hygiene/tasks/reference-kind.d.ts +47 -0
- package/dist/hygiene/tasks/reference-kind.js +73 -0
- package/dist/hygiene/tasks/shared.d.ts +350 -0
- package/dist/hygiene/tasks/shared.js +532 -0
- package/dist/mcp/auth.d.ts +80 -0
- package/dist/mcp/auth.js +165 -0
- package/dist/mcp/build-registry.d.ts +12 -0
- package/dist/mcp/build-registry.js +75 -0
- package/dist/mcp/descriptions.d.ts +22 -0
- package/dist/mcp/descriptions.js +113 -0
- package/dist/mcp/dispatch.d.ts +44 -0
- package/dist/mcp/dispatch.js +110 -0
- package/dist/mcp/errors.d.ts +31 -0
- package/dist/mcp/errors.js +117 -0
- package/dist/mcp/http.d.ts +42 -0
- package/dist/mcp/http.js +128 -0
- package/dist/mcp/logging.d.ts +28 -0
- package/dist/mcp/logging.js +78 -0
- package/dist/mcp/prompts/workflows.d.ts +13 -0
- package/dist/mcp/prompts/workflows.js +171 -0
- package/dist/mcp/redact.d.ts +11 -0
- package/dist/mcp/redact.js +35 -0
- package/dist/mcp/registry.d.ts +84 -0
- package/dist/mcp/registry.js +62 -0
- package/dist/mcp/resources/brand.d.ts +20 -0
- package/dist/mcp/resources/brand.js +514 -0
- package/dist/mcp/resources/env.d.ts +10 -0
- package/dist/mcp/resources/env.js +120 -0
- package/dist/mcp/resources/help.d.ts +10 -0
- package/dist/mcp/resources/help.js +475 -0
- package/dist/mcp/resources/recipes.d.ts +13 -0
- package/dist/mcp/resources/recipes.js +270 -0
- package/dist/mcp/schemas/common.d.ts +22 -0
- package/dist/mcp/schemas/common.js +43 -0
- package/dist/mcp/server.d.ts +26 -0
- package/dist/mcp/server.js +88 -0
- package/dist/mcp/tools/access-check.d.ts +11 -0
- package/dist/mcp/tools/access-check.js +47 -0
- package/dist/mcp/tools/agents-recipe.d.ts +2 -0
- package/dist/mcp/tools/agents-recipe.js +139 -0
- package/dist/mcp/tools/agents.d.ts +2 -0
- package/dist/mcp/tools/agents.js +148 -0
- package/dist/mcp/tools/audit.d.ts +41 -0
- package/dist/mcp/tools/audit.js +584 -0
- package/dist/mcp/tools/bootstrap.d.ts +8 -0
- package/dist/mcp/tools/bootstrap.js +200 -0
- package/dist/mcp/tools/brand-recipe.d.ts +2 -0
- package/dist/mcp/tools/brand-recipe.js +123 -0
- package/dist/mcp/tools/brand.d.ts +28 -0
- package/dist/mcp/tools/brand.js +549 -0
- package/dist/mcp/tools/brief-recipe.d.ts +2 -0
- package/dist/mcp/tools/brief-recipe.js +123 -0
- package/dist/mcp/tools/brief.d.ts +16 -0
- package/dist/mcp/tools/brief.js +388 -0
- package/dist/mcp/tools/browse.d.ts +9 -0
- package/dist/mcp/tools/browse.js +57 -0
- package/dist/mcp/tools/campaign-recipe.d.ts +2 -0
- package/dist/mcp/tools/campaign-recipe.js +125 -0
- package/dist/mcp/tools/campaign.d.ts +20 -0
- package/dist/mcp/tools/campaign.js +342 -0
- package/dist/mcp/tools/cleanup.d.ts +22 -0
- package/dist/mcp/tools/cleanup.js +608 -0
- package/dist/mcp/tools/deploy.d.ts +19 -0
- package/dist/mcp/tools/deploy.js +797 -0
- package/dist/mcp/tools/explain.d.ts +2 -0
- package/dist/mcp/tools/explain.js +132 -0
- package/dist/mcp/tools/inspector.d.ts +12 -0
- package/dist/mcp/tools/inspector.js +101 -0
- package/dist/mcp/tools/onboard.d.ts +11 -0
- package/dist/mcp/tools/onboard.js +65 -0
- package/dist/mcp/tools/publish.d.ts +30 -0
- package/dist/mcp/tools/publish.js +173 -0
- package/dist/mcp/tools/recipe-sync.d.ts +2 -0
- package/dist/mcp/tools/recipe-sync.js +117 -0
- package/dist/mcp/tools/recipe.d.ts +18 -0
- package/dist/mcp/tools/recipe.js +250 -0
- package/dist/mcp/tools/serialization.d.ts +17 -0
- package/dist/mcp/tools/serialization.js +282 -0
- package/dist/mcp/tools/webhook.d.ts +12 -0
- package/dist/mcp/tools/webhook.js +246 -0
- package/dist/mcp/tools/workflow.d.ts +21 -0
- package/dist/mcp/tools/workflow.js +436 -0
- package/dist/policy/access-check.d.ts +56 -0
- package/dist/policy/access-check.js +160 -0
- package/dist/policy/allow-write.d.ts +37 -0
- package/dist/policy/allow-write.js +78 -0
- package/dist/policy/authorize.d.ts +36 -0
- package/dist/policy/authorize.js +102 -0
- package/dist/policy/caller.d.ts +23 -0
- package/dist/policy/caller.js +66 -0
- package/dist/policy/enforce.d.ts +25 -0
- package/dist/policy/enforce.js +57 -0
- package/dist/policy/enroll.d.ts +57 -0
- package/dist/policy/enroll.js +101 -0
- package/dist/policy/environment.d.ts +35 -0
- package/dist/policy/environment.js +44 -0
- package/dist/policy/identity.d.ts +24 -0
- package/dist/policy/identity.js +58 -0
- package/dist/policy/index.d.ts +22 -0
- package/dist/policy/index.js +42 -0
- package/dist/policy/operations.d.ts +24 -0
- package/dist/policy/operations.js +37 -0
- package/dist/policy/organization.d.ts +62 -0
- package/dist/policy/organization.js +97 -0
- package/dist/policy/paths.d.ts +21 -0
- package/dist/policy/paths.js +46 -0
- package/dist/policy/resolve.d.ts +15 -0
- package/dist/policy/resolve.js +67 -0
- package/dist/policy/schema.d.ts +137 -0
- package/dist/policy/schema.js +92 -0
- package/dist/policy/store.d.ts +25 -0
- package/dist/policy/store.js +85 -0
- package/dist/policy/types.d.ts +52 -0
- package/dist/policy/types.js +22 -0
- package/dist/program.d.ts +35 -0
- package/dist/program.js +131 -0
- package/dist/publishing/api/auth.d.ts +49 -0
- package/dist/publishing/api/auth.js +173 -0
- package/dist/publishing/api/client.d.ts +5 -0
- package/dist/publishing/api/client.js +153 -0
- package/dist/publishing/api/languages.d.ts +61 -0
- package/dist/publishing/api/languages.js +116 -0
- package/dist/publishing/api/path-resolver.d.ts +10 -0
- package/dist/publishing/api/path-resolver.js +76 -0
- package/dist/publishing/api/sites.d.ts +23 -0
- package/dist/publishing/api/sites.js +27 -0
- package/dist/publishing/api/types.d.ts +166 -0
- package/dist/publishing/api/types.js +17 -0
- package/dist/publishing/index.d.ts +25 -0
- package/dist/publishing/index.js +51 -0
- package/dist/publishing/job-diagnostics.d.ts +44 -0
- package/dist/publishing/job-diagnostics.js +87 -0
- package/dist/publishing/job-watcher.d.ts +33 -0
- package/dist/publishing/job-watcher.js +118 -0
- package/dist/publishing/tasks/all.d.ts +41 -0
- package/dist/publishing/tasks/all.js +234 -0
- package/dist/publishing/tasks/cancel.d.ts +18 -0
- package/dist/publishing/tasks/cancel.js +147 -0
- package/dist/publishing/tasks/history.d.ts +22 -0
- package/dist/publishing/tasks/history.js +85 -0
- package/dist/publishing/tasks/item.d.ts +69 -0
- package/dist/publishing/tasks/item.js +194 -0
- package/dist/publishing/tasks/status.d.ts +17 -0
- package/dist/publishing/tasks/status.js +74 -0
- package/dist/publishing/tasks/unpublish.d.ts +69 -0
- package/dist/publishing/tasks/unpublish.js +546 -0
- package/dist/recipe/api/auth.d.ts +1 -2
- package/dist/recipe/api/auth.js +1 -1
- package/dist/recipe/api/authoring-client.d.ts +9 -3
- package/dist/recipe/api/authoring-client.js +101 -17
- package/dist/recipe/api/client.d.ts +50 -1
- package/dist/recipe/api/graphql.d.ts +2 -3
- package/dist/recipe/api/graphql.js +1 -1
- package/dist/recipe/api/ref-encoding.d.ts +0 -1
- package/dist/recipe/api/ref-encoding.js +5 -5
- package/dist/recipe/api/site-discovery.d.ts +1 -2
- package/dist/recipe/api/sites-client.d.ts +6 -3
- package/dist/recipe/api/sites-client.js +11 -8
- package/dist/recipe/cache.d.ts +0 -1
- package/dist/recipe/compile/component-section.d.ts +1 -2
- package/dist/recipe/compile/component-section.js +2 -2
- package/dist/recipe/compile/component-template.d.ts +0 -1
- package/dist/recipe/compile/component-template.js +15 -19
- package/dist/recipe/compile/content-item.d.ts +42 -22
- package/dist/recipe/compile/content-item.js +198 -46
- package/dist/recipe/compile/content-template.d.ts +0 -1
- package/dist/recipe/compile/content-template.js +25 -1
- package/dist/recipe/compile/design-parameters-template.d.ts +13 -0
- package/dist/recipe/compile/design-parameters-template.js +92 -0
- package/dist/recipe/compile/enumeration.d.ts +0 -1
- package/dist/recipe/compile/enumeration.js +4 -4
- package/dist/recipe/compile/page-design.d.ts +0 -1
- package/dist/recipe/compile/page-design.js +1 -1
- package/dist/recipe/compile/page-template.d.ts +30 -0
- package/dist/recipe/compile/page-template.js +121 -0
- package/dist/recipe/compile/page.d.ts +26 -0
- package/dist/recipe/compile/page.js +184 -0
- package/dist/recipe/compile/partial-design.d.ts +0 -1
- package/dist/recipe/compile/partial-design.js +1 -1
- package/dist/recipe/compile/placeholder.d.ts +23 -0
- package/dist/recipe/compile/placeholder.js +32 -0
- package/dist/recipe/compile/section-definition.d.ts +0 -1
- package/dist/recipe/compile/shared.d.ts +52 -7
- package/dist/recipe/compile/shared.js +55 -15
- package/dist/recipe/compile/site-template.d.ts +0 -1
- package/dist/recipe/compile/site-template.js +1 -1
- package/dist/recipe/compile/site.d.ts +0 -1
- package/dist/recipe/compile/site.js +1 -1
- package/dist/recipe/compile/webhook-authorization.d.ts +23 -0
- package/dist/recipe/compile/webhook-authorization.js +116 -0
- package/dist/recipe/compile/workflow.d.ts +46 -0
- package/dist/recipe/compile/workflow.js +368 -0
- package/dist/recipe/compile.d.ts +19 -3
- package/dist/recipe/compile.js +297 -11
- package/dist/recipe/ensure-marker-field.d.ts +25 -0
- package/dist/recipe/ensure-marker-field.js +140 -0
- package/dist/recipe/execute.d.ts +19 -2
- package/dist/recipe/execute.js +39 -8
- package/dist/recipe/guids.d.ts +106 -9
- package/dist/recipe/guids.js +126 -15
- package/dist/recipe/index.d.ts +11 -5
- package/dist/recipe/index.js +46 -23
- package/dist/recipe/io.d.ts +0 -1
- package/dist/recipe/io.js +33 -10
- package/dist/recipe/ir/operations.d.ts +66 -4
- package/dist/recipe/ir/operations.js +55 -2
- package/dist/recipe/ir/sitecore-templates.d.ts +87 -1
- package/dist/recipe/ir/sitecore-templates.js +94 -1
- package/dist/recipe/layout/emit.d.ts +22 -3
- package/dist/recipe/layout/emit.js +18 -7
- package/dist/recipe/layout/parse.d.ts +164 -0
- package/dist/recipe/layout/parse.js +295 -0
- package/dist/recipe/layout/templates-mapping.d.ts +0 -1
- package/dist/recipe/marker.d.ts +28 -0
- package/dist/recipe/marker.js +37 -0
- package/dist/recipe/plan.d.ts +9 -2
- package/dist/recipe/plan.js +195 -19
- package/dist/recipe/policy.d.ts +0 -1
- package/dist/recipe/policy.js +19 -1
- package/dist/recipe/read-current.d.ts +109 -0
- package/dist/recipe/read-current.js +1285 -0
- package/dist/recipe/recipe-kind.d.ts +4 -0
- package/dist/recipe/recipe-kind.js +217 -0
- package/dist/recipe/rollback-log.d.ts +52 -0
- package/dist/recipe/rollback-log.js +90 -0
- package/dist/recipe/rollback.d.ts +12 -1
- package/dist/recipe/rollback.js +32 -7
- package/dist/recipe/sandbox/load.d.ts +17 -0
- package/dist/recipe/sandbox/load.js +145 -0
- package/dist/recipe/sandbox/recipe-runner.cjs +49 -0
- package/dist/recipe/sandbox/transpile.d.ts +17 -0
- package/dist/recipe/sandbox/transpile.js +46 -0
- package/dist/recipe/schema/field-types.d.ts +3 -4
- package/dist/recipe/schema/recipe.d.ts +1631 -213
- package/dist/recipe/schema/recipe.js +576 -37
- package/dist/recipe/schema/source-fields.d.ts +0 -1
- package/dist/recipe/tasks/compile.d.ts +1 -2
- package/dist/recipe/tasks/compile.js +14 -4
- package/dist/recipe/tasks/diff.d.ts +1 -2
- package/dist/recipe/tasks/placeholder-allow.d.ts +0 -1
- package/dist/recipe/tasks/placeholder-allow.js +3 -7
- package/dist/recipe/tasks/plan.d.ts +3 -4
- package/dist/recipe/tasks/plan.js +5 -5
- package/dist/recipe/tasks/prune-defaults.d.ts +1 -2
- package/dist/recipe/tasks/prune-defaults.js +6 -7
- package/dist/recipe/tasks/push.d.ts +1 -2
- package/dist/recipe/tasks/push.js +46 -6
- package/dist/recipe/tasks/shared.d.ts +21 -4
- package/dist/recipe/tasks/shared.js +34 -21
- package/dist/recipe/unstable.d.ts +18 -0
- package/dist/recipe/unstable.js +36 -0
- package/dist/recipe/validate.d.ts +51 -2
- package/dist/recipe/validate.js +162 -15
- package/dist/scripting/connect.d.ts +24 -0
- package/dist/scripting/connect.js +17 -0
- package/dist/scripting/helpers/multilist.d.ts +26 -0
- package/dist/scripting/helpers/multilist.js +75 -0
- package/dist/scripting/index.d.ts +20 -0
- package/dist/scripting/index.js +57 -0
- package/dist/serialization/api/auth.d.ts +57 -0
- package/dist/serialization/api/auth.js +433 -0
- package/dist/serialization/api/client.d.ts +41 -0
- package/dist/serialization/api/client.js +41 -0
- package/dist/serialization/api/graphql.d.ts +11 -0
- package/dist/serialization/api/history.d.ts +8 -0
- package/dist/serialization/api/index.d.ts +23 -0
- package/dist/serialization/api/index.js +64 -0
- package/dist/serialization/api/items.d.ts +7 -0
- package/dist/serialization/api/items.js +132 -0
- package/dist/serialization/api/publish.d.ts +43 -0
- package/dist/serialization/api/publish.js +67 -0
- package/dist/serialization/api/roles.d.ts +8 -0
- package/dist/serialization/api/types.d.ts +65 -0
- package/dist/serialization/api/types.js +2 -0
- package/dist/serialization/api/users.d.ts +8 -0
- package/dist/serialization/commands.d.ts +0 -1
- package/dist/serialization/compare.d.ts +0 -1
- package/dist/serialization/context.d.ts +25 -0
- package/dist/serialization/context.js +58 -0
- package/dist/serialization/field-filter.d.ts +0 -1
- package/dist/serialization/filesystem-store/constants.d.ts +0 -1
- package/dist/serialization/filesystem-store/items.d.ts +0 -1
- package/dist/serialization/filesystem-store/items.js +1 -1
- package/dist/serialization/filesystem-store/roles.d.ts +1 -2
- package/dist/serialization/filesystem-store/users.d.ts +1 -2
- package/dist/serialization/filesystem-store/utils.d.ts +0 -1
- package/dist/serialization/index.d.ts +12 -0
- package/dist/serialization/index.js +32 -0
- package/dist/serialization/item-path.d.ts +0 -1
- package/dist/serialization/item-path.js +3 -3
- package/dist/serialization/path-provider.d.ts +0 -1
- package/dist/serialization/path-provider.js +4 -4
- package/dist/serialization/signature.d.ts +0 -1
- package/dist/serialization/tasks/diff.d.ts +0 -1
- package/dist/serialization/tasks/diff.js +176 -48
- package/dist/serialization/tasks/env/constants.d.ts +13 -1
- package/dist/serialization/tasks/env/constants.js +64 -1
- package/dist/serialization/tasks/env/deploy-token.d.ts +0 -1
- package/dist/serialization/tasks/env/deploy-token.js +69 -17
- package/dist/serialization/tasks/env/init/auth.d.ts +11 -3
- package/dist/serialization/tasks/env/init/auth.js +19 -17
- package/dist/serialization/tasks/env/init/deploy-lookup.d.ts +1 -2
- package/dist/serialization/tasks/env/init/deploy-lookup.js +18 -5
- package/dist/serialization/tasks/env/init.d.ts +0 -1
- package/dist/serialization/tasks/env/init.js +18 -12
- package/dist/serialization/tasks/env/logout.d.ts +0 -1
- package/dist/serialization/tasks/env/logout.js +13 -6
- package/dist/serialization/tasks/env/onboard.d.ts +40 -0
- package/dist/serialization/tasks/env/onboard.js +53 -0
- package/dist/serialization/tasks/env/setup-clients.d.ts +24 -0
- package/dist/serialization/tasks/env/setup-clients.js +119 -0
- package/dist/serialization/tasks/env/setup-env.d.ts +54 -0
- package/dist/serialization/tasks/env/setup-env.js +216 -0
- package/dist/serialization/tasks/env/setup-org-client.d.ts +21 -0
- package/dist/serialization/tasks/env/setup-org-client.js +146 -0
- package/dist/serialization/tasks/env/status.d.ts +0 -1
- package/dist/serialization/tasks/env/status.js +36 -11
- package/dist/serialization/tasks/helpers/collect.d.ts +1 -2
- package/dist/serialization/tasks/helpers/collect.js +22 -15
- package/dist/serialization/tasks/helpers/commands.d.ts +0 -1
- package/dist/serialization/tasks/helpers/filesystem.d.ts +0 -1
- package/dist/serialization/tasks/helpers/filesystem.js +4 -4
- package/dist/serialization/tasks/helpers/items.d.ts +0 -1
- package/dist/serialization/tasks/helpers/sitecore.d.ts +1 -2
- package/dist/serialization/tasks/helpers/sitecore.js +2 -2
- package/dist/serialization/tasks/info.d.ts +0 -1
- package/dist/serialization/tasks/package.d.ts +0 -1
- package/dist/serialization/tasks/package.js +21 -16
- package/dist/serialization/tasks/pull.d.ts +0 -1
- package/dist/serialization/tasks/pull.js +24 -9
- package/dist/serialization/tasks/push.d.ts +0 -1
- package/dist/serialization/tasks/push.js +27 -11
- package/dist/serialization/tasks/roles.d.ts +2 -2
- package/dist/serialization/tasks/roles.js +9 -9
- package/dist/serialization/tasks/shared.d.ts +9 -16
- package/dist/serialization/tasks/shared.js +14 -44
- package/dist/serialization/tasks/types.d.ts +44 -4
- package/dist/serialization/tasks/types.js +1 -1
- package/dist/serialization/tasks/users.d.ts +2 -2
- package/dist/serialization/tasks/users.js +9 -9
- package/dist/serialization/tasks/validate.d.ts +0 -1
- package/dist/serialization/tasks/validate.js +2 -2
- package/dist/serialization/tasks/watch.d.ts +0 -1
- package/dist/serialization/tasks/watch.js +9 -8
- package/dist/serialization/tree-spec.d.ts +0 -1
- package/dist/serialization/tree-spec.js +21 -21
- package/dist/serialization/types.d.ts +0 -1
- package/dist/serialization/wildcard.d.ts +0 -1
- package/dist/serialization/wildcard.js +2 -2
- package/dist/serialization/yaml.d.ts +0 -1
- package/dist/serialization/yaml.js +1 -1
- package/dist/shared/browser.d.ts +0 -1
- package/dist/shared/cli-options.d.ts +0 -1
- package/dist/shared/cli-tasks.d.ts +1 -2
- package/dist/shared/cli-tasks.js +2 -2
- package/dist/shared/client-credential.d.ts +82 -0
- package/dist/shared/client-credential.js +117 -0
- package/dist/shared/concurrency.d.ts +20 -0
- package/dist/shared/concurrency.js +67 -0
- package/dist/shared/config-template.d.ts +0 -1
- package/dist/shared/credential-matrix.d.ts +83 -0
- package/dist/shared/credential-matrix.js +65 -0
- package/dist/shared/env-tier.d.ts +2 -0
- package/dist/shared/env-tier.js +31 -0
- package/dist/shared/envelope.d.ts +69 -0
- package/dist/shared/envelope.js +84 -0
- package/dist/shared/errors.d.ts +79 -9
- package/dist/shared/errors.js +49 -11
- package/dist/shared/graphql.d.ts +2 -3
- package/dist/shared/graphql.js +31 -15
- package/dist/shared/history.d.ts +25 -1
- package/dist/shared/history.js +35 -1
- package/dist/shared/human-only-operations.d.ts +28 -0
- package/dist/shared/human-only-operations.js +33 -0
- package/dist/shared/keychain.d.ts +68 -1
- package/dist/shared/keychain.js +416 -46
- package/dist/shared/logger.d.ts +2 -1
- package/dist/shared/logger.js +12 -1
- package/dist/shared/output.d.ts +0 -1
- package/dist/shared/prompt.d.ts +0 -1
- package/dist/shared/prompt.js +2 -2
- package/dist/shared/publish-audit.d.ts +154 -0
- package/dist/shared/publish-audit.js +52 -0
- package/dist/shared/publish-consent.d.ts +104 -0
- package/dist/shared/publish-consent.js +148 -0
- package/dist/shared/redact.d.ts +0 -1
- package/dist/shared/redact.js +4 -2
- package/dist/shared/region.d.ts +96 -0
- package/dist/shared/region.js +129 -0
- package/dist/shared/rwlock.d.ts +43 -0
- package/dist/shared/rwlock.js +110 -0
- package/dist/shared/spinner.d.ts +0 -1
- package/dist/shared/style.d.ts +0 -1
- package/dist/shared/telemetry.d.ts +15 -2
- package/dist/shared/telemetry.js +59 -34
- package/dist/shared/topics.d.ts +33 -0
- package/dist/shared/topics.js +151 -0
- package/dist/shared/validate.d.ts +0 -1
- package/dist/shared/validate.js +18 -3
- package/dist/sites/api/collections.d.ts +0 -1
- package/dist/sites/api/jobs.d.ts +0 -1
- package/dist/sites/api/languages.d.ts +0 -1
- package/dist/sites/api/request.d.ts +0 -1
- package/dist/sites/api/request.js +13 -4
- package/dist/sites/api/sites.d.ts +44 -1
- package/dist/sites/api/sites.js +42 -1
- package/dist/sites/api/types.d.ts +0 -1
- package/dist/sites/index.d.ts +25 -0
- package/dist/sites/index.js +44 -0
- package/dist/sync/aggregate-kinds.d.ts +7 -0
- package/dist/sync/aggregate-kinds.js +32 -0
- package/dist/sync/aggregate.d.ts +100 -0
- package/dist/sync/aggregate.js +173 -0
- package/dist/sync/engine.d.ts +28 -0
- package/dist/sync/engine.js +38 -0
- package/dist/sync/index.d.ts +18 -0
- package/dist/sync/index.js +25 -0
- package/dist/sync/io.d.ts +8 -0
- package/dist/sync/io.js +52 -0
- package/dist/sync/kind.d.ts +80 -0
- package/dist/sync/kind.js +2 -0
- package/dist/sync/plan.d.ts +55 -0
- package/dist/sync/plan.js +27 -0
- package/dist/sync/registry.d.ts +7 -0
- package/dist/sync/registry.js +36 -0
- package/dist/webhooks/api/client.d.ts +134 -0
- package/dist/webhooks/api/client.js +326 -0
- package/dist/webhooks/api/graphql.d.ts +4 -0
- package/dist/webhooks/api/graphql.js +18 -0
- package/dist/webhooks/api/templates.d.ts +41 -0
- package/dist/webhooks/api/templates.js +78 -0
- package/dist/webhooks/index.d.ts +16 -0
- package/dist/webhooks/index.js +43 -0
- package/dist/webhooks/tasks/create.d.ts +58 -0
- package/dist/webhooks/tasks/create.js +127 -0
- package/dist/webhooks/tasks/delete.d.ts +14 -0
- package/dist/webhooks/tasks/delete.js +57 -0
- package/dist/webhooks/tasks/event-types.d.ts +21 -0
- package/dist/webhooks/tasks/event-types.js +32 -0
- package/dist/webhooks/tasks/inspect.d.ts +12 -0
- package/dist/webhooks/tasks/inspect.js +65 -0
- package/dist/webhooks/tasks/list.d.ts +29 -0
- package/dist/webhooks/tasks/list.js +41 -0
- package/dist/webhooks/tasks/shared.d.ts +35 -0
- package/dist/webhooks/tasks/shared.js +38 -0
- package/dist/workflow/api/client.d.ts +208 -0
- package/dist/workflow/api/client.js +421 -0
- package/dist/workflow/api/graphql.d.ts +4 -0
- package/dist/workflow/api/graphql.js +18 -0
- package/dist/workflow/api/resolve-command.d.ts +27 -0
- package/dist/workflow/api/resolve-command.js +26 -0
- package/dist/workflow/index.d.ts +18 -0
- package/dist/workflow/index.js +37 -0
- package/dist/workflow/tasks/advance.d.ts +39 -0
- package/dist/workflow/tasks/advance.js +182 -0
- package/dist/workflow/tasks/apply.d.ts +47 -0
- package/dist/workflow/tasks/apply.js +193 -0
- package/dist/workflow/tasks/assigned.d.ts +33 -0
- package/dist/workflow/tasks/assigned.js +41 -0
- package/dist/workflow/tasks/inspect.d.ts +60 -0
- package/dist/workflow/tasks/inspect.js +171 -0
- package/dist/workflow/tasks/list-commands.d.ts +21 -0
- package/dist/workflow/tasks/list-commands.js +54 -0
- package/dist/workflow/tasks/list-defs.d.ts +21 -0
- package/dist/workflow/tasks/list-defs.js +28 -0
- package/dist/workflow/tasks/reset.d.ts +33 -0
- package/dist/workflow/tasks/reset.js +137 -0
- package/dist/workflow/tasks/shared.d.ts +75 -0
- package/dist/workflow/tasks/shared.js +124 -0
- package/dist/workflow/tasks/status.d.ts +21 -0
- package/dist/workflow/tasks/status.js +41 -0
- package/package.json +102 -8
- package/dist/cli.d.ts.map +0 -1
- package/dist/commands/config.d.ts.map +0 -1
- package/dist/commands/deploy/deployments.d.ts.map +0 -1
- package/dist/commands/deploy/editing-host.d.ts.map +0 -1
- package/dist/commands/deploy/environments/deployments.d.ts.map +0 -1
- package/dist/commands/deploy/environments/index.d.ts.map +0 -1
- package/dist/commands/deploy/environments/mutations.d.ts.map +0 -1
- package/dist/commands/deploy/environments/queries.d.ts.map +0 -1
- package/dist/commands/deploy/environments/variables.d.ts.map +0 -1
- package/dist/commands/deploy/environments.d.ts.map +0 -1
- package/dist/commands/deploy/index.d.ts.map +0 -1
- package/dist/commands/deploy/logs.d.ts.map +0 -1
- package/dist/commands/deploy/organizations.d.ts.map +0 -1
- package/dist/commands/deploy/projects.d.ts.map +0 -1
- package/dist/commands/deploy/shared.d.ts.map +0 -1
- package/dist/commands/deploy/site.d.ts.map +0 -1
- package/dist/commands/deploy/source-control.d.ts.map +0 -1
- package/dist/commands/deploy.d.ts.map +0 -1
- package/dist/commands/history.d.ts.map +0 -1
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/login.d.ts.map +0 -1
- package/dist/commands/logout.d.ts.map +0 -1
- package/dist/commands/recipe/index.d.ts.map +0 -1
- package/dist/commands/serialization/index.d.ts.map +0 -1
- package/dist/commands/serialization/package.d.ts.map +0 -1
- package/dist/commands/shared.d.ts.map +0 -1
- package/dist/commands/shell.d.ts.map +0 -1
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/telemetry.d.ts.map +0 -1
- package/dist/config/env-overrides.d.ts.map +0 -1
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/modules.d.ts.map +0 -1
- package/dist/config/paths.d.ts.map +0 -1
- package/dist/config/root-config.d.ts.map +0 -1
- package/dist/config/types.d.ts.map +0 -1
- package/dist/config/validation.d.ts.map +0 -1
- package/dist/deploy/api/common/headers.d.ts.map +0 -1
- package/dist/deploy/api/common/index.d.ts +0 -4
- package/dist/deploy/api/common/index.d.ts.map +0 -1
- package/dist/deploy/api/common/index.js +0 -19
- package/dist/deploy/api/common/request.d.ts.map +0 -1
- package/dist/deploy/api/common/types.d.ts.map +0 -1
- package/dist/deploy/api/common.d.ts +0 -2
- package/dist/deploy/api/common.d.ts.map +0 -1
- package/dist/deploy/api/common.js +0 -17
- package/dist/deploy/api/deployment-logs.d.ts.map +0 -1
- package/dist/deploy/api/deployments.d.ts.map +0 -1
- package/dist/deploy/api/environments.d.ts.map +0 -1
- package/dist/deploy/api/index.d.ts.map +0 -1
- package/dist/deploy/api/logs.d.ts.map +0 -1
- package/dist/deploy/api/organizations.d.ts.map +0 -1
- package/dist/deploy/api/projects.d.ts.map +0 -1
- package/dist/deploy/api/source-control.d.ts.map +0 -1
- package/dist/deploy/api.d.ts.map +0 -1
- package/dist/deploy/tasks/deployment-result.d.ts.map +0 -1
- package/dist/deploy/tasks/deployments.d.ts.map +0 -1
- package/dist/deploy/tasks/editing-host.d.ts.map +0 -1
- package/dist/deploy/tasks/environments.d.ts.map +0 -1
- package/dist/deploy/tasks/index.d.ts +0 -10
- package/dist/deploy/tasks/index.d.ts.map +0 -1
- package/dist/deploy/tasks/index.js +0 -25
- package/dist/deploy/tasks/logs.d.ts.map +0 -1
- package/dist/deploy/tasks/organizations.d.ts.map +0 -1
- package/dist/deploy/tasks/projects.d.ts.map +0 -1
- package/dist/deploy/tasks/shared.d.ts.map +0 -1
- package/dist/deploy/tasks/site-bind.d.ts.map +0 -1
- package/dist/deploy/tasks/site.d.ts.map +0 -1
- package/dist/deploy/tasks/source-control.d.ts.map +0 -1
- package/dist/deploy/tasks/types.d.ts.map +0 -1
- package/dist/deploy/tasks.d.ts +0 -3
- package/dist/deploy/tasks.d.ts.map +0 -1
- package/dist/deploy/tasks.js +0 -18
- package/dist/recipe/api/auth.d.ts.map +0 -1
- package/dist/recipe/api/authoring-client.d.ts.map +0 -1
- package/dist/recipe/api/client.d.ts.map +0 -1
- package/dist/recipe/api/graphql.d.ts.map +0 -1
- package/dist/recipe/api/ref-encoding.d.ts.map +0 -1
- package/dist/recipe/api/site-discovery.d.ts.map +0 -1
- package/dist/recipe/api/sites-client.d.ts.map +0 -1
- package/dist/recipe/cache.d.ts.map +0 -1
- package/dist/recipe/compile/component-section.d.ts.map +0 -1
- package/dist/recipe/compile/component-template.d.ts.map +0 -1
- package/dist/recipe/compile/content-item.d.ts.map +0 -1
- package/dist/recipe/compile/content-template.d.ts.map +0 -1
- package/dist/recipe/compile/enumeration.d.ts.map +0 -1
- package/dist/recipe/compile/page-design.d.ts.map +0 -1
- package/dist/recipe/compile/parameters-template.d.ts +0 -14
- package/dist/recipe/compile/parameters-template.d.ts.map +0 -1
- package/dist/recipe/compile/parameters-template.js +0 -92
- package/dist/recipe/compile/partial-design.d.ts.map +0 -1
- package/dist/recipe/compile/section-definition.d.ts.map +0 -1
- package/dist/recipe/compile/shared.d.ts.map +0 -1
- package/dist/recipe/compile/site-template.d.ts.map +0 -1
- package/dist/recipe/compile/site.d.ts.map +0 -1
- package/dist/recipe/compile.d.ts.map +0 -1
- package/dist/recipe/execute.d.ts.map +0 -1
- package/dist/recipe/guids.d.ts.map +0 -1
- package/dist/recipe/index.d.ts.map +0 -1
- package/dist/recipe/io.d.ts.map +0 -1
- package/dist/recipe/ir/operations.d.ts.map +0 -1
- package/dist/recipe/ir/sitecore-templates.d.ts.map +0 -1
- package/dist/recipe/layout/emit.d.ts.map +0 -1
- package/dist/recipe/layout/templates-mapping.d.ts.map +0 -1
- package/dist/recipe/plan.d.ts.map +0 -1
- package/dist/recipe/policy.d.ts.map +0 -1
- package/dist/recipe/rollback.d.ts.map +0 -1
- package/dist/recipe/schema/field-types.d.ts.map +0 -1
- package/dist/recipe/schema/recipe.d.ts.map +0 -1
- package/dist/recipe/schema/source-fields.d.ts.map +0 -1
- package/dist/recipe/tasks/compile.d.ts.map +0 -1
- package/dist/recipe/tasks/diff.d.ts.map +0 -1
- package/dist/recipe/tasks/index.d.ts +0 -9
- package/dist/recipe/tasks/index.d.ts.map +0 -1
- package/dist/recipe/tasks/index.js +0 -13
- package/dist/recipe/tasks/placeholder-allow.d.ts.map +0 -1
- package/dist/recipe/tasks/plan.d.ts.map +0 -1
- package/dist/recipe/tasks/prune-defaults.d.ts.map +0 -1
- package/dist/recipe/tasks/push.d.ts.map +0 -1
- package/dist/recipe/tasks/shared.d.ts.map +0 -1
- package/dist/recipe/validate.d.ts.map +0 -1
- package/dist/serialization/commands.d.ts.map +0 -1
- package/dist/serialization/compare.d.ts.map +0 -1
- package/dist/serialization/field-filter.d.ts.map +0 -1
- package/dist/serialization/filesystem-store/constants.d.ts.map +0 -1
- package/dist/serialization/filesystem-store/index.d.ts +0 -4
- package/dist/serialization/filesystem-store/index.d.ts.map +0 -1
- package/dist/serialization/filesystem-store/index.js +0 -15
- package/dist/serialization/filesystem-store/items.d.ts.map +0 -1
- package/dist/serialization/filesystem-store/roles.d.ts.map +0 -1
- package/dist/serialization/filesystem-store/users.d.ts.map +0 -1
- package/dist/serialization/filesystem-store/utils.d.ts.map +0 -1
- package/dist/serialization/filesystem-store.d.ts +0 -2
- package/dist/serialization/filesystem-store.d.ts.map +0 -1
- package/dist/serialization/filesystem-store.js +0 -17
- package/dist/serialization/item-path.d.ts.map +0 -1
- package/dist/serialization/path-provider.d.ts.map +0 -1
- package/dist/serialization/signature.d.ts.map +0 -1
- package/dist/serialization/sitecore-api/auth.d.ts +0 -31
- package/dist/serialization/sitecore-api/auth.d.ts.map +0 -1
- package/dist/serialization/sitecore-api/auth.js +0 -319
- package/dist/serialization/sitecore-api/graphql.d.ts +0 -12
- package/dist/serialization/sitecore-api/graphql.d.ts.map +0 -1
- package/dist/serialization/sitecore-api/history.d.ts +0 -9
- package/dist/serialization/sitecore-api/history.d.ts.map +0 -1
- package/dist/serialization/sitecore-api/index.d.ts +0 -7
- package/dist/serialization/sitecore-api/index.d.ts.map +0 -1
- package/dist/serialization/sitecore-api/index.js +0 -22
- package/dist/serialization/sitecore-api/items.d.ts +0 -8
- package/dist/serialization/sitecore-api/items.d.ts.map +0 -1
- package/dist/serialization/sitecore-api/items.js +0 -132
- package/dist/serialization/sitecore-api/publish.d.ts +0 -14
- package/dist/serialization/sitecore-api/publish.d.ts.map +0 -1
- package/dist/serialization/sitecore-api/publish.js +0 -43
- package/dist/serialization/sitecore-api/roles.d.ts +0 -9
- package/dist/serialization/sitecore-api/roles.d.ts.map +0 -1
- package/dist/serialization/sitecore-api/users.d.ts +0 -9
- package/dist/serialization/sitecore-api/users.d.ts.map +0 -1
- package/dist/serialization/sitecore-api.d.ts +0 -2
- package/dist/serialization/sitecore-api.d.ts.map +0 -1
- package/dist/serialization/sitecore-api.js +0 -17
- package/dist/serialization/tasks/diff.d.ts.map +0 -1
- package/dist/serialization/tasks/env/constants.d.ts.map +0 -1
- package/dist/serialization/tasks/env/deploy-token.d.ts.map +0 -1
- package/dist/serialization/tasks/env/index.d.ts +0 -5
- package/dist/serialization/tasks/env/index.d.ts.map +0 -1
- package/dist/serialization/tasks/env/index.js +0 -11
- package/dist/serialization/tasks/env/init/auth.d.ts.map +0 -1
- package/dist/serialization/tasks/env/init/deploy-lookup.d.ts.map +0 -1
- package/dist/serialization/tasks/env/init.d.ts.map +0 -1
- package/dist/serialization/tasks/env/logout.d.ts.map +0 -1
- package/dist/serialization/tasks/env/status.d.ts.map +0 -1
- package/dist/serialization/tasks/env.d.ts +0 -2
- package/dist/serialization/tasks/env.d.ts.map +0 -1
- package/dist/serialization/tasks/env.js +0 -17
- package/dist/serialization/tasks/helpers/collect.d.ts.map +0 -1
- package/dist/serialization/tasks/helpers/commands.d.ts.map +0 -1
- package/dist/serialization/tasks/helpers/filesystem.d.ts.map +0 -1
- package/dist/serialization/tasks/helpers/index.d.ts +0 -6
- package/dist/serialization/tasks/helpers/index.d.ts.map +0 -1
- package/dist/serialization/tasks/helpers/index.js +0 -13
- package/dist/serialization/tasks/helpers/items.d.ts.map +0 -1
- package/dist/serialization/tasks/helpers/sitecore.d.ts.map +0 -1
- package/dist/serialization/tasks/helpers.d.ts +0 -2
- package/dist/serialization/tasks/helpers.d.ts.map +0 -1
- package/dist/serialization/tasks/helpers.js +0 -17
- package/dist/serialization/tasks/index.d.ts +0 -8
- package/dist/serialization/tasks/index.d.ts.map +0 -1
- package/dist/serialization/tasks/index.js +0 -19
- package/dist/serialization/tasks/info.d.ts.map +0 -1
- package/dist/serialization/tasks/package.d.ts.map +0 -1
- package/dist/serialization/tasks/pull.d.ts.map +0 -1
- package/dist/serialization/tasks/push.d.ts.map +0 -1
- package/dist/serialization/tasks/roles.d.ts.map +0 -1
- package/dist/serialization/tasks/shared.d.ts.map +0 -1
- package/dist/serialization/tasks/types.d.ts.map +0 -1
- package/dist/serialization/tasks/users.d.ts.map +0 -1
- package/dist/serialization/tasks/validate.d.ts.map +0 -1
- package/dist/serialization/tasks/watch.d.ts.map +0 -1
- package/dist/serialization/tasks.d.ts +0 -4
- package/dist/serialization/tasks.d.ts.map +0 -1
- package/dist/serialization/tasks.js +0 -19
- package/dist/serialization/tree-spec.d.ts.map +0 -1
- package/dist/serialization/types.d.ts.map +0 -1
- package/dist/serialization/wildcard.d.ts.map +0 -1
- package/dist/serialization/yaml.d.ts.map +0 -1
- package/dist/shared/browser.d.ts.map +0 -1
- package/dist/shared/cli-options.d.ts.map +0 -1
- package/dist/shared/cli-tasks.d.ts.map +0 -1
- package/dist/shared/config-template.d.ts.map +0 -1
- package/dist/shared/env.d.ts +0 -28
- package/dist/shared/env.d.ts.map +0 -1
- package/dist/shared/env.js +0 -38
- package/dist/shared/errors.d.ts.map +0 -1
- package/dist/shared/graphql.d.ts.map +0 -1
- package/dist/shared/history.d.ts.map +0 -1
- package/dist/shared/keychain.d.ts.map +0 -1
- package/dist/shared/logger.d.ts.map +0 -1
- package/dist/shared/output.d.ts.map +0 -1
- package/dist/shared/prompt.d.ts.map +0 -1
- package/dist/shared/redact.d.ts.map +0 -1
- package/dist/shared/spinner.d.ts.map +0 -1
- package/dist/shared/style.d.ts.map +0 -1
- package/dist/shared/telemetry.d.ts.map +0 -1
- package/dist/shared/validate.d.ts.map +0 -1
- package/dist/sites/api/collections.d.ts.map +0 -1
- package/dist/sites/api/index.d.ts +0 -26
- package/dist/sites/api/index.d.ts.map +0 -1
- package/dist/sites/api/index.js +0 -55
- package/dist/sites/api/jobs.d.ts.map +0 -1
- package/dist/sites/api/languages.d.ts.map +0 -1
- package/dist/sites/api/request.d.ts.map +0 -1
- package/dist/sites/api/sites.d.ts.map +0 -1
- package/dist/sites/api/types.d.ts.map +0 -1
- /package/dist/serialization/{sitecore-api → api}/graphql.js +0 -0
- /package/dist/serialization/{sitecore-api → api}/history.js +0 -0
- /package/dist/serialization/{sitecore-api → api}/roles.js +0 -0
- /package/dist/serialization/{sitecore-api → api}/users.js +0 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type BriefApiClientOptions, type BriefQueryRecord, type BriefRequestInit } from "./types";
|
|
2
|
+
export declare const briefRequest: <TResponse>(options: BriefApiClientOptions, path: string, init?: BriefRequestInit & {
|
|
3
|
+
body?: unknown;
|
|
4
|
+
query?: BriefQueryRecord;
|
|
5
|
+
}) => Promise<TResponse>;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.briefRequest = void 0;
|
|
4
|
+
const errors_1 = require("../../shared/errors");
|
|
5
|
+
const redact_1 = require("../../shared/redact");
|
|
6
|
+
const request_1 = require("../../deploy/api/common/request");
|
|
7
|
+
const types_1 = require("./types");
|
|
8
|
+
/**
|
|
9
|
+
* Brief API transport — `briefRequest()`.
|
|
10
|
+
*
|
|
11
|
+
* Mirrors `sitesRequest()` from `src/sites/api/request.ts`: bearer auth,
|
|
12
|
+
* JSON request/response, error mapping that surfaces Sitecore's
|
|
13
|
+
* structured error bodies. Differences vs Sites:
|
|
14
|
+
*
|
|
15
|
+
* - Different base URL (`co-brief-api-<region>.sitecorecloud.io`) — Brief
|
|
16
|
+
* is regional, so callers typically pass `baseUrl` from the env config.
|
|
17
|
+
* - Schema is reverse-engineered, not OpenAPI-codegen-driven (no public
|
|
18
|
+
* spec at time of writing). Helpers in sibling files type response
|
|
19
|
+
* shapes by hand from observed responses.
|
|
20
|
+
*
|
|
21
|
+
* Errors map to scai's `ScaiError` — `NETWORK` for transport failures,
|
|
22
|
+
* `BRIEF_API_FAILED` for non-2xx responses.
|
|
23
|
+
*/
|
|
24
|
+
const toQueryString = (query) => {
|
|
25
|
+
if (!query)
|
|
26
|
+
return "";
|
|
27
|
+
const params = new URLSearchParams();
|
|
28
|
+
for (const [key, value] of Object.entries(query)) {
|
|
29
|
+
if (value === undefined)
|
|
30
|
+
continue;
|
|
31
|
+
if (Array.isArray(value)) {
|
|
32
|
+
for (const entry of value) {
|
|
33
|
+
params.append(key, String(entry));
|
|
34
|
+
}
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
params.set(key, String(value));
|
|
38
|
+
}
|
|
39
|
+
const output = params.toString();
|
|
40
|
+
return output ? `?${output}` : "";
|
|
41
|
+
};
|
|
42
|
+
const briefRequest = async (options, path, init) => {
|
|
43
|
+
const baseUrl = options.baseUrl ?? types_1.DEFAULT_BRIEF_API_BASE;
|
|
44
|
+
const url = `${baseUrl.replace(/\/$/, "")}${path}${toQueryString(init?.query)}`;
|
|
45
|
+
const method = init?.method ? init.method.toUpperCase() : "GET";
|
|
46
|
+
const headers = {
|
|
47
|
+
Authorization: `Bearer ${options.accessToken}`,
|
|
48
|
+
Accept: "application/json",
|
|
49
|
+
};
|
|
50
|
+
if (init?.headers) {
|
|
51
|
+
Object.assign(headers, init.headers);
|
|
52
|
+
}
|
|
53
|
+
let body;
|
|
54
|
+
if (init?.body !== undefined) {
|
|
55
|
+
headers["Content-Type"] = "application/json";
|
|
56
|
+
body = typeof init.body === "string" ? init.body : JSON.stringify(init.body);
|
|
57
|
+
}
|
|
58
|
+
const timeoutMs = Number(process.env.SITECOREAI_REQUEST_TIMEOUT_MS ?? 60000);
|
|
59
|
+
const controller = timeoutMs > 0 ? new AbortController() : undefined;
|
|
60
|
+
const timeoutHandle = controller ? setTimeout(() => controller.abort(), timeoutMs) : undefined;
|
|
61
|
+
let response;
|
|
62
|
+
try {
|
|
63
|
+
response = await fetch(url, { method, headers, body, signal: controller?.signal });
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
throw (0, errors_1.createScaiError)((0, redact_1.redactSecrets)(`Brief API request failed: ${error instanceof Error ? error.message : String(error)}`), "NETWORK", { hint: "Check network connectivity or try again later." });
|
|
67
|
+
}
|
|
68
|
+
finally {
|
|
69
|
+
if (timeoutHandle)
|
|
70
|
+
clearTimeout(timeoutHandle);
|
|
71
|
+
}
|
|
72
|
+
if (!response.ok) {
|
|
73
|
+
const responseBody = await (0, request_1.parseJsonIfPossible)(response);
|
|
74
|
+
const message = (0, request_1.extractErrorMessage)(responseBody);
|
|
75
|
+
const sanitized = message ? (0, redact_1.redactSecrets)(message) : undefined;
|
|
76
|
+
throw (0, errors_1.createScaiError)(sanitized ?? `Brief API request failed (${response.status})`, "BRIEF_API_FAILED");
|
|
77
|
+
}
|
|
78
|
+
if (response.status === 204) {
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
81
|
+
return (await (0, request_1.parseJsonIfPossible)(response));
|
|
82
|
+
};
|
|
83
|
+
exports.briefRequest = briefRequest;
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Brief API response schema — hand-written from observed payloads.
|
|
3
|
+
*
|
|
4
|
+
* The API has no published OpenAPI spec at time of writing, so these
|
|
5
|
+
* types reflect what `scripts/_smoke-brief-shapes.ts` captured against
|
|
6
|
+
* the Agents env on 2026-05-14. Re-run that probe and diff this file
|
|
7
|
+
* if the API surface changes.
|
|
8
|
+
*
|
|
9
|
+
* Conventions observed across the API:
|
|
10
|
+
* - List endpoints return a paged envelope: `{ totalCount, next, data }`
|
|
11
|
+
* - References use a discriminated union (`Link` vs `ExternalLink`)
|
|
12
|
+
* - Internal IDs are GUIDs; external IDs carry their provenance
|
|
13
|
+
* (`auth0|...`, `<clientId>@clients`)
|
|
14
|
+
* - Localized strings are keyed by BCP-47-ish locale (`{ "en-us": "..." }`)
|
|
15
|
+
* - Timestamps are ISO-8601 with sub-second precision
|
|
16
|
+
*/
|
|
17
|
+
/** Paged list envelope returned by every Brief list endpoint. */
|
|
18
|
+
export type PagedResult<T> = {
|
|
19
|
+
totalCount: number;
|
|
20
|
+
/** Cursor for the next page, or null at end of stream. Shape TBD — pass through verbatim. */
|
|
21
|
+
next: string | null;
|
|
22
|
+
data: T[];
|
|
23
|
+
};
|
|
24
|
+
/** Localized label: BCP-47-ish locale (e.g. `en-us`) → string. */
|
|
25
|
+
export type LocalizedString = Record<string, string>;
|
|
26
|
+
/** Reference to another resource inside the Brief API itself. */
|
|
27
|
+
export type Link = {
|
|
28
|
+
type: "Link";
|
|
29
|
+
/** The resource kind the link points at, e.g. `BriefType`. */
|
|
30
|
+
relatedType: string;
|
|
31
|
+
/** GUID of the related resource. */
|
|
32
|
+
id: string;
|
|
33
|
+
/** Absolute URI you can GET to dereference. */
|
|
34
|
+
uri: string;
|
|
35
|
+
};
|
|
36
|
+
/** Reference to a resource owned by a sibling Sitecore Cloud service. */
|
|
37
|
+
export type ExternalLink = {
|
|
38
|
+
type: "ExternalLink";
|
|
39
|
+
/** Source system slug, e.g. `xmcloud`, `co`. */
|
|
40
|
+
relatedSystem: string;
|
|
41
|
+
relatedType: string | null;
|
|
42
|
+
/** Foreign identifier — Auth0 subject, client-credentials principal, etc. */
|
|
43
|
+
id: string;
|
|
44
|
+
};
|
|
45
|
+
export type Reference = Link | ExternalLink;
|
|
46
|
+
/**
|
|
47
|
+
* BriefType field definition — discriminated on `type`. The Brief API
|
|
48
|
+
* uses these to drive UI form generation and feed `aiIntent` hints to
|
|
49
|
+
* downstream AI assistants editing the brief's content.
|
|
50
|
+
*/
|
|
51
|
+
export type BriefFieldBase = {
|
|
52
|
+
name: string;
|
|
53
|
+
label: LocalizedString;
|
|
54
|
+
helpText?: LocalizedString;
|
|
55
|
+
required: boolean;
|
|
56
|
+
/** Whether AI assistants may write this field. Read for `aiIntent` either way. */
|
|
57
|
+
aiEditable: boolean;
|
|
58
|
+
/** Free-form prompt the API ships to AI clients describing how to fill the field. */
|
|
59
|
+
aiIntent?: string;
|
|
60
|
+
};
|
|
61
|
+
export type RichTextField = BriefFieldBase & {
|
|
62
|
+
type: "RichText";
|
|
63
|
+
};
|
|
64
|
+
export type DateTimeField = BriefFieldBase & {
|
|
65
|
+
type: "DateTime";
|
|
66
|
+
};
|
|
67
|
+
export type TimelineField = BriefFieldBase & {
|
|
68
|
+
type: "Timeline";
|
|
69
|
+
/** Schedule calculation strategy enum — observed values include `0`. Semantics TBD. */
|
|
70
|
+
calculation: number;
|
|
71
|
+
skipHolidays: boolean;
|
|
72
|
+
skipWeekend: boolean;
|
|
73
|
+
/** IANA tz string, may be empty. */
|
|
74
|
+
timezone: string;
|
|
75
|
+
};
|
|
76
|
+
export type BudgetField = BriefFieldBase & {
|
|
77
|
+
type: "Budget";
|
|
78
|
+
/** ISO-4217 currency codes the field accepts. */
|
|
79
|
+
currencies: string[];
|
|
80
|
+
};
|
|
81
|
+
/** Union of every observed field kind. New kinds will widen this union. */
|
|
82
|
+
export type BriefField = RichTextField | DateTimeField | TimelineField | BudgetField;
|
|
83
|
+
/** BriefType — the schema template a brief instance is built against. */
|
|
84
|
+
export type BriefType = {
|
|
85
|
+
id: string;
|
|
86
|
+
/** Stable codename, e.g. `CreativeBrief`. */
|
|
87
|
+
name: string;
|
|
88
|
+
/** Localized human label. */
|
|
89
|
+
label: LocalizedString;
|
|
90
|
+
/** mdi icon codepoint name. */
|
|
91
|
+
icon: string;
|
|
92
|
+
iconColor: string;
|
|
93
|
+
description: string;
|
|
94
|
+
/** Field definitions in display order. */
|
|
95
|
+
fields: BriefField[];
|
|
96
|
+
createdOn: string;
|
|
97
|
+
createdBy: Reference;
|
|
98
|
+
updatedOn: string;
|
|
99
|
+
updatedBy: Reference;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* Brief workflow status. The full enum was surfaced by the API's own
|
|
103
|
+
* validation error (2026-05-15): "Status must be one of: Approved,
|
|
104
|
+
* InReview, Draft, Canceled, Archived". `InReview` is the wire value
|
|
105
|
+
* for the "In Review" UI label.
|
|
106
|
+
*/
|
|
107
|
+
export type BriefStatus = "Draft" | "InReview" | "Approved" | "Canceled" | "Archived";
|
|
108
|
+
/**
|
|
109
|
+
* Brief instance — the unit of work. `status` is freely writable via
|
|
110
|
+
* `PUT /briefs/{id}` (not workflow-gated).
|
|
111
|
+
*/
|
|
112
|
+
export type Brief = {
|
|
113
|
+
id: string;
|
|
114
|
+
icon: string | null;
|
|
115
|
+
name: string;
|
|
116
|
+
status: BriefStatus;
|
|
117
|
+
/** BCP-47-ish locale, e.g. `en-us`. */
|
|
118
|
+
locale: string;
|
|
119
|
+
/** Field values keyed by `BriefField.name`. Shape per-field TBD. */
|
|
120
|
+
fields: Record<string, unknown>;
|
|
121
|
+
briefType: Link;
|
|
122
|
+
isTemplate: boolean;
|
|
123
|
+
/** Inline collections returned with the brief. May be empty on list responses. */
|
|
124
|
+
comments: BriefComment[];
|
|
125
|
+
/** To-dos on the brief. Wire field is `tasks`; the UI/CLI label is "to-do". */
|
|
126
|
+
tasks: BriefTask[];
|
|
127
|
+
references: Reference[];
|
|
128
|
+
contributors: Reference[];
|
|
129
|
+
externalMappings: ExternalMapping[];
|
|
130
|
+
createdOn: string;
|
|
131
|
+
createdBy: Reference;
|
|
132
|
+
updatedOn: string;
|
|
133
|
+
updatedBy: Reference;
|
|
134
|
+
};
|
|
135
|
+
/** Cross-system mapping rows tying a brief to records in other Sitecore Cloud services. */
|
|
136
|
+
export type ExternalMapping = Record<string, unknown>;
|
|
137
|
+
/**
|
|
138
|
+
* Task on a brief. Shape is **provisional** — no task payload was
|
|
139
|
+
* captured during reverse-engineering (the test brief has zero tasks).
|
|
140
|
+
* Re-probe when a brief with tasks is available and tighten this type.
|
|
141
|
+
*
|
|
142
|
+
* Naming note: the Content Operations UI — and scai's CLI/MCP surface —
|
|
143
|
+
* call these "to-dos". This wire type keeps the API's `task` naming for
|
|
144
|
+
* fidelity; the user-facing label is "to-do" (`scai ops brief todos`).
|
|
145
|
+
*/
|
|
146
|
+
export type BriefTask = {
|
|
147
|
+
id: string;
|
|
148
|
+
[key: string]: unknown;
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* Comment on a brief. Shape is **provisional** — no comment payload
|
|
152
|
+
* was captured during reverse-engineering. Re-probe when comments
|
|
153
|
+
* exist.
|
|
154
|
+
*/
|
|
155
|
+
export type BriefComment = {
|
|
156
|
+
id: string;
|
|
157
|
+
[key: string]: unknown;
|
|
158
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Brief API response schema — hand-written from observed payloads.
|
|
4
|
+
*
|
|
5
|
+
* The API has no published OpenAPI spec at time of writing, so these
|
|
6
|
+
* types reflect what `scripts/_smoke-brief-shapes.ts` captured against
|
|
7
|
+
* the Agents env on 2026-05-14. Re-run that probe and diff this file
|
|
8
|
+
* if the API surface changes.
|
|
9
|
+
*
|
|
10
|
+
* Conventions observed across the API:
|
|
11
|
+
* - List endpoints return a paged envelope: `{ totalCount, next, data }`
|
|
12
|
+
* - References use a discriminated union (`Link` vs `ExternalLink`)
|
|
13
|
+
* - Internal IDs are GUIDs; external IDs carry their provenance
|
|
14
|
+
* (`auth0|...`, `<clientId>@clients`)
|
|
15
|
+
* - Localized strings are keyed by BCP-47-ish locale (`{ "en-us": "..." }`)
|
|
16
|
+
* - Timestamps are ISO-8601 with sub-second precision
|
|
17
|
+
*/
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { BriefTask, PagedResult } from "./schema";
|
|
2
|
+
import type { BriefApiClientOptions } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Tasks resource on the Brief API.
|
|
5
|
+
*
|
|
6
|
+
* Naming note: the Content Operations UI — and scai's CLI/MCP surface —
|
|
7
|
+
* label these "to-dos". The wire resource is `tasks`; the SDK names below
|
|
8
|
+
* mirror the wire for fidelity. The user-facing surface is `todos`
|
|
9
|
+
* (`scai ops brief todos`, `runBriefTodosList`, MCP verb 'todos').
|
|
10
|
+
*
|
|
11
|
+
* Endpoint surface (reverse-engineered):
|
|
12
|
+
* GET /api/brief/v1/tasks?BriefId=<uuid>&MetadataToLoad=assignees
|
|
13
|
+
*
|
|
14
|
+
* Known query parameters:
|
|
15
|
+
* - `BriefId` (uuid) — filters tasks to a single brief. Optional —
|
|
16
|
+
* the bare endpoint returns the tenant-wide task list.
|
|
17
|
+
* - `MetadataToLoad` (csv) — expand directives. Confirmed: `assignees`.
|
|
18
|
+
* Other valid values TBD.
|
|
19
|
+
* - `Limit` (int) — page size.
|
|
20
|
+
* - `Next` (string) — pagination cursor from the previous response.
|
|
21
|
+
*
|
|
22
|
+
* The task object shape is provisional — the probe tenant had zero
|
|
23
|
+
* tasks at discovery time. Tighten `BriefTask` in `./schema.ts` once
|
|
24
|
+
* a payload is captured.
|
|
25
|
+
*/
|
|
26
|
+
/** Metadata expansion options for task list responses. */
|
|
27
|
+
export type BriefTaskMetadata = "assignees";
|
|
28
|
+
export type ListBriefTasksQuery = {
|
|
29
|
+
/** Filter to one brief. Omit for tenant-wide list. */
|
|
30
|
+
briefId?: string;
|
|
31
|
+
/** Expand directives — e.g. `["assignees"]`. */
|
|
32
|
+
metadataToLoad?: BriefTaskMetadata[];
|
|
33
|
+
/** Page size. */
|
|
34
|
+
limit?: number;
|
|
35
|
+
/** Cursor from previous response. */
|
|
36
|
+
next?: string;
|
|
37
|
+
};
|
|
38
|
+
/** List tasks (optionally filtered by brief). */
|
|
39
|
+
export declare const listBriefTasks: (options: BriefApiClientOptions, query?: ListBriefTasksQuery) => Promise<PagedResult<BriefTask>>;
|
|
40
|
+
/** Read a single task by id. **Untested** — inferred from REST conventions. */
|
|
41
|
+
export declare const getBriefTask: (options: BriefApiClientOptions, taskId: string) => Promise<BriefTask>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getBriefTask = exports.listBriefTasks = void 0;
|
|
4
|
+
const request_1 = require("./request");
|
|
5
|
+
/** List tasks (optionally filtered by brief). */
|
|
6
|
+
const listBriefTasks = (options, query) => {
|
|
7
|
+
const params = {};
|
|
8
|
+
if (query?.briefId)
|
|
9
|
+
params.BriefId = query.briefId;
|
|
10
|
+
if (query?.metadataToLoad && query.metadataToLoad.length > 0) {
|
|
11
|
+
params.MetadataToLoad = query.metadataToLoad.join(",");
|
|
12
|
+
}
|
|
13
|
+
if (query?.limit !== undefined)
|
|
14
|
+
params.Limit = query.limit;
|
|
15
|
+
if (query?.next)
|
|
16
|
+
params.Next = query.next;
|
|
17
|
+
return (0, request_1.briefRequest)(options, "/api/brief/v1/tasks", {
|
|
18
|
+
query: params,
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
exports.listBriefTasks = listBriefTasks;
|
|
22
|
+
/** Read a single task by id. **Untested** — inferred from REST conventions. */
|
|
23
|
+
const getBriefTask = (options, taskId) => (0, request_1.briefRequest)(options, `/api/brief/v1/tasks/${encodeURIComponent(taskId)}`);
|
|
24
|
+
exports.getBriefTask = getBriefTask;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type BriefApiClientOptions = {
|
|
2
|
+
/** Defaults to the EU-West host. CLI/recipe callers fill it region-aware. */
|
|
3
|
+
baseUrl?: string;
|
|
4
|
+
/** Bearer token from `auth.sitecorecloud.io` — required scopes are TBD pending API discovery. */
|
|
5
|
+
accessToken: string;
|
|
6
|
+
};
|
|
7
|
+
/** Brief host template — `{region}` is filled by `resolveRegionalBaseUrl`. */
|
|
8
|
+
export declare const BRIEF_API_HOST_TEMPLATE = "https://co-brief-api-{region}.sitecorecloud.io";
|
|
9
|
+
/** Fallback host (EU-West) for callers that resolve no region. */
|
|
10
|
+
export declare const DEFAULT_BRIEF_API_BASE: string;
|
|
11
|
+
/** Per-call options shared by every helper. */
|
|
12
|
+
export type BriefRequestInit = {
|
|
13
|
+
method?: string;
|
|
14
|
+
headers?: Record<string, string>;
|
|
15
|
+
};
|
|
16
|
+
export type BriefQueryValue = string | number | boolean;
|
|
17
|
+
export type BriefQueryRecord = Record<string, BriefQueryValue | BriefQueryValue[] | undefined>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_BRIEF_API_BASE = exports.BRIEF_API_HOST_TEMPLATE = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Public configuration shape for Brief API clients. Mirrors
|
|
6
|
+
* `SitesApiClientOptions` — bring your own access token, optionally
|
|
7
|
+
* override the base URL.
|
|
8
|
+
*
|
|
9
|
+
* Unlike Sites (single global host), Brief is regional: hosts follow
|
|
10
|
+
* the `co-brief-api-<region>.sitecorecloud.io` pattern (e.g.
|
|
11
|
+
* `co-brief-api-euw` for EU-West, `co-brief-api-eus` for US-East).
|
|
12
|
+
* Each environment binds to one region. The CLI/recipe layers fill
|
|
13
|
+
* `baseUrl` via the shared region resolver (`@/shared/region` — org id
|
|
14
|
+
* → region); the default below is the fallback for direct library
|
|
15
|
+
* callers and probe scripts that bring no environment.
|
|
16
|
+
*/
|
|
17
|
+
const region_1 = require("../../shared/region");
|
|
18
|
+
/** Brief host template — `{region}` is filled by `resolveRegionalBaseUrl`. */
|
|
19
|
+
exports.BRIEF_API_HOST_TEMPLATE = "https://co-brief-api-{region}.sitecorecloud.io";
|
|
20
|
+
/** Fallback host (EU-West) for callers that resolve no region. */
|
|
21
|
+
exports.DEFAULT_BRIEF_API_BASE = (0, region_1.regionalHost)(exports.BRIEF_API_HOST_TEMPLATE, region_1.DEFAULT_REGION);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { SitecoreApiClientOptions } from "../serialization/api/types";
|
|
2
|
+
/**
|
|
3
|
+
* OAuth scopes the Content Operations Brief API requires.
|
|
4
|
+
*
|
|
5
|
+
* Discovered 2026-05-14 by probing the Agents env M2M client:
|
|
6
|
+
* - `co.briefs:r` — read briefs, brief types, tasks, comments
|
|
7
|
+
* - `co.briefs:w` — create/update/delete briefs, post tasks/comments
|
|
8
|
+
*
|
|
9
|
+
* The Agents env automation client carries both by default — minting
|
|
10
|
+
* a token with no `scope` parameter still includes `co.briefs:r/w` in
|
|
11
|
+
* the granted claim. Requesting the scopes explicitly is the
|
|
12
|
+
* least-privilege path and the one used here.
|
|
13
|
+
*/
|
|
14
|
+
export declare const BRIEF_SCOPES_REQUESTED: readonly ["co.briefs:r", "co.briefs:w"];
|
|
15
|
+
export interface AcquireBriefTokenOptions {
|
|
16
|
+
/**
|
|
17
|
+
* Sitecore organization id — the Brief API is org-scoped, so the
|
|
18
|
+
* minted token is cached under `brief:<orgId>` in the OS keychain.
|
|
19
|
+
*/
|
|
20
|
+
orgId: string;
|
|
21
|
+
/**
|
|
22
|
+
* Credential-bearing options used to mint the token: the matched env
|
|
23
|
+
* profile's client metadata (when one exists — `name`, `clientId`,
|
|
24
|
+
* `automationClient`, `authority`) plus `organizationId` / `orgClientId`,
|
|
25
|
+
* so the three-tier credential chain can resolve a usable client.
|
|
26
|
+
*/
|
|
27
|
+
environment: SitecoreApiClientOptions;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Returns a Bearer JWT for the Sitecore Content Operations Brief API.
|
|
31
|
+
*
|
|
32
|
+
* Resolution order:
|
|
33
|
+
* 1. Brief-specific keychain entry, if still valid (JWT not expired).
|
|
34
|
+
* 2. M2M client-credentials mint with `co.briefs:r co.briefs:w`. The
|
|
35
|
+
* `clientId` + `clientSecret` are resolved by `resolveClientCredential`
|
|
36
|
+
* — the shared three-tier chain: the
|
|
37
|
+
* `SITECOREAI_ENV_<ENV>_CLIENT_SECRET` env-var override, then the
|
|
38
|
+
* env-scoped automation client in the OS keychain, then the
|
|
39
|
+
* org-scoped one. Result is cached.
|
|
40
|
+
*
|
|
41
|
+
* Refuses with `AUTH_REQUIRED` if neither path yields a token. There
|
|
42
|
+
* is no interactive login flow — Brief calls are always agent-driven.
|
|
43
|
+
*/
|
|
44
|
+
export declare const acquireBriefToken: (options: AcquireBriefTokenOptions) => Promise<string>;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.acquireBriefToken = exports.BRIEF_SCOPES_REQUESTED = void 0;
|
|
4
|
+
const auth_1 = require("../serialization/api/auth");
|
|
5
|
+
const client_credential_1 = require("../shared/client-credential");
|
|
6
|
+
const errors_1 = require("../shared/errors");
|
|
7
|
+
const keychain_1 = require("../shared/keychain");
|
|
8
|
+
/**
|
|
9
|
+
* OAuth scopes the Content Operations Brief API requires.
|
|
10
|
+
*
|
|
11
|
+
* Discovered 2026-05-14 by probing the Agents env M2M client:
|
|
12
|
+
* - `co.briefs:r` — read briefs, brief types, tasks, comments
|
|
13
|
+
* - `co.briefs:w` — create/update/delete briefs, post tasks/comments
|
|
14
|
+
*
|
|
15
|
+
* The Agents env automation client carries both by default — minting
|
|
16
|
+
* a token with no `scope` parameter still includes `co.briefs:r/w` in
|
|
17
|
+
* the granted claim. Requesting the scopes explicitly is the
|
|
18
|
+
* least-privilege path and the one used here.
|
|
19
|
+
*/
|
|
20
|
+
exports.BRIEF_SCOPES_REQUESTED = ["co.briefs:r", "co.briefs:w"];
|
|
21
|
+
const M2M_SCOPE_PARAM = exports.BRIEF_SCOPES_REQUESTED.join(" ");
|
|
22
|
+
const SCOPE_DENIED_HINT = "Confirm the environment's automation client is authorized in Auth0 for the co.briefs:r and co.briefs:w scopes.";
|
|
23
|
+
/**
|
|
24
|
+
* JWT exp claim (seconds since epoch) — used to decide whether a cached
|
|
25
|
+
* token is still usable. We refresh ~60s early to absorb clock skew and
|
|
26
|
+
* in-flight request latency.
|
|
27
|
+
*/
|
|
28
|
+
const decodeExp = (jwt) => {
|
|
29
|
+
const parts = jwt.split(".");
|
|
30
|
+
if (parts.length < 2)
|
|
31
|
+
return undefined;
|
|
32
|
+
try {
|
|
33
|
+
const b64 = parts[1].replace(/-/g, "+").replace(/_/g, "/");
|
|
34
|
+
const padded = b64 + "==".slice(0, (4 - (b64.length % 4)) % 4);
|
|
35
|
+
const payload = JSON.parse(Buffer.from(padded, "base64").toString("utf8"));
|
|
36
|
+
return typeof payload.exp === "number" ? payload.exp : undefined;
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
const isFresh = (jwt, skewSeconds = 60) => {
|
|
43
|
+
const exp = decodeExp(jwt);
|
|
44
|
+
if (exp === undefined)
|
|
45
|
+
return false;
|
|
46
|
+
const nowSeconds = Math.floor(Date.now() / 1000);
|
|
47
|
+
return exp > nowSeconds + skewSeconds;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Returns a Bearer JWT for the Sitecore Content Operations Brief API.
|
|
51
|
+
*
|
|
52
|
+
* Resolution order:
|
|
53
|
+
* 1. Brief-specific keychain entry, if still valid (JWT not expired).
|
|
54
|
+
* 2. M2M client-credentials mint with `co.briefs:r co.briefs:w`. The
|
|
55
|
+
* `clientId` + `clientSecret` are resolved by `resolveClientCredential`
|
|
56
|
+
* — the shared three-tier chain: the
|
|
57
|
+
* `SITECOREAI_ENV_<ENV>_CLIENT_SECRET` env-var override, then the
|
|
58
|
+
* env-scoped automation client in the OS keychain, then the
|
|
59
|
+
* org-scoped one. Result is cached.
|
|
60
|
+
*
|
|
61
|
+
* Refuses with `AUTH_REQUIRED` if neither path yields a token. There
|
|
62
|
+
* is no interactive login flow — Brief calls are always agent-driven.
|
|
63
|
+
*/
|
|
64
|
+
const acquireBriefToken = async (options) => {
|
|
65
|
+
const cached = await (0, keychain_1.getBriefToken)(options.orgId);
|
|
66
|
+
if (cached && isFresh(cached)) {
|
|
67
|
+
return cached;
|
|
68
|
+
}
|
|
69
|
+
const env = options.environment;
|
|
70
|
+
// The client secret never lives in the config file — `resolveClientCredential`
|
|
71
|
+
// walks the three tiers (env-var override → env-scoped keychain client →
|
|
72
|
+
// org-scoped keychain client) and pairs the secret with the `clientId`
|
|
73
|
+
// it is handed from the config-resident metadata. `env.name` is the
|
|
74
|
+
// matched env profile's name (tiers 1–2); it is `undefined` when the
|
|
75
|
+
// org was resolved with no env profile, leaving only tier 3.
|
|
76
|
+
const credential = await (0, client_credential_1.resolveClientCredential)({
|
|
77
|
+
envName: env.name,
|
|
78
|
+
clientId: env.clientId,
|
|
79
|
+
automationClientId: env.automationClient?.clientId,
|
|
80
|
+
organizationId: env.organizationId,
|
|
81
|
+
orgClientId: env.orgClientId,
|
|
82
|
+
});
|
|
83
|
+
if (credential && env.authority) {
|
|
84
|
+
try {
|
|
85
|
+
const result = await (0, auth_1.requestClientCredentialsToken)({ ...env, clientId: credential.clientId, clientSecret: credential.clientSecret }, M2M_SCOPE_PARAM);
|
|
86
|
+
if (result.accessToken) {
|
|
87
|
+
await (0, keychain_1.setBriefToken)(options.orgId, result.accessToken);
|
|
88
|
+
return result.accessToken;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
throw (0, errors_1.createScaiError)("Could not acquire a brief-scoped token via client credentials.", "AUTH_REQUIRED", {
|
|
93
|
+
hint: `${SCOPE_DENIED_HINT} Underlying error: ${error instanceof Error ? error.message : String(error)}`,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
throw (0, errors_1.createScaiError)(`No brief-scoped token available for organization '${options.orgId}'.`, "AUTH_REQUIRED", {
|
|
98
|
+
hint: "Provide an automation client for the org — run `scai setup env <name>` (env-scoped) or `scai setup client create --org` (org-scoped) to mint one (its secret is stored in the OS keychain), or bring your own by setting SITECOREAI_ENV_<ENV>_CLIENT_ID and SITECOREAI_ENV_<ENV>_CLIENT_SECRET. The Brief API does not support interactive operator login.",
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
exports.acquireBriefToken = acquireBriefToken;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type BriefApiClientOptions } from "./api/types";
|
|
2
|
+
/** Options for {@link resolveBriefClient}. */
|
|
3
|
+
export interface ResolveBriefClientOptions {
|
|
4
|
+
/** Explicit organization id; resolved from the env profile otherwise. */
|
|
5
|
+
orgId?: string;
|
|
6
|
+
/** Environment profile name — used only to derive its `organizationId`. */
|
|
7
|
+
environmentName?: string;
|
|
8
|
+
/** Base directory for resolving `sitecoreai.cli.json`; defaults to cwd. */
|
|
9
|
+
config?: string;
|
|
10
|
+
}
|
|
11
|
+
/** A resolved Brief API client plus the organization it is bound to. */
|
|
12
|
+
export interface ResolvedBriefClient {
|
|
13
|
+
client: BriefApiClientOptions;
|
|
14
|
+
orgId: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Resolve a ready-to-use Brief API client for an organization.
|
|
18
|
+
*
|
|
19
|
+
* Resolves the org, acquires a `co.briefs:*`-scoped token (minted from
|
|
20
|
+
* the org's automation client), and region-resolves the API host from
|
|
21
|
+
* the org id (an env profile may pin `briefBaseUrl` to override it).
|
|
22
|
+
* Because the brief token is scope-restricted, the region lookup mints
|
|
23
|
+
* a separate no-scope M2M token.
|
|
24
|
+
*/
|
|
25
|
+
export declare const resolveBriefClient: (options?: ResolveBriefClientOptions) => Promise<ResolvedBriefClient>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveBriefClient = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Brief API client resolution — organization lookup, brief-scoped token
|
|
6
|
+
* acquisition, and region-resolved host, assembled into the
|
|
7
|
+
* `BriefApiClientOptions` that every `./api/*` operation takes.
|
|
8
|
+
*
|
|
9
|
+
* This is the orchestration the CLI runners (`./tasks`) and MCP tools
|
|
10
|
+
* share. It is exported from the area barrel so an SDK consumer can
|
|
11
|
+
* obtain a ready client without reaching into the CLI runner layer.
|
|
12
|
+
*
|
|
13
|
+
* The Brief API is **org-scoped** — briefs live at organization scope
|
|
14
|
+
* and the minted token covers the whole org — so this resolves an
|
|
15
|
+
* organization, not an environment, via the shared `resolveOrganization`
|
|
16
|
+
* (no `--environment-name` required). An env profile is still consulted,
|
|
17
|
+
* when one exists, only to supply the automation client that mints the
|
|
18
|
+
* token.
|
|
19
|
+
*
|
|
20
|
+
* Presentation-free: no logger, no stdout, no `process.exit`.
|
|
21
|
+
*/
|
|
22
|
+
const organization_1 = require("../policy/organization");
|
|
23
|
+
const region_1 = require("../shared/region");
|
|
24
|
+
const auth_1 = require("../serialization/api/auth");
|
|
25
|
+
const auth_2 = require("./auth");
|
|
26
|
+
const types_1 = require("./api/types");
|
|
27
|
+
/**
|
|
28
|
+
* Resolve a ready-to-use Brief API client for an organization.
|
|
29
|
+
*
|
|
30
|
+
* Resolves the org, acquires a `co.briefs:*`-scoped token (minted from
|
|
31
|
+
* the org's automation client), and region-resolves the API host from
|
|
32
|
+
* the org id (an env profile may pin `briefBaseUrl` to override it).
|
|
33
|
+
* Because the brief token is scope-restricted, the region lookup mints
|
|
34
|
+
* a separate no-scope M2M token.
|
|
35
|
+
*/
|
|
36
|
+
const resolveBriefClient = async (options = {}) => {
|
|
37
|
+
const { orgId, environment, root } = (0, organization_1.resolveOrganization)(options);
|
|
38
|
+
// Brief is org-scoped, but the automation client that mints its token
|
|
39
|
+
// is env- or org-scoped. Carry the matched env profile's client
|
|
40
|
+
// metadata (when one exists) plus the org-scoped client id so the
|
|
41
|
+
// three-tier credential chain can resolve a usable client.
|
|
42
|
+
const credentialEnv = {
|
|
43
|
+
...environment,
|
|
44
|
+
organizationId: orgId,
|
|
45
|
+
orgClientId: root.orgClients?.[orgId]?.clientId,
|
|
46
|
+
};
|
|
47
|
+
const accessToken = await (0, auth_2.acquireBriefToken)({ orgId, environment: credentialEnv });
|
|
48
|
+
const baseUrl = await (0, region_1.resolveRegionalBaseUrl)({
|
|
49
|
+
hostTemplate: types_1.BRIEF_API_HOST_TEMPLATE,
|
|
50
|
+
organizationId: orgId,
|
|
51
|
+
override: environment?.briefBaseUrl,
|
|
52
|
+
acquireToken: async () => (await (0, auth_1.requestClientCredentialsToken)(credentialEnv)).accessToken,
|
|
53
|
+
});
|
|
54
|
+
return { orgId, client: { accessToken, baseUrl } };
|
|
55
|
+
};
|
|
56
|
+
exports.resolveBriefClient = resolveBriefClient;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public entry for `@sitecoreai-labs/sitecoreai-cli/unstable/brief`.
|
|
3
|
+
*
|
|
4
|
+
* Sitecore Content Operations Brief API client. Hosts follow
|
|
5
|
+
* `co-brief-api-<region>.sitecorecloud.io`; the default is EU-West but
|
|
6
|
+
* callers normally pass `baseUrl` from per-env config.
|
|
7
|
+
*
|
|
8
|
+
* **Status**: UNSTABLE — ships under `./unstable/brief` and carries no
|
|
9
|
+
* SemVer stability promise; schemas and behavior may change in any
|
|
10
|
+
* release. Reverse-engineered against the Agents env. Read helpers
|
|
11
|
+
* (`listBriefs`, `getBrief`, `listBriefTypes`, `getBriefType`,
|
|
12
|
+
* `listBriefTasks`, `listBriefComments`) verified 2026-05-14. BriefType
|
|
13
|
+
* writes (`createBriefType`, `updateBriefType`, `deleteBriefType`) verified
|
|
14
|
+
* end-to-end 2026-05-15 by `scripts/_smoke-brief-types-write.ts`. Brief
|
|
15
|
+
* writes (`createBrief`, `updateBrief`, `deleteBrief`) are wired but
|
|
16
|
+
* not yet smoke-tested. `createBriefComment` is wired UNVERIFIED — the
|
|
17
|
+
* comment write body shape is a best guess (see `./api/comments.ts`).
|
|
18
|
+
*
|
|
19
|
+
* Required Auth0 scope: `co.briefs:r` (read) / `co.briefs:r co.briefs:w`
|
|
20
|
+
* (read+write). The Agents env client carries both by default.
|
|
21
|
+
*/
|
|
22
|
+
export type { BriefApiClientOptions, BriefRequestInit, BriefQueryValue, BriefQueryRecord, } from "./api/types";
|
|
23
|
+
export { BRIEF_API_HOST_TEMPLATE, DEFAULT_BRIEF_API_BASE } from "./api/types";
|
|
24
|
+
export { briefRequest } from "./api/request";
|
|
25
|
+
export type { PagedResult, LocalizedString, Link, ExternalLink, Reference, BriefField, BriefFieldBase, RichTextField, DateTimeField, TimelineField, BudgetField, BriefType, Brief, BriefStatus, BriefTask, BriefComment, ExternalMapping, } from "./api/schema";
|
|
26
|
+
export { listBriefs, getBrief, createBrief, updateBrief, setBriefStatus, deleteBrief, type CreateBriefInput, type ListBriefsQuery, } from "./api/briefs";
|
|
27
|
+
export { listBriefTypes, getBriefType, createBriefType, updateBriefType, deleteBriefType, type CreateBriefTypeInput, } from "./api/brief-types";
|
|
28
|
+
export { listBriefTasks, getBriefTask, type BriefTaskMetadata, type ListBriefTasksQuery, } from "./api/tasks";
|
|
29
|
+
export { listBriefComments, createBriefComment, type ListBriefCommentsQuery, type CreateBriefCommentInput, } from "./api/comments";
|
|
30
|
+
export { acquireBriefToken, BRIEF_SCOPES_REQUESTED, type AcquireBriefTokenOptions } from "./auth";
|
|
31
|
+
export { resolveBriefClient, type ResolveBriefClientOptions, type ResolvedBriefClient, } from "./client";
|