@abgov/adsp-sdk-mcp-server 1.39.5 → 1.39.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"openapi":"3.0.0","info":{"title":"Export service","version":"0.0.0","description":"Export service provides exports of resources to files using jobs."},"paths":{"/export/v1/jobs":{"post":{"tags":["Export"],"description":"Queue a new, asynchronous job to export an API resource to a file. The response is the queued job; poll `GET /export/v1/jobs/{jobId}`, or subscribe to the `export-updates` push service stream, for the result.\n\nRequires the exporter role, or one of the exporter roles configured for the resource's service or API in the `sources` of the export service configuration. The role is checked in the tenant of the request; core users with the role must set `tenantId`. The job is created in that tenant and the export file is uploaded to it.\n","parameters":[{"$ref":"#/components/parameters/ExportTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CsvExportRequest"},{"$ref":"#/components/schemas/JsonExportRequest"}],"discriminator":{"propertyName":"format","mapping":{"csv":"#/components/schemas/CsvExportRequest","json":"#/components/schemas/JsonExportRequest"}}},"examples":{"csv":{"summary":"Export forms to CSV","value":{"resourceId":"urn:ads:platform:form-service:v1:/forms","format":"csv","filename":"Forms-2026-10-01","fileType":"form-export","params":{"includeData":true,"criteria":"{\"definitionIdEquals\":\"income-support-application\"}"},"resultsPath":"results","formatOptions":{"columns":["id","status",{"key":"data.firstName","header":"First name"}]}}},"json":{"summary":"Export tasks to JSON","value":{"resourceId":"urn:ads:platform:task-service:v1:/queues/benefits/intake/tasks","format":"json","filename":"Tasks-2026-10-01","formatOptions":{"pretty":true,"fields":["id","name","status"]}}}}}}},"responses":{"200":{"description":"Job successfully created and queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"},"example":{"urn":"urn:ads:platform:export-service:v1:/jobs/a66ccc16-28fc-44fb-a499-d12df0262b8b","id":"a66ccc16-28fc-44fb-a499-d12df0262b8b","status":"queued","result":null}}}},"400":{"description":"Request is invalid. For example, `format` is not csv or json, `resourceId` is not an ADSP URN, or the `fileType` does not exist in the tenant.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportError"},"examples":{"validation":{"summary":"Body parameter failed validation","value":{"errorMessage":"Validation failed with error(s): format (body) - Invalid value"}},"fileType":{"summary":"File type does not exist","value":{"errorMessage":"Specified target file type 'task-export-file' cannot be found."}}}}}},"401":{"$ref":"#/components/responses/ExportUnauthorized"},"403":{"$ref":"#/components/responses/ExportForbidden"}}}},"/export/v1/jobs/{jobId}":{"get":{"tags":["Export"],"description":"Retrieve the status of an export job and, once it is completed, the export file. Jobs are kept for 24 hours after they are created or last updated.\n\nJobs of another tenant respond 404. In the job's tenant, the user who created it can retrieve it, and other users require the exporter role in the tenant of their token. Core users can retrieve only the jobs they created.\n","operationId":"getJob","parameters":[{"name":"jobId","description":"ID of job to retrieve.","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"a66ccc16-28fc-44fb-a499-d12df0262b8b"}],"responses":{"200":{"description":"Job successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"$ref":"#/components/responses/ExportBadRequest"},"401":{"$ref":"#/components/responses/ExportUnauthorized"},"403":{"description":"The user did not create the job and does not have the exporter role.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportError"},"example":{"errorMessage":"User Test User (ID: 3f1b2c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d) not permitted to get export job."}}}},"404":{"$ref":"#/components/responses/ExportNotFound"}}}}},"components":{"securitySchemes":{"accessToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"parameters":{"ExportTenantId":{"name":"tenantId","description":"ID of the tenant to act on. Required for core (platform) users and service accounts; tenant users and service accounts always act on the tenant of their token and this parameter is ignored.\n","in":"query","required":false,"schema":{"type":"string"},"example":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7"}},"responses":{"ExportBadRequest":{"description":"Request is invalid, for example a path or body parameter failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportError"},"example":{"errorMessage":"Validation failed with error(s): format (body) - Invalid value"}}}},"ExportForbidden":{"description":"The user does not have a role permitted to perform the operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportError"},"example":{"errorMessage":"User Test User (ID: 3f1b2c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d) not permitted to create export job."}}}},"ExportNotFound":{"description":"The export job does not exist, has expired, or belongs to another tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportError"},"example":{"errorMessage":"export job with ID 'a66ccc16-28fc-44fb-a499-d12df0262b8b' could not be found."}}}},"ExportUnauthorized":{"description":"Request does not include a valid bearer token.","content":{"text/plain":{"schema":{"type":"string"},"example":"Unauthorized"}}}},"schemas":{"CsvExportRequest":{"allOf":[{"$ref":"#/components/schemas/ExportRequest"},{"type":"object","properties":{"formatOptions":{"description":"CSV Export format options. Records are flattened, so nested properties are referenced with dot notation (for example `data.firstName`). If columns are not set, the columns are taken from the first record.\n","type":"object","properties":{"columns":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"object","properties":{"key":{"type":"string"},"header":{"type":"string"}},"required":["key"]}]},"example":["id","name",{"key":"data.firstName","header":"First name"}]}}}}}]},"ExportError":{"type":"object","properties":{"errorMessage":{"type":"string"}}},"ExportRequest":{"type":"object","properties":{"resourceId":{"type":"string","description":"URN of the API resource to export, for example a collection endpoint of another ADSP service. The export service resolves the URN to a URL using the directory service, and reads it with its own service account (the export-job role).\n","example":"urn:ads:platform:task-service:v1:/tasks"},"params":{"type":"object","description":"Query parameters for the API request of results to export. The export service also sets `tenantId`, `top` (200) and `after` to read each page.\n","example":{"criteria":"{\"statusEquals\":\"Pending\"}"}},"resultsPath":{"type":"string","minLength":1,"maxLength":150,"default":"results","description":"Path (lodash path syntax) to the array of results in the API response. If the path doesn't resolve to an array, an array response is exported as is, and any other response is exported as a single record.\n","example":"results"},"fileType":{"type":"string","nullable":true,"minLength":1,"maxLength":50,"default":"export-file","description":"ID of the [file service](https://api.adsp.alberta.ca/platform/?urls.primaryName=File%20service) file type to which the export file is uploaded. The file type must exist in the tenant. Defaults to the export service `export-file` type, which can be read by users with the exporter role.\n","example":"task-export-file"},"format":{"description":"Export format for the data.","type":"string","enum":["csv","json"],"example":"csv"},"filename":{"description":"Name of the export file. Any file extension is replaced with the extension of the format.\n","type":"string","nullable":true,"minLength":1,"maxLength":100,"default":"exported","example":"Exports-2022-02-19"}},"required":["resourceId","format"]},"Job":{"type":"object","properties":{"id":{"description":"Id of the Job spawned to export. Required when polling to get the status of the Job.","type":"string","format":"uuid","readOnly":true,"example":"a66ccc16-28fc-44fb-a499-d12df0262b8b"},"status":{"type":"string","enum":["queued","completed","failed"],"readOnly":true,"description":"Indicates the status of the export Job."},"urn":{"type":"string","readOnly":true,"description":"Logical URN to use for querying the job status. You can map the URN to a URL using the [ADSP Service SDK's](https://github.com/GovAlta/adsp-monorepo/blob/main/libs/adsp-service-sdk/src/directory/serviceDirectory.ts) getResourceUrl(AdspId\\`urn\\`)","example":"urn:ads:platform:export-service:v1:/jobs/a66ccc16-28fc-44fb-a499-d12df0262b8b"},"result":{"type":"object","nullable":true,"readOnly":true,"description":"The export file. Null until the job is completed.","properties":{"urn":{"type":"string","description":"Logical URN to use for downloading the export file. You can map the URN to a URL using the [ADSP Service SDK's](https://github.com/GovAlta/adsp-monorepo/blob/main/libs/adsp-service-sdk/src/directory/serviceDirectory.ts) getResourceUrl(AdspId\\`urn\\`)","example":"urn:ads:platform:file-service:v1:/files/51091c0d-15ce-4e93-81ab-1c6e546c667c"},"id":{"description":"A `fileId` to be used with the [File Service](https://api.adsp.alberta.ca/platform/?urls.primaryName=File%20service) for downloading the export file.","type":"string","example":"51091c0d-15ce-4e93-81ab-1c6e546c667c"},"filename":{"type":"string","description":"The name of the export file.","example":"Exports-2022-02-19.csv"}}}},"example":{"urn":"urn:ads:platform:export-service:v1:/jobs/a66ccc16-28fc-44fb-a499-d12df0262b8b","id":"a66ccc16-28fc-44fb-a499-d12df0262b8b","status":"completed","result":{"urn":"urn:ads:platform:file-service:v1:/files/51091c0d-15ce-4e93-81ab-1c6e546c667c","id":"51091c0d-15ce-4e93-81ab-1c6e546c667c","filename":"Exports-2022-02-19.csv"}}},"JsonExportRequest":{"allOf":[{"$ref":"#/components/schemas/ExportRequest"},{"type":"object","properties":{"formatOptions":{"description":"JSON Export format options.","type":"object","properties":{"pretty":{"description":"Flag indicating if the output json should be formatted to be easier to read.","type":"boolean"},"fields":{"description":"Properties (lodash path syntax) of each record to include. All properties are included if not set.","type":"array","items":{"type":"string"},"example":["id","name","data.firstName"]}}}}}]}}},"security":[{"accessToken":[]}],"tags":[{"name":"Export","description":"APIs for managing export jobs."}]}
1
+ {"openapi":"3.0.0","info":{"title":"Export service","version":"0.0.0","description":"Export service provides exports of resources to files using jobs."},"paths":{"/export/v1/jobs":{"post":{"tags":["Export"],"description":"Queue a new, asynchronous job to export an API resource to a file. The response is the queued job; poll `GET /export/v1/jobs/{jobId}`, or subscribe to the `export-updates` push service stream, for the result.\n\nRequires the exporter role, or one of the exporter roles configured for the resource's service or API in the `sources` of the export service configuration. The role is checked in the tenant of the request; core users with the role must set `tenantId`. The job is created in that tenant and the export file is uploaded to it.\n","parameters":[{"$ref":"#/components/parameters/ExportTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CsvExportRequest"},{"$ref":"#/components/schemas/JsonExportRequest"}],"discriminator":{"propertyName":"format","mapping":{"csv":"#/components/schemas/CsvExportRequest","json":"#/components/schemas/JsonExportRequest"}}},"examples":{"csv":{"summary":"Export forms to CSV","value":{"resourceId":"urn:ads:platform:form-service:v1:/forms","format":"csv","filename":"Forms-2026-10-01","fileType":"form-export","params":{"includeData":true,"criteria":"{\"definitionIdEquals\":\"income-support-application\"}"},"resultsPath":"results","formatOptions":{"columns":["id","status",{"key":"data.firstName","header":"First name"}]}}},"json":{"summary":"Export tasks to JSON","value":{"resourceId":"urn:ads:platform:task-service:v1:/queues/benefits/intake/tasks","format":"json","filename":"Tasks-2026-10-01","formatOptions":{"pretty":true,"fields":["id","name","status"]}}}}}}},"responses":{"200":{"description":"Job successfully created and queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"},"example":{"urn":"urn:ads:platform:export-service:v1:/jobs/a66ccc16-28fc-44fb-a499-d12df0262b8b","id":"a66ccc16-28fc-44fb-a499-d12df0262b8b","status":"queued","result":null}}}},"400":{"description":"Request is invalid. For example, `format` is not csv or json, `resourceId` is not an ADSP URN for an API resource, or the `fileType` does not exist in the tenant.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportError"},"examples":{"validation":{"summary":"Body parameter failed validation","value":{"errorMessage":"Validation failed with error(s): format (body) - Invalid value"}},"resourceId":{"summary":"resourceId is not an API resource URN","value":{"errorMessage":"Value of resourceId must be a valid ADSP URN for an API resource."}},"fileType":{"summary":"File type does not exist","value":{"errorMessage":"Specified target file type 'task-export-file' cannot be found."}}}}}},"401":{"$ref":"#/components/responses/ExportUnauthorized"},"403":{"$ref":"#/components/responses/ExportForbidden"}}}},"/export/v1/jobs/{jobId}":{"get":{"tags":["Export"],"description":"Retrieve the status of an export job and, once it is completed, the export file. Jobs are kept for 24 hours after they are created or last updated.\n\nJobs of another tenant respond 404. In the job's tenant, the user who created it can retrieve it, and other users require the exporter role in the tenant of their token. Core users can retrieve only the jobs they created.\n","operationId":"getJob","parameters":[{"name":"jobId","description":"ID of job to retrieve.","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"a66ccc16-28fc-44fb-a499-d12df0262b8b"}],"responses":{"200":{"description":"Job successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"$ref":"#/components/responses/ExportBadRequest"},"401":{"$ref":"#/components/responses/ExportUnauthorized"},"403":{"description":"The user did not create the job and does not have the exporter role.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportError"},"example":{"errorMessage":"User Test User (ID: 3f1b2c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d) not permitted to get export job."}}}},"404":{"$ref":"#/components/responses/ExportNotFound"}}}}},"components":{"securitySchemes":{"accessToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"parameters":{"ExportTenantId":{"name":"tenantId","description":"ID of the tenant to act on. Required for core (platform) users and service accounts; tenant users and service accounts always act on the tenant of their token and this parameter is ignored.\n","in":"query","required":false,"schema":{"type":"string"},"example":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7"}},"responses":{"ExportBadRequest":{"description":"Request is invalid, for example a path or body parameter failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportError"},"example":{"errorMessage":"Validation failed with error(s): format (body) - Invalid value"}}}},"ExportForbidden":{"description":"The user does not have a role permitted to perform the operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportError"},"example":{"errorMessage":"User Test User (ID: 3f1b2c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d) not permitted to create export job."}}}},"ExportNotFound":{"description":"The export job does not exist, has expired, or belongs to another tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportError"},"example":{"errorMessage":"export job with ID 'a66ccc16-28fc-44fb-a499-d12df0262b8b' could not be found."}}}},"ExportUnauthorized":{"description":"Request does not include a valid bearer token.","content":{"text/plain":{"schema":{"type":"string"},"example":"Unauthorized"}}}},"schemas":{"CsvExportRequest":{"allOf":[{"$ref":"#/components/schemas/ExportRequest"},{"type":"object","properties":{"formatOptions":{"description":"CSV Export format options. Records are flattened, so nested properties are referenced with dot notation (for example `data.firstName`). If columns are not set, the columns are taken from the first record.\n","type":"object","properties":{"columns":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"object","properties":{"key":{"type":"string"},"header":{"type":"string"}},"required":["key"]}]},"example":["id","name",{"key":"data.firstName","header":"First name"}]}}}}}]},"ExportError":{"type":"object","properties":{"errorMessage":{"type":"string"}}},"ExportRequest":{"type":"object","properties":{"resourceId":{"type":"string","description":"URN of the API resource to export, for example a collection endpoint of another ADSP service. The export service resolves the URN to a URL using the directory service, and reads it with its own service account (the export-job role).\n","example":"urn:ads:platform:task-service:v1:/tasks"},"params":{"type":"object","description":"Query parameters for the API request of results to export. The export service also sets `tenantId`, `top` (200) and `after` to read each page.\n","example":{"criteria":"{\"statusEquals\":\"Pending\"}"}},"resultsPath":{"type":"string","minLength":1,"maxLength":150,"default":"results","description":"Path (lodash path syntax) to the array of results in the API response. If the path doesn't resolve to an array, an array response is exported as is, and any other response is exported as a single record.\n","example":"results"},"fileType":{"type":"string","nullable":true,"minLength":1,"maxLength":50,"default":"export-file","description":"ID of the [file service](https://api.adsp.alberta.ca/platform/?urls.primaryName=File%20service) file type to which the export file is uploaded. The file type must exist in the tenant. Defaults to the export service `export-file` type, which can be read by users with the exporter role.\n","example":"task-export-file"},"format":{"description":"Export format for the data.","type":"string","enum":["csv","json"],"example":"csv"},"filename":{"description":"Name of the export file. Any file extension is replaced with the extension of the format.\n","type":"string","nullable":true,"minLength":1,"maxLength":100,"default":"exported","example":"Exports-2022-02-19"}},"required":["resourceId","format"]},"Job":{"type":"object","properties":{"id":{"description":"Id of the Job spawned to export. Required when polling to get the status of the Job.","type":"string","format":"uuid","readOnly":true,"example":"a66ccc16-28fc-44fb-a499-d12df0262b8b"},"status":{"type":"string","enum":["queued","completed","failed"],"readOnly":true,"description":"Indicates the status of the export Job."},"urn":{"type":"string","readOnly":true,"description":"Logical URN to use for querying the job status. You can map the URN to a URL using the [ADSP Service SDK's](https://github.com/GovAlta/adsp-monorepo/blob/main/libs/adsp-service-sdk/src/directory/serviceDirectory.ts) getResourceUrl(AdspId\\`urn\\`)","example":"urn:ads:platform:export-service:v1:/jobs/a66ccc16-28fc-44fb-a499-d12df0262b8b"},"result":{"type":"object","nullable":true,"readOnly":true,"description":"The export file. Null until the job is completed.","properties":{"urn":{"type":"string","description":"Logical URN to use for downloading the export file. You can map the URN to a URL using the [ADSP Service SDK's](https://github.com/GovAlta/adsp-monorepo/blob/main/libs/adsp-service-sdk/src/directory/serviceDirectory.ts) getResourceUrl(AdspId\\`urn\\`)","example":"urn:ads:platform:file-service:v1:/files/51091c0d-15ce-4e93-81ab-1c6e546c667c"},"id":{"description":"A `fileId` to be used with the [File Service](https://api.adsp.alberta.ca/platform/?urls.primaryName=File%20service) for downloading the export file.","type":"string","example":"51091c0d-15ce-4e93-81ab-1c6e546c667c"},"filename":{"type":"string","description":"The name of the export file.","example":"Exports-2022-02-19.csv"}}}},"example":{"urn":"urn:ads:platform:export-service:v1:/jobs/a66ccc16-28fc-44fb-a499-d12df0262b8b","id":"a66ccc16-28fc-44fb-a499-d12df0262b8b","status":"completed","result":{"urn":"urn:ads:platform:file-service:v1:/files/51091c0d-15ce-4e93-81ab-1c6e546c667c","id":"51091c0d-15ce-4e93-81ab-1c6e546c667c","filename":"Exports-2022-02-19.csv"}}},"JsonExportRequest":{"allOf":[{"$ref":"#/components/schemas/ExportRequest"},{"type":"object","properties":{"formatOptions":{"description":"JSON Export format options.","type":"object","properties":{"pretty":{"description":"Flag indicating if the output json should be formatted to be easier to read.","type":"boolean"},"fields":{"description":"Properties (lodash path syntax) of each record to include. All properties are included if not set.","type":"array","items":{"type":"string"},"example":["id","name","data.firstName"]}}}}}]}}},"security":[{"accessToken":[]}],"tags":[{"name":"Export","description":"APIs for managing export jobs."}]}
@@ -1 +1 @@
1
- {"openapi":"3.0.0","info":{"title":"Project planner service","version":"0.0.0","description":"The Project Planner Service helps people who are new to ADSP describe a business problem and\nturn it into a plan for using ADSP services.\n\nThe planner builds a structured _business model_ of the problem (actors, goals, workflows, rules, constraints,\nassumptions, unknowns, etc.), matches it against known GoA _business patterns_, and derives one or more\n_solution hypotheses_ that recommend ADSP services. Each recommended service has a _specialist_ that can be consulted\nfor service-specific questions and dependencies, and links to its service workspace.\n\nA _solution_ is the persistent, structured state of this work: decisions made (and why), open questions,\nspecialist progress, and recommended next steps. It survives across sessions so the user does not need\nto repeat information already gathered.\n\nAny recommendation made by the planner is a hypothesis for the user to refine.\n"},"paths":{"/planner/v1/analysis/options":{"get":{"tags":["Solution"],"summary":"Retrieves the available analysis modes.","description":"Retrieves the analysis modes available, the default mode, and the configured model name. Requires the planner-user or planner-admin role in the tenant of the token.\n","responses":{"200":{"description":"Analysis options retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisOptions"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"}}}},"/planner/v1/documents/extract":{"post":{"tags":["Solution"],"summary":"Extracts a problem statement from a document.","description":"Extracts the text of an uploaded document, to use as a problem statement. Supports Markdown (.md, .markdown), Word (.docx, and .doc HTML exports such as Confluence \"Export to Word\") and PDF (.pdf) files up to 20 MB. The file isn't stored. Requires the planner-user or planner-admin role in the tenant of the token. Responds 400 if no file is uploaded, the format isn't supported, or no text can be read from the file.\n","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"The document, in the `file` field. Must be no larger than 20 MB."}},"required":["file"]}}}},"responses":{"200":{"description":"Text extracted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractedText"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"}}}},"/planner/v1/patterns":{"get":{"tags":["Pattern"],"summary":"Retrieves business patterns.","description":"Retrieves the effective business pattern catalogue of the tenant: built-in patterns, overridden by patterns in the tenant's configuration, overridden by patterns stored through this API. Requires the planner-user or planner-admin role in the tenant of the token.\n","responses":{"200":{"description":"Patterns retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatternList"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"}}},"post":{"tags":["Pattern"],"summary":"Creates a custom pattern.","description":"Creates a custom business pattern in the tenant of the token. Requires the planner-admin role. The `id` is optional and defaults to a slug of the name; responds 400 if a pattern with the ID already exists.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{1,59}$"}}},{"$ref":"#/components/schemas/BusinessPatternInput"}]},"example":{"id":"grant-application","name":"Grant application","description":"Applicants apply for funding, staff assess eligibility and award grants.","domainLanguage":["grant","applicant","funding","award"],"strongSignals":[{"description":"Applicants apply for funding","keywords":["grant","funding"]}],"serviceMappings":[{"service":"form-service","reason":"Collects the application."}],"clarifyingQuestions":["Who assesses the applications?"]}}}},"responses":{"201":{"description":"Pattern created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessPattern"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"}}}},"/planner/v1/patterns/match":{"post":{"tags":["Pattern"],"summary":"Matches free text against patterns.","description":"Matches free text against the tenant's effective pattern catalogue and explains the confidence of each match. Requires the planner-user or planner-admin role in the tenant of the token.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":20000}},"required":["text"]},"example":{"text":"Caseworkers manage cases from intake to decision."}}}},"responses":{"200":{"description":"Ranked pattern matches, with clarifying questions when confidence is low.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatternMatchResult"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"}}}},"/planner/v1/patterns/{patternId}":{"parameters":[{"$ref":"#/components/parameters/PlannerPatternId"}],"get":{"tags":["Pattern"],"summary":"Retrieves a business pattern.","description":"Retrieves a pattern from the tenant's effective pattern catalogue. Requires the planner-user or planner-admin role in the tenant of the token.\n","responses":{"200":{"description":"Pattern retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessPattern"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}},"put":{"tags":["Pattern"],"summary":"Updates a pattern.","description":"Updates a pattern of the tenant of the token. Updating a built-in or configured pattern stores a tenant copy that overrides it. Requires the planner-admin role. The `patternId` must match `^[a-z0-9][a-z0-9-]{1,59}$`.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessPatternInput"},"example":{"name":"Case management","domainLanguage":["case","caseworker","intake","appeal"],"strongSignals":[{"description":"Staff work cases through a lifecycle","keywords":["case","caseworker"]}],"serviceMappings":[{"service":"form-service","reason":"Collects intake information."}]}}}},"responses":{"200":{"description":"Pattern updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessPattern"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}},"delete":{"tags":["Pattern"],"summary":"Deletes a pattern stored through the API.","description":"Deletes a custom pattern of the tenant of the token, or restores a customized built-in pattern to its built-in version. Built-in and configured patterns themselves can't be deleted and respond 400. Requires the planner-admin role.\n","responses":{"204":{"description":"Pattern deleted."},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/solutions":{"get":{"tags":["Solution"],"summary":"Retrieves solutions.","description":"Retrieves solutions of the tenant of the token, most recently updated first. Requires the planner-user or planner-admin role. Users with planner-user see the solutions they created; planner-admin sees all solutions in the tenant.\n","parameters":[{"name":"top","in":"query","description":"Number of results to return.","schema":{"type":"integer","minimum":1,"maximum":100,"default":10}},{"name":"after","in":"query","description":"Cursor of the page to read, from `page.next` of the previous response.","schema":{"type":"string"},"example":"MTA="},{"name":"status","in":"query","description":"Only include solutions with this status.","schema":{"type":"string","enum":["draft","analyzed","in-progress","completed","archived"]}}],"responses":{"200":{"description":"Solutions retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolutionList"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"}}},"post":{"tags":["Solution"],"summary":"Creates a solution.","description":"Creates a draft solution in the tenant of the token, owned by the calling user. Requires the planner-user or planner-admin role. Sends a `solution-created` event.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","nullable":true},"scenario":{"type":"string","enum":["new","prototype","existing-app","reconfigure"],"default":"new"},"problemStatement":{"type":"string"}},"required":["name"]},"example":{"name":"Small business grant","description":"Online applications for the small business grant.","scenario":"new","problemStatement":"Applicants apply for a small business grant. Staff review each application and decide."}}}},"responses":{"201":{"description":"Solution created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Solution"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"}}}},"/planner/v1/solutions/{id}":{"parameters":[{"$ref":"#/components/parameters/PlannerSolutionId"}],"get":{"tags":["Solution"],"summary":"Retrieves a solution.","description":"Retrieves a solution, including its structured state. Requires the planner-user or planner-admin role in the tenant of the token. Only the user who created the solution, or a planner-admin, can retrieve it; other users receive 403. Solutions of other tenants respond 404.\n","responses":{"200":{"description":"Solution retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Solution"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}},"patch":{"tags":["Solution"],"summary":"Updates a solution.","description":"Updates solution details, concepts, decisions (with their reasons), and questions. Lists replace the existing list; items without an `id` are given one. Requires the planner-user or planner-admin role in the tenant of the token, and the user must have created the solution or be a planner-admin. Sends a `solution-updated` event and saves a new version when the content changed, unless `checkpoint` is false. Each item of `concepts`, `decisions`, and `questions` must be an object.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["draft","analyzed","in-progress","completed","archived"]},"problemStatement":{"type":"string","description":"Changing the problem statement refreshes the solution's confidence."},"concepts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["actor","goal","activity","decision","evidence","business-rule","constraint","evaluation-criterion","workflow","outcome","document","event","external-system","assumption","unknown"]},"name":{"type":"string","minLength":1},"description":{"type":"string"},"source":{"type":"string","enum":["user","extracted","pattern","assumed"],"default":"user"}}}},"decisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"decision":{"type":"string"},"reason":{"type":"string"},"decidedOn":{"type":"string","format":"date-time","description":"Defaults to the time of the request."},"decidedBy":{"type":"string","description":"Defaults to the name of the calling user."}}}},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"question":{"type":"string"},"raisedBy":{"type":"string","default":"user"},"status":{"type":"string","enum":["open","answered"],"default":"open"},"answer":{"type":"string"}}}},"checkpoint":{"$ref":"#/components/schemas/Checkpoint"}}},"example":{"status":"in-progress","decisions":[{"title":"Applicant sign-in","decision":"Applicants sign in with Alberta.ca Account.","reason":"Applicants need to return to saved drafts."}]}}}},"responses":{"200":{"description":"Solution updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Solution"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}},"delete":{"tags":["Solution"],"summary":"Deletes a solution.","description":"Deletes a solution and its saved versions. Requires the planner-user or planner-admin role in the tenant of the token, and only the user who created the solution can delete it; other users, including planner-admin, receive 403. Sends a `solution-deleted` event.\n","responses":{"200":{"description":"Deletion result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolutionDeleteResult"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/solutions/{id}/analyze":{"parameters":[{"$ref":"#/components/parameters/PlannerSolutionId"}],"post":{"tags":["Solution"],"summary":"Analyzes a solution.","description":"Extracts concepts, matches patterns, and generates hypotheses and next steps for the problem statement. Requires the planner-user or planner-admin role in the tenant of the token, and the user must have created the solution or be a planner-admin. Responds 400 if neither `text` nor the solution has a problem statement. Sends a `solution-updated` event.\n","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","maxLength":20000,"description":"Problem statement to analyze; replaces the solution's. Defaults to the solution's problem statement."},"mode":{"$ref":"#/components/schemas/AnalysisMode"},"checkpoint":{"$ref":"#/components/schemas/Checkpoint"}}},"example":{"text":"Applicants apply for a small business grant. Staff review each application and decide.","mode":"rules"}}}},"responses":{"200":{"description":"Analyzed solution.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Solution"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/solutions/{id}/blueprint":{"parameters":[{"$ref":"#/components/parameters/PlannerSolutionId"}],"post":{"tags":["Solution"],"summary":"Generates the project blueprint.","description":"Generates the complete project blueprint: architecture, ADSP service mapping, components to set up, specialist notes, workflows, data and governance, delivery, and acceptance criteria. Saved consultations are reused. Requires the planner-user or planner-admin role in the tenant of the token, and the user must have created the solution or be a planner-admin. Responds 400 if the solution hasn't been analyzed. Sends `solution-updated` events.\n","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"$ref":"#/components/schemas/AnalysisMode"},"refreshConsultations":{"type":"boolean","description":"Run fresh specialist consultations instead of reusing saved ones."},"checkpoint":{"$ref":"#/components/schemas/Checkpoint"}}},"example":{"mode":"ai","refreshConsultations":false}}}},"responses":{"200":{"description":"The solution with state.blueprint populated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Solution"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/solutions/{id}/chat":{"parameters":[{"$ref":"#/components/parameters/PlannerSolutionId"}],"post":{"tags":["Solution"],"summary":"Sends a message to the planner about a solution.","description":"Sends a message to the planner. The analysis is refined using the message, the answers, and the conversation so far, and the message and the planner's reply are appended to `state.conversation`. The response is the updated solution as JSON, not a stream. Requires the planner-user or planner-admin role in the tenant of the token, and the user must have created the solution or be a planner-admin. Sends a `solution-updated` event.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":20000,"description":"Trimmed before validation."},"mode":{"$ref":"#/components/schemas/AnalysisMode"}},"required":["message"]},"example":{"message":"Applicants can also appeal a decision.","mode":"ai"}}}},"responses":{"200":{"description":"The solution with the refined analysis and the reply in state.conversation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Solution"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/solutions/{id}/components/{order}/review":{"parameters":[{"$ref":"#/components/parameters/PlannerSolutionId"},{"name":"order","in":"path","required":true,"description":"The component's order in the blueprint.","schema":{"type":"integer","minimum":1},"example":1}],"put":{"tags":["Solution"],"summary":"Records the review of a blueprint component.","description":"Records the user's review of a blueprint component. Rejected components are left out of the export. Requires the planner-user or planner-admin role in the tenant of the token, and the user must have created the solution or be a planner-admin. Responds 404 if the blueprint has no component with the order. Sends a `solution-updated` event.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["review"],"properties":{"review":{"type":"string","enum":["not-reviewed","approved","rejected"]}}},"example":{"review":"approved"}}}},"responses":{"200":{"description":"The solution with the component's review updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Solution"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/solutions/{id}/consult/{service}":{"parameters":[{"$ref":"#/components/parameters/PlannerSolutionId"},{"$ref":"#/components/parameters/PlannerSpecialistService"}],"post":{"tags":["Solution","Specialist"],"summary":"Consults a service specialist about a solution.","description":"Consults a service specialist about fit, questions, dependencies, and risks, and records the exchange in the caller's chat with the specialist. Requires the planner-user or planner-admin role in the tenant of the token, and the user must have created the solution or be a planner-admin. Responds 404 for an unknown specialist, and 400 when the chat is full (200 messages). Sends a `solution-updated` event.\n","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string","maxLength":2000},"proposal":{"type":"string","maxLength":5000,"description":"A plan for the specialist to validate."},"mode":{"$ref":"#/components/schemas/AnalysisMode"}}},"example":{"question":"Can applicants save a draft and return later?","mode":"ai"}}}},"responses":{"200":{"description":"Consultation result and the updated solution.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsultResult"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/solutions/{id}/discovery":{"parameters":[{"$ref":"#/components/parameters/PlannerSolutionId"}],"post":{"tags":["Solution"],"summary":"Advances the discovery conversation.","description":"Advances the discovery conversation. The planner replies with clarifying questions and scores six factors; the solution is analyzed and presented once confidence reaches 75% and every factor is at least 40%, or when `force` is set. Requires the planner-user or planner-admin role in the tenant of the token, and the user must have created the solution or be a planner-admin. Responds 400 if the solution has no problem statement. Sends a `solution-updated` event.\n","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":20000,"description":"The user's reply to the planner's questions. Trimmed before validation."},"mode":{"$ref":"#/components/schemas/AnalysisMode"},"force":{"type":"boolean","description":"Present the solution regardless of confidence."},"restart":{"type":"boolean","description":"Clear the discovery thread and start over."}}},"example":{"message":"Small businesses apply online. Program staff review and approve each application."}}}},"responses":{"200":{"description":"The solution with state.discovery and state.confidence updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Solution"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/solutions/{id}/export":{"parameters":[{"$ref":"#/components/parameters/PlannerSolutionId"}],"get":{"tags":["Solution"],"summary":"Downloads a solution.","description":"Downloads the current solution as a JSON attachment (`Content-Disposition: attachment; filename=\"planner-{id}.json\"`), including unsaved changes and the user's specialist chats about it. Requires the planner-user or planner-admin role in the tenant of the token, and the user must have created the solution or be a planner-admin.\n","responses":{"200":{"description":"JSON attachment.","headers":{"Content-Disposition":{"schema":{"type":"string"},"example":"attachment; filename=\"planner-5f0a1c52-7d0e-4c1b-9a8e-3b6f2d1e4a70.json\""}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolutionExport"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/solutions/{id}/versions":{"parameters":[{"$ref":"#/components/parameters/PlannerSolutionId"}],"get":{"tags":["Solution"],"summary":"Retrieves the saved versions of a solution.","description":"Retrieves the saved versions of a solution, newest first, and whether the solution has unsaved changes. Requires the planner-user or planner-admin role in the tenant of the token, and the user must have created the solution or be a planner-admin.\n","responses":{"200":{"description":"Versions retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolutionVersionList"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/solutions/{id}/versions/checkpoint":{"parameters":[{"$ref":"#/components/parameters/PlannerSolutionId"}],"post":{"tags":["Solution"],"summary":"Saves a version of a solution.","description":"Saves a new version of the solution if it changed since the latest saved version; otherwise returns the latest version. Use it after a series of calls made with `checkpoint` false. Requires the planner-user or planner-admin role in the tenant of the token, and the user must have created the solution or be a planner-admin. Sends a `solution-updated` event when a version is saved.\n","responses":{"200":{"description":"The saved, or latest, version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolutionVersionSummary"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/solutions/{id}/versions/{number}":{"parameters":[{"$ref":"#/components/parameters/PlannerSolutionId"},{"$ref":"#/components/parameters/PlannerVersionNumber"}],"patch":{"tags":["Solution"],"summary":"Renames a saved version.","description":"Renames a saved version of a solution. Requires the planner-user or planner-admin role in the tenant of the token, and the user must have created the solution or be a planner-admin. Responds 404 if the version doesn't exist. Sends a `solution-updated` event.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":100,"description":"New name, trimmed. An empty name resets it to `Version {number}`."}},"required":["name"]},"example":{"name":"Before review"}}}},"responses":{"200":{"description":"Version renamed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolutionVersionSummary"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/solutions/{id}/versions/{number}/export":{"parameters":[{"$ref":"#/components/parameters/PlannerSolutionId"},{"$ref":"#/components/parameters/PlannerVersionNumber"}],"get":{"tags":["Solution"],"summary":"Downloads a saved version of a solution.","description":"Downloads a saved version as a JSON attachment (`Content-Disposition: attachment; filename=\"planner-{id}-v{number}.json\"`). Requires the planner-user or planner-admin role in the tenant of the token, and the user must have created the solution or be a planner-admin. Responds 404 if the version doesn't exist.\n","responses":{"200":{"description":"JSON attachment.","headers":{"Content-Disposition":{"schema":{"type":"string"},"example":"attachment; filename=\"planner-5f0a1c52-7d0e-4c1b-9a8e-3b6f2d1e4a70-v2.json\""}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolutionExport"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/specialists":{"get":{"tags":["Specialist"],"summary":"Retrieves the service specialists.","description":"Retrieves the service specialists known to the planner. The list is the same for every tenant. Requires the planner-user or planner-admin role in the tenant of the token.\n","responses":{"200":{"description":"Specialists retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecialistList"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"}}}},"/planner/v1/specialists/chats":{"get":{"tags":["Specialist"],"summary":"Lists the caller's saved specialist chats.","description":"Lists the specialist chats of the calling user in the tenant of the token. Chats are private: planner-admin doesn't see other users' chats. Requires the planner-user or planner-admin role.\n","parameters":[{"$ref":"#/components/parameters/PlannerChatService"},{"$ref":"#/components/parameters/PlannerChatSolutionId"}],"responses":{"200":{"description":"Chat summaries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecialistChatSummaryList"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"}}}},"/planner/v1/specialists/chats/export":{"get":{"tags":["Specialist"],"summary":"Downloads the caller's saved chats.","description":"Downloads the full history of the calling user's specialist chats as a JSON attachment (`Content-Disposition: attachment; filename=\"planner-specialist-chats.json\"`). Requires the planner-user or planner-admin role in the tenant of the token.\n","parameters":[{"$ref":"#/components/parameters/PlannerChatService"},{"$ref":"#/components/parameters/PlannerChatSolutionId"}],"responses":{"200":{"description":"JSON attachment.","headers":{"Content-Disposition":{"schema":{"type":"string"},"example":"attachment; filename=\"planner-specialist-chats.json\""}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecialistChatsExport"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"}}}},"/planner/v1/specialists/chats/{chatId}":{"parameters":[{"$ref":"#/components/parameters/PlannerChatId"}],"get":{"tags":["Specialist"],"summary":"Retrieves a saved chat.","description":"Retrieves a saved chat of the calling user, with its full history. Requires the planner-user or planner-admin role in the tenant of the token. Chats of other users respond 404.\n","responses":{"200":{"description":"The chat.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecialistChat"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}},"delete":{"tags":["Specialist"],"summary":"Deletes a saved chat.","description":"Deletes a saved chat of the calling user. Requires the planner-user or planner-admin role in the tenant of the token. Chats of other users respond 404.\n","responses":{"204":{"description":"Deleted."},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/specialists/chats/{chatId}/export":{"parameters":[{"$ref":"#/components/parameters/PlannerChatId"}],"get":{"tags":["Specialist"],"summary":"Downloads a saved chat.","description":"Downloads a saved chat of the calling user as a JSON attachment (`Content-Disposition: attachment; filename=\"planner-chat-{chatId}.json\"`). Requires the planner-user or planner-admin role in the tenant of the token. Chats of other users respond 404.\n","responses":{"200":{"description":"JSON attachment.","headers":{"Content-Disposition":{"schema":{"type":"string"},"example":"attachment; filename=\"planner-chat-b7e2f6a1-4c3d-4e8f-9a1b-2c3d4e5f6a7b.json\""}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecialistChatExport"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/specialists/{service}/chat":{"parameters":[{"$ref":"#/components/parameters/PlannerSpecialistService"}],"post":{"tags":["Specialist"],"summary":"Converses directly with a service specialist.","description":"Converses with a service specialist (ask, recommend, design, validate, or sample code), without a planner session. The exchange is saved to the caller's chat history, which is private to the caller. Requires the planner-user or planner-admin role in the tenant of the token. With `solutionId`, the user must have created the solution or be a planner-admin. Responds 404 for an unknown specialist, chat, or solution, and 400 when the chat belongs to another specialist or is full (200 messages).\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string","minLength":1,"maxLength":5000,"description":"Trimmed before validation."},"chatId":{"type":"string","format":"uuid","description":"Continue a saved chat; omit to start a new one."},"intent":{"type":"string","enum":["ask","recommend","design","validate","sample"],"default":"ask"},"solutionId":{"type":"string","format":"uuid","description":"Give the specialist the context of a solution. Ignored when the chat has a solution."},"mode":{"$ref":"#/components/schemas/AnalysisMode"}}},"example":{"message":"Do applicants need to sign in?","intent":"ask","solutionId":"5f0a1c52-7d0e-4c1b-9a8e-3b6f2d1e4a70"}}}},"responses":{"200":{"description":"Specialist reply, including the chatId of the saved chat.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecialistChatReply"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}}},"components":{"securitySchemes":{"accessToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"parameters":{"PlannerChatId":{"name":"chatId","description":"ID of the saved specialist chat.","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"b7e2f6a1-4c3d-4e8f-9a1b-2c3d4e5f6a7b"},"PlannerChatService":{"name":"service","description":"Only include chats with the specialist of this service.","in":"query","required":false,"schema":{"type":"string"},"example":"form-service"},"PlannerChatSolutionId":{"name":"solutionId","description":"Only include chats about this solution.","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"example":"5f0a1c52-7d0e-4c1b-9a8e-3b6f2d1e4a70"},"PlannerPatternId":{"name":"patternId","description":"ID of the business pattern, for example a built-in pattern such as `case-management`.","in":"path","required":true,"schema":{"type":"string"},"example":"case-management"},"PlannerSolutionId":{"name":"id","description":"ID of the solution.","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"5f0a1c52-7d0e-4c1b-9a8e-3b6f2d1e4a70"},"PlannerSpecialistService":{"name":"service","description":"Service of the specialist, as returned by `GET /planner/v1/specialists`.","in":"path","required":true,"schema":{"type":"string"},"example":"form-service"},"PlannerVersionNumber":{"name":"number","description":"Number of the saved version. Versions are numbered from 1.","in":"path","required":true,"schema":{"type":"integer","minimum":1},"example":2}},"responses":{"PlannerBadRequest":{"description":"Request is invalid, for example a path, query, or body parameter failed validation. Also returned when there is no tenant context, which is the case for core (platform) users that don't set a tenant.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlannerError"},"example":{"errorMessage":"Validation failed with error(s): id (params) - Invalid value"}}}},"PlannerForbidden":{"description":"User does not have the role required for the operation in the tenant, or is not permitted to act on the solution. Core (platform) users are not granted access.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlannerError"},"example":{"errorMessage":"User Test User (ID: 0d7c3f5e-1b2a-4c6d-8e9f-0a1b2c3d4e5f) not permitted to access planner."}}}},"PlannerNotFound":{"description":"Resource not found, or it belongs to another tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlannerError"},"example":{"errorMessage":"solution with ID '5f0a1c52-7d0e-4c1b-9a8e-3b6f2d1e4a70' could not be found."}}}},"PlannerUnauthorized":{"description":"Request does not include a valid bearer token.","content":{"text/plain":{"schema":{"type":"string"},"example":"Unauthorized"}}}},"schemas":{"AnalysisMode":{"type":"string","enum":["ai","rules"],"description":"Analysis mode. Defaults to `ai` when a model is configured, otherwise `rules`. When AI is requested but isn't available or fails, the rule-based result is used and a warning is recorded.\n"},"AnalysisOptions":{"type":"object","properties":{"modes":{"type":"array","description":"Analysis modes available. `ai` is only available when a model is configured.","items":{"type":"string","enum":["ai","rules"]}},"defaultMode":{"type":"string","enum":["ai","rules"]},"model":{"type":"string","description":"Name of the configured model. Absent when AI analysis isn't configured."}},"example":{"modes":["ai","rules"],"defaultMode":"ai","model":"GOA-Default"}},"BusinessPattern":{"allOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{1,59}$"},"source":{"type":"string","readOnly":true,"enum":["built-in","customized","custom"],"description":"`built-in` patterns ship with the service, `customized` patterns are built-in patterns overridden by the tenant, and `custom` patterns are created by the tenant.\n"}}},{"$ref":"#/components/schemas/BusinessPatternInput"}],"example":{"id":"grant-application","source":"custom","name":"Grant application","description":"Applicants apply for funding, staff assess eligibility and award grants.","domainLanguage":["grant","applicant","funding","award"],"commonFeatures":["Online application","Eligibility assessment"],"strongSignals":[{"description":"Applicants apply for funding","keywords":["grant","funding"]}],"weakSignals":[],"serviceMappings":[{"service":"form-service","reason":"Collects the application."}],"clarifyingQuestions":["Who assesses the applications?"],"assumptions":[],"knownUnknowns":[]}},"BusinessPatternInput":{"type":"object","description":"Business pattern. Text fields are trimmed; strings in lists are truncated to 500 characters and fields that aren't listed are ignored.\n","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":2000},"domainLanguage":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string"}},"commonFeatures":{"type":"array","maxItems":50,"items":{"type":"string"}},"strongSignals":{"type":"array","minItems":1,"maxItems":50,"items":{"$ref":"#/components/schemas/Signal"}},"weakSignals":{"type":"array","maxItems":50,"items":{"$ref":"#/components/schemas/Signal"}},"serviceMappings":{"type":"array","minItems":1,"maxItems":30,"items":{"type":"object","properties":{"service":{"type":"string","description":"Service of an ADSP specialist, as returned by `GET /planner/v1/specialists`."},"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["service","reason"]}},"clarifyingQuestions":{"type":"array","maxItems":50,"items":{"type":"string"}},"assumptions":{"type":"array","maxItems":50,"items":{"type":"string"}},"knownUnknowns":{"type":"array","maxItems":50,"items":{"type":"string"}}},"required":["name","domainLanguage","strongSignals","serviceMappings"]},"Checkpoint":{"type":"boolean","default":true,"description":"Set false to skip auto-saving a version, for example when more calls will follow in the same action."},"ConsultResult":{"type":"object","properties":{"service":{"type":"string"},"fit":{"type":"string","enum":["recommended","optional","not-indicated"]},"reason":{"type":"string"},"questions":{"type":"array","items":{"type":"string"}},"dependencies":{"type":"array","items":{"type":"object","properties":{"service":{"type":"string"},"satisfied":{"type":"boolean"}}}},"risks":{"type":"array","items":{"type":"string"}},"advice":{"type":"string","description":"Present when the AI specialist contributed guidance."},"supports":{"type":"array","items":{"type":"string"}},"constraints":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","description":"Present when a `proposal` was validated.","properties":{"verdict":{"type":"string","enum":["sound","needs-changes","not-a-fit"]},"findings":{"type":"array","items":{"type":"string"}}}},"solution":{"$ref":"#/components/schemas/Solution"}},"example":{"service":"form-service","fit":"recommended","reason":"Recommended by the leading hypothesis to collect applications.","questions":["Who completes the form","and is authentication required?"],"dependencies":[{"service":"file-service","satisfied":false}],"risks":["Forms that collect attachments need file types configured first."],"solution":{"id":"5f0a1c52-7d0e-4c1b-9a8e-3b6f2d1e4a70","name":"Small business grant","status":"analyzed","version":3}}},"ConversationMessage":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string"},"at":{"type":"string","format":"date-time"}}},"ExtractedText":{"type":"object","properties":{"text":{"type":"string","description":"Text extracted from the file, to use as the problem statement."}},"example":{"text":"Applicants apply for a small business grant. Staff review each application and decide on the award."}},"PatternList":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/BusinessPattern"}}},"example":{"results":[{"id":"case-management","source":"built-in","name":"Case management","description":"Staff manage cases through intake, assessment and decision.","domainLanguage":["case","caseworker","intake"],"commonFeatures":["Case intake","Assignment"],"strongSignals":[{"description":"Staff work cases through a lifecycle","keywords":["case","caseworker"]}],"weakSignals":[],"serviceMappings":[{"service":"form-service","reason":"Collects intake information."}],"clarifyingQuestions":["Who works the cases?"],"assumptions":[],"knownUnknowns":[]}]}},"PatternMatch":{"type":"object","properties":{"patternId":{"type":"string"},"patternName":{"type":"string"},"score":{"type":"number","description":"Each matched domain term counts 1 and each strong signal counts 2."},"level":{"type":"string","enum":["high","medium","low"]},"matchedLanguage":{"type":"array","items":{"type":"string"}},"matchedSignals":{"type":"array","items":{"type":"string"}},"explanation":{"type":"string"}}},"PatternMatchResult":{"type":"object","properties":{"matches":{"type":"array","description":"Matches ranked by score, highest first.","items":{"$ref":"#/components/schemas/PatternMatch"}},"questions":{"type":"array","description":"Clarifying questions of the best match when its confidence is low; otherwise empty.","items":{"type":"string"}}},"example":{"matches":[{"patternId":"case-management","patternName":"Case management","score":4,"level":"medium","matchedLanguage":["case","caseworker"],"matchedSignals":["Staff work cases through a lifecycle"],"explanation":"Matched 2 domain terms and 1 strong signal."}],"questions":[]}},"PlannerError":{"type":"object","properties":{"errorMessage":{"type":"string"}}},"PlannerTenantId":{"type":"object","readOnly":true,"description":"The tenant ID, serialized as its URN parts.","properties":{"type":{"type":"string"},"namespace":{"type":"string"},"service":{"type":"string"},"api":{"type":"string"},"resource":{"type":"string"}},"example":{"type":"resource","namespace":"platform","service":"tenant-service","api":"v2","resource":"/tenants/61f2e3a8c9b1d2e3f4a5b6c7"}},"Signal":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":500},"keywords":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"string"}}},"required":["description","keywords"]},"Solution":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"tenantId":{"$ref":"#/components/schemas/PlannerTenantId"},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","nullable":true},"scenario":{"type":"string","enum":["new","prototype","existing-app","reconfigure"]},"status":{"type":"string","enum":["draft","analyzed","in-progress","completed","archived"]},"createdById":{"type":"string","readOnly":true},"createdByName":{"type":"string","readOnly":true},"createdOn":{"type":"string","format":"date-time","readOnly":true},"updatedOn":{"type":"string","format":"date-time","readOnly":true},"version":{"type":"integer","readOnly":true,"description":"Number of the latest saved version."},"state":{"$ref":"#/components/schemas/SolutionState"}},"example":{"id":"5f0a1c52-7d0e-4c1b-9a8e-3b6f2d1e4a70","tenantId":{"type":"resource","namespace":"platform","service":"tenant-service","api":"v2","resource":"/tenants/61f2e3a8c9b1d2e3f4a5b6c7"},"name":"Small business grant","description":"Online applications for the small business grant.","scenario":"new","status":"analyzed","createdById":"0d7c3f5e-1b2a-4c6d-8e9f-0a1b2c3d4e5f","createdByName":"Test User","createdOn":"2026-10-01T15:04:05.000Z","updatedOn":"2026-10-01T15:20:00.000Z","version":2,"state":{"problemStatement":"Applicants apply for a small business grant. Staff review each application and decide.","concepts":[{"id":"9c1d2e3f-4a5b-4c6d-8e7f-a1b2c3d4e5f6","type":"actor","name":"Applicant","source":"extracted"}],"decisions":[],"questions":[{"id":"3e4f5a6b-7c8d-4e9f-a0b1-c2d3e4f5a6b7","question":"Who assesses the applications?","raisedBy":"planner","status":"open"}],"patternMatches":[],"hypotheses":[],"specialists":[],"nextSteps":[],"analysis":{"mode":"rules","analyzedOn":"2026-10-01T15:20:00.000Z"}}}},"SolutionDeleteResult":{"type":"object","properties":{"deleted":{"type":"boolean"}},"example":{"deleted":true}},"SolutionExport":{"type":"object","description":"A solution, or one of its saved versions, for download. Components the user rejected in the blueprint are left out of `state.blueprint.components`.\n","properties":{"exportedAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"scenario":{"type":"string"},"status":{"type":"string"},"createdByName":{"type":"string"},"createdOn":{"type":"string","format":"date-time"},"version":{"type":"integer","description":"Number of the exported version, or of the latest saved version when there are unsaved changes."},"versionName":{"type":"string"},"unsavedChanges":{"type":"boolean","description":"True when the export includes changes made since the latest saved version."},"lastUpdated":{"type":"string","format":"date-time"},"updatedOn":{"type":"string","format":"date-time"},"initial":{"type":"boolean","description":"True for the first version."},"changedSections":{"type":"array","description":"Sections changed since the previous version.","items":{"type":"string"}},"blueprintOutOfDate":{"type":"boolean"},"specialistChats":{"type":"array","items":{"type":"object"}},"state":{"$ref":"#/components/schemas/SolutionState"}},"example":{"exportedAt":"2026-10-02T09:00:00.000Z","id":"5f0a1c52-7d0e-4c1b-9a8e-3b6f2d1e4a70","name":"Small business grant","description":"Online applications for the small business grant.","scenario":"new","status":"analyzed","createdByName":"Test User","createdOn":"2026-10-01T15:04:05.000Z","version":2,"versionName":"Version 2","unsavedChanges":false,"lastUpdated":"2026-10-01T15:20:00.000Z","updatedOn":"2026-10-01T15:20:00.000Z","initial":false,"changedSections":["Problem statement","Analysis"],"blueprintOutOfDate":false,"specialistChats":[],"state":{"problemStatement":"Applicants apply for a small business grant. Staff review each application and decide.","concepts":[],"decisions":[],"questions":[],"patternMatches":[],"hypotheses":[],"specialists":[],"nextSteps":[]}}},"SolutionList":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Solution"}},"page":{"type":"object","properties":{"after":{"type":"string"},"next":{"type":"string","description":"Cursor for the next page. Pass it as `after` to read the next page."},"size":{"type":"integer"}}}},"example":{"results":[{"id":"5f0a1c52-7d0e-4c1b-9a8e-3b6f2d1e4a70","tenantId":{"type":"resource","namespace":"platform","service":"tenant-service","api":"v2","resource":"/tenants/61f2e3a8c9b1d2e3f4a5b6c7"},"name":"Small business grant","scenario":"new","status":"draft","createdById":"0d7c3f5e-1b2a-4c6d-8e9f-0a1b2c3d4e5f","createdByName":"Test User","createdOn":"2026-10-01T15:04:05.000Z","updatedOn":"2026-10-01T15:04:05.000Z","version":1,"state":{"problemStatement":"Applicants apply for a small business grant.","concepts":[],"decisions":[],"questions":[],"patternMatches":[],"hypotheses":[],"specialists":[],"nextSteps":[]}}],"page":{"next":"MTA=","size":1}}},"SolutionState":{"type":"object","description":"Structured state of the planning work. Most of it is produced by the planner: analysis, discovery, blueprint, pattern matches, hypotheses and next steps.\n","properties":{"problemStatement":{"type":"string"},"problemStatementUpdatedOn":{"type":"string","format":"date-time"},"concepts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["actor","goal","activity","decision","evidence","business-rule","constraint","evaluation-criterion","workflow","outcome","document","event","external-system","assumption","unknown"]},"name":{"type":"string"},"description":{"type":"string"},"source":{"type":"string","enum":["user","extracted","pattern","assumed"]}}}},"decisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"decision":{"type":"string"},"reason":{"type":"string"},"decidedOn":{"type":"string","format":"date-time"},"decidedBy":{"type":"string"}}}},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"question":{"type":"string"},"raisedBy":{"type":"string"},"status":{"type":"string","enum":["open","answered"]},"answer":{"type":"string"}}}},"patternMatches":{"type":"array","items":{"$ref":"#/components/schemas/PatternMatch"}},"hypotheses":{"type":"array","items":{"type":"object"}},"specialists":{"type":"array","items":{"type":"object","properties":{"service":{"type":"string"},"status":{"type":"string","enum":["not-started","consulted","in-workspace","completed"]},"updatedOn":{"type":"string","format":"date-time"}}}},"nextSteps":{"type":"array","items":{"type":"object"}},"analysis":{"type":"object","properties":{"mode":{"type":"string","enum":["ai","rules"]},"model":{"type":"string"},"warning":{"type":"string","description":"Set when AI analysis was requested but the rule-based fallback produced the result."},"analyzedOn":{"type":"string","format":"date-time"}}},"conversation":{"type":"array","items":{"$ref":"#/components/schemas/ConversationMessage"}},"discovery":{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/ConversationMessage"}},"confidence":{"type":"number","minimum":0,"maximum":100},"threshold":{"type":"number"},"factors":{"type":"array","items":{"type":"object"}},"ready":{"type":"boolean"},"mode":{"type":"string","enum":["ai","rules"]},"warning":{"type":"string"},"updatedOn":{"type":"string","format":"date-time"}}},"blueprint":{"type":"object","description":"The project blueprint, set by `POST /planner/v1/solutions/{id}/blueprint`."},"confidence":{"type":"object","properties":{"score":{"type":"number"},"threshold":{"type":"number"},"factors":{"type":"array","items":{"type":"object"}}}}}},"SolutionVersionList":{"type":"object","properties":{"latest":{"type":"integer","description":"Number of the latest saved version."},"unsavedChanges":{"type":"boolean","description":"True when the solution has changed since the latest saved version."},"results":{"type":"array","items":{"type":"object","properties":{"number":{"type":"integer"},"name":{"type":"string"},"createdOn":{"type":"string","format":"date-time"},"changedSections":{"type":"array","items":{"type":"string"}}}}}},"example":{"latest":2,"unsavedChanges":false,"results":[{"number":2,"name":"Version 2","createdOn":"2026-10-01T15:20:00.000Z","changedSections":["Problem statement","Analysis"]},{"number":1,"name":"Version 1","createdOn":"2026-10-01T15:04:05.000Z","changedSections":[]}]}},"SolutionVersionSummary":{"type":"object","properties":{"number":{"type":"integer","minimum":1},"name":{"type":"string"},"createdOn":{"type":"string","format":"date-time"}},"example":{"number":2,"name":"Before review","createdOn":"2026-10-01T15:20:00.000Z"}},"Specialist":{"type":"object","properties":{"service":{"type":"string"},"displayName":{"type":"string"},"purpose":{"type":"string"},"workspacePath":{"type":"string","description":"Path of the service's workspace in tenant admin."},"questions":{"type":"array","items":{"type":"string"}},"dependsOn":{"type":"array","items":{"type":"string"}},"risks":{"type":"array","items":{"type":"string"}},"order":{"type":"integer"}}},"SpecialistChat":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"service":{"type":"string"},"solutionId":{"type":"string","format":"uuid"},"title":{"type":"string"},"createdByName":{"type":"string"},"createdOn":{"type":"string","format":"date-time"},"updatedOn":{"type":"string","format":"date-time"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/StoredChatMessage"}}},"example":{"id":"b7e2f6a1-4c3d-4e8f-9a1b-2c3d4e5f6a7b","service":"form-service","solutionId":"5f0a1c52-7d0e-4c1b-9a8e-3b6f2d1e4a70","title":"Do applicants need to sign in?","createdByName":"Test User","createdOn":"2026-10-01T15:04:05.000Z","updatedOn":"2026-10-01T15:05:00.000Z","messages":[{"role":"user","content":"Do applicants need to sign in?","at":"2026-10-01T15:04:05.000Z","intent":"ask"},{"role":"assistant","content":"Applicants can complete the form anonymously, but drafts need a signed-in user.","at":"2026-10-01T15:04:06.000Z","intent":"ask","mode":"ai","model":"GOA-Default"}]}},"SpecialistChatExport":{"allOf":[{"type":"object","properties":{"exportedAt":{"type":"string","format":"date-time"}}},{"$ref":"#/components/schemas/SpecialistChat"}],"example":{"exportedAt":"2026-10-02T09:00:00.000Z","id":"b7e2f6a1-4c3d-4e8f-9a1b-2c3d4e5f6a7b","service":"form-service","title":"Do applicants need to sign in?","createdByName":"Test User","createdOn":"2026-10-01T15:04:05.000Z","updatedOn":"2026-10-01T15:05:00.000Z","messages":[{"role":"user","content":"Do applicants need to sign in?","at":"2026-10-01T15:04:05.000Z","intent":"ask"}]}},"SpecialistChatReply":{"type":"object","properties":{"chatId":{"type":"string","format":"uuid","description":"ID of the saved chat. Pass it as `chatId` to continue the conversation."},"service":{"type":"string"},"mode":{"type":"string","enum":["ai","rules"]},"model":{"type":"string"},"warning":{"type":"string","description":"Set when AI was requested but a rule-based reply was given."},"reply":{"type":"string"},"suggestions":{"type":"array","items":{"type":"string"}},"samples":{"type":"array","items":{"type":"object","properties":{"language":{"type":"string"},"title":{"type":"string"},"code":{"type":"string"}}}},"validation":{"type":"object","properties":{"verdict":{"type":"string"},"findings":{"type":"array","items":{"type":"string"}}}},"followUps":{"type":"array","items":{"type":"string"}},"solution":{"allOf":[{"$ref":"#/components/schemas/Solution"}],"description":"The updated solution, when the exchange changed the solution's discovery confidence."}},"example":{"chatId":"b7e2f6a1-4c3d-4e8f-9a1b-2c3d4e5f6a7b","service":"form-service","mode":"rules","reply":"Here is what this service is for and what to settle first.\n\nForm service: Form definitions, drafts, submissions, and review dispositions.","suggestions":["Forms that collect attachments need file types configured first."],"samples":[],"followUps":["Who completes the form","and is authentication required?"]}},"SpecialistChatSummaryList":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"service":{"type":"string"},"solutionId":{"type":"string","format":"uuid"},"title":{"type":"string"},"createdOn":{"type":"string","format":"date-time"},"updatedOn":{"type":"string","format":"date-time"},"messageCount":{"type":"integer"}}}}},"example":{"results":[{"id":"b7e2f6a1-4c3d-4e8f-9a1b-2c3d4e5f6a7b","service":"form-service","solutionId":"5f0a1c52-7d0e-4c1b-9a8e-3b6f2d1e4a70","title":"Do applicants need to sign in?","createdOn":"2026-10-01T15:04:05.000Z","updatedOn":"2026-10-01T15:05:00.000Z","messageCount":2}]}},"SpecialistChatsExport":{"type":"object","properties":{"exportedAt":{"type":"string","format":"date-time"},"chats":{"type":"array","items":{"$ref":"#/components/schemas/SpecialistChat"}}},"example":{"exportedAt":"2026-10-02T09:00:00.000Z","chats":[{"id":"b7e2f6a1-4c3d-4e8f-9a1b-2c3d4e5f6a7b","service":"form-service","title":"Do applicants need to sign in?","createdByName":"Test User","createdOn":"2026-10-01T15:04:05.000Z","updatedOn":"2026-10-01T15:05:00.000Z","messages":[{"role":"user","content":"Do applicants need to sign in?","at":"2026-10-01T15:04:05.000Z","intent":"ask"}]}]}},"SpecialistList":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Specialist"}}},"example":{"results":[{"service":"form-service","displayName":"Form service","purpose":"Form definitions, drafts, submissions, and review dispositions.","workspacePath":"/admin/services/form","questions":["Who completes the form","and is authentication required?"],"dependsOn":["file-service"],"risks":["Forms that collect attachments need file types configured first."],"order":3}]}},"StoredChatMessage":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string"},"at":{"type":"string","format":"date-time"},"intent":{"type":"string"},"mode":{"type":"string","enum":["ai","rules"]},"model":{"type":"string"},"warning":{"type":"string"},"suggestions":{"type":"array","items":{"type":"string"}},"followUps":{"type":"array","items":{"type":"string"}}}}}},"security":[{"accessToken":[]}],"tags":[{"name":"Solution","description":"Managing solutions and the planner workflow"},{"name":"Pattern","description":"Business patterns known to the planner"},{"name":"Specialist","description":"Service specialists the planner consults"}]}
1
+ {"openapi":"3.0.0","info":{"title":"Project planner service","version":"0.0.0","description":"The Project Planner Service helps people who are new to ADSP describe a business problem and\nturn it into a plan for using ADSP services.\n\nThe planner builds a structured _business model_ of the problem (actors, goals, workflows, rules, constraints,\nassumptions, unknowns, etc.), matches it against known GoA _business patterns_, and derives one or more\n_solution hypotheses_ that recommend ADSP services. Each recommended service has a _specialist_ that can be consulted\nfor service-specific questions and dependencies, and links to its service workspace.\n\nA _solution_ is the persistent, structured state of this work: decisions made (and why), open questions,\nspecialist progress, and recommended next steps. It survives across sessions so the user does not need\nto repeat information already gathered.\n\nAny recommendation made by the planner is a hypothesis for the user to refine.\n"},"paths":{"/planner/v1/analysis/options":{"get":{"tags":["Solution"],"summary":"Retrieves the available analysis modes.","description":"Retrieves the analysis modes available, the default mode, and the configured model name. Requires the planner-user or planner-admin role in the tenant of the token.\n","responses":{"200":{"description":"Analysis options retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisOptions"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"}}}},"/planner/v1/documents/extract":{"post":{"tags":["Solution"],"summary":"Extracts a problem statement from a document.","description":"Extracts the text of an uploaded document, to use as a problem statement. Supports Markdown (.md, .markdown), Word (.docx, and .doc HTML exports such as Confluence \"Export to Word\") and PDF (.pdf) files up to 20 MB. The file isn't stored. Requires the planner-user or planner-admin role in the tenant of the token. Responds 400 if no file is uploaded, the field name is not `file`, the format isn't supported, or no text can be read. Responds 413 if the file exceeds 20 MB.\n","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"The document, in the `file` field. Must be no larger than 20 MB."}},"required":["file"]}}}},"responses":{"200":{"description":"Text extracted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractedText"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"413":{"description":"The uploaded file exceeds the 20 MB limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlannerError"}}}}}}},"/planner/v1/patterns":{"get":{"tags":["Pattern"],"summary":"Retrieves business patterns.","description":"Retrieves the effective business pattern catalogue of the tenant: built-in patterns, overridden by patterns in the tenant's configuration, overridden by patterns stored through this API. Requires the planner-user or planner-admin role in the tenant of the token.\n","responses":{"200":{"description":"Patterns retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatternList"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"}}},"post":{"tags":["Pattern"],"summary":"Creates a custom pattern.","description":"Creates a custom business pattern in the tenant of the token. Requires the planner-admin role. The `id` is optional and defaults to a slug of the name; responds 400 if a pattern with the ID already exists.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{1,59}$"}}},{"$ref":"#/components/schemas/BusinessPatternInput"}]},"example":{"id":"grant-application","name":"Grant application","description":"Applicants apply for funding, staff assess eligibility and award grants.","domainLanguage":["grant","applicant","funding","award"],"strongSignals":[{"description":"Applicants apply for funding","keywords":["grant","funding"]}],"serviceMappings":[{"service":"form-service","reason":"Collects the application."}],"clarifyingQuestions":["Who assesses the applications?"]}}}},"responses":{"201":{"description":"Pattern created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessPattern"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"}}}},"/planner/v1/patterns/match":{"post":{"tags":["Pattern"],"summary":"Matches free text against patterns.","description":"Matches free text against the tenant's effective pattern catalogue and explains the confidence of each match. Requires the planner-user or planner-admin role in the tenant of the token.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":20000}},"required":["text"]},"example":{"text":"Caseworkers manage cases from intake to decision."}}}},"responses":{"200":{"description":"Ranked pattern matches, with clarifying questions when confidence is low.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatternMatchResult"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"}}}},"/planner/v1/patterns/{patternId}":{"parameters":[{"$ref":"#/components/parameters/PlannerPatternId"}],"get":{"tags":["Pattern"],"summary":"Retrieves a business pattern.","description":"Retrieves a pattern from the tenant's effective pattern catalogue. Requires the planner-user or planner-admin role in the tenant of the token.\n","responses":{"200":{"description":"Pattern retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessPattern"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}},"put":{"tags":["Pattern"],"summary":"Updates a pattern.","description":"Updates a pattern of the tenant of the token. Updating a built-in or configured pattern stores a tenant copy that overrides it. Requires the planner-admin role. The `patternId` must match `^[a-z0-9][a-z0-9-]{1,59}$`.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessPatternInput"},"example":{"name":"Case management","domainLanguage":["case","caseworker","intake","appeal"],"strongSignals":[{"description":"Staff work cases through a lifecycle","keywords":["case","caseworker"]}],"serviceMappings":[{"service":"form-service","reason":"Collects intake information."}]}}}},"responses":{"200":{"description":"Pattern updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessPattern"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}},"delete":{"tags":["Pattern"],"summary":"Deletes a pattern stored through the API.","description":"Deletes a custom pattern of the tenant of the token, or restores a customized built-in pattern to its built-in version. Built-in and configured patterns themselves can't be deleted and respond 400. Requires the planner-admin role.\n","responses":{"204":{"description":"Pattern deleted."},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/solutions":{"get":{"tags":["Solution"],"summary":"Retrieves solutions.","description":"Retrieves solutions of the tenant of the token, most recently updated first. Requires the planner-user or planner-admin role. Users with planner-user see the solutions they created; planner-admin sees all solutions in the tenant.\n","parameters":[{"name":"top","in":"query","description":"Number of results to return.","schema":{"type":"integer","minimum":1,"maximum":100,"default":10}},{"name":"after","in":"query","description":"Cursor of the page to read, from `page.next` of the previous response.","schema":{"type":"string"},"example":"MTA="},{"name":"status","in":"query","description":"Only include solutions with this status.","schema":{"type":"string","enum":["draft","analyzed","in-progress","completed","archived"]}}],"responses":{"200":{"description":"Solutions retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolutionList"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"}}},"post":{"tags":["Solution"],"summary":"Creates a solution.","description":"Creates a draft solution in the tenant of the token, owned by the calling user. Requires the planner-user or planner-admin role. Sends a `solution-created` event.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","nullable":true},"scenario":{"type":"string","enum":["new","prototype","existing-app","reconfigure"],"default":"new"},"problemStatement":{"type":"string"}},"required":["name"]},"example":{"name":"Small business grant","description":"Online applications for the small business grant.","scenario":"new","problemStatement":"Applicants apply for a small business grant. Staff review each application and decide."}}}},"responses":{"201":{"description":"Solution created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Solution"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"}}}},"/planner/v1/solutions/{id}":{"parameters":[{"$ref":"#/components/parameters/PlannerSolutionId"}],"get":{"tags":["Solution"],"summary":"Retrieves a solution.","description":"Retrieves a solution, including its structured state. Requires the planner-user or planner-admin role in the tenant of the token. Only the user who created the solution, or a planner-admin, can retrieve it; other users receive 403. Solutions of other tenants respond 404.\n","responses":{"200":{"description":"Solution retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Solution"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}},"patch":{"tags":["Solution"],"summary":"Updates a solution.","description":"Updates solution details, concepts, decisions (with their reasons), and questions. Lists replace the existing list; items without an `id` are given one. Requires the planner-user or planner-admin role in the tenant of the token, and the user must have created the solution or be a planner-admin. Sends a `solution-updated` event and saves a new version when the content changed, unless `checkpoint` is false. Each item of `concepts`, `decisions`, and `questions` must be an object.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["draft","analyzed","in-progress","completed","archived"]},"problemStatement":{"type":"string","description":"Changing the problem statement refreshes the solution's confidence."},"concepts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["actor","goal","activity","decision","evidence","business-rule","constraint","evaluation-criterion","workflow","outcome","document","event","external-system","assumption","unknown"]},"name":{"type":"string","minLength":1},"description":{"type":"string"},"source":{"type":"string","enum":["user","extracted","pattern","assumed"],"default":"user"}}}},"decisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"decision":{"type":"string"},"reason":{"type":"string"},"decidedOn":{"type":"string","format":"date-time","description":"Defaults to the time of the request."},"decidedBy":{"type":"string","description":"Defaults to the name of the calling user."}}}},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"question":{"type":"string"},"raisedBy":{"type":"string","default":"user"},"status":{"type":"string","enum":["open","answered"],"default":"open"},"answer":{"type":"string"}}}},"checkpoint":{"$ref":"#/components/schemas/Checkpoint"}}},"example":{"status":"in-progress","decisions":[{"title":"Applicant sign-in","decision":"Applicants sign in with Alberta.ca Account.","reason":"Applicants need to return to saved drafts."}]}}}},"responses":{"200":{"description":"Solution updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Solution"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}},"delete":{"tags":["Solution"],"summary":"Deletes a solution.","description":"Deletes a solution and its saved versions. Requires the planner-user or planner-admin role in the tenant of the token, and only the user who created the solution can delete it; other users, including planner-admin, receive 403. Sends a `solution-deleted` event.\n","responses":{"200":{"description":"Deletion result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolutionDeleteResult"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/solutions/{id}/analyze":{"parameters":[{"$ref":"#/components/parameters/PlannerSolutionId"}],"post":{"tags":["Solution"],"summary":"Analyzes a solution.","description":"Extracts concepts, matches patterns, and generates hypotheses and next steps for the problem statement. Requires the planner-user or planner-admin role in the tenant of the token, and the user must have created the solution or be a planner-admin. Responds 400 if neither `text` nor the solution has a problem statement. Sends a `solution-updated` event.\n","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","maxLength":20000,"description":"Problem statement to analyze; replaces the solution's. Defaults to the solution's problem statement."},"mode":{"$ref":"#/components/schemas/AnalysisMode"},"checkpoint":{"$ref":"#/components/schemas/Checkpoint"}}},"example":{"text":"Applicants apply for a small business grant. Staff review each application and decide.","mode":"rules"}}}},"responses":{"200":{"description":"Analyzed solution.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Solution"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/solutions/{id}/blueprint":{"parameters":[{"$ref":"#/components/parameters/PlannerSolutionId"}],"post":{"tags":["Solution"],"summary":"Generates the project blueprint.","description":"Generates the complete project blueprint: architecture, ADSP service mapping, components to set up, specialist notes, workflows, data and governance, delivery, and acceptance criteria. Saved consultations are reused. Requires the planner-user or planner-admin role in the tenant of the token, and the user must have created the solution or be a planner-admin. Responds 400 if the solution hasn't been analyzed. Sends `solution-updated` events.\n","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"$ref":"#/components/schemas/AnalysisMode"},"refreshConsultations":{"type":"boolean","description":"Run fresh specialist consultations instead of reusing saved ones."},"checkpoint":{"$ref":"#/components/schemas/Checkpoint"}}},"example":{"mode":"ai","refreshConsultations":false}}}},"responses":{"200":{"description":"The solution with state.blueprint populated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Solution"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/solutions/{id}/chat":{"parameters":[{"$ref":"#/components/parameters/PlannerSolutionId"}],"post":{"tags":["Solution"],"summary":"Sends a message to the planner about a solution.","description":"Sends a message to the planner. The analysis is refined using the message, the answers, and the conversation so far, and the message and the planner's reply are appended to `state.conversation`. The response is the updated solution as JSON, not a stream. Requires the planner-user or planner-admin role in the tenant of the token, and the user must have created the solution or be a planner-admin. Sends a `solution-updated` event.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":20000,"description":"Trimmed before validation."},"mode":{"$ref":"#/components/schemas/AnalysisMode"}},"required":["message"]},"example":{"message":"Applicants can also appeal a decision.","mode":"ai"}}}},"responses":{"200":{"description":"The solution with the refined analysis and the reply in state.conversation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Solution"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/solutions/{id}/components/{order}/review":{"parameters":[{"$ref":"#/components/parameters/PlannerSolutionId"},{"name":"order","in":"path","required":true,"description":"The component's order in the blueprint.","schema":{"type":"integer","minimum":1},"example":1}],"put":{"tags":["Solution"],"summary":"Records the review of a blueprint component.","description":"Records the user's review of a blueprint component. Rejected components are left out of the export. Requires the planner-user or planner-admin role in the tenant of the token, and the user must have created the solution or be a planner-admin. Responds 404 if the blueprint has no component with the order. Sends a `solution-updated` event.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["review"],"properties":{"review":{"type":"string","enum":["not-reviewed","approved","rejected"]}}},"example":{"review":"approved"}}}},"responses":{"200":{"description":"The solution with the component's review updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Solution"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/solutions/{id}/consult/{service}":{"parameters":[{"$ref":"#/components/parameters/PlannerSolutionId"},{"$ref":"#/components/parameters/PlannerSpecialistService"}],"post":{"tags":["Solution","Specialist"],"summary":"Consults a service specialist about a solution.","description":"Consults a service specialist about fit, questions, dependencies, and risks, and records the exchange in the caller's chat with the specialist. Requires the planner-user or planner-admin role in the tenant of the token, and the user must have created the solution or be a planner-admin. Responds 404 for an unknown specialist, and 400 when the chat is full (200 messages). Sends a `solution-updated` event.\n","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string","maxLength":2000},"proposal":{"type":"string","maxLength":5000,"description":"A plan for the specialist to validate."},"mode":{"$ref":"#/components/schemas/AnalysisMode"}}},"example":{"question":"Can applicants save a draft and return later?","mode":"ai"}}}},"responses":{"200":{"description":"Consultation result and the updated solution.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsultResult"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/solutions/{id}/discovery":{"parameters":[{"$ref":"#/components/parameters/PlannerSolutionId"}],"post":{"tags":["Solution"],"summary":"Advances the discovery conversation.","description":"Advances the discovery conversation. The planner replies with clarifying questions and scores six factors; the solution is analyzed and presented once confidence reaches 75% and every factor is at least 40%, or when `force` is set. Requires the planner-user or planner-admin role in the tenant of the token, and the user must have created the solution or be a planner-admin. Responds 400 if the solution has no problem statement. Sends a `solution-updated` event.\n","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":20000,"description":"The user's reply to the planner's questions. Trimmed before validation."},"mode":{"$ref":"#/components/schemas/AnalysisMode"},"force":{"type":"boolean","description":"Present the solution regardless of confidence."},"restart":{"type":"boolean","description":"Clear the discovery thread and start over."}}},"example":{"message":"Small businesses apply online. Program staff review and approve each application."}}}},"responses":{"200":{"description":"The solution with state.discovery and state.confidence updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Solution"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/solutions/{id}/export":{"parameters":[{"$ref":"#/components/parameters/PlannerSolutionId"}],"get":{"tags":["Solution"],"summary":"Downloads a solution.","description":"Downloads the current solution as a JSON attachment (`Content-Disposition: attachment; filename=\"planner-{id}.json\"`), including unsaved changes and the user's specialist chats about it. Requires the planner-user or planner-admin role in the tenant of the token, and the user must have created the solution or be a planner-admin.\n","responses":{"200":{"description":"JSON attachment.","headers":{"Content-Disposition":{"schema":{"type":"string"},"example":"attachment; filename=\"planner-5f0a1c52-7d0e-4c1b-9a8e-3b6f2d1e4a70.json\""}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolutionExport"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/solutions/{id}/versions":{"parameters":[{"$ref":"#/components/parameters/PlannerSolutionId"}],"get":{"tags":["Solution"],"summary":"Retrieves the saved versions of a solution.","description":"Retrieves the saved versions of a solution, newest first, and whether the solution has unsaved changes. Requires the planner-user or planner-admin role in the tenant of the token, and the user must have created the solution or be a planner-admin.\n","responses":{"200":{"description":"Versions retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolutionVersionList"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/solutions/{id}/versions/checkpoint":{"parameters":[{"$ref":"#/components/parameters/PlannerSolutionId"}],"post":{"tags":["Solution"],"summary":"Saves a version of a solution.","description":"Saves a new version of the solution if it changed since the latest saved version; otherwise returns the latest version. Use it after a series of calls made with `checkpoint` false. Requires the planner-user or planner-admin role in the tenant of the token, and the user must have created the solution or be a planner-admin. Sends a `solution-updated` event when a version is saved.\n","responses":{"200":{"description":"The saved, or latest, version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolutionVersionSummary"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/solutions/{id}/versions/{number}":{"parameters":[{"$ref":"#/components/parameters/PlannerSolutionId"},{"$ref":"#/components/parameters/PlannerVersionNumber"}],"patch":{"tags":["Solution"],"summary":"Renames a saved version.","description":"Renames a saved version of a solution. Requires the planner-user or planner-admin role in the tenant of the token, and the user must have created the solution or be a planner-admin. Responds 404 if the version doesn't exist. Sends a `solution-updated` event.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":100,"description":"New name, trimmed. An empty name resets it to `Version {number}`."}},"required":["name"]},"example":{"name":"Before review"}}}},"responses":{"200":{"description":"Version renamed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolutionVersionSummary"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/solutions/{id}/versions/{number}/export":{"parameters":[{"$ref":"#/components/parameters/PlannerSolutionId"},{"$ref":"#/components/parameters/PlannerVersionNumber"}],"get":{"tags":["Solution"],"summary":"Downloads a saved version of a solution.","description":"Downloads a saved version as a JSON attachment (`Content-Disposition: attachment; filename=\"planner-{id}-v{number}.json\"`). Requires the planner-user or planner-admin role in the tenant of the token, and the user must have created the solution or be a planner-admin. Responds 404 if the version doesn't exist.\n","responses":{"200":{"description":"JSON attachment.","headers":{"Content-Disposition":{"schema":{"type":"string"},"example":"attachment; filename=\"planner-5f0a1c52-7d0e-4c1b-9a8e-3b6f2d1e4a70-v2.json\""}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolutionExport"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/specialists":{"get":{"tags":["Specialist"],"summary":"Retrieves the service specialists.","description":"Retrieves the service specialists known to the planner. The list is the same for every tenant. Requires the planner-user or planner-admin role in the tenant of the token.\n","responses":{"200":{"description":"Specialists retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecialistList"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"}}}},"/planner/v1/specialists/chats":{"get":{"tags":["Specialist"],"summary":"Lists the caller's saved specialist chats.","description":"Lists the specialist chats of the calling user in the tenant of the token. Chats are private: planner-admin doesn't see other users' chats. Requires the planner-user or planner-admin role.\n","parameters":[{"$ref":"#/components/parameters/PlannerChatService"},{"$ref":"#/components/parameters/PlannerChatSolutionId"}],"responses":{"200":{"description":"Chat summaries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecialistChatSummaryList"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"}}}},"/planner/v1/specialists/chats/export":{"get":{"tags":["Specialist"],"summary":"Downloads the caller's saved chats.","description":"Downloads the full history of the calling user's specialist chats as a JSON attachment (`Content-Disposition: attachment; filename=\"planner-specialist-chats.json\"`). Requires the planner-user or planner-admin role in the tenant of the token.\n","parameters":[{"$ref":"#/components/parameters/PlannerChatService"},{"$ref":"#/components/parameters/PlannerChatSolutionId"}],"responses":{"200":{"description":"JSON attachment.","headers":{"Content-Disposition":{"schema":{"type":"string"},"example":"attachment; filename=\"planner-specialist-chats.json\""}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecialistChatsExport"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"}}}},"/planner/v1/specialists/chats/{chatId}":{"parameters":[{"$ref":"#/components/parameters/PlannerChatId"}],"get":{"tags":["Specialist"],"summary":"Retrieves a saved chat.","description":"Retrieves a saved chat of the calling user, with its full history. Requires the planner-user or planner-admin role in the tenant of the token. Chats of other users respond 404.\n","responses":{"200":{"description":"The chat.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecialistChat"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}},"delete":{"tags":["Specialist"],"summary":"Deletes a saved chat.","description":"Deletes a saved chat of the calling user. Requires the planner-user or planner-admin role in the tenant of the token. Chats of other users respond 404.\n","responses":{"204":{"description":"Deleted."},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/specialists/chats/{chatId}/export":{"parameters":[{"$ref":"#/components/parameters/PlannerChatId"}],"get":{"tags":["Specialist"],"summary":"Downloads a saved chat.","description":"Downloads a saved chat of the calling user as a JSON attachment (`Content-Disposition: attachment; filename=\"planner-chat-{chatId}.json\"`). Requires the planner-user or planner-admin role in the tenant of the token. Chats of other users respond 404.\n","responses":{"200":{"description":"JSON attachment.","headers":{"Content-Disposition":{"schema":{"type":"string"},"example":"attachment; filename=\"planner-chat-b7e2f6a1-4c3d-4e8f-9a1b-2c3d4e5f6a7b.json\""}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecialistChatExport"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}},"/planner/v1/specialists/{service}/chat":{"parameters":[{"$ref":"#/components/parameters/PlannerSpecialistService"}],"post":{"tags":["Specialist"],"summary":"Converses directly with a service specialist.","description":"Converses with a service specialist (ask, recommend, design, validate, or sample code), without a planner session. The exchange is saved to the caller's chat history, which is private to the caller. Requires the planner-user or planner-admin role in the tenant of the token. With `solutionId`, the user must have created the solution or be a planner-admin. Responds 404 for an unknown specialist, chat, or solution, and 400 when the chat belongs to another specialist or is full (200 messages).\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string","minLength":1,"maxLength":5000,"description":"Trimmed before validation."},"chatId":{"type":"string","format":"uuid","description":"Continue a saved chat; omit to start a new one."},"intent":{"type":"string","enum":["ask","recommend","design","validate","sample"],"default":"ask"},"solutionId":{"type":"string","format":"uuid","description":"Give the specialist the context of a solution. Ignored when the chat has a solution."},"mode":{"$ref":"#/components/schemas/AnalysisMode"}}},"example":{"message":"Do applicants need to sign in?","intent":"ask","solutionId":"5f0a1c52-7d0e-4c1b-9a8e-3b6f2d1e4a70"}}}},"responses":{"200":{"description":"Specialist reply, including the chatId of the saved chat.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecialistChatReply"}}}},"400":{"$ref":"#/components/responses/PlannerBadRequest"},"401":{"$ref":"#/components/responses/PlannerUnauthorized"},"403":{"$ref":"#/components/responses/PlannerForbidden"},"404":{"$ref":"#/components/responses/PlannerNotFound"}}}}},"components":{"securitySchemes":{"accessToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"parameters":{"PlannerChatId":{"name":"chatId","description":"ID of the saved specialist chat.","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"b7e2f6a1-4c3d-4e8f-9a1b-2c3d4e5f6a7b"},"PlannerChatService":{"name":"service","description":"Only include chats with the specialist of this service.","in":"query","required":false,"schema":{"type":"string"},"example":"form-service"},"PlannerChatSolutionId":{"name":"solutionId","description":"Only include chats about this solution.","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"example":"5f0a1c52-7d0e-4c1b-9a8e-3b6f2d1e4a70"},"PlannerPatternId":{"name":"patternId","description":"ID of the business pattern, for example a built-in pattern such as `case-management`.","in":"path","required":true,"schema":{"type":"string"},"example":"case-management"},"PlannerSolutionId":{"name":"id","description":"ID of the solution.","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"5f0a1c52-7d0e-4c1b-9a8e-3b6f2d1e4a70"},"PlannerSpecialistService":{"name":"service","description":"Service of the specialist, as returned by `GET /planner/v1/specialists`.","in":"path","required":true,"schema":{"type":"string"},"example":"form-service"},"PlannerVersionNumber":{"name":"number","description":"Number of the saved version. Versions are numbered from 1.","in":"path","required":true,"schema":{"type":"integer","minimum":1},"example":2}},"responses":{"PlannerBadRequest":{"description":"Request is invalid, for example a path, query, or body parameter failed validation. Also returned when there is no tenant context, which is the case for core (platform) users that don't set a tenant.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlannerError"},"example":{"errorMessage":"Validation failed with error(s): id (params) - Invalid value"}}}},"PlannerForbidden":{"description":"User does not have the role required for the operation in the tenant, or is not permitted to act on the solution. Core (platform) users are not granted access.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlannerError"},"example":{"errorMessage":"User Test User (ID: 0d7c3f5e-1b2a-4c6d-8e9f-0a1b2c3d4e5f) not permitted to access planner."}}}},"PlannerNotFound":{"description":"Resource not found, or it belongs to another tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlannerError"},"example":{"errorMessage":"solution with ID '5f0a1c52-7d0e-4c1b-9a8e-3b6f2d1e4a70' could not be found."}}}},"PlannerUnauthorized":{"description":"Request does not include a valid bearer token.","content":{"text/plain":{"schema":{"type":"string"},"example":"Unauthorized"}}}},"schemas":{"AnalysisMode":{"type":"string","enum":["ai","rules"],"description":"Analysis mode. Defaults to `ai` when a model is configured, otherwise `rules`. When AI is requested but isn't available or fails, the rule-based result is used and a warning is recorded.\n"},"AnalysisOptions":{"type":"object","properties":{"modes":{"type":"array","description":"Analysis modes available. `ai` is only available when a model is configured.","items":{"type":"string","enum":["ai","rules"]}},"defaultMode":{"type":"string","enum":["ai","rules"]},"model":{"type":"string","description":"Name of the configured model. Absent when AI analysis isn't configured."}},"example":{"modes":["ai","rules"],"defaultMode":"ai","model":"GOA-Default"}},"BusinessPattern":{"allOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{1,59}$"},"source":{"type":"string","readOnly":true,"enum":["built-in","customized","custom"],"description":"`built-in` patterns ship with the service, `customized` patterns are built-in patterns overridden by the tenant, and `custom` patterns are created by the tenant.\n"}}},{"$ref":"#/components/schemas/BusinessPatternInput"}],"example":{"id":"grant-application","source":"custom","name":"Grant application","description":"Applicants apply for funding, staff assess eligibility and award grants.","domainLanguage":["grant","applicant","funding","award"],"commonFeatures":["Online application","Eligibility assessment"],"strongSignals":[{"description":"Applicants apply for funding","keywords":["grant","funding"]}],"weakSignals":[],"serviceMappings":[{"service":"form-service","reason":"Collects the application."}],"clarifyingQuestions":["Who assesses the applications?"],"assumptions":[],"knownUnknowns":[]}},"BusinessPatternInput":{"type":"object","description":"Business pattern. Text fields are trimmed; strings in lists are truncated to 500 characters and fields that aren't listed are ignored.\n","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":2000},"domainLanguage":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string"}},"commonFeatures":{"type":"array","maxItems":50,"items":{"type":"string"}},"strongSignals":{"type":"array","minItems":1,"maxItems":50,"items":{"$ref":"#/components/schemas/Signal"}},"weakSignals":{"type":"array","maxItems":50,"items":{"$ref":"#/components/schemas/Signal"}},"serviceMappings":{"type":"array","minItems":1,"maxItems":30,"items":{"type":"object","properties":{"service":{"type":"string","description":"Service of an ADSP specialist, as returned by `GET /planner/v1/specialists`."},"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["service","reason"]}},"clarifyingQuestions":{"type":"array","maxItems":50,"items":{"type":"string"}},"assumptions":{"type":"array","maxItems":50,"items":{"type":"string"}},"knownUnknowns":{"type":"array","maxItems":50,"items":{"type":"string"}}},"required":["name","domainLanguage","strongSignals","serviceMappings"]},"Checkpoint":{"type":"boolean","default":true,"description":"Set false to skip auto-saving a version, for example when more calls will follow in the same action."},"ConsultResult":{"type":"object","properties":{"service":{"type":"string"},"fit":{"type":"string","enum":["recommended","optional","not-indicated"]},"reason":{"type":"string"},"questions":{"type":"array","items":{"type":"string"}},"dependencies":{"type":"array","items":{"type":"object","properties":{"service":{"type":"string"},"satisfied":{"type":"boolean"}}}},"risks":{"type":"array","items":{"type":"string"}},"advice":{"type":"string","description":"Present when the AI specialist contributed guidance."},"supports":{"type":"array","items":{"type":"string"}},"constraints":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","description":"Present when a `proposal` was validated.","properties":{"verdict":{"type":"string","enum":["sound","needs-changes","not-a-fit"]},"findings":{"type":"array","items":{"type":"string"}}}},"solution":{"$ref":"#/components/schemas/Solution"}},"example":{"service":"form-service","fit":"recommended","reason":"Recommended by the leading hypothesis to collect applications.","questions":["Who completes the form","and is authentication required?"],"dependencies":[{"service":"file-service","satisfied":false}],"risks":["Forms that collect attachments need file types configured first."],"solution":{"id":"5f0a1c52-7d0e-4c1b-9a8e-3b6f2d1e4a70","name":"Small business grant","status":"analyzed","version":3}}},"ConversationMessage":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string"},"at":{"type":"string","format":"date-time"}}},"ExtractedText":{"type":"object","properties":{"text":{"type":"string","description":"Text extracted from the file, to use as the problem statement."}},"example":{"text":"Applicants apply for a small business grant. Staff review each application and decide on the award."}},"PatternList":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/BusinessPattern"}}},"example":{"results":[{"id":"case-management","source":"built-in","name":"Case management","description":"Staff manage cases through intake, assessment and decision.","domainLanguage":["case","caseworker","intake"],"commonFeatures":["Case intake","Assignment"],"strongSignals":[{"description":"Staff work cases through a lifecycle","keywords":["case","caseworker"]}],"weakSignals":[],"serviceMappings":[{"service":"form-service","reason":"Collects intake information."}],"clarifyingQuestions":["Who works the cases?"],"assumptions":[],"knownUnknowns":[]}]}},"PatternMatch":{"type":"object","properties":{"patternId":{"type":"string"},"patternName":{"type":"string"},"score":{"type":"number","description":"Each matched domain term counts 1 and each strong signal counts 2."},"level":{"type":"string","enum":["high","medium","low"]},"matchedLanguage":{"type":"array","items":{"type":"string"}},"matchedSignals":{"type":"array","items":{"type":"string"}},"explanation":{"type":"string"}}},"PatternMatchResult":{"type":"object","properties":{"matches":{"type":"array","description":"Matches ranked by score, highest first.","items":{"$ref":"#/components/schemas/PatternMatch"}},"questions":{"type":"array","description":"Clarifying questions of the best match when its confidence is low; otherwise empty.","items":{"type":"string"}}},"example":{"matches":[{"patternId":"case-management","patternName":"Case management","score":4,"level":"medium","matchedLanguage":["case","caseworker"],"matchedSignals":["Staff work cases through a lifecycle"],"explanation":"Matched 2 domain terms and 1 strong signal."}],"questions":[]}},"PlannerError":{"type":"object","properties":{"errorMessage":{"type":"string"}}},"PlannerTenantId":{"type":"object","readOnly":true,"description":"The tenant ID, serialized as its URN parts.","properties":{"type":{"type":"string"},"namespace":{"type":"string"},"service":{"type":"string"},"api":{"type":"string"},"resource":{"type":"string"}},"example":{"type":"resource","namespace":"platform","service":"tenant-service","api":"v2","resource":"/tenants/61f2e3a8c9b1d2e3f4a5b6c7"}},"Signal":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":500},"keywords":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"string"}}},"required":["description","keywords"]},"Solution":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"tenantId":{"$ref":"#/components/schemas/PlannerTenantId"},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","nullable":true},"scenario":{"type":"string","enum":["new","prototype","existing-app","reconfigure"]},"status":{"type":"string","enum":["draft","analyzed","in-progress","completed","archived"]},"createdById":{"type":"string","readOnly":true},"createdByName":{"type":"string","readOnly":true},"createdOn":{"type":"string","format":"date-time","readOnly":true},"updatedOn":{"type":"string","format":"date-time","readOnly":true},"version":{"type":"integer","readOnly":true,"description":"Number of the latest saved version."},"state":{"$ref":"#/components/schemas/SolutionState"}},"example":{"id":"5f0a1c52-7d0e-4c1b-9a8e-3b6f2d1e4a70","tenantId":{"type":"resource","namespace":"platform","service":"tenant-service","api":"v2","resource":"/tenants/61f2e3a8c9b1d2e3f4a5b6c7"},"name":"Small business grant","description":"Online applications for the small business grant.","scenario":"new","status":"analyzed","createdById":"0d7c3f5e-1b2a-4c6d-8e9f-0a1b2c3d4e5f","createdByName":"Test User","createdOn":"2026-10-01T15:04:05.000Z","updatedOn":"2026-10-01T15:20:00.000Z","version":2,"state":{"problemStatement":"Applicants apply for a small business grant. Staff review each application and decide.","concepts":[{"id":"9c1d2e3f-4a5b-4c6d-8e7f-a1b2c3d4e5f6","type":"actor","name":"Applicant","source":"extracted"}],"decisions":[],"questions":[{"id":"3e4f5a6b-7c8d-4e9f-a0b1-c2d3e4f5a6b7","question":"Who assesses the applications?","raisedBy":"planner","status":"open"}],"patternMatches":[],"hypotheses":[],"specialists":[],"nextSteps":[],"analysis":{"mode":"rules","analyzedOn":"2026-10-01T15:20:00.000Z"}}}},"SolutionDeleteResult":{"type":"object","properties":{"deleted":{"type":"boolean"}},"example":{"deleted":true}},"SolutionExport":{"type":"object","description":"A solution, or one of its saved versions, for download. Components the user rejected in the blueprint are left out of `state.blueprint.components`.\n","properties":{"exportedAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"scenario":{"type":"string"},"status":{"type":"string"},"createdByName":{"type":"string"},"createdOn":{"type":"string","format":"date-time"},"version":{"type":"integer","description":"Number of the exported version, or of the latest saved version when there are unsaved changes."},"versionName":{"type":"string"},"unsavedChanges":{"type":"boolean","description":"True when the export includes changes made since the latest saved version."},"lastUpdated":{"type":"string","format":"date-time"},"updatedOn":{"type":"string","format":"date-time"},"initial":{"type":"boolean","description":"True for the first version."},"changedSections":{"type":"array","description":"Sections changed since the previous version.","items":{"type":"string"}},"blueprintOutOfDate":{"type":"boolean"},"specialistChats":{"type":"array","items":{"type":"object"}},"state":{"$ref":"#/components/schemas/SolutionState"}},"example":{"exportedAt":"2026-10-02T09:00:00.000Z","id":"5f0a1c52-7d0e-4c1b-9a8e-3b6f2d1e4a70","name":"Small business grant","description":"Online applications for the small business grant.","scenario":"new","status":"analyzed","createdByName":"Test User","createdOn":"2026-10-01T15:04:05.000Z","version":2,"versionName":"Version 2","unsavedChanges":false,"lastUpdated":"2026-10-01T15:20:00.000Z","updatedOn":"2026-10-01T15:20:00.000Z","initial":false,"changedSections":["Problem statement","Analysis"],"blueprintOutOfDate":false,"specialistChats":[],"state":{"problemStatement":"Applicants apply for a small business grant. Staff review each application and decide.","concepts":[],"decisions":[],"questions":[],"patternMatches":[],"hypotheses":[],"specialists":[],"nextSteps":[]}}},"SolutionList":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Solution"}},"page":{"type":"object","properties":{"after":{"type":"string"},"next":{"type":"string","description":"Cursor for the next page. Pass it as `after` to read the next page."},"size":{"type":"integer"}}}},"example":{"results":[{"id":"5f0a1c52-7d0e-4c1b-9a8e-3b6f2d1e4a70","tenantId":{"type":"resource","namespace":"platform","service":"tenant-service","api":"v2","resource":"/tenants/61f2e3a8c9b1d2e3f4a5b6c7"},"name":"Small business grant","scenario":"new","status":"draft","createdById":"0d7c3f5e-1b2a-4c6d-8e9f-0a1b2c3d4e5f","createdByName":"Test User","createdOn":"2026-10-01T15:04:05.000Z","updatedOn":"2026-10-01T15:04:05.000Z","version":1,"state":{"problemStatement":"Applicants apply for a small business grant.","concepts":[],"decisions":[],"questions":[],"patternMatches":[],"hypotheses":[],"specialists":[],"nextSteps":[]}}],"page":{"next":"MTA=","size":1}}},"SolutionState":{"type":"object","description":"Structured state of the planning work. Most of it is produced by the planner: analysis, discovery, blueprint, pattern matches, hypotheses and next steps.\n","properties":{"problemStatement":{"type":"string"},"problemStatementUpdatedOn":{"type":"string","format":"date-time"},"concepts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["actor","goal","activity","decision","evidence","business-rule","constraint","evaluation-criterion","workflow","outcome","document","event","external-system","assumption","unknown"]},"name":{"type":"string"},"description":{"type":"string"},"source":{"type":"string","enum":["user","extracted","pattern","assumed"]}}}},"decisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"decision":{"type":"string"},"reason":{"type":"string"},"decidedOn":{"type":"string","format":"date-time"},"decidedBy":{"type":"string"}}}},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"question":{"type":"string"},"raisedBy":{"type":"string"},"status":{"type":"string","enum":["open","answered"]},"answer":{"type":"string"}}}},"patternMatches":{"type":"array","items":{"$ref":"#/components/schemas/PatternMatch"}},"hypotheses":{"type":"array","items":{"type":"object"}},"specialists":{"type":"array","items":{"type":"object","properties":{"service":{"type":"string"},"status":{"type":"string","enum":["not-started","consulted","in-workspace","completed"]},"updatedOn":{"type":"string","format":"date-time"}}}},"nextSteps":{"type":"array","items":{"type":"object"}},"analysis":{"type":"object","properties":{"mode":{"type":"string","enum":["ai","rules"]},"model":{"type":"string"},"warning":{"type":"string","description":"Set when AI analysis was requested but the rule-based fallback produced the result."},"analyzedOn":{"type":"string","format":"date-time"}}},"conversation":{"type":"array","items":{"$ref":"#/components/schemas/ConversationMessage"}},"discovery":{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/ConversationMessage"}},"confidence":{"type":"number","minimum":0,"maximum":100},"threshold":{"type":"number"},"factors":{"type":"array","items":{"type":"object"}},"ready":{"type":"boolean"},"mode":{"type":"string","enum":["ai","rules"]},"warning":{"type":"string"},"updatedOn":{"type":"string","format":"date-time"}}},"blueprint":{"type":"object","description":"The project blueprint, set by `POST /planner/v1/solutions/{id}/blueprint`."},"confidence":{"type":"object","properties":{"score":{"type":"number"},"threshold":{"type":"number"},"factors":{"type":"array","items":{"type":"object"}}}}}},"SolutionVersionList":{"type":"object","properties":{"latest":{"type":"integer","description":"Number of the latest saved version."},"unsavedChanges":{"type":"boolean","description":"True when the solution has changed since the latest saved version."},"results":{"type":"array","items":{"type":"object","properties":{"number":{"type":"integer"},"name":{"type":"string"},"createdOn":{"type":"string","format":"date-time"},"changedSections":{"type":"array","items":{"type":"string"}}}}}},"example":{"latest":2,"unsavedChanges":false,"results":[{"number":2,"name":"Version 2","createdOn":"2026-10-01T15:20:00.000Z","changedSections":["Problem statement","Analysis"]},{"number":1,"name":"Version 1","createdOn":"2026-10-01T15:04:05.000Z","changedSections":[]}]}},"SolutionVersionSummary":{"type":"object","properties":{"number":{"type":"integer","minimum":1},"name":{"type":"string"},"createdOn":{"type":"string","format":"date-time"}},"example":{"number":2,"name":"Before review","createdOn":"2026-10-01T15:20:00.000Z"}},"Specialist":{"type":"object","properties":{"service":{"type":"string"},"displayName":{"type":"string"},"purpose":{"type":"string"},"workspacePath":{"type":"string","description":"Path of the service's workspace in tenant admin."},"questions":{"type":"array","items":{"type":"string"}},"dependsOn":{"type":"array","items":{"type":"string"}},"risks":{"type":"array","items":{"type":"string"}},"order":{"type":"integer"}}},"SpecialistChat":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"service":{"type":"string"},"solutionId":{"type":"string","format":"uuid"},"title":{"type":"string"},"createdByName":{"type":"string"},"createdOn":{"type":"string","format":"date-time"},"updatedOn":{"type":"string","format":"date-time"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/StoredChatMessage"}}},"example":{"id":"b7e2f6a1-4c3d-4e8f-9a1b-2c3d4e5f6a7b","service":"form-service","solutionId":"5f0a1c52-7d0e-4c1b-9a8e-3b6f2d1e4a70","title":"Do applicants need to sign in?","createdByName":"Test User","createdOn":"2026-10-01T15:04:05.000Z","updatedOn":"2026-10-01T15:05:00.000Z","messages":[{"role":"user","content":"Do applicants need to sign in?","at":"2026-10-01T15:04:05.000Z","intent":"ask"},{"role":"assistant","content":"Applicants can complete the form anonymously, but drafts need a signed-in user.","at":"2026-10-01T15:04:06.000Z","intent":"ask","mode":"ai","model":"GOA-Default"}]}},"SpecialistChatExport":{"allOf":[{"type":"object","properties":{"exportedAt":{"type":"string","format":"date-time"}}},{"$ref":"#/components/schemas/SpecialistChat"}],"example":{"exportedAt":"2026-10-02T09:00:00.000Z","id":"b7e2f6a1-4c3d-4e8f-9a1b-2c3d4e5f6a7b","service":"form-service","title":"Do applicants need to sign in?","createdByName":"Test User","createdOn":"2026-10-01T15:04:05.000Z","updatedOn":"2026-10-01T15:05:00.000Z","messages":[{"role":"user","content":"Do applicants need to sign in?","at":"2026-10-01T15:04:05.000Z","intent":"ask"}]}},"SpecialistChatReply":{"type":"object","properties":{"chatId":{"type":"string","format":"uuid","description":"ID of the saved chat. Pass it as `chatId` to continue the conversation."},"service":{"type":"string"},"mode":{"type":"string","enum":["ai","rules"]},"model":{"type":"string"},"warning":{"type":"string","description":"Set when AI was requested but a rule-based reply was given."},"reply":{"type":"string"},"suggestions":{"type":"array","items":{"type":"string"}},"samples":{"type":"array","items":{"type":"object","properties":{"language":{"type":"string"},"title":{"type":"string"},"code":{"type":"string"}}}},"validation":{"type":"object","properties":{"verdict":{"type":"string"},"findings":{"type":"array","items":{"type":"string"}}}},"followUps":{"type":"array","items":{"type":"string"}},"solution":{"allOf":[{"$ref":"#/components/schemas/Solution"}],"description":"The updated solution, when the exchange changed the solution's discovery confidence."}},"example":{"chatId":"b7e2f6a1-4c3d-4e8f-9a1b-2c3d4e5f6a7b","service":"form-service","mode":"rules","reply":"Here is what this service is for and what to settle first.\n\nForm service: Form definitions, drafts, submissions, and review dispositions.","suggestions":["Forms that collect attachments need file types configured first."],"samples":[],"followUps":["Who completes the form","and is authentication required?"]}},"SpecialistChatSummaryList":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"service":{"type":"string"},"solutionId":{"type":"string","format":"uuid"},"title":{"type":"string"},"createdOn":{"type":"string","format":"date-time"},"updatedOn":{"type":"string","format":"date-time"},"messageCount":{"type":"integer"}}}}},"example":{"results":[{"id":"b7e2f6a1-4c3d-4e8f-9a1b-2c3d4e5f6a7b","service":"form-service","solutionId":"5f0a1c52-7d0e-4c1b-9a8e-3b6f2d1e4a70","title":"Do applicants need to sign in?","createdOn":"2026-10-01T15:04:05.000Z","updatedOn":"2026-10-01T15:05:00.000Z","messageCount":2}]}},"SpecialistChatsExport":{"type":"object","properties":{"exportedAt":{"type":"string","format":"date-time"},"chats":{"type":"array","items":{"$ref":"#/components/schemas/SpecialistChat"}}},"example":{"exportedAt":"2026-10-02T09:00:00.000Z","chats":[{"id":"b7e2f6a1-4c3d-4e8f-9a1b-2c3d4e5f6a7b","service":"form-service","title":"Do applicants need to sign in?","createdByName":"Test User","createdOn":"2026-10-01T15:04:05.000Z","updatedOn":"2026-10-01T15:05:00.000Z","messages":[{"role":"user","content":"Do applicants need to sign in?","at":"2026-10-01T15:04:05.000Z","intent":"ask"}]}]}},"SpecialistList":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Specialist"}}},"example":{"results":[{"service":"form-service","displayName":"Form service","purpose":"Form definitions, drafts, submissions, and review dispositions.","workspacePath":"/admin/services/form","questions":["Who completes the form","and is authentication required?"],"dependsOn":["file-service"],"risks":["Forms that collect attachments need file types configured first."],"order":3}]}},"StoredChatMessage":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string"},"at":{"type":"string","format":"date-time"},"intent":{"type":"string"},"mode":{"type":"string","enum":["ai","rules"]},"model":{"type":"string"},"warning":{"type":"string"},"suggestions":{"type":"array","items":{"type":"string"}},"followUps":{"type":"array","items":{"type":"string"}}}}}},"security":[{"accessToken":[]}],"tags":[{"name":"Solution","description":"Managing solutions and the planner workflow"},{"name":"Pattern","description":"Business patterns known to the planner"},{"name":"Specialist","description":"Service specialists the planner consults"}]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/adsp-sdk-mcp-server",
3
- "version": "1.39.5",
3
+ "version": "1.39.7",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Government of Alberta - MCP server for ADSP documentation and Node SDK reference lookup.",
6
6
  "repository": "https://github.com/GovAlta/adsp-monorepo",
package/provenance.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "kind": "release",
3
- "builtAt": "2026-11-20T14:50:40.603Z",
4
- "sourceCommit": "757a35b7c7e1e0f89effbf9b7b8dbda4d603a1a0",
5
- "latestRelease": "1.39.4",
3
+ "builtAt": "2026-11-20T18:58:19.456Z",
4
+ "sourceCommit": "f4b590f69c374d2819fc9dda633c74a739bb3b42",
5
+ "latestRelease": "1.39.6",
6
6
  "docsCommit": "757a35b7c7e1e0f89effbf9b7b8dbda4d603a1a0",
7
7
  "sdk": {
8
8
  "version": "2.36.1",