@ryuhq/sdk 0.0.5
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/LICENSE +179 -0
- package/README.md +31 -0
- package/dist/agent.cjs +761 -0
- package/dist/agent.d.cts +3 -0
- package/dist/agent.d.ts +3 -0
- package/dist/agent.js +23 -0
- package/dist/chunk-GXHL5CO7.js +353 -0
- package/dist/chunk-KPKMMGVC.js +671 -0
- package/dist/chunk-ODFEUVPW.js +100 -0
- package/dist/cli.cjs +858 -0
- package/dist/cli.d.cts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +454 -0
- package/dist/index-CEbS1SlS.d.cts +988 -0
- package/dist/index-DAxq7Y0R.d.ts +988 -0
- package/dist/index.cjs +1900 -0
- package/dist/index.d.cts +759 -0
- package/dist/index.d.ts +759 -0
- package/dist/index.js +771 -0
- package/dist/manifest.cjs +399 -0
- package/dist/manifest.d.cts +355 -0
- package/dist/manifest.d.ts +355 -0
- package/dist/manifest.js +38 -0
- package/package.json +56 -0
- package/src/agent/agent.ts +208 -0
- package/src/agent/index.ts +51 -0
- package/src/agent/loop.test.ts +261 -0
- package/src/agent/loop.ts +259 -0
- package/src/agent/model-call.ts +190 -0
- package/src/agent/query.ts +40 -0
- package/src/agent/tools.ts +295 -0
- package/src/builder.ts +473 -0
- package/src/cli/dev.test.ts +178 -0
- package/src/cli/dev.ts +425 -0
- package/src/cli.ts +390 -0
- package/src/contracts-lockstep.test.ts +77 -0
- package/src/generated/plugin-manifest.ts +1121 -0
- package/src/index.ts +141 -0
- package/src/manifest.test.ts +610 -0
- package/src/manifest.ts +589 -0
- package/src/mcp/bridge.test.ts +196 -0
- package/src/mcp/client.ts +253 -0
- package/src/mcp/fixture-server.ts +23 -0
- package/src/mcp/server.ts +351 -0
- package/src/model/client.test.ts +107 -0
- package/src/model/client.ts +179 -0
- package/src/model/gateway.ts +41 -0
- package/src/plugin/ryu-plugin.ts +191 -0
- package/src/runnable/agent.ts +338 -0
- package/src/runnable/app.ts +233 -0
- package/src/runnable/index.ts +61 -0
- package/src/runnable/primitives-hostapi.test.ts +73 -0
- package/src/runnable/primitives.test.ts +286 -0
- package/src/runnable/primitives.ts +610 -0
- package/src/runnable/runnable-types.ts +113 -0
- package/src/runnable/runnable.test.ts +397 -0
- package/src/runnable/skill.ts +60 -0
- package/src/runnable/tool.ts +260 -0
- package/src/runnable/turn-hook.test.ts +81 -0
- package/src/runnable/turn-hook.ts +191 -0
- package/src/runnable/workflow.ts +76 -0
package/src/index.ts
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ryuhq/sdk — Ryu developer SDK.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports the manifest types, builder utilities, gateway-mandatory model
|
|
5
|
+
* client, and Runnable authoring API as a single entry point for consumers
|
|
6
|
+
* who import from "@ryuhq/sdk".
|
|
7
|
+
*
|
|
8
|
+
* CLI users run `bunx ryu pack <dir>` via the bin entry in package.json.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
export type {
|
|
12
|
+
AgentConfig,
|
|
13
|
+
AgentEvent,
|
|
14
|
+
AgentTool,
|
|
15
|
+
Endpoint,
|
|
16
|
+
GenerateResult,
|
|
17
|
+
QueryInput,
|
|
18
|
+
QueryOptions,
|
|
19
|
+
RemoteToolRef,
|
|
20
|
+
} from "./agent/index.ts";
|
|
21
|
+
export { Agent, createAgent, query, ryuTool } from "./agent/index.ts";
|
|
22
|
+
export {
|
|
23
|
+
AgentBuilder,
|
|
24
|
+
AppBuilder,
|
|
25
|
+
agent,
|
|
26
|
+
app,
|
|
27
|
+
PluginBuilder,
|
|
28
|
+
SkillBuilder,
|
|
29
|
+
skill,
|
|
30
|
+
ToolBuilder,
|
|
31
|
+
tool,
|
|
32
|
+
WorkflowBuilder,
|
|
33
|
+
workflow,
|
|
34
|
+
} from "./builder.ts";
|
|
35
|
+
export type {
|
|
36
|
+
AppDependency,
|
|
37
|
+
CapabilityReq,
|
|
38
|
+
CompanionSurface,
|
|
39
|
+
Contributes,
|
|
40
|
+
PluginManifest,
|
|
41
|
+
Requires,
|
|
42
|
+
RunnableKind,
|
|
43
|
+
RunnableMeta,
|
|
44
|
+
Surface,
|
|
45
|
+
ToolAppConfig,
|
|
46
|
+
TurnHookContribution,
|
|
47
|
+
WidgetContribution,
|
|
48
|
+
} from "./manifest.ts";
|
|
49
|
+
export {
|
|
50
|
+
AppDependencySchema,
|
|
51
|
+
CapabilityReqSchema,
|
|
52
|
+
CompanionSurfaceSchema,
|
|
53
|
+
coreManifestJsonSchema,
|
|
54
|
+
PluginManifestSchema,
|
|
55
|
+
RequiresSchema,
|
|
56
|
+
RunnableKindSchema,
|
|
57
|
+
RunnableMetaSchema,
|
|
58
|
+
SurfaceSchema,
|
|
59
|
+
ToolAppConfigSchema,
|
|
60
|
+
validateManifestStrict,
|
|
61
|
+
validatePluginId,
|
|
62
|
+
WidgetContributionSchema,
|
|
63
|
+
} from "./manifest.ts";
|
|
64
|
+
export type {
|
|
65
|
+
ChatDelta,
|
|
66
|
+
ChatMessage,
|
|
67
|
+
ChatResult,
|
|
68
|
+
ModelClientOptions,
|
|
69
|
+
} from "./model/client.ts";
|
|
70
|
+
export { defineModel, ModelClient } from "./model/client.ts";
|
|
71
|
+
export {
|
|
72
|
+
assertAllowedEgressUrl,
|
|
73
|
+
DEFAULT_GATEWAY_URL,
|
|
74
|
+
resolveGatewayToken,
|
|
75
|
+
resolveGatewayUrl,
|
|
76
|
+
} from "./model/gateway.ts";
|
|
77
|
+
export type {
|
|
78
|
+
AgentCard,
|
|
79
|
+
AgentManifestOptions,
|
|
80
|
+
AgentOptions,
|
|
81
|
+
AgentRunnable,
|
|
82
|
+
AgentSlots,
|
|
83
|
+
CapabilitySlot,
|
|
84
|
+
ChatSlot,
|
|
85
|
+
} from "./runnable/agent.ts";
|
|
86
|
+
export { defineAgent } from "./runnable/agent.ts";
|
|
87
|
+
export type {
|
|
88
|
+
AppToolSpec,
|
|
89
|
+
DefineAppOptions,
|
|
90
|
+
DefineAppRequires,
|
|
91
|
+
} from "./runnable/app.ts";
|
|
92
|
+
export { appToolId, defineApp } from "./runnable/app.ts";
|
|
93
|
+
export type {
|
|
94
|
+
DurableClient,
|
|
95
|
+
EnginesClient,
|
|
96
|
+
HttpPrimitiveTransportOptions,
|
|
97
|
+
ImageClient,
|
|
98
|
+
MemoryClient,
|
|
99
|
+
MemoryItem,
|
|
100
|
+
PrimitiveBinding,
|
|
101
|
+
PrimitiveTransport,
|
|
102
|
+
RagChunk,
|
|
103
|
+
RagClient,
|
|
104
|
+
RagRerankResult,
|
|
105
|
+
RealtimeClient,
|
|
106
|
+
RealtimeSubscription,
|
|
107
|
+
RyuPrimitives,
|
|
108
|
+
SttClient,
|
|
109
|
+
TtsClient,
|
|
110
|
+
} from "./runnable/primitives.ts";
|
|
111
|
+
export {
|
|
112
|
+
createPrimitives,
|
|
113
|
+
httpPrimitiveTransport,
|
|
114
|
+
PRIMITIVE_BINDINGS,
|
|
115
|
+
} from "./runnable/primitives.ts";
|
|
116
|
+
export type {
|
|
117
|
+
GatewayClient,
|
|
118
|
+
Runnable,
|
|
119
|
+
RunnableContext,
|
|
120
|
+
} from "./runnable/runnable-types.ts";
|
|
121
|
+
export type { SkillOptions } from "./runnable/skill.ts";
|
|
122
|
+
export { defineSkill } from "./runnable/skill.ts";
|
|
123
|
+
export type {
|
|
124
|
+
JsonSchemaProperty,
|
|
125
|
+
ToolOptions,
|
|
126
|
+
ToolRunnable,
|
|
127
|
+
ToolSchema,
|
|
128
|
+
} from "./runnable/tool.ts";
|
|
129
|
+
export { defineTool, inlineToolRunnable } from "./runnable/tool.ts";
|
|
130
|
+
export type {
|
|
131
|
+
DefinePluginOptions,
|
|
132
|
+
DefineTurnHookOptions,
|
|
133
|
+
HookContext,
|
|
134
|
+
HookDirective,
|
|
135
|
+
HookRun,
|
|
136
|
+
HostApi,
|
|
137
|
+
SideModelArgs,
|
|
138
|
+
} from "./runnable/turn-hook.ts";
|
|
139
|
+
export { definePlugin, defineTurnHook } from "./runnable/turn-hook.ts";
|
|
140
|
+
export type { WorkflowOptions, WorkflowStep } from "./runnable/workflow.ts";
|
|
141
|
+
export { defineWorkflow } from "./runnable/workflow.ts";
|