@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/README.md +9 -9
- package/dist/bin.cjs +95 -58
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-GENTB3VO.js → chunk-DQOJ4S6H.js} +96 -59
- package/dist/chunk-DQOJ4S6H.js.map +1 -0
- package/dist/index.cjs +95 -58
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -5
- package/dist/index.d.ts +7 -5
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/skills/odla/references/sdks.md +5 -4
- package/dist/chunk-GENTB3VO.js.map +0 -1
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
|
-
*
|
|
869
|
-
* `
|
|
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
|
|
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
|
-
*
|
|
869
|
-
* `
|
|
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
|
|
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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odla-ai/cli",
|
|
3
|
-
"version": "0.27.
|
|
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 }); //
|
|
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
|
|
87
|
-
|
|
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
|
|