{"openapi":"3.1.0","info":{"title":"baaffg shared services","version":"0.3.0"},"servers":[{"url":"https://baaffg.soft-fog-222b.workers.dev"}],"security":[{"personalKey":[]}],"components":{"securitySchemes":{"personalKey":{"type":"http","scheme":"bearer"}}},"paths":{"/api/check_connection":{"post":{"operationId":"check_connection","description":"Check whether the HP ticket browser is available and signed in to the intended account. Use before a real submission or to explain an operator sign-in requirement; this does not submit anything.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result"},"401":{"description":"Connect your account"}}}},"/api/prepare_ticket":{"post":{"operationId":"prepare_ticket","description":"Prepare a plain-language Seba team ticket and return missing questions or a ready draft with its content hash. Ask urgency first if missing; never choose a default. This tool saves a private draft and does not submit it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"urgency":{"description":"User-chosen urgency: Critical, High, Normal, Low.","type":"string","enum":["P1","P2","P3","P4"]},"requestedFor":{"description":"Person or team the work is for.","type":"string","maxLength":200},"project":{"description":"Business or project.","type":"string","maxLength":200},"request":{"description":"What should be made, changed or fixed, in plain language.","type":"string","maxLength":12000},"contacts":{"description":"All direct contacts. Give each person a name and usable email or phone. Prefer this for multiple contacts; legacy single-contact fields remain supported.","minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","maxLength":250},"phone":{"type":"string","maxLength":250}},"required":["name"],"additionalProperties":false}},"contactName":{"description":"Person Shared Services should contact directly.","type":"string","maxLength":200},"contact":{"description":"Their email or phone; may be different from Murphy.","type":"string","maxLength":250},"title":{"description":"Short clear title; otherwise derived from the request.","type":"string","maxLength":150},"deadline":{"description":"Deadline supplied by the user, if any.","type":"string","maxLength":250}},"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result"},"401":{"description":"Connect your account"}}}},"/api/attach_file":{"post":{"operationId":"attach_file","description":"Attach authorized bytes to your prepared draft, in base64 chunks of at most 256 KiB. Start at offset zero without attachmentId; subsequent chunks use its returned attachmentId and byte offset. Set complete on the last chunk; retain the new draft hash. Maximum five files, 10 MiB each. This never reads a path or URL on HP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"draftId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Your prepared draft ID."},"filename":{"type":"string","maxLength":180,"description":"File basename only."},"data":{"type":"string","maxLength":349528,"description":"Base64 file bytes for this chunk."},"offset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Byte offset; zero for a new file."},"complete":{"type":"boolean","description":"True for the last chunk."},"attachmentId":{"description":"ID returned for the first chunk.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mime":{"description":"MIME type, if known.","type":"string","maxLength":120}},"required":["draftId","filename","data","offset","complete"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result"},"401":{"description":"Connect your account"}}}},"/api/submit_ticket":{"post":{"operationId":"submit_ticket","description":"Submit the exact ready draft that the user asked to send, through Murphy’s HP SysAid session. Requires the latest content hash, explicit authorization and a stable unique requestId reused for retries. Returns a tracked operation; get_receipt establishes the actual ticket number. Never use for draft-only work or retry an uncertain outcome under a new ID.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"draftId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Ready draft ID."},"hash":{"type":"string","minLength":64,"maxLength":64,"description":"Latest draft hash after any attachments."},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,100}$","description":"Stable unique request ID, e.g. a UUID; reuse on network retry."},"authorized":{"type":"boolean","description":"True only if the user asked to submit this exact request."}},"required":["draftId","hash","requestId","authorized"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result"},"401":{"description":"Connect your account"}}}},"/api/get_receipt":{"post":{"operationId":"get_receipt","description":"Read your own submission operation by requestId. Poll queued/running/submitting results; report submitted only when a verified ticketId is present. If blocked, follow its operator action; if uncertain, ask Murphy to reconcile and do not resubmit.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"requestId":{"type":"string","maxLength":100,"description":"The stable requestId used for submit_ticket."}},"required":["requestId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result"},"401":{"description":"Connect your account"}}}},"/api/get_ticket_status":{"post":{"operationId":"get_ticket_status","description":"Read current status, assignment and recent notes on your own verified ticket. Use the original submission requestId. This reads the actual portal and requires HP sign-in; a stored submission receipt is not current progress.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":100}},"required":["requestId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result"},"401":{"description":"Connect your account"}}}},"/api/prepare_followup":{"post":{"operationId":"prepare_followup","description":"Prepare a note on your own existing ticket. Return the exact text and hash for user review. This saves a private draft only; no note or email is sent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":100},"message":{"type":"string","minLength":1,"maxLength":8000}},"required":["requestId","message"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result"},"401":{"description":"Connect your account"}}}},"/api/post_followup":{"post":{"operationId":"post_followup","description":"Post the exact follow-up authorized by the user using Add Note on the existing ticket. Requires its prepared hash and a stable followupId reused on retries. Poll get_followup_receipt; an uncertain note must be reconciled before another write. Never creates a new ticket or sends email.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"draftId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"hash":{"type":"string","minLength":64,"maxLength":64},"followupId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,100}$"},"authorized":{"type":"boolean"}},"required":["draftId","hash","followupId","authorized"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result"},"401":{"description":"Connect your account"}}}},"/api/get_followup_receipt":{"post":{"operationId":"get_followup_receipt","description":"Read your follow-up operation. Only posted plus noteVerified confirms the note persisted. Uncertain requires operator verification, never a replacement note.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"followupId":{"type":"string","minLength":1,"maxLength":100}},"required":["followupId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result"},"401":{"description":"Connect your account"}}}},"/api/prepare_ticket_close":{"post":{"operationId":"prepare_ticket_close","description":"Prepare the exact closure of your own verified ticket. Use only after the user directly requests closure. If they requested a final reply first, pass its followupId after posted/noteVerified; the saved reply is rechecked before closing. Already-completed tickets prepare read-only verification. Nothing is closed by preparation.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":100},"followupId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,100}$"}},"required":["requestId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result"},"401":{"description":"Connect your account"}}}},"/api/close_ticket":{"post":{"operationId":"close_ticket","description":"Execute the exact owner-authorized prepared closure once. Reuse one closeId on retries and read get_close_receipt. Only closed/closedVerified proves the reopened native completed state. Uncertain closes hold all writes until operator readback, never another close click. Does not add a note, reopen a ticket or send email.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"draftId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"hash":{"type":"string","minLength":64,"maxLength":64},"closeId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,100}$"},"authorized":{"type":"boolean"}},"required":["draftId","hash","closeId","authorized"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result"},"401":{"description":"Connect your account"}}}},"/api/get_close_receipt":{"post":{"operationId":"get_close_receipt","description":"Read your durable close operation. Poll queued/running/closing; closed plus closedVerified is the verified completed state. Blocked explains the pre-click dependency; uncertain requires operator read-only reconciliation. The original submission receipt stays submitted.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"closeId":{"type":"string","minLength":1,"maxLength":100}},"required":["closeId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result"},"401":{"description":"Connect your account"}}}}}}