@ycodium-ai/plugin-api 0.2.4005 → 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: 80,
64
+ apiVersion: 83,
65
65
  activate: (ctx) => {
66
66
  ctx.log.info("hello");
67
67
 
@@ -338,7 +338,13 @@ 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 **80**. This Ycodium loads plugins declaring 76 through 80.
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.
346
+
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.
342
348
 
343
349
  API 80 adds the optional `accountDiscovery` to `projects.machines.list` and the joined-project list: the home machine's latest account-machine publication and discovery failure (reason and time), cleared on success, so clients and agents can see why account machines are missing.
344
350
 
@@ -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;
@@ -1180,6 +1206,11 @@ type Union_1 = Objects_2 | Objects_3 | Objects_4;
1180
1206
  type AccountMachineDiscoveryStatus = {
1181
1207
  readonly "publish"?: AccountMachineDiscoveryFailure;
1182
1208
  readonly "discover"?: AccountMachineDiscoveryFailure;
1209
+ readonly "recovery"?: {
1210
+ readonly "state": "reconnecting" | "login_required" | "exhausted" | "unavailable";
1211
+ readonly "attempts"?: number;
1212
+ readonly "nextAttemptAt"?: string;
1213
+ };
1183
1214
  };
1184
1215
  type Objects_12 = {
1185
1216
  readonly "actionId": string;
@@ -2900,8 +2931,10 @@ export type ProjectsMachinesListOutput = {
2900
2931
  readonly "keyChangePending"?: boolean;
2901
2932
  readonly "replacementName"?: string;
2902
2933
  readonly "previousLastSeenAt"?: string;
2934
+ readonly "restoredFromRemovalId"?: string;
2903
2935
  }>;
2904
2936
  readonly "removedEnvironmentIds"?: ReadonlyArray<string>;
2937
+ readonly "removedMachines"?: ReadonlyArray<ProjectMachineRemoval>;
2905
2938
  readonly "accountMachines"?: ReadonlyArray<{
2906
2939
  readonly "environmentId": string;
2907
2940
  readonly "name": string;
@@ -2917,6 +2950,7 @@ export type ProjectsMachinesListOutput = {
2917
2950
  export type ProjectsMachinesJoinCodeCreateInput = {
2918
2951
  readonly "projectId": string;
2919
2952
  readonly "automaticEnvironmentId"?: string;
2953
+ readonly "addBack"?: ProjectMachineRemoval_1;
2920
2954
  };
2921
2955
  export type ProjectsMachinesJoinCodeCreateOutput = {
2922
2956
  readonly "code": string;
@@ -2928,6 +2962,7 @@ export type ProjectsMachinesRemoveInput = {
2928
2962
  };
2929
2963
  export type ProjectsMachinesRemoveOutput = {
2930
2964
  readonly "removed": boolean;
2965
+ readonly "removal"?: ProjectMachineRemoval_2;
2931
2966
  };
2932
2967
  export type ProjectsMachinesJoinInput = {
2933
2968
  readonly "homeUrl": string;
@@ -7118,6 +7153,8 @@ export type ThreadsSessionStopInput = {
7118
7153
  readonly "onlyIfNoTurnInFlight"?: boolean;
7119
7154
  };
7120
7155
  export type ThreadsSessionStopOutput = Objects_169;
7156
+ export type ThreadsSessionRetryCleanupInput = SessionCleanupRetryInput;
7157
+ export type ThreadsSessionRetryCleanupOutput = SessionCleanupRecovered | SessionCleanupBlocked;
7121
7158
  export type ApprovalsRespondInput = {
7122
7159
  readonly "requestId"?: string;
7123
7160
  readonly "threadId": string;
@@ -7329,8 +7366,10 @@ export type ProjectsMachinesListEncodedOutput = {
7329
7366
  readonly "keyChangePending"?: boolean;
7330
7367
  readonly "replacementName"?: string;
7331
7368
  readonly "previousLastSeenAt"?: string;
7369
+ readonly "restoredFromRemovalId"?: string;
7332
7370
  }>;
7333
7371
  readonly "removedEnvironmentIds"?: ReadonlyArray<string>;
7372
+ readonly "removedMachines"?: ReadonlyArray<ProjectMachineRemoval_3>;
7334
7373
  readonly "accountMachines"?: ReadonlyArray<{
7335
7374
  readonly "environmentId": string;
7336
7375
  readonly "name": string;
@@ -8654,6 +8693,7 @@ export interface PluginDataPorts {
8654
8693
  };
8655
8694
  readonly session: {
8656
8695
  readonly stop: (input: ThreadsSessionStopInput) => Promise<ThreadsSessionStopOutput>;
8696
+ readonly retryCleanup: (input: ThreadsSessionRetryCleanupInput) => Promise<ThreadsSessionRetryCleanupOutput>;
8657
8697
  };
8658
8698
  };
8659
8699
  readonly projects: {