@keystrokehq/cli 0.1.92 → 0.1.94

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.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { n as __require, t as __commonJSMin } from "./chunk-DiodbrVj.mjs";
3
- import { $r as toJSONSchema, Ar as ZodType, Br as lazy, Cr as parseStoredRouteManifest, Fr as array, Ir as boolean$1, Jr as string, Kr as preprocess, Lr as custom, Mr as _function, Nr as _null, Rr as discriminatedUnion, Ur as number, Vr as literal, Wr as object, Yr as union, cn as PromptResponseSchema, et as DEFAULT_CLOUD_PLATFORM_ORIGIN, fn as ROUTE_MANIFEST_REL_PATH, jr as _enum, ln as PublicModelsResponseSchema, mr as credentialInputSchema, qr as record, wr as requiredDisplayTextSchema, yr as normalizeCredentialList } from "./dist-WHAEh05Y.mjs";
4
- import "./dist-BxVsr24X.mjs";
3
+ import { $r as toJSONSchema, Ar as ZodType, Br as lazy, Cr as parseStoredRouteManifest, Fr as array, Ir as boolean$1, Jr as string, Kr as preprocess, Lr as custom, Mr as _function, Nr as _null, Rr as discriminatedUnion, Ur as number, Vr as literal, Wr as object, Yr as union, cn as PromptResponseSchema, et as DEFAULT_CLOUD_PLATFORM_ORIGIN, fn as ROUTE_MANIFEST_REL_PATH, jr as _enum, ln as PublicModelsResponseSchema, mr as credentialInputSchema, qr as record, wr as requiredDisplayTextSchema, yr as normalizeCredentialList } from "./dist-DB7DcawF.mjs";
4
+ import "./dist-BlQZgnhc.mjs";
5
5
  import "./chunk-BZUGFHVS-CPWRFwK8.mjs";
6
6
  import "./chunk-DLL7UR66-BUYgzxnR.mjs";
7
7
  import "./chunk-TN7HHBQW-CSB_R-XD.mjs";
@@ -2810,50 +2810,6 @@ const agentEventsSqlite = sqliteTable("agent_events", {
2810
2810
  createdAt: integer$1("created_at", { mode: "timestamp_ms" }).notNull(),
2811
2811
  deletedAt: integer$1("deleted_at", { mode: "timestamp_ms" })
2812
2812
  }, (table) => [index$1("agent_events_session_event_seq_idx").on(table.sessionId, table.eventType, table.seq)]);
