@ycodium-ai/plugin-api 0.2.6027 → 0.2.6072

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.
Files changed (48) hide show
  1. package/README.md +10 -2
  2. package/dist/_private/ycodium-ui-hooks/ProviderSignInChallenge.d.ts +1 -1
  3. package/dist/_private/ycodium-ui-hooks/ProviderSignInChallenge.js +1 -1
  4. package/dist/conversation-queue.d.ts +1 -0
  5. package/dist/conversation-queue.d.ts.map +1 -1
  6. package/dist/conversation.d.ts +31 -44
  7. package/dist/conversation.d.ts.map +1 -1
  8. package/dist/conversation.js.map +1 -1
  9. package/dist/conversationHostModels.d.ts +2 -0
  10. package/dist/conversationHostModels.d.ts.map +1 -1
  11. package/dist/conversationWorkEntry.d.ts +1 -0
  12. package/dist/conversationWorkEntry.d.ts.map +1 -1
  13. package/dist/dataPorts.gen.d.ts +461 -6
  14. package/dist/dataPorts.gen.d.ts.map +1 -1
  15. package/dist/dataPorts.gen.js.map +1 -1
  16. package/dist/entity-names.d.ts +1 -0
  17. package/dist/entity-names.d.ts.map +1 -1
  18. package/dist/executor.d.ts +8 -4
  19. package/dist/executor.d.ts.map +1 -1
  20. package/dist/executor.js.map +1 -1
  21. package/dist/executorCapabilities.d.ts +2 -0
  22. package/dist/executorCapabilities.d.ts.map +1 -1
  23. package/dist/executorCard.d.ts +6 -0
  24. package/dist/executorCard.d.ts.map +1 -1
  25. package/dist/executorCard.js.map +1 -1
  26. package/dist/runtime-maintenance.d.ts +46 -0
  27. package/dist/runtime-maintenance.d.ts.map +1 -1
  28. package/dist/runtime-maintenance.js +317 -31
  29. package/dist/runtime-maintenance.js.map +1 -1
  30. package/dist/source/_private/ycodium-ui-hooks/ProviderSignInChallenge.tsx +21 -20
  31. package/dist/source/conversation-queue.ts +1 -0
  32. package/dist/source/conversation.ts +30 -37
  33. package/dist/source/conversationHostModels.ts +6 -1
  34. package/dist/source/conversationWorkEntry.ts +1 -0
  35. package/dist/source/dataPorts.gen.ts +54 -36
  36. package/dist/source/entity-names.ts +1 -0
  37. package/dist/source/executor.ts +8 -3
  38. package/dist/source/executorCapabilities.ts +2 -0
  39. package/dist/source/executorCard.ts +7 -0
  40. package/dist/source/runtime-maintenance.ts +413 -33
  41. package/dist/source/ui.ts +6 -1
  42. package/dist/source/version.ts +2 -2
  43. package/dist/ui.d.ts +1 -1
  44. package/dist/ui.d.ts.map +1 -1
  45. package/dist/version.d.ts +2 -2
  46. package/dist/version.d.ts.map +1 -1
  47. package/dist/version.js +1 -1
  48. package/package.json +7 -7
@@ -17,7 +17,6 @@
17
17
  *
18
18
  * @module @ycodium-ai/plugin-api/conversation
19
19
  */
20
- import type { PluginUiEntityReference } from "./entity-names.ts";
21
20
  import type { ConversationThreadLoadFailure } from "./conversationLoadFailure.ts";
22
21
  export type { ConversationThreadLoadFailure } from "./conversationLoadFailure.ts";
23
22
  export { CONVERSATION_TRANSCRIPT_VIEW_ID } from "./conversationTranscript.ts";
@@ -67,8 +66,38 @@ import type {
67
66
  ConversationPendingQueueSubmission,
68
67
  ConversationQueueState,
69
68
  } from "./conversation-queue.ts";
69
+ import type { PluginUiEntityReference } from "./entity-names.ts";
70
70
  import type { ConversationWorkEntry } from "./conversationWorkEntry.ts";
71
71
  export type * from "./conversationWorkEntry.ts";
