openpond 0.0.37 → 0.0.38
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 +0 -3
- package/dist/api/types.d.ts +0 -50
- package/dist/api.d.ts +2 -8
- package/dist/chunks/{app-layer-LF2HK2B2.js → app-layer-DPUJRNO2.js} +4 -4
- package/dist/chunks/{apps-ZMCMQZKX.js → apps-AKBI6AS7.js} +4 -124
- package/dist/chunks/{chunk-ZZ4ECDTP.js → chunk-275WCETC.js} +2 -2
- package/dist/chunks/{chunk-LNKYEHIJ.js → chunk-AHNFNWUN.js} +1 -1
- package/dist/chunks/{chunk-WTA33KQQ.js → chunk-AHPQTEIJ.js} +4 -4
- package/dist/chunks/{chunk-3VURZQHA.js → chunk-FWLOFUPU.js} +2 -2
- package/dist/chunks/{chunk-A3CJUBA7.js → chunk-GB6VUZUA.js} +1 -1
- package/dist/chunks/{chunk-2WMGA5FE.js → chunk-GDZYDLEL.js} +1 -1
- package/dist/chunks/{chunk-WL76II47.js → chunk-HS2AGRDV.js} +1 -1
- package/dist/chunks/{chunk-N6E6YSTP.js → chunk-JWF37O5E.js} +1 -1
- package/dist/chunks/{chunk-MHBQWGCL.js → chunk-LZZM3IHS.js} +1 -33
- package/dist/chunks/{chunk-PGET7EZF.js → chunk-MPGSHXGF.js} +3 -3
- package/dist/chunks/{chunk-ICLLW5QD.js → chunk-QRM7XMAO.js} +5 -36
- package/dist/chunks/{chunk-IATK3CIP.js → chunk-SLMP353Q.js} +3 -3
- package/dist/chunks/{chunk-KT2BB4AR.js → chunk-V35STJF4.js} +2 -2
- package/dist/chunks/{chunk-VFL2JVBZ.js → chunk-XCATKTK3.js} +37 -52
- package/dist/chunks/{chunk-ZPL4GZML.js → chunk-XERQHYBO.js} +1 -24
- package/dist/chunks/{chunk-35PPAOWD.js → chunk-YTJL6XPU.js} +2 -2
- package/dist/chunks/{chunk-BWA3COR4.js → chunk-ZI4GDAUB.js} +0 -13
- package/dist/chunks/{cli-AS3DZ7XB.js → cli-2KBVNDRY.js} +6 -6
- package/dist/chunks/{cli-5NFIDCRL.js → cli-7BKDWFNU.js} +4 -4
- package/dist/chunks/{core-commands-7223BEQL.js → core-commands-YN4RMWA3.js} +5 -5
- package/dist/chunks/{extend-6N5S5KA5.js → extend-REGNTBK3.js} +9 -9
- package/dist/chunks/{extension-FJSVCG2Q.js → extension-7K77DAVL.js} +5 -5
- package/dist/chunks/{harness-OMJXIGEW.js → harness-BHQRMXJR.js} +4 -4
- package/dist/chunks/{help-YPPROIS7.js → help-VREQNA4I.js} +1 -1
- package/dist/chunks/{opchat-K7IYFPX6.js → opchat-D63YTNSX.js} +4 -4
- package/dist/chunks/{organizations-W3FMAWQ4.js → organizations-I46KG7TC.js} +5 -5
- package/dist/chunks/{profile-N4B3F7M7.js → profile-WKZJHEPG.js} +8 -8
- package/dist/chunks/{project-agent-NA6SGU25.js → project-agent-ZUC3YMCT.js} +7 -7
- package/dist/chunks/{sandbox-command-AKCFJKKN.js → sandbox-command-AAOPFTI5.js} +5 -5
- package/dist/chunks/{sandbox-template-5NKTAXCL.js → sandbox-template-GKNVR4C5.js} +6 -6
- package/dist/chunks/{src-SCS4KKP4.js → src-MWDIK56B.js} +6 -6
- package/dist/chunks/{src-XAVSQTVR.js → src-RPW5TOPI.js} +2 -2
- package/dist/chunks/{teams-bot-557NZC73.js → teams-bot-PSL3ZO6Z.js} +4 -4
- package/dist/chunks/{workspaces-S2H75XQB.js → workspaces-BPXC2DHT.js} +2 -2
- package/dist/cli.js +10 -10
- package/dist/client-types.d.ts +1 -9
- package/dist/client.d.ts +3 -3
- package/dist/index.js +0 -46
- package/dist/web/assets/{AppDialog-y6krB0MJ.js → AppDialog-DrwJb_wG.js} +1 -1
- package/dist/web/assets/{AppsView-4F6oLktr.js → AppsView-DPagLMsc.js} +1 -1
- package/dist/web/assets/{BrowserSidebar-C0MHQaaD.js → BrowserSidebar-DMn2V8RV.js} +1 -1
- package/dist/web/assets/{CloudWorkView-DwFIZoXy.js → CloudWorkView-Cl_7mM3c.js} +1 -1
- package/dist/web/assets/{CommandMenu-CYGFrMZi.js → CommandMenu-CHMQLez_.js} +1 -1
- package/dist/web/assets/{CommunityView-C6n89YXz.js → CommunityView-DcHVDUk0.js} +1 -1
- package/dist/web/assets/{ComposerCreateImproveStrip-C3RwXC3_.js → ComposerCreateImproveStrip-BZ3Dgzmo.js} +1 -1
- package/dist/web/assets/{GetStartedView-fwD0ZXo9.js → GetStartedView-DTRotFqz.js} +1 -1
- package/dist/web/assets/{LabSkillSidebar-BSuc-NJr.js → LabSkillSidebar-D-PqFe1T.js} +1 -1
- package/dist/web/assets/{LabsRoute-D2y8dSsT.js → LabsRoute-Dew1BwK5.js} +1 -1
- package/dist/web/assets/MainChatThread-BaPxxzrw.js +2 -0
- package/dist/web/assets/{MakeAgentTutorialLearningPanel-Bz2VDaRe.js → MakeAgentTutorialLearningPanel-CBsfnONQ.js} +2 -2
- package/dist/web/assets/{MarkdownText-B6Nu_0Fz.js → MarkdownText-DGLfAM_Z.js} +2 -2
- package/dist/web/assets/Messages-CIX9uTjX.js +10 -0
- package/dist/web/assets/{NativeSkillSidebar-4iUfgwqO.js → NativeSkillSidebar-AP_uHn6g.js} +1 -1
- package/dist/web/assets/{NewProjectDialog-8M5-6-h-.js → NewProjectDialog-C6lHkafU.js} +1 -1
- package/dist/web/assets/{PostTrainingLearningPanel-CdG5KHZs.js → PostTrainingLearningPanel-CZEgPc8O.js} +2 -2
- package/dist/web/assets/{PostTrainingStatusPill-COZ4qISQ.js → PostTrainingStatusPill-CeEpwUDB.js} +1 -1
- package/dist/web/assets/{ProfileSettingsSection-Bo7dybgW.js → ProfileSettingsSection-EumMLlEp.js} +1 -1
- package/dist/web/assets/RightChatPanelStack-MXBcx3zO.js +1 -0
- package/dist/web/assets/SettingsView-Caljbns2.css +1 -0
- package/dist/web/assets/SettingsView-DyURG_Uh.js +6 -0
- package/dist/web/assets/{TeamChatView-CzQYFBap.js → TeamChatView-D3v6aqJ3.js} +2 -2
- package/dist/web/assets/{TerminalOverlay-B56XmI-k.js → TerminalOverlay-BKl0p8pa.js} +1 -1
- package/dist/web/assets/{TrainingCreationPanel-C_ntWAAP.js → TrainingCreationPanel-CfZQTuT5.js} +1 -1
- package/dist/web/assets/{TrainingDraftPanel-3hJIxLNn.js → TrainingDraftPanel-DslRPSDW.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-r3CqRm6Q.js → UsageSettingsSection-zDAwzTGl.js} +1 -1
- package/dist/web/assets/{WorkspaceDiffPanel-By8PWUuE.js → WorkspaceDiffPanel-C_MZPPlL.js} +3 -3
- package/dist/web/assets/{WorkspaceEnvironmentMenu-7wmC-spz.js → WorkspaceEnvironmentMenu-BUAnn80j.js} +1 -1
- package/dist/web/assets/{WorkspaceGitDialogs-Hn--lsRh.js → WorkspaceGitDialogs-Drbf4ujA.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-CHd22UcG.js → WorkspaceMonacoEditor-DPGcG8fy.js} +3 -3
- package/dist/web/assets/{activity-Dp5V58om.js → activity-Dnr3jqb3.js} +1 -1
- package/dist/web/assets/{boxes-DE7WJaEv.js → boxes-BinC8UPn.js} +1 -1
- package/dist/web/assets/{chevron-up-BWx8gGab.js → chevron-up-Bjp_-_Cb.js} +1 -1
- package/dist/web/assets/{circle-x-DnmOfZIg.js → circle-x-ubnvEYuE.js} +1 -1
- package/dist/web/assets/{copy-BjWvaXLC.js → copy-B_ZCCUMz.js} +1 -1
- package/dist/web/assets/{create-pipeline-request-C4V6-lWN.js → create-pipeline-request-D6uLUxe9.js} +3 -3
- package/dist/web/assets/{cssMode-KFDYjM8T.js → cssMode-CKN9CcfG.js} +1 -1
- package/dist/web/assets/{file-BrC1KjAS.js → file-8HAMlTmQ.js} +1 -1
- package/dist/web/assets/{git-branch-DTeeARsp.js → git-branch-l2Zih3Bv.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-C8UFKlXy.js → git-commit-horizontal-Bxi8YPep.js} +1 -1
- package/dist/web/assets/{htmlMode-NbLN3n6Q.js → htmlMode-CeUcNhBZ.js} +1 -1
- package/dist/web/assets/{index-BcZetaeD.css → index-BMFyOFRU.css} +1 -1
- package/dist/web/assets/index-BzwcDzbT.js +1 -0
- package/dist/web/assets/{index-DQalqxbw.js → index-KoQSSt_f.js} +50 -50
- package/dist/web/assets/{info-BXBpMeVU.js → info-JTbDQxHx.js} +1 -1
- package/dist/web/assets/{jsonMode-Bl3r4LM_.js → jsonMode-97z0Yz9u.js} +1 -1
- package/dist/web/assets/{lspLanguageFeatures-DH22w5XD.js → lspLanguageFeatures-D4Tp-JmI.js} +1 -1
- package/dist/web/assets/{make-agent-tutorial-CAnTPFCK.js → make-agent-tutorial-D6nBCgv-.js} +1 -1
- package/dist/web/assets/{monaco.contribution-DK-g-i00.js → monaco.contribution-B3j6oown.js} +2 -2
- package/dist/web/assets/{monaco.contribution-iAurj7TQ.js → monaco.contribution-BXHxPPWL.js} +2 -2
- package/dist/web/assets/{monaco.contribution-C0BsxYAz.js → monaco.contribution-C2P5zIzh.js} +2 -2
- package/dist/web/assets/{monaco.contribution-CzpXjm9j.js → monaco.contribution-C8c6OtGi.js} +2 -2
- package/dist/web/assets/{monitor-Ba2FFblh.js → monitor-kzHtxHnA.js} +1 -1
- package/dist/web/assets/{play-2NDQ4-7K.js → play-C-37dnR1.js} +1 -1
- package/dist/web/assets/{python-CQ0TmUW9.js → python-CGpDXY7_.js} +1 -1
- package/dist/web/assets/{refresh-cw-CyermMsy.js → refresh-cw-BAaaPCXl.js} +1 -1
- package/dist/web/assets/{reply-BSExNLHM.js → reply-9rehU13k.js} +1 -1
- package/dist/web/assets/{rotate-cw-DJ-zYG9E.js → rotate-cw-C1Z_Xs23.js} +1 -1
- package/dist/web/assets/{save-Bij3cc3Q.js → save-Cvxs3XyC.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-CxALivAH.js → toggleHighContrast-CD42jH4g.js} +1 -1
- package/dist/web/assets/{tsMode-vH4lMS7h.js → tsMode-ZROIxEjv.js} +1 -1
- package/dist/web/assets/{upload-DbJfEI3G.js → upload-DvCSGERK.js} +1 -1
- package/dist/web/assets/{wifi-off-BnVFBG28.js → wifi-off-BIb94PkS.js} +1 -1
- package/dist/web/assets/{workers-CBihj7z6.js → workers-oYqbrVYG.js} +1 -1
- package/dist/web/assets/{yaml-Bhkoq1sy.js → yaml-WqBjNgOO.js} +1 -1
- package/dist/web/index.html +2 -2
- package/docs/command-reference.md +1 -1
- package/package.json +1 -1
- package/dist/web/assets/MainChatThread-Dj_Ry6WQ.js +0 -2
- package/dist/web/assets/Messages-CH2wfv2a.js +0 -10
- package/dist/web/assets/RightChatPanelStack-Di8zoHJI.js +0 -1
- package/dist/web/assets/SettingsView-BcYyY66X.css +0 -1
- package/dist/web/assets/SettingsView-CAaKdDHt.js +0 -6
- package/dist/web/assets/credit-card-Bjg0Zaw5.js +0 -1
- package/dist/web/assets/index-DYxF_d9i.js +0 -1
- package/dist/web/tokens/eth.svg +0 -1
- package/dist/web/tokens/usdc.svg +0 -1
package/README.md
CHANGED
|
@@ -69,7 +69,6 @@ openpond apps env set <handle>/<repo> --env '{"OPENTOOL_PUBLIC_HL_SIGNAL_BOT_CON
|
|
|
69
69
|
openpond apps performance [--app-id <id>]
|
|
70
70
|
openpond apps agent create --prompt "Build a daily digest agent"
|
|
71
71
|
openpond apps tools execute <appId> <deploymentId> <tool> --body '{"foo":"bar"}'
|
|
72
|
-
openpond apps positions tx --method GET --params '{"status":"open"}'
|
|
73
72
|
openpond opentool init --dir .
|
|
74
73
|
```
|
|
75
74
|
|
|
@@ -106,7 +105,6 @@ Command reference:
|
|
|
106
105
|
- `openpond apps performance [--app-id <id>]`: fetch performance summary, optionally scoped to an app.
|
|
107
106
|
- `openpond apps agent create --prompt <text> [--template-id <id>]`: create an agent from a prompt (streams deploy logs by default).
|
|
108
107
|
- `openpond apps tools execute <appId> <deploymentId> <tool> [--body <json>] [--method <METHOD>] [--headers <json>]`: execute a tool for a specific deployment.
|
|
109
|
-
- `openpond apps positions tx [--method <GET|POST>] [--body <json>] [--params <json>]`: read or submit positions.
|
|
110
108
|
- `openpond opentool <init|validate|build> [args]`: run OpenTool CLI commands via `npx opentool`.
|
|
111
109
|
|
|
112
110
|
Agent source/edit status:
|
|
@@ -136,7 +134,6 @@ const result = await client.tool.run("handle/repo", "myTool", {
|
|
|
136
134
|
|
|
137
135
|
const apps = await client.apps.list();
|
|
138
136
|
const account = await client.account.get();
|
|
139
|
-
const balance = await client.account.balance();
|
|
140
137
|
const health = await client.account.health();
|
|
141
138
|
const accountTools = await client.apps.tools();
|
|
142
139
|
const performance = await client.apps.performance({ appId: "app_123" });
|
package/dist/api/types.d.ts
CHANGED
|
@@ -186,34 +186,6 @@ export type AppRuntimeSummary = {
|
|
|
186
186
|
error: string | null;
|
|
187
187
|
} | null;
|
|
188
188
|
};
|
|
189
|
-
wallet: {
|
|
190
|
-
personalWalletAddress: string | null;
|
|
191
|
-
operatingWalletAddress: string | null;
|
|
192
|
-
arbitrum: {
|
|
193
|
-
eth: {
|
|
194
|
-
raw: string;
|
|
195
|
-
formatted: string;
|
|
196
|
-
} | null;
|
|
197
|
-
usdc: {
|
|
198
|
-
raw: string;
|
|
199
|
-
formatted: string;
|
|
200
|
-
} | null;
|
|
201
|
-
};
|
|
202
|
-
hyperliquid: {
|
|
203
|
-
mainnet: {
|
|
204
|
-
accountValue: number | null;
|
|
205
|
-
withdrawable: number | null;
|
|
206
|
-
totalMarginUsed: number | null;
|
|
207
|
-
error?: string;
|
|
208
|
-
};
|
|
209
|
-
testnet: {
|
|
210
|
-
accountValue: number | null;
|
|
211
|
-
withdrawable: number | null;
|
|
212
|
-
totalMarginUsed: number | null;
|
|
213
|
-
error?: string;
|
|
214
|
-
};
|
|
215
|
-
};
|
|
216
|
-
};
|
|
217
189
|
asOf: string;
|
|
218
190
|
};
|
|
219
191
|
export type ScheduleExecutionStatus = "success" | "failed" | "timeout" | string;
|
|
@@ -491,7 +463,6 @@ export type OpenPondAccountProduct = {
|
|
|
491
463
|
duration: number | null;
|
|
492
464
|
restrictedModels: string[] | null;
|
|
493
465
|
gatewayEntitlements: unknown | null;
|
|
494
|
-
duckHoldings: number | null;
|
|
495
466
|
isActive: boolean | null;
|
|
496
467
|
};
|
|
497
468
|
export type OpenPondAccount = {
|
|
@@ -501,8 +472,6 @@ export type OpenPondAccount = {
|
|
|
501
472
|
handle: string | null;
|
|
502
473
|
image: string | null;
|
|
503
474
|
timezone: string | null;
|
|
504
|
-
turnkeyWalletAddress: string | null;
|
|
505
|
-
turnkeyOperatingWalletAddress: string | null;
|
|
506
475
|
isAdmin: boolean;
|
|
507
476
|
isVerified: boolean;
|
|
508
477
|
dailyAgentAppId: string | null;
|
|
@@ -514,25 +483,6 @@ export type OpenPondAccountResponse = {
|
|
|
514
483
|
products: OpenPondAccountProduct[];
|
|
515
484
|
asOf: string;
|
|
516
485
|
};
|
|
517
|
-
export type OpenPondAccountBalanceBreakdownItem = {
|
|
518
|
-
wallet: "operating" | "personal" | string;
|
|
519
|
-
chain: string;
|
|
520
|
-
chainId: number | null;
|
|
521
|
-
asset: string;
|
|
522
|
-
amount: string | null;
|
|
523
|
-
usdValue: string | null;
|
|
524
|
-
};
|
|
525
|
-
export type OpenPondAccountBalanceResponse = {
|
|
526
|
-
balanceKind: "openpond_funding" | string;
|
|
527
|
-
balanceUsd: string | null;
|
|
528
|
-
balanceUsdCents: number | null;
|
|
529
|
-
balanceLabel: string;
|
|
530
|
-
currency: "USD" | string;
|
|
531
|
-
asOf: string;
|
|
532
|
-
stale?: boolean;
|
|
533
|
-
credits?: string | null;
|
|
534
|
-
breakdown: OpenPondAccountBalanceBreakdownItem[];
|
|
535
|
-
};
|
|
536
486
|
export type OpenPondApiHealthResponse = {
|
|
537
487
|
status: string;
|
|
538
488
|
service?: string;
|
package/dist/api.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { AgentCreateRequest, AppCodeVisibilityUpdateResponse, AppEnvironmentGetResponse, AppEnvironmentUpdateRequest, AppEnvironmentUpdateResponse, AppExecutionTimelineResponse, AppListItem, AppRuntimeSummary, AppSchedulesResponse, AssistantRunRequest, AssistantRunResponse, BacktestRunRequest, CreateLocalProjectInput, CreateRepoRequest, CreateRepoResponse, HeadlessAppRequest, HeadlessAppsResponse,
|
|
1
|
+
import type { AgentCreateRequest, AppCodeVisibilityUpdateResponse, AppEnvironmentGetResponse, AppEnvironmentUpdateRequest, AppEnvironmentUpdateResponse, AppExecutionTimelineResponse, AppListItem, AppRuntimeSummary, AppSchedulesResponse, AssistantRunRequest, AssistantRunResponse, BacktestRunRequest, CreateLocalProjectInput, CreateRepoRequest, CreateRepoResponse, HeadlessAppRequest, HeadlessAppsResponse, OpenPondAccountResponse, OpenPondApiHealth, OpenToolRecipe, OpenToolRecipeGetRequest, OpenToolRecipeListRequest, OpenToolRecipeListResponse, OpenToolRecipeSearchRequest, OpenToolRecipeSearchResponse, OpenToolRulesGetRequest, OpenToolRulesGetResponse, ScheduleDeleteResponse, ScheduleExecutionLog, ScheduleExecutionLogsResponse, ScheduleRunNowRequest, ScheduleRunNowResponse, ScheduleToggleRequest, ScheduleToggleResult, TemplateBranchesResponse, TemplateDeployLatestRequest, TemplateDeployLatestResponse, TemplateStatusResponse, ToolExecuteRequest, ToolExecuteResponse, ToolManifest } from "./api/types.js";
|
|
2
2
|
import type { ChatRequestBody } from "./types.js";
|
|
3
3
|
export { apiFetch } from "./api/core.js";
|
|
4
4
|
export { commitFiles, deployApp, getDeploymentDetail, getDeploymentLogs, getDeploymentStatus, getLatestDeploymentForApp, promotePreviewToProduction, startAppLifecycle, } from "./api/deployments.js";
|
|
5
|
-
export type { AgentCreateRequest, AppCodeVisibilityUpdateResponse, AppEnvironmentGetResponse, AppEnvironmentUpdateRequest, AppEnvironmentUpdateResponse, AppExecutionDeployment, AppExecutionTimelineResponse, AppExecutionToolRun, AppListItem, AppRuntimeSummary, AppSchedule, AppSchedulesResponse, AppScheduleSummary, AssistantMode, AssistantRunRequest, AssistantRunResponse, BacktestRunRequest, CreateLocalProjectInput, CreateRepoRequest, CreateRepoResponse, DeploymentDetail, DeploymentLogEntry, HeadlessAppRequest, HeadlessAppResponse, HeadlessAppsResponse, OpenPondAccount,
|
|
5
|
+
export type { AgentCreateRequest, AppCodeVisibilityUpdateResponse, AppEnvironmentGetResponse, AppEnvironmentUpdateRequest, AppEnvironmentUpdateResponse, AppExecutionDeployment, AppExecutionTimelineResponse, AppExecutionToolRun, AppListItem, AppRuntimeSummary, AppSchedule, AppSchedulesResponse, AppScheduleSummary, AssistantMode, AssistantRunRequest, AssistantRunResponse, BacktestRunRequest, CreateLocalProjectInput, CreateRepoRequest, CreateRepoResponse, DeploymentDetail, DeploymentLogEntry, HeadlessAppRequest, HeadlessAppResponse, HeadlessAppsResponse, OpenPondAccount, OpenPondAccountProduct, OpenPondAccountResponse, OpenPondApiHealth, OpenPondApiHealthResponse, OpenToolRecipe, OpenToolRecipeDomain, OpenToolRecipeGetRequest, OpenToolRecipeListRequest, OpenToolRecipeListResponse, OpenToolRecipeSearchRequest, OpenToolRecipeSearchResponse, OpenToolRecipeSummary, OpenToolRulesGetRequest, OpenToolRulesGetResponse, PromotePreviewToProductionRequest, PromotePreviewToProductionResponse, ScheduleDeleteResponse, ScheduleExecutionLog, ScheduleExecutionLogsResponse, ScheduleExecutionStatus, ScheduleRunNowRequest, ScheduleRunNowResponse, ScheduleToggleRequest, ScheduleToggleResult, StartAppLifecycleRequest, StartAppLifecycleResponse, TemplateBranchesResponse, TemplateDeployLatestRequest, TemplateDeployLatestResponse, TemplateStatusResponse, ToolExecuteRequest, ToolExecuteResponse, ToolManifest, } from "./api/types.js";
|
|
6
6
|
export declare function listApps(apiBase: string, token: string, options?: {
|
|
7
7
|
handle?: string;
|
|
8
8
|
limit?: number;
|
|
@@ -50,7 +50,6 @@ export declare function getUserPerformance(baseUrl: string, token: string, optio
|
|
|
50
50
|
}): Promise<unknown>;
|
|
51
51
|
export declare function getAppRuntimeSummary(baseUrl: string, token: string, appId: string): Promise<AppRuntimeSummary>;
|
|
52
52
|
export declare function getOpenPondAccount(baseUrl: string, token: string): Promise<OpenPondAccountResponse>;
|
|
53
|
-
export declare function getOpenPondAccountBalance(baseUrl: string, token: string): Promise<OpenPondAccountBalanceResponse>;
|
|
54
53
|
export declare function checkOpenPondApiHealth(baseUrl: string, token?: string | null): Promise<OpenPondApiHealth>;
|
|
55
54
|
export declare function runAssistantMode(baseUrl: string, token: string, payload: AssistantRunRequest): Promise<AssistantRunResponse>;
|
|
56
55
|
export declare function postAgentDigest(baseUrl: string, token: string, body: {
|
|
@@ -73,11 +72,6 @@ export declare function executeUserTool(baseUrl: string, token: string, body: {
|
|
|
73
72
|
data?: unknown;
|
|
74
73
|
error?: string;
|
|
75
74
|
}>;
|
|
76
|
-
export declare function submitPositionsTx(baseUrl: string, token: string, params: {
|
|
77
|
-
method: "GET" | "POST";
|
|
78
|
-
body?: unknown;
|
|
79
|
-
query?: Record<string, string>;
|
|
80
|
-
}): Promise<unknown>;
|
|
81
75
|
export declare function submitBacktestRun(baseUrl: string, token: string, body: BacktestRunRequest): Promise<unknown>;
|
|
82
76
|
export declare function submitBacktestTx(baseUrl: string, token: string, params: {
|
|
83
77
|
method: "GET" | "POST";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
runProcessCommand
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-275WCETC.js";
|
|
5
5
|
import {
|
|
6
6
|
CliUsageError
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-GDZYDLEL.js";
|
|
8
|
+
import "./chunk-XCATKTK3.js";
|
|
9
|
+
import "./chunk-ZI4GDAUB.js";
|
|
10
10
|
import "./chunk-KSRWKXRB.js";
|
|
11
11
|
import "./chunk-MUMPWI4O.js";
|
|
12
12
|
import "./chunk-UACZUFIA.js";
|
|
@@ -10,12 +10,12 @@ import {
|
|
|
10
10
|
normalizeRepoName,
|
|
11
11
|
pollDeploymentLogs,
|
|
12
12
|
resolveAppTarget
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-275WCETC.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveBaseUrl,
|
|
16
16
|
resolvePublicApiBaseUrl
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-GDZYDLEL.js";
|
|
18
|
+
import "./chunk-XCATKTK3.js";
|
|
19
19
|
import {
|
|
20
20
|
createAgentFromPrompt,
|
|
21
21
|
deployApp,
|
|
@@ -27,10 +27,9 @@ import {
|
|
|
27
27
|
runAssistantMode,
|
|
28
28
|
submitBacktestDetail,
|
|
29
29
|
submitBacktestTx,
|
|
30
|
-
submitPositionsTx,
|
|
31
30
|
updateAppCodeVisibility,
|
|
32
31
|
updateAppEnvironment
|
|
33
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-ZI4GDAUB.js";
|
|
34
33
|
import "./chunk-KSRWKXRB.js";
|
|
35
34
|
import {
|
|
36
35
|
parseBooleanOption,
|
|
@@ -325,90 +324,6 @@ async function runAppsDeploy(options, target) {
|
|
|
325
324
|
timeoutMs: options.timeout ? Number(options.timeout) : void 0
|
|
326
325
|
});
|
|
327
326
|
}
|
|
328
|
-
async function runAppsPositionsTx(options) {
|
|
329
|
-
const config = await loadConfig();
|
|
330
|
-
const uiBase = resolveBaseUrl(config);
|
|
331
|
-
const apiKey = await ensureApiKey(config, uiBase);
|
|
332
|
-
const apiBase = resolvePublicApiBaseUrl(config);
|
|
333
|
-
const methodRaw = typeof options.method === "string" ? String(options.method).toUpperCase() : "POST";
|
|
334
|
-
const method = methodRaw === "GET" ? "GET" : "POST";
|
|
335
|
-
if (methodRaw !== "GET" && methodRaw !== "POST") {
|
|
336
|
-
throw new Error("method must be GET or POST");
|
|
337
|
-
}
|
|
338
|
-
let query;
|
|
339
|
-
if (method === "GET" && typeof options.params === "string") {
|
|
340
|
-
const parsed = parseJsonOption(String(options.params), "params");
|
|
341
|
-
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
342
|
-
throw new Error("params must be a JSON object");
|
|
343
|
-
}
|
|
344
|
-
query = {};
|
|
345
|
-
for (const [key, value] of Object.entries(
|
|
346
|
-
parsed
|
|
347
|
-
)) {
|
|
348
|
-
if (value === void 0) continue;
|
|
349
|
-
query[key] = typeof value === "string" ? value : JSON.stringify(value);
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
const body = method === "POST" && typeof options.body === "string" ? parseJsonOption(String(options.body), "body") : void 0;
|
|
353
|
-
const result = await submitPositionsTx(apiBase, apiKey, {
|
|
354
|
-
method,
|
|
355
|
-
body,
|
|
356
|
-
query
|
|
357
|
-
});
|
|
358
|
-
console.log(JSON.stringify(result, null, 2));
|
|
359
|
-
}
|
|
360
|
-
function resolveStoreEventsParams(options) {
|
|
361
|
-
let params = {};
|
|
362
|
-
if (typeof options.params === "string") {
|
|
363
|
-
const parsed = parseJsonOption(String(options.params), "params");
|
|
364
|
-
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
365
|
-
throw new Error("params must be a JSON object");
|
|
366
|
-
}
|
|
367
|
-
for (const [key, value] of Object.entries(
|
|
368
|
-
parsed
|
|
369
|
-
)) {
|
|
370
|
-
if (value === void 0) continue;
|
|
371
|
-
params[key] = typeof value === "string" ? value : JSON.stringify(value);
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
const addParam = (key, value) => {
|
|
375
|
-
if (value === void 0 || value === "") return;
|
|
376
|
-
params[key] = value;
|
|
377
|
-
};
|
|
378
|
-
addParam(
|
|
379
|
-
"source",
|
|
380
|
-
typeof options.source === "string" ? options.source.trim() : void 0
|
|
381
|
-
);
|
|
382
|
-
addParam(
|
|
383
|
-
"walletAddress",
|
|
384
|
-
typeof options.walletAddress === "string" ? options.walletAddress.trim() : void 0
|
|
385
|
-
);
|
|
386
|
-
addParam(
|
|
387
|
-
"symbol",
|
|
388
|
-
typeof options.symbol === "string" ? options.symbol.trim() : void 0
|
|
389
|
-
);
|
|
390
|
-
addParam(
|
|
391
|
-
"cursor",
|
|
392
|
-
typeof options.cursor === "string" ? options.cursor.trim() : void 0
|
|
393
|
-
);
|
|
394
|
-
addParam(
|
|
395
|
-
"status",
|
|
396
|
-
typeof options.status === "string" ? options.status.trim() : void 0
|
|
397
|
-
);
|
|
398
|
-
addParam("since", parseTimeOption(options.since, "since"));
|
|
399
|
-
addParam("until", parseTimeOption(options.until, "until"));
|
|
400
|
-
if (typeof options.limit === "string" && options.limit.trim().length > 0) {
|
|
401
|
-
const parsed = Number.parseInt(options.limit, 10);
|
|
402
|
-
if (!Number.isFinite(parsed)) {
|
|
403
|
-
throw new Error("limit must be a number");
|
|
404
|
-
}
|
|
405
|
-
addParam("limit", String(parsed));
|
|
406
|
-
}
|
|
407
|
-
if (options.history !== void 0) {
|
|
408
|
-
addParam("history", parseBooleanOption(options.history) ? "true" : "false");
|
|
409
|
-
}
|
|
410
|
-
return Object.keys(params).length ? params : void 0;
|
|
411
|
-
}
|
|
412
327
|
function resolveBacktestEventsParams(options) {
|
|
413
328
|
let params = {};
|
|
414
329
|
if (typeof options.params === "string") {
|
|
@@ -431,10 +346,6 @@ function resolveBacktestEventsParams(options) {
|
|
|
431
346
|
"source",
|
|
432
347
|
typeof options.source === "string" ? options.source.trim() : void 0
|
|
433
348
|
);
|
|
434
|
-
addParam(
|
|
435
|
-
"walletAddress",
|
|
436
|
-
typeof options.walletAddress === "string" ? options.walletAddress.trim() : void 0
|
|
437
|
-
);
|
|
438
349
|
addParam(
|
|
439
350
|
"symbol",
|
|
440
351
|
typeof options.symbol === "string" ? options.symbol.trim() : void 0
|
|
@@ -462,18 +373,6 @@ function resolveBacktestEventsParams(options) {
|
|
|
462
373
|
}
|
|
463
374
|
return Object.keys(params).length ? params : void 0;
|
|
464
375
|
}
|
|
465
|
-
async function runAppsStoreEvents(options) {
|
|
466
|
-
const config = await loadConfig();
|
|
467
|
-
const uiBase = resolveBaseUrl(config);
|
|
468
|
-
const apiKey = await ensureApiKey(config, uiBase);
|
|
469
|
-
const apiBase = resolvePublicApiBaseUrl(config);
|
|
470
|
-
const query = resolveStoreEventsParams(options);
|
|
471
|
-
const result = await submitPositionsTx(apiBase, apiKey, {
|
|
472
|
-
method: "GET",
|
|
473
|
-
query
|
|
474
|
-
});
|
|
475
|
-
console.log(JSON.stringify(result, null, 2));
|
|
476
|
-
}
|
|
477
376
|
async function runBacktestEvents(options, target) {
|
|
478
377
|
const config = await loadConfig();
|
|
479
378
|
const uiBase = resolveBaseUrl(config);
|
|
@@ -506,24 +405,8 @@ async function runBacktestGet(options, target) {
|
|
|
506
405
|
});
|
|
507
406
|
console.log(JSON.stringify(result, null, 2));
|
|
508
407
|
}
|
|
509
|
-
async function runAppsTradeFacts(options) {
|
|
510
|
-
const config = await loadConfig();
|
|
511
|
-
const uiBase = resolveBaseUrl(config);
|
|
512
|
-
const apiKey = await ensureApiKey(config, uiBase);
|
|
513
|
-
const apiBase = resolvePublicApiBaseUrl(config);
|
|
514
|
-
const appId = typeof options.appId === "string" ? options.appId : void 0;
|
|
515
|
-
const performance = await getUserPerformance(apiBase, apiKey, { appId });
|
|
516
|
-
if (performance && typeof performance === "object" && "trades" in performance && Array.isArray(performance.trades)) {
|
|
517
|
-
console.log(
|
|
518
|
-
JSON.stringify(performance.trades, null, 2)
|
|
519
|
-
);
|
|
520
|
-
return;
|
|
521
|
-
}
|
|
522
|
-
console.log(JSON.stringify(performance, null, 2));
|
|
523
|
-
}
|
|
524
408
|
export {
|
|
525
409
|
resolveBacktestEventsParams,
|
|
526
|
-
resolveStoreEventsParams,
|
|
527
410
|
runAppsAgentCreate,
|
|
528
411
|
runAppsAssistant,
|
|
529
412
|
runAppsCodeVisibility,
|
|
@@ -532,12 +415,9 @@ export {
|
|
|
532
415
|
runAppsEnvSet,
|
|
533
416
|
runAppsList,
|
|
534
417
|
runAppsPerformance,
|
|
535
|
-
runAppsPositionsTx,
|
|
536
|
-
runAppsStoreEvents,
|
|
537
418
|
runAppsSummary,
|
|
538
419
|
runAppsTools,
|
|
539
420
|
runAppsToolsExecute,
|
|
540
|
-
runAppsTradeFacts,
|
|
541
421
|
runBacktestEvents,
|
|
542
422
|
runBacktestGet
|
|
543
423
|
};
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
mapUiBaseToApiBase,
|
|
4
4
|
resolveBaseUrl,
|
|
5
5
|
resolveSandboxApiUrlOption
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GDZYDLEL.js";
|
|
7
7
|
import {
|
|
8
8
|
DEFAULT_CACHE_TTL_MS,
|
|
9
9
|
SANDBOX_RUNTIME_PROFILE_IDS,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
saveGlobalConfig,
|
|
19
19
|
setCachedApps,
|
|
20
20
|
setCachedTools
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-ZI4GDAUB.js";
|
|
22
22
|
import {
|
|
23
23
|
DEFAULT_OPENPOND_API_BASE_URL,
|
|
24
24
|
DEFAULT_OPENPOND_WEB_BASE_URL
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
now
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HS2AGRDV.js";
|
|
5
5
|
|
|
6
6
|
// ../server/src/workspace/workspace-command.ts
|
|
7
7
|
import { spawn, spawnSync } from "node:child_process";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
resolveRepoUrl,
|
|
16
16
|
runCommand,
|
|
17
17
|
warnOnRepoHostMismatch
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-275WCETC.js";
|
|
19
19
|
import {
|
|
20
20
|
normalizeTemplateRepoUrl,
|
|
21
21
|
resolveApiBaseUrlOption,
|
|
@@ -23,12 +23,12 @@ import {
|
|
|
23
23
|
resolveBaseUrlOption,
|
|
24
24
|
resolveChatApiBaseUrlOption,
|
|
25
25
|
resolvePublicApiBaseUrl
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-GDZYDLEL.js";
|
|
27
27
|
import {
|
|
28
28
|
compareSemver,
|
|
29
29
|
fetchLatestNpmVersion,
|
|
30
30
|
getInstalledCliVersion
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-XCATKTK3.js";
|
|
32
32
|
import {
|
|
33
33
|
checkOpenPondApiHealth,
|
|
34
34
|
createHeadlessApps,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
saveProfileApiKey,
|
|
46
46
|
setActiveProfile,
|
|
47
47
|
submitBacktestRun
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-ZI4GDAUB.js";
|
|
49
49
|
import {
|
|
50
50
|
parseBooleanOption,
|
|
51
51
|
parseJsonOption,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
parseProfileSkillMarkdown
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-V35STJF4.js";
|
|
5
5
|
import {
|
|
6
6
|
openPondConfigDirectory,
|
|
7
7
|
updatePrivateJsonFile
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZI4GDAUB.js";
|
|
9
9
|
|
|
10
10
|
// ../../packages/cloud/src/extensions/extension-manager.ts
|
|
11
11
|
import { createHash as createHash2, randomUUID } from "node:crypto";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
writePrivateJsonFile
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZI4GDAUB.js";
|
|
5
5
|
|
|
6
6
|
// ../../packages/cloud/src/profile/source-upload-cache.ts
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
@@ -3,7 +3,7 @@ import { createRequire as __openpondCreateRequire } from "node:module"; var requ
|
|
|
3
3
|
// ../server/src/constants.ts
|
|
4
4
|
var DEFAULT_HOST = "127.0.0.1";
|
|
5
5
|
var DEFAULT_PORT = 17874;
|
|
6
|
-
var VERSION = "0.0.
|
|
6
|
+
var VERSION = "0.0.38";
|
|
7
7
|
var HOSTED_CHAT_SYSTEM_PROMPT = "You are OpenPond Chat. Respond in the user's language. If the user's latest message is language-neutral, ambiguous, or only a short test, respond in English. Be concise and directly answer the latest request. Do not use emojis. Use Markdown when it improves scanability. If you emit reasoning or thinking content, keep it sparse and user-readable: at most one short sentence for major progress, decisions, or blockers. Omit reasoning for routine searches, reads, tool calls, and obvious next steps. Do not restate the user request, narrate every action, or include code blocks, code excerpts, diffs, raw tool payloads, or markdown examples in reasoning. Put necessary code or exact snippets only in the final assistant answer. When the user asks to show or preview an image that is available as a workspace path or signed image URL, use Markdown image syntax like  instead of a bare path or raw HTML. For workspace-backed answers, use a Codex-style shape: brief outcome first, then Changed Files if files changed, then Verification if checks ran. End with a concise final answer that summarizes the result and verification when relevant. Do not mention raw tool JSON, internal repo paths, or origin/remote URLs unless the user explicitly asks for them or they are necessary to explain a git/deploy failure.";
|
|
8
8
|
var APP_PREFERENCES_CACHE_TYPE = "app_preferences";
|
|
9
9
|
var APP_PREFERENCES_CACHE_KEY = "global";
|
|
@@ -3322,16 +3322,6 @@ async function getOpenPondAccount(baseUrl, token) {
|
|
|
3322
3322
|
}
|
|
3323
3323
|
return await response.json();
|
|
3324
3324
|
}
|
|
3325
|
-
async function getOpenPondAccountBalance(baseUrl, token) {
|
|
3326
|
-
const response = await apiFetch(baseUrl, token, "/account/balance", {
|
|
3327
|
-
method: "GET"
|
|
3328
|
-
});
|
|
3329
|
-
if (!response.ok) {
|
|
3330
|
-
const text5 = await response.text().catch(() => "");
|
|
3331
|
-
throw new Error(`Account balance lookup failed: ${response.status} ${text5}`);
|
|
3332
|
-
}
|
|
3333
|
-
return await response.json();
|
|
3334
|
-
}
|
|
3335
3325
|
async function checkOpenPondApiHealth(baseUrl, token) {
|
|
3336
3326
|
const checkedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
3337
3327
|
const started = Date.now();
|
|
@@ -8803,31 +8793,12 @@ var AccountProfileSchema = external_exports.object({
|
|
|
8803
8793
|
isVerified: external_exports.boolean().nullable(),
|
|
8804
8794
|
dailyAgentAppId: external_exports.string().nullable(),
|
|
8805
8795
|
dailyAgentDeploymentId: external_exports.string().nullable(),
|
|
8806
|
-
credits: external_exports.string().nullable()
|
|
8807
|
-
turnkeyWalletAddress: external_exports.string().nullable(),
|
|
8808
|
-
turnkeyOperatingWalletAddress: external_exports.string().nullable()
|
|
8796
|
+
credits: external_exports.string().nullable()
|
|
8809
8797
|
});
|
|
8810
8798
|
var ActiveProfileSelectorSchema = external_exports.object({
|
|
8811
8799
|
handle: external_exports.string(),
|
|
8812
8800
|
baseUrl: external_exports.string().nullable().optional()
|
|
8813
8801
|
});
|
|
8814
|
-
var AccountBalanceSchema = external_exports.object({
|
|
8815
|
-
balanceKind: external_exports.string(),
|
|
8816
|
-
balanceUsd: external_exports.string().nullable(),
|
|
8817
|
-
balanceUsdCents: external_exports.number().nullable(),
|
|
8818
|
-
currency: external_exports.string(),
|
|
8819
|
-
asOf: external_exports.string(),
|
|
8820
|
-
stale: external_exports.boolean(),
|
|
8821
|
-
error: external_exports.string().nullable(),
|
|
8822
|
-
breakdown: external_exports.array(external_exports.object({
|
|
8823
|
-
wallet: external_exports.string(),
|
|
8824
|
-
chain: external_exports.string(),
|
|
8825
|
-
chainId: external_exports.number().nullable(),
|
|
8826
|
-
asset: external_exports.string(),
|
|
8827
|
-
amount: external_exports.string().nullable(),
|
|
8828
|
-
usdValue: external_exports.string().nullable()
|
|
8829
|
-
}).passthrough())
|
|
8830
|
-
}).passthrough();
|
|
8831
8802
|
var AccountStateSchema = external_exports.object({
|
|
8832
8803
|
state: external_exports.enum(["signed_out", "signed_in", "loading", "switching", "auth_error"]),
|
|
8833
8804
|
activeProfile: ActiveProfileSelectorSchema.nullable(),
|
|
@@ -8838,8 +8809,6 @@ var AccountStateSchema = external_exports.object({
|
|
|
8838
8809
|
baseUrl: external_exports.string().nullable(),
|
|
8839
8810
|
apiBaseUrl: external_exports.string().nullable(),
|
|
8840
8811
|
chatApiBaseUrl: external_exports.string().nullable().optional().default(null),
|
|
8841
|
-
balanceLabel: external_exports.string(),
|
|
8842
|
-
balance: AccountBalanceSchema.nullable().optional().default(null),
|
|
8843
8812
|
creditsLabel: external_exports.string().nullable(),
|
|
8844
8813
|
profile: AccountProfileSchema.nullable(),
|
|
8845
8814
|
products: external_exports.array(AccountProductSchema),
|
|
@@ -12525,7 +12494,6 @@ export {
|
|
|
12525
12494
|
createRepo,
|
|
12526
12495
|
getAppEnvironment,
|
|
12527
12496
|
getOpenPondAccount,
|
|
12528
|
-
getOpenPondAccountBalance,
|
|
12529
12497
|
checkOpenPondApiHealth,
|
|
12530
12498
|
loadGlobalConfig,
|
|
12531
12499
|
listConfiguredProfiles,
|
|
@@ -10,18 +10,18 @@ import {
|
|
|
10
10
|
createImproveActionShapeFromMetadata,
|
|
11
11
|
inferCreateImproveActionShape,
|
|
12
12
|
nextCreateImproveRunRevision
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-XERQHYBO.js";
|
|
14
14
|
import {
|
|
15
15
|
external_exports
|
|
16
16
|
} from "./chunk-WYDVQOBL.js";
|
|
17
17
|
import {
|
|
18
18
|
runShellCommand
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-275WCETC.js";
|
|
20
20
|
import {
|
|
21
21
|
apiFetch,
|
|
22
22
|
loadGlobalConfig,
|
|
23
23
|
readApiJson
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-ZI4GDAUB.js";
|
|
25
25
|
|
|
26
26
|
// src/goal/cli.ts
|
|
27
27
|
import { randomUUID as randomUUID9 } from "node:crypto";
|
|
@@ -9,14 +9,13 @@ import {
|
|
|
9
9
|
createRepo,
|
|
10
10
|
getAppEnvironment,
|
|
11
11
|
getOpenPondAccount,
|
|
12
|
-
getOpenPondAccountBalance,
|
|
13
12
|
listApps,
|
|
14
13
|
listConfiguredProfiles,
|
|
15
14
|
loadGlobalConfig,
|
|
16
15
|
saveConfig,
|
|
17
16
|
saveProfileApiKey,
|
|
18
17
|
setActiveProfile
|
|
19
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-LZZM3IHS.js";
|
|
20
19
|
|
|
21
20
|
// ../../packages/runtime/dist/chat.js
|
|
22
21
|
import { randomUUID } from "node:crypto";
|
|
@@ -253,9 +252,7 @@ function normalizeProfile(response) {
|
|
|
253
252
|
isVerified: account.isVerified ?? null,
|
|
254
253
|
dailyAgentAppId: account.dailyAgentAppId ?? null,
|
|
255
254
|
dailyAgentDeploymentId: account.dailyAgentDeploymentId ?? null,
|
|
256
|
-
credits: account.credits ?? null
|
|
257
|
-
turnkeyWalletAddress: account.turnkeyWalletAddress ?? null,
|
|
258
|
-
turnkeyOperatingWalletAddress: account.turnkeyOperatingWalletAddress ?? null
|
|
255
|
+
credits: account.credits ?? null
|
|
259
256
|
};
|
|
260
257
|
}
|
|
261
258
|
function normalizeProducts(products) {
|
|
@@ -271,35 +268,13 @@ function normalizeProducts(products) {
|
|
|
271
268
|
credits: product.credits ?? null
|
|
272
269
|
}));
|
|
273
270
|
}
|
|
274
|
-
function normalizeBalance(response, error) {
|
|
275
|
-
if (!response)
|
|
276
|
-
return null;
|
|
277
|
-
return {
|
|
278
|
-
balanceKind: response.balanceKind,
|
|
279
|
-
balanceUsd: response.balanceUsd ?? null,
|
|
280
|
-
balanceUsdCents: response.balanceUsdCents ?? null,
|
|
281
|
-
currency: response.currency,
|
|
282
|
-
asOf: response.asOf,
|
|
283
|
-
stale: response.stale ?? Boolean(error),
|
|
284
|
-
error: error ?? null,
|
|
285
|
-
breakdown: (response.breakdown ?? []).map((item) => ({
|
|
286
|
-
wallet: item.wallet,
|
|
287
|
-
chain: item.chain,
|
|
288
|
-
chainId: item.chainId ?? null,
|
|
289
|
-
asset: item.asset,
|
|
290
|
-
amount: item.amount ?? null,
|
|
291
|
-
usdValue: item.usdValue ?? null
|
|
292
|
-
}))
|
|
293
|
-
};
|
|
294
|
-
}
|
|
295
271
|
function isEmptyDefaultProfile(profile) {
|
|
296
272
|
return profile.handle.trim().toLowerCase() === "default" && !normalizeBaseUrl(profile.baseUrl) && !profile.hasApiKey && !profile.hasSessionToken;
|
|
297
273
|
}
|
|
298
274
|
function toAccountState(input) {
|
|
299
|
-
const { config, profiles, account, token, apiBaseUrl, accountResponse,
|
|
275
|
+
const { config, profiles, account, token, apiBaseUrl, accountResponse, accountProfiles, health, authFailed, error } = input;
|
|
300
276
|
const chatApiBaseUrl = resolveHostedChatApiBaseUrl(account, config, apiBaseUrl);
|
|
301
277
|
const profile = normalizeProfile(accountResponse ?? null);
|
|
302
|
-
const balance = normalizeBalance(balanceResponse, balanceError);
|
|
303
278
|
const configActiveProfile = normalizeActiveProfile(config.activeProfile);
|
|
304
279
|
const accountSelector = account ? selectorFromAccount(account) : null;
|
|
305
280
|
const activeSelector = accountSelector ?? configActiveProfile;
|
|
@@ -335,8 +310,6 @@ function toAccountState(input) {
|
|
|
335
310
|
baseUrl,
|
|
336
311
|
apiBaseUrl,
|
|
337
312
|
chatApiBaseUrl,
|
|
338
|
-
balanceLabel: balanceResponse?.balanceLabel ?? "$0.00",
|
|
339
|
-
balance,
|
|
340
313
|
creditsLabel: profile?.credits ?? null,
|
|
341
314
|
profile,
|
|
342
315
|
products: normalizeProducts(accountResponse?.products),
|
|
@@ -890,10 +863,9 @@ async function loadOpenPondApps(options = {}) {
|
|
|
890
863
|
error: "No OpenPond API key or session token is configured."
|
|
891
864
|
};
|
|
892
865
|
}
|
|
893
|
-
const [healthResult, accountResult,
|
|
866
|
+
const [healthResult, accountResult, appsResult, accountProfilesResult] = await Promise.allSettled([
|
|
894
867
|
checkOpenPondApiHealth(context.apiBaseUrl, context.token),
|
|
895
868
|
getOpenPondAccount(context.apiBaseUrl, context.token),
|
|
896
|
-
getOpenPondAccountBalance(context.apiBaseUrl, context.token),
|
|
897
869
|
listApps(context.apiBaseUrl, context.token, {
|
|
898
870
|
handle: context.account?.handle,
|
|
899
871
|
limit: options.limit ?? 20,
|
|
@@ -904,7 +876,6 @@ async function loadOpenPondApps(options = {}) {
|
|
|
904
876
|
]);
|
|
905
877
|
const health = healthResult.status === "fulfilled" ? healthResult.value : null;
|
|
906
878
|
const accountResponse = accountResult.status === "fulfilled" ? accountResult.value : null;
|
|
907
|
-
const balanceResponse = balanceResult.status === "fulfilled" ? balanceResult.value : null;
|
|
908
879
|
const accountProfiles = accountProfilesResult.status === "fulfilled" ? accountProfilesResult.value : {};
|
|
909
880
|
if (accountResult.status === "fulfilled" && context.account) {
|
|
910
881
|
accountProfiles[profileKey(context.account.handle, context.account.baseUrl)] = {
|
|
@@ -924,12 +895,10 @@ async function loadOpenPondApps(options = {}) {
|
|
|
924
895
|
account: toAccountState({
|
|
925
896
|
...context,
|
|
926
897
|
accountResponse,
|
|
927
|
-
balanceResponse,
|
|
928
898
|
accountProfiles,
|
|
929
899
|
health: effectiveHealth,
|
|
930
900
|
authFailed: Boolean(authError),
|
|
931
|
-
error: authError ?? profileError
|
|
932
|
-
balanceError: balanceResult.status === "rejected" ? errorMessage(balanceResult.reason) : null
|
|
901
|
+
error: authError ?? profileError
|
|
933
902
|
}),
|
|
934
903
|
apps: appsResult.status === "fulfilled" ? appsResult.value.map(normalizeApp).filter((value) => Boolean(value)) : [],
|
|
935
904
|
error: appsError
|