@abgov/adsp-sdk-mcp-server 1.39.6 → 1.39.8

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":"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"}]}
@@ -1 +1 @@
1
- {"openapi":"3.0.0","info":{"title":"Push service","version":"0.0.0","description":"The push service is a gateway for push mode connections to projections of domain events. Server side events and WebSockets are supported."},"paths":{"/stream/v1/streams":{"get":{"tags":["Stream"],"description":"Retrieves the streams that the caller can subscribe to, keyed by stream ID. The result combines the tenant's streams with the streams in the core (platform) configuration; when both have a stream with the same ID, the core stream is used. Core streams listed for a tenant only include that tenant's events.\n\nAny caller can list streams, including anonymous callers, but the result only includes streams the caller can subscribe to: public streams (`publicSubscribe`), and streams for which the caller has the `stream-listener` role or one of the stream's `subscriberRoles`. Those roles must be held in the stream's tenant, or by a core user.\n\nThe tenant is the `tenant` parameter if it is set, otherwise the tenant of the caller's token. Without either, the request responds 400.\n","parameters":[{"$ref":"#/components/parameters/PushStreamsTenant"}],"responses":{"200":{"description":"Streams that the caller can subscribe to, keyed by stream ID.","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Stream"}},"example":{"application-health":{"id":"application-health","name":"Application health","description":"Events indicating the health of my applications.","publicSubscribe":false,"subscriberRoles":["urn:ads:my-tenant:my-app:health-reader"],"events":[{"namespace":"status-service","name":"health-check-started"}]}}}}},"400":{"$ref":"#/components/responses/PushBadRequest"}}}},"/stream/v1/streams/{stream}":{"get":{"tags":["Stream"],"description":"Subscribes to a stream using server-sent events. The response stays open, and each domain event that matches the stream and the `criteria` parameter is sent as a `data:` line holding the JSON stream item. Messages use the default `message` event type.\n\nThe caller must be allowed to subscribe to the stream: the stream is public (`publicSubscribe`), or the caller has the `stream-listener` role or one of the stream's `subscriberRoles`, held in the stream's tenant or by a core user. Anonymous callers can only subscribe to public streams.\n\nThe tenant is the tenant named in the `tenant` parameter, otherwise the tenant of the caller's token. Anonymous and tenant callers without either receive 400. A core user without a tenant subscribes to a cross-tenant stream from the core configuration, which needs the `stream-listener` role or one of the stream's `subscriberRoles`, and includes matching events from every tenant.\n\nThe access token is read from the `Authorization` header. Browser `EventSource` cannot set headers, so use an `EventSource` polyfill that can, or use socket.io (see the push service guide).\n","parameters":[{"in":"path","required":true,"name":"stream","description":"ID of the stream to subscribe to.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_ ]{1,50}$"},"example":"application-health"},{"$ref":"#/components/parameters/PushStreamTenant"},{"in":"query","name":"criteria","required":false,"description":"JSON encoded criteria. Only stream items that match every criterion are sent. Must be valid JSON.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamEventCriteria"},"example":{"context":{"applicationId":"64b1f2e3a8c9b1d2e3f4a5b6"}}}}}],"responses":{"200":{"description":"Subscribed. The response is a stream of server-sent events, one per stream item.","content":{"text/event-stream":{"schema":{"type":"string","description":"Server-sent events. Each event is a `data:` line with a JSON stream item (see the StreamItem schema), followed by a blank line.\n"},"example":"data: {\"tenantId\":\"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7\",\"namespace\":\"status-service\",\"name\":\"health-check-started\",\"timestamp\":\"2026-10-01T15:04:05.000Z\",\"correlationId\":\"64b1f2e3a8c9b1d2e3f4a5b6\",\"context\":{\"applicationId\":\"64b1f2e3a8c9b1d2e3f4a5b6\"},\"payload\":{\"application\":{\"id\":\"64b1f2e3a8c9b1d2e3f4a5b6\",\"name\":\"My application\"}}}\n"}}},"400":{"$ref":"#/components/responses/PushBadRequest"},"404":{"$ref":"#/components/responses/PushNotFound"}}}}},"components":{"securitySchemes":{"accessToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"parameters":{"PushStreamTenant":{"name":"tenant","description":"Name of the tenant that the stream belongs to, in kebab case (for example `my-tenant` for the tenant named \"My Tenant\"). When it matches a tenant, it is used for every caller. When it is not set or matches no tenant, the tenant of the caller's token is used. Required for anonymous callers. A core (platform) caller who leaves it out connects to a cross-tenant stream configured in the core configuration.\n","in":"query","required":false,"schema":{"type":"string"},"example":"my-tenant"},"PushStreamsTenant":{"name":"tenant","description":"ID of the tenant to list streams for: the last segment of the tenant URN, for example `61f2e3a8c9b1d2e3f4a5b6c7` for `urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7`. When it is set, it is used for every caller. When it is not set, the tenant of the caller's token is used. Required for anonymous and core (platform) callers.\n","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-zA-Z0-9]+$"},"example":"61f2e3a8c9b1d2e3f4a5b6c7"}},"responses":{"PushBadRequest":{"description":"No tenant context. The request has no tenant and the caller's token is not for a tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushError"},"example":{"errorMessage":"No tenant specified for request."}}}},"PushNotFound":{"description":"The stream is not configured for the tenant, or in the core configuration. Streams of another tenant are only found when that tenant is named in the `tenant` parameter.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushError"},"example":{"errorMessage":"stream with ID 'application-updates' could not be found."}}}}},"schemas":{"PushError":{"type":"object","properties":{"errorMessage":{"type":"string"}}},"Stream":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-zA-Z0-9-_ ]{1,50}$"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"events":{"type":"array","items":{"$ref":"#/components/schemas/StreamEvent"}},"subscriberRoles":{"type":"array","description":"Roles that allow a user of the stream's tenant to subscribe, in addition to the `stream-listener` role.\n","items":{"type":"string"}},"publicSubscribe":{"type":"boolean","description":"Whether anyone, including anonymous callers, can subscribe."}},"required":["id","name","events","subscriberRoles"],"example":{"id":"application-health","name":"Application health","description":"Events indicating the health of my applications.","publicSubscribe":false,"subscriberRoles":["urn:ads:my-tenant:my-app:health-reader"],"events":[{"namespace":"status-service","name":"health-check-started"},{"namespace":"status-service","name":"application-status-changed","map":{"application":"payload.application.name","status":"payload.newStatus"}}]}},"StreamEvent":{"type":"object","properties":{"namespace":{"type":"string","description":"Namespace of the domain event to include."},"name":{"type":"string","description":"Name of the domain event to include."},"map":{"type":"object","description":"Optional projection of the event. Each key is a property of the stream item, and each value is a path into the domain event (for example `payload.application.name`). When it is set, the stream item includes `tenantId`, `namespace`, `name`, `correlationId`, `context`, and the mapped properties only.\n","additionalProperties":{"type":"string"}},"criteria":{"$ref":"#/components/schemas/StreamEventCriteria"}},"required":["namespace","name"],"example":{"namespace":"status-service","name":"health-check-started","map":{"application":"payload.application.name"},"criteria":{"context":{"applicationId":"64b1f2e3a8c9b1d2e3f4a5b6"}}}},"StreamEventCriteria":{"type":"object","description":"Domain events are included only when they match every criterion that is set.","properties":{"correlationId":{"type":"string","description":"Correlation ID that the event must have."},"context":{"type":"object","description":"Context values that the event must have.","additionalProperties":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"number"}]}}},"example":{"correlationId":"application-1234","context":{"applicationId":"64b1f2e3a8c9b1d2e3f4a5b6"}}},"StreamItem":{"type":"object","description":"A domain event included in the stream. It is the full domain event, or the projection defined by the stream event's `map`. `tenantId` is the tenant URN.\n","properties":{"tenantId":{"type":"string"},"namespace":{"type":"string"},"name":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"},"context":{"type":"object"},"payload":{"type":"object"}},"additionalProperties":true,"required":["namespace","name"],"example":{"tenantId":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7","namespace":"status-service","name":"health-check-started","timestamp":"2026-10-01T15:04:05.000Z","correlationId":"64b1f2e3a8c9b1d2e3f4a5b6","context":{"applicationId":"64b1f2e3a8c9b1d2e3f4a5b6"},"payload":{"application":{"id":"64b1f2e3a8c9b1d2e3f4a5b6","name":"My application","url":"https://my-application.alberta.ca"}}}}}},"security":[{"accessToken":[]}],"tags":[{"name":"Stream","description":"API to connect to streams."}]}
1
+ {"openapi":"3.0.0","info":{"title":"Push service","version":"0.0.0","description":"The push service is a gateway for push mode connections to projections of domain events. Server side events and WebSockets are supported."},"paths":{"/stream/v1/streams":{"get":{"tags":["Stream"],"description":"Retrieves the streams that the caller can subscribe to, keyed by stream ID. The result combines the tenant's streams with the streams in the core (platform) configuration; when both have a stream with the same ID, the core stream is used. Core streams listed for a tenant only include that tenant's events.\n\nAny caller can list streams, including anonymous callers, but the result only includes streams the caller can subscribe to: public streams (`publicSubscribe`), and streams for which the caller has the `stream-listener` role or one of the stream's `subscriberRoles`. Those roles must be held in the stream's tenant, or by a core user.\n\nThe tenant is the `tenant` parameter if it is set, otherwise the tenant of the caller's token. Without either, the request responds 400.\n","parameters":[{"$ref":"#/components/parameters/PushStreamsTenant"}],"responses":{"200":{"description":"Streams that the caller can subscribe to, keyed by stream ID.","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Stream"}},"example":{"application-health":{"id":"application-health","name":"Application health","description":"Events indicating the health of my applications.","publicSubscribe":false,"subscriberRoles":["urn:ads:my-tenant:my-app:health-reader"],"events":[{"namespace":"status-service","name":"health-check-started"}]}}}}},"400":{"$ref":"#/components/responses/PushBadRequest"}}}},"/stream/v1/streams/{stream}":{"get":{"tags":["Stream"],"description":"Subscribes to a stream using server-sent events. The response stays open, and each domain event that matches the stream and the `criteria` parameter is sent as a `data:` line holding the JSON stream item. Messages use the default `message` event type.\n\nThe caller must be allowed to subscribe to the stream: the stream is public (`publicSubscribe`), or the caller has the `stream-listener` role or one of the stream's `subscriberRoles`, held in the stream's tenant or by a core user. Anonymous callers can only subscribe to public streams.\n\nThe tenant is the tenant named in the `tenant` parameter, otherwise the tenant of the caller's token. Anonymous and tenant callers without either receive 400. A core user without a tenant subscribes to a cross-tenant stream from the core configuration, which needs the `stream-listener` role or one of the stream's `subscriberRoles`, and includes matching events from every tenant.\n\nThe access token is read from the `Authorization` header. Browser `EventSource` cannot set headers, so use an `EventSource` polyfill that can, or use socket.io (see the push service guide).\n","parameters":[{"in":"path","required":true,"name":"stream","description":"ID of the stream to subscribe to.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_ ]{1,50}$"},"example":"application-health"},{"$ref":"#/components/parameters/PushStreamTenant"},{"in":"query","name":"criteria","required":false,"description":"JSON encoded criteria. Only stream items that match every criterion are sent. Must be valid JSON.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamEventCriteria"},"example":{"context":{"applicationId":"64b1f2e3a8c9b1d2e3f4a5b6"}}}}}],"responses":{"200":{"description":"Subscribed. The response is a stream of server-sent events, one per stream item.","content":{"text/event-stream":{"schema":{"type":"string","description":"Server-sent events. Each event is a `data:` line with a JSON stream item (see the StreamItem schema), followed by a blank line.\n"},"example":"data: {\"tenantId\":\"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7\",\"namespace\":\"status-service\",\"name\":\"health-check-started\",\"timestamp\":\"2026-10-01T15:04:05.000Z\",\"correlationId\":\"64b1f2e3a8c9b1d2e3f4a5b6\",\"context\":{\"applicationId\":\"64b1f2e3a8c9b1d2e3f4a5b6\"},\"payload\":{\"application\":{\"id\":\"64b1f2e3a8c9b1d2e3f4a5b6\",\"name\":\"My application\"}}}\n"}}},"400":{"$ref":"#/components/responses/PushBadRequest"},"403":{"description":"The caller is not allowed to subscribe to the stream. Returned before any server-sent event headers are sent.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushError"}}}},"404":{"$ref":"#/components/responses/PushNotFound"}}}}},"components":{"securitySchemes":{"accessToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"parameters":{"PushStreamTenant":{"name":"tenant","description":"Name of the tenant that the stream belongs to, in kebab case (for example `my-tenant` for the tenant named \"My Tenant\"). When it matches a tenant, it is used for every caller. When it is not set or matches no tenant, the tenant of the caller's token is used. Required for anonymous callers. A core (platform) caller who leaves it out connects to a cross-tenant stream configured in the core configuration.\n","in":"query","required":false,"schema":{"type":"string"},"example":"my-tenant"},"PushStreamsTenant":{"name":"tenant","description":"ID of the tenant to list streams for: the last segment of the tenant URN, for example `61f2e3a8c9b1d2e3f4a5b6c7` for `urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7`. When it is set, it is used for every caller. When it is not set, the tenant of the caller's token is used. Required for anonymous and core (platform) callers.\n","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-zA-Z0-9]+$"},"example":"61f2e3a8c9b1d2e3f4a5b6c7"}},"responses":{"PushBadRequest":{"description":"No tenant context. The request has no tenant and the caller's token is not for a tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushError"},"example":{"errorMessage":"No tenant specified for request."}}}},"PushNotFound":{"description":"The stream is not configured for the tenant, or in the core configuration. Streams of another tenant are only found when that tenant is named in the `tenant` parameter.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushError"},"example":{"errorMessage":"stream with ID 'application-updates' could not be found."}}}}},"schemas":{"PushError":{"type":"object","properties":{"errorMessage":{"type":"string"}}},"Stream":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-zA-Z0-9-_ ]{1,50}$"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"events":{"type":"array","items":{"$ref":"#/components/schemas/StreamEvent"}},"subscriberRoles":{"type":"array","description":"Roles that allow a user of the stream's tenant to subscribe, in addition to the `stream-listener` role.\n","items":{"type":"string"}},"publicSubscribe":{"type":"boolean","description":"Whether anyone, including anonymous callers, can subscribe."}},"required":["id","name","events","subscriberRoles"],"example":{"id":"application-health","name":"Application health","description":"Events indicating the health of my applications.","publicSubscribe":false,"subscriberRoles":["urn:ads:my-tenant:my-app:health-reader"],"events":[{"namespace":"status-service","name":"health-check-started"},{"namespace":"status-service","name":"application-status-changed","map":{"application":"payload.application.name","status":"payload.newStatus"}}]}},"StreamEvent":{"type":"object","properties":{"namespace":{"type":"string","description":"Namespace of the domain event to include."},"name":{"type":"string","description":"Name of the domain event to include."},"map":{"type":"object","description":"Optional projection of the event. Each key is a property of the stream item, and each value is a path into the domain event (for example `payload.application.name`). When it is set, the stream item includes `tenantId`, `namespace`, `name`, `correlationId`, `context`, and the mapped properties only.\n","additionalProperties":{"type":"string"}},"criteria":{"$ref":"#/components/schemas/StreamEventCriteria"}},"required":["namespace","name"],"example":{"namespace":"status-service","name":"health-check-started","map":{"application":"payload.application.name"},"criteria":{"context":{"applicationId":"64b1f2e3a8c9b1d2e3f4a5b6"}}}},"StreamEventCriteria":{"type":"object","description":"Domain events are included only when they match every criterion that is set.","properties":{"correlationId":{"type":"string","description":"Correlation ID that the event must have."},"context":{"type":"object","description":"Context values that the event must have.","additionalProperties":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"number"}]}}},"example":{"correlationId":"application-1234","context":{"applicationId":"64b1f2e3a8c9b1d2e3f4a5b6"}}},"StreamItem":{"type":"object","description":"A domain event included in the stream. It is the full domain event, or the projection defined by the stream event's `map`. `tenantId` is the tenant URN.\n","properties":{"tenantId":{"type":"string"},"namespace":{"type":"string"},"name":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"},"context":{"type":"object"},"payload":{"type":"object"}},"additionalProperties":true,"required":["namespace","name"],"example":{"tenantId":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7","namespace":"status-service","name":"health-check-started","timestamp":"2026-10-01T15:04:05.000Z","correlationId":"64b1f2e3a8c9b1d2e3f4a5b6","context":{"applicationId":"64b1f2e3a8c9b1d2e3f4a5b6"},"payload":{"application":{"id":"64b1f2e3a8c9b1d2e3f4a5b6","name":"My application","url":"https://my-application.alberta.ca"}}}}}},"security":[{"accessToken":[]}],"tags":[{"name":"Stream","description":"API to connect to streams."}]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/adsp-sdk-mcp-server",
3
- "version": "1.39.6",
3
+ "version": "1.39.8",
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-20T18:37:23.500Z",
4
- "sourceCommit": "6e3e5654f3e551cfd15402ff0489ba89d52c4337",
5
- "latestRelease": "1.39.5",
3
+ "builtAt": "2026-11-20T20:17:20.860Z",
4
+ "sourceCommit": "995595124506d8acc291759506a811226394af82",
5
+ "latestRelease": "1.39.7",
6
6
  "docsCommit": "757a35b7c7e1e0f89effbf9b7b8dbda4d603a1a0",
7
7
  "sdk": {
8
8
  "version": "2.36.1",