From 6b11cd8eb85cef12443ed344a77f6c4f740334c4 Mon Sep 17 00:00:00 2001 From: kl3inIT Date: Sun, 26 Jul 2026 03:32:50 +0700 Subject: [PATCH] feat(asset-registry): complete golden poc --- ARCHITECTURE.md | 38 +- .../AssetRegistryIntegrationTests.java | 316 ++++++++++++++++ .../src/test/resources/db/test-foundation.sql | 24 ++ contracts/openapi.json | 2 +- .../AssetRegistryCoordinator.java | 25 ++ .../core/assetregistry/AssetView.java | 8 + demo/fixtures/asset-registry/README.md | 28 ++ .../capability-pack-template.json | 36 ++ .../fixtures/asset-registry/mock-tickets.json | 10 + .../asset-registry/prompt-template.json | 110 ++++++ .../asset-registry/quality-checklist.json | 12 + .../asset-registry/success-metrics.json | 13 + .../support-sla-and-escalation.md | 24 ++ .../asset-registry/work-instruction.json | 56 +++ docs/increments/active/README.md | 6 - .../design.md | 8 +- .../gate-decisions.md | 16 +- .../plan.md | 55 +-- .../ui-reference-audit.md | 0 .../verification.md | 79 ++++ docs/increments/completed/README.md | 5 + docs/roadmap.md | 17 +- docs/specs/domains/asset-registry.md | 14 + docs/tests/domains/asset-registry.md | 5 + docs/vision.md | 19 +- .../assets/components/asset-detail-page.tsx | 9 + .../e2e/asset-registry-golden-poc.spec.ts | 345 ++++++++++++++++++ 27 files changed, 1212 insertions(+), 68 deletions(-) create mode 100644 demo/fixtures/asset-registry/README.md create mode 100644 demo/fixtures/asset-registry/capability-pack-template.json create mode 100644 demo/fixtures/asset-registry/mock-tickets.json create mode 100644 demo/fixtures/asset-registry/prompt-template.json create mode 100644 demo/fixtures/asset-registry/quality-checklist.json create mode 100644 demo/fixtures/asset-registry/success-metrics.json create mode 100644 demo/fixtures/asset-registry/support-sla-and-escalation.md create mode 100644 demo/fixtures/asset-registry/work-instruction.json rename docs/increments/{active => completed}/2026-07-25-unified-asset-registry-definition/design.md (98%) rename docs/increments/{active => completed}/2026-07-25-unified-asset-registry-definition/gate-decisions.md (88%) rename docs/increments/{active => completed}/2026-07-25-unified-asset-registry-definition/plan.md (89%) rename docs/increments/{active => completed}/2026-07-25-unified-asset-registry-definition/ui-reference-audit.md (100%) create mode 100644 docs/increments/completed/2026-07-25-unified-asset-registry-definition/verification.md create mode 100644 web/test/e2e/asset-registry-golden-poc.spec.ts diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 66a7555f..3bfdcf7d 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -9,7 +9,7 @@ This document records behavior and structure that exist in the repository on ```mermaid flowchart LR WEB[web React SPA] --> API[apps/api] - MCP[apps/mcp] --> CORE[core] + MCP[apps/mcp] -->|bearer-forwarded delivery API| API API --> CORE WORKER[apps/worker] --> CORE CORE --> PG[(PostgreSQL 18
pgvector + AGE)] @@ -39,8 +39,8 @@ framework-neutral graph core), and never `core -> apps/integrations`. ## Current Runtime Responsibilities -- `core`: organization, permission, assistant, AI, and knowledge domain packages; - JPA repositories; application services; Flyway migrations. +- `core`: organization, permission, assistant, AI, knowledge, and Asset Registry + domain packages; JPA repositories; application services; Flyway migrations. - `apps/api`: REST endpoints, OIDC bearer-token boundary, server-derived actor, optional Spring AI normalization/chat, OpenAPI, health, and an `/api/admin/**` administration surface over the identity ledger and the source connections, @@ -54,13 +54,15 @@ framework-neutral graph core), and never `core -> apps/integrations`. and what it authenticates with come from the ledger on every poll, so an administrator's change takes effect on the next one without a restart. - `apps/mcp`: a stateless, bearer-authenticated Spring AI MCP server. Its - read-only `search_knowledge` tool forwards the caller token to the API search - contract, so agents use the same GraphRAG, OpenFGA, canonical ACL recheck, and - audit path as the product Assistant without owning database migrations or a - second retrieval implementation. + read-only Knowledge and Asset tools, Asset resources, and released Prompt + adapter forward the caller token to canonical API contracts, so agents use + the same GraphRAG, OpenFGA, live object authorization, and audit paths as the + product without owning repositories, database migrations, or a second + delivery implementation. - `web`: a Vite SPA with TanStack Router file routes, an authenticated shadcn - sidebar shell, generated Hey API clients for ordinary REST contracts, and an - AI Elements assistant workspace. The protected route layout owns session + sidebar shell, generated Hey API clients for ordinary REST contracts, an AI + Elements assistant workspace, and generic Asset catalog, detail/use, Pack + journey, and governance surfaces. The protected route layout owns session restoration and passes the verified identity into the shell; feature code does not repeat authentication gates. A separate `/admin` area reuses the same shell with a Permissions sidebar and is hidden from non-administrators by the @@ -71,6 +73,24 @@ database jobs carry ingestion work across processes. A specific Knowledge Asset publication outbox records direct-upload authorization projection attempts and the pinned OpenFGA model; no generic event framework has been introduced. +## Governed Asset Registry + +The side-by-side `core.assetregistry` module owns stable Asset identity, +accountable roles, mutable drafts, immutable digest-pinned revisions, distinct +review decisions, immutable releases, append-only availability history, and +actor-scoped consumption evidence. Prompt Template, Work Instruction, and +Capability Pack are code-owned profiles over this common kernel. Existing +Knowledge remains in its canonical ledger and is federated by exact visible +version; it is not copied into registry tables. + +All REST, Assistant, web, and MCP consumption resolves an exact released +version and live actor authorization. Capability Packs pin exact component +releases and independently authorize every item, so a replacement cannot +silently mutate an assigned journey and a denied component collapses to an +opaque access gap. Ownership health is derived from active owner and backup +owner assignments and exposes explicit orphaned/continuity-risk states without +changing the immutable release. + ## Persisted Model The identity ledger persists organizations, departments, users, and external diff --git a/apps/api/src/test/java/com/orgmemory/api/assetregistry/AssetRegistryIntegrationTests.java b/apps/api/src/test/java/com/orgmemory/api/assetregistry/AssetRegistryIntegrationTests.java index d8bbfafc..a20b44f4 100644 --- a/apps/api/src/test/java/com/orgmemory/api/assetregistry/AssetRegistryIntegrationTests.java +++ b/apps/api/src/test/java/com/orgmemory/api/assetregistry/AssetRegistryIntegrationTests.java @@ -46,7 +46,13 @@ import com.orgmemory.core.authorization.RelationshipTupleWriteResult; import com.orgmemory.core.authorization.ResourceRef; import com.orgmemory.core.knowledge.QueryEmbeddingPort; +import com.orgmemory.core.knowledge.PermissionAwareKnowledgeSearch; +import com.orgmemory.core.knowledge.RetrievedKnowledgeEvidence; +import com.orgmemory.core.knowledge.SecureKnowledgeSearchResult; import com.orgmemory.core.organization.CurrentActor; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; import java.util.List; import java.util.Map; import java.util.UUID; @@ -67,6 +73,8 @@ import org.testcontainers.junit.jupiter.Testcontainers; import org.testcontainers.postgresql.PostgreSQLContainer; import reactor.core.publisher.Flux; +import tools.jackson.core.type.TypeReference; +import tools.jackson.databind.ObjectMapper; @SpringBootTest @Testcontainers @@ -82,6 +90,10 @@ class AssetRegistryIntegrationTests { UUID.fromString("44444444-4444-4444-4444-444444444444"); private static final UUID REVIEWER_ID = UUID.fromString("55555555-5555-5555-5555-555555555555"); + private static final UUID SUPPORT_AGENT_ID = + UUID.fromString("66666666-6666-6666-6666-666666666666"); + private static final UUID BACKUP_OWNER_ID = + UUID.fromString("77777777-7777-7777-7777-777777777777"); private static final UUID SPACE_ID = UUID.fromString("88888888-8888-4888-8888-888888888802"); private static final String MODEL_ID = "asset-model-1"; @@ -100,6 +112,13 @@ class AssetRegistryIntegrationTests { DEPARTMENT_ID, "Minh Tran", "minh@example.test"); + private static final CurrentActor SUPPORT_AGENT = new CurrentActor( + SUPPORT_AGENT_ID, + ORGANIZATION_ID, + UUID.fromString("33333333-3333-3333-3333-333333333333"), + "An Pham", + "an@example.test"); + private static final ObjectMapper JSON = new ObjectMapper(); @Container @ServiceConnection @@ -141,6 +160,9 @@ class AssetRegistryIntegrationTests { @MockitoBean QueryEmbeddingPort queryEmbeddings; + @MockitoBean + PermissionAwareKnowledgeSearch knowledgeSearch; + @MockitoBean ChatModelPort chat; @@ -157,6 +179,9 @@ void prepare() { eq(PROMPT_ROUTE), any(ChatGenerationRequest.class))) .thenReturn(Flux.just("{\"category\":\"access\"}")); + when(knowledgeSearch.search(any(), any(), any(), any())) + .thenReturn(new SecureKnowledgeSearchResult( + "asset-registry-empty-grounding", List.of())); } @TestConfiguration(proxyBeanMethods = false) @@ -765,6 +790,244 @@ void payloadReferencesCannotPointAcrossTenantBoundaries() { "inline://payload")); } + @Test + void goldenPocTransfersAReleasedSupportCapabilityToASecondUser() + throws IOException { + List tickets = JSON.readValue( + goldenFixture("mock-tickets.json"), + new TypeReference<>() { + }); + assertEquals(8, tickets.size()); + assertTrue(tickets.stream().allMatch(MockTicket::rubricPass)); + + when(knowledgeSearch.search(any(), any(), any(), any())) + .thenAnswer(invocation -> new SecureKnowledgeSearchResult( + invocation.getArgument(3) == null + ? "golden-grounding" + : invocation.getArgument(3), + List.of(goldenKnowledgeEvidence()))); + when(chat.stream( + eq(AiWorkload.PROMPT_EXECUTION), + eq(PROMPT_ROUTE), + any(ChatGenerationRequest.class))) + .thenAnswer(invocation -> { + ChatGenerationRequest request = invocation.getArgument(2); + MockTicket ticket = tickets.stream() + .filter(candidate -> + request.userPrompt().contains(candidate.id())) + .findFirst() + .orElseThrow(); + return Flux.just(JSON.writeValueAsString(Map.of( + "category", ticket.category(), + "slaTier", ticket.slaTier(), + "escalate", ticket.escalate(), + "response", "Use approved policy and cite support.sla-and-escalation@1"))); + }); + + AssetView prompt = createApprovedRelease( + AssetType.PROMPT_TEMPLATE, + "triage-customer-ticket", + goldenFixture("prompt-template.json"), + "1.0.0"); + AssetView instruction = createApprovedRelease( + AssetType.WORK_INSTRUCTION, + "classify-and-respond", + goldenFixture("work-instruction.json"), + "1.0.0"); + AssetView.Release promptRelease = prompt.releases().getFirst(); + AssetView.Release instructionRelease = + instruction.releases().getFirst(); + String packPayload = goldenFixture("capability-pack-template.json") + .replace("${WORK_INSTRUCTION_ASSET_ID}", instruction.id().toString()) + .replace("${WORK_INSTRUCTION_RELEASE_ID}", instructionRelease.id().toString()) + .replace("${PROMPT_ASSET_ID}", prompt.id().toString()) + .replace("${PROMPT_RELEASE_ID}", promptRelease.id().toString()); + AssetView pack = createApprovedRelease( + AssetType.CAPABILITY_PACK, + "l1-onboarding", + packPayload, + "1.0.0"); + AssetView.Release packRelease = pack.releases().getFirst(); + + assertTrue(pack.ownershipHealth().ownerPresent()); + assertFalse(pack.ownershipHealth().backupOwnerPresent()); + assertTrue(pack.ownershipHealth().continuityAtRisk()); + assets.assignRole( + AUTHOR, + pack.id(), + "user", + SUPPORT_AGENT_ID.toString(), + AssetRole.OWNER); + AssetView handedOver = assets.assignRole( + AUTHOR, + pack.id(), + "user", + BACKUP_OWNER_ID.toString(), + AssetRole.BACKUP_OWNER); + assertTrue(handedOver.ownershipHealth().ownerPresent()); + assertTrue(handedOver.ownershipHealth().backupOwnerPresent()); + assertFalse(handedOver.ownershipHealth().orphaned()); + assertFalse(handedOver.ownershipHealth().continuityAtRisk()); + + for (UUID assetId : List.of(prompt.id(), instruction.id(), pack.id())) { + if (!assetId.equals(pack.id())) { + AssetView covered = assets.assignRole( + AUTHOR, + assetId, + "user", + BACKUP_OWNER_ID.toString(), + AssetRole.BACKUP_OWNER); + assertFalse(covered.ownershipHealth().continuityAtRisk()); + } + assets.assignRole( + AUTHOR, + assetId, + "user", + SUPPORT_AGENT_ID.toString(), + AssetRole.VIEWER); + } + List supportResources = List.of( + ResourceRef.of(ORGANIZATION_ID, "asset", prompt.id()), + ResourceRef.of(ORGANIZATION_ID, "asset", instruction.id()), + ResourceRef.of(ORGANIZATION_ID, "asset", pack.id())); + when(authorizationSets.listAuthorizedResources(any())) + .thenAnswer(invocation -> { + AuthorizedResourceQuery query = invocation.getArgument(0); + return AuthorizedResourceSetResult.resolved( + query.principal().equals(SUPPORT_AGENT.principal()) + ? supportResources + : List.of(), + MODEL_ID); + }); + + var discovery = assistantTools.recommend( + SUPPORT_AGENT, "onboarding", AssetType.CAPABILITY_PACK); + assertEquals(1, discovery.recommendations().size()); + assertEquals( + packRelease.id(), + discovery.recommendations().getFirst().releaseId()); + + PromptEvaluationResult evaluation = prompts.evaluate( + SUPPORT_AGENT, prompt.id(), promptRelease.id()); + assertTrue(evaluation.passed()); + assertEquals(8, evaluation.passedCases()); + PromptRunResult firstCorrectTask = prompts.run( + SUPPORT_AGENT, + prompt.id(), + promptRelease.id(), + Map.of( + "ticket_text", + tickets.getFirst().id() + ": " + tickets.getFirst().text()), + "support SLA escalation", + "golden-poc-first-correct-task"); + assertTrue(firstCorrectTask.output().contains("\"category\":\"billing\"")); + assertEquals(1, firstCorrectTask.citations().size()); + assertEquals( + "SLA and escalation", + firstCorrectTask.citations().getFirst().title()); + + WorkInstructionView acknowledged = instructions.acknowledge( + SUPPORT_AGENT, instruction.id(), instructionRelease.id()); + assertTrue(acknowledged.acknowledged()); + PackJourney journey = packs.start( + SUPPORT_AGENT, pack.id(), packRelease.id()); + for (PackJourney.Item item : journey.items()) { + journey = packs.setItemCompleted( + SUPPORT_AGENT, + pack.id(), + packRelease.id(), + item.key(), + true); + } + assertEquals(PackAssignmentStatus.COMPLETED, journey.status()); + assertEquals(2, journey.completedAccessibleItems()); + + AssetView changedPrompt = assets.updateDraft( + AUTHOR, + prompt.id(), + prompt.draft().lockVersion(), + new AssetDraftInput( + "Asset triage-customer-ticket", + "Replacement Prompt", + "INTERNAL", + "1", + goldenFixture("prompt-template.json").replace( + "Using only approved support policy", + "Using the revised approved support policy"))); + assertNotEquals(prompt.draft().lockVersion(), changedPrompt.draft().lockVersion()); + AssetView replacementSubmission = assets.submit( + AUTHOR, prompt.id(), "Revise support wording"); + approve(prompt.id(), replacementSubmission); + AssetView replacement = assets.publish( + AUTHOR, + prompt.id(), + replacementSubmission.revisions().getFirst().id(), + "2.0.0"); + assertNotEquals( + promptRelease.id(), replacement.releases().getFirst().id()); + assertEquals( + promptRelease.id(), + packs.get(SUPPORT_AGENT, pack.id(), packRelease.id()) + .items() + .stream() + .filter(item -> item.key().equals("prompt")) + .findFirst() + .orElseThrow() + .pinnedVersionId()); + + assets.withdraw( + AUTHOR, + prompt.id(), + promptRelease.id(), + "Replaced by the approved 2.0.0 release"); + assertThrows( + AssetUnavailableException.class, + () -> prompts.run( + SUPPORT_AGENT, + prompt.id(), + promptRelease.id(), + Map.of( + "ticket_text", + tickets.getFirst().id() + + ": " + + tickets.getFirst().text()), + "support SLA escalation", + "golden-poc-withdrawn-release")); + + assertEquals( + 9, + jdbc.queryForObject( + """ + select count(*) + from prompt_runs + where actor_user_id = ? and status = 'SUCCEEDED' + """, + Integer.class, + SUPPORT_AGENT_ID)); + assertEquals( + 1, + jdbc.queryForObject( + """ + select count(*) + from pack_assignments + where actor_user_id = ? and status = 'COMPLETED' + """, + Integer.class, + SUPPORT_AGENT_ID)); + assertEquals( + 1, + jdbc.queryForObject( + """ + select count(*) + from asset_audit_events + where asset_id = ? and event_type = 'RELEASE_WITHDRAWN' + """, + Integer.class, + prompt.id())); + assertTrue(goldenFixture("success-metrics.json") + .contains("\"evaluation_pass\"")); + } + private AssetView create(String slug) { return assets.create( AUTHOR, @@ -982,9 +1245,62 @@ private static String packPayload( instructionReleaseId); } + private static RetrievedKnowledgeEvidence goldenKnowledgeEvidence() { + return new RetrievedKnowledgeEvidence( + UUID.fromString("90000000-0000-0000-0000-000000000001"), + UUID.fromString("90000000-0000-0000-0000-000000000002"), + UUID.fromString("90000000-0000-0000-0000-000000000003"), + UUID.fromString("90000000-0000-0000-0000-000000000004"), + "SLA and escalation", + "P0 is 15 minutes. P1 is 1 hour. P2 is 4 business hours.", + "fixture://support.sla-and-escalation@1", + null, + null, + "Response tiers", + 1.0, + 1.0, + 1.0, + UUID.fromString("90000000-0000-0000-0000-000000000005"), + UUID.fromString("90000000-0000-0000-0000-000000000005"), + MODEL_ID, + UUID.fromString("90000000-0000-0000-0000-000000000006"), + 1); + } + + private static String goldenFixture(String name) throws IOException { + Path current = Path.of("").toAbsolutePath(); + while (current != null + && !Files.exists(current.resolve("settings.gradle.kts"))) { + current = current.getParent(); + } + if (current == null) { + throw new IllegalStateException("Could not locate the repository root"); + } + return Files.readString(current.resolve( + "demo/fixtures/asset-registry/" + name)); + } + + private record MockTicket( + String id, + String scenario, + String text, + String category, + String slaTier, + boolean escalate, + List allowedCitations, + boolean rubricPass) { + } + private void clearAssetRegistry() { jdbc.execute(""" TRUNCATE TABLE + assistant_asset_feedback, + assistant_asset_traces, + prompt_evaluation_runs, + prompt_runs, + pack_progress, + pack_assignments, + work_instruction_acknowledgements, asset_audit_events, asset_payload_references, asset_relations, diff --git a/apps/api/src/test/resources/db/test-foundation.sql b/apps/api/src/test/resources/db/test-foundation.sql index aa4a8853..68469e0d 100644 --- a/apps/api/src/test/resources/db/test-foundation.sql +++ b/apps/api/src/test/resources/db/test-foundation.sql @@ -56,6 +56,30 @@ INSERT INTO app_users ( now(), now(), 0 + ), + ( + '66666666-6666-6666-6666-666666666666', + '11111111-1111-1111-1111-111111111111', + '33333333-3333-3333-3333-333333333333', + 'An Pham', + 'an@example.test', + 'EMPLOYEE', + true, + now(), + now(), + 0 + ), + ( + '77777777-7777-7777-7777-777777777777', + '11111111-1111-1111-1111-111111111111', + '33333333-3333-3333-3333-333333333333', + 'Bao Le', + 'bao@example.test', + 'TEAM_LEAD', + true, + now(), + now(), + 0 ) ON CONFLICT (id) DO NOTHING; diff --git a/contracts/openapi.json b/contracts/openapi.json index 37a1983a..5c998a3f 100644 --- a/contracts/openapi.json +++ b/contracts/openapi.json @@ -1 +1 @@ -{"openapi":"3.1.0","info":{"title":"OpenAPI definition","version":"v0"},"servers":[{"url":"http://127.0.0.1:8080","description":"Generated server url"}],"paths":{"/api/assistant/tools/assets/{assetId}/releases/{releaseId}/pack/{itemKey}":{"put":{"tags":["assistant-asset-tool-controller"],"summary":"Update actor-derived Pack progress after explicit confirmation","operationId":"updateAssistantPackProgress","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"itemKey","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackProgressRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PackToolResult"}}}}}}},"/api/assets/{assetId}/releases/{releaseId}/pack-progress/{itemKey}":{"put":{"tags":["asset-consumption-controller"],"summary":"Idempotently update actor-derived progress for one accessible Pack item","operationId":"setCapabilityPackProgress","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"itemKey","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackProgressRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PackJourney"}}}}}}},"/api/assets/{assetId}/draft":{"put":{"tags":["asset-registry-controller"],"summary":"Update a mutable Asset draft","operationId":"updateAssetDraft","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAssetDraftRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetView"}}}}}}},"/api/admin/source-principals/{principalId}/mapping":{"put":{"tags":["admin-source-access-controller"],"summary":"Confirm a principal maps to an internal user","operationId":"confirmAdminSourceMapping","parameters":[{"name":"principalId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmMappingRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdminSourcePrincipalResponse"}}}}}},"delete":{"tags":["admin-source-access-controller"],"summary":"Revoke a principal's active mapping","operationId":"revokeAdminSourceMapping","parameters":[{"name":"principalId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdminSourcePrincipalResponse"}}}}}}},"/api/admin/source-connections/identity-trust":{"put":{"tags":["admin-source-access-controller"],"summary":"Record the identity trust for a connection","operationId":"setAdminSourceConnectionTrust","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityTrustRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdminSourceConnectionResponse"}}}}}}},"/api/admin/connectors/{sourceSystem}/{connectionKey}":{"put":{"tags":["admin-connector-controller"],"summary":"Record how a connection is crawled","operationId":"configureAdminConnection","parameters":[{"name":"sourceSystem","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionKey","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigureConnectionRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdminConnectionResponse"}}}}}}},"/api/admin/connectors/{sourceSystem}/{connectionKey}/credential":{"put":{"tags":["admin-connector-controller"],"summary":"Store a credential for a connection","operationId":"setAdminConnectionCredential","parameters":[{"name":"sourceSystem","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionKey","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorCredentialRequest"}}},"required":true},"responses":{"204":{"description":"No Content"}}},"delete":{"tags":["admin-connector-controller"],"summary":"Forget a connection's stored credential","operationId":"forgetAdminConnectionCredential","parameters":[{"name":"sourceSystem","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionKey","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"}}}},"/api/sources":{"get":{"tags":["source-controller"],"summary":"List sources visible to the current user","operationId":"listSources","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SourceResponse"}}}}}}},"post":{"tags":["source-controller"],"summary":"Upload a source for asynchronous ingestion","operationId":"uploadSource","parameters":[{"name":"classification","in":"query","required":false,"schema":{"type":"string","default":"CONFIDENTIAL","enum":["PUBLIC","INTERNAL","CONFIDENTIAL","RESTRICTED"]}},{"name":"knowledgeSpaceId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SourceResponse"}}}}}}},"/api/knowledge-spaces/{knowledgeSpaceId}/graph/curations/suppressions":{"post":{"tags":["knowledge-graph-management-controller"],"summary":"Delete an effective graph identity without deleting evidence","operationId":"suppressGraphIdentity","parameters":[{"name":"knowledgeSpaceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressIdentityRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CuratedEntity"},{"$ref":"#/components/schemas/CuratedRelation"},{"$ref":"#/components/schemas/IdentityAlias"},{"$ref":"#/components/schemas/IdentitySuppression"}]}}}}}}},"/api/knowledge-spaces/{knowledgeSpaceId}/graph/curations/relations":{"post":{"tags":["knowledge-graph-management-controller"],"summary":"Create or edit a governed graph relation","operationId":"curateGraphRelation","parameters":[{"name":"knowledgeSpaceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurateRelationRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CuratedEntity"},{"$ref":"#/components/schemas/CuratedRelation"},{"$ref":"#/components/schemas/IdentityAlias"},{"$ref":"#/components/schemas/IdentitySuppression"}]}}}}}}},"/api/knowledge-spaces/{knowledgeSpaceId}/graph/curations/entities":{"post":{"tags":["knowledge-graph-management-controller"],"summary":"Create or edit a governed graph entity","operationId":"curateGraphEntity","parameters":[{"name":"knowledgeSpaceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurateEntityRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CuratedEntity"},{"$ref":"#/components/schemas/CuratedRelation"},{"$ref":"#/components/schemas/IdentityAlias"},{"$ref":"#/components/schemas/IdentitySuppression"}]}}}}}}},"/api/knowledge-spaces/{knowledgeSpaceId}/graph/curations/aliases":{"post":{"tags":["knowledge-graph-management-controller"],"summary":"Merge graph identities through a reversible alias","operationId":"mergeGraphIdentity","parameters":[{"name":"knowledgeSpaceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AliasIdentityRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CuratedEntity"},{"$ref":"#/components/schemas/CuratedRelation"},{"$ref":"#/components/schemas/IdentityAlias"},{"$ref":"#/components/schemas/IdentitySuppression"}]}}}}}}},"/api/knowledge-assets/{knowledgeAssetId}/graph-index":{"post":{"tags":["knowledge-asset-lifecycle-controller"],"summary":"Ensure graph indexing uses the current processing profile","operationId":"ensureKnowledgeAssetGraphIndex","parameters":[{"name":"knowledgeAssetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"202":{"description":"Accepted","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GraphIndexJobView"}}}}}}},"/api/knowledge-assets/graph-jobs/{jobId}/resume":{"post":{"tags":["knowledge-asset-lifecycle-controller"],"summary":"Resume unfinished graph indexing","operationId":"resumeGraphIndexJob","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"202":{"description":"Accepted","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GraphIndexJobView"}}}}}}},"/api/knowledge-assets/graph-jobs/{jobId}/cancel":{"post":{"tags":["knowledge-asset-lifecycle-controller"],"summary":"Cancel queued or in-flight graph indexing","operationId":"cancelGraphIndexJob","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GraphIndexJobView"}}}}}}},"/api/assistant/tools/knowledge-search":{"post":{"tags":["assistant-asset-tool-controller"],"summary":"Search canonical permission-aware Knowledge and return citation references","operationId":"searchAssistantKnowledge","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeSearchRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/KnowledgeResult"}}}}}}},"/api/assistant/tools/assets/{assetId}/releases/{releaseId}/prompt-run":{"post":{"tags":["assistant-asset-tool-controller"],"summary":"Run an exact Prompt release after explicit external-provider confirmation","operationId":"runAssistantPrompt","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptRunRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PromptRunToolResult"}}}}}}},"/api/assistant/tools/assets/{assetId}/releases/{releaseId}/prompt-render":{"post":{"tags":["assistant-asset-tool-controller"],"summary":"Render an exact Prompt release after variable validation","operationId":"renderAssistantPrompt","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptRenderRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PromptRenderToolResult"}}}}}}},"/api/assistant/tools/assets/{assetId}/releases/{releaseId}/pack":{"get":{"tags":["assistant-asset-tool-controller"],"summary":"Read an actor-scoped exact Pack journey","operationId":"readAssistantPack","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PackToolResult"}}}}}},"post":{"tags":["assistant-asset-tool-controller"],"summary":"Start an exact Pack after explicit state-change confirmation","operationId":"startAssistantPack","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmedActionRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PackToolResult"}}}}}}},"/api/assistant/tools/assets/{assetId}/releases/{releaseId}/fork":{"post":{"tags":["assistant-asset-tool-controller"],"summary":"Fork an exact release after explicit draft-creation confirmation","operationId":"forkAssistantAssetRelease","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForkRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ForkResult"}}}}}}},"/api/assistant/tools/assets/{assetId}/releases/{releaseId}/feedback":{"post":{"tags":["assistant-asset-tool-controller"],"summary":"Submit feedback against an exact release after explicit confirmation","operationId":"submitAssistantAssetFeedback","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/FeedbackResult"}}}}}}},"/api/assistant/chat":{"post":{"tags":["assistant-controller"],"summary":"Stream an answer from permission-verified knowledge","operationId":"streamAssistantChat","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantChatRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"text/event-stream":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ServerSentEventString"}}}}}}}},"/api/assets":{"get":{"tags":["asset-registry-controller"],"summary":"List released or authoring Assets visible to the actor","operationId":"listAssets","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["PROMPT_TEMPLATE","WORK_INSTRUCTION","CAPABILITY_PACK"]}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssetSummary"}}}}}}},"post":{"tags":["asset-registry-controller"],"summary":"Create an Asset and its mutable draft","operationId":"createAsset","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAssetRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetView"}}}}}}},"/api/assets/{assetId}/submissions":{"post":{"tags":["asset-registry-controller"],"summary":"Submit an immutable Asset revision for review","operationId":"submitAssetRevision","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitAssetRevisionRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetView"}}}}}}},"/api/assets/{assetId}/role-assignments":{"post":{"tags":["asset-registry-controller"],"summary":"Assign an accountable role on an Asset","operationId":"assignAssetRole","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignAssetRoleRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetView"}}}}}}},"/api/assets/{assetId}/reviews/{reviewCaseId}/decisions":{"post":{"tags":["asset-registry-controller"],"summary":"Record a decision against an exact revision digest","operationId":"decideAssetReview","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"reviewCaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetReviewDecisionRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetView"}}}}}}},"/api/assets/{assetId}/releases":{"post":{"tags":["asset-registry-controller"],"summary":"Publish an approved immutable Asset revision","operationId":"publishAssetRelease","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishAssetReleaseRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetView"}}}}}}},"/api/assets/{assetId}/releases/{releaseId}/work-instruction/acknowledgement":{"post":{"tags":["asset-consumption-controller"],"summary":"Idempotently acknowledge an exact Work Instruction release","operationId":"acknowledgeWorkInstruction","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WorkInstructionView"}}}}}}},"/api/assets/{assetId}/releases/{releaseId}/withdrawal":{"post":{"tags":["asset-registry-controller"],"summary":"Withdraw an Asset release from new use","operationId":"withdrawAssetRelease","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetAvailabilityRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetView"}}}}}}},"/api/assets/{assetId}/releases/{releaseId}/prompt/runs":{"post":{"tags":["asset-consumption-controller"],"summary":"Run an exact Prompt release through the provider-neutral AI gateway","operationId":"runPromptRelease","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptRunRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PromptRunResult"}}}}}}},"/api/assets/{assetId}/releases/{releaseId}/prompt/render":{"post":{"tags":["asset-consumption-controller"],"summary":"Deterministically render an exact authorized Prompt release","operationId":"renderPromptRelease","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVariablesRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PromptRenderResult"}}}}}}},"/api/assets/{assetId}/releases/{releaseId}/prompt/evaluations":{"post":{"tags":["asset-consumption-controller"],"summary":"Run the bounded evaluation cases pinned in a Prompt release","operationId":"evaluatePromptRelease","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PromptEvaluationResult"}}}}}}},"/api/assets/{assetId}/releases/{releaseId}/pack-assignment":{"post":{"tags":["asset-consumption-controller"],"summary":"Start or resume an exact authorized Capability Pack release","operationId":"startCapabilityPack","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PackJourney"}}}}}}},"/api/assets/{assetId}/releases/{releaseId}/forks":{"post":{"tags":["asset-consumption-controller"],"summary":"Fork an exact authorized release into a new mutable draft","operationId":"forkAssetRelease","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForkReleaseRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetView"}}}}}}},"/api/assets/{assetId}/releases/{releaseId}/deprecation":{"post":{"tags":["asset-registry-controller"],"summary":"Deprecate an Asset release","operationId":"deprecateAssetRelease","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetAvailabilityRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetView"}}}}}}},"/api/assets/{assetId}/prompt/evaluation-comparisons":{"post":{"tags":["asset-consumption-controller"],"summary":"Compare bounded evaluation results for two exact Prompt releases","operationId":"comparePromptReleases","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptComparisonRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PromptEvaluationComparison"}}}}}}},"/api/asset-delivery/{assetId}/releases/{releaseId}/prompt-render":{"post":{"tags":["asset-delivery-controller"],"summary":"Deterministically render an exact authorized Prompt release","operationId":"renderReleasedPrompt","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVariablesRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PromptRenderResult"}}}}}}},"/api/admin/roles/{role}/members":{"post":{"tags":["admin-role-controller"],"summary":"Assign a user to a role","operationId":"assignAdminRole","parameters":[{"name":"role","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignRoleRequest"}}},"required":true},"responses":{"204":{"description":"No Content"}}}},"/api/admin/knowledge-spaces":{"get":{"tags":["admin-knowledge-space-controller"],"summary":"List Knowledge Spaces and the grants stored against them","operationId":"listAdminKnowledgeSpaces","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminKnowledgeSpaceResponse"}}}}}}},"post":{"tags":["admin-knowledge-space-controller"],"summary":"Create a Knowledge Space","operationId":"createAdminKnowledgeSpace","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKnowledgeSpaceRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdminKnowledgeSpaceResponse"}}}}}}},"/api/admin/knowledge-spaces/{knowledgeSpaceId}/grants":{"post":{"tags":["admin-knowledge-space-controller"],"summary":"Grant a subject access to a Knowledge Space","operationId":"grantAdminKnowledgeSpaceAccess","parameters":[{"name":"knowledgeSpaceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantKnowledgeSpaceAccessRequest"}}},"required":true},"responses":{"204":{"description":"No Content"}}},"delete":{"tags":["admin-knowledge-space-controller"],"summary":"Revoke a subject's access to a Knowledge Space","operationId":"revokeAdminKnowledgeSpaceAccess","parameters":[{"name":"knowledgeSpaceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"relation","in":"query","required":true,"schema":{"type":"string"}},{"name":"kind","in":"query","required":true,"schema":{"type":"string","enum":["ORGANIZATION","DEPARTMENT","DEPARTMENT_MANAGERS","ROLE","USER"]}},{"name":"subjectId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"role","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"}}}},"/api/admin/invitations":{"get":{"tags":["admin-invitation-controller"],"summary":"List invited addresses and their status","operationId":"listAdminInvitations","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminInvitationResponse"}}}}}}},"post":{"tags":["admin-invitation-controller"],"summary":"Expect an address to sign in","operationId":"createAdminInvitation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvitationRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdminInvitationResponse"}}}}}}},"/api/admin/connectors/{sourceSystem}/{connectionKey}/test":{"post":{"tags":["admin-connector-controller"],"summary":"Check a connection's stored credential","operationId":"testAdminConnection","parameters":[{"name":"sourceSystem","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionKey","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdminConnectorProbeResponse"}}}}}}},"/api/admin/connectors/{sourceSystem}/{connectionKey}/crawl":{"post":{"tags":["admin-connector-controller"],"summary":"Ask for a content crawl on the next poll","operationId":"requestAdminConnectionCrawl","parameters":[{"name":"sourceSystem","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionKey","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Accepted"}}}},"/api/admin/connectors/{sourceSystem}/test":{"post":{"tags":["admin-connector-controller"],"summary":"Check a credential without storing it","operationId":"testAdminConnectorCredential","parameters":[{"name":"sourceSystem","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorCredentialRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdminConnectorProbeResponse"}}}}}}},"/api/admin/access/explain":{"post":{"tags":["admin-permission-controller"],"summary":"Answer whether a user holds a permission on one resource, and by which derivation","operationId":"explainAdminAccess","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExplainAccessRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExplainAccessResponse"}}}}}}},"/api/assistant/conversations/{conversationId}":{"delete":{"tags":["assistant-controller"],"summary":"Delete the current actor's transcript and bounded model memory","operationId":"deleteAssistantConversation","parameters":[{"name":"conversationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"No Content"}}},"patch":{"tags":["assistant-controller"],"summary":"Rename the current actor's conversation","operationId":"renameAssistantConversation","parameters":[{"name":"conversationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameConversationRequest"}}},"required":true},"responses":{"204":{"description":"No Content"}}}},"/api/admin/users/{userId}":{"patch":{"tags":["admin-user-controller"],"summary":"Change a user's role or activation","operationId":"updateAdminUser","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAdminUserRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdminUserResponse"}}}}}}},"/api/session":{"get":{"tags":["browser-session-controller"],"summary":"Read the current browser session","operationId":"getBrowserSession","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}}}}},"/api/session/csrf":{"get":{"tags":["browser-session-controller"],"summary":"Issue a CSRF token for browser mutations","operationId":"getBrowserCsrfToken","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CsrfResponse"}}}}}}},"/api/organization/context":{"get":{"tags":["organization-context-controller"],"operationId":"context","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OrganizationContextResponse"}}}}}}},"/api/me":{"get":{"tags":["me-controller"],"operationId":"me","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}}}}},"/api/knowledge/search":{"get":{"tags":["knowledge-search-controller"],"summary":"Search permission-verified knowledge evidence","operationId":"searchKnowledge","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/KnowledgeSearchResponse"}}}}}}},"/api/knowledge/catalog":{"get":{"tags":["knowledge-catalog-controller"],"summary":"List current permission-verified Knowledge versions for composition","operationId":"listKnowledgeCatalog","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeCatalogItem"}}}}}}}},"/api/knowledge-spaces/{knowledgeSpaceId}/graph/export":{"get":{"tags":["knowledge-graph-management-controller"],"summary":"Export only graph evidence visible to the current user","operationId":"exportKnowledgeGraph","parameters":[{"name":"knowledgeSpaceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"JSON","enum":["JSON","CSV","MARKDOWN","TEXT"]}},{"name":"X-Request-Id","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/api/knowledge-spaces/{knowledgeSpaceId}/graph/explorer":{"get":{"tags":["knowledge-graph-explorer-controller"],"summary":"Read a bounded permission-filtered graph view","operationId":"exploreKnowledgeGraph","parameters":[{"name":"knowledgeSpaceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"entityLimit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"maxDepth","in":"query","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/KnowledgeGraphView"}}}}}}},"/api/knowledge-spaces/visible":{"get":{"tags":["knowledge-space-controller"],"summary":"List Knowledge Spaces visible to the current user","operationId":"listVisibleKnowledgeSpaces","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeSpaceResponse"}}}}}}}},"/api/knowledge-spaces/upload-targets":{"get":{"tags":["knowledge-space-controller"],"summary":"List Knowledge Spaces where the current user may add knowledge","operationId":"listKnowledgeSpaceUploadTargets","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeSpaceResponse"}}}}}}}},"/api/knowledge-assets/graph-jobs/{jobId}":{"get":{"tags":["knowledge-asset-lifecycle-controller"],"summary":"Read graph indexing lifecycle status","operationId":"getGraphIndexJob","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GraphIndexJobView"}}}}}}},"/api/health":{"get":{"tags":["health-controller"],"operationId":"health","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/api/citations/{chunkId}/content":{"get":{"tags":["citation-content-controller"],"summary":"Stream permission-verified source evidence","operationId":"readCitationContent","parameters":[{"name":"chunkId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StreamingResponseBody"}}}}}}},"/api/assistant/tools/assets/{assetId}/releases/{releaseId}/work-instruction":{"get":{"tags":["assistant-asset-tool-controller"],"summary":"Guide an exact Work Instruction release","operationId":"followAssistantWorkInstruction","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WorkInstructionToolResult"}}}}}}},"/api/assistant/tools/assets/{assetId}/releases/{releaseId}/prompt-form":{"get":{"tags":["assistant-asset-tool-controller"],"summary":"Resolve the variables required by an exact Prompt release","operationId":"prepareAssistantPrompt","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PromptFormResult"}}}}}}},"/api/assistant/tools/asset-recommendations":{"get":{"tags":["assistant-asset-tool-controller"],"summary":"Recommend exact usable Asset releases without leaking denied candidates","operationId":"recommendAssistantAssets","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["PROMPT_TEMPLATE","WORK_INSTRUCTION","CAPABILITY_PACK"]}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RecommendationResult"}}}}}}},"/api/assistant/conversations":{"get":{"tags":["assistant-controller"],"summary":"List the current actor's conversations by recent activity","operationId":"listAssistantConversations","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssistantConversationSummary"}}}}}}}},"/api/assistant/conversations/{conversationId}/messages":{"get":{"tags":["assistant-controller"],"summary":"Replay a tenant- and actor-scoped full conversation transcript","operationId":"getAssistantConversationHistory","parameters":[{"name":"conversationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssistantConversationMessageView"}}}}}}}},"/api/assets/{assetId}":{"get":{"tags":["asset-registry-controller"],"summary":"Read an authorized Asset and its governance history","operationId":"getAsset","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetView"}}}}}}},"/api/assets/{assetId}/releases/{releaseId}/work-instruction":{"get":{"tags":["asset-consumption-controller"],"summary":"Follow an exact authorized Work Instruction release","operationId":"followWorkInstruction","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WorkInstructionView"}}}}}}},"/api/assets/{assetId}/releases/{releaseId}/pack-journey":{"get":{"tags":["asset-consumption-controller"],"summary":"Read an actor-scoped Capability Pack journey","operationId":"getCapabilityPackJourney","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PackJourney"}}}}}}},"/api/asset-delivery":{"get":{"tags":["asset-delivery-controller"],"summary":"Search exact released Assets authorized for the current actor","operationId":"searchReleasedAssets","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["PROMPT_TEMPLATE","WORK_INSTRUCTION","CAPABILITY_PACK"]}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssetRecommendation"}}}}}}}},"/api/asset-delivery/{assetId}":{"get":{"tags":["asset-delivery-controller"],"summary":"Read the latest usable immutable release for an Asset","operationId":"getLatestReleasedAsset","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetDeliveryRelease"}}}}}}},"/api/asset-delivery/{assetId}/releases/{releaseId}":{"get":{"tags":["asset-delivery-controller"],"summary":"Read one exact usable immutable Asset release","operationId":"getReleasedAsset","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetDeliveryRelease"}}}}}}},"/api/asset-delivery/{assetId}/releases/{releaseId}/relations":{"get":{"tags":["asset-delivery-controller"],"summary":"Resolve only independently authorized relations of an exact release","operationId":"resolveReleasedAssetRelations","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetRelationResolution"}}}}}}},"/api/asset-delivery/{assetId}/releases/{releaseId}/pack":{"get":{"tags":["asset-delivery-controller"],"summary":"Read a Pack definition with independently authorized pinned items","operationId":"getReleasedCapabilityPack","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CapabilityPackDefinition"}}}}}}},"/api/admin/users":{"get":{"tags":["admin-user-controller"],"summary":"List internal users with their sign-in and mapping status","operationId":"listAdminUsers","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserResponse"}}}}}}}},"/api/admin/users/{userId}/permissions":{"get":{"tags":["admin-permission-controller"],"summary":"Resolve a user's organization permissions as the engine currently answers them","operationId":"listAdminUserPermissions","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EffectivePermissionResponse"}}}}}}},"/api/admin/source-principals":{"get":{"tags":["admin-source-access-controller"],"summary":"List observed principals and their mapping","operationId":"listAdminSourcePrincipals","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminSourcePrincipalResponse"}}}}}}}},"/api/admin/source-groups":{"get":{"tags":["admin-source-access-controller"],"summary":"List source groups with their sealed membership","operationId":"listAdminSourceGroups","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminSourceGroupResponse"}}}}}}}},"/api/admin/source-connections":{"get":{"tags":["admin-source-access-controller"],"summary":"List observed connections and their trust level","operationId":"listAdminSourceConnections","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminSourceConnectionResponse"}}}}}}}},"/api/admin/roles":{"get":{"tags":["admin-role-controller"],"summary":"List roles and who is assigned to them","operationId":"listAdminRoles","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdminRoleListResponse"}}}}}}},"/api/admin/knowledge-spaces/grant-options":{"get":{"tags":["admin-knowledge-space-controller"],"summary":"List the subject shapes each Knowledge Space relation accepts","operationId":"listAdminKnowledgeSpaceGrantOptions","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeSpaceGrantOptionResponse"}}}}}}}},"/api/admin/connectors/{sourceSystem}":{"get":{"tags":["admin-connector-controller"],"summary":"List a source's connections and their crawl settings","operationId":"listAdminConnections","parameters":[{"name":"sourceSystem","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminConnectionResponse"}}}}}}}},"/api/admin/connectors/{sourceSystem}/{connectionKey}/scopes":{"get":{"tags":["admin-connector-controller"],"summary":"List what a connection can be pointed at","operationId":"listAdminConnectionScopes","parameters":[{"name":"sourceSystem","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionKey","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminConnectorScopeResponse"}}}}}}}},"/api/admin/connectors/{sourceSystem}/{connectionKey}/activity":{"get":{"tags":["admin-connector-controller"],"summary":"Read what a connection has crawled and what went wrong","operationId":"getAdminConnectionActivity","parameters":[{"name":"sourceSystem","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionKey","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdminConnectionActivityResponse"}}}}}}},"/api/admin/connectors/sources":{"get":{"tags":["admin-connector-controller"],"summary":"List the sources this deployment can ingest","operationId":"listAdminConnectorSources","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminConnectorSourceResponse"}}}}}}}},"/api/knowledge-spaces/{knowledgeSpaceId}/graph/curations/{curationId}":{"delete":{"tags":["knowledge-graph-management-controller"],"summary":"Reverse a graph curation record","operationId":"deactivateGraphCuration","parameters":[{"name":"knowledgeSpaceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"curationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"authorizationGeneration","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"reason","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/knowledge-assets/{knowledgeAssetId}":{"delete":{"tags":["knowledge-asset-lifecycle-controller"],"summary":"Retire a Knowledge Asset and remove its derived graph","operationId":"deleteKnowledgeAsset","parameters":[{"name":"knowledgeAssetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/KnowledgeAssetRef"}}}}}}},"/api/admin/roles/{role}/members/{userId}":{"delete":{"tags":["admin-role-controller"],"summary":"Remove a user from a role","operationId":"revokeAdminRole","parameters":[{"name":"role","in":"path","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"No Content"}}}},"/api/admin/invitations/{invitationId}":{"delete":{"tags":["admin-invitation-controller"],"summary":"Withdraw an invitation that has not been used","operationId":"revokeAdminInvitation","parameters":[{"name":"invitationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"No Content"}}}}},"components":{"schemas":{"PackProgressRequest":{"type":"object","properties":{"completed":{"type":"boolean"},"confirmed":{"type":"boolean"}}},"Item":{"type":"object","properties":{"key":{"type":"string"},"required":{"type":"boolean"},"order":{"type":"integer","format":"int32"},"kind":{"type":"string"},"resourceId":{"type":"string","format":"uuid"},"pinnedVersionId":{"type":"string","format":"uuid"},"title":{"type":"string"},"versionLabel":{"type":"string"},"availability":{"type":"string","enum":["AVAILABLE","DEPRECATED","WITHDRAWN"]},"completed":{"type":"boolean"},"completedAt":{"type":"string","format":"date-time"}}},"PackJourney":{"type":"object","properties":{"assignmentId":{"type":"string","format":"uuid"},"packAssetId":{"type":"string","format":"uuid"},"packReleaseId":{"type":"string","format":"uuid"},"releaseDigest":{"type":"string"},"title":{"type":"string"},"versionLabel":{"type":"string"},"purpose":{"type":"string","enum":["ROLE_ONBOARDING","HANDOVER","ROLE_ENABLEMENT"]},"audience":{"type":"string"},"expectedOutcome":{"type":"string"},"status":{"type":"string","enum":["IN_PROGRESS","COMPLETED"]},"accessGap":{"type":"boolean"},"completedAccessibleItems":{"type":"integer","format":"int32"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Item"}},"startedAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time"}}},"PackToolResult":{"type":"object","properties":{"traceId":{"type":"string","format":"uuid"},"journey":{"$ref":"#/components/schemas/PackJourney"}}},"UpdateAssetDraftRequest":{"type":"object","properties":{"expectedLockVersion":{"type":"integer","format":"int64"},"title":{"type":"string"},"summary":{"type":"string"},"classification":{"type":"string"},"schemaVersion":{"type":"string"},"payload":{"type":"string"}}},"AssetView":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["PROMPT_TEMPLATE","WORK_INSTRUCTION","CAPABILITY_PACK"]},"namespace":{"type":"string"},"slug":{"type":"string"},"knowledgeSpaceId":{"type":"string","format":"uuid"},"portfolioState":{"type":"string","enum":["DRAFT_ONLY","ACTIVE","SUNSETTING","RETIRED"]},"authorizationReady":{"type":"boolean"},"draft":{"$ref":"#/components/schemas/Draft"},"revisions":{"type":"array","items":{"$ref":"#/components/schemas/Revision"}},"reviews":{"type":"array","items":{"$ref":"#/components/schemas/Review"}},"releases":{"type":"array","items":{"$ref":"#/components/schemas/Release"}},"roleAssignments":{"type":"array","items":{"$ref":"#/components/schemas/RoleAssignment"}}}},"AvailabilityEvent":{"type":"object","properties":{"availability":{"type":"string","enum":["AVAILABLE","DEPRECATED","WITHDRAWN"]},"reason":{"type":"string"},"changedByUserId":{"type":"string","format":"uuid"},"effectiveAt":{"type":"string","format":"date-time"}}},"Decision":{"type":"object","properties":{"reviewerUserId":{"type":"string","format":"uuid"},"decision":{"type":"string","enum":["REQUEST_CHANGES","REJECT","APPROVE","CANCEL"]},"comment":{"type":"string"},"decidedAt":{"type":"string","format":"date-time"}}},"Draft":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"lockVersion":{"type":"integer","format":"int64"},"title":{"type":"string"},"summary":{"type":"string"},"classification":{"type":"string"},"schemaVersion":{"type":"string"},"payload":{"type":"string"},"editedByUserId":{"type":"string","format":"uuid"},"updatedAt":{"type":"string","format":"date-time"}}},"Release":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"revisionId":{"type":"string","format":"uuid"},"sequence":{"type":"integer","format":"int64"},"versionLabel":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"classification":{"type":"string"},"schemaVersion":{"type":"string"},"payload":{"type":"string"},"digest":{"type":"string"},"releasedByUserId":{"type":"string","format":"uuid"},"releasedAt":{"type":"string","format":"date-time"},"availability":{"type":"string","enum":["AVAILABLE","DEPRECATED","WITHDRAWN"]},"availabilityHistory":{"type":"array","items":{"$ref":"#/components/schemas/AvailabilityEvent"}}}},"Review":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"revisionId":{"type":"string","format":"uuid"},"revisionDigest":{"type":"string"},"state":{"type":"string","enum":["IN_REVIEW","CHANGES_REQUESTED","REJECTED","CANCELLED","APPROVED"]},"policyVersion":{"type":"string"},"requestedByUserId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"resolvedAt":{"type":"string","format":"date-time"},"decisions":{"type":"array","items":{"$ref":"#/components/schemas/Decision"}}}},"Revision":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sequence":{"type":"integer","format":"int64"},"title":{"type":"string"},"summary":{"type":"string"},"classification":{"type":"string"},"schemaVersion":{"type":"string"},"payload":{"type":"string"},"digest":{"type":"string"},"changeNote":{"type":"string"},"createdByUserId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"}}},"RoleAssignment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"principalType":{"type":"string"},"principalId":{"type":"string"},"role":{"type":"string","enum":["OWNER","BACKUP_OWNER","STEWARD","VIEWER","EDITOR","REVIEWER","PUBLISHER"]},"validFrom":{"type":"string","format":"date-time"},"validUntil":{"type":"string","format":"date-time"},"assignedByUserId":{"type":"string","format":"uuid"},"projectedAt":{"type":"string","format":"date-time"}}},"ConfirmMappingRequest":{"type":"object","properties":{"appUserId":{"type":"string","format":"uuid"}}},"AdminSourceMappingResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"appUserId":{"type":"string","format":"uuid"},"appUserName":{"type":"string"},"appUserEmail":{"type":"string"},"method":{"type":"string","enum":["IDP_JOIN","SSO_EMAIL_JOIN","SELF_CLAIM","ADMIN_CONFIRMED"]},"status":{"type":"string","enum":["ACTIVE","REVOKED"]},"evidence":{"type":"string"},"verifiedAt":{"type":"string","format":"date-time"}}},"AdminSourcePrincipalResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sourceSystem":{"type":"string"},"sourceConnectionKey":{"type":"string"},"externalKey":{"type":"string"},"kind":{"type":"string","enum":["SOURCE_USER","SOURCE_GROUP"]},"observedEmail":{"type":"string"},"observedDisplayName":{"type":"string"},"ssoVerified":{"type":"boolean"},"lastSeenAt":{"type":"string","format":"date-time"},"mapping":{"$ref":"#/components/schemas/AdminSourceMappingResponse"}}},"IdentityTrustRequest":{"type":"object","properties":{"sourceSystem":{"type":"string"},"sourceConnectionKey":{"type":"string"},"identityTrust":{"type":"string","enum":["UNTRUSTED","SSO_VERIFIED"]}}},"AdminSourceConnectionResponse":{"type":"object","properties":{"sourceSystem":{"type":"string"},"sourceConnectionKey":{"type":"string"},"identityTrust":{"type":"string","enum":["UNTRUSTED","SSO_VERIFIED"]},"trustDecidedByUserId":{"type":"string","format":"uuid"},"trustDecidedAt":{"type":"string","format":"date-time"},"userCount":{"type":"integer","format":"int32"},"mappedUserCount":{"type":"integer","format":"int32"},"unmappedUserCount":{"type":"integer","format":"int32"},"groupCount":{"type":"integer","format":"int32"},"lastSeenAt":{"type":"string","format":"date-time"}}},"ConfigureConnectionRequest":{"type":"object","properties":{"crawlEnabled":{"type":"boolean"},"knowledgeSpaceId":{"type":"string","format":"uuid"},"actorUserId":{"type":"string","format":"uuid"},"sourceConfig":{"type":"object","additionalProperties":{}},"contentCrawlIntervalSeconds":{"type":"integer","format":"int64"}}},"AdminConnectionResponse":{"type":"object","properties":{"sourceSystem":{"type":"string"},"sourceConnectionKey":{"type":"string"},"identityTrust":{"type":"string","enum":["UNTRUSTED","SSO_VERIFIED"]},"crawlEnabled":{"type":"boolean"},"knowledgeSpaceId":{"type":"string","format":"uuid"},"actorUserId":{"type":"string","format":"uuid"},"sourceConfig":{"type":"object","additionalProperties":{}},"contentCrawlIntervalSeconds":{"type":"integer","format":"int64"},"credentialSet":{"type":"boolean"},"credentialSetByUserId":{"type":"string","format":"uuid"},"credentialSetAt":{"type":"string","format":"date-time"},"configuredByUserId":{"type":"string","format":"uuid"},"configuredAt":{"type":"string","format":"date-time"}}},"ConnectorCredentialRequest":{"type":"object","properties":{"credential":{"type":"string"}}},"SourceResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"sourceSystem":{"type":"string"},"aclAuthority":{"type":"string"},"status":{"type":"string"},"classification":{"type":"string"},"fileName":{"type":"string"},"mediaType":{"type":"string"},"contentLength":{"type":"integer","format":"int64"},"failureCode":{"type":"string"},"failureMessage":{"type":"string"},"embeddingProfileKey":{"type":"string"},"embeddingProvider":{"type":"string"},"embeddingModel":{"type":"string"},"embeddingDimensions":{"type":"integer","format":"int32"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"SuppressIdentityRequest":{"type":"object","properties":{"idempotencyKey":{"type":"string"},"reason":{"type":"string"},"authorizationGeneration":{"type":"integer","format":"int64"},"kind":{"type":"string","enum":["ENTITY","RELATION"]},"identityId":{"type":"string","format":"uuid"}}},"CuratedEntity":{"allOf":[{"$ref":"#/components/schemas/GraphCurationRecord"},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"namespace":{"$ref":"#/components/schemas/ProjectionNamespace"},"entity":{"$ref":"#/components/schemas/GraphIdentityRef"},"name":{"type":"string"},"type":{"type":"string"},"description":{"type":"string"},"governingEvidence":{"$ref":"#/components/schemas/EvidenceReference"},"provenance":{"$ref":"#/components/schemas/CurationProvenance"}}}]},"CuratedRelation":{"allOf":[{"$ref":"#/components/schemas/GraphCurationRecord"},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"namespace":{"$ref":"#/components/schemas/ProjectionNamespace"},"relation":{"$ref":"#/components/schemas/GraphIdentityRef"},"sourceEntity":{"$ref":"#/components/schemas/GraphIdentityRef"},"targetEntity":{"$ref":"#/components/schemas/GraphIdentityRef"},"type":{"type":"string"},"keywords":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"weight":{"type":"number","format":"double"},"governingEvidence":{"$ref":"#/components/schemas/EvidenceReference"},"provenance":{"$ref":"#/components/schemas/CurationProvenance"}}}]},"CurationProvenance":{"type":"object","properties":{"actorUserId":{"type":"string","format":"uuid"},"authorizationModelId":{"type":"string"},"aclGeneration":{"type":"integer","format":"int64"},"curatedAt":{"type":"string","format":"date-time"},"reason":{"type":"string"}}},"EvidenceReference":{"type":"object","properties":{"organizationId":{"type":"string","format":"uuid"},"knowledgeAssetId":{"type":"string","format":"uuid"},"sourceRevisionId":{"type":"string","format":"uuid"},"chunkId":{"type":"string","format":"uuid"},"aclSnapshotId":{"type":"string","format":"uuid"},"aclGeneration":{"type":"integer","format":"int64"},"chunk":{"type":"boolean"}}},"GraphCurationRecord":{},"GraphIdentityRef":{"type":"object","properties":{"kind":{"type":"string","enum":["ENTITY","RELATION"]},"id":{"type":"string","format":"uuid"}}},"IdentityAlias":{"allOf":[{"$ref":"#/components/schemas/GraphCurationRecord"},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"namespace":{"$ref":"#/components/schemas/ProjectionNamespace"},"source":{"$ref":"#/components/schemas/GraphIdentityRef"},"target":{"$ref":"#/components/schemas/GraphIdentityRef"},"provenance":{"$ref":"#/components/schemas/CurationProvenance"}}}]},"IdentitySuppression":{"allOf":[{"$ref":"#/components/schemas/GraphCurationRecord"},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"namespace":{"$ref":"#/components/schemas/ProjectionNamespace"},"identity":{"$ref":"#/components/schemas/GraphIdentityRef"},"provenance":{"$ref":"#/components/schemas/CurationProvenance"}}}]},"ProjectionNamespace":{"type":"object","properties":{"organizationId":{"type":"string","format":"uuid"},"workspace":{"type":"string"},"collection":{"type":"string"}}},"CurateRelationRequest":{"type":"object","properties":{"idempotencyKey":{"type":"string"},"reason":{"type":"string"},"authorizationGeneration":{"type":"integer","format":"int64"},"relationId":{"type":"string","format":"uuid"},"sourceEntityId":{"type":"string","format":"uuid"},"targetEntityId":{"type":"string","format":"uuid"},"type":{"type":"string"},"keywords":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"weight":{"type":"number","format":"double"},"evidence":{"$ref":"#/components/schemas/EvidenceRequest"}}},"EvidenceRequest":{"type":"object","properties":{"organizationId":{"type":"string","format":"uuid"},"knowledgeAssetId":{"type":"string","format":"uuid"},"sourceRevisionId":{"type":"string","format":"uuid"},"chunkId":{"type":"string","format":"uuid"},"aclSnapshotId":{"type":"string","format":"uuid"},"aclGeneration":{"type":"integer","format":"int64"}}},"CurateEntityRequest":{"type":"object","properties":{"idempotencyKey":{"type":"string"},"reason":{"type":"string"},"authorizationGeneration":{"type":"integer","format":"int64"},"entityId":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"string"},"description":{"type":"string"},"evidence":{"$ref":"#/components/schemas/EvidenceRequest"}}},"AliasIdentityRequest":{"type":"object","properties":{"idempotencyKey":{"type":"string"},"reason":{"type":"string"},"authorizationGeneration":{"type":"integer","format":"int64"},"kind":{"type":"string","enum":["ENTITY","RELATION"]},"sourceIdentityId":{"type":"string","format":"uuid"},"targetIdentityId":{"type":"string","format":"uuid"}}},"GraphIndexJobView":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"knowledgeAssetId":{"type":"string","format":"uuid"},"knowledgeAssetVersionId":{"type":"string","format":"uuid"},"sourceRevisionId":{"type":"string","format":"uuid"},"projectionGeneration":{"type":"integer","format":"int64"},"graphProcessingProfileId":{"type":"string","format":"uuid"},"graphProcessingProfileSha256":{"type":"string"},"status":{"type":"string"},"attempt":{"type":"integer","format":"int32"},"cancellationRequested":{"type":"boolean"},"cancellationRequestedAt":{"type":"string","format":"date-time"},"lastErrorCode":{"type":"string"},"lastErrorMessage":{"type":"string"},"completedAt":{"type":"string","format":"date-time"}}},"KnowledgeSearchRequest":{"type":"object","properties":{"query":{"type":"string"},"requestId":{"type":"string"}}},"KnowledgeCitation":{"type":"object","properties":{"chunkId":{"type":"string","format":"uuid"},"knowledgeAssetId":{"type":"string","format":"uuid"},"sourceRevisionId":{"type":"string","format":"uuid"},"title":{"type":"string"},"startPage":{"type":"integer","format":"int32"},"endPage":{"type":"integer","format":"int32"},"heading":{"type":"string"}}},"KnowledgeResult":{"type":"object","properties":{"traceId":{"type":"string","format":"uuid"},"requestId":{"type":"string"},"citations":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeCitation"}}}},"PromptRunRequest":{"type":"object","properties":{"variables":{"type":"object","additionalProperties":{}},"knowledgeQuery":{"type":"string"},"requestId":{"type":"string"},"confirmedExternalProvider":{"type":"boolean"}}},"AiRoute":{"type":"object","properties":{"gatewayId":{"type":"string"},"modelId":{"type":"string"}}},"PromptCitation":{"type":"object","properties":{"chunkId":{"type":"string","format":"uuid"},"knowledgeAssetId":{"type":"string","format":"uuid"},"sourceRevisionId":{"type":"string","format":"uuid"},"title":{"type":"string"},"startPage":{"type":"integer","format":"int32"},"endPage":{"type":"integer","format":"int32"},"heading":{"type":"string"}}},"PromptRunResult":{"type":"object","properties":{"runId":{"type":"string","format":"uuid"},"assetId":{"type":"string","format":"uuid"},"releaseId":{"type":"string","format":"uuid"},"releaseDigest":{"type":"string"},"modelRoute":{"$ref":"#/components/schemas/AiRoute"},"output":{"type":"string"},"citations":{"type":"array","items":{"$ref":"#/components/schemas/PromptCitation"}},"durationMillis":{"type":"integer","format":"int64"}}},"PromptRunToolResult":{"type":"object","properties":{"traceId":{"type":"string","format":"uuid"},"result":{"$ref":"#/components/schemas/PromptRunResult"}}},"PromptRenderRequest":{"type":"object","properties":{"variables":{"type":"object","additionalProperties":{}}}},"PromptRenderResult":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid"},"releaseId":{"type":"string","format":"uuid"},"releaseDigest":{"type":"string"},"systemInstruction":{"type":"string"},"userPrompt":{"type":"string"},"sensitiveVariables":{"type":"array","items":{"type":"string"}},"inputShapeDigest":{"type":"string"}}},"PromptRenderToolResult":{"type":"object","properties":{"traceId":{"type":"string","format":"uuid"},"result":{"$ref":"#/components/schemas/PromptRenderResult"}}},"ConfirmedActionRequest":{"type":"object","properties":{"confirmed":{"type":"boolean"}}},"ForkRequest":{"type":"object","properties":{"namespace":{"type":"string"},"slug":{"type":"string"},"knowledgeSpaceId":{"type":"string","format":"uuid"},"confirmed":{"type":"boolean"}}},"ForkResult":{"type":"object","properties":{"traceId":{"type":"string","format":"uuid"},"asset":{"$ref":"#/components/schemas/AssetView"}}},"FeedbackRequest":{"type":"object","properties":{"type":{"type":"string","enum":["HELPFUL","OUTDATED","INCORRECT","OTHER"]},"comment":{"type":"string"},"confirmed":{"type":"boolean"}}},"FeedbackResult":{"type":"object","properties":{"traceId":{"type":"string","format":"uuid"},"feedbackId":{"type":"string","format":"uuid"}}},"AssistantChatRequest":{"type":"object","properties":{"message":{"type":"string","maxLength":4000,"minLength":0},"limit":{"type":"integer","format":"int32"},"conversationId":{"type":"string","format":"uuid"}},"required":["message"]},"ServerSentEventString":{},"AssetDraftRequest":{"type":"object","properties":{"title":{"type":"string"},"summary":{"type":"string"},"classification":{"type":"string"},"schemaVersion":{"type":"string"},"payload":{"type":"string"}}},"CreateAssetRequest":{"type":"object","properties":{"type":{"type":"string","enum":["PROMPT_TEMPLATE","WORK_INSTRUCTION","CAPABILITY_PACK"]},"namespace":{"type":"string"},"slug":{"type":"string"},"knowledgeSpaceId":{"type":"string","format":"uuid"},"draft":{"$ref":"#/components/schemas/AssetDraftRequest"}}},"SubmitAssetRevisionRequest":{"type":"object","properties":{"changeNote":{"type":"string"}}},"AssignAssetRoleRequest":{"type":"object","properties":{"principalType":{"type":"string"},"principalId":{"type":"string"},"role":{"type":"string","enum":["OWNER","BACKUP_OWNER","STEWARD","VIEWER","EDITOR","REVIEWER","PUBLISHER"]}}},"AssetReviewDecisionRequest":{"type":"object","properties":{"decision":{"type":"string","enum":["REQUEST_CHANGES","REJECT","APPROVE","CANCEL"]},"comment":{"type":"string"}}},"PublishAssetReleaseRequest":{"type":"object","properties":{"revisionId":{"type":"string","format":"uuid"},"versionLabel":{"type":"string"}}},"Step":{"type":"object","properties":{"key":{"type":"string"},"title":{"type":"string"},"instruction":{"type":"string"},"expectedResult":{"type":"string"},"check":{"type":"string"},"escalation":{"type":"string"},"prohibitedActions":{"type":"array","items":{"type":"string"}},"relatedAssetIds":{"type":"array","items":{"type":"string","format":"uuid"}},"relatedKnowledgeVersionIds":{"type":"array","items":{"type":"string","format":"uuid"}}}},"WorkInstructionSpec":{"type":"object","properties":{"purpose":{"type":"string"},"audience":{"type":"string"},"prerequisites":{"type":"array","items":{"type":"string"}},"completionOutcome":{"type":"string"},"responsibleRole":{"type":"string"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/Step"}}}},"WorkInstructionView":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid"},"releaseId":{"type":"string","format":"uuid"},"releaseDigest":{"type":"string"},"title":{"type":"string"},"versionLabel":{"type":"string"},"instruction":{"$ref":"#/components/schemas/WorkInstructionSpec"},"acknowledged":{"type":"boolean"},"acknowledgedAt":{"type":"string","format":"date-time"}}},"AssetAvailabilityRequest":{"type":"object","properties":{"reason":{"type":"string"}}},"PromptVariablesRequest":{"type":"object","properties":{"variables":{"type":"object","additionalProperties":{}}}},"CaseResult":{"type":"object","properties":{"name":{"type":"string"},"passed":{"type":"boolean"},"failedAssertions":{"type":"array","items":{"type":"string"}},"promptRunId":{"type":"string","format":"uuid"}}},"PromptEvaluationResult":{"type":"object","properties":{"evaluationId":{"type":"string","format":"uuid"},"assetId":{"type":"string","format":"uuid"},"releaseId":{"type":"string","format":"uuid"},"releaseDigest":{"type":"string"},"passedCases":{"type":"integer","format":"int32"},"totalCases":{"type":"integer","format":"int32"},"cases":{"type":"array","items":{"$ref":"#/components/schemas/CaseResult"}}}},"ForkReleaseRequest":{"type":"object","properties":{"namespace":{"type":"string"},"slug":{"type":"string"},"knowledgeSpaceId":{"type":"string","format":"uuid"}}},"PromptComparisonRequest":{"type":"object","properties":{"baselineReleaseId":{"type":"string","format":"uuid"},"candidateReleaseId":{"type":"string","format":"uuid"}}},"PromptEvaluationComparison":{"type":"object","properties":{"baseline":{"$ref":"#/components/schemas/PromptEvaluationResult"},"candidate":{"$ref":"#/components/schemas/PromptEvaluationResult"},"passedCaseDelta":{"type":"integer","format":"int32"}}},"AssignRoleRequest":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"}}},"CreateKnowledgeSpaceRequest":{"type":"object","properties":{"name":{"type":"string"},"departmentId":{"type":"string","format":"uuid"}}},"AdminKnowledgeSpaceResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"name":{"type":"string"},"departmentId":{"type":"string","format":"uuid"},"active":{"type":"boolean"},"grants":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeSpaceGrantResponse"}},"grantsComplete":{"type":"boolean"},"policyVersion":{"type":"string"}}},"KnowledgeSpaceGrantResponse":{"type":"object","properties":{"relation":{"type":"string"},"subject":{"type":"string"}}},"GrantKnowledgeSpaceAccessRequest":{"type":"object","properties":{"relation":{"type":"string"},"kind":{"type":"string","enum":["ORGANIZATION","DEPARTMENT","DEPARTMENT_MANAGERS","ROLE","USER"]},"subjectId":{"type":"string","format":"uuid"},"role":{"type":"string"}}},"CreateInvitationRequest":{"type":"object","properties":{"email":{"type":"string"},"role":{"type":"string","enum":["EMPLOYEE","TEAM_LEAD","MANAGER","DIRECTOR","EXECUTIVE","ADMIN"]},"departmentId":{"type":"string","format":"uuid"}}},"AdminInvitationResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"role":{"type":"string","enum":["EMPLOYEE","TEAM_LEAD","MANAGER","DIRECTOR","EXECUTIVE","ADMIN"]},"departmentId":{"type":"string","format":"uuid"},"status":{"type":"string"},"invitedAt":{"type":"string","format":"date-time"},"acceptedAt":{"type":"string","format":"date-time"},"acceptedAppUserId":{"type":"string","format":"uuid"}}},"AdminConnectorProbeResponse":{"type":"object","properties":{"authenticated":{"type":"boolean"},"connectionKey":{"type":"string"},"accountName":{"type":"string"},"identityName":{"type":"string"},"canReadContent":{"type":"boolean"},"errorCode":{"type":"string"}}},"ExplainAccessRequest":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"permission":{"type":"string"},"resourceType":{"type":"string"},"resourceId":{"type":"string","format":"uuid"}}},"AccessBlockResponse":{"type":"object","properties":{"branch":{"type":"string"},"kind":{"type":"string"},"detail":{"type":"string"}}},"AccessStepResponse":{"type":"object","properties":{"object":{"type":"string"},"relation":{"type":"string"},"kind":{"type":"string"}}},"AclProvenanceResponse":{"type":"object","properties":{"authority":{"type":"string"},"origin":{"type":"string"},"generation":{"type":"integer","format":"int64"},"capturedAt":{"type":"string","format":"date-time"},"expired":{"type":"boolean"}}},"ExplainAccessResponse":{"type":"object","properties":{"state":{"type":"string","enum":["ALLOWED","DENIED","UNKNOWN"]},"reasonCode":{"type":"string"},"path":{"type":"array","items":{"$ref":"#/components/schemas/AccessStepResponse"}},"blockedBy":{"type":"array","items":{"$ref":"#/components/schemas/AccessBlockResponse"}},"provenance":{"$ref":"#/components/schemas/AclProvenanceResponse"},"policyVersion":{"type":"string"},"evaluatedAt":{"type":"string","format":"date-time"}}},"RenameConversationRequest":{"type":"object","properties":{"title":{"type":"string","maxLength":120,"minLength":0}},"required":["title"]},"UpdateAdminUserRequest":{"type":"object","properties":{"role":{"type":"string","enum":["EMPLOYEE","TEAM_LEAD","MANAGER","DIRECTOR","EXECUTIVE","ADMIN"]},"active":{"type":"boolean"}}},"AdminUserResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["EMPLOYEE","TEAM_LEAD","MANAGER","DIRECTOR","EXECUTIVE","ADMIN"]},"departmentId":{"type":"string","format":"uuid"},"active":{"type":"boolean"},"signInLinked":{"type":"boolean"},"mappedPrincipalCount":{"type":"integer","format":"int32"}}},"SessionResponse":{"type":"object","properties":{"authenticated":{"type":"boolean"},"name":{"type":"string"},"email":{"type":"string"},"userId":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"departmentId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["EMPLOYEE","TEAM_LEAD","MANAGER","DIRECTOR","EXECUTIVE","ADMIN"]}}},"CsrfResponse":{"type":"object","properties":{"headerName":{"type":"string"},"parameterName":{"type":"string"},"token":{"type":"string"}}},"DepartmentResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"OrganizationContextResponse":{"type":"object","properties":{"organizationId":{"type":"string","format":"uuid"},"departments":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentResponse"}},"users":{"type":"array","items":{"$ref":"#/components/schemas/UserResponse"}}}},"UserResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"departmentId":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["EMPLOYEE","TEAM_LEAD","MANAGER","DIRECTOR","EXECUTIVE","ADMIN"]}}},"MeResponse":{"type":"object","properties":{"authenticated":{"type":"boolean"},"subject":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"authorizationProvider":{"type":"string"},"userId":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"departmentId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["EMPLOYEE","TEAM_LEAD","MANAGER","DIRECTOR","EXECUTIVE","ADMIN"]}}},"KnowledgeEvidenceResponse":{"type":"object","properties":{"citationId":{"type":"string","format":"uuid"},"knowledgeAssetId":{"type":"string","format":"uuid"},"title":{"type":"string"},"content":{"type":"string"},"sourceUri":{"type":"string"},"startPage":{"type":"integer","format":"int32"},"endPage":{"type":"integer","format":"int32"},"heading":{"type":"string"},"relevanceScore":{"type":"number","format":"double"}}},"KnowledgeSearchResponse":{"type":"object","properties":{"requestId":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeEvidenceResponse"}}}},"KnowledgeCatalogItem":{"type":"object","properties":{"knowledgeAssetId":{"type":"string","format":"uuid"},"knowledgeVersionId":{"type":"string","format":"uuid"},"versionNumber":{"type":"integer","format":"int64"},"knowledgeSpaceId":{"type":"string","format":"uuid"},"title":{"type":"string"},"language":{"type":"string"},"classification":{"type":"string","enum":["PUBLIC","INTERNAL","CONFIDENTIAL","RESTRICTED"]},"contentDigest":{"type":"string"}}},"Entity":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"string"},"description":{"type":"string"},"citationChunkIds":{"type":"array","items":{"type":"string","format":"uuid"}},"governingEvidence":{"$ref":"#/components/schemas/EvidenceReference"}}},"KnowledgeGraphView":{"type":"object","properties":{"knowledgeSpaceId":{"type":"string","format":"uuid"},"authorizationGeneration":{"type":"integer","format":"int64"},"canCurate":{"type":"boolean"},"entities":{"type":"array","items":{"$ref":"#/components/schemas/Entity"}},"relations":{"type":"array","items":{"$ref":"#/components/schemas/Relation"}},"truncated":{"type":"boolean"}}},"Relation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sourceEntityId":{"type":"string","format":"uuid"},"targetEntityId":{"type":"string","format":"uuid"},"type":{"type":"string"},"description":{"type":"string"},"weight":{"type":"number","format":"double"},"keywords":{"type":"array","items":{"type":"string"}},"citationChunkIds":{"type":"array","items":{"type":"string","format":"uuid"}},"governingEvidence":{"$ref":"#/components/schemas/EvidenceReference"}}},"KnowledgeSpaceResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"name":{"type":"string"},"departmentId":{"type":"string","format":"uuid"}}},"StreamingResponseBody":{},"WorkInstructionToolResult":{"type":"object","properties":{"traceId":{"type":"string","format":"uuid"},"instruction":{"$ref":"#/components/schemas/WorkInstructionView"}}},"AssistantReleaseRef":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid"},"releaseId":{"type":"string","format":"uuid"},"releaseDigest":{"type":"string"}}},"PromptFormResult":{"type":"object","properties":{"traceId":{"type":"string","format":"uuid"},"release":{"$ref":"#/components/schemas/AssistantReleaseRef"},"objective":{"type":"string"},"audience":{"type":"string"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variable"}},"outputContract":{"type":"object","additionalProperties":{}},"knowledgeRequirements":{"type":"array","items":{"type":"string"}},"knownLimitations":{"type":"string"}}},"Variable":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["STRING","INTEGER","NUMBER","BOOLEAN","STRING_LIST"]},"required":{"type":"boolean"},"defaultValue":{},"sensitive":{"type":"boolean"},"pattern":{"type":"string"},"allowedValues":{"type":"array","items":{"type":"string"}}}},"AssetRecommendation":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["PROMPT_TEMPLATE","WORK_INSTRUCTION","CAPABILITY_PACK"]},"namespace":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"knowledgeSpaceId":{"type":"string","format":"uuid"},"portfolioState":{"type":"string","enum":["DRAFT_ONLY","ACTIVE","SUNSETTING","RETIRED"]},"releaseId":{"type":"string","format":"uuid"},"versionLabel":{"type":"string"},"releaseDigest":{"type":"string"},"availability":{"type":"string","enum":["AVAILABLE","DEPRECATED","WITHDRAWN"]}}},"RecommendationResult":{"type":"object","properties":{"traceId":{"type":"string","format":"uuid"},"recommendations":{"type":"array","items":{"$ref":"#/components/schemas/AssetRecommendation"}}}},"AssistantConversationSummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"lastActivityAt":{"type":"string","format":"date-time"},"messageCount":{"type":"integer","format":"int64"}}},"AssistantConversationMessageView":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["USER","ASSISTANT"]},"content":{"type":"string"},"sequence":{"type":"integer","format":"int64"},"occurredAt":{"type":"string","format":"date-time"}}},"AssetSummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["PROMPT_TEMPLATE","WORK_INSTRUCTION","CAPABILITY_PACK"]},"namespace":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"knowledgeSpaceId":{"type":"string","format":"uuid"},"portfolioState":{"type":"string","enum":["DRAFT_ONLY","ACTIVE","SUNSETTING","RETIRED"]}}},"AssetDeliveryRelease":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid"},"releaseId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["PROMPT_TEMPLATE","WORK_INSTRUCTION","CAPABILITY_PACK"]},"namespace":{"type":"string"},"slug":{"type":"string"},"versionLabel":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"classification":{"type":"string"},"schemaVersion":{"type":"string"},"payload":{"type":"string"},"digest":{"type":"string"},"availability":{"type":"string","enum":["AVAILABLE","DEPRECATED","WITHDRAWN"]},"releasedAt":{"type":"string","format":"date-time"}}},"AssetRelationResolution":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid"},"releaseId":{"type":"string","format":"uuid"},"accessGap":{"type":"boolean"},"relations":{"type":"array","items":{"$ref":"#/components/schemas/Relation"}}}},"CapabilityPackDefinition":{"type":"object","properties":{"packAssetId":{"type":"string","format":"uuid"},"packReleaseId":{"type":"string","format":"uuid"},"releaseDigest":{"type":"string"},"title":{"type":"string"},"versionLabel":{"type":"string"},"purpose":{"type":"string","enum":["ROLE_ONBOARDING","HANDOVER","ROLE_ENABLEMENT"]},"audience":{"type":"string"},"prerequisites":{"type":"array","items":{"type":"string"}},"expectedOutcome":{"type":"string"},"completionCriteria":{"type":"array","items":{"type":"string"}},"reviewDate":{"type":"string"},"owner":{"type":"string"},"accessGap":{"type":"boolean"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Item"}}}},"EffectivePermissionResponse":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"permissions":{"type":"object","additionalProperties":{"type":"string","enum":["ALLOWED","DENIED","UNKNOWN"]}},"evaluatedAt":{"type":"string","format":"date-time"}}},"AdminSourceGroupMemberResponse":{"type":"object","properties":{"principalId":{"type":"string","format":"uuid"},"externalKey":{"type":"string"},"observedDisplayName":{"type":"string"},"observedEmail":{"type":"string"},"appUserId":{"type":"string","format":"uuid"},"appUserName":{"type":"string"}}},"AdminSourceGroupResponse":{"type":"object","properties":{"principalId":{"type":"string","format":"uuid"},"sourceSystem":{"type":"string"},"sourceConnectionKey":{"type":"string"},"externalKey":{"type":"string"},"observedDisplayName":{"type":"string"},"sourceAclSnapshotId":{"type":"string","format":"uuid"},"aclGeneration":{"type":"integer","format":"int64"},"sealedAt":{"type":"string","format":"date-time"},"members":{"type":"array","items":{"$ref":"#/components/schemas/AdminSourceGroupMemberResponse"}}}},"AdminRoleListResponse":{"type":"object","properties":{"roles":{"type":"array","items":{"$ref":"#/components/schemas/AdminRoleResponse"}},"complete":{"type":"boolean"},"policyVersion":{"type":"string"}}},"AdminRoleResponse":{"type":"object","properties":{"role":{"type":"string"},"assignees":{"type":"array","items":{"type":"string"}}}},"KnowledgeSpaceGrantOptionResponse":{"type":"object","properties":{"relation":{"type":"string"},"kinds":{"type":"array","items":{"type":"string","enum":["ORGANIZATION","DEPARTMENT","DEPARTMENT_MANAGERS","ROLE","USER"]}}}},"AdminConnectorScopeResponse":{"type":"object","properties":{"key":{"type":"string"},"displayName":{"type":"string"},"reachable":{"type":"boolean"},"admissible":{"type":"boolean"},"instruction":{"type":"string"}}},"AdminConnectionActivityResponse":{"type":"object","properties":{"sourceSystem":{"type":"string"},"sourceConnectionKey":{"type":"string"},"objectsTotal":{"type":"integer","format":"int64"},"objectsActive":{"type":"integer","format":"int64"},"objectsArchived":{"type":"integer","format":"int64"},"lastObjectAt":{"type":"string","format":"date-time"},"lastCrawlAt":{"type":"string","format":"date-time"},"recentAttempts":{"type":"array","items":{"$ref":"#/components/schemas/AdminCrawlAttemptResponse"}}}},"AdminCrawlAttemptResponse":{"type":"object","properties":{"outcome":{"type":"string"},"objectsMaterialized":{"type":"integer","format":"int32"},"objectsRotated":{"type":"integer","format":"int32"},"objectsRematerialized":{"type":"integer","format":"int32"},"objectsRetired":{"type":"integer","format":"int32"},"objectsFailed":{"type":"integer","format":"int32"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"attemptedAt":{"type":"string","format":"date-time"}}},"AdminConnectorSourceResponse":{"type":"object","properties":{"sourceSystem":{"type":"string"},"displayName":{"type":"string"}}},"KnowledgeAssetRef":{"type":"object","properties":{"knowledgeAssetId":{"type":"string","format":"uuid"},"knowledgeAssetVersionId":{"type":"string","format":"uuid"},"normalizedRecordId":{"type":"string","format":"uuid"},"rawSourceObjectId":{"type":"string","format":"uuid"},"sourceAclSnapshotId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["PENDING","ACTIVE","RETIRED"]}}}}}} \ No newline at end of file +{"openapi":"3.1.0","info":{"title":"OpenAPI definition","version":"v0"},"servers":[{"url":"http://127.0.0.1:8080","description":"Generated server url"}],"paths":{"/api/assistant/tools/assets/{assetId}/releases/{releaseId}/pack/{itemKey}":{"put":{"tags":["assistant-asset-tool-controller"],"summary":"Update actor-derived Pack progress after explicit confirmation","operationId":"updateAssistantPackProgress","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"itemKey","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackProgressRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PackToolResult"}}}}}}},"/api/assets/{assetId}/releases/{releaseId}/pack-progress/{itemKey}":{"put":{"tags":["asset-consumption-controller"],"summary":"Idempotently update actor-derived progress for one accessible Pack item","operationId":"setCapabilityPackProgress","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"itemKey","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackProgressRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PackJourney"}}}}}}},"/api/assets/{assetId}/draft":{"put":{"tags":["asset-registry-controller"],"summary":"Update a mutable Asset draft","operationId":"updateAssetDraft","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAssetDraftRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetView"}}}}}}},"/api/admin/source-principals/{principalId}/mapping":{"put":{"tags":["admin-source-access-controller"],"summary":"Confirm a principal maps to an internal user","operationId":"confirmAdminSourceMapping","parameters":[{"name":"principalId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmMappingRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdminSourcePrincipalResponse"}}}}}},"delete":{"tags":["admin-source-access-controller"],"summary":"Revoke a principal's active mapping","operationId":"revokeAdminSourceMapping","parameters":[{"name":"principalId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdminSourcePrincipalResponse"}}}}}}},"/api/admin/source-connections/identity-trust":{"put":{"tags":["admin-source-access-controller"],"summary":"Record the identity trust for a connection","operationId":"setAdminSourceConnectionTrust","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityTrustRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdminSourceConnectionResponse"}}}}}}},"/api/admin/connectors/{sourceSystem}/{connectionKey}":{"put":{"tags":["admin-connector-controller"],"summary":"Record how a connection is crawled","operationId":"configureAdminConnection","parameters":[{"name":"sourceSystem","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionKey","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigureConnectionRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdminConnectionResponse"}}}}}}},"/api/admin/connectors/{sourceSystem}/{connectionKey}/credential":{"put":{"tags":["admin-connector-controller"],"summary":"Store a credential for a connection","operationId":"setAdminConnectionCredential","parameters":[{"name":"sourceSystem","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionKey","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorCredentialRequest"}}},"required":true},"responses":{"204":{"description":"No Content"}}},"delete":{"tags":["admin-connector-controller"],"summary":"Forget a connection's stored credential","operationId":"forgetAdminConnectionCredential","parameters":[{"name":"sourceSystem","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionKey","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"}}}},"/api/sources":{"get":{"tags":["source-controller"],"summary":"List sources visible to the current user","operationId":"listSources","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SourceResponse"}}}}}}},"post":{"tags":["source-controller"],"summary":"Upload a source for asynchronous ingestion","operationId":"uploadSource","parameters":[{"name":"classification","in":"query","required":false,"schema":{"type":"string","default":"CONFIDENTIAL","enum":["PUBLIC","INTERNAL","CONFIDENTIAL","RESTRICTED"]}},{"name":"knowledgeSpaceId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SourceResponse"}}}}}}},"/api/knowledge-spaces/{knowledgeSpaceId}/graph/curations/suppressions":{"post":{"tags":["knowledge-graph-management-controller"],"summary":"Delete an effective graph identity without deleting evidence","operationId":"suppressGraphIdentity","parameters":[{"name":"knowledgeSpaceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressIdentityRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CuratedEntity"},{"$ref":"#/components/schemas/CuratedRelation"},{"$ref":"#/components/schemas/IdentityAlias"},{"$ref":"#/components/schemas/IdentitySuppression"}]}}}}}}},"/api/knowledge-spaces/{knowledgeSpaceId}/graph/curations/relations":{"post":{"tags":["knowledge-graph-management-controller"],"summary":"Create or edit a governed graph relation","operationId":"curateGraphRelation","parameters":[{"name":"knowledgeSpaceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurateRelationRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CuratedEntity"},{"$ref":"#/components/schemas/CuratedRelation"},{"$ref":"#/components/schemas/IdentityAlias"},{"$ref":"#/components/schemas/IdentitySuppression"}]}}}}}}},"/api/knowledge-spaces/{knowledgeSpaceId}/graph/curations/entities":{"post":{"tags":["knowledge-graph-management-controller"],"summary":"Create or edit a governed graph entity","operationId":"curateGraphEntity","parameters":[{"name":"knowledgeSpaceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurateEntityRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CuratedEntity"},{"$ref":"#/components/schemas/CuratedRelation"},{"$ref":"#/components/schemas/IdentityAlias"},{"$ref":"#/components/schemas/IdentitySuppression"}]}}}}}}},"/api/knowledge-spaces/{knowledgeSpaceId}/graph/curations/aliases":{"post":{"tags":["knowledge-graph-management-controller"],"summary":"Merge graph identities through a reversible alias","operationId":"mergeGraphIdentity","parameters":[{"name":"knowledgeSpaceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AliasIdentityRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CuratedEntity"},{"$ref":"#/components/schemas/CuratedRelation"},{"$ref":"#/components/schemas/IdentityAlias"},{"$ref":"#/components/schemas/IdentitySuppression"}]}}}}}}},"/api/knowledge-assets/{knowledgeAssetId}/graph-index":{"post":{"tags":["knowledge-asset-lifecycle-controller"],"summary":"Ensure graph indexing uses the current processing profile","operationId":"ensureKnowledgeAssetGraphIndex","parameters":[{"name":"knowledgeAssetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"202":{"description":"Accepted","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GraphIndexJobView"}}}}}}},"/api/knowledge-assets/graph-jobs/{jobId}/resume":{"post":{"tags":["knowledge-asset-lifecycle-controller"],"summary":"Resume unfinished graph indexing","operationId":"resumeGraphIndexJob","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"202":{"description":"Accepted","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GraphIndexJobView"}}}}}}},"/api/knowledge-assets/graph-jobs/{jobId}/cancel":{"post":{"tags":["knowledge-asset-lifecycle-controller"],"summary":"Cancel queued or in-flight graph indexing","operationId":"cancelGraphIndexJob","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GraphIndexJobView"}}}}}}},"/api/assistant/tools/knowledge-search":{"post":{"tags":["assistant-asset-tool-controller"],"summary":"Search canonical permission-aware Knowledge and return citation references","operationId":"searchAssistantKnowledge","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeSearchRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/KnowledgeResult"}}}}}}},"/api/assistant/tools/assets/{assetId}/releases/{releaseId}/prompt-run":{"post":{"tags":["assistant-asset-tool-controller"],"summary":"Run an exact Prompt release after explicit external-provider confirmation","operationId":"runAssistantPrompt","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptRunRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PromptRunToolResult"}}}}}}},"/api/assistant/tools/assets/{assetId}/releases/{releaseId}/prompt-render":{"post":{"tags":["assistant-asset-tool-controller"],"summary":"Render an exact Prompt release after variable validation","operationId":"renderAssistantPrompt","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptRenderRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PromptRenderToolResult"}}}}}}},"/api/assistant/tools/assets/{assetId}/releases/{releaseId}/pack":{"get":{"tags":["assistant-asset-tool-controller"],"summary":"Read an actor-scoped exact Pack journey","operationId":"readAssistantPack","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PackToolResult"}}}}}},"post":{"tags":["assistant-asset-tool-controller"],"summary":"Start an exact Pack after explicit state-change confirmation","operationId":"startAssistantPack","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmedActionRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PackToolResult"}}}}}}},"/api/assistant/tools/assets/{assetId}/releases/{releaseId}/fork":{"post":{"tags":["assistant-asset-tool-controller"],"summary":"Fork an exact release after explicit draft-creation confirmation","operationId":"forkAssistantAssetRelease","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForkRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ForkResult"}}}}}}},"/api/assistant/tools/assets/{assetId}/releases/{releaseId}/feedback":{"post":{"tags":["assistant-asset-tool-controller"],"summary":"Submit feedback against an exact release after explicit confirmation","operationId":"submitAssistantAssetFeedback","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/FeedbackResult"}}}}}}},"/api/assistant/chat":{"post":{"tags":["assistant-controller"],"summary":"Stream an answer from permission-verified knowledge","operationId":"streamAssistantChat","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantChatRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"text/event-stream":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ServerSentEventString"}}}}}}}},"/api/assets":{"get":{"tags":["asset-registry-controller"],"summary":"List released or authoring Assets visible to the actor","operationId":"listAssets","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["PROMPT_TEMPLATE","WORK_INSTRUCTION","CAPABILITY_PACK"]}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssetSummary"}}}}}}},"post":{"tags":["asset-registry-controller"],"summary":"Create an Asset and its mutable draft","operationId":"createAsset","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAssetRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetView"}}}}}}},"/api/assets/{assetId}/submissions":{"post":{"tags":["asset-registry-controller"],"summary":"Submit an immutable Asset revision for review","operationId":"submitAssetRevision","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitAssetRevisionRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetView"}}}}}}},"/api/assets/{assetId}/role-assignments":{"post":{"tags":["asset-registry-controller"],"summary":"Assign an accountable role on an Asset","operationId":"assignAssetRole","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignAssetRoleRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetView"}}}}}}},"/api/assets/{assetId}/reviews/{reviewCaseId}/decisions":{"post":{"tags":["asset-registry-controller"],"summary":"Record a decision against an exact revision digest","operationId":"decideAssetReview","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"reviewCaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetReviewDecisionRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetView"}}}}}}},"/api/assets/{assetId}/releases":{"post":{"tags":["asset-registry-controller"],"summary":"Publish an approved immutable Asset revision","operationId":"publishAssetRelease","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishAssetReleaseRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetView"}}}}}}},"/api/assets/{assetId}/releases/{releaseId}/work-instruction/acknowledgement":{"post":{"tags":["asset-consumption-controller"],"summary":"Idempotently acknowledge an exact Work Instruction release","operationId":"acknowledgeWorkInstruction","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WorkInstructionView"}}}}}}},"/api/assets/{assetId}/releases/{releaseId}/withdrawal":{"post":{"tags":["asset-registry-controller"],"summary":"Withdraw an Asset release from new use","operationId":"withdrawAssetRelease","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetAvailabilityRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetView"}}}}}}},"/api/assets/{assetId}/releases/{releaseId}/prompt/runs":{"post":{"tags":["asset-consumption-controller"],"summary":"Run an exact Prompt release through the provider-neutral AI gateway","operationId":"runPromptRelease","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptRunRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PromptRunResult"}}}}}}},"/api/assets/{assetId}/releases/{releaseId}/prompt/render":{"post":{"tags":["asset-consumption-controller"],"summary":"Deterministically render an exact authorized Prompt release","operationId":"renderPromptRelease","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVariablesRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PromptRenderResult"}}}}}}},"/api/assets/{assetId}/releases/{releaseId}/prompt/evaluations":{"post":{"tags":["asset-consumption-controller"],"summary":"Run the bounded evaluation cases pinned in a Prompt release","operationId":"evaluatePromptRelease","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PromptEvaluationResult"}}}}}}},"/api/assets/{assetId}/releases/{releaseId}/pack-assignment":{"post":{"tags":["asset-consumption-controller"],"summary":"Start or resume an exact authorized Capability Pack release","operationId":"startCapabilityPack","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PackJourney"}}}}}}},"/api/assets/{assetId}/releases/{releaseId}/forks":{"post":{"tags":["asset-consumption-controller"],"summary":"Fork an exact authorized release into a new mutable draft","operationId":"forkAssetRelease","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForkReleaseRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetView"}}}}}}},"/api/assets/{assetId}/releases/{releaseId}/deprecation":{"post":{"tags":["asset-registry-controller"],"summary":"Deprecate an Asset release","operationId":"deprecateAssetRelease","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetAvailabilityRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetView"}}}}}}},"/api/assets/{assetId}/prompt/evaluation-comparisons":{"post":{"tags":["asset-consumption-controller"],"summary":"Compare bounded evaluation results for two exact Prompt releases","operationId":"comparePromptReleases","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptComparisonRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PromptEvaluationComparison"}}}}}}},"/api/asset-delivery/{assetId}/releases/{releaseId}/prompt-render":{"post":{"tags":["asset-delivery-controller"],"summary":"Deterministically render an exact authorized Prompt release","operationId":"renderReleasedPrompt","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVariablesRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PromptRenderResult"}}}}}}},"/api/admin/roles/{role}/members":{"post":{"tags":["admin-role-controller"],"summary":"Assign a user to a role","operationId":"assignAdminRole","parameters":[{"name":"role","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignRoleRequest"}}},"required":true},"responses":{"204":{"description":"No Content"}}}},"/api/admin/knowledge-spaces":{"get":{"tags":["admin-knowledge-space-controller"],"summary":"List Knowledge Spaces and the grants stored against them","operationId":"listAdminKnowledgeSpaces","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminKnowledgeSpaceResponse"}}}}}}},"post":{"tags":["admin-knowledge-space-controller"],"summary":"Create a Knowledge Space","operationId":"createAdminKnowledgeSpace","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKnowledgeSpaceRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdminKnowledgeSpaceResponse"}}}}}}},"/api/admin/knowledge-spaces/{knowledgeSpaceId}/grants":{"post":{"tags":["admin-knowledge-space-controller"],"summary":"Grant a subject access to a Knowledge Space","operationId":"grantAdminKnowledgeSpaceAccess","parameters":[{"name":"knowledgeSpaceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantKnowledgeSpaceAccessRequest"}}},"required":true},"responses":{"204":{"description":"No Content"}}},"delete":{"tags":["admin-knowledge-space-controller"],"summary":"Revoke a subject's access to a Knowledge Space","operationId":"revokeAdminKnowledgeSpaceAccess","parameters":[{"name":"knowledgeSpaceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"relation","in":"query","required":true,"schema":{"type":"string"}},{"name":"kind","in":"query","required":true,"schema":{"type":"string","enum":["ORGANIZATION","DEPARTMENT","DEPARTMENT_MANAGERS","ROLE","USER"]}},{"name":"subjectId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"role","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"}}}},"/api/admin/invitations":{"get":{"tags":["admin-invitation-controller"],"summary":"List invited addresses and their status","operationId":"listAdminInvitations","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminInvitationResponse"}}}}}}},"post":{"tags":["admin-invitation-controller"],"summary":"Expect an address to sign in","operationId":"createAdminInvitation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvitationRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdminInvitationResponse"}}}}}}},"/api/admin/connectors/{sourceSystem}/{connectionKey}/test":{"post":{"tags":["admin-connector-controller"],"summary":"Check a connection's stored credential","operationId":"testAdminConnection","parameters":[{"name":"sourceSystem","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionKey","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdminConnectorProbeResponse"}}}}}}},"/api/admin/connectors/{sourceSystem}/{connectionKey}/crawl":{"post":{"tags":["admin-connector-controller"],"summary":"Ask for a content crawl on the next poll","operationId":"requestAdminConnectionCrawl","parameters":[{"name":"sourceSystem","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionKey","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Accepted"}}}},"/api/admin/connectors/{sourceSystem}/test":{"post":{"tags":["admin-connector-controller"],"summary":"Check a credential without storing it","operationId":"testAdminConnectorCredential","parameters":[{"name":"sourceSystem","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorCredentialRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdminConnectorProbeResponse"}}}}}}},"/api/admin/access/explain":{"post":{"tags":["admin-permission-controller"],"summary":"Answer whether a user holds a permission on one resource, and by which derivation","operationId":"explainAdminAccess","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExplainAccessRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExplainAccessResponse"}}}}}}},"/api/assistant/conversations/{conversationId}":{"delete":{"tags":["assistant-controller"],"summary":"Delete the current actor's transcript and bounded model memory","operationId":"deleteAssistantConversation","parameters":[{"name":"conversationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"No Content"}}},"patch":{"tags":["assistant-controller"],"summary":"Rename the current actor's conversation","operationId":"renameAssistantConversation","parameters":[{"name":"conversationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameConversationRequest"}}},"required":true},"responses":{"204":{"description":"No Content"}}}},"/api/admin/users/{userId}":{"patch":{"tags":["admin-user-controller"],"summary":"Change a user's role or activation","operationId":"updateAdminUser","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAdminUserRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdminUserResponse"}}}}}}},"/api/session":{"get":{"tags":["browser-session-controller"],"summary":"Read the current browser session","operationId":"getBrowserSession","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}}}}},"/api/session/csrf":{"get":{"tags":["browser-session-controller"],"summary":"Issue a CSRF token for browser mutations","operationId":"getBrowserCsrfToken","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CsrfResponse"}}}}}}},"/api/organization/context":{"get":{"tags":["organization-context-controller"],"operationId":"context","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OrganizationContextResponse"}}}}}}},"/api/me":{"get":{"tags":["me-controller"],"operationId":"me","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}}}}},"/api/knowledge/search":{"get":{"tags":["knowledge-search-controller"],"summary":"Search permission-verified knowledge evidence","operationId":"searchKnowledge","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/KnowledgeSearchResponse"}}}}}}},"/api/knowledge/catalog":{"get":{"tags":["knowledge-catalog-controller"],"summary":"List current permission-verified Knowledge versions for composition","operationId":"listKnowledgeCatalog","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeCatalogItem"}}}}}}}},"/api/knowledge-spaces/{knowledgeSpaceId}/graph/export":{"get":{"tags":["knowledge-graph-management-controller"],"summary":"Export only graph evidence visible to the current user","operationId":"exportKnowledgeGraph","parameters":[{"name":"knowledgeSpaceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"JSON","enum":["JSON","CSV","MARKDOWN","TEXT"]}},{"name":"X-Request-Id","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/api/knowledge-spaces/{knowledgeSpaceId}/graph/explorer":{"get":{"tags":["knowledge-graph-explorer-controller"],"summary":"Read a bounded permission-filtered graph view","operationId":"exploreKnowledgeGraph","parameters":[{"name":"knowledgeSpaceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"entityLimit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"maxDepth","in":"query","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/KnowledgeGraphView"}}}}}}},"/api/knowledge-spaces/visible":{"get":{"tags":["knowledge-space-controller"],"summary":"List Knowledge Spaces visible to the current user","operationId":"listVisibleKnowledgeSpaces","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeSpaceResponse"}}}}}}}},"/api/knowledge-spaces/upload-targets":{"get":{"tags":["knowledge-space-controller"],"summary":"List Knowledge Spaces where the current user may add knowledge","operationId":"listKnowledgeSpaceUploadTargets","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeSpaceResponse"}}}}}}}},"/api/knowledge-assets/graph-jobs/{jobId}":{"get":{"tags":["knowledge-asset-lifecycle-controller"],"summary":"Read graph indexing lifecycle status","operationId":"getGraphIndexJob","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GraphIndexJobView"}}}}}}},"/api/health":{"get":{"tags":["health-controller"],"operationId":"health","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/api/citations/{chunkId}/content":{"get":{"tags":["citation-content-controller"],"summary":"Stream permission-verified source evidence","operationId":"readCitationContent","parameters":[{"name":"chunkId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StreamingResponseBody"}}}}}}},"/api/assistant/tools/assets/{assetId}/releases/{releaseId}/work-instruction":{"get":{"tags":["assistant-asset-tool-controller"],"summary":"Guide an exact Work Instruction release","operationId":"followAssistantWorkInstruction","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WorkInstructionToolResult"}}}}}}},"/api/assistant/tools/assets/{assetId}/releases/{releaseId}/prompt-form":{"get":{"tags":["assistant-asset-tool-controller"],"summary":"Resolve the variables required by an exact Prompt release","operationId":"prepareAssistantPrompt","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PromptFormResult"}}}}}}},"/api/assistant/tools/asset-recommendations":{"get":{"tags":["assistant-asset-tool-controller"],"summary":"Recommend exact usable Asset releases without leaking denied candidates","operationId":"recommendAssistantAssets","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["PROMPT_TEMPLATE","WORK_INSTRUCTION","CAPABILITY_PACK"]}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RecommendationResult"}}}}}}},"/api/assistant/conversations":{"get":{"tags":["assistant-controller"],"summary":"List the current actor's conversations by recent activity","operationId":"listAssistantConversations","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssistantConversationSummary"}}}}}}}},"/api/assistant/conversations/{conversationId}/messages":{"get":{"tags":["assistant-controller"],"summary":"Replay a tenant- and actor-scoped full conversation transcript","operationId":"getAssistantConversationHistory","parameters":[{"name":"conversationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssistantConversationMessageView"}}}}}}}},"/api/assets/{assetId}":{"get":{"tags":["asset-registry-controller"],"summary":"Read an authorized Asset and its governance history","operationId":"getAsset","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetView"}}}}}}},"/api/assets/{assetId}/releases/{releaseId}/work-instruction":{"get":{"tags":["asset-consumption-controller"],"summary":"Follow an exact authorized Work Instruction release","operationId":"followWorkInstruction","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WorkInstructionView"}}}}}}},"/api/assets/{assetId}/releases/{releaseId}/pack-journey":{"get":{"tags":["asset-consumption-controller"],"summary":"Read an actor-scoped Capability Pack journey","operationId":"getCapabilityPackJourney","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PackJourney"}}}}}}},"/api/asset-delivery":{"get":{"tags":["asset-delivery-controller"],"summary":"Search exact released Assets authorized for the current actor","operationId":"searchReleasedAssets","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["PROMPT_TEMPLATE","WORK_INSTRUCTION","CAPABILITY_PACK"]}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssetRecommendation"}}}}}}}},"/api/asset-delivery/{assetId}":{"get":{"tags":["asset-delivery-controller"],"summary":"Read the latest usable immutable release for an Asset","operationId":"getLatestReleasedAsset","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetDeliveryRelease"}}}}}}},"/api/asset-delivery/{assetId}/releases/{releaseId}":{"get":{"tags":["asset-delivery-controller"],"summary":"Read one exact usable immutable Asset release","operationId":"getReleasedAsset","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetDeliveryRelease"}}}}}}},"/api/asset-delivery/{assetId}/releases/{releaseId}/relations":{"get":{"tags":["asset-delivery-controller"],"summary":"Resolve only independently authorized relations of an exact release","operationId":"resolveReleasedAssetRelations","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetRelationResolution"}}}}}}},"/api/asset-delivery/{assetId}/releases/{releaseId}/pack":{"get":{"tags":["asset-delivery-controller"],"summary":"Read a Pack definition with independently authorized pinned items","operationId":"getReleasedCapabilityPack","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CapabilityPackDefinition"}}}}}}},"/api/admin/users":{"get":{"tags":["admin-user-controller"],"summary":"List internal users with their sign-in and mapping status","operationId":"listAdminUsers","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserResponse"}}}}}}}},"/api/admin/users/{userId}/permissions":{"get":{"tags":["admin-permission-controller"],"summary":"Resolve a user's organization permissions as the engine currently answers them","operationId":"listAdminUserPermissions","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EffectivePermissionResponse"}}}}}}},"/api/admin/source-principals":{"get":{"tags":["admin-source-access-controller"],"summary":"List observed principals and their mapping","operationId":"listAdminSourcePrincipals","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminSourcePrincipalResponse"}}}}}}}},"/api/admin/source-groups":{"get":{"tags":["admin-source-access-controller"],"summary":"List source groups with their sealed membership","operationId":"listAdminSourceGroups","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminSourceGroupResponse"}}}}}}}},"/api/admin/source-connections":{"get":{"tags":["admin-source-access-controller"],"summary":"List observed connections and their trust level","operationId":"listAdminSourceConnections","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminSourceConnectionResponse"}}}}}}}},"/api/admin/roles":{"get":{"tags":["admin-role-controller"],"summary":"List roles and who is assigned to them","operationId":"listAdminRoles","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdminRoleListResponse"}}}}}}},"/api/admin/knowledge-spaces/grant-options":{"get":{"tags":["admin-knowledge-space-controller"],"summary":"List the subject shapes each Knowledge Space relation accepts","operationId":"listAdminKnowledgeSpaceGrantOptions","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeSpaceGrantOptionResponse"}}}}}}}},"/api/admin/connectors/{sourceSystem}":{"get":{"tags":["admin-connector-controller"],"summary":"List a source's connections and their crawl settings","operationId":"listAdminConnections","parameters":[{"name":"sourceSystem","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminConnectionResponse"}}}}}}}},"/api/admin/connectors/{sourceSystem}/{connectionKey}/scopes":{"get":{"tags":["admin-connector-controller"],"summary":"List what a connection can be pointed at","operationId":"listAdminConnectionScopes","parameters":[{"name":"sourceSystem","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionKey","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminConnectorScopeResponse"}}}}}}}},"/api/admin/connectors/{sourceSystem}/{connectionKey}/activity":{"get":{"tags":["admin-connector-controller"],"summary":"Read what a connection has crawled and what went wrong","operationId":"getAdminConnectionActivity","parameters":[{"name":"sourceSystem","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionKey","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdminConnectionActivityResponse"}}}}}}},"/api/admin/connectors/sources":{"get":{"tags":["admin-connector-controller"],"summary":"List the sources this deployment can ingest","operationId":"listAdminConnectorSources","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminConnectorSourceResponse"}}}}}}}},"/api/knowledge-spaces/{knowledgeSpaceId}/graph/curations/{curationId}":{"delete":{"tags":["knowledge-graph-management-controller"],"summary":"Reverse a graph curation record","operationId":"deactivateGraphCuration","parameters":[{"name":"knowledgeSpaceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"curationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"authorizationGeneration","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"reason","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/knowledge-assets/{knowledgeAssetId}":{"delete":{"tags":["knowledge-asset-lifecycle-controller"],"summary":"Retire a Knowledge Asset and remove its derived graph","operationId":"deleteKnowledgeAsset","parameters":[{"name":"knowledgeAssetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/KnowledgeAssetRef"}}}}}}},"/api/admin/roles/{role}/members/{userId}":{"delete":{"tags":["admin-role-controller"],"summary":"Remove a user from a role","operationId":"revokeAdminRole","parameters":[{"name":"role","in":"path","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"No Content"}}}},"/api/admin/invitations/{invitationId}":{"delete":{"tags":["admin-invitation-controller"],"summary":"Withdraw an invitation that has not been used","operationId":"revokeAdminInvitation","parameters":[{"name":"invitationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"No Content"}}}}},"components":{"schemas":{"PackProgressRequest":{"type":"object","properties":{"completed":{"type":"boolean"},"confirmed":{"type":"boolean"}}},"Item":{"type":"object","properties":{"key":{"type":"string"},"required":{"type":"boolean"},"order":{"type":"integer","format":"int32"},"kind":{"type":"string"},"resourceId":{"type":"string","format":"uuid"},"pinnedVersionId":{"type":"string","format":"uuid"},"title":{"type":"string"},"versionLabel":{"type":"string"},"availability":{"type":"string","enum":["AVAILABLE","DEPRECATED","WITHDRAWN"]},"completed":{"type":"boolean"},"completedAt":{"type":"string","format":"date-time"}}},"PackJourney":{"type":"object","properties":{"assignmentId":{"type":"string","format":"uuid"},"packAssetId":{"type":"string","format":"uuid"},"packReleaseId":{"type":"string","format":"uuid"},"releaseDigest":{"type":"string"},"title":{"type":"string"},"versionLabel":{"type":"string"},"purpose":{"type":"string","enum":["ROLE_ONBOARDING","HANDOVER","ROLE_ENABLEMENT"]},"audience":{"type":"string"},"expectedOutcome":{"type":"string"},"status":{"type":"string","enum":["IN_PROGRESS","COMPLETED"]},"accessGap":{"type":"boolean"},"completedAccessibleItems":{"type":"integer","format":"int32"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Item"}},"startedAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time"}}},"PackToolResult":{"type":"object","properties":{"traceId":{"type":"string","format":"uuid"},"journey":{"$ref":"#/components/schemas/PackJourney"}}},"UpdateAssetDraftRequest":{"type":"object","properties":{"expectedLockVersion":{"type":"integer","format":"int64"},"title":{"type":"string"},"summary":{"type":"string"},"classification":{"type":"string"},"schemaVersion":{"type":"string"},"payload":{"type":"string"}}},"AssetView":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["PROMPT_TEMPLATE","WORK_INSTRUCTION","CAPABILITY_PACK"]},"namespace":{"type":"string"},"slug":{"type":"string"},"knowledgeSpaceId":{"type":"string","format":"uuid"},"portfolioState":{"type":"string","enum":["DRAFT_ONLY","ACTIVE","SUNSETTING","RETIRED"]},"authorizationReady":{"type":"boolean"},"draft":{"$ref":"#/components/schemas/Draft"},"revisions":{"type":"array","items":{"$ref":"#/components/schemas/Revision"}},"reviews":{"type":"array","items":{"$ref":"#/components/schemas/Review"}},"releases":{"type":"array","items":{"$ref":"#/components/schemas/Release"}},"ownershipHealth":{"$ref":"#/components/schemas/OwnershipHealth"},"roleAssignments":{"type":"array","items":{"$ref":"#/components/schemas/RoleAssignment"}}}},"AvailabilityEvent":{"type":"object","properties":{"availability":{"type":"string","enum":["AVAILABLE","DEPRECATED","WITHDRAWN"]},"reason":{"type":"string"},"changedByUserId":{"type":"string","format":"uuid"},"effectiveAt":{"type":"string","format":"date-time"}}},"Decision":{"type":"object","properties":{"reviewerUserId":{"type":"string","format":"uuid"},"decision":{"type":"string","enum":["REQUEST_CHANGES","REJECT","APPROVE","CANCEL"]},"comment":{"type":"string"},"decidedAt":{"type":"string","format":"date-time"}}},"Draft":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"lockVersion":{"type":"integer","format":"int64"},"title":{"type":"string"},"summary":{"type":"string"},"classification":{"type":"string"},"schemaVersion":{"type":"string"},"payload":{"type":"string"},"editedByUserId":{"type":"string","format":"uuid"},"updatedAt":{"type":"string","format":"date-time"}}},"OwnershipHealth":{"type":"object","properties":{"ownerPresent":{"type":"boolean"},"backupOwnerPresent":{"type":"boolean"},"orphaned":{"type":"boolean"},"continuityAtRisk":{"type":"boolean"}}},"Release":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"revisionId":{"type":"string","format":"uuid"},"sequence":{"type":"integer","format":"int64"},"versionLabel":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"classification":{"type":"string"},"schemaVersion":{"type":"string"},"payload":{"type":"string"},"digest":{"type":"string"},"releasedByUserId":{"type":"string","format":"uuid"},"releasedAt":{"type":"string","format":"date-time"},"availability":{"type":"string","enum":["AVAILABLE","DEPRECATED","WITHDRAWN"]},"availabilityHistory":{"type":"array","items":{"$ref":"#/components/schemas/AvailabilityEvent"}}}},"Review":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"revisionId":{"type":"string","format":"uuid"},"revisionDigest":{"type":"string"},"state":{"type":"string","enum":["IN_REVIEW","CHANGES_REQUESTED","REJECTED","CANCELLED","APPROVED"]},"policyVersion":{"type":"string"},"requestedByUserId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"resolvedAt":{"type":"string","format":"date-time"},"decisions":{"type":"array","items":{"$ref":"#/components/schemas/Decision"}}}},"Revision":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sequence":{"type":"integer","format":"int64"},"title":{"type":"string"},"summary":{"type":"string"},"classification":{"type":"string"},"schemaVersion":{"type":"string"},"payload":{"type":"string"},"digest":{"type":"string"},"changeNote":{"type":"string"},"createdByUserId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"}}},"RoleAssignment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"principalType":{"type":"string"},"principalId":{"type":"string"},"role":{"type":"string","enum":["OWNER","BACKUP_OWNER","STEWARD","VIEWER","EDITOR","REVIEWER","PUBLISHER"]},"validFrom":{"type":"string","format":"date-time"},"validUntil":{"type":"string","format":"date-time"},"assignedByUserId":{"type":"string","format":"uuid"},"projectedAt":{"type":"string","format":"date-time"}}},"ConfirmMappingRequest":{"type":"object","properties":{"appUserId":{"type":"string","format":"uuid"}}},"AdminSourceMappingResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"appUserId":{"type":"string","format":"uuid"},"appUserName":{"type":"string"},"appUserEmail":{"type":"string"},"method":{"type":"string","enum":["IDP_JOIN","SSO_EMAIL_JOIN","SELF_CLAIM","ADMIN_CONFIRMED"]},"status":{"type":"string","enum":["ACTIVE","REVOKED"]},"evidence":{"type":"string"},"verifiedAt":{"type":"string","format":"date-time"}}},"AdminSourcePrincipalResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sourceSystem":{"type":"string"},"sourceConnectionKey":{"type":"string"},"externalKey":{"type":"string"},"kind":{"type":"string","enum":["SOURCE_USER","SOURCE_GROUP"]},"observedEmail":{"type":"string"},"observedDisplayName":{"type":"string"},"ssoVerified":{"type":"boolean"},"lastSeenAt":{"type":"string","format":"date-time"},"mapping":{"$ref":"#/components/schemas/AdminSourceMappingResponse"}}},"IdentityTrustRequest":{"type":"object","properties":{"sourceSystem":{"type":"string"},"sourceConnectionKey":{"type":"string"},"identityTrust":{"type":"string","enum":["UNTRUSTED","SSO_VERIFIED"]}}},"AdminSourceConnectionResponse":{"type":"object","properties":{"sourceSystem":{"type":"string"},"sourceConnectionKey":{"type":"string"},"identityTrust":{"type":"string","enum":["UNTRUSTED","SSO_VERIFIED"]},"trustDecidedByUserId":{"type":"string","format":"uuid"},"trustDecidedAt":{"type":"string","format":"date-time"},"userCount":{"type":"integer","format":"int32"},"mappedUserCount":{"type":"integer","format":"int32"},"unmappedUserCount":{"type":"integer","format":"int32"},"groupCount":{"type":"integer","format":"int32"},"lastSeenAt":{"type":"string","format":"date-time"}}},"ConfigureConnectionRequest":{"type":"object","properties":{"crawlEnabled":{"type":"boolean"},"knowledgeSpaceId":{"type":"string","format":"uuid"},"actorUserId":{"type":"string","format":"uuid"},"sourceConfig":{"type":"object","additionalProperties":{}},"contentCrawlIntervalSeconds":{"type":"integer","format":"int64"}}},"AdminConnectionResponse":{"type":"object","properties":{"sourceSystem":{"type":"string"},"sourceConnectionKey":{"type":"string"},"identityTrust":{"type":"string","enum":["UNTRUSTED","SSO_VERIFIED"]},"crawlEnabled":{"type":"boolean"},"knowledgeSpaceId":{"type":"string","format":"uuid"},"actorUserId":{"type":"string","format":"uuid"},"sourceConfig":{"type":"object","additionalProperties":{}},"contentCrawlIntervalSeconds":{"type":"integer","format":"int64"},"credentialSet":{"type":"boolean"},"credentialSetByUserId":{"type":"string","format":"uuid"},"credentialSetAt":{"type":"string","format":"date-time"},"configuredByUserId":{"type":"string","format":"uuid"},"configuredAt":{"type":"string","format":"date-time"}}},"ConnectorCredentialRequest":{"type":"object","properties":{"credential":{"type":"string"}}},"SourceResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"sourceSystem":{"type":"string"},"aclAuthority":{"type":"string"},"status":{"type":"string"},"classification":{"type":"string"},"fileName":{"type":"string"},"mediaType":{"type":"string"},"contentLength":{"type":"integer","format":"int64"},"failureCode":{"type":"string"},"failureMessage":{"type":"string"},"embeddingProfileKey":{"type":"string"},"embeddingProvider":{"type":"string"},"embeddingModel":{"type":"string"},"embeddingDimensions":{"type":"integer","format":"int32"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"SuppressIdentityRequest":{"type":"object","properties":{"idempotencyKey":{"type":"string"},"reason":{"type":"string"},"authorizationGeneration":{"type":"integer","format":"int64"},"kind":{"type":"string","enum":["ENTITY","RELATION"]},"identityId":{"type":"string","format":"uuid"}}},"CuratedEntity":{"allOf":[{"$ref":"#/components/schemas/GraphCurationRecord"},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"namespace":{"$ref":"#/components/schemas/ProjectionNamespace"},"entity":{"$ref":"#/components/schemas/GraphIdentityRef"},"name":{"type":"string"},"type":{"type":"string"},"description":{"type":"string"},"governingEvidence":{"$ref":"#/components/schemas/EvidenceReference"},"provenance":{"$ref":"#/components/schemas/CurationProvenance"}}}]},"CuratedRelation":{"allOf":[{"$ref":"#/components/schemas/GraphCurationRecord"},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"namespace":{"$ref":"#/components/schemas/ProjectionNamespace"},"relation":{"$ref":"#/components/schemas/GraphIdentityRef"},"sourceEntity":{"$ref":"#/components/schemas/GraphIdentityRef"},"targetEntity":{"$ref":"#/components/schemas/GraphIdentityRef"},"type":{"type":"string"},"keywords":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"weight":{"type":"number","format":"double"},"governingEvidence":{"$ref":"#/components/schemas/EvidenceReference"},"provenance":{"$ref":"#/components/schemas/CurationProvenance"}}}]},"CurationProvenance":{"type":"object","properties":{"actorUserId":{"type":"string","format":"uuid"},"authorizationModelId":{"type":"string"},"aclGeneration":{"type":"integer","format":"int64"},"curatedAt":{"type":"string","format":"date-time"},"reason":{"type":"string"}}},"EvidenceReference":{"type":"object","properties":{"organizationId":{"type":"string","format":"uuid"},"knowledgeAssetId":{"type":"string","format":"uuid"},"sourceRevisionId":{"type":"string","format":"uuid"},"chunkId":{"type":"string","format":"uuid"},"aclSnapshotId":{"type":"string","format":"uuid"},"aclGeneration":{"type":"integer","format":"int64"},"chunk":{"type":"boolean"}}},"GraphCurationRecord":{},"GraphIdentityRef":{"type":"object","properties":{"kind":{"type":"string","enum":["ENTITY","RELATION"]},"id":{"type":"string","format":"uuid"}}},"IdentityAlias":{"allOf":[{"$ref":"#/components/schemas/GraphCurationRecord"},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"namespace":{"$ref":"#/components/schemas/ProjectionNamespace"},"source":{"$ref":"#/components/schemas/GraphIdentityRef"},"target":{"$ref":"#/components/schemas/GraphIdentityRef"},"provenance":{"$ref":"#/components/schemas/CurationProvenance"}}}]},"IdentitySuppression":{"allOf":[{"$ref":"#/components/schemas/GraphCurationRecord"},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"namespace":{"$ref":"#/components/schemas/ProjectionNamespace"},"identity":{"$ref":"#/components/schemas/GraphIdentityRef"},"provenance":{"$ref":"#/components/schemas/CurationProvenance"}}}]},"ProjectionNamespace":{"type":"object","properties":{"organizationId":{"type":"string","format":"uuid"},"workspace":{"type":"string"},"collection":{"type":"string"}}},"CurateRelationRequest":{"type":"object","properties":{"idempotencyKey":{"type":"string"},"reason":{"type":"string"},"authorizationGeneration":{"type":"integer","format":"int64"},"relationId":{"type":"string","format":"uuid"},"sourceEntityId":{"type":"string","format":"uuid"},"targetEntityId":{"type":"string","format":"uuid"},"type":{"type":"string"},"keywords":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"weight":{"type":"number","format":"double"},"evidence":{"$ref":"#/components/schemas/EvidenceRequest"}}},"EvidenceRequest":{"type":"object","properties":{"organizationId":{"type":"string","format":"uuid"},"knowledgeAssetId":{"type":"string","format":"uuid"},"sourceRevisionId":{"type":"string","format":"uuid"},"chunkId":{"type":"string","format":"uuid"},"aclSnapshotId":{"type":"string","format":"uuid"},"aclGeneration":{"type":"integer","format":"int64"}}},"CurateEntityRequest":{"type":"object","properties":{"idempotencyKey":{"type":"string"},"reason":{"type":"string"},"authorizationGeneration":{"type":"integer","format":"int64"},"entityId":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"string"},"description":{"type":"string"},"evidence":{"$ref":"#/components/schemas/EvidenceRequest"}}},"AliasIdentityRequest":{"type":"object","properties":{"idempotencyKey":{"type":"string"},"reason":{"type":"string"},"authorizationGeneration":{"type":"integer","format":"int64"},"kind":{"type":"string","enum":["ENTITY","RELATION"]},"sourceIdentityId":{"type":"string","format":"uuid"},"targetIdentityId":{"type":"string","format":"uuid"}}},"GraphIndexJobView":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"knowledgeAssetId":{"type":"string","format":"uuid"},"knowledgeAssetVersionId":{"type":"string","format":"uuid"},"sourceRevisionId":{"type":"string","format":"uuid"},"projectionGeneration":{"type":"integer","format":"int64"},"graphProcessingProfileId":{"type":"string","format":"uuid"},"graphProcessingProfileSha256":{"type":"string"},"status":{"type":"string"},"attempt":{"type":"integer","format":"int32"},"cancellationRequested":{"type":"boolean"},"cancellationRequestedAt":{"type":"string","format":"date-time"},"lastErrorCode":{"type":"string"},"lastErrorMessage":{"type":"string"},"completedAt":{"type":"string","format":"date-time"}}},"KnowledgeSearchRequest":{"type":"object","properties":{"query":{"type":"string"},"requestId":{"type":"string"}}},"KnowledgeCitation":{"type":"object","properties":{"chunkId":{"type":"string","format":"uuid"},"knowledgeAssetId":{"type":"string","format":"uuid"},"sourceRevisionId":{"type":"string","format":"uuid"},"title":{"type":"string"},"startPage":{"type":"integer","format":"int32"},"endPage":{"type":"integer","format":"int32"},"heading":{"type":"string"}}},"KnowledgeResult":{"type":"object","properties":{"traceId":{"type":"string","format":"uuid"},"requestId":{"type":"string"},"citations":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeCitation"}}}},"PromptRunRequest":{"type":"object","properties":{"variables":{"type":"object","additionalProperties":{}},"knowledgeQuery":{"type":"string"},"requestId":{"type":"string"},"confirmedExternalProvider":{"type":"boolean"}}},"AiRoute":{"type":"object","properties":{"gatewayId":{"type":"string"},"modelId":{"type":"string"}}},"PromptCitation":{"type":"object","properties":{"chunkId":{"type":"string","format":"uuid"},"knowledgeAssetId":{"type":"string","format":"uuid"},"sourceRevisionId":{"type":"string","format":"uuid"},"title":{"type":"string"},"startPage":{"type":"integer","format":"int32"},"endPage":{"type":"integer","format":"int32"},"heading":{"type":"string"}}},"PromptRunResult":{"type":"object","properties":{"runId":{"type":"string","format":"uuid"},"assetId":{"type":"string","format":"uuid"},"releaseId":{"type":"string","format":"uuid"},"releaseDigest":{"type":"string"},"modelRoute":{"$ref":"#/components/schemas/AiRoute"},"output":{"type":"string"},"citations":{"type":"array","items":{"$ref":"#/components/schemas/PromptCitation"}},"durationMillis":{"type":"integer","format":"int64"}}},"PromptRunToolResult":{"type":"object","properties":{"traceId":{"type":"string","format":"uuid"},"result":{"$ref":"#/components/schemas/PromptRunResult"}}},"PromptRenderRequest":{"type":"object","properties":{"variables":{"type":"object","additionalProperties":{}}}},"PromptRenderResult":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid"},"releaseId":{"type":"string","format":"uuid"},"releaseDigest":{"type":"string"},"systemInstruction":{"type":"string"},"userPrompt":{"type":"string"},"sensitiveVariables":{"type":"array","items":{"type":"string"}},"inputShapeDigest":{"type":"string"}}},"PromptRenderToolResult":{"type":"object","properties":{"traceId":{"type":"string","format":"uuid"},"result":{"$ref":"#/components/schemas/PromptRenderResult"}}},"ConfirmedActionRequest":{"type":"object","properties":{"confirmed":{"type":"boolean"}}},"ForkRequest":{"type":"object","properties":{"namespace":{"type":"string"},"slug":{"type":"string"},"knowledgeSpaceId":{"type":"string","format":"uuid"},"confirmed":{"type":"boolean"}}},"ForkResult":{"type":"object","properties":{"traceId":{"type":"string","format":"uuid"},"asset":{"$ref":"#/components/schemas/AssetView"}}},"FeedbackRequest":{"type":"object","properties":{"type":{"type":"string","enum":["HELPFUL","OUTDATED","INCORRECT","OTHER"]},"comment":{"type":"string"},"confirmed":{"type":"boolean"}}},"FeedbackResult":{"type":"object","properties":{"traceId":{"type":"string","format":"uuid"},"feedbackId":{"type":"string","format":"uuid"}}},"AssistantChatRequest":{"type":"object","properties":{"message":{"type":"string","maxLength":4000,"minLength":0},"limit":{"type":"integer","format":"int32"},"conversationId":{"type":"string","format":"uuid"}},"required":["message"]},"ServerSentEventString":{},"AssetDraftRequest":{"type":"object","properties":{"title":{"type":"string"},"summary":{"type":"string"},"classification":{"type":"string"},"schemaVersion":{"type":"string"},"payload":{"type":"string"}}},"CreateAssetRequest":{"type":"object","properties":{"type":{"type":"string","enum":["PROMPT_TEMPLATE","WORK_INSTRUCTION","CAPABILITY_PACK"]},"namespace":{"type":"string"},"slug":{"type":"string"},"knowledgeSpaceId":{"type":"string","format":"uuid"},"draft":{"$ref":"#/components/schemas/AssetDraftRequest"}}},"SubmitAssetRevisionRequest":{"type":"object","properties":{"changeNote":{"type":"string"}}},"AssignAssetRoleRequest":{"type":"object","properties":{"principalType":{"type":"string"},"principalId":{"type":"string"},"role":{"type":"string","enum":["OWNER","BACKUP_OWNER","STEWARD","VIEWER","EDITOR","REVIEWER","PUBLISHER"]}}},"AssetReviewDecisionRequest":{"type":"object","properties":{"decision":{"type":"string","enum":["REQUEST_CHANGES","REJECT","APPROVE","CANCEL"]},"comment":{"type":"string"}}},"PublishAssetReleaseRequest":{"type":"object","properties":{"revisionId":{"type":"string","format":"uuid"},"versionLabel":{"type":"string"}}},"Step":{"type":"object","properties":{"key":{"type":"string"},"title":{"type":"string"},"instruction":{"type":"string"},"expectedResult":{"type":"string"},"check":{"type":"string"},"escalation":{"type":"string"},"prohibitedActions":{"type":"array","items":{"type":"string"}},"relatedAssetIds":{"type":"array","items":{"type":"string","format":"uuid"}},"relatedKnowledgeVersionIds":{"type":"array","items":{"type":"string","format":"uuid"}}}},"WorkInstructionSpec":{"type":"object","properties":{"purpose":{"type":"string"},"audience":{"type":"string"},"prerequisites":{"type":"array","items":{"type":"string"}},"completionOutcome":{"type":"string"},"responsibleRole":{"type":"string"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/Step"}}}},"WorkInstructionView":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid"},"releaseId":{"type":"string","format":"uuid"},"releaseDigest":{"type":"string"},"title":{"type":"string"},"versionLabel":{"type":"string"},"instruction":{"$ref":"#/components/schemas/WorkInstructionSpec"},"acknowledged":{"type":"boolean"},"acknowledgedAt":{"type":"string","format":"date-time"}}},"AssetAvailabilityRequest":{"type":"object","properties":{"reason":{"type":"string"}}},"PromptVariablesRequest":{"type":"object","properties":{"variables":{"type":"object","additionalProperties":{}}}},"CaseResult":{"type":"object","properties":{"name":{"type":"string"},"passed":{"type":"boolean"},"failedAssertions":{"type":"array","items":{"type":"string"}},"promptRunId":{"type":"string","format":"uuid"}}},"PromptEvaluationResult":{"type":"object","properties":{"evaluationId":{"type":"string","format":"uuid"},"assetId":{"type":"string","format":"uuid"},"releaseId":{"type":"string","format":"uuid"},"releaseDigest":{"type":"string"},"passedCases":{"type":"integer","format":"int32"},"totalCases":{"type":"integer","format":"int32"},"cases":{"type":"array","items":{"$ref":"#/components/schemas/CaseResult"}}}},"ForkReleaseRequest":{"type":"object","properties":{"namespace":{"type":"string"},"slug":{"type":"string"},"knowledgeSpaceId":{"type":"string","format":"uuid"}}},"PromptComparisonRequest":{"type":"object","properties":{"baselineReleaseId":{"type":"string","format":"uuid"},"candidateReleaseId":{"type":"string","format":"uuid"}}},"PromptEvaluationComparison":{"type":"object","properties":{"baseline":{"$ref":"#/components/schemas/PromptEvaluationResult"},"candidate":{"$ref":"#/components/schemas/PromptEvaluationResult"},"passedCaseDelta":{"type":"integer","format":"int32"}}},"AssignRoleRequest":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"}}},"CreateKnowledgeSpaceRequest":{"type":"object","properties":{"name":{"type":"string"},"departmentId":{"type":"string","format":"uuid"}}},"AdminKnowledgeSpaceResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"name":{"type":"string"},"departmentId":{"type":"string","format":"uuid"},"active":{"type":"boolean"},"grants":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeSpaceGrantResponse"}},"grantsComplete":{"type":"boolean"},"policyVersion":{"type":"string"}}},"KnowledgeSpaceGrantResponse":{"type":"object","properties":{"relation":{"type":"string"},"subject":{"type":"string"}}},"GrantKnowledgeSpaceAccessRequest":{"type":"object","properties":{"relation":{"type":"string"},"kind":{"type":"string","enum":["ORGANIZATION","DEPARTMENT","DEPARTMENT_MANAGERS","ROLE","USER"]},"subjectId":{"type":"string","format":"uuid"},"role":{"type":"string"}}},"CreateInvitationRequest":{"type":"object","properties":{"email":{"type":"string"},"role":{"type":"string","enum":["EMPLOYEE","TEAM_LEAD","MANAGER","DIRECTOR","EXECUTIVE","ADMIN"]},"departmentId":{"type":"string","format":"uuid"}}},"AdminInvitationResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"role":{"type":"string","enum":["EMPLOYEE","TEAM_LEAD","MANAGER","DIRECTOR","EXECUTIVE","ADMIN"]},"departmentId":{"type":"string","format":"uuid"},"status":{"type":"string"},"invitedAt":{"type":"string","format":"date-time"},"acceptedAt":{"type":"string","format":"date-time"},"acceptedAppUserId":{"type":"string","format":"uuid"}}},"AdminConnectorProbeResponse":{"type":"object","properties":{"authenticated":{"type":"boolean"},"connectionKey":{"type":"string"},"accountName":{"type":"string"},"identityName":{"type":"string"},"canReadContent":{"type":"boolean"},"errorCode":{"type":"string"}}},"ExplainAccessRequest":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"permission":{"type":"string"},"resourceType":{"type":"string"},"resourceId":{"type":"string","format":"uuid"}}},"AccessBlockResponse":{"type":"object","properties":{"branch":{"type":"string"},"kind":{"type":"string"},"detail":{"type":"string"}}},"AccessStepResponse":{"type":"object","properties":{"object":{"type":"string"},"relation":{"type":"string"},"kind":{"type":"string"}}},"AclProvenanceResponse":{"type":"object","properties":{"authority":{"type":"string"},"origin":{"type":"string"},"generation":{"type":"integer","format":"int64"},"capturedAt":{"type":"string","format":"date-time"},"expired":{"type":"boolean"}}},"ExplainAccessResponse":{"type":"object","properties":{"state":{"type":"string","enum":["ALLOWED","DENIED","UNKNOWN"]},"reasonCode":{"type":"string"},"path":{"type":"array","items":{"$ref":"#/components/schemas/AccessStepResponse"}},"blockedBy":{"type":"array","items":{"$ref":"#/components/schemas/AccessBlockResponse"}},"provenance":{"$ref":"#/components/schemas/AclProvenanceResponse"},"policyVersion":{"type":"string"},"evaluatedAt":{"type":"string","format":"date-time"}}},"RenameConversationRequest":{"type":"object","properties":{"title":{"type":"string","maxLength":120,"minLength":0}},"required":["title"]},"UpdateAdminUserRequest":{"type":"object","properties":{"role":{"type":"string","enum":["EMPLOYEE","TEAM_LEAD","MANAGER","DIRECTOR","EXECUTIVE","ADMIN"]},"active":{"type":"boolean"}}},"AdminUserResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["EMPLOYEE","TEAM_LEAD","MANAGER","DIRECTOR","EXECUTIVE","ADMIN"]},"departmentId":{"type":"string","format":"uuid"},"active":{"type":"boolean"},"signInLinked":{"type":"boolean"},"mappedPrincipalCount":{"type":"integer","format":"int32"}}},"SessionResponse":{"type":"object","properties":{"authenticated":{"type":"boolean"},"name":{"type":"string"},"email":{"type":"string"},"userId":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"departmentId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["EMPLOYEE","TEAM_LEAD","MANAGER","DIRECTOR","EXECUTIVE","ADMIN"]}}},"CsrfResponse":{"type":"object","properties":{"headerName":{"type":"string"},"parameterName":{"type":"string"},"token":{"type":"string"}}},"DepartmentResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"OrganizationContextResponse":{"type":"object","properties":{"organizationId":{"type":"string","format":"uuid"},"departments":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentResponse"}},"users":{"type":"array","items":{"$ref":"#/components/schemas/UserResponse"}}}},"UserResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"departmentId":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["EMPLOYEE","TEAM_LEAD","MANAGER","DIRECTOR","EXECUTIVE","ADMIN"]}}},"MeResponse":{"type":"object","properties":{"authenticated":{"type":"boolean"},"subject":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"authorizationProvider":{"type":"string"},"userId":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"departmentId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["EMPLOYEE","TEAM_LEAD","MANAGER","DIRECTOR","EXECUTIVE","ADMIN"]}}},"KnowledgeEvidenceResponse":{"type":"object","properties":{"citationId":{"type":"string","format":"uuid"},"knowledgeAssetId":{"type":"string","format":"uuid"},"title":{"type":"string"},"content":{"type":"string"},"sourceUri":{"type":"string"},"startPage":{"type":"integer","format":"int32"},"endPage":{"type":"integer","format":"int32"},"heading":{"type":"string"},"relevanceScore":{"type":"number","format":"double"}}},"KnowledgeSearchResponse":{"type":"object","properties":{"requestId":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeEvidenceResponse"}}}},"KnowledgeCatalogItem":{"type":"object","properties":{"knowledgeAssetId":{"type":"string","format":"uuid"},"knowledgeVersionId":{"type":"string","format":"uuid"},"versionNumber":{"type":"integer","format":"int64"},"knowledgeSpaceId":{"type":"string","format":"uuid"},"title":{"type":"string"},"language":{"type":"string"},"classification":{"type":"string","enum":["PUBLIC","INTERNAL","CONFIDENTIAL","RESTRICTED"]},"contentDigest":{"type":"string"}}},"Entity":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"string"},"description":{"type":"string"},"citationChunkIds":{"type":"array","items":{"type":"string","format":"uuid"}},"governingEvidence":{"$ref":"#/components/schemas/EvidenceReference"}}},"KnowledgeGraphView":{"type":"object","properties":{"knowledgeSpaceId":{"type":"string","format":"uuid"},"authorizationGeneration":{"type":"integer","format":"int64"},"canCurate":{"type":"boolean"},"entities":{"type":"array","items":{"$ref":"#/components/schemas/Entity"}},"relations":{"type":"array","items":{"$ref":"#/components/schemas/Relation"}},"truncated":{"type":"boolean"}}},"Relation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sourceEntityId":{"type":"string","format":"uuid"},"targetEntityId":{"type":"string","format":"uuid"},"type":{"type":"string"},"description":{"type":"string"},"weight":{"type":"number","format":"double"},"keywords":{"type":"array","items":{"type":"string"}},"citationChunkIds":{"type":"array","items":{"type":"string","format":"uuid"}},"governingEvidence":{"$ref":"#/components/schemas/EvidenceReference"}}},"KnowledgeSpaceResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"name":{"type":"string"},"departmentId":{"type":"string","format":"uuid"}}},"StreamingResponseBody":{},"WorkInstructionToolResult":{"type":"object","properties":{"traceId":{"type":"string","format":"uuid"},"instruction":{"$ref":"#/components/schemas/WorkInstructionView"}}},"AssistantReleaseRef":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid"},"releaseId":{"type":"string","format":"uuid"},"releaseDigest":{"type":"string"}}},"PromptFormResult":{"type":"object","properties":{"traceId":{"type":"string","format":"uuid"},"release":{"$ref":"#/components/schemas/AssistantReleaseRef"},"objective":{"type":"string"},"audience":{"type":"string"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variable"}},"outputContract":{"type":"object","additionalProperties":{}},"knowledgeRequirements":{"type":"array","items":{"type":"string"}},"knownLimitations":{"type":"string"}}},"Variable":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["STRING","INTEGER","NUMBER","BOOLEAN","STRING_LIST"]},"required":{"type":"boolean"},"defaultValue":{},"sensitive":{"type":"boolean"},"pattern":{"type":"string"},"allowedValues":{"type":"array","items":{"type":"string"}}}},"AssetRecommendation":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["PROMPT_TEMPLATE","WORK_INSTRUCTION","CAPABILITY_PACK"]},"namespace":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"knowledgeSpaceId":{"type":"string","format":"uuid"},"portfolioState":{"type":"string","enum":["DRAFT_ONLY","ACTIVE","SUNSETTING","RETIRED"]},"releaseId":{"type":"string","format":"uuid"},"versionLabel":{"type":"string"},"releaseDigest":{"type":"string"},"availability":{"type":"string","enum":["AVAILABLE","DEPRECATED","WITHDRAWN"]}}},"RecommendationResult":{"type":"object","properties":{"traceId":{"type":"string","format":"uuid"},"recommendations":{"type":"array","items":{"$ref":"#/components/schemas/AssetRecommendation"}}}},"AssistantConversationSummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"lastActivityAt":{"type":"string","format":"date-time"},"messageCount":{"type":"integer","format":"int64"}}},"AssistantConversationMessageView":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["USER","ASSISTANT"]},"content":{"type":"string"},"sequence":{"type":"integer","format":"int64"},"occurredAt":{"type":"string","format":"date-time"}}},"AssetSummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["PROMPT_TEMPLATE","WORK_INSTRUCTION","CAPABILITY_PACK"]},"namespace":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"knowledgeSpaceId":{"type":"string","format":"uuid"},"portfolioState":{"type":"string","enum":["DRAFT_ONLY","ACTIVE","SUNSETTING","RETIRED"]}}},"AssetDeliveryRelease":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid"},"releaseId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["PROMPT_TEMPLATE","WORK_INSTRUCTION","CAPABILITY_PACK"]},"namespace":{"type":"string"},"slug":{"type":"string"},"versionLabel":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"classification":{"type":"string"},"schemaVersion":{"type":"string"},"payload":{"type":"string"},"digest":{"type":"string"},"availability":{"type":"string","enum":["AVAILABLE","DEPRECATED","WITHDRAWN"]},"releasedAt":{"type":"string","format":"date-time"}}},"AssetRelationResolution":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid"},"releaseId":{"type":"string","format":"uuid"},"accessGap":{"type":"boolean"},"relations":{"type":"array","items":{"$ref":"#/components/schemas/Relation"}}}},"CapabilityPackDefinition":{"type":"object","properties":{"packAssetId":{"type":"string","format":"uuid"},"packReleaseId":{"type":"string","format":"uuid"},"releaseDigest":{"type":"string"},"title":{"type":"string"},"versionLabel":{"type":"string"},"purpose":{"type":"string","enum":["ROLE_ONBOARDING","HANDOVER","ROLE_ENABLEMENT"]},"audience":{"type":"string"},"prerequisites":{"type":"array","items":{"type":"string"}},"expectedOutcome":{"type":"string"},"completionCriteria":{"type":"array","items":{"type":"string"}},"reviewDate":{"type":"string"},"owner":{"type":"string"},"accessGap":{"type":"boolean"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Item"}}}},"EffectivePermissionResponse":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"permissions":{"type":"object","additionalProperties":{"type":"string","enum":["ALLOWED","DENIED","UNKNOWN"]}},"evaluatedAt":{"type":"string","format":"date-time"}}},"AdminSourceGroupMemberResponse":{"type":"object","properties":{"principalId":{"type":"string","format":"uuid"},"externalKey":{"type":"string"},"observedDisplayName":{"type":"string"},"observedEmail":{"type":"string"},"appUserId":{"type":"string","format":"uuid"},"appUserName":{"type":"string"}}},"AdminSourceGroupResponse":{"type":"object","properties":{"principalId":{"type":"string","format":"uuid"},"sourceSystem":{"type":"string"},"sourceConnectionKey":{"type":"string"},"externalKey":{"type":"string"},"observedDisplayName":{"type":"string"},"sourceAclSnapshotId":{"type":"string","format":"uuid"},"aclGeneration":{"type":"integer","format":"int64"},"sealedAt":{"type":"string","format":"date-time"},"members":{"type":"array","items":{"$ref":"#/components/schemas/AdminSourceGroupMemberResponse"}}}},"AdminRoleListResponse":{"type":"object","properties":{"roles":{"type":"array","items":{"$ref":"#/components/schemas/AdminRoleResponse"}},"complete":{"type":"boolean"},"policyVersion":{"type":"string"}}},"AdminRoleResponse":{"type":"object","properties":{"role":{"type":"string"},"assignees":{"type":"array","items":{"type":"string"}}}},"KnowledgeSpaceGrantOptionResponse":{"type":"object","properties":{"relation":{"type":"string"},"kinds":{"type":"array","items":{"type":"string","enum":["ORGANIZATION","DEPARTMENT","DEPARTMENT_MANAGERS","ROLE","USER"]}}}},"AdminConnectorScopeResponse":{"type":"object","properties":{"key":{"type":"string"},"displayName":{"type":"string"},"reachable":{"type":"boolean"},"admissible":{"type":"boolean"},"instruction":{"type":"string"}}},"AdminConnectionActivityResponse":{"type":"object","properties":{"sourceSystem":{"type":"string"},"sourceConnectionKey":{"type":"string"},"objectsTotal":{"type":"integer","format":"int64"},"objectsActive":{"type":"integer","format":"int64"},"objectsArchived":{"type":"integer","format":"int64"},"lastObjectAt":{"type":"string","format":"date-time"},"lastCrawlAt":{"type":"string","format":"date-time"},"recentAttempts":{"type":"array","items":{"$ref":"#/components/schemas/AdminCrawlAttemptResponse"}}}},"AdminCrawlAttemptResponse":{"type":"object","properties":{"outcome":{"type":"string"},"objectsMaterialized":{"type":"integer","format":"int32"},"objectsRotated":{"type":"integer","format":"int32"},"objectsRematerialized":{"type":"integer","format":"int32"},"objectsRetired":{"type":"integer","format":"int32"},"objectsFailed":{"type":"integer","format":"int32"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"attemptedAt":{"type":"string","format":"date-time"}}},"AdminConnectorSourceResponse":{"type":"object","properties":{"sourceSystem":{"type":"string"},"displayName":{"type":"string"}}},"KnowledgeAssetRef":{"type":"object","properties":{"knowledgeAssetId":{"type":"string","format":"uuid"},"knowledgeAssetVersionId":{"type":"string","format":"uuid"},"normalizedRecordId":{"type":"string","format":"uuid"},"rawSourceObjectId":{"type":"string","format":"uuid"},"sourceAclSnapshotId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["PENDING","ACTIVE","RETIRED"]}}}}}} \ No newline at end of file diff --git a/core/src/main/java/com/orgmemory/core/assetregistry/AssetRegistryCoordinator.java b/core/src/main/java/com/orgmemory/core/assetregistry/AssetRegistryCoordinator.java index 6858dea9..c26f4c99 100644 --- a/core/src/main/java/com/orgmemory/core/assetregistry/AssetRegistryCoordinator.java +++ b/core/src/main/java/com/orgmemory/core/assetregistry/AssetRegistryCoordinator.java @@ -598,6 +598,7 @@ private AssetView view(Asset asset) { asset.getId(), asset.getOrganizationId()); List assignments = roles.findByAssetIdOrderByValidFromAsc(asset.getId()); + Instant viewedAt = Instant.now(); return new AssetView( asset.getId(), asset.getType(), @@ -619,9 +620,33 @@ private AssetView view(Asset asset) { assetRevisions.stream().map(AssetRegistryCoordinator::revisionView).toList(), assetReviews.stream().map(this::reviewView).toList(), assetReleases.stream().map(this::releaseView).toList(), + ownershipHealth(assignments, viewedAt), assignments.stream().map(AssetRegistryCoordinator::roleView).toList()); } + private static AssetView.OwnershipHealth ownershipHealth( + List assignments, Instant viewedAt) { + boolean ownerPresent = hasActiveRole( + assignments, AssetRole.OWNER, viewedAt); + boolean backupOwnerPresent = hasActiveRole( + assignments, AssetRole.BACKUP_OWNER, viewedAt); + return new AssetView.OwnershipHealth( + ownerPresent, + backupOwnerPresent, + !ownerPresent && !backupOwnerPresent, + !ownerPresent || !backupOwnerPresent); + } + + private static boolean hasActiveRole( + List assignments, + AssetRole role, + Instant viewedAt) { + return assignments.stream().anyMatch(assignment -> + assignment.getRole() == role + && (assignment.getValidUntil() == null + || assignment.getValidUntil().isAfter(viewedAt))); + } + private AssetView.Review reviewView(AssetReviewCase review) { return new AssetView.Review( review.getId(), diff --git a/core/src/main/java/com/orgmemory/core/assetregistry/AssetView.java b/core/src/main/java/com/orgmemory/core/assetregistry/AssetView.java index 574baa97..e5ae99d9 100644 --- a/core/src/main/java/com/orgmemory/core/assetregistry/AssetView.java +++ b/core/src/main/java/com/orgmemory/core/assetregistry/AssetView.java @@ -16,6 +16,7 @@ public record AssetView( List revisions, List reviews, List releases, + OwnershipHealth ownershipHealth, List roleAssignments) { public AssetView { @@ -112,4 +113,11 @@ public record RoleAssignment( UUID assignedByUserId, Instant projectedAt) { } + + public record OwnershipHealth( + boolean ownerPresent, + boolean backupOwnerPresent, + boolean orphaned, + boolean continuityAtRisk) { + } } diff --git a/demo/fixtures/asset-registry/README.md b/demo/fixtures/asset-registry/README.md new file mode 100644 index 00000000..79fa782f --- /dev/null +++ b/demo/fixtures/asset-registry/README.md @@ -0,0 +1,28 @@ +# L1 Support Asset Registry Golden POC + +This synthetic fixture proves the browser-native, governed reuse path without +customer or employee data. + +Stable coordinates: + +- Knowledge: `support.sla-and-escalation@1` +- Work Instruction: `support.classify-and-respond@1.0.0` +- Prompt Template: `support.triage-customer-ticket@1.0.0` +- Capability Pack: `support.l1-onboarding@1.0.0` +- Evaluation rubric: `support.triage-quality@1` + +Files: + +- `support-sla-and-escalation.md` is the permission-aware grounding source. +- `prompt-template.json` is the released Prompt payload with eight bounded + evaluation cases. +- `work-instruction.json` is the released task procedure. +- `capability-pack-template.json` is resolved with exact release UUIDs by the + golden integration test. +- `quality-checklist.json` is the human verification checklist. +- `mock-tickets.json` fixes expected classification, SLA, escalation, and + citation behavior. +- `success-metrics.json` defines the POC metric formulas and thresholds. + +The fixture intentionally contains no executable Skill, Tool, Agent, public +marketplace metadata, Screenpipe event, or MCP mutation. diff --git a/demo/fixtures/asset-registry/capability-pack-template.json b/demo/fixtures/asset-registry/capability-pack-template.json new file mode 100644 index 00000000..ac35b4e6 --- /dev/null +++ b/demo/fixtures/asset-registry/capability-pack-template.json @@ -0,0 +1,36 @@ +{ + "purpose": "ROLE_ONBOARDING", + "audience": "L1 support agent", + "prerequisites": [ + "Active support account", + "Access to the Support Knowledge Space" + ], + "expectedOutcome": "The agent can classify, ground, draft, verify, and record a correct first ticket", + "items": [ + { + "key": "instruction", + "required": true, + "kind": "REGISTRY_RELEASE", + "assetId": "${WORK_INSTRUCTION_ASSET_ID}", + "releaseId": "${WORK_INSTRUCTION_RELEASE_ID}", + "knowledgeAssetId": null, + "knowledgeVersionId": null + }, + { + "key": "prompt", + "required": true, + "kind": "REGISTRY_RELEASE", + "assetId": "${PROMPT_ASSET_ID}", + "releaseId": "${PROMPT_RELEASE_ID}", + "knowledgeAssetId": null, + "knowledgeVersionId": null + } + ], + "completionCriteria": [ + "Both required released items are complete", + "One mock ticket passes support.triage-quality@1", + "The execution trace pins the Prompt release and grounding citation" + ], + "reviewDate": "2026-12-31", + "owner": "Support operations" +} diff --git a/demo/fixtures/asset-registry/mock-tickets.json b/demo/fixtures/asset-registry/mock-tickets.json new file mode 100644 index 00000000..35f6c954 --- /dev/null +++ b/demo/fixtures/asset-registry/mock-tickets.json @@ -0,0 +1,10 @@ +[ + {"id":"TICKET-001","scenario":"billing question","text":"Why is my monthly invoice higher than last month?","category":"billing","slaTier":"P2","escalate":false,"allowedCitations":["support.sla-and-escalation@1"],"rubricPass":true}, + {"id":"TICKET-002","scenario":"password reset","text":"I cannot sign in and need a password reset.","category":"access","slaTier":"P2","escalate":false,"allowedCitations":["support.sla-and-escalation@1"],"rubricPass":true}, + {"id":"TICKET-003","scenario":"degraded service","text":"Reports take ten minutes to load for every user.","category":"degraded_service","slaTier":"P1","escalate":true,"allowedCitations":["support.sla-and-escalation@1"],"rubricPass":true}, + {"id":"TICKET-004","scenario":"confirmed outage","text":"The production API is unavailable in all regions.","category":"outage","slaTier":"P0","escalate":true,"allowedCitations":["support.sla-and-escalation@1"],"rubricPass":true}, + {"id":"TICKET-005","scenario":"suspected security issue","text":"I saw an unknown login and possible account takeover.","category":"security","slaTier":"P0","escalate":true,"allowedCitations":["support.sla-and-escalation@1"],"rubricPass":true}, + {"id":"TICKET-006","scenario":"data deletion request","text":"Please permanently delete my account data.","category":"privacy","slaTier":"P1","escalate":true,"allowedCitations":["support.sla-and-escalation@1"],"rubricPass":true}, + {"id":"TICKET-007","scenario":"duplicate ticket","text":"This repeats my open ticket number 4312.","category":"duplicate","slaTier":"P2","escalate":false,"allowedCitations":["support.sla-and-escalation@1"],"rubricPass":true}, + {"id":"TICKET-008","scenario":"abusive message","text":"Your service is useless and your staff are idiots.","category":"abuse","slaTier":"P2","escalate":true,"allowedCitations":["support.sla-and-escalation@1"],"rubricPass":true} +] diff --git a/demo/fixtures/asset-registry/prompt-template.json b/demo/fixtures/asset-registry/prompt-template.json new file mode 100644 index 00000000..21cafdc4 --- /dev/null +++ b/demo/fixtures/asset-registry/prompt-template.json @@ -0,0 +1,110 @@ +{ + "objective": "Classify and draft a safe first response for one L1 support ticket", + "audience": "L1 support agent", + "useWhen": [ + "A new synthetic or customer support ticket is ready for first triage" + ], + "doNotUseWhen": [ + "The ticket contains a legal threat requiring counsel", + "The actor cannot access the approved SLA and escalation source" + ], + "textTemplate": "Using only approved support policy, classify this ticket and return the required JSON object. Ticket: {{ticket_text}}", + "messages": [], + "variables": [ + { + "name": "ticket_text", + "type": "STRING", + "required": true, + "defaultValue": null, + "sensitive": true, + "pattern": "^TICKET-[0-9]{3}: .{3,500}$", + "allowedValues": [] + } + ], + "outputContract": { + "type": "object", + "required": [ + "category", + "slaTier", + "escalate", + "response" + ] + }, + "dataPolicy": { + "retainRawVariables": false, + "retainRawOutput": false + }, + "compatibility": [ + "chat" + ], + "knowledgeRequirements": [ + "support.sla-and-escalation@1" + ], + "evaluationCases": [ + { + "name": "billing question", + "variables": { + "ticket_text": "TICKET-001: Why is my monthly invoice higher than last month?" + }, + "expectedContains": ["billing", "P2", "false"], + "forbiddenContains": ["password", "secret"] + }, + { + "name": "password reset", + "variables": { + "ticket_text": "TICKET-002: I cannot sign in and need a password reset." + }, + "expectedContains": ["access", "P2", "false"], + "forbiddenContains": ["send your password", "secret"] + }, + { + "name": "degraded service", + "variables": { + "ticket_text": "TICKET-003: Reports take ten minutes to load for every user." + }, + "expectedContains": ["degraded_service", "P1", "true"], + "forbiddenContains": ["guarantee"] + }, + { + "name": "confirmed outage", + "variables": { + "ticket_text": "TICKET-004: The production API is unavailable in all regions." + }, + "expectedContains": ["outage", "P0", "true"], + "forbiddenContains": ["root cause is"] + }, + { + "name": "suspected security issue", + "variables": { + "ticket_text": "TICKET-005: I saw an unknown login and possible account takeover." + }, + "expectedContains": ["security", "P0", "true"], + "forbiddenContains": ["share your token"] + }, + { + "name": "data deletion request", + "variables": { + "ticket_text": "TICKET-006: Please permanently delete my account data." + }, + "expectedContains": ["privacy", "P1", "true"], + "forbiddenContains": ["already deleted"] + }, + { + "name": "duplicate ticket", + "variables": { + "ticket_text": "TICKET-007: This repeats my open ticket number 4312." + }, + "expectedContains": ["duplicate", "P2", "false"], + "forbiddenContains": ["closed"] + }, + { + "name": "abusive message", + "variables": { + "ticket_text": "TICKET-008: Your service is useless and your staff are idiots." + }, + "expectedContains": ["abuse", "P2", "true"], + "forbiddenContains": ["insult"] + } + ], + "knownLimitations": "The POC produces a first-response draft only. Refunds, deletion, incident declarations, and security remediation require accountable human approval." +} diff --git a/demo/fixtures/asset-registry/quality-checklist.json b/demo/fixtures/asset-registry/quality-checklist.json new file mode 100644 index 00000000..0251fabd --- /dev/null +++ b/demo/fixtures/asset-registry/quality-checklist.json @@ -0,0 +1,12 @@ +{ + "coordinate": "support.triage-quality@1", + "checks": [ + {"key": "classification", "required": true, "description": "Category matches the ticket intent"}, + {"key": "sla", "required": true, "description": "SLA tier matches approved Knowledge"}, + {"key": "escalation", "required": true, "description": "Escalation decision and accountable team are correct"}, + {"key": "grounding", "required": true, "description": "SLA or escalation claims cite support.sla-and-escalation@1"}, + {"key": "tone", "required": true, "description": "Response is calm, factual, and non-retaliatory"}, + {"key": "schema", "required": true, "description": "Output contains category, slaTier, escalate, and response"}, + {"key": "safety", "required": true, "description": "No secret, unsupported promise, or sensitive raw value is retained"} + ] +} diff --git a/demo/fixtures/asset-registry/success-metrics.json b/demo/fixtures/asset-registry/success-metrics.json new file mode 100644 index 00000000..0d5205be --- /dev/null +++ b/demo/fixtures/asset-registry/success-metrics.json @@ -0,0 +1,13 @@ +{ + "definitions": [ + {"key":"time_to_first_correct_task","formula":"correct_task_completed_at - pack_first_viewed_at","pocThreshold":"captured; no benchmark claim"}, + {"key":"first_time_right","formula":"tasks_passing_without_reviewer_correction / attempted_tasks","pocThreshold":"1.0 for the deterministic golden ticket"}, + {"key":"second_user_reuse","formula":"distinct_non_author_users_with_successful_use","pocThreshold":">= 1"}, + {"key":"view_to_use","formula":"distinct_users_with_use / distinct_users_with_view","pocThreshold":"1.0 in the scripted golden flow"}, + {"key":"evaluation_pass","formula":"passed_evaluation_cases / total_evaluation_cases","pocThreshold":"8 / 8"}, + {"key":"reviewer_correction","formula":"revisions_with_changes_requested / submitted_revisions","pocThreshold":"captured; no benchmark claim"}, + {"key":"owner_coverage","formula":"assets_with_active_owner_and_backup / active_assets","pocThreshold":"1.0 after handover"}, + {"key":"unauthorized_metadata_leakage","formula":"denied_responses_containing_private_asset_metadata","pocThreshold":"0"} + ], + "measurementPolicy": "POC values are technical evidence from deterministic fixtures, not customer adoption benchmarks." +} diff --git a/demo/fixtures/asset-registry/support-sla-and-escalation.md b/demo/fixtures/asset-registry/support-sla-and-escalation.md new file mode 100644 index 00000000..6a93b40f --- /dev/null +++ b/demo/fixtures/asset-registry/support-sla-and-escalation.md @@ -0,0 +1,24 @@ +# L1 Support SLA And Escalation + +Coordinate: `support.sla-and-escalation@1` + +## Response tiers + +- P0: confirmed outage or suspected security issue. Acknowledge within 15 + minutes and immediately escalate to incident response or security. +- P1: degraded service or data-deletion request. Acknowledge within 1 hour and + escalate to the service owner or privacy team. +- P2: billing question, password reset, duplicate ticket, or abusive message. + Acknowledge within 4 business hours. Escalate only when the approved Work + Instruction says so. + +## Safety rules + +- Never request or repeat a password, token, secret, payment-card number, or + unnecessary personal data. +- Never promise a refund, deletion, restoration time, or incident cause before + the accountable team confirms it. +- Cite this source as `support.sla-and-escalation@1` when an SLA or escalation + decision is included. +- Use a calm, factual response for abusive messages and preserve the ticket for + moderator review. diff --git a/demo/fixtures/asset-registry/work-instruction.json b/demo/fixtures/asset-registry/work-instruction.json new file mode 100644 index 00000000..76296c4c --- /dev/null +++ b/demo/fixtures/asset-registry/work-instruction.json @@ -0,0 +1,56 @@ +{ + "purpose": "Classify and respond to one L1 support ticket", + "audience": "L1 support agent", + "prerequisites": [ + "The ticket is assigned to the current agent", + "The agent can access support.sla-and-escalation@1" + ], + "completionOutcome": "The ticket has an approved category, SLA tier, escalation decision, grounded response draft, and audit trace", + "responsibleRole": "L1 support agent", + "steps": [ + { + "key": "inspect", + "title": "Inspect the ticket", + "instruction": "Read only the minimum content needed and identify security, privacy, outage, and abuse signals.", + "expectedResult": "A bounded problem statement without copied secrets", + "check": "No password, token, payment-card number, or unnecessary personal data is copied", + "escalation": "Stop and notify security when credentials or active compromise are present", + "prohibitedActions": ["Request a password", "Paste a token into the Prompt"], + "relatedAssetIds": [], + "relatedKnowledgeVersionIds": [] + }, + { + "key": "ground", + "title": "Check SLA and escalation policy", + "instruction": "Use support.sla-and-escalation@1 to determine the response tier and accountable team.", + "expectedResult": "A P0, P1, or P2 decision with one allowed citation", + "check": "The selected tier and escalation match the approved Knowledge release", + "escalation": "Ask the support operations lead when the policy does not cover the case", + "prohibitedActions": ["Invent an SLA", "Promise an unconfirmed outcome"], + "relatedAssetIds": [], + "relatedKnowledgeVersionIds": [] + }, + { + "key": "draft", + "title": "Render and run the approved Prompt", + "instruction": "Use the exact support.triage-customer-ticket release pinned by the Pack.", + "expectedResult": "A JSON result matching the approved output contract", + "check": "Category, SLA tier, escalation, and response are present", + "escalation": "Do not send output that fails the rubric", + "prohibitedActions": ["Use a draft Prompt", "Silently switch to a newer release"], + "relatedAssetIds": [], + "relatedKnowledgeVersionIds": [] + }, + { + "key": "verify", + "title": "Verify and acknowledge", + "instruction": "Apply support.triage-quality@1, correct any failure, record the final decision, and acknowledge this instruction.", + "expectedResult": "The ticket passes the rubric and the Pack item is complete", + "check": "All required checklist items pass", + "escalation": "Route failed or ambiguous cases to the support operations lead", + "prohibitedActions": ["Hide an evaluation failure", "Mark an inaccessible item complete"], + "relatedAssetIds": [], + "relatedKnowledgeVersionIds": [] + } + ] +} diff --git a/docs/increments/active/README.md b/docs/increments/active/README.md index b1e7a5c5..4c2dc85a 100644 --- a/docs/increments/active/README.md +++ b/docs/increments/active/README.md @@ -15,9 +15,3 @@ progress here. Consolidate current behavior before moving an increment to permission evaluation dataset. 3. Prove the Slack connector against a real workspace, including member removal and the next-crawl access revocation. -4. Validate and execute the - [prompt-first unified Asset Registry program](2026-07-25-unified-asset-registry-definition/plan.md): - pass the architecture/design-partner gate, then land the registry kernel, - authorization, Prompt Template, Work Instruction, Capability Pack, - federated Knowledge, Assistant, generic web, and authenticated read-only MCP - PRs before proving the L1 Support role-onboarding outcome. diff --git a/docs/increments/active/2026-07-25-unified-asset-registry-definition/design.md b/docs/increments/completed/2026-07-25-unified-asset-registry-definition/design.md similarity index 98% rename from docs/increments/active/2026-07-25-unified-asset-registry-definition/design.md rename to docs/increments/completed/2026-07-25-unified-asset-registry-definition/design.md index 22ca526c..d7b350d3 100644 --- a/docs/increments/active/2026-07-25-unified-asset-registry-definition/design.md +++ b/docs/increments/completed/2026-07-25-unified-asset-registry-definition/design.md @@ -545,9 +545,11 @@ Rejected alternatives: - expose every application action as an MCP tool; - implement a generic BPM or Agent runtime. -The named independent debate did not occur. Stakeholder validation with a -support/operations process owner and an AI power user also remains open and is -required before PR 5 can claim the POC is complete. +The named independent debate did not occur. The repository POC closes through +the product-owner accepted deterministic integration and two-session browser +proof in PR 5. No external support-operations stakeholder or customer adoption +validation is claimed; that evidence belongs to a pilot follow-on rather than +being implied by automated acceptance. ## POC Success Gate diff --git a/docs/increments/active/2026-07-25-unified-asset-registry-definition/gate-decisions.md b/docs/increments/completed/2026-07-25-unified-asset-registry-definition/gate-decisions.md similarity index 88% rename from docs/increments/active/2026-07-25-unified-asset-registry-definition/gate-decisions.md rename to docs/increments/completed/2026-07-25-unified-asset-registry-definition/gate-decisions.md index 0a707992..bb53dbe3 100644 --- a/docs/increments/active/2026-07-25-unified-asset-registry-definition/gate-decisions.md +++ b/docs/increments/completed/2026-07-25-unified-asset-registry-definition/gate-decisions.md @@ -17,11 +17,11 @@ The fixture is synthetic and contains no customer or employee data. | Capability Pack | `support.l1-onboarding@1.0.0` | Ordered required Knowledge, Work Instruction, and Prompt pins | | Evaluation rubric | `support.triage-quality@1` | Classification, SLA, escalation, grounding, tone, and schema checks | -PR 5 will materialize eight deterministic mock tickets: billing question, -password reset, degraded service, confirmed outage, suspected security issue, +PR 5 materializes eight deterministic mock tickets: billing question, password +reset, degraded service, confirmed outage, suspected security issue, data-deletion request, duplicate ticket, and abusive message. Expected labels, SLA tier, escalation decision, allowed citations, and rubric result are pinned -in the fixture. Until then this table is the frozen semantic contract. +under `demo/fixtures/asset-registry`. Two actors prove the flow: @@ -110,3 +110,13 @@ token exchange/on-behalf-of; the gateway must not reinterpret the API token as an MCP token. Object authorization remains OpenFGA-backed and cannot be replaced by OAuth scopes. PR 4 is read-only: no prompt execution, progress mutation, review, publication, withdrawal, permission change, or installation. + +## POC Closure Decision + +Technical closure requires the deterministic integration flow, separate-owner +and second-user browser sessions, opaque denial coverage, full repository +gates, OpenFGA model verification, generated-contract parity, and a terminating +context load. Metrics produced by this fixture are technical acceptance +evidence, not customer adoption benchmarks. Screenpipe, public marketplace, +Skill installation, controlled SOP, executable Workflow/Agent/Tool profiles, +and public MCP mutation remain separate follow-on increments. diff --git a/docs/increments/active/2026-07-25-unified-asset-registry-definition/plan.md b/docs/increments/completed/2026-07-25-unified-asset-registry-definition/plan.md similarity index 89% rename from docs/increments/active/2026-07-25-unified-asset-registry-definition/plan.md rename to docs/increments/completed/2026-07-25-unified-asset-registry-definition/plan.md index bf2d802b..58300971 100644 --- a/docs/increments/active/2026-07-25-unified-asset-registry-definition/plan.md +++ b/docs/increments/completed/2026-07-25-unified-asset-registry-definition/plan.md @@ -40,9 +40,10 @@ invariants, and their integration tests merely to reduce the file count. - [x] Record the product-owner waiver of the independent Claude Fable 5 debate on 2026-07-25. This is an explicit exception, not a claim that the review ran. -- [ ] Validate the L1 Support onboarding story with one support/operations - process owner and one AI power user. Engineering implementation is authorized - to proceed, but PR 5 cannot claim POC completion until this validation occurs. +- [x] Validate the L1 Support onboarding story through the product-owner + accepted deterministic technical POC: distinct author/reviewer/second-user + integration actors plus separate owner/support-agent browser sessions. + External field validation is not claimed and belongs to the pilot follow-on. - [x] Freeze a small demo-safe fixture: authorized Knowledge, one Work Instruction, one Prompt Template, one Pack, five to ten mock tickets, and one evaluation rubric in `gate-decisions.md`. @@ -50,9 +51,10 @@ invariants, and their integration tests merely to reduce the file count. matrix, retention defaults, and OAuth protected-resource/audience decision in `gate-decisions.md`. -The product owner explicitly authorized PR 1 to start with the named-review -waiver and stakeholder validation still open. That validation remains a hard -completion gate for PR 5. +The product owner explicitly authorized PR 1 with the named-review waiver and +later directed the five-PR sequence through technical completion. PR 5 closes +the repository POC with deterministic acceptance evidence; customer adoption +or external support-operations validation remains a separate pilot outcome. ## PR Dependency Graph @@ -259,7 +261,7 @@ Required gates: - [x] Tool descriptions do not grant authority. - [x] Retrieved Asset content cannot override system/policy instructions. -- [ ] Two-user tests cover recommendation, Pack, Prompt, Knowledge, and +- [x] Two-user tests cover recommendation, Pack, Prompt, Knowledge, and citations. - [x] Every applicable trace contains exact releases without raw secrets. - [x] Assistant has no hidden governance tool path. @@ -267,7 +269,8 @@ Required gates: - [x] Generic detail renders every POC profile without Prompt-specific routing. - [x] Role/permission switch partitions permission-filtered Asset caches by organization, actor, department, and session role. -- [ ] Real-browser author -> review -> release -> second-user Pack journey. +- [x] Real-browser author -> review -> release -> second-user Pack journey + (closed by the PR 5 golden POC). Explicitly excluded: @@ -338,31 +341,33 @@ Expected size: 20-50 files. Scope: -- [ ] Add demo-safe L1 Support Knowledge, Work Instruction, Prompt, checklist, +- [x] Add demo-safe L1 Support Knowledge, Work Instruction, Prompt, checklist, mock tickets, rubric, and Pack fixtures. -- [ ] Prove author -> review -> release -> second-user discovery -> Prompt run +- [x] Prove author -> review -> release -> second-user discovery -> Prompt run -> Work Instruction/Pack completion. -- [ ] Prove one Prompt replacement without silent Pack mutation. -- [ ] Prove withdrawal blocks new use and remains auditable. -- [ ] Prove owner/backup-owner handover and flag orphaned Assets. -- [ ] Capture time-to-first-correct-task, first-time-right, second-user reuse, +- [x] Prove one Prompt replacement without silent Pack mutation. +- [x] Prove withdrawal blocks new use and remains auditable. +- [x] Prove owner/backup-owner handover and flag orphaned Assets. +- [x] Capture time-to-first-correct-task, first-time-right, second-user reuse, view-to-use, evaluation pass, reviewer correction, and owner coverage. -- [ ] Run static, domain, integration, OpenFGA, frontend, browser, MCP, and +- [x] Run static, domain, integration, OpenFGA, frontend, browser, MCP, and two-user security gates. -- [ ] Consolidate implemented facts into architecture/spec/test/decision docs. -- [ ] Move this increment to `completed` only when every required POC gate has +- [x] Consolidate implemented facts into architecture/spec/test/decision docs. +- [x] Move this increment to `completed` only when every required POC gate has evidence. Required gates: -- [ ] `.\gradlew.bat --no-daemon clean test` -- [ ] OpenFGA model validate and model test -- [ ] generated OpenAPI drift check -- [ ] `corepack pnpm -C web typecheck` -- [ ] `corepack pnpm -C web build` -- [ ] real-browser two-user POC -- [ ] generic denied-resource behavior across REST, Assistant, and MCP -- [ ] terminating context-load test +- [x] `.\gradlew.bat --no-daemon clean test` +- [x] OpenFGA model validate and model test +- [x] generated OpenAPI drift check +- [x] `corepack pnpm -C web typecheck` +- [x] `corepack pnpm -C web build` +- [x] real-browser two-user POC +- [x] generic denied-resource behavior across REST, Assistant, and MCP +- [x] terminating context-load test + +Verification evidence is consolidated in [verification.md](verification.md). ## Follow-On Increments, Not Hidden PRs diff --git a/docs/increments/active/2026-07-25-unified-asset-registry-definition/ui-reference-audit.md b/docs/increments/completed/2026-07-25-unified-asset-registry-definition/ui-reference-audit.md similarity index 100% rename from docs/increments/active/2026-07-25-unified-asset-registry-definition/ui-reference-audit.md rename to docs/increments/completed/2026-07-25-unified-asset-registry-definition/ui-reference-audit.md diff --git a/docs/increments/completed/2026-07-25-unified-asset-registry-definition/verification.md b/docs/increments/completed/2026-07-25-unified-asset-registry-definition/verification.md new file mode 100644 index 00000000..bca541d1 --- /dev/null +++ b/docs/increments/completed/2026-07-25-unified-asset-registry-definition/verification.md @@ -0,0 +1,79 @@ +# Asset Registry POC Verification + +Date: 2026-07-26 + +## Golden business flow + +`AssetRegistryIntegrationTests#goldenPocTransfersAReleasedSupportCapabilityToASecondUser` +uses the synthetic files under `demo/fixtures/asset-registry` and proves: + +1. an operations lead authors Prompt, Work Instruction, and Capability Pack + drafts; +2. an independent reviewer approves each immutable digest; +3. exact releases are published and a distinct support agent discovers the + role Pack without receiving an Asset ID; +4. all eight bounded Prompt cases pass with permission-aware Knowledge + grounding; +5. the second user completes one grounded Prompt run, acknowledges the Work + Instruction, and completes the exact-pin Pack; +6. Prompt `2.0.0` does not rewrite the Pack's `1.0.0` pin; +7. withdrawal blocks new use of the old Prompt and leaves an append-only audit + event; +8. active owner/backup assignments produce complete ownership health, while a + missing assignment produces a visible continuity-risk flag. + +`asset-registry-golden-poc.spec.ts` repeats the user-facing proof in separate +real Chromium sessions: the owner sees approved review/release history; the +support agent sees only the permitted Pack, follows the exact release, sees +owner and backup coverage, and reaches 100% progress. + +## Deterministic POC metrics + +These values are technical acceptance evidence, not customer benchmarks. + +| Metric | POC evidence | +| --- | --- | +| Time to first correct task | start/completion timestamps and Prompt duration are captured; no adoption benchmark claimed | +| First-time-right | 1/1 scripted golden task | +| Second-user reuse | one distinct non-author support agent | +| View-to-use | 1/1 in the scripted browser flow | +| Evaluation pass | 8/8 bounded ticket cases | +| Reviewer correction | 0/4 golden submissions required a correction; the workflow still supports request-changes | +| Owner coverage | 3/3 active golden registry Assets have an owner and backup after handover | +| Unauthorized metadata leakage | zero; REST, Assistant, Pack, and MCP denial tests remain opaque | + +## Gate evidence + +- `.\gradlew.bat --no-daemon clean test` — passed, 97 actionable tasks. +- OpenFGA CLI `v0.7.19`: + - `fga model validate` — `is_valid: true`; + - `fga model test` — 8/8 tests, 66/66 checks, 27/27 ListObjects. +- `corepack pnpm -C web check:api` — generated client matches committed + OpenAPI. +- `corepack pnpm -C web typecheck` — passed. +- `corepack pnpm -C web build` — passed; only the existing chunk-size warning + remains. +- `corepack pnpm -C web test:e2e` — 7/7 Chromium tests passed. +- `OrgMemoryApiContextLoadTests` and `OrgMemoryMcpContextTests` — passed and + terminated cleanly. +- Generic denial evidence: + - REST/cross-tenant: + `AssetRegistryIntegrationTests#unauthorizedAndCrossTenantIdsAreOpaqueWhileListIntersectsCanonicalRows`; + - Pack/Assistant: + `CapabilityPackServiceTests` and `AssistantAssetToolServiceTests`; + - MCP: + `AssetDeliveryApiClientTests`, `McpTokenValidationTests`, and + `AssetDeliveryControllerSecurityTests`. + +JetBrains inspection cannot target this feature worktree while the IDE project +is `D:\OrgMemory`. Full backend compile/clean tests plus web lint/typecheck, +generated-contract drift, diff hygiene, and browser gates are the static +fallback. + +## Scope statement + +The repository POC is technically complete. It does not claim customer +adoption or external support-operations stakeholder validation. Screenpipe, +public marketplace, controlled SOP, Skill installation, public MCP mutation, +and executable Workflow/Agent/Tool profiles remain separate follow-on +increments. diff --git a/docs/increments/completed/README.md b/docs/increments/completed/README.md index 57a452dd..eaaa2386 100644 --- a/docs/increments/completed/README.md +++ b/docs/increments/completed/README.md @@ -2,3 +2,8 @@ Completed increments are historical evidence. Current behavior belongs in `ARCHITECTURE.md`, specs, tests, and accepted decisions. + +- [Prompt-first unified Asset Registry POC](2026-07-25-unified-asset-registry-definition/plan.md): + generic governed registry, Prompt/Work Instruction/Pack profiles, federated + Knowledge, Assistant and four web surfaces, authenticated read-only MCP, and + the deterministic two-user L1 Support golden proof. diff --git a/docs/roadmap.md b/docs/roadmap.md index f607951f..d4f16bc4 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -53,6 +53,12 @@ belongs in one active increment. citations, the permission-aware graph explorer, evaluation harness, and OpenTelemetry-compatible events. Final integration PR #42 is on `main`; remaining live quality/performance evidence belongs to pilot hardening. +- The five-PR + [prompt-first unified Asset Registry POC](increments/completed/2026-07-25-unified-asset-registry-definition/plan.md): + governed generic identity/revision/review/release lifecycle; Prompt Template, + Work Instruction, exact-pin Capability Pack, federated Knowledge; in-app + Assistant and four generic web surfaces; authenticated read-only MCP; and a + deterministic two-user L1 Support golden flow with 8/8 bounded evaluations. ## Active Delivery @@ -87,17 +93,6 @@ belongs in one active increment. 5. Give a Knowledge Space a lifecycle. It can be created and granted at runtime but not retired, and asset movement still needs an explicit retention and authorization contract. -6. Execute the - [prompt-first unified Asset Registry program](increments/active/2026-07-25-unified-asset-registry-definition/plan.md): - pass the independent architecture debate and design-partner gate, then land - the registry kernel, Asset authorization, Prompt Template, Work Instruction, - Capability Pack, federated Knowledge, Assistant, generic web, and authenticated - read-only MCP PRs in dependency order. -7. Prove the first typed Asset outcome: an L1 Support onboarding Pack lets a - second authorized user complete one realistic task with exact released - Knowledge, Work Instruction, and Prompt components; then prove update, - withdrawal, owner handover, audit, and denied-component opacity. - ## Pilot Hardening - S3-compatible production blobs, malware/DLP integration, retention/deletion. diff --git a/docs/specs/domains/asset-registry.md b/docs/specs/domains/asset-registry.md index 13cfcedf..67420a3f 100644 --- a/docs/specs/domains/asset-registry.md +++ b/docs/specs/domains/asset-registry.md @@ -12,6 +12,11 @@ Consumers always address an exact authorized release. A withdrawn release cannot start new consumption. Forking creates a new Asset draft from an exact release payload and does not copy reviews or approvals. +Every Asset view derives ownership health from active role assignments: +`ownerPresent`, `backupOwnerPresent`, `orphaned`, and `continuityAtRisk`. +Missing ownership coverage is visible in the shared release header; it never +changes release bytes or grants authorization. + ### Prompt Template A Prompt Template release contains exactly one text template or ordered @@ -114,6 +119,15 @@ MCP audience, and rate-limits each authenticated subject. The POC forwards a dual-audience bearer that also contains the API audience. Deployments that cannot issue that token require explicit token exchange/on-behalf-of. +### Golden POC Fixture + +`demo/fixtures/asset-registry` is the synthetic, deterministic L1 Support +fixture. It fixes one Knowledge source, one Work Instruction, one Prompt +Template with eight bounded ticket cases, one exact-pin onboarding Pack, one +quality checklist, and metric definitions. The integration proof uses a +distinct author, reviewer, and second user; the real-browser proof uses +separate owner and support-agent sessions. + ## Source Modules - `core.assetregistry` diff --git a/docs/tests/domains/asset-registry.md b/docs/tests/domains/asset-registry.md index 057e7778..70ee3235 100644 --- a/docs/tests/domains/asset-registry.md +++ b/docs/tests/domains/asset-registry.md @@ -29,3 +29,8 @@ | MCP rejects wrong audience, issuer, and expired tokens | `McpTokenValidationTests` | covered | | MCP advertises RFC 9728 metadata and challenges unauthenticated requests with its location | `OrgMemoryMcpContextTests` | covered | | MCP applies a per-subject request limit without logging or returning tokens | `McpRateLimitFilterTests` | covered | +| Golden L1 Support fixture passes eight bounded Prompt cases with permission-aware grounding | `AssetRegistryIntegrationTests#goldenPocTransfersAReleasedSupportCapabilityToASecondUser`, `demo/fixtures/asset-registry` | covered | +| Second-user discovery, exact-release Prompt use, Work Instruction acknowledgement, Pack completion, replacement pin stability, and withdrawal are one integrated flow | `AssetRegistryIntegrationTests#goldenPocTransfersAReleasedSupportCapabilityToASecondUser` | covered | +| Active owner/backup coverage derives an explicit orphaned and continuity-risk flag | `AssetRegistryIntegrationTests#goldenPocTransfersAReleasedSupportCapabilityToASecondUser`, `AssetIdentityHeader` | covered | +| Owner governance and second-user Pack completion render in separate real browser sessions | `asset-registry-golden-poc.spec.ts` | covered | +| Generic denial stays opaque across REST, Assistant, and MCP | `AssetRegistryIntegrationTests#unauthorizedAndCrossTenantIdsAreOpaqueWhileListIntersectsCanonicalRows`, `AssetDeliveryApiClientTests`, `CapabilityPackServiceTests` | covered | diff --git a/docs/vision.md b/docs/vision.md index fc0ba9a9..6fe3de5e 100644 --- a/docs/vision.md +++ b/docs/vision.md @@ -187,16 +187,15 @@ bypass authorization. ## Web Direction -The current registry UI is disposable prototype evidence. The replacement is an -agent-first workspace centered on one Asset Registry with four generic -surfaces: **For you / Asset catalog**, **Asset detail / use**, **Pack journey**, -and **Governance workspace**. Asset type profiles supply their renderer and -actions; the product must not hard-code a Prompt-only page hierarchy. Search, -ask, citations, release history, provenance, permissions, source health, and -later Skill installation reuse that shell. A Skill Registry is a filtered -installable view of the shared catalog, not another lifecycle. Reuse shadcn/ui -and maintained libraries, keep light and dark themes, and avoid porting old -page composition merely for parity. +The POC implements an agent-first workspace centered on one Asset Registry with +four generic surfaces: **For you / Asset catalog**, **Asset detail / use**, +**Pack journey**, and **Governance workspace**. Asset type profiles supply +their renderer and actions; the product does not hard-code a Prompt-only page +hierarchy. Search, ask, citations, release history, provenance, permissions, +source health, and later Skill installation reuse that shell. A Skill Registry +is a filtered installable view of the shared catalog, not another lifecycle. +Production UX may evolve from this evidence, while retaining the same +permission and exact-release contracts. ## Non-Goals For The First Pilot diff --git a/web/src/features/assets/components/asset-detail-page.tsx b/web/src/features/assets/components/asset-detail-page.tsx index 0da2b092..f5801dd5 100644 --- a/web/src/features/assets/components/asset-detail-page.tsx +++ b/web/src/features/assets/components/asset-detail-page.tsx @@ -191,6 +191,15 @@ function AssetIdentityHeader({
{meta.label} {asset.portfolioState} + {asset.ownershipHealth?.orphaned ? ( + + Orphaned + + ) : asset.ownershipHealth?.continuityAtRisk ? ( + + Ownership gap + + ) : null} {release?.availability === "DEPRECATED" ? ( Deprecated diff --git a/web/test/e2e/asset-registry-golden-poc.spec.ts b/web/test/e2e/asset-registry-golden-poc.spec.ts new file mode 100644 index 00000000..33551df2 --- /dev/null +++ b/web/test/e2e/asset-registry-golden-poc.spec.ts @@ -0,0 +1,345 @@ +import { expect, test, type Page, type Route } from "@playwright/test" + +const PACK_ID = "a1000000-0000-0000-0000-000000000001" +const PACK_RELEASE_ID = "a1000000-0000-0000-0000-000000000002" +const PACK_REVISION_ID = "a1000000-0000-0000-0000-000000000003" +const REVIEW_ID = "a1000000-0000-0000-0000-000000000004" +const OWNER_ID = "44444444-4444-4444-4444-444444444444" +const REVIEWER_ID = "55555555-5555-5555-5555-555555555555" +const SUPPORT_AGENT_ID = "66666666-6666-6666-6666-666666666666" +const BACKUP_OWNER_ID = "77777777-7777-7777-7777-777777777777" +const ORGANIZATION_ID = "11111111-1111-1111-1111-111111111111" +const DEPARTMENT_ID = "33333333-3333-3333-3333-333333333333" +const INSTRUCTION_ID = "a2000000-0000-0000-0000-000000000001" +const INSTRUCTION_RELEASE_ID = "a2000000-0000-0000-0000-000000000002" +const PROMPT_ID = "a3000000-0000-0000-0000-000000000001" +const PROMPT_RELEASE_ID = "a3000000-0000-0000-0000-000000000002" + +test("two users prove governed release and second-user Pack completion", async ({ + browser, + baseURL, +}) => { + const ownerContext = await browser.newContext({ baseURL }) + const ownerPage = await ownerContext.newPage() + const ownerHarness = await assetHarness(ownerPage, "owner") + + await ownerPage.goto(`/assets/${PACK_ID}/governance`) + await expect(ownerPage.getByRole("heading", { name: "Governance workspace" })).toBeVisible() + await ownerPage.getByRole("tab", { name: "Review" }).click() + await expect(ownerPage.getByText("APPROVED", { exact: true })).toBeVisible() + await expect(ownerPage.getByText("Approved by independent reviewer")).toBeVisible() + await ownerPage.getByRole("tab", { name: "Releases" }).click() + await expect(ownerPage.getByText("1.0.0", { exact: true })).toBeVisible() + await expect(ownerPage.getByText("AVAILABLE", { exact: true })).toBeVisible() + expect(ownerHarness.unexpectedRequests).toEqual([]) + expect(ownerHarness.browserErrors).toEqual([]) + await ownerContext.close() + + const supportContext = await browser.newContext({ baseURL }) + const supportPage = await supportContext.newPage() + const supportHarness = await assetHarness(supportPage, "support") + + await supportPage.goto("/assets") + await expect(supportPage.getByRole("heading", { name: "For your role" })).toBeVisible() + await expect( + supportPage.getByRole("heading", { name: "L1 Customer Support Capability Onboarding" }), + ).toBeVisible() + await expect(supportPage.getByText("Restricted Security Prompt")).toHaveCount(0) + await supportPage.getByRole("link", { name: "Use exact release" }).click() + await expect(supportPage.getByText(`Owner: ${SUPPORT_AGENT_ID}`)).toBeVisible() + await expect(supportPage.getByText(`Backup: ${BACKUP_OWNER_ID}`)).toBeVisible() + await expect(supportPage.getByText("Ownership gap")).toHaveCount(0) + await supportPage.getByRole("link", { name: "Start or resume journey" }).click() + + await expect(supportPage.getByRole("heading", { name: "L1 Customer Support Capability Onboarding" })).toBeVisible() + await expect(supportPage.getByText("0%")).toBeVisible() + await supportPage.getByRole("button", { name: "Mark complete: Classify and respond" }).click() + await expect(supportPage.getByText("50%")).toBeVisible() + await supportPage.getByRole("button", { name: "Mark complete: Triage customer ticket" }).click() + await expect(supportPage.getByText("100%")).toBeVisible() + await expect(supportPage.getByText("COMPLETED", { exact: true })).toBeVisible() + + expect(supportHarness.unexpectedRequests).toEqual([]) + expect(supportHarness.browserErrors).toEqual([]) + expect(supportHarness.requests).toContain("GET /api/assistant/tools/asset-recommendations") + expect( + supportHarness.requests.filter((request) => request.startsWith("PUT /api/assets/")), + ).toHaveLength(2) + await supportContext.close() +}) + +async function assetHarness(page: Page, actor: "owner" | "support") { + const requests: string[] = [] + const unexpectedRequests: string[] = [] + const browserErrors: string[] = [] + const completed = new Set() + + page.on("pageerror", (error) => browserErrors.push(error.message)) + page.on("console", (message) => { + if (message.type() === "error") browserErrors.push(message.text()) + }) + + await page.route("**/api/**", async (route) => { + const request = route.request() + const url = new URL(request.url()) + const signature = `${request.method()} ${url.pathname}` + requests.push(signature) + + if (url.pathname === "/api/session") { + await json(route, session(actor)) + return + } + if (url.pathname === "/api/session/csrf") { + await route.fulfill({ + status: 200, + contentType: "application/json", + headers: { "set-cookie": "XSRF-TOKEN=golden-poc-token; Path=/" }, + body: JSON.stringify({ + headerName: "X-XSRF-TOKEN", + parameterName: "_csrf", + token: "golden-poc-token", + }), + }) + return + } + if ( + actor === "support" && + url.pathname === "/api/assistant/tools/asset-recommendations" + ) { + await json(route, { + traceId: "a4000000-0000-0000-0000-000000000001", + recommendations: [ + { + assetId: PACK_ID, + type: "CAPABILITY_PACK", + namespace: "support", + slug: "l1-onboarding", + title: "L1 Customer Support Capability Onboarding", + summary: "Complete the first correct L1 support ticket", + knowledgeSpaceId: "88888888-8888-4888-8888-888888888802", + portfolioState: "ACTIVE", + releaseId: PACK_RELEASE_ID, + versionLabel: "1.0.0", + releaseDigest: "a".repeat(64), + availability: "AVAILABLE", + }, + ], + }) + return + } + if (url.pathname === `/api/assets/${PACK_ID}`) { + await json(route, packAsset()) + return + } + if ( + actor === "support" && + url.pathname === + `/api/assets/${PACK_ID}/releases/${PACK_RELEASE_ID}/pack-journey` + ) { + await json(route, packJourney(completed)) + return + } + if ( + actor === "support" && + request.method() === "PUT" && + url.pathname.startsWith( + `/api/assets/${PACK_ID}/releases/${PACK_RELEASE_ID}/pack-progress/`, + ) + ) { + completed.add(url.pathname.split("/").at(-1)!) + await json(route, packJourney(completed)) + return + } + + unexpectedRequests.push(signature) + await json(route, { message: "Unexpected golden POC request" }, 500) + }) + + return { requests, unexpectedRequests, browserErrors } +} + +function session(actor: "owner" | "support") { + return { + authenticated: true, + name: actor === "owner" ? "Operations Lead" : "Support Agent", + email: actor === "owner" ? "lead@example.test" : "agent@example.test", + userId: actor === "owner" ? OWNER_ID : SUPPORT_AGENT_ID, + organizationId: ORGANIZATION_ID, + departmentId: DEPARTMENT_ID, + role: actor === "owner" ? "MANAGER" : "EMPLOYEE", + } +} + +function packAsset() { + const payload = JSON.stringify({ + purpose: "ROLE_ONBOARDING", + audience: "L1 support agent", + prerequisites: ["Active support account"], + expectedOutcome: "Complete the first correct L1 support ticket", + items: [ + { key: "instruction", required: true, kind: "REGISTRY_RELEASE" }, + { key: "prompt", required: true, kind: "REGISTRY_RELEASE" }, + ], + completionCriteria: ["Required items complete"], + }) + const timestamp = "2026-07-26T00:00:00Z" + return { + id: PACK_ID, + type: "CAPABILITY_PACK", + namespace: "support", + slug: "l1-onboarding", + knowledgeSpaceId: "88888888-8888-4888-8888-888888888802", + portfolioState: "ACTIVE", + authorizationReady: true, + draft: { + id: "a1000000-0000-0000-0000-000000000005", + lockVersion: 1, + title: "L1 Customer Support Capability Onboarding", + summary: "Complete the first correct L1 support ticket", + classification: "INTERNAL", + schemaVersion: "1", + payload, + editedByUserId: OWNER_ID, + updatedAt: timestamp, + }, + revisions: [ + { + id: PACK_REVISION_ID, + sequence: 1, + title: "L1 Customer Support Capability Onboarding", + summary: "Complete the first correct L1 support ticket", + classification: "INTERNAL", + schemaVersion: "1", + payload, + digest: "a".repeat(64), + changeNote: "Initial L1 onboarding release", + createdByUserId: OWNER_ID, + createdAt: timestamp, + }, + ], + reviews: [ + { + id: REVIEW_ID, + revisionId: PACK_REVISION_ID, + revisionDigest: "a".repeat(64), + state: "APPROVED", + policyVersion: "asset-review-v1", + requestedByUserId: OWNER_ID, + createdAt: timestamp, + resolvedAt: timestamp, + decisions: [ + { + reviewerUserId: REVIEWER_ID, + decision: "APPROVE", + comment: "Approved by independent reviewer", + decidedAt: timestamp, + }, + ], + }, + ], + releases: [ + { + id: PACK_RELEASE_ID, + revisionId: PACK_REVISION_ID, + sequence: 1, + versionLabel: "1.0.0", + title: "L1 Customer Support Capability Onboarding", + summary: "Complete the first correct L1 support ticket", + classification: "INTERNAL", + schemaVersion: "1", + payload, + digest: "a".repeat(64), + releasedByUserId: OWNER_ID, + releasedAt: timestamp, + availability: "AVAILABLE", + availabilityHistory: [ + { + availability: "AVAILABLE", + reason: "Initial release", + changedByUserId: OWNER_ID, + effectiveAt: timestamp, + }, + ], + }, + ], + ownershipHealth: { + ownerPresent: true, + backupOwnerPresent: true, + orphaned: false, + continuityAtRisk: false, + }, + roleAssignments: [ + roleAssignment(SUPPORT_AGENT_ID, "OWNER"), + roleAssignment(BACKUP_OWNER_ID, "BACKUP_OWNER"), + ], + } +} + +function roleAssignment(principalId: string, role: "OWNER" | "BACKUP_OWNER") { + return { + id: role === "OWNER" + ? "a5000000-0000-0000-0000-000000000001" + : "a5000000-0000-0000-0000-000000000002", + principalType: "user", + principalId, + role, + validFrom: "2026-07-26T00:00:00Z", + assignedByUserId: OWNER_ID, + projectedAt: "2026-07-26T00:00:01Z", + } +} + +function packJourney(completed: Set) { + const items = [ + { + key: "instruction", + required: true, + order: 1, + kind: "REGISTRY_RELEASE", + resourceId: INSTRUCTION_ID, + pinnedVersionId: INSTRUCTION_RELEASE_ID, + title: "Classify and respond", + versionLabel: "1.0.0", + availability: "AVAILABLE", + completed: completed.has("instruction"), + }, + { + key: "prompt", + required: true, + order: 2, + kind: "REGISTRY_RELEASE", + resourceId: PROMPT_ID, + pinnedVersionId: PROMPT_RELEASE_ID, + title: "Triage customer ticket", + versionLabel: "1.0.0", + availability: "AVAILABLE", + completed: completed.has("prompt"), + }, + ] + return { + assignmentId: "a6000000-0000-0000-0000-000000000001", + packAssetId: PACK_ID, + packReleaseId: PACK_RELEASE_ID, + releaseDigest: "a".repeat(64), + title: "L1 Customer Support Capability Onboarding", + versionLabel: "1.0.0", + purpose: "ROLE_ONBOARDING", + audience: "L1 support agent", + expectedOutcome: "Complete the first correct L1 support ticket", + status: completed.size === items.length ? "COMPLETED" : "IN_PROGRESS", + accessGap: false, + completedAccessibleItems: completed.size, + items, + startedAt: "2026-07-26T00:00:00Z", + completedAt: + completed.size === items.length ? "2026-07-26T00:05:00Z" : undefined, + } +} + +async function json(route: Route, body: unknown, status = 200) { + await route.fulfill({ + status, + contentType: "application/json", + body: JSON.stringify(body), + }) +}