@ycodium-ai/plugin-api 0.2.4021 → 0.2.4043

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
@@ -61,7 +61,7 @@ import { definePlugin } from "@ycodium-ai/plugin-api";
61
61
 
62
62
  export default definePlugin({
63
63
  id: "my-plugin",
64
- apiVersion: 81,
64
+ apiVersion: 83,
65
65
  activate: (ctx) => {
66
66
  ctx.log.info("hello");
67
67
 
@@ -338,7 +338,11 @@ update against the new types and republish.
338
338
 
339
339
  <!-- plugin-api-versions:start (generated by scripts/gen-plugin-api-version.ts from packages/plugin-api/version-history.json; edit that file) -->
340
340
 
341
- The current API is **81**. This Ycodium loads plugins declaring 76 through 81.
341
+ The current API is **83**. This Ycodium loads plugins declaring 76 through 83.
342
+
343
+ API 83 Adds optional removedMachines records and restoredFromRemovalId to projects.machines.list, an optional addBack removal reference to projects.machines.joinCode.create, and an optional removal receipt to projects.machines.remove. Stale removal references are refused both when issuing and when redeeming the join code; the same guarded reference may recover a lost join response with the original verified device key. Adds optional useMachineAdmission with the machineAddBack UI capability, so plugin forms can read removed and pending state without admission side effects and offer an explicit Add back bound to the currently known removal.
344
+
345
+ API 82 Adds ctx.threads.session.retryCleanup({threadId}), available with the existing thread.session.stop declaration and thread execution scope. It waits up to 10 seconds and returns recovered, already-recovered or blocked with a safe cleanup step code; it never stops a healthy session. Retries recheck current isolation rather than replaying an earlier result.
342
346
 
343
347
  API 81 adds the optional `recovery` to `accountDiscovery` in `projects.machines.list` and the joined-project list: whether the home machine is automatically renewing a rejected Relay credential, waits for the person to sign in again, or has stopped retrying.
344
348
 
@@ -112,6 +112,18 @@ type Objects_13 = {
112
112
  readonly "confirmedAt"?: string;
113
113
  readonly "failedAt"?: string;
114
114
  };
115
+ type ProjectMachineRemoval = {
116
+ readonly "environmentId": string;
117
+ readonly "removalId": string;
118
+ };
119
+ type ProjectMachineRemoval_1 = {
120
+ readonly "environmentId": string;
121
+ readonly "removalId": string;
122
+ };
123
+ type ProjectMachineRemoval_2 = {
124
+ readonly "environmentId": string;
125
+ readonly "removalId": string;
126
+ };
115
127
  type Arrays_2 = ReadonlyArray<string>;
116
128
  type Arrays_3 = ReadonlyArray<"summary" | "runtime">;
117
129
  type Objects_14 = {
@@ -1022,6 +1034,16 @@ type Objects_179 = {
1022
1034
  readonly "sha256"?: string;
1023
1035
  readonly "fileCount"?: number;
1024
1036
  };
1037
+ type SessionCleanupRetryInput = {
1038
+ readonly "threadId": string;
1039
+ };
1040
+ type SessionCleanupRecovered = {
1041
+ readonly "status": "recovered" | "already-recovered";
1042
+ };
1043
+ type SessionCleanupBlocked = {
1044
+ readonly "status": "blocked";
1045
+ readonly "code": "cleanup-exit-unconfirmed" | "cleanup-exit-processing" | "cleanup-stop-commit" | "cleanup-credentials" | "cleanup-session-record" | "cleanup-execution-lease";
1046
+ };
1025
1047
  type Union_56 = {
1026
1048
  readonly "kind": "lucide";
1027
1049
  readonly "name": string;
@@ -1037,6 +1059,10 @@ type Objects_180 = {
1037
1059
  type Objects_181 = {
1038
1060
  readonly "applied": boolean;
1039
1061
  };
1062
+ type ProjectMachineRemoval_3 = {
1063
+ readonly "environmentId": string;
1064
+ readonly "removalId": string;
1065
+ };
1040
1066
  type Objects_182 = {
1041
1067
  readonly "sourceThreadId": string;
1042
1068
  readonly "sourceMessageId": string;
@@ -2905,8 +2931,10 @@ export type ProjectsMachinesListOutput = {
2905
2931
  readonly "keyChangePending"?: boolean;
2906
2932
  readonly "replacementName"?: string;
2907
2933
  readonly "previousLastSeenAt"?: string;
2934
+ readonly "restoredFromRemovalId"?: string;
2908
2935
  }>;
2909
2936
  readonly "removedEnvironmentIds"?: ReadonlyArray<string>;
2937
+ readonly "removedMachines"?: ReadonlyArray<ProjectMachineRemoval>;
2910
2938
  readonly "accountMachines"?: ReadonlyArray<{
2911
2939
  readonly "environmentId": string;
2912
2940
  readonly "name": string;
@@ -2922,6 +2950,7 @@ export type ProjectsMachinesListOutput = {
2922
2950
  export type ProjectsMachinesJoinCodeCreateInput = {
2923
2951
  readonly "projectId": string;
2924
2952
  readonly "automaticEnvironmentId"?: string;
2953
+ readonly "addBack"?: ProjectMachineRemoval_1;
2925
2954
  };
2926
2955
  export type ProjectsMachinesJoinCodeCreateOutput = {
2927
2956
  readonly "code": string;
@@ -2933,6 +2962,7 @@ export type ProjectsMachinesRemoveInput = {
2933
2962
  };
2934
2963
  export type ProjectsMachinesRemoveOutput = {
2935
2964
  readonly "removed": boolean;
2965
+ readonly "removal"?: ProjectMachineRemoval_2;
2936
2966
  };
2937
2967
  export type ProjectsMachinesJoinInput = {
2938
2968
  readonly "homeUrl": string;
@@ -7123,6 +7153,8 @@ export type ThreadsSessionStopInput = {
7123
7153
  readonly "onlyIfNoTurnInFlight"?: boolean;
7124
7154
  };
7125
7155
  export type ThreadsSessionStopOutput = Objects_169;
7156
+ export type ThreadsSessionRetryCleanupInput = SessionCleanupRetryInput;
7157
+ export type ThreadsSessionRetryCleanupOutput = SessionCleanupRecovered | SessionCleanupBlocked;
7126
7158
  export type ApprovalsRespondInput = {
7127
7159
  readonly "requestId"?: string;
7128
7160
  readonly "threadId": string;
@@ -7334,8 +7366,10 @@ export type ProjectsMachinesListEncodedOutput = {
7334
7366
  readonly "keyChangePending"?: boolean;
7335
7367
  readonly "replacementName"?: string;
7336
7368
  readonly "previousLastSeenAt"?: string;
7369
+ readonly "restoredFromRemovalId"?: string;
7337
7370
  }>;
7338
7371
  readonly "removedEnvironmentIds"?: ReadonlyArray<string>;
7372
+ readonly "removedMachines"?: ReadonlyArray<ProjectMachineRemoval_3>;
7339
7373
  readonly "accountMachines"?: ReadonlyArray<{
7340
7374
  readonly "environmentId": string;
7341
7375
  readonly "name": string;
@@ -8659,6 +8693,7 @@ export interface PluginDataPorts {
8659
8693
  };
8660
8694
  readonly session: {
8661
8695
  readonly stop: (input: ThreadsSessionStopInput) => Promise<ThreadsSessionStopOutput>;
8696
+ readonly retryCleanup: (input: ThreadsSessionRetryCleanupInput) => Promise<ThreadsSessionRetryCleanupOutput>;
8662
8697
  };
8663
8698
  };
8664
8699
  readonly projects: {