@ai-matrx/desktop-protocol 0.15.0 → 0.16.0

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.
package/dist/react.d.cts CHANGED
@@ -135,9 +135,9 @@ declare const StreamMeta: z.ZodDiscriminatedUnion<[z.ZodObject<{
135
135
  type StreamMeta = z.output<typeof StreamMeta>;
136
136
  declare const EndReason: z.ZodEnum<{
137
137
  error: "error";
138
+ cancelled: "cancelled";
138
139
  resource_exited: "resource_exited";
139
140
  completed: "completed";
140
- cancelled: "cancelled";
141
141
  detached: "detached";
142
142
  }>;
143
143
  type EndReason = z.output<typeof EndReason>;
@@ -1662,6 +1662,44 @@ declare const OPS: {
1662
1662
  readonly since: "1.4";
1663
1663
  readonly errors: readonly ["INTERNAL"];
1664
1664
  };
1665
+ readonly "coding.history.import_missing": {
1666
+ readonly params: z.ZodObject<{}, z.core.$strict>;
1667
+ readonly result: z.ZodObject<{
1668
+ state: z.ZodEnum<{
1669
+ done: "done";
1670
+ blocked: "blocked";
1671
+ cancelled: "cancelled";
1672
+ }>;
1673
+ blocked: z.ZodNullable<z.ZodEnum<{
1674
+ signed_out: "signed_out";
1675
+ offline: "offline";
1676
+ organization_required: "organization_required";
1677
+ claude_unavailable: "claude_unavailable";
1678
+ cloud_list_unavailable: "cloud_list_unavailable";
1679
+ history_too_large: "history_too_large";
1680
+ }>>;
1681
+ run: z.ZodObject<{
1682
+ local_sessions: z.ZodInt;
1683
+ in_cloud: z.ZodInt;
1684
+ missing: z.ZodInt;
1685
+ behind: z.ZodInt;
1686
+ too_large: z.ZodInt;
1687
+ imported: z.ZodInt;
1688
+ changed: z.ZodInt;
1689
+ failed: z.ZodInt;
1690
+ failures: z.ZodArray<z.ZodObject<{
1691
+ session_id: z.ZodString;
1692
+ reason: z.ZodString;
1693
+ }, z.core.$strict>>;
1694
+ remaining: z.ZodInt;
1695
+ summary: z.ZodString;
1696
+ }, z.core.$strict>;
1697
+ elapsed_ms: z.ZodInt;
1698
+ }, z.core.$strict>;
1699
+ readonly kind: "unary";
1700
+ readonly since: "1.5";
1701
+ readonly errors: readonly ["RESOURCE_BUSY", "RESOURCE_GONE", "CANCELLED", "INTERNAL"];
1702
+ };
1665
1703
  };
1666
1704
  type OpName = keyof typeof OPS;
1667
1705
  type OpParams<N extends OpName> = z.input<(typeof OPS)[N]["params"]>;
@@ -1738,6 +1776,17 @@ declare const EVENTS: {
1738
1776
  }, z.core.$strict>>;
1739
1777
  }, z.core.$strict>;
1740
1778
  }, z.core.$strict>;
