@odla-ai/cli 0.17.0 → 0.18.0

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
@@ -3,7 +3,7 @@ import { HostedSecurityJob, GitHubConnectionStatus, GitHubSecuritySource, Hosted
3
3
  export { GitHubConnectionAttempt, GitHubConnectionStatus, GitHubSecuritySource, HostedSecurityCounts, HostedSecurityCoverage, HostedSecurityIntent, HostedSecurityIntentResponse, HostedSecurityJob, HostedSecurityJobStatus, HostedSecurityPlan, HostedSecurityPlanRoute, HostedSecurityReport, HostedSecurityReportFinding, HostedSecurityRoute } from '@odla-ai/security/hosted';
4
4
 
5
5
  /** One exact platform scope obtainable through the admin device flow. */
6
- type ScopedPlatformScope = "platform:ai:policy:read" | "platform:ai:policy:write" | "platform:ai:credential:read" | "platform:ai:credential:write" | "platform:ai:usage:read" | "platform:ai:audit:read" | "app:code:host:connect" | "platform:code:host:connect" | "platform:security:self";
6
+ type ScopedPlatformScope = "platform:ai:policy:read" | "platform:ai:policy:write" | "platform:ai:credential:read" | "platform:ai:credential:write" | "platform:ai:usage:read" | "platform:ai:audit:read" | "app:code:host:connect" | "platform:code:host:connect" | "platform:security:self" | "platform:runbook:write";
7
7
  /** Inputs for obtaining one short-lived, exact-scope platform device grant. */
8
8
  interface ScopedPlatformTokenOptions {
9
9
  platform: string;
@@ -15,6 +15,15 @@ interface ScopedPlatformTokenOptions {
15
15
  stdout?: Pick<typeof console, "log">;
16
16
  openApprovalUrl?: (url: string) => Promise<void>;
17
17
  tokenFile?: string;
18
+ /**
19
+ * Project root the grant cache hangs off, mirroring how the developer token
20
+ * resolves `.odla/dev-token.json` against the loaded config's `rootDir`.
21
+ * Callers with a project should pass `cfg.rootDir`: without it the cache
22
+ * follows the shell's working directory rather than the project, so the same
23
+ * command run from a subdirectory reads a different cache — and writes a
24
+ * credential file wherever it happened to be standing.
25
+ */
26
+ rootDir?: string;
18
27
  /** Keep the shown-once grant only in memory. */
19
28
  cache?: boolean;
20
29
  /** Human-visible purpose recorded on the exact handshake. */
@@ -165,6 +174,9 @@ interface CliDependencies {
165
174
  confirm?: (message: string) => Promise<boolean>;
166
175
  stdout?: Pick<typeof console, "log" | "error">;
167
176
  codeConnect?: (options: CodeConnectOptions) => Promise<void>;
177
+ /** Runs git in the working directory; injected so `runbook impact` can be
178
+ * driven over a fixed diff instead of whatever the checkout happens to be. */
179
+ runGit?: (args: string[]) => string;
168
180
  }
169
181
  /**
170
182
  * Parse CLI arguments and dispatch the matching odla command.
@@ -180,7 +192,7 @@ interface CliDependencies {
180
192
  declare function runCli(argv?: string[], dependencies?: CliDependencies): Promise<void>;
181
193
 
182
194
  /** Hosted platform purposes whose provider, model, and budgets an admin may route. */
183
- declare const SYSTEM_AI_PURPOSES: readonly ["o11y.triage", "security.discovery", "security.validation"];
195
+ declare const SYSTEM_AI_PURPOSES: readonly ["o11y.triage", "security.discovery", "security.validation", "runbook.answer"];
184
196
  /** One catalog-validated, platform-funded System AI purpose. */
185
197
  type SystemAiPurpose = (typeof SYSTEM_AI_PURPOSES)[number];
186
198
 
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import { HostedSecurityJob, GitHubConnectionStatus, GitHubSecuritySource, Hosted
3
3
  export { GitHubConnectionAttempt, GitHubConnectionStatus, GitHubSecuritySource, HostedSecurityCounts, HostedSecurityCoverage, HostedSecurityIntent, HostedSecurityIntentResponse, HostedSecurityJob, HostedSecurityJobStatus, HostedSecurityPlan, HostedSecurityPlanRoute, HostedSecurityReport, HostedSecurityReportFinding, HostedSecurityRoute } from '@odla-ai/security/hosted';
4
4
 
5
5
  /** One exact platform scope obtainable through the admin device flow. */
6
- type ScopedPlatformScope = "platform:ai:policy:read" | "platform:ai:policy:write" | "platform:ai:credential:read" | "platform:ai:credential:write" | "platform:ai:usage:read" | "platform:ai:audit:read" | "app:code:host:connect" | "platform:code:host:connect" | "platform:security:self";
6
+ type ScopedPlatformScope = "platform:ai:policy:read" | "platform:ai:policy:write" | "platform:ai:credential:read" | "platform:ai:credential:write" | "platform:ai:usage:read" | "platform:ai:audit:read" | "app:code:host:connect" | "platform:code:host:connect" | "platform:security:self" | "platform:runbook:write";
7
7
  /** Inputs for obtaining one short-lived, exact-scope platform device grant. */
8
8
  interface ScopedPlatformTokenOptions {
9
9
  platform: string;
@@ -15,6 +15,15 @@ interface ScopedPlatformTokenOptions {
15
15
  stdout?: Pick<typeof console, "log">;
16
16
  openApprovalUrl?: (url: string) => Promise<void>;
17
17
  tokenFile?: string;
18
+ /**
19
+ * Project root the grant cache hangs off, mirroring how the developer token
20
+ * resolves `.odla/dev-token.json` against the loaded config's `rootDir`.
21
+ * Callers with a project should pass `cfg.rootDir`: without it the cache
22
+ * follows the shell's working directory rather than the project, so the same
23
+ * command run from a subdirectory reads a different cache — and writes a
24
+ * credential file wherever it happened to be standing.
25
+ */
26
+ rootDir?: string;
18
27
  /** Keep the shown-once grant only in memory. */
19
28
  cache?: boolean;
20
29
  /** Human-visible purpose recorded on the exact handshake. */
@@ -165,6 +174,9 @@ interface CliDependencies {
165
174
  confirm?: (message: string) => Promise<boolean>;
166
175
  stdout?: Pick<typeof console, "log" | "error">;
167
176
  codeConnect?: (options: CodeConnectOptions) => Promise<void>;
177
+ /** Runs git in the working directory; injected so `runbook impact` can be
178
+ * driven over a fixed diff instead of whatever the checkout happens to be. */
179
+ runGit?: (args: string[]) => string;
168
180
  }
169
181
  /**
170
182
  * Parse CLI arguments and dispatch the matching odla command.
@@ -180,7 +192,7 @@ interface CliDependencies {
180
192
  declare function runCli(argv?: string[], dependencies?: CliDependencies): Promise<void>;
181
193
 
182
194
  /** Hosted platform purposes whose provider, model, and budgets an admin may route. */
183
- declare const SYSTEM_AI_PURPOSES: readonly ["o11y.triage", "security.discovery", "security.validation"];
195
+ declare const SYSTEM_AI_PURPOSES: readonly ["o11y.triage", "security.discovery", "security.validation", "runbook.answer"];
184
196
  /** One catalog-validated, platform-funded System AI purpose. */
185
197
  type SystemAiPurpose = (typeof SYSTEM_AI_PURPOSES)[number];
186
198
 
package/dist/index.js CHANGED
@@ -43,7 +43,7 @@ import {
43
43
  secretsSetClerkKey,
44
44
  smoke,
45
45
  startHostedSecurityJob
46
- } from "./chunk-2UKO2NED.js";
46
+ } from "./chunk-TOSMNGGQ.js";
47
47
  export {
48
48
  AGENT_HARNESSES,
49
49
  CAPABILITIES,