@ycodium-ai/plugin-api 0.2.4448 → 0.2.4477

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
@@ -195,14 +195,11 @@ estimate missing durations from messages or token events.
195
195
 
196
196
  - `PluginIcon` (`PluginIconProps` from `@ycodium-ai/plugin-api/ui`) takes `{ name: string; className?: string }` and draws a decorative host-whitelisted icon at font size. Unknown names render nothing.
197
197
 
198
- - `ProjectToolkitSwitch` is a host control with data and dispatch. Its
199
- `ProjectToolkitSwitchProps` (exported from `@ycodium-ai/plugin-api/ui`) accepts only
200
- `environmentId`, `projectId`, and `toolkit` (`board`, `memory`, or `messages`). The plugin places
201
- it; the host reads the switch, supplies the wording, and dispatches as the current person,
202
- because plugins cannot flip these switches themselves. On web and desktop the **Memory**
203
- cell uses the same control. In a mobile plugin WebView without a host connection it renders
204
- nothing. Check that `bridge.ui.ProjectToolkitSwitch` exists before using it; an older host
205
- may not provide it.
198
+ - `bridge.openProjectSettings?.({ environmentId, projectId, section: "agent-tools" })` opens the
199
+ project's **Agent tools** section on web and desktop, selecting the source machine. Omit
200
+ `section` to open the project settings page. The host resolves the project's home machine;
201
+ plugins do not build its route. Mobile has no project settings page and omits this method.
202
+ Project tool switches can only be changed by a person in project settings or through the CLI.
206
203
 
207
204
  A view can also draw the result of one of your own tools in the conversation. Declare it in
208
205
  `ycodium.ui.toolViews` as `{ "tool": "render", "view": "render-result" }`, where `tool` is the
@@ -518,7 +515,11 @@ republish.
518
515
 
519
516
  <!-- plugin-api-versions:start (generated by scripts/gen-plugin-api-version.ts from packages/plugin-api/version-history.json; edit that file) -->
520
517
 
521
- The current API is **117**. This Ycodium loads plugins declaring 111 through 117.
518
+ The current API is **118**. This Ycodium loads only plugins declaring 118.
519
+
520
+ API 118 adds optional `bridge.openProjectSettings({ environmentId, projectId, section })` on web and desktop, and removes the host `ProjectToolkitSwitch` control and its props; project tool switches are managed in project settings
521
+
522
+ API 118 adds the typed ports `ctx.communication.posts.send`, `.withdraw`, `.delete` and `.bind` for the unified post. They are not for plugins yet: a call is refused until the old message ports switch over.
522
523
 
523
524
  API 117 adds `cancelled` to the values of `stages.replied.resolution` on a child session's report: a person or agent answered its approval with cancel. A cancel that came from the session exiting or the provider interrupting the turn stays `expired`. A provider cancelling a question (empty answers or no answer to any asked question) is `expired` too, instead of `answered`.
524
525
 
@@ -1105,6 +1105,39 @@ type DatabaseSpaceStatus = {
1105
1105
  readonly "targetBytes": number;
1106
1106
  readonly "unavailableReason": "not-converted" | "reader" | "no-free-pages" | null;
1107
1107
  };
1108
+ type CommunicationPostReplyInput = {
1109
+ readonly "kind": "post";
1110
+ readonly "id": string;
1111
+ } | {
1112
+ readonly "kind": "record";
1113
+ readonly "id": string;
1114
+ } | {
1115
+ readonly "kind": "comment";
1116
+ readonly "id": string;
1117
+ };
1118
+ type CommunicationPostAttachmentPath = {
1119
+ readonly "path": string;
1120
+ readonly "name"?: string;
1121
+ readonly "mimeType"?: string;
1122
+ };
1123
+ type CommunicationPostAttachmentRef = {
1124
+ readonly "attachmentId": string;
1125
+ readonly "name": string;
1126
+ readonly "mimeType"?: string;
1127
+ readonly "sourcePath"?: string;
1128
+ };
1129
+ type CommunicationPostResult = {
1130
+ readonly "postId": string;
1131
+ };
1132
+ type CommunicationPostChange = {
1133
+ readonly "projectId": string;
1134
+ readonly "requestId"?: string;
1135
+ readonly "postId": string;
1136
+ };
1137
+ type CommunicationPostBindResult = {
1138
+ readonly "postId": string;
1139
+ readonly "targetKey": string;
1140
+ };
1108
1141
  type ProjectMachineRemoval_3 = {
1109
1142
  readonly "environmentId": string;
1110
1143
  readonly "removalId": string;
@@ -1423,6 +1456,21 @@ type Objects_140 = {
1423
1456
  readonly "kind": "human";
1424
1457
  readonly "principal": Union_33;
1425
1458
  };
1459
+ type CommunicationPostRecipientInput = {
1460
+ readonly "kind": "member";
1461
+ readonly "memberId": string;
1462
+ } | {
1463
+ readonly "kind": "person";
1464
+ readonly "person": Union_33;
1465
+ } | {
1466
+ readonly "kind": "thread";
1467
+ readonly "environmentId": string;
1468
+ readonly "threadId": string;
1469
+ } | {
1470
+ readonly "kind": "principal";
1471
+ readonly "principalId": string;
1472
+ readonly "memberId"?: string;
1473
+ };
1426
1474
  type Objects_126 = {
1427
1475
  readonly "kind": "human";
1428
1476
  readonly "principal": Union_34;
@@ -1886,6 +1934,21 @@ type Arrays_10 = ReadonlyArray<{
1886
1934
  } | null;
1887
1935
  };
1888
1936
  }>;
