@odla-ai/cli 0.27.4 → 0.27.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.d.cts CHANGED
@@ -501,6 +501,8 @@ interface OdlaProjectConfig {
501
501
  publicRead?: string[];
502
502
  };
503
503
  ai?: {
504
+ /** Hosted is the default when omitted; provider-only legacy configs are BYOK. */
505
+ mode?: "hosted" | "byok";
504
506
  provider?: string;
505
507
  model?: string;
506
508
  /** Env var containing the provider key to store in the platform vault. */
@@ -829,7 +831,7 @@ interface DoctorOptions {
829
831
  * It then collects warnings for the mistakes provision can't fix silently: a
830
832
  * schema with no entities, a rules namespace with no matching entity, an
831
833
  * integration with incomplete rules or a seed targeting an unknown namespace, the `ai`
832
- * service enabled without an `ai.provider`, `auth.clerk` entries that reference
834
+ * BYOK service enabled without an `ai.provider`, `auth.clerk` entries that reference
833
835
  * an unset env var (`$FOO`), an `ai.keyEnv` that isn't set (provider key upload
834
836
  * will be skipped), and — when `o11y` is enabled — any env whose local
835
837
  * credentials lack an ingest token. It also folds in the shared rule linter,
@@ -864,9 +866,9 @@ interface InitOptions {
864
866
  * written when it doesn't already exist unless `force` is set (otherwise it
865
867
  * throws); the schema/rules files are written only when missing (never
866
868
  * overwritten, even with `force`). `appId` must match `^[a-z0-9][a-z0-9-]*$` or
867
- * it throws. Defaults: `envs` → `["dev"]`, `services` → `["db","ai"]`,
868
- * `aiProvider` `"anthropic"` (which also picks the `keyEnv`, e.g.
869
- * `ANTHROPIC_API_KEY`/`OPENAI_API_KEY`/`GOOGLE_API_KEY`).
869
+ * it throws. Defaults: `envs` → `["dev"]`, `services` → `["db","ai"]`, and
870
+ * platform-hosted AI. Passing `aiProvider` explicitly opts into BYOK and also
871
+ * picks its `keyEnv`.
870
872
  *
871
873
  * @param options.appId Slug for the app (lowercase alphanumerics and hyphens).
872
874
  * @param options.name Human-readable app name embedded in the config.
@@ -874,7 +876,7 @@ interface InitOptions {
874
876
  * @param options.configPath Config filename relative to root (default `odla.config.mjs`).
875
877
  * @param options.envs Environment names (default `["dev"]`; production is an explicit opt-in).
876
878
  * @param options.services Enabled services (default `["db","ai"]`).
877
- * @param options.aiProvider AI provider slug (default `"anthropic"`).
879
+ * @param options.aiProvider Optional provider slug; supplying it opts into BYOK.
878
880
  * @param options.force Overwrite an existing config file instead of throwing.
879
881
  * @param options.stdout Optional console-like sink (defaults to `console`).
880
882
  */
package/dist/index.d.ts CHANGED
@@ -501,6 +501,8 @@ interface OdlaProjectConfig {
501
501
  publicRead?: string[];
502
502
  };
503
503
  ai?: {
504
+ /** Hosted is the default when omitted; provider-only legacy configs are BYOK. */
505
+ mode?: "hosted" | "byok";
504
506
  provider?: string;
505
507
  model?: string;
506
508
  /** Env var containing the provider key to store in the platform vault. */
@@ -829,7 +831,7 @@ interface DoctorOptions {
829
831
  * It then collects warnings for the mistakes provision can't fix silently: a
830
832
  * schema with no entities, a rules namespace with no matching entity, an
831
833
  * integration with incomplete rules or a seed targeting an unknown namespace, the `ai`
832
- * service enabled without an `ai.provider`, `auth.clerk` entries that reference
834
+ * BYOK service enabled without an `ai.provider`, `auth.clerk` entries that reference
833
835
  * an unset env var (`$FOO`), an `ai.keyEnv` that isn't set (provider key upload
834
836
  * will be skipped), and — when `o11y` is enabled — any env whose local
835
837
  * credentials lack an ingest token. It also folds in the shared rule linter,
@@ -864,9 +866,9 @@ interface InitOptions {
864
866
  * written when it doesn't already exist unless `force` is set (otherwise it
865
867
  * throws); the schema/rules files are written only when missing (never
866
868
  * overwritten, even with `force`). `appId` must match `^[a-z0-9][a-z0-9-]*$` or
867
- * it throws. Defaults: `envs` → `["dev"]`, `services` → `["db","ai"]`,
868
- * `aiProvider` `"anthropic"` (which also picks the `keyEnv`, e.g.
869
- * `ANTHROPIC_API_KEY`/`OPENAI_API_KEY`/`GOOGLE_API_KEY`).
869
+ * it throws. Defaults: `envs` → `["dev"]`, `services` → `["db","ai"]`, and
870
+ * platform-hosted AI. Passing `aiProvider` explicitly opts into BYOK and also
871
+ * picks its `keyEnv`.
870
872
  *
871
873
  * @param options.appId Slug for the app (lowercase alphanumerics and hyphens).
872
874
  * @param options.name Human-readable app name embedded in the config.
@@ -874,7 +876,7 @@ interface InitOptions {
874
876
  * @param options.configPath Config filename relative to root (default `odla.config.mjs`).
875
877
  * @param options.envs Environment names (default `["dev"]`; production is an explicit opt-in).
876
878
  * @param options.services Enabled services (default `["db","ai"]`).
877
- * @param options.aiProvider AI provider slug (default `"anthropic"`).
879
+ * @param options.aiProvider Optional provider slug; supplying it opts into BYOK.
878
880
  * @param options.force Overwrite an existing config file instead of throwing.
879
881
  * @param options.stdout Optional console-like sink (defaults to `console`).
880
882
  */
package/dist/index.js CHANGED
@@ -57,7 +57,7 @@ import {
57
57
  startHostedSecurityJob,
58
58
  surfacePaths,
59
59
  validateInvocation
60
- } from "./chunk-GENTB3VO.js";
60
+ } from "./chunk-DQOJ4S6H.js";
61
61
  export {
62
62
  AGENT_HARNESSES,
63
63
  CAPABILITIES,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odla-ai/cli",
3
- "version": "0.27.4",
3
+ "version": "0.27.5",
4
4
  "description": "Agent-operable CLI for odla provisioning, calendar consent and sync lifecycle, System AI administration, Worker secrets, security jobs, and smoke checks.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://odla.ai/docs/packages/cli",
@@ -79,12 +79,13 @@ re-run `calendar connect`.
79
79
  ## @odla-ai/ai — inference (Claude / GPT / Gemini)
80
80
 
81
81
  ```ts
82
- const { ai } = await initFromPlatform({ platform, appId, env, db });
83
- await ai.chat({ messages }); // provider/model + key resolved from the platform vault
82
+ const { ai } = await initFromPlatform({ platform, appId, env, appKey, db });
83
+ await ai.chat({ messages, maxTokens: 512 }); // approved hosted model; db supports BYOK fallback
84
84
  ```
85
85
 
86
- No API key in your code or env it lives in the tenant vault; `provision`
87
- stores it when the configured `ai.keyEnv` is set at provision time.
86
+ No provider key in your code or env. Hosted AI uses the app's existing backend
87
+ key and central cost attribution; `--ai-provider` explicitly opts a new config
88
+ into BYOK.
88
89
 
89
90
  ## @odla-ai/crm — records, pipelines, follow-ups, and contactability
90
91