forge-openclaw-plugin 0.2.19 → 0.2.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/README.md +133 -2
  2. package/dist/assets/board-_C6oMy5w.js +6 -0
  3. package/dist/assets/{board-8L3uX7_O.js.map → board-_C6oMy5w.js.map} +1 -1
  4. package/dist/assets/index-B4A6TooJ.js +63 -0
  5. package/dist/assets/index-B4A6TooJ.js.map +1 -0
  6. package/dist/assets/index-D6Xs_2mo.css +1 -0
  7. package/dist/assets/{motion-1GAqqi8M.js → motion-D4sZgCHd.js} +2 -2
  8. package/dist/assets/{motion-1GAqqi8M.js.map → motion-D4sZgCHd.js.map} +1 -1
  9. package/dist/assets/{table-DBGlgRjk.js → table-BWzTaky1.js} +2 -2
  10. package/dist/assets/{table-DBGlgRjk.js.map → table-BWzTaky1.js.map} +1 -1
  11. package/dist/assets/{ui-iTluWjC4.js → ui-BzK4azQb.js} +7 -7
  12. package/dist/assets/{ui-iTluWjC4.js.map → ui-BzK4azQb.js.map} +1 -1
  13. package/dist/assets/vendor-DT3pnAKJ.css +1 -0
  14. package/dist/assets/vendor-De38P6YR.js +729 -0
  15. package/dist/assets/vendor-De38P6YR.js.map +1 -0
  16. package/dist/assets/viz-C6hfyqzu.js +34 -0
  17. package/dist/assets/viz-C6hfyqzu.js.map +1 -0
  18. package/dist/index.html +9 -9
  19. package/dist/openclaw/parity.d.ts +1 -1
  20. package/dist/openclaw/parity.js +29 -2
  21. package/dist/openclaw/routes.js +207 -24
  22. package/dist/openclaw/tools.js +324 -35
  23. package/dist/server/app.js +2080 -92
  24. package/dist/server/db.js +3 -0
  25. package/dist/server/health.js +1284 -0
  26. package/dist/server/managers/platform/background-job-manager.js +138 -2
  27. package/dist/server/managers/platform/llm-manager.js +126 -0
  28. package/dist/server/managers/platform/openai-responses-provider.js +773 -0
  29. package/dist/server/managers/runtime.js +6 -1
  30. package/dist/server/openapi.js +718 -0
  31. package/dist/server/preferences-seeds.js +409 -0
  32. package/dist/server/preferences-types.js +368 -0
  33. package/dist/server/psyche-types.js +42 -18
  34. package/dist/server/repositories/activity-events.js +53 -4
  35. package/dist/server/repositories/calendar.js +89 -15
  36. package/dist/server/repositories/collaboration.js +8 -3
  37. package/dist/server/repositories/diagnostic-logs.js +243 -0
  38. package/dist/server/repositories/entity-ownership.js +92 -0
  39. package/dist/server/repositories/goals.js +7 -2
  40. package/dist/server/repositories/habits.js +122 -16
  41. package/dist/server/repositories/notes.js +119 -41
  42. package/dist/server/repositories/preferences.js +1765 -0
  43. package/dist/server/repositories/projects.js +18 -7
  44. package/dist/server/repositories/psyche.js +84 -27
  45. package/dist/server/repositories/rewards.js +112 -4
  46. package/dist/server/repositories/strategies.js +450 -0
  47. package/dist/server/repositories/tags.js +11 -6
  48. package/dist/server/repositories/task-runs.js +10 -2
  49. package/dist/server/repositories/tasks.js +99 -17
  50. package/dist/server/repositories/users.js +417 -0
  51. package/dist/server/repositories/wiki-memory.js +3366 -0
  52. package/dist/server/services/context.js +20 -18
  53. package/dist/server/services/dashboard.js +29 -6
  54. package/dist/server/services/entity-crud.js +21 -3
  55. package/dist/server/services/insights.js +9 -7
  56. package/dist/server/services/projects.js +2 -1
  57. package/dist/server/services/psyche.js +10 -9
  58. package/dist/server/types.js +594 -30
  59. package/openclaw.plugin.json +1 -1
  60. package/package.json +1 -1
  61. package/server/migrations/015_multi_user_and_strategies.sql +244 -0
  62. package/server/migrations/016_health_companion.sql +158 -0
  63. package/server/migrations/016_strategy_contracts_and_user_graph.sql +22 -0
  64. package/server/migrations/017_preferences.sql +131 -0
  65. package/server/migrations/018_preference_catalogs.sql +31 -0
  66. package/server/migrations/019_wiki_memory.sql +255 -0
  67. package/server/migrations/020_wiki_page_hierarchy.sql +11 -0
  68. package/server/migrations/021_hide_evidence_from_wiki_index.sql +3 -0
  69. package/server/migrations/022_wiki_ingest_background.sql +85 -0
  70. package/server/migrations/023_diagnostic_logs.sql +28 -0
  71. package/skills/forge-openclaw/SKILL.md +126 -34
  72. package/skills/forge-openclaw/entity_conversation_playbooks.md +337 -0
  73. package/skills/forge-openclaw/psyche_entity_playbooks.md +404 -0
  74. package/dist/assets/board-8L3uX7_O.js +0 -6
  75. package/dist/assets/index-Cj1IBH_w.js +0 -36
  76. package/dist/assets/index-Cj1IBH_w.js.map +0 -1
  77. package/dist/assets/index-DQT6EbuS.css +0 -1
  78. package/dist/assets/vendor-BvM2F9Dp.js +0 -503
  79. package/dist/assets/vendor-BvM2F9Dp.js.map +0 -1
  80. package/dist/assets/vendor-CRS-psbw.css +0 -1
  81. package/dist/assets/viz-CNeunkfu.js +0 -34
  82. package/dist/assets/viz-CNeunkfu.js.map +0 -1