1937
+ type CommunicationPostAddressInput = {
1938
+ readonly "workItemId": string;
1939
+ } | {
1940
+ readonly "threadId": string;
1941
+ } | Objects_63 | {
1942
+ readonly "principalId": string;
1943
+ readonly "memberId"?: string;
1944
+ } | {
1945
+ readonly "group": {
1946
+ readonly "threadId": string;
1947
+ };
1948
+ };
1949
+ type CommunicationPostBindParticipantInput = {
1950
+ readonly "threadId": string;
1951
+ } | Objects_63 | Objects_64;
1889
1952
  type Union_50 = Objects_140 | Objects_141 | Objects_142 | {
1890
1953
  readonly "kind": "member";
1891
1954
  readonly "memberId": string;
@@ -7612,6 +7675,45 @@ export type MachineSettingsDatabaseSpaceStartInput = DatabaseSpaceInput;
7612
7675
  export type MachineSettingsDatabaseSpaceStartOutput = DatabaseSpaceStatus;
7613
7676
  export type MachineSettingsDatabaseSpaceStopInput = DatabaseSpaceInput;
7614
7677
  export type MachineSettingsDatabaseSpaceStopOutput = DatabaseSpaceStatus;
7678
+ export type CommunicationPostsSendInput = {
7679
+ readonly "projectId": string;
7680
+ readonly "requestId"?: string;
7681
+ readonly "to": CommunicationPostAddressInput;
7682
+ readonly "text": string;
7683
+ readonly "replyTo"?: CommunicationPostReplyInput;
7684
+ readonly "delivery"?: "quiet" | "wake" | "steer";
7685
+ readonly "mentions"?: ReadonlyArray<CommunicationPostRecipientInput>;
7686
+ readonly "attachments"?: ReadonlyArray<CommunicationPostAttachmentPath | CommunicationPostAttachmentRef>;
7687
+ };
7688
+ export type CommunicationPostsSendOutput = {
7689
+ readonly "sequence": number;
7690
+ readonly "result": CommunicationPostResult;
7691
+ readonly "replayed"?: boolean;
7692
+ };
7693
+ export type CommunicationPostsWithdrawInput = CommunicationPostChange;
7694
+ export type CommunicationPostsWithdrawOutput = {
7695
+ readonly "sequence": number;
7696
+ readonly "result": CommunicationPostResult;
7697
+ readonly "replayed"?: boolean;
7698
+ };
7699
+ export type CommunicationPostsDeleteInput = CommunicationPostChange;
7700
+ export type CommunicationPostsDeleteOutput = {
7701
+ readonly "sequence": number;
7702
+ readonly "result": CommunicationPostResult;
7703
+ readonly "replayed"?: boolean;
7704
+ };
7705
+ export type CommunicationPostsBindInput = {
7706
+ readonly "projectId": string;
7707
+ readonly "requestId"?: string;
7708
+ readonly "postId": string;
7709
+ readonly "targetKey": string;
7710
+ readonly "to": CommunicationPostBindParticipantInput;
7711
+ };
7712
+ export type CommunicationPostsBindOutput = {
7713
+ readonly "sequence": number;
7714
+ readonly "result": CommunicationPostBindResult;
7715
+ readonly "replayed"?: boolean;
7716
+ };
7615
7717
  export type ProjectsMachinesListEncodedOutput = {
7616
7718
  readonly "accountDiscovery"?: AccountMachineDiscoveryStatus;
7617
7719
  readonly "items": ReadonlyArray<{
@@ -8849,6 +8951,12 @@ export interface PluginDataPorts {
8849
8951
  readonly bind: (input: CommunicationDeliveriesBindInput) => Promise<CommunicationDeliveriesBindOutput>;
8850
8952
  readonly listUnbound: (input: CommunicationDeliveriesListUnboundInput) => Promise<CommunicationDeliveriesListUnboundOutput>;
8851
8953
  };
8954
+ readonly posts: {
8955
+ readonly send: (input: CommunicationPostsSendInput) => Promise<CommunicationPostsSendOutput>;
8956
+ readonly withdraw: (input: CommunicationPostsWithdrawInput) => Promise<CommunicationPostsWithdrawOutput>;
8957
+ readonly delete: (input: CommunicationPostsDeleteInput) => Promise<CommunicationPostsDeleteOutput>;
8958
+ readonly bind: (input: CommunicationPostsBindInput) => Promise<CommunicationPostsBindOutput>;
8959
+ };
8852
8960
  };
8853
8961
  readonly machineSettings: {
8854
8962
  readonly browser: {