@ycodium-ai/plugin-api 0.2.5448 → 0.2.5503

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
@@ -525,6 +525,14 @@ borrower must not kill another borrower's server. Instance disposal must stop ne
525
525
  idle timers; an externally configured server is never owned by this operation. Long-lived conversation
526
526
  sessions continue using the streaming process interface.
527
527
 
528
+ ## Native terminal session import
529
+
530
+ An executor can expose `sessions.scan` and `sessions.readImport` to make its terminal sessions
531
+ available in the import picker. Return the native resume cursor, total counts, and normalized
532
+ messages and activities with stable source IDs and ordering. The host uses these IDs to add
533
+ later records to the same thread when the user reopens it. Forward the read's abort signal to
534
+ the file or CLI operation.
535
+
528
536
  ## Executor session channel tests
529
537
 
530
538
  Each `startSession(input)` receives its own `input.events.emit(event)` channel. Keep that
@@ -653,7 +661,15 @@ No thread, timeout, interruption or restart cancels the call. Guard callbacks st
653
661
 
654
662
  <!-- plugin-api-versions:start (generated by scripts/gen-plugin-api-version.ts from packages/plugin-api/version-history.json; edit that file) -->
655
663
 
656
- The current API is **171**. This Ycodium loads plugins declaring 166 through 171.
664
+ The current API is **173**. This Ycodium loads plugins declaring 166 through 173.
665
+
666
+ API 173 validates native-session references and represents an omitted scan directory by an absent key
667
+
668
+ API 172 adds optional executor sessions.storageKey to identify the effective native history store
669
+
670
+ API 172 adds optional executor `sessions.readImport` for a complete normalized native transcript and its resume cursor
671
+
672
+ API 172 adds generated providers.nativeSessionImports ports for native history scan, import progress and sync
657
673
 
658
674
  API 171 adds optional argumentUsage to plugin MCP tools for checked call examples
659
675
 
@@ -304,7 +304,7 @@ type Union_18 = {
304
304
  } | undefined;
