openpond-code 0.1.0

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.
@@ -0,0 +1,16 @@
1
+ export type LocalConfig = {
2
+ baseUrl?: string;
3
+ apiKey?: string;
4
+ token?: string;
5
+ deviceCode?: string | null;
6
+ appId?: string | null;
7
+ conversationId?: string | null;
8
+ lspEnabled?: boolean;
9
+ executionMode?: "local" | "hosted";
10
+ mode?: "general" | "builder";
11
+ };
12
+ export declare function getConfigPath(): string;
13
+ export declare function loadGlobalConfig(): Promise<LocalConfig>;
14
+ export declare function loadConfig(): Promise<LocalConfig>;
15
+ export declare function saveConfig(next: LocalConfig): Promise<void>;
16
+ export declare function saveGlobalConfig(next: LocalConfig): Promise<void>;
@@ -0,0 +1,154 @@
1
+ import { type AgentCreateRequest, type AppEnvironmentGetResponse, type AppEnvironmentUpdateResponse, type AppListItem, type CreateRepoRequest, type CreateRepoResponse, type DeploymentLogEntry, type TemplateBranchesResponse, type TemplateDeployLatestRequest, type TemplateDeployLatestResponse, type TemplateStatusResponse, type ToolExecuteRequest, type ToolExecuteResponse } from "./api";
2
+ import type { StreamCallbacks } from "./stream";
3
+ export type { StreamCallbacks } from "./stream";
4
+ export type { AgentCreateRequest, AppEnvironmentGetResponse, AppEnvironmentUpdateRequest, AppEnvironmentUpdateResponse, AppListItem, CreateRepoRequest, CreateRepoResponse, DeploymentDetail, DeploymentLogEntry, TemplateBranchesResponse, TemplateDeployLatestRequest, TemplateDeployLatestResponse, TemplateStatusResponse, ToolExecuteRequest, ToolExecuteResponse, } from "./api";
5
+ export type { ChatRequestBody, ResponseItem, ResponseMessageItem, TemplateBootstrap, ToolCallItem, ToolOutputItem, UsageInfo, } from "./types";
6
+ export type { Bar as IndicatorBar, BollingerResult, MacdResult, MaCrossResult, MaCrossSignal, PriceChangeResult, } from "./indicators";
7
+ export { apiFetch, commitFiles, createAgentFromPrompt, createRepo, createHeadlessApps, createLocalProject, deployApp, deployLatestTemplate, getAppEnvironment, updateAppEnvironment, executeHostedTool, executeUserTool, fetchToolManifest, getDeploymentDetail, getDeploymentLogs, getDeploymentStatus, getLatestDeploymentForApp, getTemplateStatus, getUserPerformance, listApps, listTemplateBranches, listUserTools, pollDeviceLogin, postAgentDigest, resolveWorkerBaseUrl, startDeviceLogin, submitPositionsTx, } from "./api";
8
+ export { computeAtr, computeBollinger, computeEma, computeEmaSeries, computeMacd, computeMaCross, computePriceChange, computeRsi, computeSma, computeSmaSeries, } from "./indicators";
9
+ export { DEFAULT_CACHE_TTL_MS, getCachedApps, getCachedTools, setCachedApps, setCachedTools, } from "./cache";
10
+ export { getConfigPath, loadConfig, loadGlobalConfig, saveConfig, saveGlobalConfig, } from "./config";
11
+ export { consumeStream, formatStreamItem, normalizeDataFrames } from "./stream";
12
+ export type OpenPondClientOptions = {
13
+ apiKey?: string;
14
+ baseUrl?: string;
15
+ apiUrl?: string;
16
+ toolUrl?: string;
17
+ cacheTtlMs?: number;
18
+ useCache?: boolean;
19
+ };
20
+ export type ToolSummary = {
21
+ name: string;
22
+ description?: string;
23
+ raw: unknown;
24
+ };
25
+ export type ToolListResult = {
26
+ app: AppListItem;
27
+ deploymentId: string | null;
28
+ tools: ToolSummary[];
29
+ };
30
+ export type DeploymentWatchResult = {
31
+ deploymentId: string;
32
+ status: string | "timeout" | null;
33
+ logs: DeploymentLogEntry[];
34
+ };
35
+ export type AgentCreateStreamCallbacks = StreamCallbacks & {
36
+ onAppId?: (appId: string) => void;
37
+ onDeploymentId?: (deploymentId: string) => void;
38
+ };
39
+ export type AgentCreateStreamResult = {
40
+ conversationId?: string;
41
+ appId?: string;
42
+ deploymentId?: string;
43
+ };
44
+ export type OpenPondClient = {
45
+ baseUrl: string;
46
+ apiUrl: string;
47
+ toolUrl: string;
48
+ apiKey: string;
49
+ tool: {
50
+ list: (target: string, options?: ToolListOptions) => Promise<ToolListResult>;
51
+ run: (target: string, toolName: string, options?: ToolRunOptions) => Promise<ToolExecuteResponse>;
52
+ };
53
+ deploy: {
54
+ watch: (target: string, options?: DeployWatchOptions) => Promise<DeploymentWatchResult>;
55
+ };
56
+ template: {
57
+ status: (target: string, options?: TemplateTargetOptions) => Promise<TemplateStatusResponse>;
58
+ branches: (target: string, options?: TemplateTargetOptions) => Promise<TemplateBranchesResponse>;
59
+ update: (target: string, options?: TemplateUpdateOptions) => Promise<TemplateDeployLatestResponse>;
60
+ };
61
+ apps: {
62
+ list: (options?: AppsListOptions) => Promise<AppListItem[]>;
63
+ tools: (options?: AppsToolsOptions) => Promise<unknown[]>;
64
+ performance: (options?: AppsPerformanceOptions) => Promise<unknown>;
65
+ agentCreate: (input: AgentCreateRequest & {
66
+ refreshCache?: boolean;
67
+ }, callbacks?: AgentCreateStreamCallbacks) => Promise<AgentCreateStreamResult>;
68
+ toolsExecute: (input: ExecuteUserToolOptions) => Promise<ToolExecuteResponse>;
69
+ deploy: (input: AppDeployOptions) => Promise<{
70
+ deploymentId: string;
71
+ }>;
72
+ envGet: (input: AppEnvironmentGetOptions) => Promise<AppEnvironmentGetResponse>;
73
+ envSet: (input: AppEnvironmentSetOptions) => Promise<AppEnvironmentUpdateResponse>;
74
+ positionsTx: (input?: PositionsTxOptions) => Promise<unknown>;
75
+ };
76
+ repo: {
77
+ create: (input: CreateRepoRequest & {
78
+ refreshCache?: boolean;
79
+ }) => Promise<CreateRepoResponse>;
80
+ };
81
+ cache: {
82
+ refresh: () => Promise<void>;
83
+ };
84
+ };
85
+ export type ToolListOptions = {
86
+ branch?: string;
87
+ forceRefresh?: boolean;
88
+ deploymentId?: string;
89
+ };
90
+ export type ToolRunOptions = {
91
+ branch?: string;
92
+ deploymentId?: string;
93
+ method?: ToolExecuteRequest["method"];
94
+ body?: unknown;
95
+ headers?: Record<string, string>;
96
+ forceRefresh?: boolean;
97
+ };
98
+ export type DeployWatchOptions = {
99
+ branch?: string;
100
+ deploymentId?: string;
101
+ intervalMs?: number;
102
+ timeoutMs?: number;
103
+ forceRefresh?: boolean;
104
+ onLog?: (log: DeploymentLogEntry) => void;
105
+ onStatus?: (status: string | null) => void;
106
+ };
107
+ export type TemplateTargetOptions = {
108
+ forceRefresh?: boolean;
109
+ };
110
+ export type TemplateUpdateOptions = {
111
+ environment?: TemplateDeployLatestRequest["environment"];
112
+ forceRefresh?: boolean;
113
+ };
114
+ export type AppsListOptions = {
115
+ handle?: string;
116
+ forceRefresh?: boolean;
117
+ };
118
+ export type AppsToolsOptions = {
119
+ forceRefresh?: boolean;
120
+ };
121
+ export type AppsPerformanceOptions = {
122
+ appId?: string;
123
+ };
124
+ export type ExecuteUserToolOptions = {
125
+ appId: string;
126
+ deploymentId: string;
127
+ toolName: string;
128
+ scheduleId?: string;
129
+ method?: ToolExecuteRequest["method"];
130
+ body?: unknown;
131
+ headers?: Record<string, string>;
132
+ notifyEmail?: boolean;
133
+ };
134
+ export type AppEnvironmentSetOptions = {
135
+ appId: string;
136
+ envVars: Record<string, string>;
137
+ };
138
+ export type AppEnvironmentGetOptions = {
139
+ appId: string;
140
+ };
141
+ export type AppDeployOptions = {
142
+ appId: string;
143
+ environment?: "preview" | "production";
144
+ commitSha?: string;
145
+ branch?: string;
146
+ };
147
+ export type PositionsTxOptions = {
148
+ method?: "GET" | "POST";
149
+ body?: unknown;
150
+ params?: Record<string, unknown>;
151
+ query?: Record<string, string>;
152
+ };
153
+ export declare function consumeAgentCreateStream(response: Response, callbacks?: AgentCreateStreamCallbacks): Promise<AgentCreateStreamResult>;
154
+ export declare function createClient(options: OpenPondClientOptions): OpenPondClient;