@ycodium-ai/plugin-api 0.2.4372 → 0.2.4408

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/README.md CHANGED
@@ -514,7 +514,19 @@ republish.
514
514
 
515
515
  <!-- plugin-api-versions:start (generated by scripts/gen-plugin-api-version.ts from packages/plugin-api/version-history.json; edit that file) -->
516
516
 
517
- The current API is **112**. This Ycodium loads plugins declaring 111 through 112.
517
+ The current API is **115**. This Ycodium loads plugins declaring 111 through 115.
518
+
519
+ API 115 adds `ctx.machineSettings.log.recent()`: the recent warnings and errors in the machine's own server log, newest first, optionally only those about one home machine, and the optional `machineLog` capability on the environment descriptor the machine configuration read returns.
520
+
521
+ API 115 the machine task create operation can fail with `approval-required` when a person's request for another machine is neither account-trusted nor approved by that machine's owner.
522
+
523
+ API 115 adds an optional `members` list to the thread objects plugins read (`threads.*` outputs): the members, people and sessions that take part in the conversation. Older threads do not carry it, so a plugin must treat its absence as the implied pair of the conversation's own agent and the person who opened it.
524
+
525
+ API 114 adds an optional `memberId` to the `remote-agent` variant of `PluginToolInvocation.caller`: the member the member machine signed for the call and the host verified. It is absent for an older member machine or a machine-level call, and a tool that decides by member must refuse then.
526
+
527
+ API 113 adds `ctx.projects.machines.byMachine.list()` and `ctx.projects.machines.joined.health()`, and optional `seatHealth` on the machines `ctx.projects.machines.list()` returns: how a machine is doing at pulling a project's work (last success, last failure code, next retry). All three need members.read.
528
+
529
+ API 113 adds an optional `roomMemberId` to the work line rows plugins read through `work.lines`: the member whose agent is the line's group conversation, unchanged when the lead is handed over.
518
530
 
519
531
  API 112 adds optional requestSummary to member runtime reports
520
532
 
@@ -107,6 +107,11 @@ type AccountMachineDiscoveryFailure = {
107
107
  };
108
108
  type Arrays_ = ReadonlyArray<string>;
109
109
  type Arrays_1 = ReadonlyArray<string>;