305
305
  type Objects_44 = {
306
306
  readonly "kind": "native-session";
307
- readonly "provider": "claude" | "codex";
307
+ readonly "provider": string;
308
308
  readonly "sessionId": string;
309
309
  readonly "messageId": string;
310
310
  readonly "turnId"?: string | undefined;
@@ -1479,7 +1479,7 @@ type Union_79 = {
1479
1479
  } | undefined;
1480
1480
  type Objects_233 = {
1481
1481
  readonly "kind": "native-session";
1482
- readonly "provider": "claude" | "codex";
1482
+ readonly "provider": string;
1483
1483
  readonly "sessionId": string;
1484
1484
  readonly "messageId": string;
1485
1485
  readonly "turnId"?: string | undefined;
@@ -2647,6 +2647,7 @@ type Objects_223 = {
2647
2647
  readonly "continuationCheck"?: ThreadContinuationCheckOrNull_1;
2648
2648
  };
2649
2649
  type Objects_247 = {
2650
+ readonly "nativeSessionImported"?: true;
2650
2651
  readonly "id": string;
2651
2652
  readonly "projectId": string;
2652
2653
  readonly "title": string;
@@ -2960,6 +2961,7 @@ type ThreadMembersInput = ReadonlyArray<ThreadMemberInput>;
2960
2961
  type ThreadMembersInput_1 = ReadonlyArray<ThreadMemberInput>;
2961
2962
  type Objects_220 = {
2962
2963
  readonly "threadId": string;
2964
+ readonly "nativeSessionImported"?: true;
2963
2965
  readonly "projectId": string;
2964
2966
  readonly "title": string;
2965
2967
  readonly "createdAt": string;
@@ -3023,6 +3025,7 @@ type Objects_27 = {
3023
3025
  readonly "continuationCheck"?: ThreadContinuationCheckOrNull;
3024
3026
  };
3025
3027
  type Objects_66 = {
3028
+ readonly "nativeSessionImported"?: true;
3026
3029
  readonly "id": string;
3027
3030
  readonly "projectId": string;
3028
3031
  readonly "title": string;
@@ -3121,6 +3124,7 @@ type Objects_86 = {
3121
3124
  };
3122
3125
  type Objects_23 = {
3123
3126
  readonly "threadId": string;
3127
+ readonly "nativeSessionImported"?: true;
3124
3128
  readonly "projectId": string;
3125
3129
  readonly "title": string;
3126
3130
  readonly "createdAt": string;
@@ -3144,6 +3148,7 @@ type Objects_23 = {
3144
3148
  };
3145
3149
  type Objects_61 = {
3146
3150
  readonly "threadId": string;
3151
+ readonly "nativeSessionImported"?: true;
3147
3152
  readonly "projectId": string;
3148
3153
  readonly "title": string;
3149
3154
  readonly "createdAt": string;
@@ -4023,6 +4028,7 @@ export type ThreadsListSubscribeOutput = {
4023
4028
  readonly "threads": ReadonlyArray<{
4024
4029
  readonly "threadId": string;
4025
4030
  readonly "status"?: "needs-approval" | "needs-input" | "plan-ready" | "running" | "failed" | "background" | "stopped" | "idle";
4031
+ readonly "nativeSessionImported"?: true;
4026
4032
  readonly "runtime"?: {
4027
4033
  readonly "backgroundLiveness"?: "working" | "monitoring" | null | undefined;
4028
4034
  readonly "backgroundMonitorCount"?: number | undefined;
@@ -5608,6 +5614,77 @@ export type MachineSettingsRuntimeUpgradeOutput = {
5608
5614
  readonly "method": "boot-service" | "respawn";
5609
5615
  readonly "updateId"?: string;
5610
5616
  };
5617
+ export type ProvidersNativeSessionsScanInput = {
5618
+ readonly "projectId": string;
5619
+ readonly "directory"?: string;
5620
+ };
5621
+ export type ProvidersNativeSessionsScanOutput = {
5622
+ readonly "sources": ReadonlyArray<{
5623
+ readonly "instanceId": string;
5624
+ readonly "provider": string;
5625
+ readonly "candidates": ReadonlyArray<{
5626
+ readonly "provider": string;
5627
+ readonly "instanceId": string;
5628
+ readonly "nativeSessionId": string;
5629
+ readonly "title": string | null;
5630
+ readonly "preview": string | null;
5631
+ readonly "model": string | null;
5632
+ readonly "turnCount": number;
5633
+ readonly "updatedAt": number;
5634
+ readonly "cwd": string;
5635
+ readonly "availability": "importable" | "alreadyImported";
5636
+ readonly "openElsewhere": boolean;
5637
+ readonly "importedThreadId"?: string | undefined;
5638
+ }>;
5639
+ readonly "unavailableReason": string | null;
5640
+ }>;
5641
+ readonly "directory": string;
5642
+ };
5643
+ export type ProvidersNativeSessionsImportInput = {
5644
+ readonly "projectId": string;
5645
+ readonly "instanceId": string;
5646
+ readonly "provider": string;
5647
+ readonly "nativeSessionId": string;
5648
+ readonly "cwd": string;
5649
+ readonly "threadId": string;
5650
+ };
5651
+ export type ProvidersNativeSessionsImportOutput = {
5652
+ readonly "_tag": "snapshot";
5653
+ readonly "value": {
5654
+ readonly "threadId": string;
5655
+ readonly "kind": "import_started";
5656
+ readonly "phases": ReadonlyArray<"read" | "create" | "link">;
5657
+ } | {
5658
+ readonly "threadId": string;
5659
+ readonly "kind": "phase_started";
5660
+ readonly "phase": "read" | "create" | "link";
5661
+ } | {
5662
+ readonly "threadId": string;
5663
+ readonly "kind": "session_read";
5664
+ readonly "availableMessages": number;
5665
+ readonly "restoredMessages": number;
5666
+ readonly "availableActivities"?: number | undefined;
5667
+ readonly "restoredActivities"?: number | undefined;
5668
+ } | {
5669
+ readonly "threadId": string;
5670
+ readonly "kind": "import_finished";
5671
+ readonly "restoredMessages": number;
5672
+ readonly "restoredActivities"?: number | undefined;
5673
+ } | {
5674
+ readonly "threadId": string;
5675
+ readonly "kind": "import_failed";
5676
+ readonly "phase": "read" | "create" | "link";
5677
+ readonly "message": string;
5678
+ readonly "threadCreated": boolean;
5679
+ };
5680
+ };
5681
+ export type ProvidersNativeSessionsSyncInput = {
5682
+ readonly "threadId": string;
5683
+ };
5684
+ export type ProvidersNativeSessionsSyncOutput = {
5685
+ readonly "status": "not-imported" | "unchanged" | "synced" | "skipped-active" | "failed";
5686
+ readonly "appended": number;
5687
+ };
5611
5688
  export type ProvidersInstancesListInput = {};
5612
5689
  export type ProvidersInstancesListOutput = ReadonlyArray<{
5613
5690
  readonly "instanceId": string;
@@ -8088,7 +8165,7 @@ export type ThreadsImportInput = {
8088
8165
  };
8089
8166
  readonly "source"?: {
8090
8167
  readonly "kind": "native-session";
8091
- readonly "provider": "claude" | "codex";
8168
+ readonly "provider": string;
8092
8169
  readonly "sessionId": string;
8093
8170
  readonly "messageId": string;
8094
8171
  readonly "turnId"?: string;
@@ -8132,7 +8209,7 @@ export type ThreadsExternalMessagesAppendInput = {
8132
8209
  };
8133
8210
  readonly "source"?: {
8134
8211
  readonly "kind": "native-session";
8135
- readonly "provider": "claude" | "codex";
8212
+ readonly "provider": string;
8136
8213
  readonly "sessionId": string;
8137
8214
  readonly "messageId": string;
8138
8215
  readonly "turnId"?: string;
@@ -8928,6 +9005,7 @@ export type ProjectsMachinesThreadsMessagesListEncodedOutput = Objects_232;
8928
9005
  export type ThreadsListEncodedOutput = {
8929
9006
  readonly "items": ReadonlyArray<{
8930
9007
  readonly "threadId": string;
9008
+ readonly "nativeSessionImported"?: true;
8931
9009
  readonly "projectId": string;
8932
9010
  readonly "title": string;
8933
9011
  readonly "createdAt": string;
@@ -10376,6 +10454,11 @@ export interface PluginDataPorts {
10376
10454
  readonly respond: (input: ApprovalsRespondInput) => Promise<ApprovalsRespondOutput>;
10377
10455
  };
10378
10456
  readonly providers: {
10457
+ readonly nativeSessionImports: {
10458
+ readonly scan: (input: ProvidersNativeSessionsScanInput) => Promise<ProvidersNativeSessionsScanOutput>;
10459
+ readonly import: (input: ProvidersNativeSessionsImportInput, emit: (frame: ProvidersNativeSessionsImportOutput) => void | Promise<void>, signal: AbortSignal) => Promise<void>;
10460
+ readonly sync: (input: ProvidersNativeSessionsSyncInput) => Promise<ProvidersNativeSessionsSyncOutput>;
10461
+ };
10379
10462
  readonly instances: {
10380
10463
  readonly list: (input: ProvidersInstancesListInput) => Promise<ProvidersInstancesListOutput>;
10381
10464
  readonly diagnose: (input: ProvidersInstancesDiagnoseInput) => Promise<ProvidersInstancesDiagnoseOutput>;
@@ -10910,6 +10993,10 @@ export interface PluginUiDataReads {
10910
10993
  readonly input: MachineSettingsProxiesTestInput;
10911
10994
  readonly output: MachineSettingsProxiesTestOutput;
10912
10995
  };
10996
+ readonly "providers.nativeSessions.scan": {
10997
+ readonly input: ProvidersNativeSessionsScanInput;
10998
+ readonly output: ProvidersNativeSessionsScanOutput;
10999
+ };
10913
11000
  readonly "providers.instances.list": {
10914
11001
  readonly input: ProvidersInstancesListInput;
10915
11002
  readonly output: ProvidersInstancesListOutput;