@opengeni/core 6.8.0 → 6.9.1-canary.41937124785001

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.
Files changed (52) hide show
  1. package/dist/billing/agent-run-admission.d.ts +3 -3
  2. package/dist/billing/limits.d.ts +1 -1
  3. package/dist/billing/model-call-admission.d.ts +1 -1
  4. package/dist/{chunk-VT3NKKQA.js → chunk-XWAOK55C.js} +527 -42
  5. package/dist/chunk-XWAOK55C.js.map +1 -0
  6. package/dist/default-session-model.d.ts +4 -1
  7. package/dist/developer-setup-credential-ceiling.d.ts +10 -0
  8. package/dist/domain/credential-profiles.d.ts +1 -3
  9. package/dist/domain/realtime-voice-billing.d.ts +1 -1
  10. package/dist/domain/session-secret-redaction-matchers.d.ts +23 -17
  11. package/dist/domain/session-tool-policy.d.ts +9 -2
  12. package/dist/domain/vaults/index.d.ts +1 -3
  13. package/dist/domain/vaults/provider-writes.d.ts +1 -3
  14. package/dist/domain/vaults/vault-service.d.ts +1 -27
  15. package/dist/goal-admission.d.ts +1 -0
  16. package/dist/index.js +949 -1414
  17. package/dist/index.js.map +1 -1
  18. package/dist/transcription-service/deployment.d.ts +6 -1
  19. package/dist/transcription-service/index.js +18 -2
  20. package/dist/transcription-service/index.js.map +1 -1
  21. package/dist/transcription-service/providers/subscription-core.d.ts +6 -0
  22. package/dist/transcription.d.ts +5 -1
  23. package/package.json +18 -17
  24. package/src/billing/agent-run-admission.ts +16 -9
  25. package/src/billing/limits.ts +31 -2
  26. package/src/billing/model-call-admission.ts +9 -0
  27. package/src/billing-origin.ts +2 -1
  28. package/src/default-session-model.ts +20 -0
  29. package/src/developer-setup-credential-ceiling.ts +27 -3
  30. package/src/domain/capabilities.ts +41 -31
  31. package/src/domain/credential-profiles.ts +1 -3
  32. package/src/domain/realtime-voice-billing.ts +16 -1
  33. package/src/domain/session-secret-redaction-matchers.test.ts +2 -23
  34. package/src/domain/session-secret-redaction-matchers.ts +203 -41
  35. package/src/domain/session-tool-policy.ts +50 -3
  36. package/src/domain/sessions.ts +87 -1
  37. package/src/domain/vaults/index.ts +1 -14
  38. package/src/domain/vaults/provider-writes.ts +2 -26
  39. package/src/domain/vaults/vault-service.ts +2 -170
  40. package/src/goal-admission.ts +5 -0
  41. package/src/transcription-service/deployment.ts +44 -3
  42. package/src/transcription-service/providers/codex-subscription.ts +2 -0
  43. package/src/transcription-service/providers/subscription-core.ts +24 -0
  44. package/src/transcription-service/service.ts +18 -1
  45. package/src/transcription.ts +9 -1
  46. package/dist/chunk-VT3NKKQA.js.map +0 -1
  47. package/dist/domain/vaults/captured-secret-values.d.ts +0 -28
  48. package/dist/domain/vaults/plain-field-hints.d.ts +0 -17
  49. package/dist/domain/vaults/used-secret-values.d.ts +0 -25
  50. package/src/domain/vaults/captured-secret-values.ts +0 -173
  51. package/src/domain/vaults/plain-field-hints.ts +0 -40
  52. package/src/domain/vaults/used-secret-values.ts +0 -104
@@ -9,7 +9,7 @@ export type AgentRunAdmissionDenial = "insufficient_credits"
9
9
  /** The same on the Free plan, where upgrading is the fix. */
10
10
  | "byok_upgrade_required"
11
11
  /** The person's own subscription needs a paid plan (Pro or higher). */
12
- | "subscription_plan_required" | "allowance_exhausted" | "monthly_model_cost_limit" | "monthly_agent_run_limit";
12
+ | "subscription_plan_required" | "subscription_api_unavailable" | "allowance_exhausted" | "monthly_model_cost_limit" | "monthly_agent_run_limit";
13
13
  /** Read-only admission shared by service-authored runs and goal Resume. */
14
14
  export declare function agentRunAdmissionDenial(services: {
15
15
  db: Database;
@@ -27,8 +27,8 @@ export declare function agentRunAdmissionDenial(services: {
27
27
  turnId: string;
28
28
  };
29
29
  /**
30
- * Who pays: API work needs credits; plan credit never pays for it. A
31
- * resolver is read only when credits decide admission.
30
+ * Who pays: API work needs credits and cannot use subscriptions. A
31
+ * resolver reads the accepted work's frozen origin once for admission.
32
32
  */
33
33
  billingOrigin?: BillingOrigin | null | (() => Promise<BillingOrigin | null>);
34
34
  }): Promise<AgentRunAdmissionDenial | null>;
@@ -60,7 +60,7 @@ export declare function checkByokPaidCredit(deps: Pick<LimitDependencies, "db">,
60
60
  * Own-subscription admission: unlimited use on a paid plan of at least $20 a
61
61
  * month, refused on Free with the one action that fixes it (upgrading).
62
62
  */
63
- export declare function checkOwnSubscriptionPlan(deps: Pick<LimitDependencies, "db" | "settings">, accountId: string): Promise<LimitDecision>;
63
+ export declare function checkOwnSubscriptionPlan(deps: Pick<LimitDependencies, "db" | "settings">, accountId: string, billingOrigin?: BillingOrigin | null): Promise<LimitDecision>;
64
64
  export declare function recordWorkspaceUsage(deps: LimitDependencies, input: {
65
65
  accountId: string;
66
66
  workspaceId: string;
@@ -1,7 +1,7 @@
1
1
  import { type Settings } from "@opengeni/config";
2
2
  import { type BillingOrigin, type EntitlementsPort } from "@opengeni/contracts";
3
3
  import { type Database } from "@opengeni/db";
4
- export type ModelCallAdmissionDenial = "insufficient_credits" | "allowance_exhausted" | "monthly_model_cost_limit" | "monthly_token_limit";
4
+ export type ModelCallAdmissionDenial = "subscription_api_unavailable" | "insufficient_credits" | "allowance_exhausted" | "monthly_model_cost_limit" | "monthly_token_limit";
5
5
  export type ModelCallAdmission = {
6
6
  allowed: true;
7
7
  creditPolicyRevision: number | undefined;