1779
+ readonly "coding.history.progress": z.ZodObject<{
1780
+ request_id: z.ZodString;
1781
+ phase: z.ZodEnum<{
1782
+ checking: "checking";
1783
+ importing: "importing";
1784
+ }>;
1785
+ done: z.ZodInt;
1786
+ total: z.ZodInt;
1787
+ imported: z.ZodInt;
1788
+ failed: z.ZodInt;
1789
+ }, z.core.$strict>;
1741
1790
  readonly "relay.device_status": z.ZodObject<{
1742
1791
  online: z.ZodBoolean;
1743
1792
  since_ms: z.ZodNullable<z.ZodInt>;
package/dist/react.d.ts CHANGED
@@ -135,9 +135,9 @@ declare const StreamMeta: z.ZodDiscriminatedUnion<[z.ZodObject<{
135
135
  type StreamMeta = z.output<typeof StreamMeta>;
136
136
  declare const EndReason: z.ZodEnum<{
137
137
  error: "error";
138
+ cancelled: "cancelled";
138
139
  resource_exited: "resource_exited";
139
140
  completed: "completed";
140
- cancelled: "cancelled";
141
141
  detached: "detached";
142
142
  }>;
143
143
  type EndReason = z.output<typeof EndReason>;
@@ -1662,6 +1662,44 @@ declare const OPS: {
1662
1662
  readonly since: "1.4";
1663
1663
  readonly errors: readonly ["INTERNAL"];
1664
1664
  };
1665
+ readonly "coding.history.import_missing": {
1666
+ readonly params: z.ZodObject<{}, z.core.$strict>;
1667
+ readonly result: z.ZodObject<{
1668
+ state: z.ZodEnum<{
1669
+ done: "done";
1670
+ blocked: "blocked";
1671
+ cancelled: "cancelled";
1672
+ }>;
1673
+ blocked: z.ZodNullable<z.ZodEnum<{
1674
+ signed_out: "signed_out";
1675
+ offline: "offline";
1676
+ organization_required: "organization_required";
1677
+ claude_unavailable: "claude_unavailable";
1678
+ cloud_list_unavailable: "cloud_list_unavailable";
1679
+ history_too_large: "history_too_large";
1680
+ }>>;
1681
+ run: z.ZodObject<{
1682
+ local_sessions: z.ZodInt;
1683
+ in_cloud: z.ZodInt;
1684
+ missing: z.ZodInt;
1685
+ behind: z.ZodInt;
1686
+ too_large: z.ZodInt;
1687
+ imported: z.ZodInt;
1688
+ changed: z.ZodInt;
1689
+ failed: z.ZodInt;
1690
+ failures: z.ZodArray<z.ZodObject<{
1691
+ session_id: z.ZodString;
1692
+ reason: z.ZodString;
1693
+ }, z.core.$strict>>;
1694
+ remaining: z.ZodInt;
1695
+ summary: z.ZodString;
1696
+ }, z.core.$strict>;
1697
+ elapsed_ms: z.ZodInt;
1698
+ }, z.core.$strict>;
1699
+ readonly kind: "unary";
1700
+ readonly since: "1.5";
1701
+ readonly errors: readonly ["RESOURCE_BUSY", "RESOURCE_GONE", "CANCELLED", "INTERNAL"];
1702
+ };
1665
1703
  };
1666
1704
  type OpName = keyof typeof OPS;
1667
1705
  type OpParams<N extends OpName> = z.input<(typeof OPS)[N]["params"]>;
@@ -1738,6 +1776,17 @@ declare const EVENTS: {
1738
1776
  }, z.core.$strict>>;
1739
1777
  }, z.core.$strict>;
1740
1778
  }, z.core.$strict>;
1779
+ readonly "coding.history.progress": z.ZodObject<{
1780
+ request_id: z.ZodString;
1781
+ phase: z.ZodEnum<{
1782
+ checking: "checking";
1783
+ importing: "importing";
1784
+ }>;
1785
+ done: z.ZodInt;
1786
+ total: z.ZodInt;
1787
+ imported: z.ZodInt;
1788
+ failed: z.ZodInt;
1789
+ }, z.core.$strict>;
1741
1790
  readonly "relay.device_status": z.ZodObject<{
1742
1791
  online: z.ZodBoolean;
1743
1792
  since_ms: z.ZodNullable<z.ZodInt>;
@@ -2997,10 +2997,324 @@
2997
2997
  ],
2998
2998
  "additionalProperties": false
2999
2999
  },