2813
- const usageRecords = pgTable("usage_records", {
2814
- id: text("id").primaryKey(),
2815
- runId: text("run_id"),
2816
- runKind: text("run_kind").$type(),
2817
- kind: text("kind").notNull(),
2818
- label: text("label").notNull(),
2819
- quantity: integer("quantity"),
2820
- unit: text("unit"),
2821
- amount: doublePrecision("amount").notNull(),
2822
- metadata: jsonb("metadata"),
2823
- entryType: text("entry_type").$type().notNull().default("usage"),
2824
- meterKey: text("meter_key"),
2825
- microCredits: bigint("micro_credits", { mode: "number" }),
2826
- bucket: text("bucket").$type(),
2827
- reference: text("reference"),
2828
- createdAt: timestamp("created_at", { withTimezone: true }).notNull()
2829
- }, (table) => [
2830
- index("usage_records_run_run_kind_idx").on(table.runId, table.runKind),
2831
- index("usage_records_kind_idx").on(table.kind),
2832
- index("usage_records_entry_type_created_at_idx").on(table.entryType, table.createdAt),
2833
- uniqueIndex("usage_records_entry_type_reference_unique").on(table.entryType, table.reference).where(sql`${table.reference} is not null`)
2834
- ]);
2835
- const usageRecordsSqlite = sqliteTable("usage_records", {
2836
- id: text$1("id").primaryKey(),
2837
- runId: text$1("run_id"),
2838
- runKind: text$1("run_kind").$type(),
2839
- kind: text$1("kind").notNull(),
2840
- label: text$1("label").notNull(),
2841
- quantity: integer$1("quantity"),
2842
- unit: text$1("unit"),
2843
- amount: real("amount").notNull(),
2844
- metadata: text$1("metadata", { mode: "json" }),
2845
- entryType: text$1("entry_type").$type().notNull().default("usage"),
2846
- meterKey: text$1("meter_key"),
2847
- microCredits: integer$1("micro_credits"),
2848
- bucket: text$1("bucket").$type(),
2849
- reference: text$1("reference"),
2850
- createdAt: integer$1("created_at", { mode: "timestamp_ms" }).notNull()
2851
- }, (table) => [
2852
- index$1("usage_records_run_run_kind_idx").on(table.runId, table.runKind),
2853
- index$1("usage_records_kind_idx").on(table.kind),
2854
- index$1("usage_records_entry_type_created_at_idx").on(table.entryType, table.createdAt),
2855
- uniqueIndex$1("usage_records_entry_type_reference_unique").on(table.entryType, table.reference).where(sql`${table.reference} is not null`)
2856
- ]);
2857
2813
  const triggers = pgTable("triggers", {
2858
2814
  id: text("id").primaryKey(),
2859
2815
  projectId: text("project_id").notNull(),
@@ -3354,53 +3310,6 @@ const resourceActivitySqlite = sqliteTable("resource_activity", {
3354
3310
  lastOpenedAt: integer$1("last_opened_at", { mode: "timestamp_ms" }).notNull()
3355
3311
  }, (table) => [uniqueIndex$1("resource_activity_project_user_kind_resource").on(table.projectId, table.userId, table.resourceKind, table.resourceId), index$1("resource_activity_user_last_opened_at").on(table.userId, table.lastOpenedAt)]);
3356
3312
  /**
3357
- * Legacy org-runtime billing cache. Platform cloud financial authority now
3358
- * lives in `@keystrokehq/platform-database`; keep this table for existing org
3359
- * databases and pushed-down runtime plan hints, but do not add new billing
3360
- * writers here.
3361
- *
3362
- * Single-row prepaid credit wallet + pushed-down plan config for the org
3363
- * (the org runtime DB is per-org). Cache of `SUM(usage_records.microCredits)`,
3364
- * updated in the same transaction as each ledger insert. Cloud-only: standalone
3365
- * never writes it. All billing logic lives in `packages/cloud/*`.
3366
- */
3367
- const billingWallet$1 = pgTable("billing_wallet", {
3368
- organizationId: text("organization_id").primaryKey(),
3369
- planCreditMicroCredits: bigint("plan_credit_micro_credits", { mode: "number" }).notNull().default(0),
3370
- prepaidCreditMicroCredits: bigint("prepaid_credit_micro_credits", { mode: "number" }).notNull().default(0),
3371
- periodStart: timestamp("period_start", { withTimezone: true }),
3372
- periodEnd: timestamp("period_end", { withTimezone: true }),
3373
- planKey: text("plan_key"),
3374
- monthlyCreditMicroCredits: bigint("monthly_credit_micro_credits", { mode: "number" }),
3375
- includedStorageGb: integer("included_storage_gb"),
3376
- concurrencyLimit: integer("concurrency_limit"),
3377
- agentTimeoutMs: integer("agent_timeout_ms"),
3378
- workflowTimeoutMs: integer("workflow_timeout_ms"),
3379
- pollTimeoutMs: integer("poll_timeout_ms"),
3380
- logRetentionDays: integer("log_retention_days"),
3381
- autoTopupEnabled: integer("auto_topup_enabled").notNull().default(0),
3382
- autoTopupThresholdMicroCredits: bigint("auto_topup_threshold_micro_credits", { mode: "number" }),
3383
- updatedAt: timestamp("updated_at", { withTimezone: true }).notNull()
3384
- });
3385
- const billingWalletSqlite$1 = sqliteTable("billing_wallet", {
3386
- organizationId: text$1("organization_id").primaryKey(),
3387
- planCreditMicroCredits: integer$1("plan_credit_micro_credits").notNull().default(0),
3388
- prepaidCreditMicroCredits: integer$1("prepaid_credit_micro_credits").notNull().default(0),
3389
- periodStart: integer$1("period_start", { mode: "timestamp_ms" }),
3390
- periodEnd: integer$1("period_end", { mode: "timestamp_ms" }),
3391
- planKey: text$1("plan_key"),
3392
- monthlyCreditMicroCredits: integer$1("monthly_credit_micro_credits"),
3393
- includedStorageGb: integer$1("included_storage_gb"),
3394
- concurrencyLimit: integer$1("concurrency_limit"),
3395
- agentTimeoutMs: integer$1("agent_timeout_ms"),
3396
- workflowTimeoutMs: integer$1("workflow_timeout_ms"),
3397
- pollTimeoutMs: integer$1("poll_timeout_ms"),
3398
- logRetentionDays: integer$1("log_retention_days"),
3399
- autoTopupEnabled: integer$1("auto_topup_enabled").notNull().default(0),
3400
- autoTopupThresholdMicroCredits: integer$1("auto_topup_threshold_micro_credits"),
3401
- updatedAt: integer$1("updated_at", { mode: "timestamp_ms" }).notNull()
3402
- });
3403
- /**
3404
3313
  * Project server tables — Postgres (hosted) or SQLite (local dev).
3405
3314
  */
3406
3315
  const tableRegistry$1 = {
@@ -3416,10 +3325,6 @@ const tableRegistry$1 = {
3416
3325
  pg: agentEvents,
3417
3326
  sqlite: agentEventsSqlite
3418
3327
  },
3419
- usageRecords: {
3420
- pg: usageRecords,
3421
- sqlite: usageRecordsSqlite
3422
- },
3423
3328
  triggers: {
3424
3329
  pg: triggers,
3425
3330
  sqlite: triggersSqlite
@@ -3487,10 +3392,6 @@ const tableRegistry$1 = {
3487
3392
  resourceActivity: {
3488
3393
  pg: resourceActivity,
3489
3394
  sqlite: resourceActivitySqlite
3490
- },
3491
- billingWallet: {
3492
- pg: billingWallet$1,
3493
- sqlite: billingWalletSqlite$1
3494
3395
  }
3495
3396
  };
3496
3397
  buildPgSchema$1(tableRegistry$1);
@@ -31133,4 +31034,4 @@ async function emitStoredRouteManifestForProject(projectRoot) {
31133
31034
  //#endregion
31134
31035
  export { validatePollGroups as A, attachmentSlugFromRecord as B, pollRouteFromSourceSlug as C, validateAttachmentTargets as D, toStoredRouteManifest as E, webhookManifestAttachmentSchemasFromBindings as F, packAssetDirs as G, computeCallSiteIds as H, webhookMatchSchemaForBindings as I, entryIdFromFile as J, discoverEntries as K, webhookRouteFromEndpoint as L, validateTriggerAttachments as M, validateUniqueAttachmentSlugs as N, validateImportedTriggerAttachment as O, validateUniqueTriggerSourceSlugs as P, walkTypeScriptFiles as Q, workflowKeyForAttachment as R, pollGroupRouteFromId as S, serializeRouteManifest as T, diagnoseWorkflowSource as U, classifyCall as V, locateWorkflow as W, shouldSkipKeystrokeModuleFile as X, readKeystrokeIgnoreDirective as Y, validateUniqueModuleKeys as Z, importAgentDefinition as _, buildStoredRouteManifestForProject as a, persistStoredRouteManifest as b, collectAgentAppSlugs as c, discoverAgentEntries as d, discoverSkillManifestEntries as f, emitStoredRouteManifestForProject as g, discoverWorkflows as h, buildPollGroups as i, validateProjectModules as j, validateImportedWorkflowDefinition as k, collectAgentToolSlugs as l, discoverWorkflowEntries as m, agentManifestEntry as n, buildStoredRouteManifestFromContext as o, discoverTriggerAttachments as p, discoverModuleFileEntries as q, agentRouteFromKey as r, buildWebhookBindingsByRoute as s, agentKeyForAttachment as t, countAgentCredentials as u, importTriggerAttachments as v, schemaToJson as w, pollGroupId as x, importWorkflowDefinition as y, workflowRouteFromKey as z };
31135
31036
 
31136
- //# sourceMappingURL=dist-CMWayagw.mjs.map
31037
+ //# sourceMappingURL=dist-CBsyHVC6.mjs.map