@@ -3171,6 +3171,187 @@ export function buildOpenApiDocument() {
3171
3171
  committedActions: arrayOf({ type: "string" })
3172
3172
  }
3173
3173
  };
3174
+ const healthLink = {
3175
+ type: "object",
3176
+ additionalProperties: false,
3177
+ required: ["entityType", "entityId", "relationshipType"],
3178
+ properties: {
3179
+ entityType: { type: "string" },
3180
+ entityId: { type: "string" },
3181
+ relationshipType: { type: "string" }
3182
+ }
3183
+ };
3184
+ const sleepSession = {
3185
+ type: "object",
3186
+ additionalProperties: false,
3187
+ required: [
3188
+ "id",
3189
+ "externalUid",
3190
+ "pairingSessionId",
3191
+ "userId",
3192
+ "source",
3193
+ "sourceType",
3194
+ "sourceDevice",
3195
+ "startedAt",
3196
+ "endedAt",
3197
+ "timeInBedSeconds",
3198
+ "asleepSeconds",
3199
+ "awakeSeconds",
3200
+ "sleepScore",
3201
+ "regularityScore",
3202
+ "bedtimeConsistencyMinutes",
3203
+ "wakeConsistencyMinutes",
3204
+ "stageBreakdown",
3205
+ "recoveryMetrics",
3206
+ "links",
3207
+ "annotations",
3208
+ "provenance",
3209
+ "derived",
3210
+ "createdAt",
3211
+ "updatedAt"
3212
+ ],
3213
+ properties: {
3214
+ id: { type: "string" },
3215
+ externalUid: { type: "string" },
3216
+ pairingSessionId: nullable({ type: "string" }),
3217
+ userId: { type: "string" },
3218
+ source: { type: "string" },
3219
+ sourceType: { type: "string" },
3220
+ sourceDevice: { type: "string" },
3221
+ startedAt: { type: "string", format: "date-time" },
3222
+ endedAt: { type: "string", format: "date-time" },
3223
+ timeInBedSeconds: { type: "integer" },
3224
+ asleepSeconds: { type: "integer" },
3225
+ awakeSeconds: { type: "integer" },
3226
+ sleepScore: nullable({ type: "number" }),
3227
+ regularityScore: nullable({ type: "number" }),
3228
+ bedtimeConsistencyMinutes: nullable({ type: "number" }),
3229
+ wakeConsistencyMinutes: nullable({ type: "number" }),
3230
+ stageBreakdown: arrayOf({
3231
+ type: "object",
3232
+ additionalProperties: false,
3233
+ required: ["stage", "seconds"],
3234
+ properties: {
3235
+ stage: { type: "string" },
3236
+ seconds: { type: "integer" }
3237
+ }
3238
+ }),
3239
+ recoveryMetrics: { type: "object", additionalProperties: true },
3240
+ links: arrayOf({ $ref: "#/components/schemas/HealthLink" }),
3241
+ annotations: { type: "object", additionalProperties: true },
3242
+ provenance: { type: "object", additionalProperties: true },
3243
+ derived: { type: "object", additionalProperties: true },
3244
+ createdAt: { type: "string", format: "date-time" },
3245
+ updatedAt: { type: "string", format: "date-time" }
3246
+ }
3247
+ };
3248
+ const workoutSession = {
3249
+ type: "object",
3250
+ additionalProperties: false,
3251
+ required: [
3252
+ "id",
3253
+ "externalUid",
3254
+ "pairingSessionId",
3255
+ "userId",
3256
+ "source",
3257
+ "sourceType",
3258
+ "workoutType",
3259
+ "sourceDevice",
3260
+ "startedAt",
3261
+ "endedAt",
3262
+ "durationSeconds",
3263
+ "activeEnergyKcal",
3264
+ "totalEnergyKcal",
3265
+ "distanceMeters",
3266
+ "stepCount",
3267
+ "exerciseMinutes",
3268
+ "averageHeartRate",
3269
+ "maxHeartRate",
3270
+ "subjectiveEffort",
3271
+ "moodBefore",
3272
+ "moodAfter",
3273
+ "meaningText",
3274
+ "plannedContext",
3275
+ "socialContext",
3276
+ "links",
3277
+ "tags",
3278
+ "annotations",
3279
+ "provenance",
3280
+ "derived",
3281
+ "generatedFromHabitId",
3282
+ "generatedFromCheckInId",
3283
+ "reconciliationStatus",
3284
+ "createdAt",
3285
+ "updatedAt"
3286
+ ],
3287
+ properties: {
3288
+ id: { type: "string" },
3289
+ externalUid: { type: "string" },
3290
+ pairingSessionId: nullable({ type: "string" }),
3291
+ userId: { type: "string" },
3292
+ source: { type: "string" },
3293
+ sourceType: { type: "string" },
3294
+ workoutType: { type: "string" },
3295
+ sourceDevice: { type: "string" },
3296
+ startedAt: { type: "string", format: "date-time" },
3297
+ endedAt: { type: "string", format: "date-time" },
3298
+ durationSeconds: { type: "integer" },
3299
+ activeEnergyKcal: nullable({ type: "number" }),
3300
+ totalEnergyKcal: nullable({ type: "number" }),
3301
+ distanceMeters: nullable({ type: "number" }),
3302
+ stepCount: nullable({ type: "integer" }),
3303
+ exerciseMinutes: nullable({ type: "integer" }),
3304
+ averageHeartRate: nullable({ type: "number" }),
3305
+ maxHeartRate: nullable({ type: "number" }),
3306
+ subjectiveEffort: nullable({ type: "integer" }),
3307
+ moodBefore: { type: "string" },
3308
+ moodAfter: { type: "string" },
3309
+ meaningText: { type: "string" },
3310
+ plannedContext: { type: "string" },
3311
+ socialContext: { type: "string" },
3312
+ links: arrayOf({ $ref: "#/components/schemas/HealthLink" }),
3313
+ tags: arrayOf({ type: "string" }),
3314
+ annotations: { type: "object", additionalProperties: true },
3315
+ provenance: { type: "object", additionalProperties: true },
3316
+ derived: { type: "object", additionalProperties: true },
3317
+ generatedFromHabitId: nullable({ type: "string" }),
3318
+ generatedFromCheckInId: nullable({ type: "string" }),
3319
+ reconciliationStatus: { type: "string" },
3320
+ createdAt: { type: "string", format: "date-time" },
3321
+ updatedAt: { type: "string", format: "date-time" }
3322
+ }
3323
+ };
3324
+ const sleepViewData = {
3325
+ type: "object",
3326
+ additionalProperties: false,
3327
+ required: [
3328
+ "summary",
3329
+ "weeklyTrend",
3330
+ "monthlyPattern",
3331
+ "stageAverages",
3332
+ "linkBreakdown",
3333
+ "sessions"
3334
+ ],
3335
+ properties: {
3336
+ summary: { type: "object", additionalProperties: true },
3337
+ weeklyTrend: arrayOf({ type: "object", additionalProperties: true }),
3338
+ monthlyPattern: arrayOf({ type: "object", additionalProperties: true }),
3339
+ stageAverages: arrayOf({ type: "object", additionalProperties: true }),
3340
+ linkBreakdown: arrayOf({ type: "object", additionalProperties: true }),
3341
+ sessions: arrayOf({ $ref: "#/components/schemas/SleepSession" })
3342
+ }
3343
+ };
3344
+ const fitnessViewData = {
3345
+ type: "object",
3346
+ additionalProperties: false,
3347
+ required: ["summary", "weeklyTrend", "typeBreakdown", "sessions"],
3348
+ properties: {
3349
+ summary: { type: "object", additionalProperties: true },
3350
+ weeklyTrend: arrayOf({ type: "object", additionalProperties: true }),
3351
+ typeBreakdown: arrayOf({ type: "object", additionalProperties: true }),
3352
+ sessions: arrayOf({ $ref: "#/components/schemas/WorkoutSession" })
3353
+ }
3354
+ };
3174
3355
  return {
3175
3356
  openapi: "3.1.0",
3176
3357
  info: {
@@ -3255,6 +3436,11 @@ export function buildOpenApiDocument() {
3255
3436
  Note: note,
3256
3437
  NoteSummary: noteSummary,
3257
3438
  NotesSummaryByEntity: notesSummaryByEntity,
3439
+ HealthLink: healthLink,
3440
+ SleepSession: sleepSession,
3441
+ WorkoutSession: workoutSession,
3442
+ SleepViewData: sleepViewData,
3443
+ FitnessViewData: fitnessViewData,
3258
3444
  PsycheOverviewPayload: psycheOverviewPayload,
3259
3445
  Insight: insight,
3260
3446
  InsightFeedback: insightFeedback,
@@ -3313,6 +3499,203 @@ export function buildOpenApiDocument() {
3313
3499
  }
3314
3500
  }
3315
3501
  },
3502
+ "/api/v1/health/sleep": {
3503
+ get: {
3504
+ summary: "Read the Forge sleep overview surface",
3505
+ responses: {
3506
+ "200": jsonResponse({
3507
+ type: "object",
3508
+ required: ["sleep"],
3509
+ properties: {
3510
+ sleep: { $ref: "#/components/schemas/SleepViewData" }
3511
+ }
3512
+ }, "Sleep overview")
3513
+ }
3514
+ }
3515
+ },
3516
+ "/api/v1/health/fitness": {
3517
+ get: {
3518
+ summary: "Read the Forge sports and workout overview surface",
3519
+ responses: {
3520
+ "200": jsonResponse({
3521
+ type: "object",
3522
+ required: ["fitness"],
3523
+ properties: {
3524
+ fitness: { $ref: "#/components/schemas/FitnessViewData" }
3525
+ }
3526
+ }, "Fitness overview")
3527
+ }
3528
+ }
3529
+ },
3530
+ "/api/v1/health/workouts/{id}": {
3531
+ patch: {
3532
+ summary: "Update one workout session's reflective metadata",
3533
+ responses: {
3534
+ "200": jsonResponse({
3535
+ type: "object",
3536
+ required: ["workout"],
3537
+ properties: {
3538
+ workout: { $ref: "#/components/schemas/WorkoutSession" }
3539
+ }
3540
+ }, "Updated workout session"),
3541
+ "404": { $ref: "#/components/responses/Error" }
3542
+ }
3543
+ }
3544
+ },
3545
+ "/api/v1/health/sleep/{id}": {
3546
+ patch: {
3547
+ summary: "Update one sleep session's reflective metadata",
3548
+ responses: {
3549
+ "200": jsonResponse({
3550
+ type: "object",
3551
+ required: ["sleep"],
3552
+ properties: {
3553
+ sleep: { $ref: "#/components/schemas/SleepSession" }
3554
+ }
3555
+ }, "Updated sleep session"),
3556
+ "404": { $ref: "#/components/responses/Error" }
3557
+ }
3558
+ }
3559
+ },
3560
+ "/api/v1/wiki/settings": {
3561
+ get: {
3562
+ summary: "Read wiki spaces plus enabled LLM and embedding profiles",
3563
+ responses: {
3564
+ "200": jsonResponse({
3565
+ type: "object",
3566
+ required: ["settings"],
3567
+ properties: {
3568
+ settings: {
3569
+ type: "object",
3570
+ additionalProperties: true
3571
+ }
3572
+ }
3573
+ }, "Wiki settings")
3574
+ }
3575
+ }
3576
+ },
3577
+ "/api/v1/wiki/pages": {
3578
+ get: {
3579
+ summary: "List wiki or evidence pages inside one space",
3580
+ responses: {
3581
+ "200": jsonResponse({
3582
+ type: "object",
3583
+ required: ["pages"],
3584
+ properties: {
3585
+ pages: arrayOf({
3586
+ type: "object",
3587
+ additionalProperties: true
3588
+ })
3589
+ }
3590
+ }, "Wiki page list")
3591
+ }
3592
+ },
3593
+ post: {
3594
+ summary: "Create a wiki page through the file-backed wiki surface",
3595
+ responses: {
3596
+ "200": jsonResponse({
3597
+ type: "object",
3598
+ required: ["page"],
3599
+ properties: {
3600
+ page: { type: "object", additionalProperties: true }
3601
+ }
3602
+ }, "Created wiki page"),
3603
+ "404": { $ref: "#/components/responses/Error" }
3604
+ }
3605
+ }
3606
+ },
3607
+ "/api/v1/wiki/pages/{id}": {
3608
+ get: {
3609
+ summary: "Read one wiki page with backlinks and attached metadata",
3610
+ responses: {
3611
+ "200": jsonResponse({
3612
+ type: "object",
3613
+ required: ["page"],
3614
+ properties: {
3615
+ page: { type: "object", additionalProperties: true }
3616
+ }
3617
+ }, "Wiki page detail"),
3618
+ "404": { $ref: "#/components/responses/Error" }
3619
+ }
3620
+ },
3621
+ patch: {
3622
+ summary: "Update an existing wiki page through the file-backed surface",
3623
+ responses: {
3624
+ "200": jsonResponse({
3625
+ type: "object",
3626
+ required: ["page"],
3627
+ properties: {
3628
+ page: { type: "object", additionalProperties: true }
3629
+ }
3630
+ }, "Updated wiki page"),
3631
+ "404": { $ref: "#/components/responses/Error" }
3632
+ }
3633
+ }
3634
+ },
3635
+ "/api/v1/wiki/search": {
3636
+ post: {
3637
+ summary: "Search the wiki with text, semantic, entity, or hybrid retrieval",
3638
+ responses: {
3639
+ "200": jsonResponse({
3640
+ type: "object",
3641
+ required: ["results"],
3642
+ properties: {
3643
+ results: arrayOf({
3644
+ type: "object",
3645
+ additionalProperties: true
3646
+ })
3647
+ }
3648
+ }, "Wiki search results")
3649
+ }
3650
+ }
3651
+ },
3652
+ "/api/v1/wiki/health": {
3653
+ get: {
3654
+ summary: "Read wiki health signals for one space",
3655
+ responses: {
3656
+ "200": jsonResponse({
3657
+ type: "object",
3658
+ required: ["health"],
3659
+ properties: {
3660
+ health: { type: "object", additionalProperties: true }
3661
+ }
3662
+ }, "Wiki health")
3663
+ }
3664
+ }
3665
+ },
3666
+ "/api/v1/wiki/sync": {
3667
+ post: {
3668
+ summary: "Resync markdown files from the local wiki vault into Forge metadata",
3669
+ responses: {
3670
+ "200": jsonResponse({
3671
+ type: "object",
3672
+ additionalProperties: true
3673
+ }, "Wiki sync result")
3674
+ }
3675
+ }
3676
+ },
3677
+ "/api/v1/wiki/reindex": {
3678
+ post: {
3679
+ summary: "Recompute wiki embedding chunks for one space and optional profile",
3680
+ responses: {
3681
+ "200": jsonResponse({
3682
+ type: "object",
3683
+ additionalProperties: true
3684
+ }, "Wiki reindex result")
3685
+ }
3686
+ }
3687
+ },
3688
+ "/api/v1/wiki/ingest-jobs": {
3689
+ post: {
3690
+ summary: "Queue a wiki ingest job from raw text, local files, or a URL",
3691
+ responses: {
3692
+ "200": jsonResponse({
3693
+ type: "object",
3694
+ additionalProperties: true
3695
+ }, "Queued wiki ingest job")
3696
+ }
3697
+ }
3698
+ },
3316
3699
  "/api/v1/context": {
3317
3700
  get: {
3318
3701
  summary: "Get the full Forge snapshot for the routed app shell",
@@ -3338,6 +3721,325 @@ export function buildOpenApiDocument() {
3338
3721
  }
3339
3722
  }
3340
3723
  },
3724
+ "/api/v1/users/directory": {
3725
+ get: {
3726
+ summary: "Read the live human and bot directory with ownership summaries and directional relationship graph",
3727
+ responses: {
3728
+ "200": jsonResponse({
3729
+ type: "object",
3730
+ required: ["directory"],
3731
+ properties: {
3732
+ directory: {
3733
+ type: "object",
3734
+ additionalProperties: true
3735
+ }
3736
+ }
3737
+ }, "User directory")
3738
+ }
3739
+ }
3740
+ },
3741
+ "/api/v1/preferences/workspace": {
3742
+ get: {
3743
+ summary: "Get the inferred Preferences workspace for one user, domain, and optional context",
3744
+ responses: {
3745
+ "200": jsonResponse({
3746
+ type: "object",
3747
+ required: ["workspace"],
3748
+ properties: {
3749
+ workspace: {
3750
+ type: "object",
3751
+ additionalProperties: true
3752
+ }
3753
+ }
3754
+ }, "Preferences workspace"),
3755
+ default: { $ref: "#/components/responses/Error" }
3756
+ }
3757
+ }
3758
+ },
3759
+ "/api/v1/preferences/game/start": {
3760
+ post: {
3761
+ summary: "Start the Preferences game for a domain or concept list and return the refreshed workspace",
3762
+ responses: {
3763
+ "200": jsonResponse({
3764
+ type: "object",
3765
+ required: ["workspace"],
3766
+ properties: {
3767
+ workspace: {
3768
+ type: "object",
3769
+ additionalProperties: true
3770
+ }
3771
+ }
3772
+ }, "Refreshed Preferences workspace"),
3773
+ default: { $ref: "#/components/responses/Error" }
3774
+ }
3775
+ }
3776
+ },
3777
+ "/api/v1/preferences/catalogs": {
3778
+ post: {
3779
+ summary: "Create a Preferences concept list",
3780
+ responses: {
3781
+ "201": jsonResponse({
3782
+ type: "object",
3783
+ required: ["catalog"],
3784
+ properties: {
3785
+ catalog: {
3786
+ type: "object",
3787
+ additionalProperties: true
3788
+ }
3789
+ }
3790
+ }, "Created Preferences catalog"),
3791
+ default: { $ref: "#/components/responses/Error" }
3792
+ }
3793
+ }
3794
+ },
3795
+ "/api/v1/preferences/catalogs/{id}": {
3796
+ patch: {
3797
+ summary: "Update a Preferences concept list",
3798
+ responses: {
3799
+ "200": jsonResponse({
3800
+ type: "object",
3801
+ required: ["catalog"],
3802
+ properties: {
3803
+ catalog: {
3804
+ type: "object",
3805
+ additionalProperties: true
3806
+ }
3807
+ }
3808
+ }, "Updated Preferences catalog"),
3809
+ default: { $ref: "#/components/responses/Error" }
3810
+ }
3811
+ },
3812
+ delete: {
3813
+ summary: "Delete a Preferences concept list",
3814
+ responses: {
3815
+ "200": jsonResponse({
3816
+ type: "object",
3817
+ required: ["catalog"],
3818
+ properties: {
3819
+ catalog: {
3820
+ type: "object",
3821
+ additionalProperties: true
3822
+ }
3823
+ }
3824
+ }, "Deleted Preferences catalog"),
3825
+ default: { $ref: "#/components/responses/Error" }
3826
+ }
3827
+ }
3828
+ },
3829
+ "/api/v1/preferences/catalog-items": {
3830
+ post: {
3831
+ summary: "Create a Preferences concept entry",
3832
+ responses: {
3833
+ "201": jsonResponse({
3834
+ type: "object",
3835
+ required: ["item"],
3836
+ properties: {
3837
+ item: {
3838
+ type: "object",
3839
+ additionalProperties: true
3840
+ }
3841
+ }
3842
+ }, "Created Preferences catalog item"),
3843
+ default: { $ref: "#/components/responses/Error" }
3844
+ }
3845
+ }
3846
+ },
3847
+ "/api/v1/preferences/catalog-items/{id}": {
3848
+ patch: {
3849
+ summary: "Update a Preferences concept entry",
3850
+ responses: {
3851
+ "200": jsonResponse({
3852
+ type: "object",
3853
+ required: ["item"],
3854
+ properties: {
3855
+ item: {
3856
+ type: "object",
3857
+ additionalProperties: true
3858
+ }
3859
+ }
3860
+ }, "Updated Preferences catalog item"),
3861
+ default: { $ref: "#/components/responses/Error" }
3862
+ }
3863
+ },
3864
+ delete: {
3865
+ summary: "Delete a Preferences concept entry",
3866
+ responses: {
3867
+ "200": jsonResponse({
3868
+ type: "object",
3869
+ required: ["item"],
3870
+ properties: {
3871
+ item: {
3872
+ type: "object",
3873
+ additionalProperties: true
3874
+ }
3875
+ }
3876
+ }, "Deleted Preferences catalog item"),
3877
+ default: { $ref: "#/components/responses/Error" }
3878
+ }
3879
+ }
3880
+ },
3881
+ "/api/v1/preferences/contexts": {
3882
+ post: {
3883
+ summary: "Create a Preferences context",
3884
+ responses: {
3885
+ "201": jsonResponse({
3886
+ type: "object",
3887
+ required: ["context"],
3888
+ properties: {
3889
+ context: {
3890
+ type: "object",
3891
+ additionalProperties: true
3892
+ }
3893
+ }
3894
+ }, "Created Preferences context"),
3895
+ default: { $ref: "#/components/responses/Error" }
3896
+ }
3897
+ }
3898
+ },
3899
+ "/api/v1/preferences/contexts/{id}": {
3900
+ patch: {
3901
+ summary: "Update a Preferences context",
3902
+ responses: {
3903
+ "200": jsonResponse({
3904
+ type: "object",
3905
+ required: ["context"],
3906
+ properties: {
3907
+ context: {
3908
+ type: "object",
3909
+ additionalProperties: true
3910
+ }
3911
+ }
3912
+ }, "Updated Preferences context"),
3913
+ default: { $ref: "#/components/responses/Error" }
3914
+ }
3915
+ }
3916
+ },
3917
+ "/api/v1/preferences/contexts/merge": {
3918
+ post: {
3919
+ summary: "Merge one Preferences context into another",
3920
+ responses: {
3921
+ "200": jsonResponse({
3922
+ type: "object",
3923
+ required: ["merge"],
3924
+ properties: {
3925
+ merge: {
3926
+ type: "object",
3927
+ additionalProperties: true
3928
+ }
3929
+ }
3930
+ }, "Merged Preferences contexts"),
3931
+ default: { $ref: "#/components/responses/Error" }
3932
+ }
3933
+ }
3934
+ },
3935
+ "/api/v1/preferences/items": {
3936
+ post: {
3937
+ summary: "Create a standalone Preferences item",
3938
+ responses: {
3939
+ "201": jsonResponse({
3940
+ type: "object",
3941
+ required: ["item"],
3942
+ properties: {
3943
+ item: {
3944
+ type: "object",
3945
+ additionalProperties: true
3946
+ }
3947
+ }
3948
+ }, "Created Preferences item"),
3949
+ default: { $ref: "#/components/responses/Error" }
3950
+ }
3951
+ }
3952
+ },
3953
+ "/api/v1/preferences/items/{id}": {
3954
+ patch: {
3955
+ summary: "Update a Preferences item",
3956
+ responses: {
3957
+ "200": jsonResponse({
3958
+ type: "object",
3959
+ required: ["item"],
3960
+ properties: {
3961
+ item: {
3962
+ type: "object",
3963
+ additionalProperties: true
3964
+ }
3965
+ }
3966
+ }, "Updated Preferences item"),
3967
+ default: { $ref: "#/components/responses/Error" }
3968
+ }
3969
+ }
3970
+ },
3971
+ "/api/v1/preferences/items/from-entity": {
3972
+ post: {
3973
+ summary: "Create or queue a Preferences item from an existing Forge entity",
3974
+ responses: {
3975
+ "201": jsonResponse({
3976
+ type: "object",
3977
+ required: ["item"],
3978
+ properties: {
3979
+ item: {
3980
+ type: "object",
3981
+ additionalProperties: true
3982
+ }
3983
+ }
3984
+ }, "Queued entity-backed Preferences item"),
3985
+ default: { $ref: "#/components/responses/Error" }
3986
+ }
3987
+ }
3988
+ },
3989
+ "/api/v1/preferences/judgments": {
3990
+ post: {
3991
+ summary: "Submit a pairwise Preferences judgment",
3992
+ responses: {
3993
+ "201": jsonResponse({
3994
+ type: "object",
3995
+ required: ["judgment"],
3996
+ properties: {
3997
+ judgment: {
3998
+ type: "object",
3999
+ additionalProperties: true
4000
+ }
4001
+ }
4002
+ }, "Created pairwise judgment"),
4003
+ default: { $ref: "#/components/responses/Error" }
4004
+ }
4005
+ }
4006
+ },
4007
+ "/api/v1/preferences/signals": {
4008
+ post: {
4009
+ summary: "Submit an absolute Preferences signal",
4010
+ responses: {
4011
+ "201": jsonResponse({
4012
+ type: "object",
4013
+ required: ["signal"],
4014
+ properties: {
4015
+ signal: {
4016
+ type: "object",
4017
+ additionalProperties: true
4018
+ }
4019
+ }
4020
+ }, "Created absolute signal"),
4021
+ default: { $ref: "#/components/responses/Error" }
4022
+ }
4023
+ }
4024
+ },
4025
+ "/api/v1/preferences/items/{id}/score": {
4026
+ patch: {
4027
+ summary: "Patch manual score state for a Preferences item and return the refreshed workspace",
4028
+ responses: {
4029
+ "200": jsonResponse({
4030
+ type: "object",
4031
+ required: ["workspace"],
4032
+ properties: {
4033
+ workspace: {
4034
+ type: "object",
4035
+ additionalProperties: true
4036
+ }
4037
+ }
4038
+ }, "Refreshed Preferences workspace"),
4039
+ default: { $ref: "#/components/responses/Error" }
4040
+ }
4041
+ }
4042
+ },
3341
4043
  "/api/v1/operator/overview": {
3342
4044
  get: {
3343
4045
  summary: "Get the one-shot operator overview with full current state, route guidance, and optional Psyche summary",
@@ -4603,6 +5305,22 @@ export function buildOpenApiDocument() {
4603
5305
  }
4604
5306
  }
4605
5307
  },
5308
+ "/api/v1/habits/{id}/check-ins/{dateKey}": {
5309
+ delete: {
5310
+ summary: "Delete a habit check-in for one day",
5311
+ responses: {
5312
+ "200": jsonResponse({
5313
+ type: "object",
5314
+ required: ["habit", "metrics"],
5315
+ properties: {
5316
+ habit: { $ref: "#/components/schemas/Habit" },
5317
+ metrics: { $ref: "#/components/schemas/XpMetricsPayload" }
5318
+ }
5319
+ }, "Habit check-in deletion result"),
5320
+ "404": { $ref: "#/components/responses/Error" }
5321
+ }
5322
+ }
5323
+ },
4606
5324
  "/api/v1/tags": {
4607
5325
  get: {
4608
5326
  summary: "List tags",