3000
+ "CodingServiceCredentials": {
3001
+ "type": "object",
3002
+ "properties": {
3003
+ "access_token": {
3004
+ "type": "string",
3005
+ "minLength": 16,
3006
+ "maxLength": 16384
3007
+ },
3008
+ "user_id": {
3009
+ "type": "string",
3010
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
3011
+ },
3012
+ "server_url": {
3013
+ "type": "string",
3014
+ "minLength": 1,
3015
+ "maxLength": 2048,
3016
+ "pattern": "^https?:\\/\\/[^\\s/?#]+(\\/[^\\s?#]*)?$"
3017
+ }
3018
+ },
3019
+ "required": [
3020
+ "access_token",
3021
+ "user_id",
3022
+ "server_url"
3023
+ ],
3024
+ "additionalProperties": false
3025
+ },
3026
+ "CodingHistoryBlocked": {
3027
+ "type": "string",
3028
+ "enum": [
3029
+ "signed_out",
3030
+ "offline",
3031
+ "organization_required",
3032
+ "claude_unavailable",
3033
+ "cloud_list_unavailable",
3034
+ "history_too_large"
3035
+ ]
3036
+ },
3037
+ "CodingHistoryFailure": {
3038
+ "type": "object",
3039
+ "properties": {
3040
+ "session_id": {
3041
+ "type": "string",
3042
+ "maxLength": 64
3043
+ },
3044
+ "reason": {
3045
+ "type": "string",
3046
+ "maxLength": 300
3047
+ }
3048
+ },
3049
+ "required": [
3050
+ "session_id",
3051
+ "reason"
3052
+ ],
3053
+ "additionalProperties": false
3054
+ },
3055
+ "CodingHistoryRun": {
3056
+ "type": "object",
3057
+ "properties": {
3058
+ "local_sessions": {
3059
+ "type": "integer",
3060
+ "minimum": 0,
3061
+ "maximum": 9007199254740991
3062
+ },
3063
+ "in_cloud": {
3064
+ "type": "integer",
3065
+ "minimum": 0,
3066
+ "maximum": 9007199254740991
3067
+ },
3068
+ "missing": {
3069
+ "type": "integer",
3070
+ "minimum": 0,
3071
+ "maximum": 9007199254740991
3072
+ },
3073
+ "behind": {
3074
+ "type": "integer",
3075
+ "minimum": 0,
3076
+ "maximum": 9007199254740991
3077
+ },
3078
+ "too_large": {
3079
+ "type": "integer",
3080
+ "minimum": 0,
3081
+ "maximum": 9007199254740991
3082
+ },
3083
+ "imported": {
3084
+ "type": "integer",
3085
+ "minimum": 0,
3086
+ "maximum": 9007199254740991
3087
+ },
3088
+ "changed": {
3089
+ "type": "integer",
3090
+ "minimum": 0,
3091
+ "maximum": 9007199254740991
3092
+ },
3093
+ "failed": {
3094
+ "type": "integer",
3095
+ "minimum": 0,
3096
+ "maximum": 9007199254740991
3097
+ },
3098
+ "failures": {
3099
+ "maxItems": 20,
3100
+ "type": "array",
3101
+ "items": {
3102
+ "$ref": "#/$defs/CodingHistoryFailure"
3103
+ }
3104
+ },
3105
+ "remaining": {
3106
+ "type": "integer",
3107
+ "minimum": 0,
3108
+ "maximum": 9007199254740991
3109
+ },
3110
+ "summary": {
3111
+ "type": "string",
3112
+ "maxLength": 400
3113
+ }
3114
+ },
3115
+ "required": [
3116
+ "local_sessions",
3117
+ "in_cloud",
3118
+ "missing",
3119
+ "behind",
3120
+ "too_large",
3121
+ "imported",
3122
+ "changed",
3123
+ "failed",
3124
+ "failures",
3125
+ "remaining",
3126
+ "summary"
3127
+ ],
3128
+ "additionalProperties": false
3129
+ },
3130
+ "CodingHistoryStep": {
3131
+ "type": "object",
3132
+ "properties": {
3133
+ "plan_id": {
3134
+ "anyOf": [
3135
+ {
3136
+ "type": "string",
3137
+ "pattern": "^[0-9a-f]{32}$"
3138
+ },
3139
+ {
3140
+ "type": "null"
3141
+ }
3142
+ ]
3143
+ },
3144
+ "finished": {
3145
+ "type": "boolean"
3146
+ },
3147
+ "blocked": {
3148
+ "anyOf": [
3149
+ {
3150
+ "$ref": "#/$defs/CodingHistoryBlocked"
3151
+ },
3152
+ {
3153
+ "type": "null"
3154
+ }
3155
+ ]
3156
+ },
3157
+ "run": {
3158
+ "$ref": "#/$defs/CodingHistoryRun"
3159
+ }
3160
+ },
3161
+ "required": [
3162
+ "plan_id",
3163
+ "finished",
3164
+ "blocked",
3165
+ "run"
3166
+ ],
3167
+ "additionalProperties": false
3168
+ },
3169
+ "CodingPlanMissingParams": {
3170
+ "type": "object",
3171
+ "properties": {
3172
+ "credentials": {
3173
+ "$ref": "#/$defs/CodingServiceCredentials"
3174
+ }
3175
+ },
3176
+ "required": [
3177
+ "credentials"
3178
+ ],
3179
+ "additionalProperties": false
3180
+ },
3181
+ "CodingImportNextParams": {
3182
+ "type": "object",
3183
+ "properties": {
3184
+ "plan_id": {
3185
+ "type": "string",
3186
+ "pattern": "^[0-9a-f]{32}$"
3187
+ },
3188
+ "credentials": {
3189
+ "$ref": "#/$defs/CodingServiceCredentials"
3190
+ }
3191
+ },
3192
+ "required": [
3193
+ "plan_id",
3194
+ "credentials"
3195
+ ],
3196
+ "additionalProperties": false
3197
+ },
3198
+ "CodingServiceProgress": {
3199
+ "type": "object",
3200
+ "properties": {
3201
+ "phase": {
3202
+ "type": "string",
3203
+ "enum": [
3204
+ "checking",
3205
+ "importing"
3206
+ ]
3207
+ },
3208
+ "done": {
3209
+ "type": "integer",
3210
+ "minimum": 0,
3211
+ "maximum": 9007199254740991
3212
+ },
3213
+ "total": {
3214
+ "type": "integer",
3215
+ "minimum": 0,
3216
+ "maximum": 9007199254740991
3217
+ }
3218
+ },
3219
+ "required": [
3220
+ "phase",
3221
+ "done",
3222
+ "total"
3223
+ ],
3224
+ "additionalProperties": false
3225
+ },
3226
+ "CodingHistoryImportMissingParams": {
3227
+ "type": "object",
3228
+ "properties": {},
3229
+ "additionalProperties": false
3230
+ },
3231
+ "CodingHistoryImportMissingResult": {
3232
+ "type": "object",
3233
+ "properties": {
3234
+ "state": {
3235
+ "type": "string",
3236
+ "enum": [
3237
+ "done",
3238
+ "blocked",
3239
+ "cancelled"
3240
+ ]
3241
+ },
3242
+ "blocked": {
3243
+ "anyOf": [
3244
+ {
3245
+ "$ref": "#/$defs/CodingHistoryBlocked"
3246
+ },
3247
+ {
3248
+ "type": "null"
3249
+ }
3250
+ ]
3251
+ },
3252
+ "run": {
3253
+ "$ref": "#/$defs/CodingHistoryRun"
3254
+ },
3255
+ "elapsed_ms": {
3256
+ "type": "integer",
3257
+ "minimum": 0,
3258
+ "maximum": 9007199254740991
3259
+ }
3260
+ },
3261
+ "required": [
3262
+ "state",
3263
+ "blocked",
3264
+ "run",
3265
+ "elapsed_ms"
3266
+ ],
3267
+ "additionalProperties": false
3268
+ },
3269
+ "CodingHistoryProgressEvent": {
3270
+ "type": "object",
3271
+ "properties": {
3272
+ "request_id": {
3273
+ "$ref": "#/$defs/RequestId"
3274
+ },
3275
+ "phase": {
3276
+ "type": "string",
3277
+ "enum": [
3278
+ "checking",
3279
+ "importing"
3280
+ ]
3281
+ },
3282
+ "done": {
3283
+ "type": "integer",
3284
+ "minimum": 0,
3285
+ "maximum": 9007199254740991
3286
+ },
3287
+ "total": {
3288
+ "type": "integer",
3289
+ "minimum": 0,
3290
+ "maximum": 9007199254740991
3291
+ },
3292
+ "imported": {
3293
+ "type": "integer",
3294
+ "minimum": 0,
3295
+ "maximum": 9007199254740991
3296
+ },
3297
+ "failed": {
3298
+ "type": "integer",
3299
+ "minimum": 0,
3300
+ "maximum": 9007199254740991
3301
+ }
3302
+ },
3303
+ "required": [
3304
+ "request_id",
3305
+ "phase",
3306
+ "done",
3307
+ "total",
3308
+ "imported",
3309
+ "failed"
3310
+ ],
3311
+ "additionalProperties": false
3312
+ },
3000
3313
  "ServiceName": {
3001
3314
  "type": "string",
3002
3315
  "enum": [
3003
- "ml"
3316
+ "ml",
3317
+ "coding"
3004
3318
  ]
3005
3319
  },