110
+ type SeatHealthFailure = {
111
+ readonly "at": string;
112
+ readonly "code": "credential-rejected" | "mcp-failed" | "invalid-pending" | "local-read-failed" | "dispatch-failed" | "wake-held" | "storage" | "unreachable";
113
+ readonly "httpStatus"?: number;
114
+ };
110
115
  type Objects_13 = {
111
116
  readonly "state": "unknown" | "confirmed" | "stale" | "failed";
112
117
  readonly "confirmedAt"?: string;
@@ -162,6 +167,23 @@ type Objects_23 = {
162
167
  readonly "requestedBy": "agent" | "continuation" | "person";
163
168
  readonly "notificationPolicy"?: "wake" | "activity-only" | undefined;
164
169
  };
170
+ type ThreadMemberRef = {
171
+ readonly "kind": "member";
172
+ readonly "memberId": string;
173
+ } | {
174
+ readonly "kind": "person";
175
+ readonly "person": {
176
+ readonly "kind": "account";
177
+ readonly "userId": string;
178
+ } | {
179
+ readonly "kind": "local-owner";
180
+ readonly "environmentId": string;
181
+ };
182
+ } | {
183
+ readonly "kind": "thread";
184
+ readonly "environmentId": string;
185
+ readonly "threadId": string;
186
+ };
165
187
  type Objects_24 = {
166
188
  readonly "userId": string;
167
189
  readonly "displayName": string;
@@ -628,6 +650,16 @@ type Objects_87 = {
628
650
  readonly "inUse": boolean;
629
651
  }>;
630
652
  };
653
+ type MachineLogRecord = {
654
+ readonly "time": string;
655
+ readonly "level"?: string;
656
+ readonly "message"?: unknown;
657
+ readonly "cause"?: string;
658
+ readonly "annotations"?: {
659
+ readonly [x: string]: unknown;
660
+ };
661
+ readonly "clipped"?: boolean;
662
+ };
631
663
  type Arrays_20 = ReadonlyArray<{
632
664
  readonly "id": string;
633
665
  readonly "value": string | boolean;
@@ -1094,6 +1126,23 @@ type Objects_184 = {
1094
1126
  readonly "requestedBy": "agent" | "continuation" | "person";
1095
1127
  readonly "notificationPolicy"?: "wake" | "activity-only" | undefined;
1096
1128
  };
1129
+ type ThreadMemberRef_1 = {
1130
+ readonly "kind": "member";
1131
+ readonly "memberId": string;
1132
+ } | {
1133
+ readonly "kind": "person";
1134
+ readonly "person": {
1135
+ readonly "kind": "account";
1136
+ readonly "userId": string;
1137
+ } | {
1138
+ readonly "kind": "local-owner";
1139
+ readonly "environmentId": string;
1140
+ };
1141
+ } | {
1142
+ readonly "kind": "thread";
1143
+ readonly "environmentId": string;
1144
+ readonly "threadId": string;
1145
+ };
1097
1146
  type Objects_185 = {
1098
1147
  readonly "userId": string;
1099
1148
  readonly "displayName": string;
@@ -1235,6 +1284,13 @@ type Objects_12 = {
1235
1284
  readonly "variants"?: Arrays_;
1236
1285
  readonly "reversible": boolean;
1237
1286
  };
1287
+ type SeatHealth = {
1288
+ readonly "lastSuccessAt"?: string;
1289
+ readonly "lastFailure"?: SeatHealthFailure;
1290
+ readonly "state"?: "active" | "rejected" | "checking" | "home-update-required";
1291
+ readonly "nextAttemptAt"?: string;
1292
+ readonly "consecutiveFailures"?: number;
1293
+ };
1238
1294
  type Objects_145 = {
1239
1295
  readonly "instanceId"?: string;
1240
1296
  readonly "variant"?: string;
@@ -1267,6 +1323,8 @@ type Objects_173 = {
1267
1323
  };
1268
1324
  type Union_5 = Objects_22 | null | undefined;
1269
1325
  type Union_6 = Objects_23 | null | undefined;
1326
+ type ThreadMembers = ReadonlyArray<ThreadMemberRef>;
1327
+ type ThreadMembers_1 = ReadonlyArray<ThreadMemberRef>;
1270
1328
  type Union_7 = Objects_24 | null | undefined;
1271
1329
  type Union_24 = Objects_24 | null | undefined;
1272
1330
  type Union_9 = ReadonlyArray<Objects_26> | undefined;
@@ -1643,6 +1701,8 @@ type Objects_191 = {
1643
1701
  };
1644
1702
  type Union_73 = Objects_183 | undefined;
1645
1703
  type Union_60 = Objects_184 | null | undefined;
1704
+ type ThreadMembers_2 = ReadonlyArray<ThreadMemberRef_1>;
1705
+ type ThreadMembers_3 = ReadonlyArray<ThreadMemberRef_1>;
1646
1706
  type Union_61 = Objects_185 | null | undefined;
1647
1707
  type Union_72 = Objects_185 | null | undefined;
1648
1708
  type Union_63 = ReadonlyArray<Objects_187> | undefined;
@@ -1724,6 +1784,21 @@ type Objects_7 = {
1724
1784
  readonly "leftover"?: boolean | undefined;
1725
1785
  }> | undefined;
1726
1786
  };
1787
+ type ProjectMachineWorking = {
1788
+ readonly "projectId": string;
1789
+ readonly "projectTitle": string;
1790
+ readonly "admittedBy"?: "join-code" | "client-broker" | "account";
1791
+ readonly "seatHealth"?: SeatHealth;
1792
+ };
1793
+ type ProjectMachineJoinedHealth = {
1794
+ readonly "admittedBy"?: "join-code" | "client-broker" | "account";
1795
+ readonly "homeEnvironmentId": string;
1796
+ readonly "homeName"?: string;
1797
+ readonly "projectTitle"?: string;
1798
+ readonly "projectId": string;
1799
+ readonly "state": "active" | "rejected" | "checking" | "home-update-required";
1800
+ readonly "health"?: SeatHealth;
1801
+ };
1727
1802
  type Objects_144 = {
1728
1803
  readonly "environmentId": string;
1729
1804
  readonly "actionId": string;
@@ -1899,6 +1974,15 @@ type Objects_186 = {
1899
1974
  readonly "waitSpans"?: Union_63;
1900
1975
  readonly "runSegments"?: Union_10;
1901
1976
  };
1977
+ type ProjectMachineByMachine = {
1978
+ readonly "environmentId": string;
1979
+ readonly "name": string;
1980
+ readonly "online": boolean;
1981
+ readonly "connection": "stream" | "polling" | "none";
1982
+ readonly "lastSeenAt"?: string;
1983
+ readonly "memberUpdateRequired"?: true;
1984
+ readonly "projects": ReadonlyArray<ProjectMachineWorking>;
1985
+ };
1902
1986
  type Objects_18 = {
1903
1987
  readonly "instanceId": string;
1904
1988
  readonly "model": string;
@@ -1984,6 +2068,7 @@ type Objects_155 = {
1984
2068
  readonly "leadMemberId": string | null;
1985
2069
  readonly "memberIds": ReadonlyArray<string>;
1986
2070
  readonly "threadId": string | null;
2071
+ readonly "roomMemberId"?: string;
1987
2072
  readonly "version": number;
1988
2073
  readonly "createdBy": Union_48;
1989
2074
  readonly "createdAt": string;
@@ -2238,6 +2323,7 @@ type Objects_192 = {
2238
2323
  readonly "forkedFrom"?: Objects_182 | null | undefined;
2239
2324
  readonly "presetId"?: string | null | undefined;
2240
2325
  readonly "memberId"?: string | undefined;
2326
+ readonly "members"?: ThreadMembers_2;
2241
2327
  readonly "createdBy"?: Union_61;
2242
2328
  readonly "latestTurn": Union_62;
2243
2329
  readonly "stopRequestedAt"?: string | null;
@@ -2303,6 +2389,7 @@ type Objects_16 = {
2303
2389
  readonly "linkedPullRequest"?: Union_5;
2304
2390
  readonly "origin"?: Union_6;
2305
2391
  readonly "presetId"?: string | null | undefined;
2392
+ readonly "members"?: ThreadMembers;
2306
2393
  readonly "createdBy"?: Union_7;
2307
2394
  readonly "latestTurn": Union_8;
2308
2395
  readonly "stopRequestedAt"?: string | null;
@@ -2356,6 +2443,7 @@ type Objects_34 = {
2356
2443
  readonly "forkedFrom"?: Objects_17 | null | undefined;
2357
2444
  readonly "presetId"?: string | null | undefined;
2358
2445
  readonly "memberId"?: string | undefined;
2446
+ readonly "members"?: ThreadMembers;
2359
2447
  readonly "createdBy"?: Union_7;
2360
2448
  readonly "latestTurn": Union_8;
2361
2449
  readonly "stopRequestedAt"?: string | null;
@@ -2967,6 +3055,7 @@ export type ProjectsMachinesListOutput = {
2967
3055
  readonly "description"?: string;
2968
3056
  readonly "variants"?: Arrays_1;
2969
3057
  }>;
3058
+ readonly "seatHealth"?: SeatHealth;
2970
3059
  readonly "projectFolderAttached"?: boolean;
2971
3060
  readonly "environmentId": string;
2972
3061
  readonly "name": string;
@@ -3006,12 +3095,19 @@ export type ProjectsMachinesListOutput = {
3006
3095
  readonly "connection"?: "stream" | "polling" | "none";
3007
3096
  readonly "lastSeenAt"?: string;
3008
3097
  readonly "excluded": boolean;
3098
+ readonly "seatHealth"?: SeatHealth;
3009
3099
  readonly "removed"?: boolean;
3010
3100
  readonly "keyChangePending"?: boolean;
3011
3101
  readonly "pendingAdmission"?: boolean;
3012
3102
  readonly "replacementName"?: string;
3013
3103
  }>;
3014
3104
  };
3105
+ export type ProjectsMachinesByMachineListInput = {
3106
+ readonly "environmentId"?: string;
3107
+ };
3108
+ export type ProjectsMachinesByMachineListOutput = {
3109
+ readonly "machines": ReadonlyArray<ProjectMachineByMachine>;
3110
+ };
3015
3111
  export type ProjectsMachinesJoinCodeCreateInput = {
3016
3112
  readonly "projectId": string;
3017
3113
  readonly "automaticEnvironmentId"?: string;
@@ -3041,6 +3137,19 @@ export type ProjectsMachinesJoinOutput = {
3041
3137
  readonly "homeEnvironmentId": string;
3042
3138
  readonly "projectId": string;
3043
3139
  };
3140
+ export type ProjectsMachinesJoinedHealthInput = {};
3141
+ export type ProjectsMachinesJoinedHealthOutput = {
3142
+ readonly "items": ReadonlyArray<ProjectMachineJoinedHealth>;
3143
+ readonly "accountConnections"?: ReadonlyArray<{
3144
+ readonly "homeEnvironmentId": string;
3145
+ readonly "homeName": string;
3146
+ readonly "connected": boolean;
3147
+ readonly "reason"?: "invalid-proof" | "different-account" | "machine-removed" | "key-confirmation-required" | "key-kept" | "home-update-required" | "local-key-confirmation-required" | "local-key-kept" | "no-reachable-address" | "manual-confirmation-required" | "local-manual-confirmation-required";
3148
+ readonly "lastConnectedAt"?: string;
3149
+ readonly "nextAttemptAt"?: string;
3150
+ readonly "consecutiveFailures"?: number;
3151
+ }>;
3152
+ };
3044
3153
  export type ProjectsMachinesLeaveInput = {
3045
3154
  readonly "seatId": string;
3046
3155
  };
@@ -3166,6 +3275,7 @@ export type ThreadsHistoryOutput = {
3166
3275
  readonly "forkedFrom"?: Objects_17 | null | undefined;
3167
3276
  readonly "presetId"?: string | null | undefined;
3168
3277
  readonly "memberId"?: string | undefined;
3278
+ readonly "members"?: ThreadMembers_1;
3169
3279
  readonly "createdBy"?: Objects_24 | null | undefined;
3170
3280
  readonly "latestTurn": Objects_25 | null;
3171
3281
  readonly "stopRequestedAt"?: string | null;
@@ -4595,6 +4705,7 @@ export type MachineSettingsConfigGetOutput = {
4595
4705
  readonly "workBoard"?: boolean;
4596
4706
  readonly "groupMessages"?: boolean;
4597
4707
  readonly "machineTasks"?: boolean;
4708
+ readonly "machineLog"?: boolean;
4598
4709
  readonly "tolerantMachineActions"?: boolean;
4599
4710
  readonly "machineAdmissionIdentityCheck"?: boolean;
4600
4711
  readonly "threadTitleRegeneration"?: boolean;
@@ -4675,6 +4786,20 @@ export type MachineSettingsRuntimeHealthGetInput = {};
4675
4786
  export type MachineSettingsRuntimeHealthGetOutput = Objects_85;
4676
4787
  export type MachineSettingsRuntimeInventoryGetInput = {};
4677
4788
  export type MachineSettingsRuntimeInventoryGetOutput = Objects_87;
4789
+ export type MachineSettingsLogRecentInput = {
4790
+ readonly "minutes"?: number;
4791
+ readonly "levels"?: ReadonlyArray<"WARN" | "ERROR" | "FATAL">;
4792
+ readonly "homeEnvironmentId"?: string;
4793
+ readonly "limit"?: number;
4794
+ };
4795
+ export type MachineSettingsLogRecentOutput = {
4796
+ readonly "enabled": boolean;
4797
+ readonly "records": ReadonlyArray<MachineLogRecord>;
4798
+ readonly "matched": number;
4799
+ readonly "olderRecordsNotScanned"?: boolean;
4800
+ readonly "rotatedDuringScan"?: boolean;
4801
+ readonly "unreadableFiles"?: number;
4802
+ };
4678
4803
  export type MachineSettingsProxiesTestInput = {
4679
4804
  readonly "config": {
4680
4805
  readonly "displayName"?: string;
@@ -7498,6 +7623,7 @@ export type ProjectsMachinesListEncodedOutput = {
7498
7623
  readonly "description"?: string;
7499
7624
  readonly "variants"?: Arrays_1;
7500
7625
  }>;
7626
+ readonly "seatHealth"?: SeatHealth;
7501
7627
  readonly "projectFolderAttached"?: boolean;
7502
7628
  readonly "environmentId": string;
7503
7629
  readonly "name": string;
@@ -7537,6 +7663,7 @@ export type ProjectsMachinesListEncodedOutput = {
7537
7663
  readonly "connection"?: "stream" | "polling" | "none";
7538
7664
  readonly "lastSeenAt"?: string;
7539
7665
  readonly "excluded": boolean;
7666
+ readonly "seatHealth"?: SeatHealth;
7540
7667
  readonly "removed"?: boolean;
7541
7668
  readonly "keyChangePending"?: boolean;
7542
7669
  readonly "pendingAdmission"?: boolean;
@@ -7572,6 +7699,7 @@ export type ThreadsListEncodedOutput = {
7572
7699
  readonly "linkedPullRequest"?: Union_59;
7573
7700
  readonly "origin"?: Union_60;
7574
7701
  readonly "presetId"?: string | null | undefined;
7702
+ readonly "members"?: ThreadMembers_2;
7575
7703
  readonly "createdBy"?: Union_61;
7576
7704
  readonly "latestTurn": Union_62;
7577
7705
  readonly "stopRequestedAt"?: string | null;
@@ -7644,6 +7772,7 @@ export type ThreadsHistoryEncodedOutput = {
7644
7772
  readonly "forkedFrom"?: Objects_182 | null | undefined;
7645
7773
  readonly "presetId"?: string | null | undefined;
7646
7774
  readonly "memberId"?: string | undefined;
7775
+ readonly "members"?: ThreadMembers_3;
7647
7776
  readonly "createdBy"?: Objects_185 | null | undefined;
7648
7777
  readonly "latestTurn": Objects_186 | null;
7649
7778
  readonly "stopRequestedAt"?: string | null;
@@ -8308,6 +8437,7 @@ export type MachineSettingsConfigGetEncodedOutput = {
8308
8437
  readonly "workBoard"?: boolean;
8309
8438
  readonly "groupMessages"?: boolean;
8310
8439
  readonly "machineTasks"?: boolean;
8440
+ readonly "machineLog"?: boolean;
8311
8441
  readonly "tolerantMachineActions"?: boolean;
8312
8442
  readonly "machineAdmissionIdentityCheck"?: boolean;
8313
8443
  readonly "threadTitleRegeneration"?: boolean;
@@ -8772,6 +8902,9 @@ export interface PluginDataPorts {
8772
8902
  readonly runtimeInventory: {
8773
8903
  readonly get: (input: MachineSettingsRuntimeInventoryGetInput) => Promise<MachineSettingsRuntimeInventoryGetOutput>;
8774
8904
  };
8905
+ readonly log: {
8906
+ readonly recent: (input: MachineSettingsLogRecentInput) => Promise<MachineSettingsLogRecentOutput>;
8907
+ };
8775
8908
  readonly runtime: {
8776
8909
  readonly control: (input: MachineSettingsRuntimeControlInput) => Promise<MachineSettingsRuntimeControlOutput>;
8777
8910
  readonly upgrade: (input: MachineSettingsRuntimeUpgradeInput) => Promise<MachineSettingsRuntimeUpgradeOutput>;
@@ -8934,11 +9067,17 @@ export interface PluginDataPorts {
8934
9067
  readonly resolve: (input: ProjectsMachinesRegistrationResolveInput) => Promise<ProjectsMachinesRegistrationResolveOutput>;
8935
9068
  };
8936
9069
  readonly list: (input: ProjectsMachinesListInput) => Promise<ProjectsMachinesListOutput>;
9070
+ readonly byMachine: {
9071
+ readonly list: (input: ProjectsMachinesByMachineListInput) => Promise<ProjectsMachinesByMachineListOutput>;
9072
+ };
8937
9073
  readonly joinCode: {
8938
9074
  readonly create: (input: ProjectsMachinesJoinCodeCreateInput) => Promise<ProjectsMachinesJoinCodeCreateOutput>;
8939
9075
  };
8940
9076
  readonly remove: (input: ProjectsMachinesRemoveInput) => Promise<ProjectsMachinesRemoveOutput>;
8941
9077
  readonly join: (input: ProjectsMachinesJoinInput) => Promise<ProjectsMachinesJoinOutput>;
9078
+ readonly joined: {
9079
+ readonly health: (input: ProjectsMachinesJoinedHealthInput) => Promise<ProjectsMachinesJoinedHealthOutput>;
9080
+ };
8942
9081
  readonly leave: (input: ProjectsMachinesLeaveInput) => Promise<ProjectsMachinesLeaveOutput>;
8943
9082
  readonly actions: {
8944
9083
  readonly list: (input: ProjectsMachinesActionsListInput) => Promise<ProjectsMachinesActionsListOutput>;
@@ -9290,6 +9429,14 @@ export interface PluginUiDataReads {
9290
9429
  readonly input: ProjectsMachinesListInput;
9291
9430
  readonly output: ProjectsMachinesListEncodedOutput;
9292
9431
  };
9432
+ readonly "projects.machines.byMachine.list": {
9433
+ readonly input: ProjectsMachinesByMachineListInput;
9434
+ readonly output: ProjectsMachinesByMachineListOutput;
9435
+ };
9436
+ readonly "projects.machines.joined.health": {
9437
+ readonly input: ProjectsMachinesJoinedHealthInput;
9438
+ readonly output: ProjectsMachinesJoinedHealthOutput;
9439
+ };
9293
9440
  readonly "projects.machines.actions.list": {
9294
9441
  readonly input: ProjectsMachinesActionsListInput;
9295
9442
  readonly output: ProjectsMachinesActionsListOutput;
@@ -9474,6 +9621,10 @@ export interface PluginUiDataReads {
9474
9621
  readonly input: MachineSettingsRuntimeInventoryGetInput;
9475
9622
  readonly output: MachineSettingsRuntimeInventoryGetOutput;
9476
9623
  };
9624
+ readonly "machineSettings.log.recent": {
9625
+ readonly input: MachineSettingsLogRecentInput;
9626
+ readonly output: MachineSettingsLogRecentOutput;
9627
+ };
9477
9628
  readonly "machineSettings.proxies.test": {
9478
9629
  readonly input: MachineSettingsProxiesTestInput;
9479
9630
  readonly output: MachineSettingsProxiesTestOutput;