{"openapi":"3.1.0","info":{"title":"ProfileClaw API","version":"v1","description":"ProfileClaw is a career context layer for AI agents and agent frameworks. Use this API to fetch a user's structured profile, derived career graph, compact agent-ready context, and webhook events. Success responses use JSON envelopes, scope-aware API keys, and rate-limit headers (X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After). Most error responses include an inferred or explicit { error, type, message? } shape; branch on type when present, fall back to error when needed, and inspect x-error-codes on each operation for the intended machine-readable values."},"servers":[{"url":"https://profileclaw.cn","description":"Production"},{"url":"http://localhost:3000","description":"Local development"}],"tags":[{"name":"Auth","description":"API key authentication"},{"name":"Context","description":"Aggregated agent context"},{"name":"Profile","description":"User profile and context"},{"name":"Career Graph","description":"Agent-ready career graph/context"},{"name":"Assessments","description":"Assessment listings and results"},{"name":"Webhooks","description":"Event subscriptions"},{"name":"Health","description":"Career health and alerts"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"Send your API key as a Bearer token: Authorization: Bearer sk_... Keys are scope-aware; insufficient permissions return 403."},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Alternative auth header for server-to-server usage. Keys are scope-aware; insufficient permissions return 403."}},"headers":{"XRateLimitLimit":{"schema":{"type":"integer"},"description":"Hourly request limit for the API key."},"XRateLimitRemaining":{"schema":{"type":"integer"},"description":"Remaining requests in the current rate-limit window."},"XRateLimitReset":{"schema":{"type":"string","format":"date-time"},"description":"ISO timestamp when the current rate-limit window resets."},"RetryAfter":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying when backoff is required. Present on rate-limited responses and may appear on other backoff-required responses."}},"responses":{"BadRequestError":{"description":"Bad request","x-error-codes":["validation.bad_request"],"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"badRequest":{"value":{"error":"Bad request","type":"validation.bad_request"}}}}}},"NotFoundError":{"description":"Not found","x-error-codes":["resource.not_found"],"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"notFound":{"value":{"error":"Not found","type":"resource.not_found"}}}}}},"ProfileNotFoundError":{"description":"Profile not found","x-error-codes":["profile.not_found"],"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"notFound":{"value":{"error":"User profile not found","type":"profile.not_found"}}}}}},"CareerGraphNotFoundError":{"description":"Career graph not found","x-error-codes":["career_graph.not_found"],"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"notFound":{"value":{"error":"Career graph not found","type":"career_graph.not_found"}}}}}},"CareerContextNotFoundError":{"description":"Career context not found","x-error-codes":["career_context.not_found"],"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"notFound":{"value":{"error":"Career context not found","type":"career_context.not_found"}}}}}},"AssessmentsNotFoundError":{"description":"Assessments not found","x-error-codes":["assessments.not_found"],"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"notFound":{"value":{"error":"Assessments not found","type":"assessments.not_found"}}}}}},"WebhookSubscriptionNotFoundError":{"description":"Webhook subscription not found","x-error-codes":["webhooks.subscription_not_found"],"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"notFound":{"value":{"error":"Subscription not found","type":"webhooks.subscription_not_found"}}}}}},"UnauthorizedError":{"description":"Unauthorized","x-error-codes":["auth.api_key_missing","auth.api_key_invalid"],"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"invalidApiKey":{"value":{"error":"Invalid or expired API key","type":"auth.api_key_invalid"}},"missingApiKey":{"value":{"error":"Missing API key. Provide Authorization: Bearer <key> or X-API-Key.","type":"auth.api_key_missing"}}}}}},"ForbiddenError":{"description":"Forbidden (insufficient scope)","x-error-codes":["auth.insufficient_scope"],"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"insufficientScope":{"value":{"error":"Insufficient scope. Requires one of the scopes listed on this operation.","type":"auth.insufficient_scope"}}}}}},"RateLimitedError":{"description":"Too Many Requests","x-error-codes":["rate_limit.exceeded"],"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"rateLimited":{"value":{"error":"Rate limit exceeded","type":"rate_limit.exceeded"}}}}}},"PaymentRequiredError":{"description":"Payment required or credits exhausted","x-error-codes":["billing.payment_required"],"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"paidAiRequired":{"value":{"error":"PaidAIRequired","type":"billing.payment_required","message":"This AI capability requires a paid unlock or credits."}},"insufficientCredits":{"value":{"error":"InsufficientCredits","type":"billing.payment_required","message":"This AI capability requires more credits."}},"freeTrialsExhausted":{"value":{"error":"Free basic API trials exhausted. Upgrade for more API access.","type":"billing.payment_required"}}}}}},"InternalServerError":{"description":"Server error","x-error-codes":["server.internal"],"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"serverError":{"value":{"error":"Internal server error","type":"server.internal"}}}}}}},"schemas":{"ErrorType":{"type":"string","description":"Stable machine-readable error taxonomy. Prefix families include auth.*, validation.*, profile.*, career_graph.*, career_context.*, assessments.*, alerts.*, webhooks.*, data_sharing.*, similar_paths.*, career_prediction.*, career_reasoning.*, agent_explore.*, agent_apply.*, reports.*, fit_briefs.*, checkpoints.*, jobs_workspace.*, execution_artifacts.*, resource.*, rate_limit.*, server.*, and billing.*. Operations narrow supported values further with x-error-codes.","enum":["agent_apply.internal_error","agent_apply.invalid_actions","agent_apply.invalid_request","agent_explore.context_unavailable","agent_explore.internal_error","agent_explore.invalid_request","alerts.invalid_action","alerts.missing_id","alerts.not_found","assessments.not_found","auth.api_key_invalid","auth.api_key_missing","auth.forbidden","auth.insufficient_scope","auth.unauthorized","billing.payment_required","career_context.not_found","career_graph.not_found","career_prediction.missing_target_role","career_reasoning.failed","career_reasoning.query_required","career_reasoning.query_too_long","checkpoints.not_found","context.invalid_view","context.not_found","data_sharing.no_preferences_provided","execution_artifacts.not_found","fit_briefs.not_found","jobs_workspace.not_found","profile.not_found","rate_limit.exceeded","reports.not_found","resource.not_found","server.internal","similar_paths.invalid_limit","similar_paths.invalid_min_similarity","validation.bad_request","webhooks.invalid_events","webhooks.invalid_url","webhooks.missing_required_fields","webhooks.missing_subscription_id","webhooks.subscription_not_found"],"examples":["auth.api_key_invalid","profile.not_found","rate_limit.exceeded","server.internal"]},"ErrorResponse":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"type":{"$ref":"#/components/schemas/ErrorType"},"message":{"type":"string"}},"required":["error","type"]},"Metadata":{"type":"object","additionalProperties":true,"properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}},"required":["requestId","timestamp"]},"Links":{"type":"object","additionalProperties":false,"properties":{"self":{"type":"string"},"related":{"type":"array","items":{"type":"string"}}},"required":["self","related"]},"WebhookSubscription":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"webhookUrl":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"}},"isActive":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","webhookUrl","events","isActive"]},"WebhookEventType":{"type":"string","enum":["profile.updated","assessment.completed","skill.acquired","goal.changed","insight.generated","timeline.event"]},"WebhookPayload":{"type":"object","additionalProperties":false,"properties":{"event":{"$ref":"#/components/schemas/WebhookEventType"},"userId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"data":{"type":"object","additionalProperties":true},"contextUrl":{"type":"string"}},"required":["event","userId","timestamp","data"]},"WebhookSubscriptionEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/WebhookSubscription"},"metadata":{"$ref":"#/components/schemas/Metadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"WebhookListEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookSubscription"}},"metadata":{"$ref":"#/components/schemas/Metadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"WebhookDeleteEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"object","additionalProperties":false,"properties":{"deleted":{"type":"boolean","const":true}},"required":["deleted"]},"metadata":{"$ref":"#/components/schemas/Metadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"CareerGraphUser":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","format":"email"}},"required":["id","name","email"]},"CareerGraphProfile":{"type":"object","additionalProperties":true,"properties":{"bio_summary":{"type":"string"},"current_job_title":{"type":"string"},"current_industry":{"type":"string"},"years_of_experience":{"type":"number"},"target_locations":{"type":"array","items":{"type":"string"}},"target_industries":{"type":"array","items":{"type":"string"}},"education_level":{"type":"string"},"min_salary":{"type":"number"},"target_salary_range":{"type":"object","additionalProperties":false,"properties":{"min":{"type":"number"},"max":{"type":"number"}}},"willing_to_relocate":{"type":"boolean"},"preferred_work_style":{"type":"string"},"accept_overtime":{"type":"boolean"},"accept_sales_roles":{"type":"boolean"},"accept_unstable_orgs":{"type":"boolean"},"accept_high_social_intensity":{"type":"boolean"},"prefer_stability":{"type":"boolean"},"exam_track_intent":{"type":"string"},"available_reskilling_months":{"type":"number"},"family_constraints":{"type":"string"},"certificates":{"type":"array","items":{"type":"string"}},"career_goals":{}}},"CareerAssessmentModuleId":{"type":"string","enum":["riasec","workStyle","values","skillsTalents","collaborationConflict","stressRegulation","expressionStyle","currentStatePulse"]},"CareerAssessmentModuleCategory":{"type":"string","enum":["interest_profile","work_style_dimensions","career_values","capability_signals","collaboration_pattern","stress_regulation","expression_style","state_pulse"]},"CareerAssessmentTimeScope":{"type":"string","enum":["stable","current"]},"CareerAssessmentSemanticModel":{"type":"string","enum":["riasec_interest_model","custom_work_style_dimensions","career_values_tradeoff_model","capability_signal_model","collaboration_conflict_model","stress_regulation_model","expression_style_model","current_state_pulse_model"]},"CareerAssessmentDimensionLabels":{"type":"object","additionalProperties":{"type":"string"}},"CareerAssessmentScores":{"type":"object","additionalProperties":{"type":"number"}},"CareerAssessmentModuleQuality":{"type":"object","additionalProperties":false,"properties":{"differentiation_score":{"type":["number","null"]},"confidence_score":{"type":["number","null"]},"consistency_flags":{"type":"array","items":{"type":"string"}}},"required":["differentiation_score","confidence_score","consistency_flags"]},"CareerAssessmentModule":{"type":"object","additionalProperties":false,"properties":{"module_id":{"$ref":"#/components/schemas/CareerAssessmentModuleId"},"semantic_model":{"$ref":"#/components/schemas/CareerAssessmentSemanticModel"},"module_category":{"$ref":"#/components/schemas/CareerAssessmentModuleCategory"},"time_scope":{"$ref":"#/components/schemas/CareerAssessmentTimeScope"},"dimension_labels":{"$ref":"#/components/schemas/CareerAssessmentDimensionLabels"},"scores":{"$ref":"#/components/schemas/CareerAssessmentScores"},"salient_dimensions":{"type":"array","items":{"type":"string"}},"quality":{"$ref":"#/components/schemas/CareerAssessmentModuleQuality"},"completed_at":{"type":"string","format":"date-time"}},"required":["module_id","semantic_model","module_category","time_scope","dimension_labels","scores","salient_dimensions","quality","completed_at"]},"CareerGraphAssessments":{"type":"object","additionalProperties":false,"properties":{"riasec":{"$ref":"#/components/schemas/CareerAssessmentModule"},"workStyle":{"$ref":"#/components/schemas/CareerAssessmentModule"},"values":{"$ref":"#/components/schemas/CareerAssessmentModule"},"skillsTalents":{"$ref":"#/components/schemas/CareerAssessmentModule"},"collaborationConflict":{"$ref":"#/components/schemas/CareerAssessmentModule"},"stressRegulation":{"$ref":"#/components/schemas/CareerAssessmentModule"},"expressionStyle":{"$ref":"#/components/schemas/CareerAssessmentModule"},"currentStatePulse":{"$ref":"#/components/schemas/CareerAssessmentModule"}}},"CareerGraphResumeExperienceItem":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string"},"company":{"type":"string"},"duration":{"type":"string"},"description":{"type":"string"}},"required":["title","company","duration","description"]},"CareerGraphResumeEducationItem":{"type":"object","additionalProperties":false,"properties":{"degree":{"type":"string"},"institution":{"type":"string"},"year":{"type":"string"}},"required":["degree","institution","year"]},"CareerGraphResume":{"type":"object","additionalProperties":false,"properties":{"skills":{"type":"array","items":{"type":"string"}},"experience":{"type":"array","items":{"$ref":"#/components/schemas/CareerGraphResumeExperienceItem"}},"education":{"type":"array","items":{"$ref":"#/components/schemas/CareerGraphResumeEducationItem"}},"parsed_at":{"type":"string","format":"date-time"}}},"CareerGraphRecommendationFactor":{"type":"object","additionalProperties":false,"properties":{"type":{"type":"string"},"key":{"type":"string"},"labelKey":{"type":"string"},"labelText":{"type":"string"}},"required":["type","key","labelKey"]},"CareerGraphRecommendationText":{"type":"object","additionalProperties":false,"properties":{"textKey":{"type":"string"},"text":{"type":"string"}},"required":["textKey"]},"CareerGraphRecommendationExplanation":{"type":"object","additionalProperties":false,"properties":{"hardFiltersPassed":{"type":"array","items":{"type":"string"}},"positiveFactors":{"type":"array","items":{"$ref":"#/components/schemas/CareerGraphRecommendationFactor"}},"riskFactors":{"type":"array","items":{"$ref":"#/components/schemas/CareerGraphRecommendationFactor"}},"missingRequirements":{"type":"array","items":{"$ref":"#/components/schemas/CareerGraphRecommendationFactor"}},"whyFit":{"type":"array","items":{"$ref":"#/components/schemas/CareerGraphRecommendationText"}},"possibleFriction":{"type":"array","items":{"$ref":"#/components/schemas/CareerGraphRecommendationText"}},"whatToVerifyNext":{"type":"array","items":{"$ref":"#/components/schemas/CareerGraphRecommendationText"}}},"required":["hardFiltersPassed","positiveFactors","riskFactors","missingRequirements","whyFit","possibleFriction","whatToVerifyNext"]},"CareerGraphRecommendationMatch":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string"},"title":{"type":"string"},"match_score":{"type":"number"},"reasoningKey":{"type":"string"},"reasoningText":{"type":"string"},"bucket":{"type":"string","enum":["high_fit","worth_exploring","risky_mismatch"]},"explanation":{"$ref":"#/components/schemas/CareerGraphRecommendationExplanation"},"risk_reasons":{"type":"array","items":{"type":"string"}}},"required":["title","match_score","reasoningKey"]},"CareerGraphRecommendations":{"type":"object","additionalProperties":false,"properties":{"matched_careers":{"type":"array","items":{"$ref":"#/components/schemas/CareerGraphRecommendationMatch"}},"worth_exploring":{"type":"array","items":{"$ref":"#/components/schemas/CareerGraphRecommendationMatch"}},"risky_careers":{"type":"array","items":{"$ref":"#/components/schemas/CareerGraphRecommendationMatch"}},"skill_gaps":{"type":"array","items":{"type":"string"}},"development_areas":{"type":"array","items":{"type":"string"}}},"required":["matched_careers","skill_gaps","development_areas"]},"CareerGraphMetadata":{"type":"object","additionalProperties":false,"properties":{"profile_completeness":{"type":"number"},"last_updated":{"type":"string","format":"date-time"},"api_version":{"type":"string"}},"required":["profile_completeness","last_updated","api_version"]},"CareerGraph":{"type":"object","additionalProperties":false,"properties":{"user":{"$ref":"#/components/schemas/CareerGraphUser"},"profile":{"$ref":"#/components/schemas/CareerGraphProfile"},"assessments":{"$ref":"#/components/schemas/CareerGraphAssessments"},"resume":{"$ref":"#/components/schemas/CareerGraphResume"},"career_recommendations":{"$ref":"#/components/schemas/CareerGraphRecommendations"},"metadata":{"$ref":"#/components/schemas/CareerGraphMetadata"}},"required":["user","profile","assessments","career_recommendations","metadata"]},"CareerGraphEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/CareerGraph"},"metadata":{"$ref":"#/components/schemas/Metadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"AssessmentsData":{"allOf":[{"$ref":"#/components/schemas/CareerGraphAssessments"}],"description":"Projection of the canonical career graph assessment modules."},"AssessmentsEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/AssessmentsData"},"metadata":{"$ref":"#/components/schemas/Metadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"ProfileData":{"type":"object","additionalProperties":false,"properties":{"user":{"$ref":"#/components/schemas/CareerGraphUser"},"profile":{"$ref":"#/components/schemas/CareerGraphProfile"},"metadata":{"type":"object","additionalProperties":true}},"required":["user","profile","metadata"]},"ProfileEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/ProfileData"},"metadata":{"$ref":"#/components/schemas/Metadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"CareerPredictionRequest":{"type":"object","additionalProperties":false,"properties":{"targetRole":{"type":"string"},"timeHorizon":{"type":"string"},"constraints":{"type":"object","additionalProperties":true},"includeAlternatives":{"type":"boolean"}},"required":["targetRole"]},"CareerPredictionResult":{"type":"object","additionalProperties":true,"properties":{"predictions":{"type":"array","items":{"type":"object","additionalProperties":true}},"userContext":{"type":"object","additionalProperties":true},"metadata":{"type":"object","additionalProperties":true}},"required":["predictions","userContext","metadata"]},"CareerPredictionEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/CareerPredictionResult"},"metadata":{"$ref":"#/components/schemas/Metadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"CareerReasoningRequest":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string","minLength":1,"maxLength":500},"context":{"type":"object","additionalProperties":false,"properties":{"includeMemories":{"type":"boolean"},"includeSimulation":{"type":"boolean"},"timeRange":{"type":"string","enum":["recent","all"]}}}},"required":["query"]},"CareerReasoningResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"object","additionalProperties":false,"properties":{"reasoning":{"type":"object","additionalProperties":true,"properties":{"recommendation":{"type":"string"},"confidence":{"type":"number"},"keyFactors":{"type":"array","items":{}},"suggestedActions":{"type":"array","items":{}},"similarPaths":{"type":"array","items":{}},"reasoning":{"type":"string"}},"required":["recommendation","confidence","keyFactors","suggestedActions","similarPaths","reasoning"]}},"required":["reasoning"]},"reasoning":{"type":"object","additionalProperties":true,"properties":{"recommendation":{"type":"string"},"confidence":{"type":"number"},"keyFactors":{"type":"array","items":{}},"suggestedActions":{"type":"array","items":{}},"similarPaths":{"type":"array","items":{}},"reasoning":{"type":"string"}},"required":["recommendation","confidence","keyFactors","suggestedActions","similarPaths","reasoning"]},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"},{"type":"object","additionalProperties":true,"properties":{"memoriesUsed":{"type":"number"},"tokensUsed":{"type":"number"},"processingTime":{"type":"number"}},"required":["memoriesUsed","tokensUsed","processingTime"]}]},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","reasoning","metadata","links"]},"RiasecProfile":{"type":"object","additionalProperties":false,"properties":{"R":{"type":"number"},"I":{"type":"number"},"A":{"type":"number"},"S":{"type":"number"},"E":{"type":"number"},"C":{"type":"number"}}},"CareerTransition":{"type":"object","additionalProperties":true,"properties":{"from":{"type":"string"},"to":{"type":"string"},"duration":{"type":"number"},"success":{"type":"boolean"},"skillsAcquired":{"type":"array","items":{"type":"string"}},"challenges":{"type":"array","items":{"type":"string"}},"keyLessons":{"type":"string"}},"required":["from","to","duration","success"]},"SimilarPathMatch":{"type":"object","additionalProperties":false,"properties":{"pathId":{"type":"string"},"similarityScore":{"type":"number"},"path":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"riasecProfile":{"$ref":"#/components/schemas/RiasecProfile"},"workStyleProfile":{"type":"object","additionalProperties":{"type":"number"},"description":"Overlapping-dimension profile used for work-style similarity. This mirrors the custom workStyle module, not classical OCEAN traits."}}},"matchingFactors":{"type":"object","additionalProperties":true},"relevantTransitions":{"type":"array","items":{"$ref":"#/components/schemas/CareerTransition"}}},"required":["pathId","similarityScore","path","matchingFactors","relevantTransitions"]},"SimilarPathsMetadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"},{"type":"object","additionalProperties":true,"properties":{"totalPaths":{"type":"integer"},"matchesFound":{"type":"integer"},"filters":{"type":"object","additionalProperties":false,"properties":{"targetRole":{"type":"string"},"minSimilarity":{"type":"number"},"limit":{"type":"integer"}}}},"required":["totalPaths","matchesFound"]}]},"SimilarPathsEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SimilarPathMatch"}},"metadata":{"$ref":"#/components/schemas/SimilarPathsMetadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"CareerMatchResult":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string"},"location":{"type":"string"},"profile":{"type":"object","additionalProperties":true},"constraints":{"type":"object","additionalProperties":true},"highFit":{"type":"array","items":{"type":"object","additionalProperties":true}},"worthExploring":{"type":"array","items":{"type":"object","additionalProperties":true}},"riskyMismatch":{"type":"array","items":{"type":"object","additionalProperties":true}},"explanations":{"type":"object","additionalProperties":true},"rawAvailability":{"type":"object","additionalProperties":true},"experimental":{"type":"boolean"}},"required":["highFit","worthExploring","riskyMismatch","experimental"]},"CareerMatchEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/CareerMatchResult"},"metadata":{"$ref":"#/components/schemas/Metadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"MemoryNode":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"userId":{"type":"string"},"nodeType":{"type":"string"},"content":{"type":"object","additionalProperties":true},"contentText":{"type":"string"},"embedding":{"type":"array","items":{"type":"number"}},"importance":{"type":"number"},"createdAt":{"type":"string","format":"date-time"},"lastAccessedAt":{"type":"string","format":"date-time"},"accessCount":{"type":"number"},"sourceType":{"type":"string"},"sourceId":{"type":"string"}},"required":["id","userId","nodeType","content","contentText","importance"]},"TimelineEvent":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"userId":{"type":"string"},"eventType":{"type":"string"},"eventData":{"type":"object","additionalProperties":true},"impactScore":{"type":"number"},"timestamp":{"type":"string","format":"date-time"},"relatedMemoryNodeId":{"type":"string"}},"required":["id","userId","eventType","eventData","impactScore","timestamp"]},"DynamicCareerContext":{"type":"object","additionalProperties":false,"properties":{"profile":{"$ref":"#/components/schemas/CareerGraphProfile"},"relevantMemories":{"type":"array","items":{"$ref":"#/components/schemas/MemoryNode"}},"recentEvents":{"type":"array","items":{"$ref":"#/components/schemas/TimelineEvent"}},"metadata":{"type":"object","additionalProperties":false,"properties":{"contextRelevanceScore":{"type":"number"},"memoriesUsed":{"type":"number"},"generatedAt":{"type":"string","format":"date-time"},"query":{"type":"string"}},"required":["contextRelevanceScore","memoriesUsed","generatedAt"]}},"required":["profile","relevantMemories","recentEvents","metadata"]},"CareerContextMetadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"},{"type":"object","additionalProperties":true,"properties":{"cacheHit":{"type":"boolean"},"contextRelevance":{"type":"number"}}}]},"DynamicCareerContextEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/DynamicCareerContext"},"metadata":{"$ref":"#/components/schemas/CareerContextMetadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"AlertSeverity":{"type":"string","enum":["info","warning","critical"]},"AlertType":{"type":"string","enum":["skill_gap","goal_stagnation","market_misalignment","inactivity"]},"CareerAlert":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string"},"userId":{"type":"string"},"alertType":{"$ref":"#/components/schemas/AlertType"},"severity":{"$ref":"#/components/schemas/AlertSeverity"},"message":{"type":"string"},"actionSuggestions":{"type":"array","items":{"type":"string"}},"relatedMetricId":{"type":"string"},"isRead":{"type":"boolean"},"isDismissed":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"readAt":{"type":"string","format":"date-time"}},"required":["id","userId","alertType","severity","message","isRead","isDismissed","createdAt"]},"AlertsMetadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"},{"type":"object","additionalProperties":true,"properties":{"count":{"type":"integer"}},"required":["count"]}]},"AlertsListEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CareerAlert"}},"metadata":{"$ref":"#/components/schemas/AlertsMetadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"AlertActionRequest":{"type":"object","additionalProperties":false,"properties":{"action":{"type":"string","enum":["read","dismiss"]}},"required":["action"]},"AlertEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/CareerAlert"},"metadata":{"$ref":"#/components/schemas/Metadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"HealthTrend":{"type":"string","enum":["improving","stable","declining"]},"HealthMetric":{"type":"object","additionalProperties":false,"properties":{"score":{"type":"number"},"trend":{"$ref":"#/components/schemas/HealthTrend"},"details":{"type":"object","additionalProperties":true}},"required":["score","trend"]},"CareerHealthReport":{"type":"object","additionalProperties":false,"properties":{"overallScore":{"type":"number"},"metrics":{"type":"object","additionalProperties":false,"properties":{"skillFreshness":{"$ref":"#/components/schemas/HealthMetric"},"goalProgress":{"$ref":"#/components/schemas/HealthMetric"},"marketAlignment":{"$ref":"#/components/schemas/HealthMetric"},"careerActivity":{"$ref":"#/components/schemas/HealthMetric"}},"required":["skillFreshness","goalProgress","marketAlignment","careerActivity"]},"alerts":{"type":"array","items":{"$ref":"#/components/schemas/CareerAlert"}},"recommendations":{"type":"array","items":{"type":"string"}},"lastUpdated":{"type":"string","format":"date-time"}},"required":["overallScore","metrics","alerts","recommendations","lastUpdated"]},"CareerHealthMetadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"},{"type":"object","additionalProperties":true,"properties":{"userId":{"type":"string"}},"required":["userId"]}]},"CareerHealthEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/CareerHealthReport"},"metadata":{"$ref":"#/components/schemas/CareerHealthMetadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"DataSharingPreferences":{"type":"object","additionalProperties":false,"properties":{"userId":{"type":"string"},"shareCareerPath":{"type":"boolean"},"shareAssessmentResults":{"type":"boolean"},"shareSkillProgression":{"type":"boolean"},"updatedAt":{"type":"string","format":"date-time"}},"required":["userId","shareCareerPath","shareAssessmentResults","shareSkillProgression","updatedAt"]},"DataSharingEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/DataSharingPreferences"},"metadata":{"$ref":"#/components/schemas/Metadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"DataSharingUpdateRequest":{"type":"object","additionalProperties":false,"properties":{"shareCareerPath":{"type":"boolean"},"shareAssessmentResults":{"type":"boolean"},"shareSkillProgression":{"type":"boolean"}}},"ContextView":{"type":"string","enum":["compact","full"]},"ContextExpandItem":{"type":"string","enum":["careerGraph","dynamicContext","alerts","careerHealth","dataSharing"]},"ContextAssessmentHighlightDimension":{"type":"object","additionalProperties":false,"properties":{"key":{"type":"string"},"label":{"type":"string"}},"required":["key","label"]},"ContextAssessmentHighlight":{"type":"object","additionalProperties":false,"properties":{"moduleId":{"$ref":"#/components/schemas/CareerAssessmentModuleId"},"moduleCategory":{"$ref":"#/components/schemas/CareerAssessmentModuleCategory"},"semanticModel":{"$ref":"#/components/schemas/CareerAssessmentSemanticModel"},"timeScope":{"$ref":"#/components/schemas/CareerAssessmentTimeScope"},"salientDimensions":{"type":"array","items":{"$ref":"#/components/schemas/ContextAssessmentHighlightDimension"}},"completedAt":{"type":"string","format":"date-time"}},"required":["moduleId","moduleCategory","semanticModel","timeScope","salientDimensions","completedAt"]},"ContextSummary":{"type":"object","additionalProperties":false,"properties":{"currentJobTitle":{"type":"string"},"currentIndustry":{"type":"string"},"yearsOfExperience":{"type":"number"},"profileCompleteness":{"type":"number"},"resume":{"type":"object","additionalProperties":false,"properties":{"hasResume":{"type":"boolean"},"skillsTop":{"type":"array","items":{"type":"string"}},"experienceCount":{"type":"integer"},"educationCount":{"type":"integer"}},"required":["hasResume","skillsTop","experienceCount","educationCount"]},"assessments":{"type":"object","additionalProperties":false,"properties":{"availableModules":{"type":"array","items":{"$ref":"#/components/schemas/CareerAssessmentModuleId"}},"moduleCount":{"type":"integer"},"highlights":{"type":"array","items":{"$ref":"#/components/schemas/ContextAssessmentHighlight"}},"lastCompletedAt":{"type":["string","null"],"format":"date-time"}},"required":["availableModules","moduleCount","highlights","lastCompletedAt"]},"lastUpdated":{"type":"string"},"apiVersion":{"type":"string"}},"required":["resume","assessments"]},"ContextRecommendedCall":{"type":"object","additionalProperties":false,"properties":{"when":{"type":"string"},"method":{"type":"string"},"path":{"type":"string"}},"required":["when","method","path"]},"ContextMetadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"},{"type":"object","additionalProperties":true,"properties":{"userId":{"type":"string"},"view":{"$ref":"#/components/schemas/ContextView"},"expanded":{"type":"array","items":{"$ref":"#/components/schemas/ContextExpandItem"}},"careerGraph":{"type":"string","enum":["none","summary","full"]},"resumeSkillsLimit":{"type":"integer","minimum":0,"maximum":100},"alertsLimit":{"type":"integer","minimum":1,"maximum":50},"durationMs":{"type":"number"},"warnings":{"type":"array","items":{"type":"string"}}},"required":["userId","view","expanded","careerGraph","resumeSkillsLimit","alertsLimit","durationMs","warnings"]}]},"CareerGraphSummaryResume":{"type":"object","additionalProperties":false,"properties":{"skills":{"type":"array","items":{"type":"string"}},"experience":{"type":"array","items":{"type":"object","additionalProperties":true}},"education":{"type":"array","items":{"type":"object","additionalProperties":true}},"parsed_at":{"type":"string","format":"date-time"}},"required":["skills","experience","education"]},"CareerGraphSummary":{"type":"object","additionalProperties":false,"properties":{"user":{"$ref":"#/components/schemas/CareerGraphUser"},"profile":{"$ref":"#/components/schemas/CareerGraphProfile"},"assessments":{"$ref":"#/components/schemas/CareerGraphAssessments"},"resume":{"$ref":"#/components/schemas/CareerGraphSummaryResume"},"metadata":{"$ref":"#/components/schemas/CareerGraphMetadata"}},"required":["user","profile","assessments","metadata"]},"ContextAlertsFilters":{"type":"object","additionalProperties":false,"properties":{"includeRead":{"type":"boolean"},"includeDismissed":{"type":"boolean"}},"required":["includeRead","includeDismissed"]},"ContextAlertsSection":{"type":"object","additionalProperties":false,"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CareerAlert"}},"count":{"type":"integer"},"filters":{"$ref":"#/components/schemas/ContextAlertsFilters"}},"required":["items","count","filters"]},"ContextSections":{"type":"object","additionalProperties":false,"properties":{"careerGraph":{"oneOf":[{"$ref":"#/components/schemas/CareerGraph"},{"$ref":"#/components/schemas/CareerGraphSummary"}],"description":"Only present when expanded (or view=full). Shape depends on careerGraph mode."},"dynamicContext":{"$ref":"#/components/schemas/DynamicCareerContext"},"alerts":{"$ref":"#/components/schemas/ContextAlertsSection"},"careerHealth":{"$ref":"#/components/schemas/CareerHealthReport"},"dataSharing":{"$ref":"#/components/schemas/DataSharingPreferences"}}},"ContextData":{"type":"object","additionalProperties":false,"properties":{"user":{"$ref":"#/components/schemas/CareerGraphUser"},"summary":{"$ref":"#/components/schemas/ContextSummary"},"sections":{"$ref":"#/components/schemas/ContextSections"},"recommendedNextCalls":{"type":"array","items":{"$ref":"#/components/schemas/ContextRecommendedCall"}}},"required":["user","summary","recommendedNextCalls"]},"ContextLinks":{"type":"object","additionalProperties":true,"properties":{"self":{"type":"string"},"openapi":{"type":"string"},"reference":{"type":"string"},"related":{"type":"array","items":{"type":"string"}}},"required":["self","openapi","reference","related"]},"ContextEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/ContextData"},"metadata":{"$ref":"#/components/schemas/ContextMetadata"},"links":{"$ref":"#/components/schemas/ContextLinks"}},"required":["data","metadata","links"]},"FitBrief":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"userId":{"type":"string"},"query":{"type":"string"},"targetKind":{"type":"string","nullable":true},"targetValue":{"type":"string","nullable":true},"opportunitySummary":{"type":"object","nullable":true,"additionalProperties":true},"briefData":{"type":"object","additionalProperties":true},"source":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","userId","query","briefData"]},"FitBriefEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/FitBrief"},"metadata":{"$ref":"#/components/schemas/Metadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"FitBriefListEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FitBrief"}},"metadata":{"$ref":"#/components/schemas/Metadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"ReportArtifact":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"userId":{"type":"string","nullable":true},"sourceSubmissionIds":{"type":"array","items":{"type":"string"},"nullable":true},"kind":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"contentMarkdown":{"type":"string","nullable":true},"claims":{"type":"array","items":{"type":"object","additionalProperties":true}},"evidenceRefs":{"type":"array","items":{"type":"string"}},"fitHypotheses":{"type":"array","items":{"type":"object","additionalProperties":true}},"tradeoffs":{"type":"array","items":{"type":"object","additionalProperties":true}},"risks":{"type":"array","items":{"type":"object","additionalProperties":true}},"recommendedActions":{"type":"array","items":{"type":"object","additionalProperties":true}},"artifactRefs":{"type":"array","items":{"type":"string"}},"checkpointId":{"type":"string","nullable":true},"branchId":{"type":"string","nullable":true},"supersedesReportId":{"type":"string","nullable":true},"version":{"type":"integer","nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id"]},"ReportArtifactEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/ReportArtifact"},"metadata":{"$ref":"#/components/schemas/Metadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"ReportArtifactListEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ReportArtifact"}},"metadata":{"$ref":"#/components/schemas/Metadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"ExecutionArtifact":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"userId":{"type":"string"},"kind":{"type":"string","enum":["resume_variant","outreach_note","interview_brief"]},"title":{"type":"string"},"targetKind":{"type":"string","nullable":true},"targetValue":{"type":"string","nullable":true},"status":{"type":"string"},"source":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"opportunitySummary":{"type":"object","nullable":true,"additionalProperties":true},"contentData":{"type":"object","additionalProperties":true},"fitBriefRef":{"type":"string","nullable":true},"reportRef":{"type":"string","nullable":true},"checkpointId":{"type":"string","nullable":true},"metadata":{"type":"object","nullable":true,"additionalProperties":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","userId","kind","title","status","contentData"]},"ExecutionArtifactEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/ExecutionArtifact"},"metadata":{"$ref":"#/components/schemas/Metadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"ExecutionArtifactListEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ExecutionArtifact"}},"metadata":{"$ref":"#/components/schemas/Metadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"JobsWorkspaceItem":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"userId":{"type":"string"},"type":{"type":"string","enum":["direction","opportunity"]},"title":{"type":"string"},"company":{"type":"string","nullable":true},"sourceType":{"type":"string","enum":["manual","pasted_link","pasted_text","imported","agent_generated"]},"status":{"type":"string","enum":["discovering","intake_ready","fit_ready","artifacts_ready","handed_off","archived"]},"fitBriefRef":{"type":"string","nullable":true},"reportRefs":{"type":"array","items":{"type":"string"}},"artifactRefs":{"type":"array","items":{"type":"string"}},"checkpointId":{"type":"string","nullable":true},"metadata":{"type":"object","nullable":true,"additionalProperties":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","userId","type","title","sourceType","status","reportRefs","artifactRefs"]},"JobsWorkspaceEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/JobsWorkspaceItem"},"metadata":{"$ref":"#/components/schemas/Metadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"JobsWorkspaceListEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/JobsWorkspaceItem"}},"metadata":{"$ref":"#/components/schemas/Metadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"Checkpoint":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"userId":{"type":"string"},"kind":{"type":"string","enum":["explore","apply","report","jobs"]},"sourceCheckpointId":{"type":"string","nullable":true},"status":{"type":"string","enum":["active","archived"]},"goalSnapshot":{"type":"object","nullable":true,"additionalProperties":true},"targetSnapshot":{"type":"object","nullable":true,"additionalProperties":true},"reportRefs":{"type":"array","items":{"type":"string"}},"artifactRefs":{"type":"array","items":{"type":"string"}},"jobsWorkspaceRefs":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","nullable":true,"additionalProperties":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","userId","kind","status","reportRefs","artifactRefs","jobsWorkspaceRefs"]},"CheckpointEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/Checkpoint"},"metadata":{"$ref":"#/components/schemas/Metadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"CheckpointListEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Checkpoint"}},"metadata":{"$ref":"#/components/schemas/Metadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"CheckpointCreateRequest":{"type":"object","additionalProperties":false,"properties":{"kind":{"type":"string","enum":["explore","apply","report","jobs"]},"sourceCheckpointId":{"type":"string"},"goalSnapshot":{"type":"object","additionalProperties":true},"targetSnapshot":{"type":"object","additionalProperties":true},"reportRefs":{"type":"array","items":{"type":"string"}},"artifactRefs":{"type":"array","items":{"type":"string"}},"jobsWorkspaceRefs":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","additionalProperties":true}},"required":["kind"]},"CheckpointRestoreEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"object","additionalProperties":false,"properties":{"checkpoint":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string"}},"required":["id","kind","status"]},"continuation":{"type":"object","additionalProperties":true}},"required":["checkpoint","continuation"]},"metadata":{"$ref":"#/components/schemas/Metadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"CheckpointForkRequest":{"type":"object","additionalProperties":false,"properties":{"branchLabel":{"type":"string"},"note":{"type":"string"}}},"JobsWorkspaceCreateRequest":{"type":"object","additionalProperties":false,"properties":{"type":{"type":"string","enum":["direction","opportunity"]},"title":{"type":"string"},"company":{"type":"string","nullable":true},"sourceType":{"type":"string","enum":["manual","pasted_link","pasted_text","imported","agent_generated"]},"status":{"type":"string","enum":["discovering","intake_ready","fit_ready","artifacts_ready","handed_off","archived"]},"fitBriefRef":{"type":"string","nullable":true},"reportRefs":{"type":"array","items":{"type":"string"}},"artifactRefs":{"type":"array","items":{"type":"string"}},"checkpointId":{"type":"string","nullable":true},"metadata":{"type":"object","nullable":true,"additionalProperties":true}},"required":["type","title","sourceType"]},"JobsWorkspacePatchRequest":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string"},"company":{"type":"string","nullable":true},"status":{"type":"string","enum":["discovering","intake_ready","fit_ready","artifacts_ready","handed_off","archived"]},"fitBriefRef":{"type":"string","nullable":true},"reportRefs":{"type":"array","items":{"type":"string"}},"artifactRefs":{"type":"array","items":{"type":"string"}},"checkpointId":{"type":"string","nullable":true},"metadata":{"type":"object","nullable":true,"additionalProperties":true}}},"AgentExploreRequest":{"type":"object","additionalProperties":false,"properties":{"goal":{"type":"object","additionalProperties":true},"target":{"type":"object","additionalProperties":true},"opportunity":{"type":"object","additionalProperties":true},"context":{"type":"object","additionalProperties":true},"execution":{"type":"object","additionalProperties":true}},"required":["goal"]},"AgentRecoveryStep":{"type":"object","additionalProperties":false,"properties":{"type":{"type":"string"},"label":{"type":"string"}},"required":["type","label"]},"AgentSuggestedNextCall":{"type":"object","additionalProperties":false,"properties":{"method":{"type":"string","enum":["GET","POST","PATCH","PUT","DELETE"]},"path":{"type":"string"},"reason":{"type":"string"}},"required":["method","path","reason"]},"AgentCheckpointHandle":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["suggested","created","updated","failed"],"description":"`suggested` means no persistence change was made. `create` wrote a new checkpoint. `update` appended refs to an existing checkpoint. `failed` means checkpoint persistence did not complete even though action results may still be present."},"reason":{"type":"string"}},"required":["id","status","reason"]},"AgentActionDiagnostics":{"type":"object","additionalProperties":false,"properties":{"failureType":{"type":"string"},"blockingConstraint":{"type":"string","nullable":true},"recoverable":{"type":"boolean"},"suggestedRecoveryPath":{"type":"array","items":{"$ref":"#/components/schemas/AgentRecoveryStep"}},"category":{"type":"string","nullable":true,"enum":["auth","rate_limit","input_quality","missing_context","missing_evidence","integration","infrastructure","policy","unknown"]},"details":{"type":"array","items":{"type":"string"}}},"required":["failureType","blockingConstraint","recoverable","suggestedRecoveryPath"]},"AgentActionOutputs":{"type":"object","additionalProperties":false,"properties":{"artifactRefs":{"type":"array","items":{"type":"string"}},"reportRefs":{"type":"array","items":{"type":"string"}},"jobsWorkspaceRefs":{"type":"array","items":{"type":"string"}},"inline":{"type":"object","nullable":true,"additionalProperties":true,"description":"Optional inline payloads for lightweight consumers. Persisted refs remain the stable integration surface."}},"required":["artifactRefs","reportRefs","jobsWorkspaceRefs"]},"AgentApplyOpportunityInput":{"type":"object","additionalProperties":false,"properties":{"inputMode":{"type":"string","enum":["pasted_link","pasted_text","manual"]},"sourceUrl":{"type":"string","format":"uri","nullable":true},"title":{"type":"string","nullable":true},"company":{"type":"string","nullable":true},"location":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"rawText":{"type":"string","nullable":true}},"required":["inputMode"]},"AgentApplyTarget":{"type":"object","additionalProperties":false,"properties":{"kind":{"type":"string","enum":["role_family","career_path","opportunity"]},"value":{"type":"string"},"id":{"type":"string","nullable":true}},"required":["kind","value"]},"AgentApplyActionNormalizeOpportunity":{"type":"object","additionalProperties":false,"properties":{"type":{"type":"string","enum":["normalize_opportunity"]},"opportunity":{"$ref":"#/components/schemas/AgentApplyOpportunityInput"}},"required":["type","opportunity"]},"AgentApplyActionGenerateFitBrief":{"type":"object","additionalProperties":false,"properties":{"type":{"type":"string","enum":["generate_fit_brief"]},"target":{"$ref":"#/components/schemas/AgentApplyTarget"},"opportunity":{"$ref":"#/components/schemas/AgentApplyOpportunityInput"}},"required":["type"]},"AgentApplyActionCompareRoleDirections":{"type":"object","additionalProperties":false,"properties":{"type":{"type":"string","enum":["compare_role_directions"]},"candidates":{"type":"array","minItems":2,"maxItems":6,"items":{"type":"string"}}},"required":["type","candidates"]},"AgentApplyActionRequestReportBranch":{"type":"object","additionalProperties":false,"properties":{"type":{"type":"string","enum":["request_report_branch"]},"prompt":{"type":"string","nullable":true},"branchLabel":{"type":"string","nullable":true},"target":{"$ref":"#/components/schemas/AgentApplyTarget"}},"required":["type"]},"AgentApplyActionPrepareExecutionArtifact":{"type":"object","additionalProperties":false,"properties":{"type":{"type":"string","enum":["prepare_execution_artifact"]},"artifactKind":{"type":"string","enum":["resume_variant","fit_brief","outreach_note","interview_brief"]},"opportunity":{"$ref":"#/components/schemas/AgentApplyOpportunityInput"},"target":{"$ref":"#/components/schemas/AgentApplyTarget"}},"required":["type","artifactKind"]},"AgentApplyActionCollectMissingEvidenceHint":{"type":"object","additionalProperties":false,"properties":{"type":{"type":"string","enum":["collect_missing_evidence_hint"]},"gapKeys":{"type":"array","minItems":1,"maxItems":10,"items":{"type":"string"}}},"required":["type","gapKeys"]},"AgentApplyAction":{"oneOf":[{"$ref":"#/components/schemas/AgentApplyActionNormalizeOpportunity"},{"$ref":"#/components/schemas/AgentApplyActionGenerateFitBrief"},{"$ref":"#/components/schemas/AgentApplyActionCompareRoleDirections"},{"$ref":"#/components/schemas/AgentApplyActionRequestReportBranch"},{"$ref":"#/components/schemas/AgentApplyActionPrepareExecutionArtifact"},{"$ref":"#/components/schemas/AgentApplyActionCollectMissingEvidenceHint"}]},"AgentApplyExecutionOptions":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","enum":["best_effort","transactional_if_possible"],"description":"`best_effort` is the default. Expect per-action mixed outcomes under HTTP 200. `transactional_if_possible` is only a hint and does not imply cross-action atomicity unless metadata says so."},"stopOnFailure":{"type":"boolean","description":"When true, later actions stop after the first `failed` or `blocked` result. Earlier results remain valid."},"reuseExistingArtifacts":{"type":"boolean","description":"When true, ProfileClaw may converge repeated logical requests onto stable persisted artifacts instead of creating duplicates."},"checkpoint":{"type":"string","enum":["none","suggest","create","update"],"description":"`suggest` returns checkpoint metadata without writing a row. `create` writes a new checkpoint. `update` appends apply outputs onto an existing checkpoint and requires `context.checkpointId`."}}},"AgentApplyContext":{"type":"object","additionalProperties":false,"properties":{"checkpointId":{"type":"string","nullable":true,"description":"Required when `execution.checkpoint` is `update`."},"reportId":{"type":"string","nullable":true},"jobsWorkspaceItemId":{"type":"string","nullable":true}}},"AgentInspectGoal":{"type":"object","additionalProperties":false,"properties":{"type":{"type":"string","enum":["discover_directions","evaluate_opportunity","generate_fit_brief","prepare_execution_artifacts","compare_paths"]},"query":{"type":"string"},"priority":{"type":"string","enum":["speed","balanced","depth"]}},"required":["type","query"]},"AgentInspectFocusGoal":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","enum":["goal"]}},"required":["mode"]},"AgentInspectFocusFailedAction":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","enum":["failed_action"]},"actionType":{"type":"string"},"artifactKind":{"type":"string","nullable":true}},"required":["mode","actionType"]},"AgentInspectFocusArtifact":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","enum":["artifact"]},"artifactId":{"type":"string"}},"required":["mode","artifactId"]},"AgentInspectFocusReport":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","enum":["report"]},"reportId":{"type":"string"}},"required":["mode","reportId"]},"AgentInspectFocusWorkspaceItem":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","enum":["workspace_item"]},"jobsWorkspaceItemId":{"type":"string"}},"required":["mode","jobsWorkspaceItemId"]},"AgentInspectFocusCheckpoint":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","enum":["checkpoint"]},"checkpointId":{"type":"string"}},"required":["mode","checkpointId"]},"AgentInspectFocus":{"oneOf":[{"$ref":"#/components/schemas/AgentInspectFocusGoal"},{"$ref":"#/components/schemas/AgentInspectFocusFailedAction"},{"$ref":"#/components/schemas/AgentInspectFocusArtifact"},{"$ref":"#/components/schemas/AgentInspectFocusReport"},{"$ref":"#/components/schemas/AgentInspectFocusWorkspaceItem"},{"$ref":"#/components/schemas/AgentInspectFocusCheckpoint"}]},"AgentInspectContext":{"type":"object","additionalProperties":false,"properties":{"checkpointId":{"type":"string","nullable":true},"reportId":{"type":"string","nullable":true},"jobsWorkspaceItemId":{"type":"string","nullable":true}}},"AgentInspectLastActionResult":{"type":"object","additionalProperties":false,"properties":{"type":{"type":"string"},"status":{"type":"string","enum":["succeeded","failed","blocked","skipped"]},"blockingConstraint":{"type":"string","nullable":true}},"required":["type","status"]},"AgentInspectOptions":{"type":"object","additionalProperties":false,"properties":{"includePatterns":{"type":"boolean"},"includeRecommendedApplyBody":{"type":"boolean"},"maxRecommendations":{"type":"integer","minimum":1,"maximum":5,"default":3}}},"AgentSuccessfulPatternsOptions":{"type":"object","additionalProperties":false,"properties":{"includeBodyTemplates":{"type":"boolean"},"maxPatterns":{"type":"integer","minimum":1,"maximum":5,"default":3}}},"AgentInspectRequest":{"type":"object","additionalProperties":false,"properties":{"goal":{"$ref":"#/components/schemas/AgentInspectGoal"},"focus":{"$ref":"#/components/schemas/AgentInspectFocus"},"opportunity":{"$ref":"#/components/schemas/AgentApplyOpportunityInput"},"context":{"$ref":"#/components/schemas/AgentInspectContext"},"lastActionResult":{"$ref":"#/components/schemas/AgentInspectLastActionResult"},"options":{"$ref":"#/components/schemas/AgentInspectOptions"}},"required":["focus"]},"AgentSuccessfulPatternsRequest":{"type":"object","additionalProperties":false,"properties":{"goal":{"$ref":"#/components/schemas/AgentInspectGoal"},"target":{"type":"object","additionalProperties":false,"properties":{"kind":{"type":"string","enum":["role_family","career_path","opportunity","artifact"]},"value":{"type":"string"},"id":{"type":"string","nullable":true}},"required":["kind","value"]},"opportunity":{"$ref":"#/components/schemas/AgentApplyOpportunityInput"},"focus":{"$ref":"#/components/schemas/AgentInspectFocus"},"context":{"$ref":"#/components/schemas/AgentInspectContext"},"lastActionResult":{"$ref":"#/components/schemas/AgentInspectLastActionResult"},"options":{"$ref":"#/components/schemas/AgentSuccessfulPatternsOptions"}},"description":"Provide at least one anchor such as `goal`, `target`, `opportunity`, `focus`, `context`, or `lastActionResult`."},"AgentInspectDiagnosis":{"type":"object","additionalProperties":false,"properties":{"readiness":{"type":"string","enum":["ready","partial","blocked"]},"confidence":{"type":"number"},"summary":{"type":"string"},"failureClass":{"type":"string","enum":["missing_context","missing_signal","missing_evidence","artifact_dependency","state_mismatch","unknown"]},"topBlockingConstraint":{"type":"string","nullable":true}},"required":["readiness","confidence","summary","failureClass","topBlockingConstraint"]},"AgentInspectGaps":{"type":"object","additionalProperties":false,"properties":{"missingSignals":{"type":"array","items":{"type":"string"}},"missingEvidence":{"type":"array","items":{"type":"string"}},"stateMismatches":{"type":"array","items":{"type":"string"}}},"required":["missingSignals","missingEvidence","stateMismatches"]},"AgentSuccessfulPattern":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string"},"label":{"type":"string"},"rank":{"type":"integer"},"score":{"type":"number"},"whyThisPatternWorks":{"type":"array","items":{"type":"string"}},"recommendedActionSequence":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"type":{"type":"string"},"artifactKind":{"type":"string","nullable":true}},"required":["type"]}},"expectedOutputs":{"type":"array","items":{"type":"string"}},"commonFailureModes":{"type":"array","items":{"type":"string"}},"bodyTemplate":{"type":"object","nullable":true,"additionalProperties":true}},"required":["id","label","rank","score","whyThisPatternWorks","recommendedActionSequence","expectedOutputs","commonFailureModes"]},"AgentInspectRecommendedNextMove":{"type":"object","additionalProperties":false,"properties":{"rank":{"type":"integer"},"type":{"type":"string"},"reason":{"type":"string"},"bodyTemplate":{"type":"object","nullable":true,"additionalProperties":true}},"required":["rank","type","reason"]},"AgentInspectRelatedResources":{"type":"object","additionalProperties":false,"properties":{"checkpointId":{"type":"string","nullable":true},"reportId":{"type":"string","nullable":true},"jobsWorkspaceItemId":{"type":"string","nullable":true},"artifactRefs":{"type":"array","items":{"type":"string"}}}},"AgentSuccessfulPatternsProfileReadiness":{"type":"object","additionalProperties":false,"properties":{"readiness":{"type":"string","enum":["ready","partial","blocked"]},"confidence":{"type":"number"},"missingSignals":{"type":"array","items":{"type":"string"}},"missingEvidence":{"type":"array","items":{"type":"string"}},"stateMismatches":{"type":"array","items":{"type":"string"}},"topBlockingConstraint":{"type":"string","nullable":true}},"required":["readiness","confidence","missingSignals","missingEvidence","stateMismatches","topBlockingConstraint"]},"AgentSuccessfulPatternsEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"object","additionalProperties":false,"properties":{"profileReadiness":{"$ref":"#/components/schemas/AgentSuccessfulPatternsProfileReadiness"},"patterns":{"type":"array","items":{"$ref":"#/components/schemas/AgentSuccessfulPattern"}},"relatedResources":{"$ref":"#/components/schemas/AgentInspectRelatedResources"}},"required":["profileReadiness","patterns","relatedResources"]},"metadata":{"$ref":"#/components/schemas/Metadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"AgentInspectEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"object","additionalProperties":false,"properties":{"diagnosis":{"$ref":"#/components/schemas/AgentInspectDiagnosis"},"gaps":{"$ref":"#/components/schemas/AgentInspectGaps"},"successfulPatterns":{"type":"array","items":{"$ref":"#/components/schemas/AgentSuccessfulPattern"}},"recommendedNextMoves":{"type":"array","items":{"$ref":"#/components/schemas/AgentInspectRecommendedNextMove"}},"relatedResources":{"$ref":"#/components/schemas/AgentInspectRelatedResources"}},"required":["diagnosis","gaps","successfulPatterns","recommendedNextMoves","relatedResources"]},"metadata":{"$ref":"#/components/schemas/Metadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"AgentExploreEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"object","additionalProperties":false,"properties":{"goalAnalysis":{"type":"object","additionalProperties":true},"strategyCandidates":{"type":"array","items":{"type":"object","additionalProperties":true}},"successfulPatterns":{"type":"array","items":{"$ref":"#/components/schemas/AgentSuccessfulPattern"}},"diagnostics":{"type":"object","additionalProperties":true},"relatedResources":{"type":"object","additionalProperties":true},"checkpoint":{"oneOf":[{"$ref":"#/components/schemas/AgentCheckpointHandle"},{"type":"null"}]}},"required":["goalAnalysis","strategyCandidates","successfulPatterns","diagnostics","relatedResources","checkpoint"]},"metadata":{"$ref":"#/components/schemas/Metadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]},"AgentApplyRequest":{"type":"object","additionalProperties":false,"properties":{"actions":{"type":"array","minItems":1,"maxItems":10,"items":{"$ref":"#/components/schemas/AgentApplyAction"},"description":"Actions execute in request order."},"execution":{"$ref":"#/components/schemas/AgentApplyExecutionOptions"},"context":{"$ref":"#/components/schemas/AgentApplyContext"}},"required":["actions"]},"AgentArtifactSummary":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["fit_brief","resume_variant","outreach_note","interview_brief","report_branch"]},"status":{"type":"string","enum":["ready","reused","pending"]}},"required":["id","kind","status"]},"AgentActionResult":{"type":"object","additionalProperties":false,"properties":{"actionId":{"type":"string"},"type":{"type":"string"},"status":{"type":"string","enum":["succeeded","failed","blocked","skipped"],"description":"`failed` means the action ran but hit a runtime or persistence failure. `blocked` means prerequisites were missing. `skipped` means the caller asked to stop after an earlier failure."},"summary":{"type":"string"},"outputs":{"$ref":"#/components/schemas/AgentActionOutputs"},"warnings":{"type":"array","items":{"type":"string"}},"diagnostics":{"oneOf":[{"$ref":"#/components/schemas/AgentActionDiagnostics"},{"type":"null"}]},"artifactSummaries":{"type":"array","items":{"$ref":"#/components/schemas/AgentArtifactSummary"}},"suggestedNextCalls":{"type":"array","items":{"$ref":"#/components/schemas/AgentSuggestedNextCall"}}},"required":["actionId","type","status","summary","outputs","warnings","diagnostics","suggestedNextCalls"]},"AgentApplyEnvelope":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"object","additionalProperties":false,"description":"A valid `agent/apply` batch may still contain mixed per-action statuses under HTTP 200. Always inspect `results[*].status` instead of assuming success from the top-level status code alone.","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/AgentActionResult"}},"artifacts":{"type":"array","items":{"$ref":"#/components/schemas/AgentArtifactSummary"}},"checkpoint":{"oneOf":[{"$ref":"#/components/schemas/AgentCheckpointHandle"},{"type":"null"}]}},"required":["results","artifacts","checkpoint"]},"metadata":{"$ref":"#/components/schemas/Metadata"},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","metadata","links"]}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"paths":{"/api/v1/context":{"get":{"tags":["Context"],"summary":"Get aggregated agent context","description":"Default agent entrypoint. Returns a compact high-signal summary by default and can expand into the normalized career graph, dynamic context, alerts, health, and sharing preferences.","x-required-scopes":["read:context"],"parameters":[{"name":"view","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ContextView"},"description":"compact (default) returns the summary only. full automatically includes the full careerGraph unless overridden."},{"name":"expand","in":"query","required":false,"style":"form","explode":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContextExpandItem"}},"description":"Comma-separated expansions. Allowed: careerGraph,dynamicContext,alerts,careerHealth,dataSharing.","examples":{"none":{"summary":"Summary only","value":[]},"graphSummary":{"summary":"Summary + graph projection","value":["careerGraph"]},"queryMemories":{"summary":"Query-specific memory context","value":["dynamicContext"]}}},{"name":"query","in":"query","required":false,"schema":{"type":"string"},"description":"Only used when expand includes dynamicContext."},{"name":"timeRange","in":"query","required":false,"schema":{"type":"string","enum":["recent","all"],"default":"recent"},"description":"Only used when expand includes dynamicContext."},{"name":"includeMemories","in":"query","required":false,"schema":{"type":"boolean","default":true},"description":"Only used when expand includes dynamicContext."},{"name":"careerGraph","in":"query","required":false,"schema":{"type":"string","enum":["none","summary","full"],"default":"full"},"description":"When careerGraph is included, choose summary to receive the normalized graph projection without recommendations."},{"name":"resumeSkillsLimit","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":100,"default":25},"description":"Limits resume skills in summary mode and in careerGraph=summary."},{"name":"alertsLimit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"description":"Limits alerts returned when expand includes alerts."}],"x-codeSamples":[{"lang":"curl","source":"curl \"https://profileclaw.cn/api/v1/context\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\""},{"lang":"curl","source":"curl \"https://profileclaw.cn/api/v1/context?view=full\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\""},{"lang":"curl","source":"curl \"https://profileclaw.cn/api/v1/context?expand=dynamicContext&query=product%20management&timeRange=recent\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\""},{"lang":"curl","source":"curl \"https://profileclaw.cn/api/v1/context?expand=careerGraph&careerGraph=summary&resumeSkillsLimit=20\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\""},{"lang":"curl","source":"curl \"https://profileclaw.cn/api/v1/context\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\" -H 'If-None-Match: \"<etag-from-previous-response>\"'"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"ETag":{"schema":{"type":"string"},"description":"Strong ETag for conditional requests. Send it back via If-None-Match to receive 304."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextEnvelope"},"examples":{"compact":{"value":{"data":{"user":{"id":"user_123","name":"Alex","email":"alex@example.com"},"summary":{"currentJobTitle":"Software Engineer","currentIndustry":"SaaS","yearsOfExperience":5,"profileCompleteness":0.8,"resume":{"hasResume":true,"skillsTop":["TypeScript","Next.js"],"experienceCount":3,"educationCount":1},"assessments":{"availableModules":["riasec","workStyle","values","currentStatePulse"],"moduleCount":4,"highlights":[{"moduleId":"riasec","moduleCategory":"interest_profile","semanticModel":"riasec_interest_model","timeScope":"stable","salientDimensions":[{"key":"I","label":"investigative"},{"key":"A","label":"artistic"},{"key":"R","label":"realistic"}],"completedAt":"2026-03-07T00:00:00Z"},{"moduleId":"workStyle","moduleCategory":"work_style_dimensions","semanticModel":"custom_work_style_dimensions","timeScope":"stable","salientDimensions":[{"key":"LA","label":"learning_agility"},{"key":"EX","label":"execution_drive"},{"key":"ER","label":"emotional_resilience"}],"completedAt":"2026-03-07T00:00:00Z"}],"lastCompletedAt":"2026-03-07T00:00:00Z"},"lastUpdated":"2026-03-07T00:00:00Z","apiVersion":"1.0"},"recommendedNextCalls":[{"when":"Need the full normalized graph backbone","method":"GET","path":"/api/v1/context?view=full"}]},"metadata":{"requestId":"req_500","timestamp":"2026-03-07T00:00:00Z","userId":"user_123","view":"compact","expanded":[],"careerGraph":"full","resumeSkillsLimit":25,"alertsLimit":20,"durationMs":12,"warnings":[]},"links":{"self":"/api/v1/context","openapi":"/.well-known/openapi.json","reference":"/reference","related":["/api/v1/career-graph","/api/v1/career-context","/api/v1/profile"]}}},"careerGraphSummary":{"value":{"data":{"user":{"id":"user_123","name":"Alex","email":"alex@example.com"},"summary":{"currentJobTitle":"Software Engineer","currentIndustry":"SaaS","yearsOfExperience":5,"profileCompleteness":0.8,"resume":{"hasResume":true,"skillsTop":["TypeScript","Next.js"],"experienceCount":3,"educationCount":1},"assessments":{"availableModules":["riasec","workStyle","values"],"moduleCount":3,"highlights":[{"moduleId":"riasec","moduleCategory":"interest_profile","semanticModel":"riasec_interest_model","timeScope":"stable","salientDimensions":[{"key":"I","label":"investigative"},{"key":"R","label":"realistic"},{"key":"A","label":"artistic"}],"completedAt":"2026-03-07T00:00:00Z"}],"lastCompletedAt":"2026-03-07T00:00:00Z"},"lastUpdated":"2026-03-07T00:00:00Z","apiVersion":"1.0"},"sections":{"careerGraph":{"user":{"id":"user_123","name":"Alex","email":"alex@example.com"},"profile":{"current_job_title":"Software Engineer","current_industry":"SaaS","years_of_experience":5},"assessments":{"riasec":{"module_id":"riasec","semantic_model":"riasec_interest_model","module_category":"interest_profile","time_scope":"stable","dimension_labels":{"R":"realistic","I":"investigative","A":"artistic","S":"social","E":"enterprising","C":"conventional"},"scores":{"I":82,"R":71,"A":68,"C":49,"S":33,"E":28},"salient_dimensions":["I","R","A"],"quality":{"differentiation_score":0.78,"confidence_score":0.91,"consistency_flags":[]},"completed_at":"2026-03-07T00:00:00Z"},"workStyle":{"module_id":"workStyle","semantic_model":"custom_work_style_dimensions","module_category":"work_style_dimensions","time_scope":"stable","dimension_labels":{"AN":"analytical_thinking","IP":"interpersonal_influence","EX":"execution_drive","LA":"learning_agility","ER":"emotional_resilience","IN":"innovation_orientation"},"scores":{"LA":84,"EX":77,"AN":73,"ER":68,"IN":61,"IP":49},"salient_dimensions":["LA","EX","AN"],"quality":{"differentiation_score":0.64,"confidence_score":0.88,"consistency_flags":[]},"completed_at":"2026-03-07T00:00:00Z"}},"resume":{"skills":["TypeScript","Next.js"],"experience":[],"education":[],"parsed_at":"2026-03-07T00:00:00Z"},"metadata":{"profile_completeness":0.8,"last_updated":"2026-03-07T00:00:00Z","api_version":"1.0"}}},"recommendedNextCalls":[{"when":"Need the full normalized graph with recommendations","method":"GET","path":"/api/v1/career-graph"},{"when":"Need similar anonymized paths","method":"GET","path":"/api/v1/similar-paths?targetRole=..."}]},"metadata":{"requestId":"req_501","timestamp":"2026-03-07T00:00:00Z","userId":"user_123","view":"compact","expanded":["careerGraph"],"careerGraph":"summary","resumeSkillsLimit":20,"alertsLimit":20,"durationMs":14,"warnings":[]},"links":{"self":"/api/v1/context?expand=careerGraph&careerGraph=summary&resumeSkillsLimit=20","openapi":"/.well-known/openapi.json","reference":"/reference","related":["/api/v1/career-graph","/api/v1/career-context","/api/v1/profile"]}}},"dynamicContextExpanded":{"value":{"data":{"user":{"id":"user_123","name":"Alex","email":"alex@example.com"},"summary":{"currentJobTitle":"Software Engineer","currentIndustry":"SaaS","yearsOfExperience":5,"profileCompleteness":0.8,"resume":{"hasResume":true,"skillsTop":["TypeScript","Next.js"],"experienceCount":3,"educationCount":1},"assessments":{"availableModules":["riasec","workStyle","values"],"moduleCount":3,"highlights":[],"lastCompletedAt":"2026-03-07T00:00:00Z"},"lastUpdated":"2026-03-07T00:00:00Z","apiVersion":"1.0"},"sections":{"dynamicContext":{"profile":{"current_job_title":"Software Engineer","current_industry":"SaaS","years_of_experience":5},"relevantMemories":[],"recentEvents":[],"metadata":{"contextRelevanceScore":0,"memoriesUsed":0,"generatedAt":"2026-03-07T00:00:00Z","query":"product management"}}},"recommendedNextCalls":[{"when":"Need the normalized assessment modules behind the summary","method":"GET","path":"/api/v1/assessments"}]},"metadata":{"requestId":"req_520","timestamp":"2026-03-07T00:00:00Z","userId":"user_123","view":"compact","expanded":["dynamicContext"],"careerGraph":"full","resumeSkillsLimit":25,"alertsLimit":20,"durationMs":18,"warnings":[]},"links":{"self":"/api/v1/context?expand=dynamicContext&query=product%20management","openapi":"/.well-known/openapi.json","reference":"/reference","related":["/api/v1/context"]}}}}}}},"304":{"description":"Not Modified","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"ETag":{"schema":{"type":"string"},"description":"Echoes the current ETag."}}},"400":{"description":"Bad request","x-error-codes":["context.invalid_view","validation.bad_request"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"invalidView":{"value":{"error":"Invalid view: bad","type":"context.invalid_view"}},"invalidParameter":{"value":{"error":"Invalid resumeSkillsLimit: 200. Must be between 0 and 100.","type":"validation.bad_request"}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"402":{"$ref":"#/components/responses/PaymentRequiredError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Context not found","x-error-codes":["context.not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"notFound":{"value":{"error":"Context not found","type":"context.not_found"}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/profile":{"get":{"tags":["Profile"],"summary":"Get the authenticated user's profile projection","description":"Returns the normalized profile projection derived from the canonical career graph. Use this when you need profile + recommendations without the full assessment or resume payload.","x-required-scopes":["read:profile"],"x-codeSamples":[{"lang":"curl","source":"curl \"https://profileclaw.cn/api/v1/profile\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\""}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileEnvelope"},"examples":{"ok":{"value":{"data":{"user":{"id":"user_123","name":"Alex","email":"alex@example.com"},"profile":{"current_job_title":"Software Engineer","current_industry":"SaaS","years_of_experience":5,"target_locations":["Shanghai"],"target_industries":["SaaS","AI Tools"]},"recommendations":{"matched_careers":[],"worth_exploring":[],"risky_careers":[],"skill_gaps":["Roadmapping"],"development_areas":["Cross-functional leadership"]},"metadata":{"profile_completeness":0.8,"last_updated":"2026-03-07T00:00:00Z","api_version":"1.0"}},"metadata":{"requestId":"req_610","timestamp":"2026-03-07T00:00:00Z","userId":"user_123"},"links":{"self":"/api/v1/profile","related":["/api/v1/context","/api/v1/career-graph"]}}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"$ref":"#/components/responses/ProfileNotFoundError"},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/career-graph":{"get":{"tags":["Career Graph"],"summary":"Get the normalized career graph","description":"Canonical full graph endpoint. Use /api/v1/context as the default agent entrypoint, and use this endpoint when you need the complete normalized graph backbone including assessments, resume, and recommendations.","x-required-scopes":["read:career_graph"],"x-codeSamples":[{"lang":"curl","source":"curl \"https://profileclaw.cn/api/v1/career-graph\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\""},{"lang":"curl","source":"curl \"https://profileclaw.cn/api/v1/career-graph\" -H \"X-API-Key: $PROFILECLAW_API_KEY\""}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CareerGraphEnvelope"},"examples":{"ok":{"value":{"data":{"user":{"id":"user_123","name":"Alex","email":"alex@example.com"},"profile":{"bio_summary":"Engineer transitioning toward product leadership.","current_job_title":"Software Engineer","current_industry":"SaaS","years_of_experience":5,"target_locations":["Shanghai"],"target_industries":["SaaS","AI Tools"]},"assessments":{"riasec":{"module_id":"riasec","semantic_model":"riasec_interest_model","module_category":"interest_profile","time_scope":"stable","dimension_labels":{"R":"realistic","I":"investigative","A":"artistic","S":"social","E":"enterprising","C":"conventional"},"scores":{"I":82,"R":71,"A":68,"C":49,"S":33,"E":28},"salient_dimensions":["I","R","A"],"quality":{"differentiation_score":0.78,"confidence_score":0.91,"consistency_flags":[]},"completed_at":"2026-03-07T00:00:00Z"},"workStyle":{"module_id":"workStyle","semantic_model":"custom_work_style_dimensions","module_category":"work_style_dimensions","time_scope":"stable","dimension_labels":{"AN":"analytical_thinking","IP":"interpersonal_influence","EX":"execution_drive","LA":"learning_agility","ER":"emotional_resilience","IN":"innovation_orientation"},"scores":{"LA":84,"EX":77,"AN":73,"ER":68,"IN":61,"IP":49},"salient_dimensions":["LA","EX","AN"],"quality":{"differentiation_score":0.64,"confidence_score":0.88,"consistency_flags":[]},"completed_at":"2026-03-07T00:00:00Z"},"values":{"module_id":"values","semantic_model":"career_values_tradeoff_model","module_category":"career_values","time_scope":"stable","dimension_labels":{"AC":"achievement_drive","PW":"influence_power","EX":"mastery_depth","WL":"financial_reward","SC":"stability_security","AU":"autonomy","SI":"social_impact","AF":"affiliation_harmony","WB":"work_life_balance","EN":"innovation_venture"},"scores":{"AU":91,"EX":88,"SI":80,"WB":77,"SC":65,"WL":58},"salient_dimensions":["AU","EX","SI"],"quality":{"differentiation_score":0.71,"confidence_score":0.86,"consistency_flags":[]},"completed_at":"2026-03-07T00:00:00Z"},"currentStatePulse":{"module_id":"currentStatePulse","semantic_model":"current_state_pulse_model","module_category":"state_pulse","time_scope":"current","dimension_labels":{"SL":"stress_load","SD":"sleep_debt","PD":"patience_drop","SW":"social_withdrawal","CT":"certainty_need"},"scores":{"SL":71,"SD":64,"CT":59,"PD":52,"SW":38},"salient_dimensions":["SL","SD","CT"],"quality":{"differentiation_score":0.53,"confidence_score":0.74,"consistency_flags":["recent_state_module"]},"completed_at":"2026-03-12T00:00:00Z"}},"resume":{"skills":["TypeScript","Next.js","SQL","Stakeholder communication"],"experience":[{"title":"Software Engineer","company":"Acme","duration":"2022-2026","description":"Built product-facing internal tools and analytics workflows."}],"education":[{"degree":"BSc Computer Science","institution":"Fudan University","year":"2021"}],"parsed_at":"2026-03-07T00:00:00Z"},"career_recommendations":{"matched_careers":[{"id":"career_pm","title":"Product Manager","match_score":78,"reasoningKey":"why.taskContent","reasoningText":"The day-to-day task mix is closer to the interest pattern currently standing out in your profile.","bucket":"high_fit","explanation":{"hardFiltersPassed":["salary_floor","education_gate"],"positiveFactors":[{"type":"riasec","key":"ICE","labelKey":"why.taskContent","labelText":"The day-to-day task mix is closer to the interest pattern currently standing out in your profile."}],"riskFactors":[],"missingRequirements":[],"whyFit":[{"textKey":"why.taskContent","text":"The day-to-day task mix is closer to the interest pattern currently standing out in your profile."}],"possibleFriction":[],"whatToVerifyNext":[{"textKey":"verify.teamRhythm","text":"Whether the team rhythm, manager style, and expectations fit your long-term pace."}]}}],"worth_exploring":[],"risky_careers":[],"skill_gaps":["Roadmapping","User research synthesis"],"development_areas":["Cross-functional leadership"]},"metadata":{"profile_completeness":0.8,"last_updated":"2026-03-12T00:00:00Z","api_version":"1.0"}},"metadata":{"requestId":"req_620","timestamp":"2026-03-12T00:00:00Z","userId":"user_123"},"links":{"self":"/api/v1/career-graph","related":["/api/v1/context","/api/v1/profile","/api/v1/assessments"]}}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"$ref":"#/components/responses/CareerGraphNotFoundError"},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/career-context":{"get":{"tags":["Profile"],"summary":"Get a smaller dynamic career context payload","description":"Returns query-shaped dynamic context with relevant memories and recent events. Use /api/v1/context when you need the broader normalized summary first.","x-required-scopes":["read:career_context"],"parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"},"description":"Optional query string to find relevant memories."},{"name":"timeRange","in":"query","required":false,"schema":{"type":"string","enum":["recent","all"]},"description":"recent = 30 days, all = 365 days."},{"name":"includeMemories","in":"query","required":false,"schema":{"type":"boolean"},"description":"Default true."},{"name":"maxTokens","in":"query","required":false,"schema":{"type":"integer"},"description":"Reserved; not fully enforced yet."}],"x-codeSamples":[{"lang":"curl","source":"curl \"https://profileclaw.cn/api/v1/career-context?query=product%20management&timeRange=recent\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\""}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DynamicCareerContextEnvelope"},"examples":{"ok":{"value":{"data":{"profile":{"current_job_title":"Software Engineer","current_industry":"SaaS","years_of_experience":5},"relevantMemories":[{"id":"mem_123","userId":"user_123","nodeType":"experience","content":{"company":"Acme","topic":"product discovery"},"contentText":"Led product discovery for a B2B SaaS workflow with PM partners.","importance":0.92,"createdAt":"2026-03-07T00:00:00Z","lastAccessedAt":"2026-03-07T00:00:00Z","accessCount":4,"sourceType":"resume","sourceId":"resume_123"}],"recentEvents":[{"id":"evt_123","userId":"user_123","eventType":"goal.updated","eventData":{"goal":"Move into product management"},"impactScore":0.8,"timestamp":"2026-03-07T00:00:00Z"}],"metadata":{"contextRelevanceScore":0.84,"memoriesUsed":1,"generatedAt":"2026-03-07T00:00:00Z","query":"product management"}},"metadata":{"requestId":"req_630","timestamp":"2026-03-07T00:00:00Z","cacheHit":false,"contextRelevance":0.84,"userId":"user_123"},"links":{"self":"/api/v1/career-context?query=product%20management&timeRange=recent","related":["/api/v1/context","/api/v1/career-graph","/api/v1/profile"]}}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"$ref":"#/components/responses/CareerContextNotFoundError"},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/assessments":{"get":{"tags":["Assessments"],"summary":"Get the latest normalized assessment modules","description":"Projection of careerGraph.assessments. Returns the latest assessment modules using one shared contract with explicit semantics, time scope, salient dimensions, and quality metadata.","x-required-scopes":["read:assessments"],"x-codeSamples":[{"lang":"curl","source":"curl \"https://profileclaw.cn/api/v1/assessments\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\""},{"lang":"curl","source":"curl \"https://profileclaw.cn/api/v1/assessments\" -H \"X-API-Key: $PROFILECLAW_API_KEY\""}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentsEnvelope"},"examples":{"ok":{"value":{"data":{"riasec":{"module_id":"riasec","semantic_model":"riasec_interest_model","module_category":"interest_profile","time_scope":"stable","dimension_labels":{"R":"realistic","I":"investigative","A":"artistic","S":"social","E":"enterprising","C":"conventional"},"scores":{"I":82,"R":71,"A":68,"C":49,"S":33,"E":28},"salient_dimensions":["I","R","A"],"quality":{"differentiation_score":0.78,"confidence_score":0.91,"consistency_flags":[]},"completed_at":"2026-03-07T00:00:00Z"},"workStyle":{"module_id":"workStyle","semantic_model":"custom_work_style_dimensions","module_category":"work_style_dimensions","time_scope":"stable","dimension_labels":{"AN":"analytical_thinking","IP":"interpersonal_influence","EX":"execution_drive","LA":"learning_agility","ER":"emotional_resilience","IN":"innovation_orientation"},"scores":{"LA":84,"EX":77,"AN":73,"ER":68,"IN":61,"IP":49},"salient_dimensions":["LA","EX","AN"],"quality":{"differentiation_score":0.64,"confidence_score":0.88,"consistency_flags":[]},"completed_at":"2026-03-07T00:00:00Z"},"values":{"module_id":"values","semantic_model":"career_values_tradeoff_model","module_category":"career_values","time_scope":"stable","dimension_labels":{"AC":"achievement_drive","PW":"influence_power","EX":"mastery_depth","WL":"financial_reward","SC":"stability_security","AU":"autonomy","SI":"social_impact","AF":"affiliation_harmony","WB":"work_life_balance","EN":"innovation_venture"},"scores":{"AU":91,"EX":88,"SI":80,"WB":77,"SC":65,"WL":58},"salient_dimensions":["AU","EX","SI"],"quality":{"differentiation_score":0.71,"confidence_score":0.86,"consistency_flags":[]},"completed_at":"2026-03-07T00:00:00Z"},"currentStatePulse":{"module_id":"currentStatePulse","semantic_model":"current_state_pulse_model","module_category":"state_pulse","time_scope":"current","dimension_labels":{"SL":"stress_load","SD":"sleep_debt","PD":"patience_drop","SW":"social_withdrawal","CT":"certainty_need"},"scores":{"SL":71,"SD":64,"CT":59,"PD":52,"SW":38},"salient_dimensions":["SL","SD","CT"],"quality":{"differentiation_score":0.53,"confidence_score":0.74,"consistency_flags":["recent_state_module"]},"completed_at":"2026-03-12T00:00:00Z"}},"metadata":{"requestId":"req_640","timestamp":"2026-03-12T00:00:00Z","userId":"user_123"},"links":{"self":"/api/v1/assessments","related":["/api/v1/context","/api/v1/career-graph"]}}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"$ref":"#/components/responses/AssessmentsNotFoundError"},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/career-prediction":{"post":{"tags":["Career Graph"],"summary":"Generate a career prediction","x-required-scopes":["run:career_prediction"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CareerPredictionRequest"},"examples":{"productManager":{"value":{"targetRole":"Product Manager","timeHorizon":"18 months","includeAlternatives":true}}}}}},"x-codeSamples":[{"lang":"curl","source":"curl -X POST \"https://profileclaw.cn/api/v1/career-prediction\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\" -H \"Content-Type: application/json\" -d '{\"targetRole\":\"Product Manager\",\"timeHorizon\":\"18 months\",\"includeAlternatives\":true}'"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CareerPredictionEnvelope"},"examples":{"ok":{"value":{"data":{"predictions":[{"targetRole":"Product Manager","probability":0.74,"timeHorizon":"18 months"}],"userContext":{"currentRole":"Software Engineer","topSkills":["TypeScript","SQL","Stakeholder communication"]},"metadata":{"generatedAt":"2026-03-07T00:00:00Z","model":"career-prediction-v1"}},"metadata":{"requestId":"req_650","timestamp":"2026-03-07T00:00:00Z","userId":"user_123"},"links":{"self":"/api/v1/career-prediction","related":["/api/v1/context","/api/v1/similar-paths","/api/v1/career-reasoning"]}}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"400":{"description":"Bad request","x-error-codes":["career_prediction.missing_target_role"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"missingTargetRole":{"value":{"error":"Missing required field: targetRole","type":"career_prediction.missing_target_role"}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"402":{"$ref":"#/components/responses/PaymentRequiredError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/career-reasoning":{"post":{"tags":["Career Graph"],"summary":"Run agent-style reasoning over a career profile","x-required-scopes":["run:career_reasoning"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CareerReasoningRequest"},"examples":{"shouldISwitch":{"value":{"query":"Should I switch to product management?","context":{"includeMemories":true,"includeSimulation":false,"timeRange":"all"}}}}}}},"x-codeSamples":[{"lang":"curl","source":"curl -X POST \"https://profileclaw.cn/api/v1/career-reasoning\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":\"Should I switch to product management?\",\"context\":{\"includeMemories\":true,\"includeSimulation\":false,\"timeRange\":\"all\"}}'"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CareerReasoningResponse"},"examples":{"ok":{"value":{"data":{"reasoning":{"recommendation":"cautiously_positive","confidence":0.72,"keyFactors":[],"suggestedActions":[],"similarPaths":[],"reasoning":"Your current profile suggests a realistic path with targeted upskilling."}},"reasoning":{"recommendation":"cautiously_positive","confidence":0.72,"keyFactors":[],"suggestedActions":[],"similarPaths":[],"reasoning":"Your current profile suggests a realistic path with targeted upskilling."},"metadata":{"requestId":"req_660","timestamp":"2026-03-07T00:00:00Z","memoriesUsed":5,"tokensUsed":1250,"processingTime":2340},"links":{"self":"/api/v1/career-reasoning","related":["/api/v1/context","/api/v1/career-prediction","/api/v1/similar-paths"]}}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"400":{"description":"Bad request","x-error-codes":["career_reasoning.query_required","career_reasoning.query_too_long"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"queryRequired":{"value":{"error":"Query is required and must be a non-empty string","type":"career_reasoning.query_required"}},"queryTooLong":{"value":{"error":"Query is too long (max 500 characters)","type":"career_reasoning.query_too_long"}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"402":{"$ref":"#/components/responses/PaymentRequiredError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/webhooks":{"get":{"tags":["Webhooks"],"summary":"List webhook subscriptions","x-required-scopes":["read:webhooks"],"x-codeSamples":[{"lang":"curl","source":"curl \"https://profileclaw.cn/api/v1/webhooks\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\""}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookListEnvelope"},"examples":{"ok":{"value":{"data":[{"id":"sub_123","webhookUrl":"https://example.com/profileclaw/webhook","events":["assessment.completed","profile.updated"],"isActive":true,"createdAt":"2026-03-07T00:00:00Z"}],"metadata":{"requestId":"req_670","timestamp":"2026-03-07T00:00:00Z","count":1,"userId":"user_123"},"links":{"self":"/api/v1/webhooks","related":["/api/v1/context"]}}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"post":{"tags":["Webhooks"],"summary":"Create a webhook subscription","description":"Webhook deliveries include headers X-Webhook-Event, X-Webhook-Delivery, and X-Webhook-Signature (HMAC-SHA256 hex of the raw JSON body using your subscription secret).","x-required-scopes":["write:webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"url":{"type":"string","format":"uri"},"events":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"secret":{"type":"string"}},"required":["url","events"]},"examples":{"profileAndAssessment":{"value":{"url":"https://example.com/profileclaw/webhook","events":["assessment.completed","profile.updated"]}}}}}},"x-codeSamples":[{"lang":"curl","source":"curl \"https://profileclaw.cn/api/v1/webhooks\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\" -H \"Content-Type: application/json\" -d '{\"url\":\"https://example.com/profileclaw/webhook\",\"events\":[\"assessment.completed\",\"profile.updated\"]}'"}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionEnvelope"},"examples":{"created":{"value":{"data":{"id":"sub_123","webhookUrl":"https://example.com/profileclaw/webhook","events":["assessment.completed","profile.updated"],"isActive":true,"createdAt":"2026-03-07T00:00:00Z"},"metadata":{"requestId":"req_671","timestamp":"2026-03-07T00:00:00Z","userId":"user_123"},"links":{"self":"/api/v1/webhooks","related":["/api/v1/context"]}}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"400":{"description":"Bad request","x-error-codes":["webhooks.missing_required_fields","webhooks.invalid_url","webhooks.invalid_events"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"missingRequiredFields":{"value":{"error":"Missing required fields: url, events","type":"webhooks.missing_required_fields"}},"invalidUrl":{"value":{"error":"Invalid webhook URL","type":"webhooks.invalid_url"}},"invalidEvents":{"value":{"error":"Invalid events: profile.broken","type":"webhooks.invalid_events"}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"tags":["Webhooks"],"summary":"Delete a webhook subscription","x-required-scopes":["write:webhooks"],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string"},"description":"Subscription ID"}],"x-codeSamples":[{"lang":"curl","source":"curl -X DELETE \"https://profileclaw.cn/api/v1/webhooks?id=sub_123\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\""}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeleteEnvelope"},"examples":{"deleted":{"value":{"data":{"deleted":true},"metadata":{"requestId":"req_672","timestamp":"2026-03-07T00:00:00Z","userId":"user_123"},"links":{"self":"/api/v1/webhooks?id=sub_123","related":["/api/v1/webhooks"]}}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"400":{"description":"Bad request","x-error-codes":["webhooks.missing_subscription_id"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"missingSubscriptionId":{"value":{"error":"Missing subscription ID","type":"webhooks.missing_subscription_id"}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"$ref":"#/components/responses/WebhookSubscriptionNotFoundError"},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/fit-briefs":{"get":{"tags":["Operations"],"summary":"List fit briefs or fetch one by id","x-required-scopes":["read:fit_briefs"],"parameters":[{"name":"id","in":"query","required":false,"schema":{"type":"string"},"description":"When provided, returns one fit brief instead of a list."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":10},"description":"List size when id is not provided."}],"x-codeSamples":[{"lang":"curl","source":"curl \"https://profileclaw.cn/api/v1/fit-briefs?limit=5\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\""},{"lang":"curl","source":"curl \"https://profileclaw.cn/api/v1/fit-briefs?id=brief_123\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\""}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/FitBriefListEnvelope"},{"$ref":"#/components/schemas/FitBriefEnvelope"}]}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/reports":{"get":{"tags":["Operations"],"summary":"List reports or fetch one by id","x-required-scopes":["read:reports"],"parameters":[{"name":"id","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":10}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ReportArtifactListEnvelope"},{"$ref":"#/components/schemas/ReportArtifactEnvelope"}]}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/execution-artifacts":{"get":{"tags":["Operations"],"summary":"List execution artifacts or fetch one by id","x-required-scopes":["read:execution_artifacts"],"parameters":[{"name":"id","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":10}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ExecutionArtifactListEnvelope"},{"$ref":"#/components/schemas/ExecutionArtifactEnvelope"}]}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/jobs-workspace":{"get":{"tags":["Operations"],"summary":"List jobs workspace items or fetch one by id","x-required-scopes":["read:jobs_workspace"],"parameters":[{"name":"id","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":10}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/JobsWorkspaceListEnvelope"},{"$ref":"#/components/schemas/JobsWorkspaceEnvelope"}]}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"post":{"tags":["Operations"],"summary":"Create jobs workspace item","x-required-scopes":["write:jobs_workspace"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobsWorkspaceCreateRequest"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobsWorkspaceEnvelope"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/jobs-workspace/{id}":{"patch":{"tags":["Operations"],"summary":"Update jobs workspace item","x-required-scopes":["write:jobs_workspace"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobsWorkspacePatchRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobsWorkspaceEnvelope"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/agent/explore":{"post":{"tags":["Agent Operations"],"summary":"Explore ranked next strategies for an agent goal","x-required-scopes":["run:agent_explore"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentExploreRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentExploreEnvelope"},"examples":{"withPatterns":{"value":{"data":{"goalAnalysis":{"goalType":"evaluate_opportunity","interpretedIntent":"Assess this Product Manager role","readiness":"partial","confidence":0.68},"strategyCandidates":[{"id":"normalize_opportunity","type":"normalize_opportunity","label":"Normalize the opportunity input before deeper reasoning","rank":1,"score":0.9}],"successfulPatterns":[{"id":"normalize_then_fit_then_report","label":"Normalize, fit, then branch","rank":1,"score":0.95,"whyThisPatternWorks":["structured opportunity input reduces ambiguity before fit and report generation"],"recommendedActionSequence":[{"type":"normalize_opportunity"},{"type":"generate_fit_brief"},{"type":"request_report_branch"}],"expectedOutputs":["normalized_opportunity","fit_brief","report_branch"],"commonFailureModes":["missing.resume.experience"],"bodyTemplate":{"actions":[{"type":"normalize_opportunity","opportunity":{"inputMode":"manual","title":"Product Manager"}}]}}],"diagnostics":{"blockingConstraints":["missing.resume.experience"],"missingSignals":[],"evidenceGaps":["missing.resume.experience"],"suggestedRecoveryPath":[]},"relatedResources":{"contextSummary":true,"reportCandidates":["fitbrief_123"],"jobsWorkspaceState":null},"checkpoint":null},"metadata":{"requestId":"req_agent_explore_1","timestamp":"2026-03-31T00:00:00Z","userId":"user_123","strategyCount":1,"warnings":[]},"links":{"self":"/api/v1/agent/explore","related":["/api/v1/context","/api/v1/agent/successful-patterns"]}}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"400":{"description":"Bad request","x-error-codes":["agent_explore.invalid_request"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/agent/successful-patterns":{"post":{"tags":["Agent Operations"],"summary":"Return reusable likely-successful next-step bundles","description":"Returns a compact reusable pattern layer for next-step bundles. This endpoint is read-only and does not mutate state. `inspect` and `explore` may embed the same pattern family, but this route is the canonical direct surface.","x-required-scopes":["run:agent_successful_patterns"],"x-codeSamples":[{"lang":"curl","source":"curl -X POST \"https://profileclaw.cn/api/v1/agent/successful-patterns\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\" -H \"Content-Type: application/json\" -d '{\"goal\":{\"type\":\"evaluate_opportunity\",\"query\":\"Associate Product Manager\",\"priority\":\"balanced\"},\"opportunity\":{\"inputMode\":\"manual\",\"title\":\"Associate Product Manager\",\"company\":\"Example Co\",\"description\":\"Own roadmap discovery and coordinate cross-functional delivery\"},\"focus\":{\"mode\":\"failed_action\",\"actionType\":\"prepare_execution_artifact\",\"artifactKind\":\"outreach_note\"},\"lastActionResult\":{\"type\":\"prepare_execution_artifact\",\"status\":\"blocked\",\"blockingConstraint\":\"missing.resume.experience\"},\"options\":{\"includeBodyTemplates\":true,\"maxPatterns\":3}}'"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSuccessfulPatternsRequest"},"examples":{"opportunityRecovery":{"value":{"goal":{"type":"evaluate_opportunity","query":"Associate Product Manager","priority":"balanced"},"opportunity":{"inputMode":"manual","title":"Associate Product Manager","company":"Example Co","description":"Own roadmap discovery and coordinate cross-functional delivery"},"focus":{"mode":"failed_action","actionType":"prepare_execution_artifact","artifactKind":"outreach_note"},"lastActionResult":{"type":"prepare_execution_artifact","status":"blocked","blockingConstraint":"missing.resume.experience"},"options":{"includeBodyTemplates":true,"maxPatterns":3}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSuccessfulPatternsEnvelope"},"examples":{"patterns":{"value":{"data":{"profileReadiness":{"readiness":"blocked","confidence":0.85,"missingSignals":[],"missingEvidence":["missing.resume.experience"],"stateMismatches":["artifact.outreach_note_requires_role_specific_evidence"],"topBlockingConstraint":"missing.resume.experience"},"patterns":[{"id":"collect_evidence_then_fit","label":"Collect evidence, then fit","rank":1,"score":0.96,"whyThisPatternWorks":["the cheapest recovery path is usually to fill concrete evidence gaps before deeper branching"],"recommendedActionSequence":[{"type":"collect_missing_evidence_hint"},{"type":"generate_fit_brief"}],"expectedOutputs":["evidence_hints","fit_brief"],"commonFailureModes":["missing.resume.experience"],"bodyTemplate":{"actions":[{"type":"collect_missing_evidence_hint","gapKeys":["missing.resume.experience"]},{"type":"generate_fit_brief","opportunity":{"inputMode":"manual","title":"Associate Product Manager","company":"Example Co","description":"Own roadmap discovery and coordinate cross-functional delivery"}}]}},{"id":"fit_then_report_then_artifact","label":"Fit first, then report branch, then artifact","rank":2,"score":0.86,"whyThisPatternWorks":["execution artifacts converge better after fit reasoning and a branch artifact already exist"],"recommendedActionSequence":[{"type":"generate_fit_brief"},{"type":"request_report_branch"},{"type":"prepare_execution_artifact","artifactKind":"outreach_note"}],"expectedOutputs":["fit_brief","report_branch","execution_artifact"],"commonFailureModes":["missing.resume.experience"]}],"relatedResources":{"checkpointId":null,"reportId":null,"jobsWorkspaceItemId":null,"artifactRefs":[]}},"metadata":{"requestId":"req_agent_patterns_1","timestamp":"2026-03-31T00:00:00Z","userId":"user_123","patternCount":2,"warnings":[]},"links":{"self":"/api/v1/agent/successful-patterns","related":["/api/v1/agent/explore","/api/v1/agent/inspect","/api/v1/agent/apply"]}}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"400":{"description":"Bad request","x-error-codes":["agent_successful_patterns.invalid_request"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Context unavailable or focus not found","x-error-codes":["agent_successful_patterns.context_unavailable","agent_successful_patterns.focus_not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/agent/inspect":{"post":{"tags":["Agent Operations"],"summary":"Diagnose blocked or weak agent state before the next move","description":"Returns a compact diagnosis layer between `agent/explore` and `agent/apply`. It does not mutate state or create checkpoints by default. Use it after blocked or failed action attempts when the next recovery move is unclear.","x-required-scopes":["run:agent_inspect"],"x-codeSamples":[{"lang":"curl","source":"curl -X POST \"https://profileclaw.cn/api/v1/agent/inspect\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\" -H \"Content-Type: application/json\" -d '{\"goal\":{\"type\":\"evaluate_opportunity\",\"query\":\"Associate Product Manager\",\"priority\":\"balanced\"},\"focus\":{\"mode\":\"failed_action\",\"actionType\":\"prepare_execution_artifact\",\"artifactKind\":\"outreach_note\"},\"lastActionResult\":{\"type\":\"prepare_execution_artifact\",\"status\":\"blocked\",\"blockingConstraint\":\"missing.resume.experience\"},\"options\":{\"includePatterns\":true,\"includeRecommendedApplyBody\":true,\"maxRecommendations\":3}}'"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentInspectRequest"},"examples":{"failedArtifactRecovery":{"value":{"goal":{"type":"evaluate_opportunity","query":"Associate Product Manager","priority":"balanced"},"focus":{"mode":"failed_action","actionType":"prepare_execution_artifact","artifactKind":"outreach_note"},"opportunity":{"inputMode":"manual","title":"Associate Product Manager","company":"Example Co","location":"Shanghai","description":"Own roadmap discovery and coordinate cross-functional delivery"},"context":{"checkpointId":"ckpt_123","reportId":"report_123","jobsWorkspaceItemId":"job_123"},"lastActionResult":{"type":"prepare_execution_artifact","status":"blocked","blockingConstraint":"missing.resume.experience"},"options":{"includePatterns":true,"includeRecommendedApplyBody":true,"maxRecommendations":3}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentInspectEnvelope"},"examples":{"blockedRecovery":{"value":{"data":{"diagnosis":{"readiness":"blocked","confidence":0.86,"summary":"The current path is blocked mainly by thin role-specific experience evidence rather than a missing saved object.","failureClass":"missing_evidence","topBlockingConstraint":"missing.resume.experience"},"gaps":{"missingSignals":[],"missingEvidence":["missing.resume.experience"],"stateMismatches":["artifact.outreach_note_requires_role_specific_evidence"]},"successfulPatterns":[{"id":"fit_then_report_then_artifact","label":"Fit first, then report branch, then artifact","rank":1,"score":0.86,"whyThisPatternWorks":["artifact quality improves once fit and branch reasoning are already stable"],"recommendedActionSequence":[{"type":"generate_fit_brief"},{"type":"request_report_branch"},{"type":"prepare_execution_artifact","artifactKind":"outreach_note"}],"expectedOutputs":["fit_brief","report_branch","execution_artifact"],"commonFailureModes":["missing.resume.experience"],"bodyTemplate":{"actions":[{"type":"generate_fit_brief","opportunity":{"inputMode":"manual","title":"Associate Product Manager","company":"Example Co","location":"Shanghai","description":"Own roadmap discovery and coordinate cross-functional delivery"}},{"type":"request_report_branch","branchLabel":"evaluate_opportunity","prompt":"Branch reasoning for Associate Product Manager"},{"type":"prepare_execution_artifact","artifactKind":"outreach_note","opportunity":{"inputMode":"manual","title":"Associate Product Manager","company":"Example Co","location":"Shanghai","description":"Own roadmap discovery and coordinate cross-functional delivery"}}],"context":{"checkpointId":"ckpt_123","reportId":"report_123","jobsWorkspaceItemId":"job_123"}}}],"recommendedNextMoves":[{"rank":1,"type":"collect_missing_evidence_hint","reason":"Cheapest path to unlock stronger downstream reasoning and artifact generation","bodyTemplate":{"actions":[{"type":"collect_missing_evidence_hint","gapKeys":["missing.resume.experience"]}],"context":{"checkpointId":"ckpt_123","reportId":"report_123","jobsWorkspaceItemId":"job_123"}}},{"rank":2,"type":"request_report_branch","reason":"Stabilize reasoning before retrying execution artifact preparation","bodyTemplate":{"actions":[{"type":"request_report_branch","branchLabel":"evaluate_opportunity","prompt":"Stabilize reasoning for Associate Product Manager"}],"context":{"checkpointId":"ckpt_123","reportId":"report_123","jobsWorkspaceItemId":"job_123"}}}],"relatedResources":{"checkpointId":"ckpt_123","reportId":"report_123","jobsWorkspaceItemId":"job_123","artifactRefs":["fitbrief_123"]}},"metadata":{"requestId":"req_agent_inspect_1","timestamp":"2026-03-31T00:00:00Z","userId":"user_123","recommendationCount":2,"warnings":[]},"links":{"self":"/api/v1/agent/inspect","related":["/api/v1/agent/explore","/api/v1/agent/apply","/api/v1/context","/api/v1/checkpoints"]}}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"400":{"description":"Bad request","x-error-codes":["agent_inspect.invalid_request"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Context unavailable or focus not found","x-error-codes":["agent_inspect.context_unavailable","agent_inspect.focus_not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/agent/apply":{"post":{"tags":["Agent Operations"],"summary":"Execute one or more agent actions with partial success support","description":"Runs one or more requested actions in order. A valid request may still return mixed per-action outcomes under HTTP 200. Inspect `data.results[*].status` for the true action-level outcome. `execution.checkpoint=suggest` does not persist a checkpoint. `execution.checkpoint=update` requires `context.checkpointId`.","x-required-scopes":["run:agent_apply"],"x-codeSamples":[{"lang":"curl","source":"curl -X POST \"https://profileclaw.cn/api/v1/agent/apply\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\" -H \"Content-Type: application/json\" -d '{\"actions\":[{\"type\":\"generate_fit_brief\",\"target\":{\"kind\":\"role_family\",\"value\":\"product management\"}},{\"type\":\"prepare_execution_artifact\",\"artifactKind\":\"outreach_note\",\"target\":{\"kind\":\"role_family\",\"value\":\"product management\"}}],\"execution\":{\"mode\":\"best_effort\",\"stopOnFailure\":false,\"reuseExistingArtifacts\":true,\"checkpoint\":\"suggest\"}}'"},{"lang":"curl","source":"curl -X POST \"https://profileclaw.cn/api/v1/agent/apply\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\" -H \"Content-Type: application/json\" -d '{\"actions\":[{\"type\":\"request_report_branch\",\"branchLabel\":\"pm-path\",\"target\":{\"kind\":\"role_family\",\"value\":\"product management\"}}],\"execution\":{\"checkpoint\":\"update\"},\"context\":{\"checkpointId\":\"ckpt_123\"}}'"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentApplyRequest"},"examples":{"bestEffortWithCheckpointSuggestion":{"value":{"actions":[{"type":"generate_fit_brief","target":{"kind":"role_family","value":"product management"}},{"type":"prepare_execution_artifact","artifactKind":"outreach_note","target":{"kind":"role_family","value":"product management"}}],"execution":{"mode":"best_effort","stopOnFailure":false,"reuseExistingArtifacts":true,"checkpoint":"suggest"}}},"updateExistingCheckpoint":{"value":{"actions":[{"type":"request_report_branch","branchLabel":"pm-path","target":{"kind":"role_family","value":"product management"}}],"execution":{"checkpoint":"update"},"context":{"checkpointId":"ckpt_123","reportId":"report_456"}}}}}}},"responses":{"200":{"description":"OK. The request was valid and processed. Individual actions may still be `failed` or `blocked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentApplyEnvelope"},"examples":{"partialSuccess":{"value":{"data":{"results":[{"actionId":"action_1","type":"generate_fit_brief","status":"succeeded","summary":"Fit brief generated for product management","outputs":{"artifactRefs":["fitbrief_123"],"reportRefs":[],"jobsWorkspaceRefs":["jobopp_123"]},"warnings":[],"diagnostics":null,"artifactSummaries":[{"id":"fitbrief_123","kind":"fit_brief","status":"ready"}],"suggestedNextCalls":[{"method":"POST","path":"/api/v1/agent/explore","reason":"Explore the next artifact or report move after fit generation"}]},{"actionId":"action_2","type":"prepare_execution_artifact","status":"blocked","summary":"Outreach note generation is blocked because role-specific evidence is still too thin","outputs":{"artifactRefs":[],"reportRefs":[],"jobsWorkspaceRefs":[]},"warnings":[],"diagnostics":{"failureType":"insufficient_evidence","blockingConstraint":"missing.resume.experience","recoverable":true,"suggestedRecoveryPath":[{"type":"collect_missing_evidence","label":"Add recent project outcomes or role-relevant evidence before drafting outreach"}],"category":"missing_evidence","details":[]},"artifactSummaries":[{"id":"fitbrief_123","kind":"fit_brief","status":"ready"}],"suggestedNextCalls":[{"method":"POST","path":"/api/v1/agent/explore","reason":"Explore evidence collection or report branch next steps"}]}],"artifacts":[{"id":"fitbrief_123","kind":"fit_brief","status":"ready"}],"checkpoint":{"id":"suggested","status":"suggested","reason":"Apply results are good checkpoint candidates, but no persistence change was made"}},"metadata":{"requestId":"req_agent_apply_1","timestamp":"2026-03-30T00:00:00Z","userId":"user_123","actionCount":2,"succeeded":1,"failed":0,"blocked":1,"skipped":0,"executionMode":"best_effort","warnings":[]},"links":{"self":"/api/v1/agent/apply","related":["/api/v1/agent/explore","/api/v1/context","/api/v1/fit-briefs","/api/v1/reports","/api/v1/execution-artifacts","/api/v1/jobs-workspace"]}}},"checkpointUpdated":{"value":{"data":{"results":[{"actionId":"action_1","type":"request_report_branch","status":"succeeded","summary":"Report branch created for product management","outputs":{"artifactRefs":["fitbrief_123"],"reportRefs":["report_456"],"jobsWorkspaceRefs":["jobdir_123"]},"warnings":[],"diagnostics":null,"artifactSummaries":[{"id":"report_456","kind":"report_branch","status":"ready"},{"id":"fitbrief_123","kind":"fit_brief","status":"reused"}],"suggestedNextCalls":[{"method":"POST","path":"/api/v1/agent/explore","reason":"Use the saved report branch for downstream actions or comparisons"}]}],"artifacts":[{"id":"report_456","kind":"report_branch","status":"ready"},{"id":"fitbrief_123","kind":"fit_brief","status":"reused"}],"checkpoint":{"id":"ckpt_123","status":"updated","reason":"Apply results appended to the existing checkpoint"}},"metadata":{"requestId":"req_agent_apply_2","timestamp":"2026-03-30T00:01:00Z","userId":"user_123","actionCount":1,"succeeded":1,"failed":0,"blocked":0,"skipped":0,"executionMode":"best_effort","warnings":[]},"links":{"self":"/api/v1/agent/apply","related":["/api/v1/checkpoints","/api/v1/reports","/api/v1/jobs-workspace"]}}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"400":{"description":"Bad request","x-error-codes":["agent_apply.invalid_request","agent_apply.invalid_actions"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"missingCheckpointIdForUpdate":{"value":{"error":"context.checkpointId is required when execution.checkpoint is update","type":"agent_apply.invalid_request","stage":"validation","retryable":false,"blockingConstraint":"validation.request_body","recoverable":true,"suggestedRecoveryPath":[{"type":"fix_request_shape","label":"Correct the request body to match the agent apply schema"}],"suggestedNextCalls":[{"method":"POST","path":"/api/v1/agent/explore"}],"diagnostics":{"category":"input_quality","details":["context.checkpointId is required when execution.checkpoint is update"]}}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/checkpoints":{"get":{"tags":["Operations"],"summary":"List checkpoints or fetch one by id","x-required-scopes":["read:checkpoints"],"parameters":[{"name":"id","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":10}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CheckpointListEnvelope"},{"$ref":"#/components/schemas/CheckpointEnvelope"}]}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"post":{"tags":["Operations"],"summary":"Create checkpoint","x-required-scopes":["write:checkpoints"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckpointCreateRequest"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckpointEnvelope"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/checkpoints/{id}/restore":{"post":{"tags":["Operations"],"summary":"Restore checkpoint continuation package","x-required-scopes":["read:checkpoints"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckpointRestoreEnvelope"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/checkpoints/{id}/fork":{"post":{"tags":["Operations"],"summary":"Fork checkpoint","x-required-scopes":["write:checkpoints"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckpointForkRequest"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckpointEnvelope"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/checkpoints/{id}/archive":{"post":{"tags":["Operations"],"summary":"Archive checkpoint","x-required-scopes":["write:checkpoints"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckpointEnvelope"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/alerts":{"get":{"tags":["Health"],"summary":"List career alerts","x-required-scopes":["read:alerts"],"parameters":[{"name":"includeRead","in":"query","required":false,"schema":{"type":"boolean"},"description":"Include read alerts (default false)"},{"name":"includeDismissed","in":"query","required":false,"schema":{"type":"boolean"},"description":"Include dismissed alerts (default false)"}],"x-codeSamples":[{"lang":"curl","source":"curl \"https://profileclaw.cn/api/v1/alerts?includeRead=true\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\""},{"lang":"curl","source":"curl \"https://profileclaw.cn/api/v1/alerts?includeRead=true&includeDismissed=false\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\""}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertsListEnvelope"},"examples":{"ok":{"value":{"data":[{"id":"alert_123","userId":"user_123","alertType":"skill_gap","severity":"warning","message":"Missing skill: SQL","actionSuggestions":["Practice SQL daily"],"relatedMetricId":"metric_456","isRead":false,"isDismissed":false,"createdAt":"2026-03-07T00:00:00Z"}],"metadata":{"requestId":"req_123","timestamp":"2026-03-07T00:00:00Z","count":1,"userId":"user_123","filters":{"includeRead":true,"includeDismissed":false}},"links":{"self":"/api/v1/alerts","related":["/api/v1/context","/api/v1/career-health"]}}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"patch":{"tags":["Health"],"summary":"Mark an alert as read or dismissed","x-required-scopes":["write:alerts"],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string"},"description":"Alert ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertActionRequest"},"examples":{"read":{"value":{"action":"read"}},"dismiss":{"value":{"action":"dismiss"}}}}}},"x-codeSamples":[{"lang":"curl","source":"curl -X PATCH \"https://profileclaw.cn/api/v1/alerts?id=alert_123\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\" -H \"Content-Type: application/json\" -d '{\"action\":\"read\"}'"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertEnvelope"},"examples":{"ok":{"value":{"data":{"id":"alert_123","userId":"user_123","alertType":"skill_gap","severity":"warning","message":"Missing skill: SQL","actionSuggestions":["Practice SQL daily"],"relatedMetricId":"metric_456","isRead":true,"isDismissed":false,"createdAt":"2026-03-07T00:00:00Z","readAt":"2026-03-07T00:01:00Z"},"metadata":{"requestId":"req_124","timestamp":"2026-03-07T00:01:00Z","userId":"user_123"},"links":{"self":"/api/v1/alerts?id=alert_123","related":["/api/v1/alerts","/api/v1/context"]}}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"400":{"description":"Bad request","x-error-codes":["alerts.missing_id","alerts.invalid_action"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"missingId":{"value":{"error":"Missing alert ID","type":"alerts.missing_id"}},"invalidAction":{"value":{"error":"Invalid action. Use 'read' or 'dismiss'","type":"alerts.invalid_action"}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not found","x-error-codes":["alerts.not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"notFound":{"value":{"error":"Alert not found","type":"alerts.not_found"}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/career-health":{"get":{"tags":["Health"],"summary":"Get career health report","description":"Returns a comprehensive health report (metrics + alerts + recommendations).","x-required-scopes":["read:career_health"],"x-codeSamples":[{"lang":"curl","source":"curl \"https://profileclaw.cn/api/v1/career-health\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\""}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CareerHealthEnvelope"},"examples":{"ok":{"value":{"data":{"overallScore":78,"metrics":{"skillFreshness":{"score":82,"trend":"stable"},"goalProgress":{"score":70,"trend":"improving"},"marketAlignment":{"score":76,"trend":"stable"},"careerActivity":{"score":84,"trend":"stable"}},"alerts":[],"recommendations":["Keep your resume updated"],"lastUpdated":"2026-03-07T00:00:00Z"},"metadata":{"requestId":"req_123","timestamp":"2026-03-07T00:00:00Z","userId":"user_123"},"links":{"self":"/api/v1/career-health","related":["/api/v1/context","/api/v1/alerts"]}}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/data-sharing":{"get":{"tags":["Profile"],"summary":"Get data sharing preferences","x-required-scopes":["read:data_sharing"],"x-codeSamples":[{"lang":"curl","source":"curl \"https://profileclaw.cn/api/v1/data-sharing\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\""}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSharingEnvelope"},"examples":{"ok":{"value":{"data":{"userId":"user_123","shareCareerPath":false,"shareAssessmentResults":true,"shareSkillProgression":false,"updatedAt":"2026-03-07T00:00:00Z"},"metadata":{"requestId":"req_200","timestamp":"2026-03-07T00:00:00Z","userId":"user_123"},"links":{"self":"/api/v1/data-sharing","related":["/api/v1/context"]}}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"put":{"tags":["Profile"],"summary":"Update data sharing preferences","description":"At least one boolean preference must be provided. Unspecified fields keep their previous value.","x-required-scopes":["write:data_sharing"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSharingUpdateRequest"},"examples":{"optInAssessments":{"value":{"shareAssessmentResults":true}},"optOutAll":{"value":{"shareCareerPath":false,"shareAssessmentResults":false,"shareSkillProgression":false}}}}}},"x-codeSamples":[{"lang":"curl","source":"curl -X PUT \"https://profileclaw.cn/api/v1/data-sharing\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\" -H \"Content-Type: application/json\" -d '{\"shareAssessmentResults\":true}'"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSharingEnvelope"},"examples":{"ok":{"value":{"data":{"userId":"user_123","shareCareerPath":false,"shareAssessmentResults":true,"shareSkillProgression":false,"updatedAt":"2026-03-07T00:00:00Z"},"metadata":{"requestId":"req_200","timestamp":"2026-03-07T00:00:00Z","userId":"user_123"},"links":{"self":"/api/v1/data-sharing","related":["/api/v1/context"]}}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"400":{"description":"Bad request","x-error-codes":["data_sharing.no_preferences_provided"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"noneProvided":{"value":{"error":"At least one preference must be provided","type":"data_sharing.no_preferences_provided"}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/career-match":{"get":{"tags":["Career Graph"],"summary":"Get career matches","description":"Experimental endpoint. Returns bucketed career matches, constraints, and explanation keys with optional localized text.","x-required-scopes":["read:career_match"],"parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"location","in":"query","required":false,"schema":{"type":"string"}}],"x-codeSamples":[{"lang":"curl","source":"curl \"https://profileclaw.cn/api/v1/career-match?query=data%20scientist&location=China\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\""}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CareerMatchEnvelope"},"examples":{"ok":{"value":{"data":{"query":"data scientist","location":"China","profile":{},"constraints":{},"highFit":[{"title":"Product Manager","matchScore":78,"reasoningKey":"why.taskContent","reasoningText":"The day-to-day task mix is closer to the interest pattern currently standing out in your profile.","explanation":{"whyFit":[{"textKey":"why.taskContent","text":"The day-to-day task mix is closer to the interest pattern currently standing out in your profile."}]}}],"worthExploring":[],"riskyMismatch":[],"explanations":{"summary":"hard_filter_then_soft_match_then_penalty"},"rawAvailability":{"stored":true,"scoringVersion":1},"experimental":true},"metadata":{"requestId":"req_400","timestamp":"2026-03-07T00:00:00Z","userId":"user_123","experimental":true},"links":{"self":"/api/v1/career-match","related":["/api/v1/context","/api/v1/similar-paths","/api/v1/career-prediction"]}}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"$ref":"#/components/responses/ProfileNotFoundError"},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/api/v1/similar-paths":{"get":{"tags":["Career Graph"],"summary":"Find similar anonymized career paths","description":"Returns anonymized career paths that are similar to the authenticated user's profile. Assessment similarity is computed from overlapping dimensions, so custom work-style modules are not forced into a classical OCEAN interpretation.","x-required-scopes":["read:similar_paths"],"parameters":[{"name":"targetRole","in":"query","required":false,"schema":{"type":"string"},"description":"Filter for transitions relevant to a target role"},{"name":"minSimilarity","in":"query","required":false,"schema":{"type":"number","minimum":0,"maximum":1,"default":0.5},"description":"Minimum similarity score (0-1)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":10},"description":"Maximum number of results"}],"x-codeSamples":[{"lang":"curl","source":"curl \"https://profileclaw.cn/api/v1/similar-paths?targetRole=Product%20Manager&minSimilarity=0.6&limit=5\" -H \"Authorization: Bearer $PROFILECLAW_API_KEY\""}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimilarPathsEnvelope"},"examples":{"ok":{"value":{"data":[{"pathId":"path_123","similarityScore":0.74,"path":{"id":"path_123","riasecProfile":{"I":1,"A":0.72,"R":0.48,"S":0.12,"E":0.08,"C":0.05},"workStyleProfile":{"LA":0.81,"EX":0.74,"ER":0.63,"AN":0.69},"careerTransitions":[{"from":"Analyst","to":"Product Manager","duration":18,"success":true}]},"matchingFactors":{"riasecMatch":1,"workStyleMatch":0.7,"experienceMatch":0.6},"relevantTransitions":[{"from":"Analyst","to":"Product Manager","duration":18,"success":true}]}],"metadata":{"requestId":"req_300","timestamp":"2026-03-07T00:00:00Z","totalPaths":100,"matchesFound":1,"userId":"user_123","filters":{"targetRole":"Product Manager","minSimilarity":0.6,"limit":5}},"links":{"self":"/api/v1/similar-paths?targetRole=Product%20Manager&minSimilarity=0.6&limit=5","related":["/api/v1/context","/api/v1/career-prediction"]}}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"400":{"description":"Bad request","x-error-codes":["similar_paths.invalid_min_similarity","similar_paths.invalid_limit"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"invalidMinSimilarity":{"value":{"error":"minSimilarity must be a number between 0 and 1","type":"similar_paths.invalid_min_similarity"}},"invalidLimit":{"value":{"error":"limit must be an integer between 1 and 50","type":"similar_paths.invalid_limit"}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"$ref":"#/components/responses/ProfileNotFoundError"},"429":{"$ref":"#/components/responses/RateLimitedError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}