3006
3320
  "ContractHash": {
@@ -6416,6 +6730,18 @@
6416
6730
  "errors": [
6417
6731
  "INTERNAL"
6418
6732
  ]
6733
+ },
6734
+ "coding.history.import_missing": {
6735
+ "params": "CodingHistoryImportMissingParams",
6736
+ "result": "CodingHistoryImportMissingResult",
6737
+ "kind": "unary",
6738
+ "since": "1.5",
6739
+ "errors": [
6740
+ "RESOURCE_BUSY",
6741
+ "RESOURCE_GONE",
6742
+ "CANCELLED",
6743
+ "INTERNAL"
6744
+ ]
6419
6745
  }
6420
6746
  },
6421
6747
  "x-events": {
@@ -6425,6 +6751,7 @@
6425
6751
  "exec.cwd": "ExecCwdEvent",
6426
6752
  "session.control_changed": "SessionControlChangedEvent",
6427
6753
  "models.progress": "ModelsProgressEvent",
6754
+ "coding.history.progress": "CodingHistoryProgressEvent",
6428
6755
  "relay.device_status": "RelayDeviceStatusEvent",
6429
6756
  "relay.auth_expiring": "RelayAuthExpiringEvent"
6430
6757
  },
@@ -6445,6 +6772,19 @@
6445
6772
  "result": "ModelsTranscribeResult"
6446
6773
  }
6447
6774
  }
6775
+ },
6776
+ "coding": {
6777
+ "progress": "CodingServiceProgress",
6778
+ "ops": {
6779
+ "coding.plan_missing": {
6780
+ "params": "CodingPlanMissingParams",
6781
+ "result": "CodingHistoryStep"
6782
+ },
6783
+ "coding.import_next": {
6784
+ "params": "CodingImportNextParams",
6785
+ "result": "CodingHistoryStep"
6786
+ }
6787
+ }
6448
6788
  }
6449
6789
  },
6450
6790
  "x-fields-since": {
@@ -6468,5 +6808,5 @@
6468
6808
  "olderPeersGet": 0
6469
6809
  }
6470
6810
  },
6471
- "x-protocol-version": "1.4"
6811
+ "x-protocol-version": "1.5"
6472
6812
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-matrx/desktop-protocol",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "The one wire contract between Matrx 2 (the desktop app) and every client that drives it — phone, web app, extension, server: zod schemas for the envelope and every cap.op, the 16-byte binary frame codec, a reconnecting request/stream/credit/reattach client, React hooks, and a generated JSON Schema + Pydantic twin that CI keeps byte-identical.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",