xyne-plugin 1.2.26 → 1.2.27

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xyne-plugin",
3
- "version": "1.2.26",
3
+ "version": "1.2.27",
4
4
  "description": "SDK for writing Xyne plugins — define custom tools, hooks, and extensions",
5
5
  "type": "module",
6
6
  "exports": {
package/src/hooks.ts CHANGED
@@ -104,18 +104,6 @@ export interface PluginAgentDef {
104
104
  topP?: number
105
105
  }
106
106
 
107
- // ─── Provider context for chat hooks ────────────────────────────────────────
108
-
109
- /** Provider metadata exposed to plugin hooks. */
110
- export interface ProviderInfo {
111
- id: string
112
- name: string
113
- source: CredentialSource
114
- env: string[]
115
- options: Record<string, unknown>
116
- models: Record<string, { name: string; contextLength: number; maxOutputTokens: number; [key: string]: unknown }>
117
- }
118
-
119
107
  // ─── Plugin function types ───────────────────────────────────────────────────
120
108
 
121
109
  export type PluginInput = {
package/src/index.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  /**
2
2
  * @xyne/plugin — SDK for writing Xyne plugins.
3
3
  *
4
+ * Self-contained — no @tui/agent-core dependency.
5
+ * All types are defined locally in hooks.ts and tool.ts.
6
+ *
4
7
  * @example
5
8
  * ```ts
6
9
  * import { type Plugin, tool, z } from "@xyne/plugin"
@@ -21,12 +24,36 @@
21
24
  * ```
22
25
  */
23
26
 
24
- // Plugin types
25
- export type { PluginFn as Plugin, PluginInput, Hooks, PluginAgentDef, AuthMethod, AuthPrompt, AuthOAuthResult } from "@tui/agent-core"
27
+ // Plugin types (from hooks.ts — self-contained, no workspace imports)
28
+ export type {
29
+ Plugin,
30
+ PluginInput,
31
+ Hooks,
32
+ PluginAgentDef,
33
+ AuthMethod,
34
+ AuthPrompt,
35
+ AuthOAuthResult,
36
+ AuthHook,
37
+ AuthLoaderResult,
38
+ ModelSpec,
39
+ Message,
40
+ CredentialSource,
41
+ ProviderInfo,
42
+ TokenInfo,
43
+ MessageInfo,
44
+ PartInfo,
45
+ } from "./hooks"
26
46
 
27
- // Tool authoring
28
- export { tool } from "@tui/agent-core"
29
- export type { ToolDefinition, ToolContext, ToolAuthConfig, ServiceCredentials, ToolAttachment, PluginToolResult } from "@tui/agent-core"
47
+ // Tool authoring (from tool.ts — self-contained)
48
+ export { tool } from "./tool"
49
+ export type {
50
+ ToolDefinition,
51
+ ToolContext,
52
+ ToolAuthConfig,
53
+ ServiceCredentials,
54
+ ToolAttachment,
55
+ PluginToolResult,
56
+ } from "./tool"
30
57
 
31
58
  // Zod re-export for convenience
32
59
  export { z } from "zod"