72
+
73
+ export type ConversationToolPresentationInput = Pick<
74
+ ConversationWorkEntry,
75
+ "toolMetadata" | "builtinMcpTool" | "toolArgs"
76
+ >;
77
+
78
+ export interface ConversationToolPresentation {
79
+ readonly origin:
80
+ | { readonly kind: "ycodium"; readonly area: string }
81
+ | {
82
+ readonly kind: "plugin";
83
+ readonly pluginId: string;
84
+ readonly entryId?: string | undefined;
85
+ readonly official: boolean;
86
+ }
87
+ | { readonly kind: "mcp"; readonly server: string }
88
+ | { readonly kind: "skill"; readonly name: string; readonly official: boolean };
89
+ readonly sourceName: string | null;
90
+ readonly declared: boolean;
91
+ readonly title: string;
92
+ readonly summary: string | null;
93
+ readonly entity?: PluginUiEntityReference | null | undefined;
94
+ readonly experienceId?: string | null;
95
+ readonly groupKey: string;
96
+ readonly groupName: string;
97
+ readonly familyKey: string;
98
+ readonly familyName: string;
99
+ readonly sourceLine: string;
100
+ }
72
101
  import type {
73
102
  ConversationSentMessage,
74
103
  ConversationThreadActivity,
@@ -591,42 +620,6 @@ export interface ConversationHostData {
591
620
  /** 异步提问:没关的提问与回答、忽略动作,随活动流变化。卡片画在哪由插件定。 */
592
621
  useQuestions(target: ConversationThreadTarget): ConversationQuestions;
593
622
  }
594
- export type ConversationToolPresentationInput = Pick<
595
- ConversationWorkEntry,
596
- "toolMetadata" | "builtinMcpTool" | "toolArgs"
597
- >;
598
- /** 一条工具调用行的显示(0102)。 */
599
- export interface ConversationToolPresentation {
600
- readonly origin:
601
- | { readonly kind: "ycodium"; readonly area: string }
602
- | { readonly kind: "plugin"; readonly pluginId: string; readonly official: boolean }
603
- | { readonly kind: "mcp"; readonly server: string }
604
- | { readonly kind: "skill"; readonly name: string; readonly official: boolean };
605
- /** 第三方来源的名字(插件名、MCP 服务器名、技能名),排在标题前;Ycodium 自己的为 null。 */
606
- readonly sourceName: string | null;
607
- /**
608
- * 标题与摘要来自声明(宿主功能、插件的 `toolViews`、技能)。false:第三方 MCP 或没有声明的插件工具,
609
- * `title` 只是工具原名、`summary` 为 null,调用方照旧画这一行原来的文字,只在前面加来源。
610
- */
611
- readonly declared: boolean;
612
- readonly title: string;
613
- readonly summary: string | null;
614
- /** 没有文字摘要时画对应实体名原语;旧宿主缺席。 */
615
- readonly entity?: PluginUiEntityReference | null | undefined;
616
- /**
617
- * 摘要是项目里这条经验的标题(读、改经验的工具):用 `useMemoryExperience` 取,同一条只取一次;
618
- * 取不到(已抹掉、没权限、旧机器)就不显示摘要,不显示经验号。旧宿主缺席。
619
- */
620
- readonly experienceId?: string | null;
621
- /** 同一来源的连续调用并成一组时的键与组名(插件显示名、宿主功能区名、服务器名)。 */
622
- readonly groupKey: string;
623
- readonly groupName: string;
624
- /** 更宽一层的键与名字:宿主各功能区同属 Ycodium,一组跨了功能区时组头写它。 */
625
- readonly familyKey: string;
626
- readonly familyName: string;
627
- /** 展开后顶部那一行:完整说明来自哪里。 */
628
- readonly sourceLine: string;
629
- }
630
623
 
631
624
  /** 这一轮现在的状态(宿主原先经时间线 props 传的那几样)。 */
632
625
  export interface ConversationTurnStatus {
@@ -372,7 +372,12 @@ export interface ConversationThreadDecisionCard {
372
372
  | { readonly kind: "host"; readonly feature: string };
373
373
  readonly title: ConversationThreadDecisionText;
374
374
  readonly body: ReadonlyArray<ConversationThreadDecisionText>;
375
- readonly detail: { readonly text: string; readonly language?: string | undefined } | null;
375
+ readonly detail: {
376
+ readonly text: string;
377
+ readonly language?: string | undefined;
378
+ readonly label?: ConversationThreadDecisionText | undefined;
379
+ readonly items?: ReadonlyArray<ConversationThreadDecisionText> | undefined;
380
+ } | null;
376
381
  readonly options: ReadonlyArray<ConversationThreadDecisionOption>;
377
382
  /** null 表示还等人答。 */
378
383
  readonly outcome: string | null;
@@ -54,6 +54,7 @@ export interface ConversationWorkEntry {
54
54
  readonly source: string;
55
55
  readonly toolName?: string | undefined;
56
56
  readonly pluginId?: string | undefined;
57
+ readonly pluginEntryId?: string | undefined;
57
58
  readonly mcpServer?: string | undefined;
58
59
  readonly action?: string | undefined;
59
60
  readonly skillName?: string | undefined;