@ycodium-ai/plugin-api 0.2.4394 → 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,13 @@ 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 **114**. This Ycodium loads plugins declaring 111 through 114.
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.
518
524
 
519
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.
520
526
 
@@ -167,6 +167,23 @@ type Objects_23 = {
167
167
  readonly "requestedBy": "agent" | "continuation" | "person";
168
168
  readonly "notificationPolicy"?: "wake" | "activity-only" | undefined;
169
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
+ };
170
187
  type Objects_24 = {
171
188
  readonly "userId": string;
172
189
  readonly "displayName": string;
@@ -633,6 +650,16 @@ type Objects_87 = {
633
650
  readonly "inUse": boolean;
634
651
  }>;
635
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
+ };
636
663
  type Arrays_20 = ReadonlyArray<{
637
664
  readonly "id": string;
638
665
  readonly "value": string | boolean;
@@ -1099,6 +1126,23 @@ type Objects_184 = {
1099
1126
  readonly "requestedBy": "agent" | "continuation" | "person";
1100
1127
  readonly "notificationPolicy"?: "wake" | "activity-only" | undefined;
1101
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
+ };
1102
1146
  type Objects_185 = {
1103
1147
  readonly "userId": string;
1104
1148
  readonly "displayName": string;
@@ -1279,6 +1323,8 @@ type Objects_173 = {
1279
1323
  };
1280
1324
  type Union_5 = Objects_22 | null | undefined;
1281
1325
  type Union_6 = Objects_23 | null | undefined;
1326
+ type ThreadMembers = ReadonlyArray<ThreadMemberRef>;
1327
+ type ThreadMembers_1 = ReadonlyArray<ThreadMemberRef>;
1282
1328
  type Union_7 = Objects_24 | null | undefined;
1283
1329
  type Union_24 = Objects_24 | null | undefined;
1284
1330
  type Union_9 = ReadonlyArray<Objects_26> | undefined;
@@ -1655,6 +1701,8 @@ type Objects_191 = {
1655
1701
  };
1656
1702
  type Union_73 = Objects_183 | undefined;
1657
1703
  type Union_60 = Objects_184 | null | undefined;
1704
+ type ThreadMembers_2 = ReadonlyArray<ThreadMemberRef_1>;
1705
+ type ThreadMembers_3 = ReadonlyArray<ThreadMemberRef_1>;
1658
1706
  type Union_61 = Objects_185 | null | undefined;
1659
1707
  type Union_72 = Objects_185 | null | undefined;
1660
1708
  type Union_63 = ReadonlyArray<Objects_187> | undefined;
@@ -2275,6 +2323,7 @@ type Objects_192 = {
2275
2323
  readonly "forkedFrom"?: Objects_182 | null | undefined;
2276
2324
  readonly "presetId"?: string | null | undefined;
2277
2325
  readonly "memberId"?: string | undefined;
2326
+ readonly "members"?: ThreadMembers_2;
2278
2327
  readonly "createdBy"?: Union_61;
2279
2328
  readonly "latestTurn": Union_62;
2280
2329
  readonly "stopRequestedAt"?: string | null;
@@ -2340,6 +2389,7 @@ type Objects_16 = {
2340
2389
  readonly "linkedPullRequest"?: Union_5;
2341
2390
  readonly "origin"?: Union_6;
2342
2391
  readonly "presetId"?: string | null | undefined;
2392
+ readonly "members"?: ThreadMembers;
2343
2393
  readonly "createdBy"?: Union_7;
2344
2394
  readonly "latestTurn": Union_8;
2345
2395
  readonly "stopRequestedAt"?: string | null;
@@ -2393,6 +2443,7 @@ type Objects_34 = {
2393
2443
  readonly "forkedFrom"?: Objects_17 | null | undefined;
2394
2444
  readonly "presetId"?: string | null | undefined;
2395
2445
  readonly "memberId"?: string | undefined;
2446
+ readonly "members"?: ThreadMembers;
2396
2447
  readonly "createdBy"?: Union_7;
2397
2448
  readonly "latestTurn": Union_8;
2398
2449
  readonly "stopRequestedAt"?: string | null;
@@ -3224,6 +3275,7 @@ export type ThreadsHistoryOutput = {
3224
3275
  readonly "forkedFrom"?: Objects_17 | null | undefined;
3225
3276
  readonly "presetId"?: string | null | undefined;
3226
3277
  readonly "memberId"?: string | undefined;
3278
+ readonly "members"?: ThreadMembers_1;
3227
3279
  readonly "createdBy"?: Objects_24 | null | undefined;
3228
3280
  readonly "latestTurn": Objects_25 | null;
3229
3281
  readonly "stopRequestedAt"?: string | null;
@@ -4653,6 +4705,7 @@ export type MachineSettingsConfigGetOutput = {
4653
4705
  readonly "workBoard"?: boolean;
4654
4706
  readonly "groupMessages"?: boolean;
4655
4707
  readonly "machineTasks"?: boolean;
4708
+ readonly "machineLog"?: boolean;
4656
4709
  readonly "tolerantMachineActions"?: boolean;
4657
4710
  readonly "machineAdmissionIdentityCheck"?: boolean;
4658
4711
  readonly "threadTitleRegeneration"?: boolean;
@@ -4733,6 +4786,20 @@ export type MachineSettingsRuntimeHealthGetInput = {};
4733
4786
  export type MachineSettingsRuntimeHealthGetOutput = Objects_85;
4734
4787
  export type MachineSettingsRuntimeInventoryGetInput = {};
4735
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
+ };
4736
4803
  export type MachineSettingsProxiesTestInput = {
4737
4804
  readonly "config": {
4738
4805
  readonly "displayName"?: string;
@@ -7632,6 +7699,7 @@ export type ThreadsListEncodedOutput = {
7632
7699
  readonly "linkedPullRequest"?: Union_59;
7633
7700
  readonly "origin"?: Union_60;
7634
7701
  readonly "presetId"?: string | null | undefined;
7702
+ readonly "members"?: ThreadMembers_2;
7635
7703
  readonly "createdBy"?: Union_61;
7636
7704
  readonly "latestTurn": Union_62;
7637
7705
  readonly "stopRequestedAt"?: string | null;
@@ -7704,6 +7772,7 @@ export type ThreadsHistoryEncodedOutput = {
7704
7772
  readonly "forkedFrom"?: Objects_182 | null | undefined;
7705
7773
  readonly "presetId"?: string | null | undefined;
7706
7774
  readonly "memberId"?: string | undefined;
7775
+ readonly "members"?: ThreadMembers_3;
7707
7776
  readonly "createdBy"?: Objects_185 | null | undefined;
7708
7777
  readonly "latestTurn": Objects_186 | null;
7709
7778
  readonly "stopRequestedAt"?: string | null;
@@ -8368,6 +8437,7 @@ export type MachineSettingsConfigGetEncodedOutput = {
8368
8437
  readonly "workBoard"?: boolean;
8369
8438
  readonly "groupMessages"?: boolean;
8370
8439
  readonly "machineTasks"?: boolean;
8440
+ readonly "machineLog"?: boolean;
8371
8441
  readonly "tolerantMachineActions"?: boolean;
8372
8442
  readonly "machineAdmissionIdentityCheck"?: boolean;
8373
8443
  readonly "threadTitleRegeneration"?: boolean;
@@ -8832,6 +8902,9 @@ export interface PluginDataPorts {
8832
8902
  readonly runtimeInventory: {
8833
8903
  readonly get: (input: MachineSettingsRuntimeInventoryGetInput) => Promise<MachineSettingsRuntimeInventoryGetOutput>;
8834
8904
  };
8905
+ readonly log: {
8906
+ readonly recent: (input: MachineSettingsLogRecentInput) => Promise<MachineSettingsLogRecentOutput>;
8907
+ };
8835
8908
  readonly runtime: {
8836
8909
  readonly control: (input: MachineSettingsRuntimeControlInput) => Promise<MachineSettingsRuntimeControlOutput>;
8837
8910
  readonly upgrade: (input: MachineSettingsRuntimeUpgradeInput) => Promise<MachineSettingsRuntimeUpgradeOutput>;
@@ -9548,6 +9621,10 @@ export interface PluginUiDataReads {
9548
9621
  readonly input: MachineSettingsRuntimeInventoryGetInput;
9549
9622
  readonly output: MachineSettingsRuntimeInventoryGetOutput;
9550
9623
  };
9624
+ readonly "machineSettings.log.recent": {
9625
+ readonly input: MachineSettingsLogRecentInput;
9626
+ readonly output: MachineSettingsLogRecentOutput;
9627
+ };
9551
9628
  readonly "machineSettings.proxies.test": {
9552
9629
  readonly input: MachineSettingsProxiesTestInput;
9553
9630
  readonly output: MachineSettingsProxiesTestOutput;