@odla-ai/cli 0.16.3 → 0.16.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 -6
- package/dist/bin.cjs +158 -83
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-YWC7F5T3.js → chunk-GLY5BN6D.js} +148 -74
- package/dist/chunk-GLY5BN6D.js.map +1 -0
- package/dist/index.cjs +160 -83
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -4
- package/dist/index.d.ts +16 -4
- package/dist/index.js +3 -1
- package/dist/runtime/pi-agent.js +330317 -0
- package/package.json +2 -2
- package/skills/odla-migrate/references/phase-2-db.md +2 -2
- package/dist/chunk-YWC7F5T3.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -46,8 +46,10 @@ interface PreparedCodeLocalSource {
|
|
|
46
46
|
/** Freeze the local Git tree and exact commit base before any approval request. */
|
|
47
47
|
declare function prepareCodeLocalSource(cwd: string, repository: string, readHead?: (cwd: string) => Promise<string>): Promise<PreparedCodeLocalSource>;
|
|
48
48
|
|
|
49
|
-
/**
|
|
50
|
-
|
|
49
|
+
/** Release-owned Pi adapter bundled into the CLI. `prepareCodeImages` hashes
|
|
50
|
+
* the exact bundle and builds a content-addressed local image; no registry
|
|
51
|
+
* credential enters the terminal connection. */
|
|
52
|
+
declare const CODE_PI_IMAGE = "odla-ai/pi-agent:embedded";
|
|
51
53
|
/** Immutable CaMeL-registered build recipe available to an agent container. */
|
|
52
54
|
interface CodeBuildRule {
|
|
53
55
|
id: string;
|
|
@@ -64,6 +66,14 @@ interface CodeBuildRule {
|
|
|
64
66
|
* this once their owner-visible registration contract exists. */
|
|
65
67
|
declare const CODE_BUILD_RECIPES: readonly CodeBuildRule[];
|
|
66
68
|
|
|
69
|
+
type CodeImageCommandRunner = (command: string, args: readonly string[], stdio: "inherit" | "ignore") => Promise<void>;
|
|
70
|
+
type EmbeddedPiImageBuilder = (engine: CodeContainerEngine, image: string, run: CodeImageCommandRunner) => Promise<void>;
|
|
71
|
+
type EmbeddedPiImageNamer = () => Promise<string>;
|
|
72
|
+
/** Build the CLI-embedded Pi adapter and pull each immutable recipe image
|
|
73
|
+
* before an owner is asked to approve the terminal. Runtime attempts never
|
|
74
|
+
* pull, and fail closed if a prepared image disappears. */
|
|
75
|
+
declare function prepareCodeImages(engine: CodeContainerEngine, images: readonly string[], run?: CodeImageCommandRunner, buildEmbedded?: EmbeddedPiImageBuilder, nameEmbedded?: EmbeddedPiImageNamer): Promise<readonly string[]>;
|
|
76
|
+
|
|
67
77
|
/** Supported local isolation engines for an odla Code host runtime. */
|
|
68
78
|
type CodeContainerEngine = "container" | "podman" | "docker";
|
|
69
79
|
/** Bounded host facts reported on each outbound Code control-plane heartbeat. */
|
|
@@ -78,6 +88,7 @@ interface CodeHostCapabilities {
|
|
|
78
88
|
images: {
|
|
79
89
|
ready: true;
|
|
80
90
|
pi: string;
|
|
91
|
+
piSource: "cli_embedded";
|
|
81
92
|
recipes: Array<{
|
|
82
93
|
id: string;
|
|
83
94
|
image: string;
|
|
@@ -113,7 +124,7 @@ interface CodeConnectOptions {
|
|
|
113
124
|
runRuntime?: (input: CodeRuntimeInput) => Promise<void>;
|
|
114
125
|
readGitOrigin?: (cwd: string) => Promise<string>;
|
|
115
126
|
readGitHead?: (cwd: string) => Promise<string>;
|
|
116
|
-
prepareImages?: (engine: CodeContainerEngine, images: readonly string[]) => Promise<
|
|
127
|
+
prepareImages?: (engine: CodeContainerEngine, images: readonly string[]) => Promise<readonly string[]>;
|
|
117
128
|
prepareLocalSource?: typeof prepareCodeLocalSource;
|
|
118
129
|
}
|
|
119
130
|
/** Authority and runtime boundaries used after a Code host enrollment succeeds. */
|
|
@@ -132,6 +143,7 @@ interface CodeRuntimeInput {
|
|
|
132
143
|
trustedBaseDir: string;
|
|
133
144
|
sourceDir: string;
|
|
134
145
|
};
|
|
146
|
+
piImage?: string;
|
|
135
147
|
}
|
|
136
148
|
/** Enroll this machine from an odla project and keep the embedded Pi runtime
|
|
137
149
|
* online. Both the approval grant and host credential hashes are stored in
|
|
@@ -978,4 +990,4 @@ declare function installSkill(options?: SkillInstallOptions): SkillInstallResult
|
|
|
978
990
|
*/
|
|
979
991
|
declare function smoke(options: SmokeOptions): Promise<void>;
|
|
980
992
|
|
|
981
|
-
export { AGENT_HARNESSES, type AdminAiOptions, type AgentHarness, type AgentHarnessSelector, type AvailableGoogleCalendar, CAPABILITIES, CODE_BUILD_RECIPES, CODE_PI_IMAGE, 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 ConnectGitHubSecuritySourceOptions, 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 ListGitHubSecuritySourcesOptions, type ListHostedSecurityJobsOptions, type LoadedProjectConfig, type LocalCredentials, type OdlaIntegration, type OdlaProjectConfig, type ProvisionOptions, type ProvisionPlan, type RunHostedSecurityOptions, SYSTEM_AI_PURPOSES, type ScopedPlatformTokenOptions, type SecretsPushOptions, type SecretsSetOptions, type SkillInstallOptions, type SkillInstallResult, type SmokeOptions, type StartHostedSecurityJobOptions, type SystemAiPurpose, adminAi, calendarBookingPageUrl, calendarCalendars, calendarConnect, calendarDisconnect, calendarServiceConfig, calendarStatus, codeConnect, connectGitHubSecuritySource, disconnectGitHubSecuritySource, doctor, exitCodeFor, followHostedSecurityJob, getHostedSecurityIntent, getHostedSecurityJob, getHostedSecurityPlan, getHostedSecurityReport, getScopedPlatformToken, inferGitHubRepository, initProject, installSkill, isTerminalHostedSecurityStatus, listGitHubSecuritySources, listHostedSecurityJobs, printCapabilities, provision, redactSecrets, repositoryFromGitRemote, runCli, runCodeRuntime, runHostedSecurity, secretsPush, secretsSet, secretsSetClerkKey, smoke, startHostedSecurityJob };
|
|
993
|
+
export { AGENT_HARNESSES, type AdminAiOptions, type AgentHarness, type AgentHarnessSelector, type AvailableGoogleCalendar, CAPABILITIES, CODE_BUILD_RECIPES, CODE_PI_IMAGE, 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 ConnectGitHubSecuritySourceOptions, 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 ListGitHubSecuritySourcesOptions, type ListHostedSecurityJobsOptions, type LoadedProjectConfig, type LocalCredentials, type OdlaIntegration, type OdlaProjectConfig, type ProvisionOptions, type ProvisionPlan, type RunHostedSecurityOptions, SYSTEM_AI_PURPOSES, type ScopedPlatformTokenOptions, type SecretsPushOptions, type SecretsSetOptions, type SkillInstallOptions, type SkillInstallResult, type SmokeOptions, type StartHostedSecurityJobOptions, type SystemAiPurpose, adminAi, calendarBookingPageUrl, calendarCalendars, calendarConnect, calendarDisconnect, calendarServiceConfig, calendarStatus, codeConnect, connectGitHubSecuritySource, disconnectGitHubSecuritySource, doctor, exitCodeFor, followHostedSecurityJob, getHostedSecurityIntent, getHostedSecurityJob, getHostedSecurityPlan, getHostedSecurityReport, getScopedPlatformToken, inferGitHubRepository, initProject, installSkill, isTerminalHostedSecurityStatus, listGitHubSecuritySources, listHostedSecurityJobs, prepareCodeImages, printCapabilities, provision, redactSecrets, repositoryFromGitRemote, runCli, runCodeRuntime, runHostedSecurity, secretsPush, secretsSet, secretsSetClerkKey, smoke, startHostedSecurityJob };
|
package/dist/index.d.ts
CHANGED
|
@@ -46,8 +46,10 @@ interface PreparedCodeLocalSource {
|
|
|
46
46
|
/** Freeze the local Git tree and exact commit base before any approval request. */
|
|
47
47
|
declare function prepareCodeLocalSource(cwd: string, repository: string, readHead?: (cwd: string) => Promise<string>): Promise<PreparedCodeLocalSource>;
|
|
48
48
|
|
|
49
|
-
/**
|
|
50
|
-
|
|
49
|
+
/** Release-owned Pi adapter bundled into the CLI. `prepareCodeImages` hashes
|
|
50
|
+
* the exact bundle and builds a content-addressed local image; no registry
|
|
51
|
+
* credential enters the terminal connection. */
|
|
52
|
+
declare const CODE_PI_IMAGE = "odla-ai/pi-agent:embedded";
|
|
51
53
|
/** Immutable CaMeL-registered build recipe available to an agent container. */
|
|
52
54
|
interface CodeBuildRule {
|
|
53
55
|
id: string;
|
|
@@ -64,6 +66,14 @@ interface CodeBuildRule {
|
|
|
64
66
|
* this once their owner-visible registration contract exists. */
|
|
65
67
|
declare const CODE_BUILD_RECIPES: readonly CodeBuildRule[];
|
|
66
68
|
|
|
69
|
+
type CodeImageCommandRunner = (command: string, args: readonly string[], stdio: "inherit" | "ignore") => Promise<void>;
|
|
70
|
+
type EmbeddedPiImageBuilder = (engine: CodeContainerEngine, image: string, run: CodeImageCommandRunner) => Promise<void>;
|
|
71
|
+
type EmbeddedPiImageNamer = () => Promise<string>;
|
|
72
|
+
/** Build the CLI-embedded Pi adapter and pull each immutable recipe image
|
|
73
|
+
* before an owner is asked to approve the terminal. Runtime attempts never
|
|
74
|
+
* pull, and fail closed if a prepared image disappears. */
|
|
75
|
+
declare function prepareCodeImages(engine: CodeContainerEngine, images: readonly string[], run?: CodeImageCommandRunner, buildEmbedded?: EmbeddedPiImageBuilder, nameEmbedded?: EmbeddedPiImageNamer): Promise<readonly string[]>;
|
|
76
|
+
|
|
67
77
|
/** Supported local isolation engines for an odla Code host runtime. */
|
|
68
78
|
type CodeContainerEngine = "container" | "podman" | "docker";
|
|
69
79
|
/** Bounded host facts reported on each outbound Code control-plane heartbeat. */
|
|
@@ -78,6 +88,7 @@ interface CodeHostCapabilities {
|
|
|
78
88
|
images: {
|
|
79
89
|
ready: true;
|
|
80
90
|
pi: string;
|
|
91
|
+
piSource: "cli_embedded";
|
|
81
92
|
recipes: Array<{
|
|
82
93
|
id: string;
|
|
83
94
|
image: string;
|
|
@@ -113,7 +124,7 @@ interface CodeConnectOptions {
|
|
|
113
124
|
runRuntime?: (input: CodeRuntimeInput) => Promise<void>;
|
|
114
125
|
readGitOrigin?: (cwd: string) => Promise<string>;
|
|
115
126
|
readGitHead?: (cwd: string) => Promise<string>;
|
|
116
|
-
prepareImages?: (engine: CodeContainerEngine, images: readonly string[]) => Promise<
|
|
127
|
+
prepareImages?: (engine: CodeContainerEngine, images: readonly string[]) => Promise<readonly string[]>;
|
|
117
128
|
prepareLocalSource?: typeof prepareCodeLocalSource;
|
|
118
129
|
}
|
|
119
130
|
/** Authority and runtime boundaries used after a Code host enrollment succeeds. */
|
|
@@ -132,6 +143,7 @@ interface CodeRuntimeInput {
|
|
|
132
143
|
trustedBaseDir: string;
|
|
133
144
|
sourceDir: string;
|
|
134
145
|
};
|
|
146
|
+
piImage?: string;
|
|
135
147
|
}
|
|
136
148
|
/** Enroll this machine from an odla project and keep the embedded Pi runtime
|
|
137
149
|
* online. Both the approval grant and host credential hashes are stored in
|
|
@@ -978,4 +990,4 @@ declare function installSkill(options?: SkillInstallOptions): SkillInstallResult
|
|
|
978
990
|
*/
|
|
979
991
|
declare function smoke(options: SmokeOptions): Promise<void>;
|
|
980
992
|
|
|
981
|
-
export { AGENT_HARNESSES, type AdminAiOptions, type AgentHarness, type AgentHarnessSelector, type AvailableGoogleCalendar, CAPABILITIES, CODE_BUILD_RECIPES, CODE_PI_IMAGE, 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 ConnectGitHubSecuritySourceOptions, 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 ListGitHubSecuritySourcesOptions, type ListHostedSecurityJobsOptions, type LoadedProjectConfig, type LocalCredentials, type OdlaIntegration, type OdlaProjectConfig, type ProvisionOptions, type ProvisionPlan, type RunHostedSecurityOptions, SYSTEM_AI_PURPOSES, type ScopedPlatformTokenOptions, type SecretsPushOptions, type SecretsSetOptions, type SkillInstallOptions, type SkillInstallResult, type SmokeOptions, type StartHostedSecurityJobOptions, type SystemAiPurpose, adminAi, calendarBookingPageUrl, calendarCalendars, calendarConnect, calendarDisconnect, calendarServiceConfig, calendarStatus, codeConnect, connectGitHubSecuritySource, disconnectGitHubSecuritySource, doctor, exitCodeFor, followHostedSecurityJob, getHostedSecurityIntent, getHostedSecurityJob, getHostedSecurityPlan, getHostedSecurityReport, getScopedPlatformToken, inferGitHubRepository, initProject, installSkill, isTerminalHostedSecurityStatus, listGitHubSecuritySources, listHostedSecurityJobs, printCapabilities, provision, redactSecrets, repositoryFromGitRemote, runCli, runCodeRuntime, runHostedSecurity, secretsPush, secretsSet, secretsSetClerkKey, smoke, startHostedSecurityJob };
|
|
993
|
+
export { AGENT_HARNESSES, type AdminAiOptions, type AgentHarness, type AgentHarnessSelector, type AvailableGoogleCalendar, CAPABILITIES, CODE_BUILD_RECIPES, CODE_PI_IMAGE, 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 ConnectGitHubSecuritySourceOptions, 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 ListGitHubSecuritySourcesOptions, type ListHostedSecurityJobsOptions, type LoadedProjectConfig, type LocalCredentials, type OdlaIntegration, type OdlaProjectConfig, type ProvisionOptions, type ProvisionPlan, type RunHostedSecurityOptions, SYSTEM_AI_PURPOSES, type ScopedPlatformTokenOptions, type SecretsPushOptions, type SecretsSetOptions, type SkillInstallOptions, type SkillInstallResult, type SmokeOptions, type StartHostedSecurityJobOptions, type SystemAiPurpose, adminAi, calendarBookingPageUrl, calendarCalendars, calendarConnect, calendarDisconnect, calendarServiceConfig, calendarStatus, codeConnect, connectGitHubSecuritySource, disconnectGitHubSecuritySource, doctor, exitCodeFor, followHostedSecurityJob, getHostedSecurityIntent, getHostedSecurityJob, getHostedSecurityPlan, getHostedSecurityReport, getScopedPlatformToken, inferGitHubRepository, initProject, installSkill, isTerminalHostedSecurityStatus, listGitHubSecuritySources, listHostedSecurityJobs, prepareCodeImages, printCapabilities, provision, redactSecrets, repositoryFromGitRemote, runCli, runCodeRuntime, runHostedSecurity, secretsPush, secretsSet, secretsSetClerkKey, smoke, startHostedSecurityJob };
|
package/dist/index.js
CHANGED
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
isTerminalHostedSecurityStatus,
|
|
31
31
|
listGitHubSecuritySources,
|
|
32
32
|
listHostedSecurityJobs,
|
|
33
|
+
prepareCodeImages,
|
|
33
34
|
printCapabilities,
|
|
34
35
|
provision,
|
|
35
36
|
redactSecrets,
|
|
@@ -42,7 +43,7 @@ import {
|
|
|
42
43
|
secretsSetClerkKey,
|
|
43
44
|
smoke,
|
|
44
45
|
startHostedSecurityJob
|
|
45
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-GLY5BN6D.js";
|
|
46
47
|
export {
|
|
47
48
|
AGENT_HARNESSES,
|
|
48
49
|
CAPABILITIES,
|
|
@@ -74,6 +75,7 @@ export {
|
|
|
74
75
|
isTerminalHostedSecurityStatus,
|
|
75
76
|
listGitHubSecuritySources,
|
|
76
77
|
listHostedSecurityJobs,
|
|
78
|
+
prepareCodeImages,
|
|
77
79
|
printCapabilities,
|
|
78
80
|
provision,
|
|
79
81
|
redactSecrets,
|