@reforma/types 0.1.3 → 0.1.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/dist/index.js +41 -89
- package/package.json +1 -1
- package/src/api/projects/project.ts +10 -17
- package/src/sandbox/plans.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
2
|
+
// src/api/billing/billing-interval.enum.ts
|
|
3
3
|
let BillingIntervalEnum = /* @__PURE__ */ function(BillingIntervalEnum) {
|
|
4
4
|
BillingIntervalEnum["month"] = "month";
|
|
5
5
|
BillingIntervalEnum["year"] = "year";
|
|
6
6
|
return BillingIntervalEnum;
|
|
7
7
|
}({});
|
|
8
|
-
|
|
9
|
-
//#region src/api/billing/credit-bucket.enum.ts
|
|
8
|
+
// src/api/billing/credit-bucket.enum.ts
|
|
10
9
|
let CreditBucketEnum = /* @__PURE__ */ function(CreditBucketEnum) {
|
|
11
10
|
/** Granted with the plan, resets each period (use-it-or-lose-it). */
|
|
12
11
|
CreditBucketEnum["included"] = "included";
|
|
@@ -14,8 +13,7 @@ let CreditBucketEnum = /* @__PURE__ */ function(CreditBucketEnum) {
|
|
|
14
13
|
CreditBucketEnum["purchased"] = "purchased";
|
|
15
14
|
return CreditBucketEnum;
|
|
16
15
|
}({});
|
|
17
|
-
|
|
18
|
-
//#region src/api/billing/credit-entry-type.enum.ts
|
|
16
|
+
// src/api/billing/credit-entry-type.enum.ts
|
|
19
17
|
let CreditEntryTypeEnum = /* @__PURE__ */ function(CreditEntryTypeEnum) {
|
|
20
18
|
/** Credits granted with the plan at subscribe/renewal (into the `included` bucket). */
|
|
21
19
|
CreditEntryTypeEnum["includedGrant"] = "included_grant";
|
|
@@ -39,8 +37,7 @@ let CreditEntryTypeEnum = /* @__PURE__ */ function(CreditEntryTypeEnum) {
|
|
|
39
37
|
CreditEntryTypeEnum["referral"] = "referral";
|
|
40
38
|
return CreditEntryTypeEnum;
|
|
41
39
|
}({});
|
|
42
|
-
|
|
43
|
-
//#region src/api/billing/invoice-item-type.enum.ts
|
|
40
|
+
// src/api/billing/invoice-item-type.enum.ts
|
|
44
41
|
let InvoiceItemTypeEnum = /* @__PURE__ */ function(InvoiceItemTypeEnum) {
|
|
45
42
|
/** Recurring plan base price for the period. */
|
|
46
43
|
InvoiceItemTypeEnum["base"] = "base";
|
|
@@ -56,8 +53,7 @@ let InvoiceItemTypeEnum = /* @__PURE__ */ function(InvoiceItemTypeEnum) {
|
|
|
56
53
|
InvoiceItemTypeEnum["cloudOverage"] = "cloud_overage";
|
|
57
54
|
return InvoiceItemTypeEnum;
|
|
58
55
|
}({});
|
|
59
|
-
|
|
60
|
-
//#region src/api/billing/invoice-purpose.enum.ts
|
|
56
|
+
// src/api/billing/invoice-purpose.enum.ts
|
|
61
57
|
let InvoicePurposeEnum = /* @__PURE__ */ function(InvoicePurposeEnum) {
|
|
62
58
|
InvoicePurposeEnum["renewal"] = "renewal";
|
|
63
59
|
InvoicePurposeEnum["planChange"] = "plan_change";
|
|
@@ -66,8 +62,7 @@ let InvoicePurposeEnum = /* @__PURE__ */ function(InvoicePurposeEnum) {
|
|
|
66
62
|
InvoicePurposeEnum["seatChange"] = "seat_change";
|
|
67
63
|
return InvoicePurposeEnum;
|
|
68
64
|
}({});
|
|
69
|
-
|
|
70
|
-
//#region src/api/billing/invoice-status.enum.ts
|
|
65
|
+
// src/api/billing/invoice-status.enum.ts
|
|
71
66
|
let InvoiceStatusEnum = /* @__PURE__ */ function(InvoiceStatusEnum) {
|
|
72
67
|
/** Being assembled; not yet finalized/issued. */
|
|
73
68
|
InvoiceStatusEnum["draft"] = "draft";
|
|
@@ -79,8 +74,7 @@ let InvoiceStatusEnum = /* @__PURE__ */ function(InvoiceStatusEnum) {
|
|
|
79
74
|
InvoiceStatusEnum["void"] = "void";
|
|
80
75
|
return InvoiceStatusEnum;
|
|
81
76
|
}({});
|
|
82
|
-
|
|
83
|
-
//#region src/api/billing/payment-method-status.enum.ts
|
|
77
|
+
// src/api/billing/payment-method-status.enum.ts
|
|
84
78
|
let PaymentMethodStatusEnum = /* @__PURE__ */ function(PaymentMethodStatusEnum) {
|
|
85
79
|
/** Usable card currently attached to the Stripe customer. */
|
|
86
80
|
PaymentMethodStatusEnum["active"] = "active";
|
|
@@ -88,15 +82,13 @@ let PaymentMethodStatusEnum = /* @__PURE__ */ function(PaymentMethodStatusEnum)
|
|
|
88
82
|
PaymentMethodStatusEnum["detached"] = "detached";
|
|
89
83
|
return PaymentMethodStatusEnum;
|
|
90
84
|
}({});
|
|
91
|
-
|
|
92
|
-
//#region src/api/billing/social-post-status.enum.ts
|
|
85
|
+
// src/api/billing/social-post-status.enum.ts
|
|
93
86
|
let SocialPostStatusEnum = /* @__PURE__ */ function(SocialPostStatusEnum) {
|
|
94
87
|
SocialPostStatusEnum["pending"] = "pending";
|
|
95
88
|
SocialPostStatusEnum["approved"] = "approved";
|
|
96
89
|
return SocialPostStatusEnum;
|
|
97
90
|
}({});
|
|
98
|
-
|
|
99
|
-
//#region src/api/billing/subscription-event-type.enum.ts
|
|
91
|
+
// src/api/billing/subscription-event-type.enum.ts
|
|
100
92
|
let SubscriptionEventTypeEnum = /* @__PURE__ */ function(SubscriptionEventTypeEnum) {
|
|
101
93
|
/** Freemium subscription created for a new workspace. */
|
|
102
94
|
SubscriptionEventTypeEnum["created"] = "created";
|
|
@@ -128,8 +120,7 @@ let SubscriptionEventTypeEnum = /* @__PURE__ */ function(SubscriptionEventTypeEn
|
|
|
128
120
|
SubscriptionEventTypeEnum["adminOverride"] = "admin_override";
|
|
129
121
|
return SubscriptionEventTypeEnum;
|
|
130
122
|
}({});
|
|
131
|
-
|
|
132
|
-
//#region src/api/billing/subscription-status.enum.ts
|
|
123
|
+
// src/api/billing/subscription-status.enum.ts
|
|
133
124
|
let SubscriptionStatusEnum = /* @__PURE__ */ function(SubscriptionStatusEnum) {
|
|
134
125
|
/** In good standing — Free or paid. Paid-ness is the plan, not this status. */
|
|
135
126
|
SubscriptionStatusEnum["active"] = "active";
|
|
@@ -141,8 +132,7 @@ let SubscriptionStatusEnum = /* @__PURE__ */ function(SubscriptionStatusEnum) {
|
|
|
141
132
|
SubscriptionStatusEnum["expired"] = "expired";
|
|
142
133
|
return SubscriptionStatusEnum;
|
|
143
134
|
}({});
|
|
144
|
-
|
|
145
|
-
//#region src/api/billing/usage-kind.enum.ts
|
|
135
|
+
// src/api/billing/usage-kind.enum.ts
|
|
146
136
|
let UsageKindEnum = /* @__PURE__ */ function(UsageKindEnum) {
|
|
147
137
|
/** Text/LLM request (tokens). */
|
|
148
138
|
UsageKindEnum["aiLlm"] = "ai_llm";
|
|
@@ -152,8 +142,7 @@ let UsageKindEnum = /* @__PURE__ */ function(UsageKindEnum) {
|
|
|
152
142
|
UsageKindEnum["cloud"] = "cloud";
|
|
153
143
|
return UsageKindEnum;
|
|
154
144
|
}({});
|
|
155
|
-
|
|
156
|
-
//#region src/api/billing/usage-status.enum.ts
|
|
145
|
+
// src/api/billing/usage-status.enum.ts
|
|
157
146
|
let UsageStatusEnum = /* @__PURE__ */ function(UsageStatusEnum) {
|
|
158
147
|
/** Accumulating gateway requests; no credits moved yet. */
|
|
159
148
|
UsageStatusEnum["draft"] = "draft";
|
|
@@ -161,24 +150,21 @@ let UsageStatusEnum = /* @__PURE__ */ function(UsageStatusEnum) {
|
|
|
161
150
|
UsageStatusEnum["finalized"] = "finalized";
|
|
162
151
|
return UsageStatusEnum;
|
|
163
152
|
}({});
|
|
164
|
-
|
|
165
|
-
//#region src/api/files/file-owner-type.enum.ts
|
|
153
|
+
// src/api/files/file-owner-type.enum.ts
|
|
166
154
|
let FileOwnerTypeEnum = /* @__PURE__ */ function(FileOwnerTypeEnum) {
|
|
167
155
|
FileOwnerTypeEnum["user"] = "user";
|
|
168
156
|
FileOwnerTypeEnum["workspace"] = "workspace";
|
|
169
157
|
FileOwnerTypeEnum["project"] = "project";
|
|
170
158
|
return FileOwnerTypeEnum;
|
|
171
159
|
}({});
|
|
172
|
-
|
|
173
|
-
//#region src/api/files/file-source.enum.ts
|
|
160
|
+
// src/api/files/file-source.enum.ts
|
|
174
161
|
let FileSourceEnum = /* @__PURE__ */ function(FileSourceEnum) {
|
|
175
162
|
FileSourceEnum["user"] = "user";
|
|
176
163
|
FileSourceEnum["agent"] = "agent";
|
|
177
164
|
FileSourceEnum["system"] = "system";
|
|
178
165
|
return FileSourceEnum;
|
|
179
166
|
}({});
|
|
180
|
-
|
|
181
|
-
//#region src/api/members/member-role.enum.ts
|
|
167
|
+
// src/api/members/member-role.enum.ts
|
|
182
168
|
let MemberRoleEnum = /* @__PURE__ */ function(MemberRoleEnum) {
|
|
183
169
|
MemberRoleEnum["owner"] = "owner";
|
|
184
170
|
MemberRoleEnum["admin"] = "admin";
|
|
@@ -186,15 +172,13 @@ let MemberRoleEnum = /* @__PURE__ */ function(MemberRoleEnum) {
|
|
|
186
172
|
MemberRoleEnum["viewer"] = "viewer";
|
|
187
173
|
return MemberRoleEnum;
|
|
188
174
|
}({});
|
|
189
|
-
|
|
190
|
-
//#region src/api/members/member-status.enum.ts
|
|
175
|
+
// src/api/members/member-status.enum.ts
|
|
191
176
|
let MemberStatusEnum = /* @__PURE__ */ function(MemberStatusEnum) {
|
|
192
177
|
MemberStatusEnum["active"] = "active";
|
|
193
178
|
MemberStatusEnum["removed"] = "removed";
|
|
194
179
|
return MemberStatusEnum;
|
|
195
180
|
}({});
|
|
196
|
-
|
|
197
|
-
//#region src/api/projects/deployments/deployment-error-code.enum.ts
|
|
181
|
+
// src/api/projects/deployments/deployment-error-code.enum.ts
|
|
198
182
|
let DeploymentErrorCodeEnum = /* @__PURE__ */ function(DeploymentErrorCodeEnum) {
|
|
199
183
|
DeploymentErrorCodeEnum["buildFailed"] = "build_failed";
|
|
200
184
|
DeploymentErrorCodeEnum["deployFailed"] = "deploy_failed";
|
|
@@ -203,16 +187,14 @@ let DeploymentErrorCodeEnum = /* @__PURE__ */ function(DeploymentErrorCodeEnum)
|
|
|
203
187
|
DeploymentErrorCodeEnum["cancelled"] = "cancelled";
|
|
204
188
|
return DeploymentErrorCodeEnum;
|
|
205
189
|
}({});
|
|
206
|
-
|
|
207
|
-
//#region src/api/projects/deployments/deployment-provider.enum.ts
|
|
190
|
+
// src/api/projects/deployments/deployment-provider.enum.ts
|
|
208
191
|
let DeploymentProviderEnum = /* @__PURE__ */ function(DeploymentProviderEnum) {
|
|
209
192
|
DeploymentProviderEnum["vercel"] = "vercel";
|
|
210
193
|
DeploymentProviderEnum["cloudflare"] = "cloudflare";
|
|
211
194
|
DeploymentProviderEnum["reforma"] = "reforma";
|
|
212
195
|
return DeploymentProviderEnum;
|
|
213
196
|
}({});
|
|
214
|
-
|
|
215
|
-
//#region src/api/projects/deployments/deployment-status.enum.ts
|
|
197
|
+
// src/api/projects/deployments/deployment-status.enum.ts
|
|
216
198
|
let DeploymentStatusEnum = /* @__PURE__ */ function(DeploymentStatusEnum) {
|
|
217
199
|
DeploymentStatusEnum["queued"] = "queued";
|
|
218
200
|
DeploymentStatusEnum["building"] = "building";
|
|
@@ -221,8 +203,7 @@ let DeploymentStatusEnum = /* @__PURE__ */ function(DeploymentStatusEnum) {
|
|
|
221
203
|
DeploymentStatusEnum["failed"] = "failed";
|
|
222
204
|
return DeploymentStatusEnum;
|
|
223
205
|
}({});
|
|
224
|
-
|
|
225
|
-
//#region src/api/projects/deployments/publish-phase.ts
|
|
206
|
+
// src/api/projects/deployments/publish-phase.ts
|
|
226
207
|
let PublishPhase = /* @__PURE__ */ function(PublishPhase) {
|
|
227
208
|
PublishPhase["git"] = "git";
|
|
228
209
|
PublishPhase["prepare"] = "prepare";
|
|
@@ -231,8 +212,7 @@ let PublishPhase = /* @__PURE__ */ function(PublishPhase) {
|
|
|
231
212
|
PublishPhase["upload"] = "upload";
|
|
232
213
|
return PublishPhase;
|
|
233
214
|
}({});
|
|
234
|
-
|
|
235
|
-
//#region src/api/projects/domains/domain-dns-record.ts
|
|
215
|
+
// src/api/projects/domains/domain-dns-record.ts
|
|
236
216
|
/** What a record is for, so the UI can group ownership/validation apart from traffic. */
|
|
237
217
|
let DomainDnsRecordPurposeEnum = /* @__PURE__ */ function(DomainDnsRecordPurposeEnum) {
|
|
238
218
|
DomainDnsRecordPurposeEnum["ownership"] = "ownership";
|
|
@@ -240,8 +220,7 @@ let DomainDnsRecordPurposeEnum = /* @__PURE__ */ function(DomainDnsRecordPurpose
|
|
|
240
220
|
DomainDnsRecordPurposeEnum["traffic"] = "traffic";
|
|
241
221
|
return DomainDnsRecordPurposeEnum;
|
|
242
222
|
}({});
|
|
243
|
-
|
|
244
|
-
//#region src/api/projects/domains/domain-status.enum.ts
|
|
223
|
+
// src/api/projects/domains/domain-status.enum.ts
|
|
245
224
|
let DomainStatusEnum = /* @__PURE__ */ function(DomainStatusEnum) {
|
|
246
225
|
DomainStatusEnum["pendingDns"] = "pending_dns";
|
|
247
226
|
DomainStatusEnum["pendingTls"] = "pending_tls";
|
|
@@ -250,8 +229,7 @@ let DomainStatusEnum = /* @__PURE__ */ function(DomainStatusEnum) {
|
|
|
250
229
|
DomainStatusEnum["deleting"] = "deleting";
|
|
251
230
|
return DomainStatusEnum;
|
|
252
231
|
}({});
|
|
253
|
-
|
|
254
|
-
//#region src/api/projects/env-vars/project-env-environment.enum.ts
|
|
232
|
+
// src/api/projects/env-vars/project-env-environment.enum.ts
|
|
255
233
|
/**
|
|
256
234
|
* `production` is the deployed site; `development` is the sandbox dev server.
|
|
257
235
|
* There is no `preview` — Reforma has no preview deployments.
|
|
@@ -261,8 +239,7 @@ let ProjectEnvEnvironmentEnum = /* @__PURE__ */ function(ProjectEnvEnvironmentEn
|
|
|
261
239
|
ProjectEnvEnvironmentEnum["development"] = "development";
|
|
262
240
|
return ProjectEnvEnvironmentEnum;
|
|
263
241
|
}({});
|
|
264
|
-
|
|
265
|
-
//#region src/api/projects/integrations.ts
|
|
242
|
+
// src/api/projects/integrations.ts
|
|
266
243
|
function variableFields(variables) {
|
|
267
244
|
if (!variables?.properties) return [];
|
|
268
245
|
const required = new Set(variables.required ?? []);
|
|
@@ -321,8 +298,7 @@ function slugCustomNameInput(raw) {
|
|
|
321
298
|
function slugCustomName(raw) {
|
|
322
299
|
return slugCustomNameInput(raw).replace(/-+$/g, "");
|
|
323
300
|
}
|
|
324
|
-
|
|
325
|
-
//#region src/api/projects/project.ts
|
|
301
|
+
// src/api/projects/project.ts
|
|
326
302
|
/** Project lifecycle: created → initialized → ready → published */
|
|
327
303
|
let ProjectStatusEnum = /* @__PURE__ */ function(ProjectStatusEnum) {
|
|
328
304
|
/** Project exists. Design direction is not committed yet. */
|
|
@@ -339,17 +315,9 @@ const DEFAULT_PROJECT_SETTINGS = {
|
|
|
339
315
|
timezone: "UTC",
|
|
340
316
|
language: "en",
|
|
341
317
|
theme: "system",
|
|
342
|
-
seo: {
|
|
343
|
-
defaultPageTitle: "",
|
|
344
|
-
defaultMetaDescription: "",
|
|
345
|
-
faviconUrl: null,
|
|
346
|
-
indexingEnabled: true,
|
|
347
|
-
analyticsEnabled: true
|
|
348
|
-
},
|
|
349
318
|
pendingPublish: false
|
|
350
319
|
};
|
|
351
|
-
|
|
352
|
-
//#region src/api/projects/sandbox/sandbox-status.enum.ts
|
|
320
|
+
// src/api/projects/sandbox/sandbox-status.enum.ts
|
|
353
321
|
let SandboxStatusEnum = /* @__PURE__ */ function(SandboxStatusEnum) {
|
|
354
322
|
/** Row created, pod is provisioning. */
|
|
355
323
|
SandboxStatusEnum["pending"] = "pending";
|
|
@@ -361,28 +329,24 @@ let SandboxStatusEnum = /* @__PURE__ */ function(SandboxStatusEnum) {
|
|
|
361
329
|
SandboxStatusEnum["deleted"] = "deleted";
|
|
362
330
|
return SandboxStatusEnum;
|
|
363
331
|
}({});
|
|
364
|
-
|
|
365
|
-
//#region src/api/repos/repo-provider.enum.ts
|
|
332
|
+
// src/api/repos/repo-provider.enum.ts
|
|
366
333
|
let RepoProviderEnum = /* @__PURE__ */ function(RepoProviderEnum) {
|
|
367
334
|
RepoProviderEnum["internalGithub"] = "internal_github";
|
|
368
335
|
return RepoProviderEnum;
|
|
369
336
|
}({});
|
|
370
|
-
|
|
371
|
-
//#region src/api/sandbox-clusters/sandbox-cluster-node-status.enum.ts
|
|
337
|
+
// src/api/sandbox-clusters/sandbox-cluster-node-status.enum.ts
|
|
372
338
|
let SandboxClusterNodeStatusEnum = /* @__PURE__ */ function(SandboxClusterNodeStatusEnum) {
|
|
373
339
|
SandboxClusterNodeStatusEnum["ready"] = "Ready";
|
|
374
340
|
SandboxClusterNodeStatusEnum["notReady"] = "NotReady";
|
|
375
341
|
SandboxClusterNodeStatusEnum["unknown"] = "Unknown";
|
|
376
342
|
return SandboxClusterNodeStatusEnum;
|
|
377
343
|
}({});
|
|
378
|
-
|
|
379
|
-
//#region src/api/sandbox-clusters/sandbox-cluster-provider.enum.ts
|
|
344
|
+
// src/api/sandbox-clusters/sandbox-cluster-provider.enum.ts
|
|
380
345
|
let SandboxClusterProviderEnum = /* @__PURE__ */ function(SandboxClusterProviderEnum) {
|
|
381
346
|
SandboxClusterProviderEnum["rke2"] = "rke2";
|
|
382
347
|
return SandboxClusterProviderEnum;
|
|
383
348
|
}({});
|
|
384
|
-
|
|
385
|
-
//#region src/api/sandbox-clusters/sandbox-cluster-status.enum.ts
|
|
349
|
+
// src/api/sandbox-clusters/sandbox-cluster-status.enum.ts
|
|
386
350
|
let SandboxClusterStatusEnum = /* @__PURE__ */ function(SandboxClusterStatusEnum) {
|
|
387
351
|
SandboxClusterStatusEnum["active"] = "active";
|
|
388
352
|
SandboxClusterStatusEnum["disabled"] = "disabled";
|
|
@@ -390,15 +354,13 @@ let SandboxClusterStatusEnum = /* @__PURE__ */ function(SandboxClusterStatusEnum
|
|
|
390
354
|
SandboxClusterStatusEnum["unhealthy"] = "unhealthy";
|
|
391
355
|
return SandboxClusterStatusEnum;
|
|
392
356
|
}({});
|
|
393
|
-
|
|
394
|
-
//#region src/api/users/user-role.enum.ts
|
|
357
|
+
// src/api/users/user-role.enum.ts
|
|
395
358
|
let UserRoleEnum = /* @__PURE__ */ function(UserRoleEnum) {
|
|
396
359
|
UserRoleEnum["admin"] = "admin";
|
|
397
360
|
UserRoleEnum["user"] = "user";
|
|
398
361
|
return UserRoleEnum;
|
|
399
362
|
}({});
|
|
400
|
-
|
|
401
|
-
//#region src/api/users/user-status.enum.ts
|
|
363
|
+
// src/api/users/user-status.enum.ts
|
|
402
364
|
let UserStatusEnum = /* @__PURE__ */ function(UserStatusEnum) {
|
|
403
365
|
/** Confirmed and allowed to sign in. */
|
|
404
366
|
UserStatusEnum["active"] = "active";
|
|
@@ -409,16 +371,14 @@ let UserStatusEnum = /* @__PURE__ */ function(UserStatusEnum) {
|
|
|
409
371
|
UserStatusEnum["deleted"] = "deleted";
|
|
410
372
|
return UserStatusEnum;
|
|
411
373
|
}({});
|
|
412
|
-
|
|
413
|
-
//#region src/api/workspaces/workspace-status.enum.ts
|
|
374
|
+
// src/api/workspaces/workspace-status.enum.ts
|
|
414
375
|
let WorkspaceStatusEnum = /* @__PURE__ */ function(WorkspaceStatusEnum) {
|
|
415
376
|
WorkspaceStatusEnum["active"] = "active";
|
|
416
377
|
WorkspaceStatusEnum["suspended"] = "suspended";
|
|
417
378
|
WorkspaceStatusEnum["deleted"] = "deleted";
|
|
418
379
|
return WorkspaceStatusEnum;
|
|
419
380
|
}({});
|
|
420
|
-
|
|
421
|
-
//#region src/layers.ts
|
|
381
|
+
// src/layers.ts
|
|
422
382
|
/** Cap for {@link SelectedLayerContext.text} / ask-prompt “currently” snippets. */
|
|
423
383
|
const SELECTED_LAYER_TEXT_MAX = 60;
|
|
424
384
|
/**
|
|
@@ -531,8 +491,7 @@ function normalizeSelectedLayerContext(raw) {
|
|
|
531
491
|
...source ? { source } : {}
|
|
532
492
|
};
|
|
533
493
|
}
|
|
534
|
-
|
|
535
|
-
//#region src/sandbox/ai.ts
|
|
494
|
+
// src/sandbox/ai.ts
|
|
536
495
|
/** Client-overridable call settings. Registry owns context window, tools, MIME types. */
|
|
537
496
|
const CHAT_MODEL_REASONING = [
|
|
538
497
|
"none",
|
|
@@ -542,8 +501,7 @@ const CHAT_MODEL_REASONING = [
|
|
|
542
501
|
"high",
|
|
543
502
|
"xhigh"
|
|
544
503
|
];
|
|
545
|
-
|
|
546
|
-
//#region src/sandbox/errors.ts
|
|
504
|
+
// src/sandbox/errors.ts
|
|
547
505
|
var ProcessError = class extends Error {
|
|
548
506
|
constructor(code, message, details) {
|
|
549
507
|
super(message);
|
|
@@ -561,8 +519,7 @@ var FileSystemError = class extends Error {
|
|
|
561
519
|
this.name = "FileSystemError";
|
|
562
520
|
}
|
|
563
521
|
};
|
|
564
|
-
|
|
565
|
-
//#region src/sandbox/process.ts
|
|
522
|
+
// src/sandbox/process.ts
|
|
566
523
|
let ProcessState = /* @__PURE__ */ function(ProcessState) {
|
|
567
524
|
ProcessState["QUEUED"] = "QUEUED";
|
|
568
525
|
ProcessState["RUNNING"] = "RUNNING";
|
|
@@ -571,13 +528,11 @@ let ProcessState = /* @__PURE__ */ function(ProcessState) {
|
|
|
571
528
|
ProcessState["KILLED"] = "KILLED";
|
|
572
529
|
return ProcessState;
|
|
573
530
|
}({});
|
|
574
|
-
|
|
575
|
-
//#region src/sandbox/tools/capture-screenshot.ts
|
|
531
|
+
// src/sandbox/tools/capture-screenshot.ts
|
|
576
532
|
function isScreenshotTool(id) {
|
|
577
533
|
return id === "PageScreenshot";
|
|
578
534
|
}
|
|
579
|
-
|
|
580
|
-
//#region src/sandbox/tools/mcp-tools.ts
|
|
535
|
+
// src/sandbox/tools/mcp-tools.ts
|
|
581
536
|
/**
|
|
582
537
|
* Live MCP health — handshake in the sandbox and catalog `connection`.
|
|
583
538
|
*
|
|
@@ -593,16 +548,14 @@ let McpRuntimeStatus = /* @__PURE__ */ function(McpRuntimeStatus) {
|
|
|
593
548
|
McpRuntimeStatus["error"] = "error";
|
|
594
549
|
return McpRuntimeStatus;
|
|
595
550
|
}({});
|
|
596
|
-
|
|
597
|
-
//#region src/sandbox/usage-metadata.ts
|
|
551
|
+
// src/sandbox/usage-metadata.ts
|
|
598
552
|
/** Prompt-window buckets. Tool calls/results live in `conversation`, not `tools`. */
|
|
599
553
|
const CONTEXT_USAGE_BUCKET_IDS = [
|
|
600
554
|
"instructions",
|
|
601
555
|
"tools",
|
|
602
556
|
"conversation"
|
|
603
557
|
];
|
|
604
|
-
|
|
605
|
-
//#region src/theia/bridge.ts
|
|
558
|
+
// src/theia/bridge.ts
|
|
606
559
|
/**
|
|
607
560
|
* Stable identity for composer/chips.
|
|
608
561
|
* Uses `##` (not `:` / `\0`) — cursor already has `:`, and null bytes get truncated as DOM/React keys.
|
|
@@ -612,7 +565,6 @@ function codeEditorStateKey(file) {
|
|
|
612
565
|
const cursor = file.cursor?.trim();
|
|
613
566
|
return cursor ? `${path}##${cursor}` : path;
|
|
614
567
|
}
|
|
615
|
-
//#endregion
|
|
616
568
|
exports.BillingIntervalEnum = BillingIntervalEnum;
|
|
617
569
|
exports.CHAT_MODEL_REASONING = CHAT_MODEL_REASONING;
|
|
618
570
|
exports.CONTEXT_USAGE_BUCKET_IDS = CONTEXT_USAGE_BUCKET_IDS;
|
package/package.json
CHANGED
|
@@ -17,20 +17,21 @@ export interface ProjectEditorSettings {
|
|
|
17
17
|
showLayerSizes?: boolean;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
/** Editable values in the project's site.config.ts, outside database settings. */
|
|
21
|
+
export interface SiteConfig {
|
|
22
|
+
faviconUrl: string;
|
|
23
|
+
indexingEnabled: boolean;
|
|
24
|
+
analyticsEnabled: boolean;
|
|
25
|
+
analyticsWriteKey: string;
|
|
26
|
+
analyticsEndpoint: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
20
29
|
export interface ProjectSettings {
|
|
21
30
|
timezone: string;
|
|
22
31
|
language: string;
|
|
23
32
|
theme: Theme;
|
|
24
|
-
seo: {
|
|
25
|
-
defaultPageTitle: string;
|
|
26
|
-
defaultMetaDescription: string;
|
|
27
|
-
faviconUrl: string | null;
|
|
28
|
-
indexingEnabled: boolean;
|
|
29
|
-
/** First-party pageview collection. Default on; publish bakes `REFORMA_ANALYTICS`. */
|
|
30
|
-
analyticsEnabled: boolean;
|
|
31
|
-
};
|
|
32
33
|
editor?: ProjectEditorSettings;
|
|
33
|
-
/**
|
|
34
|
+
/** Environment variables changed since the last successful publish. */
|
|
34
35
|
pendingPublish: boolean;
|
|
35
36
|
}
|
|
36
37
|
|
|
@@ -38,13 +39,6 @@ export const DEFAULT_PROJECT_SETTINGS: ProjectSettings = {
|
|
|
38
39
|
timezone: 'UTC',
|
|
39
40
|
language: 'en',
|
|
40
41
|
theme: 'system',
|
|
41
|
-
seo: {
|
|
42
|
-
defaultPageTitle: '',
|
|
43
|
-
defaultMetaDescription: '',
|
|
44
|
-
faviconUrl: null,
|
|
45
|
-
indexingEnabled: true,
|
|
46
|
-
analyticsEnabled: true,
|
|
47
|
-
},
|
|
48
42
|
pendingPublish: false,
|
|
49
43
|
};
|
|
50
44
|
|
|
@@ -68,7 +62,6 @@ export interface UpdateProjectSettings {
|
|
|
68
62
|
timezone?: string;
|
|
69
63
|
language?: string;
|
|
70
64
|
theme?: ProjectSettings['theme'];
|
|
71
|
-
seo?: Partial<ProjectSettings['seo']>;
|
|
72
65
|
editor?: ProjectEditorSettings;
|
|
73
66
|
}
|
|
74
67
|
|