@odla-ai/cli 0.33.0 → 0.34.1
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 +204 -112
- package/REQUIREMENTS.md +6 -0
- package/dist/bin.cjs +1027 -527
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-YSQORU5J.js → chunk-RUEM7ZTA.js} +998 -523
- package/dist/chunk-RUEM7ZTA.js.map +1 -0
- package/dist/{cli-U436OLYW.js → cli-NKNQLWOM.js} +2 -2
- package/dist/index.cjs +1001 -524
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +173 -4
- package/dist/index.d.ts +173 -4
- package/dist/index.js +5 -1
- package/package.json +2 -2
- package/skills/odla/SKILL.md +65 -35
- package/skills/odla/references/agent-identity.md +5 -5
- package/skills/odla/references/build.md +16 -15
- package/skills/odla/references/co-owners.md +1 -1
- package/skills/odla/references/pm-work-intake.md +12 -12
- package/skills/odla/references/pm.md +17 -17
- package/skills/odla/references/sdks.md +2 -2
- package/skills/odla-migrate/SKILL.md +23 -5
- package/skills/odla-migrate/references/phase-2-chapter.md +1 -1
- package/skills/odla-migrate/references/phase-2-db.md +11 -10
- package/skills/odla-migrate/references/phase-3-auth.md +2 -2
- package/skills/odla-migrate/references/phase-3b-user-sync.md +2 -2
- package/skills/odla-migrate/references/phase-4-ai.md +3 -3
- package/skills/odla-migrate/references/phase-5-cutover.md +5 -5
- package/skills/odla-migrate/references/project-state.md +4 -4
- package/skills/odla-migrate/references/secrets-map.md +6 -6
- package/skills/odla-migrate/references/troubleshooting.md +23 -23
- package/skills/odla-o11y-debug/SKILL.md +3 -3
- package/dist/chunk-YSQORU5J.js.map +0 -1
- /package/dist/{cli-U436OLYW.js.map → cli-NKNQLWOM.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -250,10 +250,10 @@ declare function adminAi(options: AdminAiOptions): Promise<void>;
|
|
|
250
250
|
/** Stable, machine-readable division of work between the CLI, coding agent,
|
|
251
251
|
* human operator, and Studio. Printed by `odla-ai capabilities --json`. */
|
|
252
252
|
declare const CAPABILITIES: {
|
|
253
|
-
readonly cli: readonly ["start an email-bound device request without accepting a password or user session token", "register the app and enable configured services per environment", "issue, persist, and explicitly rotate configured service credentials", "add or remove app co-owners, each of whom self-provisions their own credentials for the shared db without any secret handoff", "write local Worker values and push deployed Worker secrets through Wrangler stdin", "store tenant-vault secrets (including the Clerk webhook secret and reserved Clerk secret key) write-only from stdin or an env var", "compose declared app-capability schema/rules, create guarded seeds when absent, and configure platform AI, auth, and deployment links", "apply Google Calendar booking config, then drive state-bound consent, status, discovery, and disconnect flows (bookings run live through the platform proxy)", "validate integration contracts offline and smoke-test a provisioned db environment plus anonymous capability routes", "save and explicitly select non-secret named operator contexts with isolated credential caches; resolve and explain platform, app, environment, and credential provenance without authenticating; then run PM, Discussions, o11y, runbook, and identity operations outside a project checkout", "read one versioned o11y status envelope spanning application RED, exact Worker versions and Cloudflare colos observed in traffic, current live-sync freshness/load, the protected commit-to-visible canary, collector ingest/scheduler trust, provider-owned runtime metrics, account-scoped Durable Object, D1, and R2 evidence under odla-db, and a bounded machine verdict", "read one canonical platform fleet snapshot over private service bindings, including release identities, probe latency, Cloudflare load/runtime freshness, explicit unknowns, and stable next actions through a read-only capability", "compare one project's checked-in Registry intent with live owner-visible state, freeze a secret-free Registry-revision-bound plan through app:config:read, and conditionally apply checkpoint-free actions through exact app:config:write operation routes", "inspect or bounded-wait one exact durable config-operation journal entry and verify every terminal receipt digest before returning it to remote automation", "inspect durable agent wakeups as a versioned JSON envelope and explicitly requeue one dead-lettered job with a scoped environment credential", "run app-attributed hosted security discovery and independent validation without provider keys", "connect/revoke source-read-only GitHub sources and drive commit-pinned hosted security jobs without PATs or provider keys", "let admins manage system AI policy and credentials, inspect attributed usage, and read immutable admin changes through separate short-lived capability-only approvals"];
|
|
254
|
-
readonly agent: readonly ["install and import the selected odla SDKs", "wrap the Worker with withObservability and choose useful telemetry", "install capability packages, mount their runtime routes, and make application-specific schema, rules, auth, UI, and migration decisions", "wire @odla-ai/calendar into trusted Worker code and keep the app admin key out of browsers"];
|
|
253
|
+
readonly cli: readonly ["start an email-bound device request without accepting a password or user session token", "register the app and enable configured services per environment", "issue, persist, and explicitly rotate configured service credentials", "add or remove app co-owners, each of whom self-provisions their own credentials for the shared db without any secret handoff", "write local Worker values and push deployed Worker secrets through Wrangler stdin", "store tenant-vault secrets (including the Clerk webhook secret and reserved Clerk secret key) write-only from stdin or an env var", "compose declared app-capability schema/rules, create guarded seeds when absent, and configure platform AI, auth, and deployment links", "apply Google Calendar booking config, then drive state-bound consent, status, discovery, and disconnect flows (bookings run live through the platform proxy)", "validate integration contracts offline and smoke-test a provisioned db environment plus anonymous capability routes", "save and explicitly select non-secret named operator contexts with isolated credential caches; resolve and explain platform, app, environment, and credential provenance without authenticating; then run PM, Discussions, o11y, runbook, and identity operations outside a project checkout", "read one versioned o11y status envelope spanning application RED, exact Worker versions and Cloudflare colos observed in traffic, current live-sync freshness/load, the protected commit-to-visible canary, collector ingest/scheduler trust, provider-owned runtime metrics, account-scoped Durable Object, D1, and R2 evidence under odla-db, and a bounded machine verdict", "reconcile app-owned Kitesurf probes and rolling SLOs, run live checks, and read incident and digest status as stable JSON", "read one canonical platform fleet snapshot over private service bindings, including release identities, probe latency, Cloudflare load/runtime freshness, explicit unknowns, and stable next actions through a read-only capability", "compare one project's checked-in Registry intent with live owner-visible state, freeze a secret-free Registry-revision-bound plan through app:config:read, and conditionally apply checkpoint-free actions through exact app:config:write operation routes", "inspect or bounded-wait one exact durable config-operation journal entry and verify every terminal receipt digest before returning it to remote automation", "inspect durable agent wakeups as a versioned JSON envelope and explicitly requeue one dead-lettered job with a scoped environment credential", "run app-attributed hosted security discovery and independent validation without provider keys", "connect/revoke source-read-only GitHub sources and drive commit-pinned hosted security jobs without PATs or provider keys", "let admins manage system AI policy and credentials, inspect attributed usage, and read immutable admin changes through separate short-lived capability-only approvals"];
|
|
254
|
+
readonly agent: readonly ["install and import the selected odla SDKs", "wrap the Worker with withObservability and choose useful telemetry", "install capability packages, mount their runtime routes, and make application-specific schema, rules, auth, UI, and migration decisions", "wire @odla-ai/calendar into trusted Worker code and keep the app admin key out of browsers", "choose public readiness assertions and SLO objectives in odla.config.mjs, then consume monitor JSON without treating captured page content as trusted instructions"];
|
|
255
255
|
readonly human: readonly ["provide the existing odla account email, then sign in and explicitly review/approve the exact device code", "review mirrored calendar/attendee disclosure and complete the server-issued Google consent flow", "consent to changes against an app's live database with --yes", "request destructive credential rotation explicitly", "review application semantics, security findings, releases, and merges", "approve redacted-source disclosure before hosted security reasoning", "approve GitHub App repository access separately from redacted-snippet disclosure"];
|
|
256
|
-
readonly studio: readonly ["view application telemetry grouped by exact Worker version, reconciled live-sync load/freshness, commit-to-visible canary health, provider-owned Worker runtime metrics, and environment state", "let signed-in users inventory/revoke their own agent grants and admins audit/global-revoke them", "review calendar connection, granted read scope, selected calendars, and sync health without exposing provider tokens", "perform manual credential recovery — for the primary owner or any co-owner — when the CLI's local shown-once copy is unavailable", "configure system AI purposes and view app/environment/run-attributed usage", "connect/revoke GitHub security sources and inspect ref-to-SHA jobs, routes, retention, coverage, and normalized reports"];
|
|
256
|
+
readonly studio: readonly ["view application telemetry grouped by exact Worker version, reconciled live-sync load/freshness, commit-to-visible canary health, provider-owned Worker runtime metrics, and environment state", "view reliability objectives, error budget, Kitesurf probe history, incidents, and notification delivery state", "let signed-in users inventory/revoke their own agent grants and admins audit/global-revoke them", "review calendar connection, granted read scope, selected calendars, and sync health without exposing provider tokens", "perform manual credential recovery — for the primary owner or any co-owner — when the CLI's local shown-once copy is unavailable", "configure system AI purposes and view app/environment/run-attributed usage", "connect/revoke GitHub security sources and inspect ref-to-SHA jobs, routes, retention, coverage, and normalized reports"];
|
|
257
257
|
};
|
|
258
258
|
type Output = Pick<typeof console, "log">;
|
|
259
259
|
/** Print the stable responsibility boundary for humans or agent tooling. */
|
|
@@ -495,6 +495,96 @@ interface GoogleCalendarConfig {
|
|
|
495
495
|
interface CalendarConfig {
|
|
496
496
|
google: GoogleCalendarConfig;
|
|
497
497
|
}
|
|
498
|
+
/** One deterministic, anonymous Kitesurf journey against an environment link.
|
|
499
|
+
* Routes are always relative to `links.<env>`; arbitrary origins and executable
|
|
500
|
+
* JavaScript are deliberately outside the monitoring contract. */
|
|
501
|
+
interface MonitoringProbeConfig {
|
|
502
|
+
/** Stable id used by SLO indicators and retained run history. */
|
|
503
|
+
id: string;
|
|
504
|
+
/** Absolute path beneath the configured environment link. */
|
|
505
|
+
route: string;
|
|
506
|
+
/** Environments in which this probe is active. Defaults to every configured env. */
|
|
507
|
+
envs?: OdlaEnvName[];
|
|
508
|
+
/** Fixed cadence. The collector's one-minute scheduler executes due probes. */
|
|
509
|
+
every: "1m" | "2m" | "5m" | "10m" | "15m" | "30m" | "1h";
|
|
510
|
+
/** Navigation timeout in milliseconds, from 1,000 through 60,000. */
|
|
511
|
+
timeout?: number;
|
|
512
|
+
/** Optional DOM readiness signal passed to the Kitesurf snapshot action. */
|
|
513
|
+
ready?: {
|
|
514
|
+
selector: string;
|
|
515
|
+
};
|
|
516
|
+
/** Declarative assertions; monitoring config cannot inject arbitrary scripts. */
|
|
517
|
+
expect: {
|
|
518
|
+
status: number;
|
|
519
|
+
titleIncludes?: string;
|
|
520
|
+
textIncludes?: string[];
|
|
521
|
+
accessibility?: Array<{
|
|
522
|
+
role: string;
|
|
523
|
+
name: string;
|
|
524
|
+
}>;
|
|
525
|
+
};
|
|
526
|
+
enabled?: boolean;
|
|
527
|
+
}
|
|
528
|
+
/** The probe or existing-o11y signal whose scheduled observations determine one SLO's good, bad, or unknown events. */
|
|
529
|
+
type MonitoringIndicatorConfig = {
|
|
530
|
+
type: "probe-success";
|
|
531
|
+
probes: string[];
|
|
532
|
+
} | {
|
|
533
|
+
/** A bounded observation of an existing o11y performance signal. Each
|
|
534
|
+
* scheduled observation is one exact SLO event, including no-data as an
|
|
535
|
+
* unknown monitoring event rather than a successful application event. */
|
|
536
|
+
type: "o11y-metric";
|
|
537
|
+
metric: "error_rate" | "latency_p95" | "synthetic_success" | "synthetic_publish_to_visible";
|
|
538
|
+
comparator: "gt" | "gte" | "lt" | "lte";
|
|
539
|
+
threshold: number;
|
|
540
|
+
every: "1m" | "2m" | "5m" | "10m" | "15m" | "30m" | "1h";
|
|
541
|
+
observationWindow: "1m" | "2m" | "5m" | "10m" | "15m" | "30m" | "1h";
|
|
542
|
+
route?: string;
|
|
543
|
+
};
|
|
544
|
+
/** One rolling objective over exact scheduled Kitesurf or existing-o11y outcomes. */
|
|
545
|
+
interface MonitoringSloConfig {
|
|
546
|
+
id: string;
|
|
547
|
+
name?: string;
|
|
548
|
+
indicator: MonitoringIndicatorConfig;
|
|
549
|
+
/** Good-event objective as a fraction, for example 0.999. */
|
|
550
|
+
target: number;
|
|
551
|
+
window: "7d" | "28d" | "30d";
|
|
552
|
+
alerts?: {
|
|
553
|
+
/** Immediate outage detector. Defaults to two bad checks among the last three. */
|
|
554
|
+
spike?: {
|
|
555
|
+
badChecks?: number;
|
|
556
|
+
withinChecks?: number;
|
|
557
|
+
recoverAfter?: number;
|
|
558
|
+
};
|
|
559
|
+
/** Multi-window error-budget detector for sustained degradation. */
|
|
560
|
+
trend?: {
|
|
561
|
+
burnRate?: number;
|
|
562
|
+
shortWindow?: "30m" | "1h" | "6h" | "12h" | "1d";
|
|
563
|
+
longWindow?: "1d" | "3d" | "7d";
|
|
564
|
+
minBadChecks?: number;
|
|
565
|
+
};
|
|
566
|
+
};
|
|
567
|
+
enabled?: boolean;
|
|
568
|
+
}
|
|
569
|
+
/** Email subscriptions for one app environment. Immediate incident mail is
|
|
570
|
+
* always enabled when recipients are present; digests are independently
|
|
571
|
+
* scheduled in the named IANA timezone. */
|
|
572
|
+
interface MonitoringNotificationConfig {
|
|
573
|
+
email: string[];
|
|
574
|
+
timezone: string;
|
|
575
|
+
daily?: string | false;
|
|
576
|
+
weekly?: {
|
|
577
|
+
day: "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
|
|
578
|
+
at: string;
|
|
579
|
+
} | false;
|
|
580
|
+
}
|
|
581
|
+
/** Repository-owned probes, SLO policies, and per-environment reliability notification schedules. */
|
|
582
|
+
interface MonitoringConfig {
|
|
583
|
+
/** Optional when every SLO consumes an existing o11y metric. */
|
|
584
|
+
probes?: MonitoringProbeConfig[];
|
|
585
|
+
slos: MonitoringSloConfig[];
|
|
586
|
+
notifications?: Record<OdlaEnvName, MonitoringNotificationConfig>;
|
|
587
|
+
}
|
|
498
588
|
/** Canonical, environment-specific config sent to the calendar controller. */
|
|
499
589
|
interface CalendarServiceConfig extends Record<string, unknown> {
|
|
500
590
|
provider: "google";
|
|
@@ -548,6 +638,8 @@ interface OdlaProjectConfig {
|
|
|
548
638
|
endpoint?: string;
|
|
549
639
|
/** Release tag stamped on emitted signals. */
|
|
550
640
|
version?: string;
|
|
641
|
+
/** Repository-owned live probes, rolling SLOs, and email subscriptions. */
|
|
642
|
+
monitoring?: MonitoringConfig;
|
|
551
643
|
};
|
|
552
644
|
auth?: {
|
|
553
645
|
clerk?: Record<OdlaEnvName, ClerkAuthConfig | string | null | undefined>;
|
|
@@ -1304,4 +1396,81 @@ declare function installSkill(options?: SkillInstallOptions): SkillInstallResult
|
|
|
1304
1396
|
*/
|
|
1305
1397
|
declare function smoke(options: SmokeOptions): Promise<void>;
|
|
1306
1398
|
|
|
1307
|
-
|
|
1399
|
+
type OptionValue = string | boolean | string[];
|
|
1400
|
+
interface ParsedArgv {
|
|
1401
|
+
positionals: string[];
|
|
1402
|
+
options: Record<string, OptionValue>;
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
/** Repository-controlled Kitesurf probe/SLO operations. Read actions accept
|
|
1406
|
+
* projectless operator context; plan/apply require odla.config.mjs because it
|
|
1407
|
+
* remains the desired-state authority. */
|
|
1408
|
+
declare function monitorCommand(parsed: ParsedArgv, deps?: CliDependencies): Promise<void>;
|
|
1409
|
+
|
|
1410
|
+
/** Normalized, revision-addressed monitoring policy sent from the CLI to the o11y collector for one environment. */
|
|
1411
|
+
interface MonitoringWireConfig {
|
|
1412
|
+
revision: `sha256:${string}`;
|
|
1413
|
+
environment: string;
|
|
1414
|
+
baseUrl: string;
|
|
1415
|
+
probes: Array<{
|
|
1416
|
+
id: string;
|
|
1417
|
+
route: string;
|
|
1418
|
+
cadenceMinutes: number;
|
|
1419
|
+
timeoutMs: number;
|
|
1420
|
+
readySelector?: string;
|
|
1421
|
+
expect: {
|
|
1422
|
+
status: number;
|
|
1423
|
+
titleIncludes?: string;
|
|
1424
|
+
textIncludes: string[];
|
|
1425
|
+
accessibility: Array<{
|
|
1426
|
+
role: string;
|
|
1427
|
+
name: string;
|
|
1428
|
+
}>;
|
|
1429
|
+
};
|
|
1430
|
+
enabled: boolean;
|
|
1431
|
+
}>;
|
|
1432
|
+
slos: Array<{
|
|
1433
|
+
id: string;
|
|
1434
|
+
name: string;
|
|
1435
|
+
indicator: {
|
|
1436
|
+
type: "probe-success";
|
|
1437
|
+
probes: string[];
|
|
1438
|
+
} | {
|
|
1439
|
+
type: "o11y-metric";
|
|
1440
|
+
metric: "error_rate" | "latency_p95" | "synthetic_success" | "synthetic_publish_to_visible";
|
|
1441
|
+
comparator: "gt" | "gte" | "lt" | "lte";
|
|
1442
|
+
threshold: number;
|
|
1443
|
+
cadenceMinutes: number;
|
|
1444
|
+
observationWindowMinutes: number;
|
|
1445
|
+
route?: string;
|
|
1446
|
+
};
|
|
1447
|
+
target: number;
|
|
1448
|
+
windowMinutes: number;
|
|
1449
|
+
spike: {
|
|
1450
|
+
badChecks: number;
|
|
1451
|
+
withinChecks: number;
|
|
1452
|
+
recoverAfter: number;
|
|
1453
|
+
};
|
|
1454
|
+
trend: {
|
|
1455
|
+
burnRate: number;
|
|
1456
|
+
shortMinutes: number;
|
|
1457
|
+
longMinutes: number;
|
|
1458
|
+
minBadChecks: number;
|
|
1459
|
+
};
|
|
1460
|
+
enabled: boolean;
|
|
1461
|
+
}>;
|
|
1462
|
+
notifications?: {
|
|
1463
|
+
email: string[];
|
|
1464
|
+
timezone: string;
|
|
1465
|
+
daily: string | false;
|
|
1466
|
+
weekly: {
|
|
1467
|
+
day: string;
|
|
1468
|
+
at: string;
|
|
1469
|
+
} | false;
|
|
1470
|
+
};
|
|
1471
|
+
}
|
|
1472
|
+
/** Resolve repository monitoring intent for one environment into the bounded
|
|
1473
|
+
* collector wire document. The digest covers the exact normalized payload. */
|
|
1474
|
+
declare function monitoringWireConfig(cfg: LoadedProjectConfig, env: string): MonitoringWireConfig;
|
|
1475
|
+
|
|
1476
|
+
export { AGENT_HARNESSES, type AdminAiOptions, type AgentHarness, type AgentHarnessSelector, type AiModelsOptions, type AvailableGoogleCalendar, CAPABILITIES, CODE_BUILD_RECIPES, COMMAND_SURFACE, type CalendarConfig, type CalendarConnectionState, type CalendarLifecycleOptions, type CalendarServiceConfig, type CalendarStatus, type CliDependencies, type CodeBuildRule, type CodeConnectOptions, type CodeContainerEngine, type CodeHostCapabilities, type CodeLocalSourceDescriptor, type CodeRuntimeInput, type ConfigApplyOptions, type ConfigCoverage, type ConfigDiffDocument, type ConfigDifference, type ConfigDigest, type ConfigDrift, type ConfigInspectOptions, ConfigOperationCommandError, type ConfigOperationInspectOptions, type ConfigOperationResult, type ConfigPlanAction, type ConfigPlanDocument, type ConfigReconciliation, type ConfigRisk, type ConfigSource, type ConnectGitHubSecuritySourceOptions, type DesiredRegistryState, type DisconnectGitHubSecuritySourceOptions, type FollowHostedSecurityJobOptions, GOOGLE_CALENDAR_EVENTS_SCOPE, type GetHostedSecurityIntentOptions, type GetHostedSecurityJobOptions, type GoogleCalendarConfig, type HarnessInstallResult, type HostedSecurityProfile, type HostedSecurityResult, type HostedSecurityTokenRequest, type IntegrationProbe, type IntegrationSeed, type InvocationProblem, type ListGitHubSecuritySourcesOptions, type ListHostedSecurityJobsOptions, type LoadedProjectConfig, type LocalCredentials, type MonitoringConfig, type MonitoringIndicatorConfig, type MonitoringNotificationConfig, type MonitoringProbeConfig, type MonitoringSloConfig, type MonitoringWireConfig, type OdlaIntegration, type OdlaProjectConfig, type ProvisionOptions, type ProvisionPlan, type ReconciliationInput, type RunHostedSecurityOptions, SYSTEM_AI_PURPOSES, type ScopedPlatformTokenOptions, type SecretsPushOptions, type SecretsSetOptions, type SkillInstallOptions, type SkillInstallResult, type SmokeOptions, type StartHostedSecurityJobOptions, type SurfaceNode, type SystemAiPurpose, acceptedAfter, adminAi, aiModels, calendarBookingPageUrl, calendarCalendars, calendarConnect, calendarDisconnect, calendarServiceConfig, calendarStatus, codeConnect, configApply, configDiff, configOperationGet, configOperationWait, configPlan, connectGitHubSecuritySource, describeProblem, desiredRegistryState, disconnectGitHubSecuritySource, doctor, exitCodeFor, followHostedSecurityJob, getHostedSecurityIntent, getHostedSecurityJob, getHostedSecurityPlan, getHostedSecurityReport, getScopedPlatformToken, inferGitHubRepository, initProject, installSkill, invocationPath, isTerminalHostedSecurityStatus, listGitHubSecuritySources, listHostedSecurityJobs, monitorCommand, monitoringWireConfig, printCapabilities, provision, reconcileConfig, redactSecrets, repositoryFromGitRemote, runCli, runCodeRuntime, runHostedSecurity, secretsPush, secretsSet, secretsSetClerkKey, smoke, startHostedSecurityJob, surfacePaths, validateInvocation };
|
package/dist/index.d.ts
CHANGED
|
@@ -250,10 +250,10 @@ declare function adminAi(options: AdminAiOptions): Promise<void>;
|
|
|
250
250
|
/** Stable, machine-readable division of work between the CLI, coding agent,
|
|
251
251
|
* human operator, and Studio. Printed by `odla-ai capabilities --json`. */
|
|
252
252
|
declare const CAPABILITIES: {
|
|
253
|
-
readonly cli: readonly ["start an email-bound device request without accepting a password or user session token", "register the app and enable configured services per environment", "issue, persist, and explicitly rotate configured service credentials", "add or remove app co-owners, each of whom self-provisions their own credentials for the shared db without any secret handoff", "write local Worker values and push deployed Worker secrets through Wrangler stdin", "store tenant-vault secrets (including the Clerk webhook secret and reserved Clerk secret key) write-only from stdin or an env var", "compose declared app-capability schema/rules, create guarded seeds when absent, and configure platform AI, auth, and deployment links", "apply Google Calendar booking config, then drive state-bound consent, status, discovery, and disconnect flows (bookings run live through the platform proxy)", "validate integration contracts offline and smoke-test a provisioned db environment plus anonymous capability routes", "save and explicitly select non-secret named operator contexts with isolated credential caches; resolve and explain platform, app, environment, and credential provenance without authenticating; then run PM, Discussions, o11y, runbook, and identity operations outside a project checkout", "read one versioned o11y status envelope spanning application RED, exact Worker versions and Cloudflare colos observed in traffic, current live-sync freshness/load, the protected commit-to-visible canary, collector ingest/scheduler trust, provider-owned runtime metrics, account-scoped Durable Object, D1, and R2 evidence under odla-db, and a bounded machine verdict", "read one canonical platform fleet snapshot over private service bindings, including release identities, probe latency, Cloudflare load/runtime freshness, explicit unknowns, and stable next actions through a read-only capability", "compare one project's checked-in Registry intent with live owner-visible state, freeze a secret-free Registry-revision-bound plan through app:config:read, and conditionally apply checkpoint-free actions through exact app:config:write operation routes", "inspect or bounded-wait one exact durable config-operation journal entry and verify every terminal receipt digest before returning it to remote automation", "inspect durable agent wakeups as a versioned JSON envelope and explicitly requeue one dead-lettered job with a scoped environment credential", "run app-attributed hosted security discovery and independent validation without provider keys", "connect/revoke source-read-only GitHub sources and drive commit-pinned hosted security jobs without PATs or provider keys", "let admins manage system AI policy and credentials, inspect attributed usage, and read immutable admin changes through separate short-lived capability-only approvals"];
|
|
254
|
-
readonly agent: readonly ["install and import the selected odla SDKs", "wrap the Worker with withObservability and choose useful telemetry", "install capability packages, mount their runtime routes, and make application-specific schema, rules, auth, UI, and migration decisions", "wire @odla-ai/calendar into trusted Worker code and keep the app admin key out of browsers"];
|
|
253
|
+
readonly cli: readonly ["start an email-bound device request without accepting a password or user session token", "register the app and enable configured services per environment", "issue, persist, and explicitly rotate configured service credentials", "add or remove app co-owners, each of whom self-provisions their own credentials for the shared db without any secret handoff", "write local Worker values and push deployed Worker secrets through Wrangler stdin", "store tenant-vault secrets (including the Clerk webhook secret and reserved Clerk secret key) write-only from stdin or an env var", "compose declared app-capability schema/rules, create guarded seeds when absent, and configure platform AI, auth, and deployment links", "apply Google Calendar booking config, then drive state-bound consent, status, discovery, and disconnect flows (bookings run live through the platform proxy)", "validate integration contracts offline and smoke-test a provisioned db environment plus anonymous capability routes", "save and explicitly select non-secret named operator contexts with isolated credential caches; resolve and explain platform, app, environment, and credential provenance without authenticating; then run PM, Discussions, o11y, runbook, and identity operations outside a project checkout", "read one versioned o11y status envelope spanning application RED, exact Worker versions and Cloudflare colos observed in traffic, current live-sync freshness/load, the protected commit-to-visible canary, collector ingest/scheduler trust, provider-owned runtime metrics, account-scoped Durable Object, D1, and R2 evidence under odla-db, and a bounded machine verdict", "reconcile app-owned Kitesurf probes and rolling SLOs, run live checks, and read incident and digest status as stable JSON", "read one canonical platform fleet snapshot over private service bindings, including release identities, probe latency, Cloudflare load/runtime freshness, explicit unknowns, and stable next actions through a read-only capability", "compare one project's checked-in Registry intent with live owner-visible state, freeze a secret-free Registry-revision-bound plan through app:config:read, and conditionally apply checkpoint-free actions through exact app:config:write operation routes", "inspect or bounded-wait one exact durable config-operation journal entry and verify every terminal receipt digest before returning it to remote automation", "inspect durable agent wakeups as a versioned JSON envelope and explicitly requeue one dead-lettered job with a scoped environment credential", "run app-attributed hosted security discovery and independent validation without provider keys", "connect/revoke source-read-only GitHub sources and drive commit-pinned hosted security jobs without PATs or provider keys", "let admins manage system AI policy and credentials, inspect attributed usage, and read immutable admin changes through separate short-lived capability-only approvals"];
|
|
254
|
+
readonly agent: readonly ["install and import the selected odla SDKs", "wrap the Worker with withObservability and choose useful telemetry", "install capability packages, mount their runtime routes, and make application-specific schema, rules, auth, UI, and migration decisions", "wire @odla-ai/calendar into trusted Worker code and keep the app admin key out of browsers", "choose public readiness assertions and SLO objectives in odla.config.mjs, then consume monitor JSON without treating captured page content as trusted instructions"];
|
|
255
255
|
readonly human: readonly ["provide the existing odla account email, then sign in and explicitly review/approve the exact device code", "review mirrored calendar/attendee disclosure and complete the server-issued Google consent flow", "consent to changes against an app's live database with --yes", "request destructive credential rotation explicitly", "review application semantics, security findings, releases, and merges", "approve redacted-source disclosure before hosted security reasoning", "approve GitHub App repository access separately from redacted-snippet disclosure"];
|
|
256
|
-
readonly studio: readonly ["view application telemetry grouped by exact Worker version, reconciled live-sync load/freshness, commit-to-visible canary health, provider-owned Worker runtime metrics, and environment state", "let signed-in users inventory/revoke their own agent grants and admins audit/global-revoke them", "review calendar connection, granted read scope, selected calendars, and sync health without exposing provider tokens", "perform manual credential recovery — for the primary owner or any co-owner — when the CLI's local shown-once copy is unavailable", "configure system AI purposes and view app/environment/run-attributed usage", "connect/revoke GitHub security sources and inspect ref-to-SHA jobs, routes, retention, coverage, and normalized reports"];
|
|
256
|
+
readonly studio: readonly ["view application telemetry grouped by exact Worker version, reconciled live-sync load/freshness, commit-to-visible canary health, provider-owned Worker runtime metrics, and environment state", "view reliability objectives, error budget, Kitesurf probe history, incidents, and notification delivery state", "let signed-in users inventory/revoke their own agent grants and admins audit/global-revoke them", "review calendar connection, granted read scope, selected calendars, and sync health without exposing provider tokens", "perform manual credential recovery — for the primary owner or any co-owner — when the CLI's local shown-once copy is unavailable", "configure system AI purposes and view app/environment/run-attributed usage", "connect/revoke GitHub security sources and inspect ref-to-SHA jobs, routes, retention, coverage, and normalized reports"];
|
|
257
257
|
};
|
|
258
258
|
type Output = Pick<typeof console, "log">;
|
|
259
259
|
/** Print the stable responsibility boundary for humans or agent tooling. */
|
|
@@ -495,6 +495,96 @@ interface GoogleCalendarConfig {
|
|
|
495
495
|
interface CalendarConfig {
|
|
496
496
|
google: GoogleCalendarConfig;
|
|
497
497
|
}
|
|
498
|
+
/** One deterministic, anonymous Kitesurf journey against an environment link.
|
|
499
|
+
* Routes are always relative to `links.<env>`; arbitrary origins and executable
|
|
500
|
+
* JavaScript are deliberately outside the monitoring contract. */
|
|
501
|
+
interface MonitoringProbeConfig {
|
|
502
|
+
/** Stable id used by SLO indicators and retained run history. */
|
|
503
|
+
id: string;
|
|
504
|
+
/** Absolute path beneath the configured environment link. */
|
|
505
|
+
route: string;
|
|
506
|
+
/** Environments in which this probe is active. Defaults to every configured env. */
|
|
507
|
+
envs?: OdlaEnvName[];
|
|
508
|
+
/** Fixed cadence. The collector's one-minute scheduler executes due probes. */
|
|
509
|
+
every: "1m" | "2m" | "5m" | "10m" | "15m" | "30m" | "1h";
|
|
510
|
+
/** Navigation timeout in milliseconds, from 1,000 through 60,000. */
|
|
511
|
+
timeout?: number;
|
|
512
|
+
/** Optional DOM readiness signal passed to the Kitesurf snapshot action. */
|
|
513
|
+
ready?: {
|
|
514
|
+
selector: string;
|
|
515
|
+
};
|
|
516
|
+
/** Declarative assertions; monitoring config cannot inject arbitrary scripts. */
|
|
517
|
+
expect: {
|
|
518
|
+
status: number;
|
|
519
|
+
titleIncludes?: string;
|
|
520
|
+
textIncludes?: string[];
|
|
521
|
+
accessibility?: Array<{
|
|
522
|
+
role: string;
|
|
523
|
+
name: string;
|
|
524
|
+
}>;
|
|
525
|
+
};
|
|
526
|
+
enabled?: boolean;
|
|
527
|
+
}
|
|
528
|
+
/** The probe or existing-o11y signal whose scheduled observations determine one SLO's good, bad, or unknown events. */
|
|
529
|
+
type MonitoringIndicatorConfig = {
|
|
530
|
+
type: "probe-success";
|
|
531
|
+
probes: string[];
|
|
532
|
+
} | {
|
|
533
|
+
/** A bounded observation of an existing o11y performance signal. Each
|
|
534
|
+
* scheduled observation is one exact SLO event, including no-data as an
|
|
535
|
+
* unknown monitoring event rather than a successful application event. */
|
|
536
|
+
type: "o11y-metric";
|
|
537
|
+
metric: "error_rate" | "latency_p95" | "synthetic_success" | "synthetic_publish_to_visible";
|
|
538
|
+
comparator: "gt" | "gte" | "lt" | "lte";
|
|
539
|
+
threshold: number;
|
|
540
|
+
every: "1m" | "2m" | "5m" | "10m" | "15m" | "30m" | "1h";
|
|
541
|
+
observationWindow: "1m" | "2m" | "5m" | "10m" | "15m" | "30m" | "1h";
|
|
542
|
+
route?: string;
|
|
543
|
+
};
|
|
544
|
+
/** One rolling objective over exact scheduled Kitesurf or existing-o11y outcomes. */
|
|
545
|
+
interface MonitoringSloConfig {
|
|
546
|
+
id: string;
|
|
547
|
+
name?: string;
|
|
548
|
+
indicator: MonitoringIndicatorConfig;
|
|
549
|
+
/** Good-event objective as a fraction, for example 0.999. */
|
|
550
|
+
target: number;
|
|
551
|
+
window: "7d" | "28d" | "30d";
|
|
552
|
+
alerts?: {
|
|
553
|
+
/** Immediate outage detector. Defaults to two bad checks among the last three. */
|
|
554
|
+
spike?: {
|
|
555
|
+
badChecks?: number;
|
|
556
|
+
withinChecks?: number;
|
|
557
|
+
recoverAfter?: number;
|
|
558
|
+
};
|
|
559
|
+
/** Multi-window error-budget detector for sustained degradation. */
|
|
560
|
+
trend?: {
|
|
561
|
+
burnRate?: number;
|
|
562
|
+
shortWindow?: "30m" | "1h" | "6h" | "12h" | "1d";
|
|
563
|
+
longWindow?: "1d" | "3d" | "7d";
|
|
564
|
+
minBadChecks?: number;
|
|
565
|
+
};
|
|
566
|
+
};
|
|
567
|
+
enabled?: boolean;
|
|
568
|
+
}
|
|
569
|
+
/** Email subscriptions for one app environment. Immediate incident mail is
|
|
570
|
+
* always enabled when recipients are present; digests are independently
|
|
571
|
+
* scheduled in the named IANA timezone. */
|
|
572
|
+
interface MonitoringNotificationConfig {
|
|
573
|
+
email: string[];
|
|
574
|
+
timezone: string;
|
|
575
|
+
daily?: string | false;
|
|
576
|
+
weekly?: {
|
|
577
|
+
day: "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
|
|
578
|
+
at: string;
|
|
579
|
+
} | false;
|
|
580
|
+
}
|
|
581
|
+
/** Repository-owned probes, SLO policies, and per-environment reliability notification schedules. */
|
|
582
|
+
interface MonitoringConfig {
|
|
583
|
+
/** Optional when every SLO consumes an existing o11y metric. */
|
|
584
|
+
probes?: MonitoringProbeConfig[];
|
|
585
|
+
slos: MonitoringSloConfig[];
|
|
586
|
+
notifications?: Record<OdlaEnvName, MonitoringNotificationConfig>;
|
|
587
|
+
}
|
|
498
588
|
/** Canonical, environment-specific config sent to the calendar controller. */
|
|
499
589
|
interface CalendarServiceConfig extends Record<string, unknown> {
|
|
500
590
|
provider: "google";
|
|
@@ -548,6 +638,8 @@ interface OdlaProjectConfig {
|
|
|
548
638
|
endpoint?: string;
|
|
549
639
|
/** Release tag stamped on emitted signals. */
|
|
550
640
|
version?: string;
|
|
641
|
+
/** Repository-owned live probes, rolling SLOs, and email subscriptions. */
|
|
642
|
+
monitoring?: MonitoringConfig;
|
|
551
643
|
};
|
|
552
644
|
auth?: {
|
|
553
645
|
clerk?: Record<OdlaEnvName, ClerkAuthConfig | string | null | undefined>;
|
|
@@ -1304,4 +1396,81 @@ declare function installSkill(options?: SkillInstallOptions): SkillInstallResult
|
|
|
1304
1396
|
*/
|
|
1305
1397
|
declare function smoke(options: SmokeOptions): Promise<void>;
|
|
1306
1398
|
|
|
1307
|
-
|
|
1399
|
+
type OptionValue = string | boolean | string[];
|
|
1400
|
+
interface ParsedArgv {
|
|
1401
|
+
positionals: string[];
|
|
1402
|
+
options: Record<string, OptionValue>;
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
/** Repository-controlled Kitesurf probe/SLO operations. Read actions accept
|
|
1406
|
+
* projectless operator context; plan/apply require odla.config.mjs because it
|
|
1407
|
+
* remains the desired-state authority. */
|
|
1408
|
+
declare function monitorCommand(parsed: ParsedArgv, deps?: CliDependencies): Promise<void>;
|
|
1409
|
+
|
|
1410
|
+
/** Normalized, revision-addressed monitoring policy sent from the CLI to the o11y collector for one environment. */
|
|
1411
|
+
interface MonitoringWireConfig {
|
|
1412
|
+
revision: `sha256:${string}`;
|
|
1413
|
+
environment: string;
|
|
1414
|
+
baseUrl: string;
|
|
1415
|
+
probes: Array<{
|
|
1416
|
+
id: string;
|
|
1417
|
+
route: string;
|
|
1418
|
+
cadenceMinutes: number;
|
|
1419
|
+
timeoutMs: number;
|
|
1420
|
+
readySelector?: string;
|
|
1421
|
+
expect: {
|
|
1422
|
+
status: number;
|
|
1423
|
+
titleIncludes?: string;
|
|
1424
|
+
textIncludes: string[];
|
|
1425
|
+
accessibility: Array<{
|
|
1426
|
+
role: string;
|
|
1427
|
+
name: string;
|
|
1428
|
+
}>;
|
|
1429
|
+
};
|
|
1430
|
+
enabled: boolean;
|
|
1431
|
+
}>;
|
|
1432
|
+
slos: Array<{
|
|
1433
|
+
id: string;
|
|
1434
|
+
name: string;
|
|
1435
|
+
indicator: {
|
|
1436
|
+
type: "probe-success";
|
|
1437
|
+
probes: string[];
|
|
1438
|
+
} | {
|
|
1439
|
+
type: "o11y-metric";
|
|
1440
|
+
metric: "error_rate" | "latency_p95" | "synthetic_success" | "synthetic_publish_to_visible";
|
|
1441
|
+
comparator: "gt" | "gte" | "lt" | "lte";
|
|
1442
|
+
threshold: number;
|
|
1443
|
+
cadenceMinutes: number;
|
|
1444
|
+
observationWindowMinutes: number;
|
|
1445
|
+
route?: string;
|
|
1446
|
+
};
|
|
1447
|
+
target: number;
|
|
1448
|
+
windowMinutes: number;
|
|
1449
|
+
spike: {
|
|
1450
|
+
badChecks: number;
|
|
1451
|
+
withinChecks: number;
|
|
1452
|
+
recoverAfter: number;
|
|
1453
|
+
};
|
|
1454
|
+
trend: {
|
|
1455
|
+
burnRate: number;
|
|
1456
|
+
shortMinutes: number;
|
|
1457
|
+
longMinutes: number;
|
|
1458
|
+
minBadChecks: number;
|
|
1459
|
+
};
|
|
1460
|
+
enabled: boolean;
|
|
1461
|
+
}>;
|
|
1462
|
+
notifications?: {
|
|
1463
|
+
email: string[];
|
|
1464
|
+
timezone: string;
|
|
1465
|
+
daily: string | false;
|
|
1466
|
+
weekly: {
|
|
1467
|
+
day: string;
|
|
1468
|
+
at: string;
|
|
1469
|
+
} | false;
|
|
1470
|
+
};
|
|
1471
|
+
}
|
|
1472
|
+
/** Resolve repository monitoring intent for one environment into the bounded
|
|
1473
|
+
* collector wire document. The digest covers the exact normalized payload. */
|
|
1474
|
+
declare function monitoringWireConfig(cfg: LoadedProjectConfig, env: string): MonitoringWireConfig;
|
|
1475
|
+
|
|
1476
|
+
export { AGENT_HARNESSES, type AdminAiOptions, type AgentHarness, type AgentHarnessSelector, type AiModelsOptions, type AvailableGoogleCalendar, CAPABILITIES, CODE_BUILD_RECIPES, COMMAND_SURFACE, type CalendarConfig, type CalendarConnectionState, type CalendarLifecycleOptions, type CalendarServiceConfig, type CalendarStatus, type CliDependencies, type CodeBuildRule, type CodeConnectOptions, type CodeContainerEngine, type CodeHostCapabilities, type CodeLocalSourceDescriptor, type CodeRuntimeInput, type ConfigApplyOptions, type ConfigCoverage, type ConfigDiffDocument, type ConfigDifference, type ConfigDigest, type ConfigDrift, type ConfigInspectOptions, ConfigOperationCommandError, type ConfigOperationInspectOptions, type ConfigOperationResult, type ConfigPlanAction, type ConfigPlanDocument, type ConfigReconciliation, type ConfigRisk, type ConfigSource, type ConnectGitHubSecuritySourceOptions, type DesiredRegistryState, type DisconnectGitHubSecuritySourceOptions, type FollowHostedSecurityJobOptions, GOOGLE_CALENDAR_EVENTS_SCOPE, type GetHostedSecurityIntentOptions, type GetHostedSecurityJobOptions, type GoogleCalendarConfig, type HarnessInstallResult, type HostedSecurityProfile, type HostedSecurityResult, type HostedSecurityTokenRequest, type IntegrationProbe, type IntegrationSeed, type InvocationProblem, type ListGitHubSecuritySourcesOptions, type ListHostedSecurityJobsOptions, type LoadedProjectConfig, type LocalCredentials, type MonitoringConfig, type MonitoringIndicatorConfig, type MonitoringNotificationConfig, type MonitoringProbeConfig, type MonitoringSloConfig, type MonitoringWireConfig, type OdlaIntegration, type OdlaProjectConfig, type ProvisionOptions, type ProvisionPlan, type ReconciliationInput, type RunHostedSecurityOptions, SYSTEM_AI_PURPOSES, type ScopedPlatformTokenOptions, type SecretsPushOptions, type SecretsSetOptions, type SkillInstallOptions, type SkillInstallResult, type SmokeOptions, type StartHostedSecurityJobOptions, type SurfaceNode, type SystemAiPurpose, acceptedAfter, adminAi, aiModels, calendarBookingPageUrl, calendarCalendars, calendarConnect, calendarDisconnect, calendarServiceConfig, calendarStatus, codeConnect, configApply, configDiff, configOperationGet, configOperationWait, configPlan, connectGitHubSecuritySource, describeProblem, desiredRegistryState, disconnectGitHubSecuritySource, doctor, exitCodeFor, followHostedSecurityJob, getHostedSecurityIntent, getHostedSecurityJob, getHostedSecurityPlan, getHostedSecurityReport, getScopedPlatformToken, inferGitHubRepository, initProject, installSkill, invocationPath, isTerminalHostedSecurityStatus, listGitHubSecuritySources, listHostedSecurityJobs, monitorCommand, monitoringWireConfig, printCapabilities, provision, reconcileConfig, redactSecrets, repositoryFromGitRemote, runCli, runCodeRuntime, runHostedSecurity, secretsPush, secretsSet, secretsSetClerkKey, smoke, startHostedSecurityJob, surfacePaths, validateInvocation };
|
package/dist/index.js
CHANGED
|
@@ -40,6 +40,8 @@ import {
|
|
|
40
40
|
isTerminalHostedSecurityStatus,
|
|
41
41
|
listGitHubSecuritySources,
|
|
42
42
|
listHostedSecurityJobs,
|
|
43
|
+
monitorCommand,
|
|
44
|
+
monitoringWireConfig,
|
|
43
45
|
printCapabilities,
|
|
44
46
|
provision,
|
|
45
47
|
reconcileConfig,
|
|
@@ -54,7 +56,7 @@ import {
|
|
|
54
56
|
startHostedSecurityJob,
|
|
55
57
|
surfacePaths,
|
|
56
58
|
validateInvocation
|
|
57
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-RUEM7ZTA.js";
|
|
58
60
|
import {
|
|
59
61
|
exitCodeFor,
|
|
60
62
|
redactSecrets
|
|
@@ -101,6 +103,8 @@ export {
|
|
|
101
103
|
isTerminalHostedSecurityStatus,
|
|
102
104
|
listGitHubSecuritySources,
|
|
103
105
|
listHostedSecurityJobs,
|
|
106
|
+
monitorCommand,
|
|
107
|
+
monitoringWireConfig,
|
|
104
108
|
printCapabilities,
|
|
105
109
|
provision,
|
|
106
110
|
reconcileConfig,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odla-ai/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.1",
|
|
4
4
|
"description": "Agent-operable CLI for odla provisioning, calendar consent and connection lifecycle, System AI administration, Worker secrets, security jobs, and smoke checks.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://odla.ai/docs/packages/cli",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@odla-ai/ai": "0.14.0",
|
|
62
|
-
"@odla-ai/apps": "0.
|
|
62
|
+
"@odla-ai/apps": "0.11.0",
|
|
63
63
|
"@odla-ai/brand": "0.5.0",
|
|
64
64
|
"@odla-ai/db": "0.10.3",
|
|
65
65
|
"@odla-ai/security": "0.3.3"
|