@parall/daemon 1.84.0 → 1.85.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.
- package/bundle/manifest.json +11 -11
- package/bundle/parall-browser-pod.js +173 -110
- package/bundle/parall-claude-agent.js +182 -114
- package/bundle/parall-codex-agent.js +182 -114
- package/bundle/parall-daemon.js +218 -111
- package/package.json +6 -6
package/bundle/parall-daemon.js
CHANGED
|
@@ -127,6 +127,20 @@ var init_attention_types = __esm({
|
|
|
127
127
|
}
|
|
128
128
|
});
|
|
129
129
|
|
|
130
|
+
// ts/sdk/dist/billing-types.js
|
|
131
|
+
function refusedAccountOf(err) {
|
|
132
|
+
const e = err;
|
|
133
|
+
if (e?.code !== "INSUFFICIENT_CREDITS")
|
|
134
|
+
return null;
|
|
135
|
+
const account = e.extras?.details?.account;
|
|
136
|
+
return typeof account?.id === "string" && typeof account.display_name === "string" ? account : null;
|
|
137
|
+
}
|
|
138
|
+
var init_billing_types = __esm({
|
|
139
|
+
"ts/sdk/dist/billing-types.js"() {
|
|
140
|
+
"use strict";
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
|
|
130
144
|
// ts/sdk/dist/browser-use.js
|
|
131
145
|
function isBrowserUseEnabled(flags) {
|
|
132
146
|
return flags?.[BROWSER_USE_FEATURE_FLAG] === true;
|
|
@@ -624,6 +638,51 @@ var init_wechat_endpoints = __esm({
|
|
|
624
638
|
}
|
|
625
639
|
});
|
|
626
640
|
|
|
641
|
+
// ts/sdk/dist/billing-endpoints.js
|
|
642
|
+
function billingEndpoints(apiBase) {
|
|
643
|
+
const billingBase = (orgId, accountId) => accountId ? `${apiBase}/orgs/${orgId}/billing/accounts/${accountId}` : `${apiBase}/orgs/${orgId}/billing`;
|
|
644
|
+
return {
|
|
645
|
+
// Billing & Credits (org-scoped). An account's endpoints live under
|
|
646
|
+
// /billing/accounts/{accountId}; without an accountId they are the org's
|
|
647
|
+
// own account's /billing routes.
|
|
648
|
+
BILLING: (orgId, accountId) => billingBase(orgId, accountId),
|
|
649
|
+
BILLING_TRANSACTIONS: (orgId, accountId) => `${billingBase(orgId, accountId)}/transactions`,
|
|
650
|
+
BILLING_CHECKOUT: (orgId, accountId) => `${billingBase(orgId, accountId)}/checkout`,
|
|
651
|
+
BILLING_AUTO_RELOAD: (orgId, accountId) => `${billingBase(orgId, accountId)}/auto-reload`,
|
|
652
|
+
BILLING_SETUP_INTENT: (orgId, accountId) => `${billingBase(orgId, accountId)}/setup-intent`,
|
|
653
|
+
BILLING_PORTAL_SESSION: (orgId, accountId) => `${billingBase(orgId, accountId)}/portal-session`,
|
|
654
|
+
BILLING_USAGE_DAILY: (orgId, accountId) => `${billingBase(orgId, accountId)}/usage-daily`,
|
|
655
|
+
BILLING_USAGE_HEATMAP: (orgId, accountId) => `${billingBase(orgId, accountId)}/usage-heatmap`,
|
|
656
|
+
BILLING_ACCOUNTS: (orgId) => `${apiBase}/orgs/${orgId}/billing/accounts`,
|
|
657
|
+
BILLING_ACCOUNT_CLOSE: (orgId, accountId) => `${apiBase}/orgs/${orgId}/billing/accounts/${accountId}/close`,
|
|
658
|
+
BILLING_SETTINGS: (orgId) => `${apiBase}/orgs/${orgId}/billing/settings`,
|
|
659
|
+
COMPUTE_PRICING: () => `${apiBase}/billing/compute-pricing`
|
|
660
|
+
};
|
|
661
|
+
}
|
|
662
|
+
var init_billing_endpoints = __esm({
|
|
663
|
+
"ts/sdk/dist/billing-endpoints.js"() {
|
|
664
|
+
"use strict";
|
|
665
|
+
}
|
|
666
|
+
});
|
|
667
|
+
|
|
668
|
+
// ts/sdk/dist/team-endpoints.js
|
|
669
|
+
function teamEndpoints(apiBase) {
|
|
670
|
+
return {
|
|
671
|
+
TEAMS: (orgId) => `${apiBase}/orgs/${orgId}/teams`,
|
|
672
|
+
TEAM: (orgId, teamId) => `${apiBase}/orgs/${orgId}/teams/${teamId}`,
|
|
673
|
+
TEAM_PARENT: (orgId, teamId) => `${apiBase}/orgs/${orgId}/teams/${teamId}/parent`,
|
|
674
|
+
TEAM_MEMBERS: (orgId, teamId) => `${apiBase}/orgs/${orgId}/teams/${teamId}/members`,
|
|
675
|
+
TEAM_MEMBER: (orgId, teamId, userId) => `${apiBase}/orgs/${orgId}/teams/${teamId}/members/${userId}`,
|
|
676
|
+
/** An agent's owning Team (agent-team-attribution-design.md §5.4). */
|
|
677
|
+
AGENT_OWNING_TEAM: (orgId, agentId) => `${apiBase}/orgs/${orgId}/agents/${agentId}/owning-team`
|
|
678
|
+
};
|
|
679
|
+
}
|
|
680
|
+
var init_team_endpoints = __esm({
|
|
681
|
+
"ts/sdk/dist/team-endpoints.js"() {
|
|
682
|
+
"use strict";
|
|
683
|
+
}
|
|
684
|
+
});
|
|
685
|
+
|
|
627
686
|
// ts/sdk/dist/constants.js
|
|
628
687
|
function isPlatformModelSelectableForRuntime(model, runtime) {
|
|
629
688
|
if (!model.upstream_id)
|
|
@@ -680,6 +739,8 @@ var init_constants = __esm({
|
|
|
680
739
|
init_slack_endpoints();
|
|
681
740
|
init_chat_team_grant_endpoints();
|
|
682
741
|
init_wechat_endpoints();
|
|
742
|
+
init_billing_endpoints();
|
|
743
|
+
init_team_endpoints();
|
|
683
744
|
API_BASE2 = "/api/v1";
|
|
684
745
|
WIKI_BASE = "/wiki/v1";
|
|
685
746
|
CLIP_BASE = "/clip/v1";
|
|
@@ -984,11 +1045,7 @@ var init_constants = __esm({
|
|
|
984
1045
|
ORG: (orgId) => `${API_BASE2}/orgs/${orgId}`,
|
|
985
1046
|
ORG_MEMBERS: (orgId) => `${API_BASE2}/orgs/${orgId}/members`,
|
|
986
1047
|
ORG_MEMBERS_FORMER: (orgId) => `${API_BASE2}/orgs/${orgId}/members/former`,
|
|
987
|
-
|
|
988
|
-
TEAM: (orgId, teamId) => `${API_BASE2}/orgs/${orgId}/teams/${teamId}`,
|
|
989
|
-
TEAM_PARENT: (orgId, teamId) => `${API_BASE2}/orgs/${orgId}/teams/${teamId}/parent`,
|
|
990
|
-
TEAM_MEMBERS: (orgId, teamId) => `${API_BASE2}/orgs/${orgId}/teams/${teamId}/members`,
|
|
991
|
-
TEAM_MEMBER: (orgId, teamId, userId) => `${API_BASE2}/orgs/${orgId}/teams/${teamId}/members/${userId}`,
|
|
1048
|
+
...teamEndpoints(API_BASE2),
|
|
992
1049
|
ORG_MEMBERS_ONLINE: (orgId) => `${API_BASE2}/orgs/${orgId}/members/online`,
|
|
993
1050
|
LLM_PROVIDERS: (orgId) => `${API_BASE2}/orgs/${orgId}/llm-providers`,
|
|
994
1051
|
LLM_PROVIDER: (orgId, providerId) => `${API_BASE2}/orgs/${orgId}/llm-providers/${providerId}`,
|
|
@@ -1449,16 +1506,7 @@ var init_constants = __esm({
|
|
|
1449
1506
|
CLIP_DEPENDENCIES_CHECK: (orgId) => `${API_BASE2}/orgs/${orgId}/clip-dependencies/check`,
|
|
1450
1507
|
// Onboarding wizard progress (org-scoped, self)
|
|
1451
1508
|
ONBOARDING_PROGRESS: (orgId) => `${API_BASE2}/orgs/${orgId}/onboarding`,
|
|
1452
|
-
|
|
1453
|
-
BILLING: (orgId) => `${API_BASE2}/orgs/${orgId}/billing`,
|
|
1454
|
-
BILLING_TRANSACTIONS: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/transactions`,
|
|
1455
|
-
BILLING_CHECKOUT: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/checkout`,
|
|
1456
|
-
BILLING_AUTO_RELOAD: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/auto-reload`,
|
|
1457
|
-
BILLING_SETUP_INTENT: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/setup-intent`,
|
|
1458
|
-
BILLING_PORTAL_SESSION: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/portal-session`,
|
|
1459
|
-
BILLING_USAGE_DAILY: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/usage-daily`,
|
|
1460
|
-
BILLING_USAGE_HEATMAP: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/usage-heatmap`,
|
|
1461
|
-
COMPUTE_PRICING: () => `${API_BASE2}/billing/compute-pricing`,
|
|
1509
|
+
...billingEndpoints(API_BASE2),
|
|
1462
1510
|
// Runtime capability table (public, no auth) — SSOT for the create/settings
|
|
1463
1511
|
// interlock: per-runtime compute modes, native model family, cross-family
|
|
1464
1512
|
// availability, and recommended model.
|
|
@@ -3081,6 +3129,157 @@ var init_agent_caller_scope_client = __esm({
|
|
|
3081
3129
|
}
|
|
3082
3130
|
});
|
|
3083
3131
|
|
|
3132
|
+
// ts/sdk/dist/agent-owning-team-client.js
|
|
3133
|
+
var AgentOwningTeamClient;
|
|
3134
|
+
var init_agent_owning_team_client = __esm({
|
|
3135
|
+
"ts/sdk/dist/agent-owning-team-client.js"() {
|
|
3136
|
+
"use strict";
|
|
3137
|
+
init_agent_caller_scope_client();
|
|
3138
|
+
init_constants();
|
|
3139
|
+
AgentOwningTeamClient = class extends AgentCallerScopeClient {
|
|
3140
|
+
/**
|
|
3141
|
+
* Moves the agent to another Team, or to the organization with `team_id`
|
|
3142
|
+
* null. Pass the Team you saw as `expected_team_id`: someone else's change
|
|
3143
|
+
* in between answers 409 OWNING_TEAM_CHANGED.
|
|
3144
|
+
*/
|
|
3145
|
+
async setAgentOwningTeam(orgId, agentId, req) {
|
|
3146
|
+
return this.request("PUT", ENDPOINTS.AGENT_OWNING_TEAM(orgId, agentId), req);
|
|
3147
|
+
}
|
|
3148
|
+
};
|
|
3149
|
+
}
|
|
3150
|
+
});
|
|
3151
|
+
|
|
3152
|
+
// ts/sdk/dist/billing-client.js
|
|
3153
|
+
var BillingClient;
|
|
3154
|
+
var init_billing_client = __esm({
|
|
3155
|
+
"ts/sdk/dist/billing-client.js"() {
|
|
3156
|
+
"use strict";
|
|
3157
|
+
init_agent_owning_team_client();
|
|
3158
|
+
init_constants();
|
|
3159
|
+
BillingClient = class extends AgentOwningTeamClient {
|
|
3160
|
+
// ---- Billing & Credits (org-scoped) ----
|
|
3161
|
+
//
|
|
3162
|
+
// Every account method takes an optional trailing accountId: omitted, it
|
|
3163
|
+
// acts on the org's own account through the org's /billing routes; given,
|
|
3164
|
+
// on that account under /billing/accounts/{accountId}.
|
|
3165
|
+
async getBilling(orgId, accountId) {
|
|
3166
|
+
return this.request("GET", ENDPOINTS.BILLING(orgId, accountId));
|
|
3167
|
+
}
|
|
3168
|
+
async getUsageDaily(orgId, opts, accountId) {
|
|
3169
|
+
const params = new URLSearchParams();
|
|
3170
|
+
params.set("start_date", opts.start_date);
|
|
3171
|
+
params.set("end_date", opts.end_date);
|
|
3172
|
+
return this.request("GET", `${ENDPOINTS.BILLING_USAGE_DAILY(orgId, accountId)}?${params}`);
|
|
3173
|
+
}
|
|
3174
|
+
async getUsageHeatmap(orgId, opts, accountId) {
|
|
3175
|
+
const params = new URLSearchParams();
|
|
3176
|
+
params.set("start_time", opts.start_time);
|
|
3177
|
+
if (opts.limit != null)
|
|
3178
|
+
params.set("limit", String(opts.limit));
|
|
3179
|
+
if (opts.offset != null)
|
|
3180
|
+
params.set("offset", String(opts.offset));
|
|
3181
|
+
return this.request("GET", `${ENDPOINTS.BILLING_USAGE_HEATMAP(orgId, accountId)}?${params}`);
|
|
3182
|
+
}
|
|
3183
|
+
async listBillingTransactions(orgId, opts, accountId) {
|
|
3184
|
+
const params = new URLSearchParams();
|
|
3185
|
+
if (opts?.cursor)
|
|
3186
|
+
params.set("cursor", opts.cursor);
|
|
3187
|
+
if (opts?.limit)
|
|
3188
|
+
params.set("limit", String(opts.limit));
|
|
3189
|
+
if (opts?.types?.length)
|
|
3190
|
+
params.set("types", opts.types.join(","));
|
|
3191
|
+
if (opts?.user_id)
|
|
3192
|
+
params.set("user_id", opts.user_id);
|
|
3193
|
+
if (opts?.unresolved_actor)
|
|
3194
|
+
params.set("unresolved_actor", "true");
|
|
3195
|
+
if (opts?.machine_id)
|
|
3196
|
+
params.set("machine_id", opts.machine_id);
|
|
3197
|
+
if (opts?.unresolved_machine)
|
|
3198
|
+
params.set("unresolved_machine", "true");
|
|
3199
|
+
if (opts?.from)
|
|
3200
|
+
params.set("from", opts.from);
|
|
3201
|
+
if (opts?.to)
|
|
3202
|
+
params.set("to", opts.to);
|
|
3203
|
+
const qs = params.toString();
|
|
3204
|
+
return this.request("GET", `${ENDPOINTS.BILLING_TRANSACTIONS(orgId, accountId)}${qs ? `?${qs}` : ""}`);
|
|
3205
|
+
}
|
|
3206
|
+
async listBillingTransactionAgentGroups(orgId, opts, accountId) {
|
|
3207
|
+
const params = new URLSearchParams({ group_by: "agent" });
|
|
3208
|
+
if (opts?.from)
|
|
3209
|
+
params.set("from", opts.from);
|
|
3210
|
+
if (opts?.to)
|
|
3211
|
+
params.set("to", opts.to);
|
|
3212
|
+
return this.request("GET", `${ENDPOINTS.BILLING_TRANSACTIONS(orgId, accountId)}?${params}`);
|
|
3213
|
+
}
|
|
3214
|
+
async listBillingTransactionMachineGroups(orgId, opts, accountId) {
|
|
3215
|
+
const params = new URLSearchParams({ group_by: "machine" });
|
|
3216
|
+
if (opts?.from)
|
|
3217
|
+
params.set("from", opts.from);
|
|
3218
|
+
if (opts?.to)
|
|
3219
|
+
params.set("to", opts.to);
|
|
3220
|
+
return this.request("GET", `${ENDPOINTS.BILLING_TRANSACTIONS(orgId, accountId)}?${params}`);
|
|
3221
|
+
}
|
|
3222
|
+
async createCheckout(orgId, req, accountId) {
|
|
3223
|
+
return this.request("POST", ENDPOINTS.BILLING_CHECKOUT(orgId, accountId), req);
|
|
3224
|
+
}
|
|
3225
|
+
/**
|
|
3226
|
+
* Creates a Stripe-hosted card-collection session (Checkout in mode=setup)
|
|
3227
|
+
* and returns the redirect URL. The frontend navigates to `setup_url` and
|
|
3228
|
+
* Stripe handles the card form; the resulting payment_method is recorded
|
|
3229
|
+
* server-side via the `setup_intent.succeeded` webhook. Mirrors
|
|
3230
|
+
* `POST /billing/setup-intent`.
|
|
3231
|
+
*/
|
|
3232
|
+
async createSetupIntent(orgId, req, accountId) {
|
|
3233
|
+
return this.request("POST", ENDPOINTS.BILLING_SETUP_INTENT(orgId, accountId), req);
|
|
3234
|
+
}
|
|
3235
|
+
/**
|
|
3236
|
+
* Returns a link to the Stripe-hosted customer portal for the account,
|
|
3237
|
+
* where its managers download invoices and edit the billing details
|
|
3238
|
+
* printed on them. Mirrors `POST /billing/portal-session`.
|
|
3239
|
+
*/
|
|
3240
|
+
async createBillingPortalSession(orgId, accountId) {
|
|
3241
|
+
return this.request("POST", ENDPOINTS.BILLING_PORTAL_SESSION(orgId, accountId));
|
|
3242
|
+
}
|
|
3243
|
+
async getAutoReloadSettings(orgId, accountId) {
|
|
3244
|
+
return this.request("GET", ENDPOINTS.BILLING_AUTO_RELOAD(orgId, accountId));
|
|
3245
|
+
}
|
|
3246
|
+
async updateAutoReloadSettings(orgId, req, accountId) {
|
|
3247
|
+
return this.request("PUT", ENDPOINTS.BILLING_AUTO_RELOAD(orgId, accountId), req);
|
|
3248
|
+
}
|
|
3249
|
+
/** The org's billing accounts the caller may view, the org's own first. */
|
|
3250
|
+
async listBillingAccounts(orgId) {
|
|
3251
|
+
const res = await this.request("GET", ENDPOINTS.BILLING_ACCOUNTS(orgId));
|
|
3252
|
+
return res.data;
|
|
3253
|
+
}
|
|
3254
|
+
/** Opens a Team's account (org owners and admins, while Team accounts are
|
|
3255
|
+
* on). Reopening a closed account starts it at zero. */
|
|
3256
|
+
async openBillingAccount(orgId, teamId) {
|
|
3257
|
+
return this.request("POST", ENDPOINTS.BILLING_ACCOUNTS(orgId), { team_id: teamId });
|
|
3258
|
+
}
|
|
3259
|
+
/** Closes a Team account and moves its balance into the org's account. */
|
|
3260
|
+
async closeBillingAccount(orgId, accountId) {
|
|
3261
|
+
await this.request("POST", ENDPOINTS.BILLING_ACCOUNT_CLOSE(orgId, accountId));
|
|
3262
|
+
}
|
|
3263
|
+
async getBillingSettings(orgId) {
|
|
3264
|
+
return this.request("GET", ENDPOINTS.BILLING_SETTINGS(orgId));
|
|
3265
|
+
}
|
|
3266
|
+
/** Sets the org's rules for Team accounts (the org owner only). */
|
|
3267
|
+
async updateBillingSettings(orgId, req) {
|
|
3268
|
+
return this.request("PATCH", ENDPOINTS.BILLING_SETTINGS(orgId), req);
|
|
3269
|
+
}
|
|
3270
|
+
// The admin grant endpoints (POST/GET /internal/admin/orgs/
|
|
3271
|
+
// {id}/grants) intentionally do NOT live on this public client — they
|
|
3272
|
+
// are mounted on the unauthenticated `/internal/*` surface and reachable
|
|
3273
|
+
// only via internal network paths. The admin dashboard maintains its
|
|
3274
|
+
// own thin client (`ts/admin/lib/api.ts`) that hits these directly.
|
|
3275
|
+
async getComputePricing() {
|
|
3276
|
+
const resp = await this.request("GET", ENDPOINTS.COMPUTE_PRICING());
|
|
3277
|
+
return resp.data;
|
|
3278
|
+
}
|
|
3279
|
+
};
|
|
3280
|
+
}
|
|
3281
|
+
});
|
|
3282
|
+
|
|
3084
3283
|
// ts/sdk/dist/wiki-upload.js
|
|
3085
3284
|
function createWikiUploadFormData(params) {
|
|
3086
3285
|
const form = new FormData();
|
|
@@ -3268,12 +3467,12 @@ var init_client = __esm({
|
|
|
3268
3467
|
"ts/sdk/dist/client.js"() {
|
|
3269
3468
|
"use strict";
|
|
3270
3469
|
init_browser_viewer();
|
|
3271
|
-
|
|
3470
|
+
init_billing_client();
|
|
3272
3471
|
init_wiki_upload();
|
|
3273
3472
|
init_fetch_cause();
|
|
3274
3473
|
init_wiki_changeset();
|
|
3275
3474
|
init_constants();
|
|
3276
|
-
ParallClient = class _ParallClient extends
|
|
3475
|
+
ParallClient = class _ParallClient extends BillingClient {
|
|
3277
3476
|
baseUrl;
|
|
3278
3477
|
wikiBaseUrl;
|
|
3279
3478
|
token;
|
|
@@ -5341,100 +5540,6 @@ var init_client = __esm({
|
|
|
5341
5540
|
async updateOnboardingProgress(orgId, request3) {
|
|
5342
5541
|
return this.request("PATCH", ENDPOINTS.ONBOARDING_PROGRESS(orgId), request3);
|
|
5343
5542
|
}
|
|
5344
|
-
// ---- Billing & Credits (org-scoped) ----
|
|
5345
|
-
async getBilling(orgId) {
|
|
5346
|
-
return this.request("GET", ENDPOINTS.BILLING(orgId));
|
|
5347
|
-
}
|
|
5348
|
-
async getUsageDaily(orgId, opts) {
|
|
5349
|
-
const params = new URLSearchParams();
|
|
5350
|
-
params.set("start_date", opts.start_date);
|
|
5351
|
-
params.set("end_date", opts.end_date);
|
|
5352
|
-
return this.request("GET", `${ENDPOINTS.BILLING_USAGE_DAILY(orgId)}?${params}`);
|
|
5353
|
-
}
|
|
5354
|
-
async getUsageHeatmap(orgId, opts) {
|
|
5355
|
-
const params = new URLSearchParams();
|
|
5356
|
-
params.set("start_time", opts.start_time);
|
|
5357
|
-
if (opts.limit != null)
|
|
5358
|
-
params.set("limit", String(opts.limit));
|
|
5359
|
-
if (opts.offset != null)
|
|
5360
|
-
params.set("offset", String(opts.offset));
|
|
5361
|
-
return this.request("GET", `${ENDPOINTS.BILLING_USAGE_HEATMAP(orgId)}?${params}`);
|
|
5362
|
-
}
|
|
5363
|
-
async listBillingTransactions(orgId, opts) {
|
|
5364
|
-
const params = new URLSearchParams();
|
|
5365
|
-
if (opts?.cursor)
|
|
5366
|
-
params.set("cursor", opts.cursor);
|
|
5367
|
-
if (opts?.limit)
|
|
5368
|
-
params.set("limit", String(opts.limit));
|
|
5369
|
-
if (opts?.types?.length)
|
|
5370
|
-
params.set("types", opts.types.join(","));
|
|
5371
|
-
if (opts?.user_id)
|
|
5372
|
-
params.set("user_id", opts.user_id);
|
|
5373
|
-
if (opts?.unresolved_actor)
|
|
5374
|
-
params.set("unresolved_actor", "true");
|
|
5375
|
-
if (opts?.machine_id)
|
|
5376
|
-
params.set("machine_id", opts.machine_id);
|
|
5377
|
-
if (opts?.unresolved_machine)
|
|
5378
|
-
params.set("unresolved_machine", "true");
|
|
5379
|
-
if (opts?.from)
|
|
5380
|
-
params.set("from", opts.from);
|
|
5381
|
-
if (opts?.to)
|
|
5382
|
-
params.set("to", opts.to);
|
|
5383
|
-
const qs = params.toString();
|
|
5384
|
-
return this.request("GET", `${ENDPOINTS.BILLING_TRANSACTIONS(orgId)}${qs ? `?${qs}` : ""}`);
|
|
5385
|
-
}
|
|
5386
|
-
async listBillingTransactionAgentGroups(orgId, opts) {
|
|
5387
|
-
const params = new URLSearchParams({ group_by: "agent" });
|
|
5388
|
-
if (opts?.from)
|
|
5389
|
-
params.set("from", opts.from);
|
|
5390
|
-
if (opts?.to)
|
|
5391
|
-
params.set("to", opts.to);
|
|
5392
|
-
return this.request("GET", `${ENDPOINTS.BILLING_TRANSACTIONS(orgId)}?${params}`);
|
|
5393
|
-
}
|
|
5394
|
-
async listBillingTransactionMachineGroups(orgId, opts) {
|
|
5395
|
-
const params = new URLSearchParams({ group_by: "machine" });
|
|
5396
|
-
if (opts?.from)
|
|
5397
|
-
params.set("from", opts.from);
|
|
5398
|
-
if (opts?.to)
|
|
5399
|
-
params.set("to", opts.to);
|
|
5400
|
-
return this.request("GET", `${ENDPOINTS.BILLING_TRANSACTIONS(orgId)}?${params}`);
|
|
5401
|
-
}
|
|
5402
|
-
async createCheckout(orgId, req) {
|
|
5403
|
-
return this.request("POST", ENDPOINTS.BILLING_CHECKOUT(orgId), req);
|
|
5404
|
-
}
|
|
5405
|
-
/**
|
|
5406
|
-
* Creates a Stripe-hosted card-collection session (Checkout in mode=setup)
|
|
5407
|
-
* and returns the redirect URL. The frontend navigates to `setup_url` and
|
|
5408
|
-
* Stripe handles the card form; the resulting payment_method is recorded
|
|
5409
|
-
* server-side via the `setup_intent.succeeded` webhook. Mirrors
|
|
5410
|
-
* `POST /billing/setup-intent`.
|
|
5411
|
-
*/
|
|
5412
|
-
async createSetupIntent(orgId, req) {
|
|
5413
|
-
return this.request("POST", ENDPOINTS.BILLING_SETUP_INTENT(orgId), req);
|
|
5414
|
-
}
|
|
5415
|
-
/**
|
|
5416
|
-
* Returns a link to the Stripe-hosted customer portal for the org, where
|
|
5417
|
-
* admins download invoices and edit the billing details printed on them.
|
|
5418
|
-
* Mirrors `POST /billing/portal-session`.
|
|
5419
|
-
*/
|
|
5420
|
-
async createBillingPortalSession(orgId) {
|
|
5421
|
-
return this.request("POST", ENDPOINTS.BILLING_PORTAL_SESSION(orgId));
|
|
5422
|
-
}
|
|
5423
|
-
async getAutoReloadSettings(orgId) {
|
|
5424
|
-
return this.request("GET", ENDPOINTS.BILLING_AUTO_RELOAD(orgId));
|
|
5425
|
-
}
|
|
5426
|
-
async updateAutoReloadSettings(orgId, req) {
|
|
5427
|
-
return this.request("PUT", ENDPOINTS.BILLING_AUTO_RELOAD(orgId), req);
|
|
5428
|
-
}
|
|
5429
|
-
// The admin grant endpoints (POST/GET /internal/admin/orgs/
|
|
5430
|
-
// {id}/grants) intentionally do NOT live on this public client — they
|
|
5431
|
-
// are mounted on the unauthenticated `/internal/*` surface and reachable
|
|
5432
|
-
// only via internal network paths. The admin dashboard maintains its
|
|
5433
|
-
// own thin client (`ts/admin/lib/api.ts`) that hits these directly.
|
|
5434
|
-
async getComputePricing() {
|
|
5435
|
-
const resp = await this.request("GET", ENDPOINTS.COMPUTE_PRICING());
|
|
5436
|
-
return resp.data;
|
|
5437
|
-
}
|
|
5438
5543
|
/** Runtime capability table (public) — SSOT for the create/settings interlock. */
|
|
5439
5544
|
async getRuntimes() {
|
|
5440
5545
|
const resp = await this.request("GET", ENDPOINTS.RUNTIMES());
|
|
@@ -6767,6 +6872,7 @@ __export(dist_exports, {
|
|
|
6767
6872
|
parseSubjectToken: () => parseSubjectToken,
|
|
6768
6873
|
platformDefaultModelForRuntime: () => platformDefaultModelForRuntime,
|
|
6769
6874
|
readReceiptOf: () => readReceiptOf,
|
|
6875
|
+
refusedAccountOf: () => refusedAccountOf,
|
|
6770
6876
|
resolveChatListMode: () => resolveChatListMode,
|
|
6771
6877
|
sameWikiDraftScope: () => sameWikiDraftScope,
|
|
6772
6878
|
showsReadReceipt: () => showsReadReceipt,
|
|
@@ -6787,6 +6893,7 @@ var init_dist = __esm({
|
|
|
6787
6893
|
init_attachment_types();
|
|
6788
6894
|
init_approval_policy_types();
|
|
6789
6895
|
init_attention_types();
|
|
6896
|
+
init_billing_types();
|
|
6790
6897
|
init_browser_use();
|
|
6791
6898
|
init_browser_use_receipt();
|
|
6792
6899
|
init_browser_use_validation();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parall/daemon",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.85.0",
|
|
4
4
|
"description": "Parall local agent runtime — daemon supervisor + bridge runtimes, bundled as standalone JS files",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"@opentelemetry/api": "^1.9.0",
|
|
35
35
|
"@pinixai/bb-browser-pro": "0.15.0",
|
|
36
36
|
"ws": "^8.18.0",
|
|
37
|
-
"@parall/sdk": "1.
|
|
38
|
-
"@parall/
|
|
39
|
-
"@parall/
|
|
40
|
-
"@parall/
|
|
41
|
-
"@parall/agent
|
|
37
|
+
"@parall/sdk": "1.85.0",
|
|
38
|
+
"@parall/claude-agent": "1.85.0",
|
|
39
|
+
"@parall/codex-agent": "1.85.0",
|
|
40
|
+
"@parall/agent-core": "1.85.0",
|
|
41
|
+
"@parall/openclaw-agent": "1.85.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/node": "^22.0.0",
|