@kynver-app/runtime 0.1.91 → 0.1.92
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/box-identity.d.ts +19 -0
- package/dist/box-resource-snapshot-shared.d.ts +2 -1
- package/dist/cleanup-execute.d.ts +2 -4
- package/dist/cleanup-harness-path-validate.d.ts +5 -0
- package/dist/cleanup-path-ownership.d.ts +9 -0
- package/dist/cleanup-privileged-remove.d.ts +13 -0
- package/dist/cleanup-remove-path.d.ts +17 -0
- package/dist/cleanup-types.d.ts +2 -0
- package/dist/cli.js +1535 -1096
- package/dist/cli.js.map +4 -4
- package/dist/config.d.ts +6 -0
- package/dist/daemon-box-identity.d.ts +16 -0
- package/dist/harness-worktree-build-guard.d.ts +12 -0
- package/dist/index.js +1724 -1280
- package/dist/index.js.map +4 -4
- package/dist/resource-gate.d.ts +5 -0
- package/dist/worker-cap-source.d.ts +29 -0
- package/package.json +1 -1
package/dist/config.d.ts
CHANGED
|
@@ -12,8 +12,12 @@ export interface KynverUserConfig {
|
|
|
12
12
|
* (set on user runners after Vercel env cutover — scheduling is deployment-owned).
|
|
13
13
|
*/
|
|
14
14
|
deploymentSchedulerProvider?: "qstash" | "kynver-cron" | "openclaw-cron";
|
|
15
|
+
/** Physical box pool for capacity snapshots (`forge` | `ghost`). Set via `kynver setup --box-kind`. */
|
|
16
|
+
boxKind?: "ghost" | "forge";
|
|
15
17
|
/** Max concurrent workers on this machine. Omit to auto-size from RAM. */
|
|
16
18
|
maxConcurrentWorkers?: number;
|
|
19
|
+
/** Where maxConcurrentWorkers came from. */
|
|
20
|
+
maxConcurrentWorkersSource?: "setup-auto" | "setup-flag" | "operator";
|
|
17
21
|
/** @internal Advanced tuning — not required for setup. */
|
|
18
22
|
perWorkerMemBytes?: number;
|
|
19
23
|
/** @internal Advanced tuning — not required for setup. */
|
|
@@ -27,6 +31,8 @@ export declare function saveUserConfig(config: KynverUserConfig): void;
|
|
|
27
31
|
export declare function normalizeConfigPaths(config: KynverUserConfig): KynverUserConfig;
|
|
28
32
|
/** Values for setup output (never emit `/home/<user>/…`). */
|
|
29
33
|
export declare function presentUserConfig(config: KynverUserConfig): KynverUserConfig;
|
|
34
|
+
export declare function computeSetupAutoMaxWorkers(totalMemBytes: number): number;
|
|
35
|
+
export declare function resolveSetupWorkerConfig(existing: KynverUserConfig, args: Record<string, string | boolean>, totalMemBytes?: number): Pick<KynverUserConfig, "maxConcurrentWorkers" | "maxConcurrentWorkersSource" | "boxKind">;
|
|
30
36
|
export declare function loadApiKey(): string | undefined;
|
|
31
37
|
export declare function saveApiKey(apiKey: string): void;
|
|
32
38
|
export declare function loadRunnerToken(agentOsId?: string): string | undefined;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type KynverUserConfig } from "./config.js";
|
|
2
|
+
import { type ResolvedBoxIdentity } from "./box-identity.js";
|
|
3
|
+
export interface DaemonInstallValidation {
|
|
4
|
+
ok: boolean;
|
|
5
|
+
box: ResolvedBoxIdentity;
|
|
6
|
+
workerCapSource: string;
|
|
7
|
+
maxConcurrentWorkers: number;
|
|
8
|
+
autoCap: number;
|
|
9
|
+
warnings: string[];
|
|
10
|
+
errors: string[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Validate box identity and worker-cap provenance before the daemon loop runs.
|
|
14
|
+
* Loud warnings prevent Forge hosts from silently inheriting Ghost workspace slugs.
|
|
15
|
+
*/
|
|
16
|
+
export declare function validateDaemonInstallIdentity(config?: KynverUserConfig, env?: NodeJS.ProcessEnv): DaemonInstallValidation;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function isPathUnderHarnessWorktree(cwd: string): boolean;
|
|
2
|
+
export type HarnessWorktreeBuildGuardVerdict = {
|
|
3
|
+
ok: true;
|
|
4
|
+
} | {
|
|
5
|
+
ok: false;
|
|
6
|
+
reason: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Prevent root-owned generated caches: npm/build as uid 0 inside harness worktrees
|
|
10
|
+
* creates node_modules/.next the daemon user cannot reclaim during cleanup.
|
|
11
|
+
*/
|
|
12
|
+
export declare function assessHarnessWorktreeBuildGuard(cwd: string): HarnessWorktreeBuildGuardVerdict;
|