@jini-ai/devops 0.7.2 → 0.7.3-next.2
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/CHANGELOG.md +2 -2
- package/README.md +8 -4
- package/dist/agent-jobs/jobs.d.ts +1 -1
- package/dist/agent-jobs/jobs.js +4 -3
- package/dist/agent-jobs/node.d.ts +2 -2
- package/dist/agent-jobs/node.js +2 -2
- package/dist/backup/plan-store.node.d.ts +73 -0
- package/dist/backup/plan-store.node.js +60 -0
- package/dist/backup/push-jobs.d.ts +88 -0
- package/dist/backup/push-jobs.js +95 -0
- package/dist/backup/upload.node.d.ts +71 -0
- package/dist/backup/upload.node.js +122 -0
- package/dist/checks/coverage/diff.d.ts +2 -2
- package/dist/checks/coverage/diff.js +2 -2
- package/dist/checks/coverage/disk.d.ts +5 -5
- package/dist/checks/coverage/disk.js +5 -5
- package/dist/checks/coverage/floors.d.ts +2 -2
- package/dist/checks/coverage/floors.js +2 -2
- package/dist/checks/coverage/integrity.d.ts +10 -5
- package/dist/checks/coverage/integrity.js +12 -5
- package/dist/checks/coverage/lcov.d.ts +8 -8
- package/dist/checks/coverage/lcov.js +8 -8
- package/dist/checks/env-access.d.ts +37 -0
- package/dist/checks/env-access.js +57 -0
- package/dist/checks/hardwiring-node.d.ts +6 -3
- package/dist/checks/hardwiring-node.js +7 -6
- package/dist/checks/hardwiring.d.ts +32 -8
- package/dist/checks/hardwiring.js +395 -338
- package/dist/checks/node.d.ts +2 -2
- package/dist/checks/node.js +2 -2
- package/dist/checks/published-types/index.d.ts +10 -4
- package/dist/checks/published-types/index.js +30 -9
- package/dist/core/redirect-guard.d.ts +2 -2
- package/dist/core/redirect-guard.js +2 -2
- package/dist/deploy/adapters/undici.d.ts +8 -0
- package/dist/deploy/adapters/undici.js +6 -0
- package/dist/deploy/config-injection.d.ts +43 -0
- package/dist/deploy/config-injection.js +60 -0
- package/dist/deploy/index.d.ts +1 -0
- package/dist/deploy/index.js +1 -0
- package/dist/deploy/naming.d.ts +2 -2
- package/dist/deploy/naming.js +2 -2
- package/dist/deploy/node.d.ts +17 -6
- package/dist/deploy/node.js +8 -9
- package/dist/deploy/ops-runner.d.ts +8 -6
- package/dist/deploy/ops-runner.js +7 -6
- package/dist/deploy/ops-tool-contracts.d.ts +2 -1
- package/dist/deploy/ops-tools.js +1 -1
- package/dist/deploy/reachability.d.ts +1 -1
- package/dist/deploy/reachability.js +1 -1
- package/dist/deploy/react/PublishRunResult.d.ts +24 -0
- package/dist/deploy/react/PublishRunResult.js +25 -0
- package/dist/deploy/react/index.d.ts +3 -0
- package/dist/deploy/react/index.js +2 -0
- package/dist/deploy/tool.d.ts +1 -1
- package/dist/deploy/tool.js +1 -1
- package/dist/dns/delegation.d.ts +2 -2
- package/dist/dns/delegation.js +5 -5
- package/dist/dns/node/resolver.js +30 -29
- package/dist/dns/verify.d.ts +1 -2
- package/dist/dns/verify.js +3 -3
- package/dist/local-dev/free-port.d.ts +25 -0
- package/dist/local-dev/free-port.js +44 -0
- package/dist/local-dev/index.d.ts +4 -3
- package/dist/local-dev/index.js +4 -3
- package/dist/local-dev/node-runtime.d.ts +2 -2
- package/dist/local-dev/node-runtime.js +1 -1
- package/dist/packaging/electron/archive.d.ts +5 -5
- package/dist/packaging/electron/archive.js +5 -5
- package/dist/packaging/electron/asar-adapter.d.ts +1 -1
- package/dist/packaging/electron/asar-adapter.js +1 -1
- package/dist/packaging/electron/entry.d.ts +4 -0
- package/dist/packaging/electron/entry.js +4 -0
- package/dist/packaging/electron/imports.d.ts +2 -2
- package/dist/packaging/electron/imports.js +2 -2
- package/dist/packaging/electron/isolation.d.ts +36 -0
- package/dist/packaging/electron/isolation.js +64 -0
- package/dist/packaging/electron/node.d.ts +2 -2
- package/dist/packaging/electron/node.js +2 -2
- package/dist/packaging/electron/payload-scan.d.ts +17 -0
- package/dist/packaging/electron/payload-scan.js +20 -0
- package/dist/packaging/electron/policies.d.ts +6 -6
- package/dist/packaging/electron/policies.js +6 -6
- package/dist/packaging/electron/stability.d.ts +1 -1
- package/dist/packaging/electron/stability.js +1 -1
- package/dist/packaging/electron/staging.d.ts +11 -11
- package/dist/packaging/electron/staging.js +11 -11
- package/dist/packaging/electron/tree-fingerprint.d.ts +31 -0
- package/dist/packaging/electron/tree-fingerprint.js +59 -0
- package/dist/packaging/electron/typescript.d.ts +8 -2
- package/dist/packaging/electron/typescript.js +108 -99
- package/dist/packaging/electron/update-manifest-merge.d.ts +53 -0
- package/dist/packaging/electron/update-manifest-merge.js +82 -0
- package/dist/source-control/commit.d.ts +19 -3
- package/dist/source-control/commit.js +99 -16
- package/dist/source-control/contracts.d.ts +20 -1
- package/dist/source-control/kit.d.ts +1 -1
- package/dist/source-control/kit.js +1 -1
- package/dist/source-control/registry.d.ts +2 -2
- package/dist/source-control/registry.js +2 -2
- package/dist/static-export/css-urls.d.ts +3 -1
- package/dist/static-export/css-urls.js +1 -1
- package/dist/static-export/fetch-adapter.d.ts +1 -1
- package/dist/static-export/fetch-adapter.js +1 -1
- package/dist/static-export/html-url-locations.js +1 -1
- package/dist/static-export/transforms.d.ts +4 -4
- package/dist/static-export/transforms.js +6 -6
- package/package.json +49 -15
package/CHANGELOG.md
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
|
|
37
37
|
## 0.6.20
|
|
38
38
|
|
|
39
|
-
- `electron` is a classified opt-in peer (`jini.optionalPeers`): only `@jini-ai/devops/local-dev`'s `selectNodeRuntime` loads it. A host that packages a server importing `local-dev` (listen/retirement helpers) no longer fails its staged-closure audit on that dev-only runtime picker (
|
|
39
|
+
- `electron` is a classified opt-in peer (`jini.optionalPeers`): only `@jini-ai/devops/local-dev`'s `selectNodeRuntime` loads it. A host that packages a server importing `local-dev` (listen/retirement helpers) no longer fails its staged-closure audit on that dev-only runtime picker (the first host's desktop 0.1.27).
|
|
40
40
|
|
|
41
41
|
## 0.6.19
|
|
42
42
|
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
|
|
107
107
|
### Patch Changes
|
|
108
108
|
|
|
109
|
-
-
|
|
109
|
+
- Host clean-up release (2026-10-08): code the first host moved into Jini, plus the Jini clean-up (see the commit log since 0.5.1).
|
|
110
110
|
|
|
111
111
|
## 0.5.1 — 2026-10-04
|
|
112
112
|
|
package/README.md
CHANGED
|
@@ -15,10 +15,12 @@ public subpath and permission boundary.
|
|
|
15
15
|
| `./packaging/electron` | Dependency staging, staged runtime closure checks, optional-peer contracts, archive byte verification, freshness and quiet-tree policies. |
|
|
16
16
|
| `./packaging/electron/typescript` | Host-supplied TypeScript AST adapter; TypeScript is a required peer. |
|
|
17
17
|
| `./agent-jobs` | Bounded CLI jobs with resume, stdin prompts, raw logs and stream-based completion. |
|
|
18
|
+
| `./backup/plan-store` | Node-backed in-memory backup plans with expiry and principal/workspace binding. |
|
|
19
|
+
| `./backup/push-jobs` | In-memory backup push jobs with progress, cancellation and bounded waits. |
|
|
18
20
|
| `./checks/published-types` | Published type-surface, registry-drift, linked-package and captured-log checks. |
|
|
19
21
|
| `./checks/coverage` | LCOV, floor, diff, disk-inventory and contamination/baseline policies. |
|
|
20
22
|
| `./checks/node` | Explicit filesystem, process, environment-loader and installer adapters. |
|
|
21
|
-
| `./local-dev` | Environment-file
|
|
23
|
+
| `./local-dev` | Environment-file, listener lookup and advisory free-port helpers with host-supplied paths/commands. |
|
|
22
24
|
| `./ci-cd` | Reserved for pipeline definitions, run status, logs, cancellation, and deployment orchestration. |
|
|
23
25
|
|
|
24
26
|
```ts
|
|
@@ -78,13 +80,15 @@ The deploy core imports neither platform nor undici.
|
|
|
78
80
|
```ts
|
|
79
81
|
import { checkDeploymentUrl } from '@jini-ai/devops/deploy';
|
|
80
82
|
import { createNodeReachabilityPorts } from '@jini-ai/devops/deploy/node';
|
|
81
|
-
|
|
83
|
+
import { assertSafePublicUrl, createValidatingLookup } from '@jini-ai/platform';
|
|
84
|
+
const ports = createNodeReachabilityPorts({ assertSafeUrl: assertSafePublicUrl, createValidatingLookup });
|
|
82
85
|
await checkDeploymentUrl({ url: 'https://example.com', ...ports });
|
|
83
86
|
```
|
|
84
87
|
|
|
85
88
|
The Node defaults reject unsafe public URLs and pin validation to the connection
|
|
86
|
-
through platform's validating lookup
|
|
87
|
-
|
|
89
|
+
through platform's validating lookup, which the host passes in (`assertSafeUrl`,
|
|
90
|
+
`createValidatingLookup`); devops no longer imports platform. `lookupImpl` overrides move from probe
|
|
91
|
+
options to `createNodeReachabilityPorts(required, { lookupImpl?, fetch? })`.
|
|
88
92
|
Default dispatchers remain shared; each override binding retains its own lazy
|
|
89
93
|
pool. HTTPS-only probes, manual redirects and existing deadlines are preserved.
|
|
90
94
|
The Node adapter attaches the validating Agent as a native fetch runtime extension,
|
|
@@ -9,7 +9,7 @@ export declare function parseCodexRun({ jsonl }: {
|
|
|
9
9
|
export declare function buildCodexInvocation({ options, prompt }: {
|
|
10
10
|
options: AgentJobOptions;
|
|
11
11
|
prompt: string;
|
|
12
|
-
}): CodexInvocation;
|
|
12
|
+
}, _optional?: Record<string, never>): CodexInvocation;
|
|
13
13
|
/** Run a bounded batch. The host owns output-directory exclusivity across concurrent batches. */
|
|
14
14
|
export declare function runAgentJobs(required: {
|
|
15
15
|
jobs: readonly AgentJob[];
|
package/dist/agent-jobs/jobs.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
|
+
import { describeErrorForLog } from '@jini-ai/core';
|
|
2
3
|
const jsonDecoder = { decode: ({ line }) => JSON.parse(line) };
|
|
3
4
|
function record(value) { return value !== null && typeof value === 'object' && !Array.isArray(value); }
|
|
4
5
|
/** Keyed by event type in a Map, so a `type` such as `constructor` never reaches a prototype member. */
|
|
@@ -42,7 +43,7 @@ function codexVerdict({ completed, errors, lastMessage, usage }) {
|
|
|
42
43
|
return { success: false, reason: completed ? 'no agent_message' : 'no turn.completed event' };
|
|
43
44
|
}
|
|
44
45
|
/** Construct argv without a shell; prompt content goes only on stdin. Effort is a TOML string. */
|
|
45
|
-
export function buildCodexInvocation({ options, prompt }) {
|
|
46
|
+
export function buildCodexInvocation({ options, prompt }, _optional = {}) {
|
|
46
47
|
validateOptions(options);
|
|
47
48
|
return {
|
|
48
49
|
executable: options.executable, cwd: options.repository,
|
|
@@ -80,7 +81,7 @@ export async function runAgentJobs(required, optional = {}) {
|
|
|
80
81
|
parsed = parseCodexRun({ jsonl: await fs.read({ path: base + '.jsonl' }) }, optional);
|
|
81
82
|
}
|
|
82
83
|
catch (error) {
|
|
83
|
-
parsed = { success: false, reason: `runner: ${
|
|
84
|
+
parsed = { success: false, reason: `runner: ${describeErrorForLog({ err: error })}` };
|
|
84
85
|
}
|
|
85
86
|
const exit = exitCode === undefined ? {} : { exitCode };
|
|
86
87
|
// Persistence belongs to this job: an unavailable artifact must not strand the worker pool.
|
|
@@ -96,7 +97,7 @@ export async function runAgentJobs(required, optional = {}) {
|
|
|
96
97
|
}
|
|
97
98
|
catch (error) {
|
|
98
99
|
// The filesystem may also reject a failure marker; retain the failure in the batch result.
|
|
99
|
-
return { id: job.id, status: 'failed', reason: `artifact: ${
|
|
100
|
+
return { id: job.id, status: 'failed', reason: `artifact: ${describeErrorForLog({ err: error })}`, ...exit };
|
|
100
101
|
}
|
|
101
102
|
}
|
|
102
103
|
async function worker() {
|
|
@@ -2,9 +2,9 @@ import type { AgentCliRunnerPort, JobFilesystemPort, AgentJob } from './ports.js
|
|
|
2
2
|
/** Environment is required: the host explicitly chooses which credentials/config reach the CLI. */
|
|
3
3
|
export declare function createNodeAgentCliRunner({ env }: {
|
|
4
4
|
env: NodeJS.ProcessEnv;
|
|
5
|
-
}): AgentCliRunnerPort;
|
|
5
|
+
}, _optional?: Record<string, never>): AgentCliRunnerPort;
|
|
6
6
|
/** Writes final/failed artifacts; raw logs are streamed by the CLI adapter. */
|
|
7
|
-
export declare function createNodeJobFilesystem(_required: Record<string, never>): JobFilesystemPort;
|
|
7
|
+
export declare function createNodeJobFilesystem(_required: Record<string, never>, _optional?: Record<string, never>): JobFilesystemPort;
|
|
8
8
|
/** The prompt directory as `readPromptJobs` sees it; the default reads the real filesystem. */
|
|
9
9
|
export interface PromptDirectoryPort {
|
|
10
10
|
list(required: {
|
package/dist/agent-jobs/node.js
CHANGED
|
@@ -4,7 +4,7 @@ import { stat, mkdir, readFile, writeFile, rm, readdir } from 'node:fs/promises'
|
|
|
4
4
|
import { pipeline } from 'node:stream/promises';
|
|
5
5
|
import path from 'node:path';
|
|
6
6
|
/** Environment is required: the host explicitly chooses which credentials/config reach the CLI. */
|
|
7
|
-
export function createNodeAgentCliRunner({ env }) {
|
|
7
|
+
export function createNodeAgentCliRunner({ env }, _optional = {}) {
|
|
8
8
|
const environment = { ...env };
|
|
9
9
|
return { async run(request) {
|
|
10
10
|
const child = spawn(request.executable, [...request.args], { cwd: request.cwd, env: environment, shell: false, stdio: ['pipe', 'pipe', 'pipe'] });
|
|
@@ -26,7 +26,7 @@ export function createNodeAgentCliRunner({ env }) {
|
|
|
26
26
|
} };
|
|
27
27
|
}
|
|
28
28
|
/** Writes final/failed artifacts; raw logs are streamed by the CLI adapter. */
|
|
29
|
-
export function createNodeJobFilesystem(_required) {
|
|
29
|
+
export function createNodeJobFilesystem(_required, _optional = {}) {
|
|
30
30
|
return {
|
|
31
31
|
mkdir: async ({ path }) => { await mkdir(path, { recursive: true }); },
|
|
32
32
|
exists: async ({ path }) => {
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Holds a planned site backup between `site_backup_plan` and `site_backup_push`, in memory.
|
|
3
|
+
*
|
|
4
|
+
* A plan carries the database snapshot's bytes, so the push uploads exactly the database the human
|
|
5
|
+
* reviewed and no snapshot file ever sits on disk waiting to be orphaned. That is also why this
|
|
6
|
+
* store is small and short-lived: at most {@link DEFAULT_MAX_PLANS} plans per principal and
|
|
7
|
+
* workspace and {@link DEFAULT_MAX_TOTAL_PLANS} overall, each for {@link DEFAULT_PLAN_TTL_MS}, the
|
|
8
|
+
* oldest evicted first, and expired plans swept on every save. The per-caller cap means other
|
|
9
|
+
* callers' plans never evict a caller's plan; only the overall memory ceiling can.
|
|
10
|
+
*
|
|
11
|
+
* A plan is single-use and bound to the principal and workspace that made it: {@link
|
|
12
|
+
* SiteBackupPlanStore.take} deletes it, and another principal's id reads as not found — never as
|
|
13
|
+
* "exists but not yours", which would confirm a guessed id.
|
|
14
|
+
*
|
|
15
|
+
* In memory only: a server restart drops every plan, and the push then says to plan again.
|
|
16
|
+
*/
|
|
17
|
+
export type SiteBackupPlan<T extends object> = T & {
|
|
18
|
+
readonly planId: string;
|
|
19
|
+
readonly principalId: string;
|
|
20
|
+
readonly workspaceId: string;
|
|
21
|
+
readonly expiresAtMs: number;
|
|
22
|
+
};
|
|
23
|
+
export type TakeSiteBackupPlanResult<T extends object> = {
|
|
24
|
+
ok: true;
|
|
25
|
+
plan: SiteBackupPlan<T>;
|
|
26
|
+
} | {
|
|
27
|
+
ok: false;
|
|
28
|
+
code: "PLAN_NOT_FOUND" | "PLAN_EXPIRED";
|
|
29
|
+
};
|
|
30
|
+
export declare const DEFAULT_PLAN_TTL_MS: number;
|
|
31
|
+
export declare const DEFAULT_MAX_PLANS = 2;
|
|
32
|
+
export declare const DEFAULT_MAX_TOTAL_PLANS = 8;
|
|
33
|
+
export declare class SiteBackupPlanStore<T extends object> {
|
|
34
|
+
private readonly plans;
|
|
35
|
+
private readonly now;
|
|
36
|
+
private readonly ttlMs;
|
|
37
|
+
/** Per principal and workspace. */
|
|
38
|
+
private readonly maxPlans;
|
|
39
|
+
private readonly maxTotalPlans;
|
|
40
|
+
private readonly newId;
|
|
41
|
+
constructor(_required: Record<string, never>, optional?: {
|
|
42
|
+
now?: () => number;
|
|
43
|
+
ttlMs?: number;
|
|
44
|
+
maxPlans?: number;
|
|
45
|
+
maxTotalPlans?: number;
|
|
46
|
+
newId?: () => string;
|
|
47
|
+
});
|
|
48
|
+
/**
|
|
49
|
+
* Stores a plan and returns it with its id and expiry. Expired plans are swept first, then the
|
|
50
|
+
* caller's oldest plans are evicted until it has room, then the oldest overall past the ceiling.
|
|
51
|
+
*
|
|
52
|
+
* @complexity O(plans held), which is at most `maxTotalPlans`.
|
|
53
|
+
*/
|
|
54
|
+
save(input: {
|
|
55
|
+
principalId: string;
|
|
56
|
+
workspaceId: string;
|
|
57
|
+
content: T;
|
|
58
|
+
}, _optional?: Record<string, never>): SiteBackupPlan<T>;
|
|
59
|
+
/** Evicts the oldest matching plans so one more fits under `limit` (a zero limit evicts all of them). */
|
|
60
|
+
private makeRoom;
|
|
61
|
+
/**
|
|
62
|
+
* Removes and returns the plan, once. A plan made by another principal or workspace reads as
|
|
63
|
+
* `PLAN_NOT_FOUND` and is left in place; an expired one is removed and reads as `PLAN_EXPIRED`.
|
|
64
|
+
*
|
|
65
|
+
* @complexity O(1).
|
|
66
|
+
*/
|
|
67
|
+
take(input: {
|
|
68
|
+
planId: string;
|
|
69
|
+
principalId: string;
|
|
70
|
+
workspaceId: string;
|
|
71
|
+
}, _optional?: Record<string, never>): TakeSiteBackupPlanResult<T>;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=plan-store.node.d.ts.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
export const DEFAULT_PLAN_TTL_MS = 10 * 60 * 1000;
|
|
3
|
+
export const DEFAULT_MAX_PLANS = 2;
|
|
4
|
+
export const DEFAULT_MAX_TOTAL_PLANS = 8;
|
|
5
|
+
export class SiteBackupPlanStore {
|
|
6
|
+
plans = new Map();
|
|
7
|
+
now;
|
|
8
|
+
ttlMs;
|
|
9
|
+
/** Per principal and workspace. */
|
|
10
|
+
maxPlans;
|
|
11
|
+
maxTotalPlans;
|
|
12
|
+
newId;
|
|
13
|
+
constructor(_required, optional = {}) {
|
|
14
|
+
this.now = optional.now ?? Date.now;
|
|
15
|
+
this.ttlMs = optional.ttlMs ?? DEFAULT_PLAN_TTL_MS;
|
|
16
|
+
this.maxPlans = optional.maxPlans ?? DEFAULT_MAX_PLANS;
|
|
17
|
+
this.maxTotalPlans = optional.maxTotalPlans ?? DEFAULT_MAX_TOTAL_PLANS;
|
|
18
|
+
this.newId = optional.newId ?? randomUUID;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Stores a plan and returns it with its id and expiry. Expired plans are swept first, then the
|
|
22
|
+
* caller's oldest plans are evicted until it has room, then the oldest overall past the ceiling.
|
|
23
|
+
*
|
|
24
|
+
* @complexity O(plans held), which is at most `maxTotalPlans`.
|
|
25
|
+
*/
|
|
26
|
+
save(input, _optional = {}) {
|
|
27
|
+
const nowMs = this.now();
|
|
28
|
+
for (const [id, plan] of this.plans) {
|
|
29
|
+
if (plan.expiresAtMs <= nowMs)
|
|
30
|
+
this.plans.delete(id);
|
|
31
|
+
}
|
|
32
|
+
this.makeRoom({ limit: this.maxPlans }, { owns: ({ plan }, _optional = {}) => plan.principalId === input.principalId && plan.workspaceId === input.workspaceId });
|
|
33
|
+
this.makeRoom({ limit: this.maxTotalPlans });
|
|
34
|
+
const plan = { ...input.content, planId: this.newId(), principalId: input.principalId, workspaceId: input.workspaceId, expiresAtMs: nowMs + this.ttlMs };
|
|
35
|
+
this.plans.set(plan.planId, plan);
|
|
36
|
+
return plan;
|
|
37
|
+
}
|
|
38
|
+
/** Evicts the oldest matching plans so one more fits under `limit` (a zero limit evicts all of them). */
|
|
39
|
+
makeRoom(required, optional = {}) {
|
|
40
|
+
const ids = [...this.plans.values()].filter(plan => optional.owns?.({ plan }) ?? true).map(plan => plan.planId);
|
|
41
|
+
for (const id of ids.slice(0, Math.max(0, ids.length - required.limit + 1)))
|
|
42
|
+
this.plans.delete(id);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Removes and returns the plan, once. A plan made by another principal or workspace reads as
|
|
46
|
+
* `PLAN_NOT_FOUND` and is left in place; an expired one is removed and reads as `PLAN_EXPIRED`.
|
|
47
|
+
*
|
|
48
|
+
* @complexity O(1).
|
|
49
|
+
*/
|
|
50
|
+
take(input, _optional = {}) {
|
|
51
|
+
const plan = this.plans.get(input.planId);
|
|
52
|
+
if (!plan || plan.principalId !== input.principalId || plan.workspaceId !== input.workspaceId)
|
|
53
|
+
return { ok: false, code: "PLAN_NOT_FOUND" };
|
|
54
|
+
this.plans.delete(input.planId);
|
|
55
|
+
if (plan.expiresAtMs <= this.now())
|
|
56
|
+
return { ok: false, code: "PLAN_EXPIRED" };
|
|
57
|
+
return { ok: true, plan };
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=plan-store.node.js.map
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Runs `site_backup_push`'s upload as an in-process job, so a backup can outlast one tool call.
|
|
3
|
+
*
|
|
4
|
+
* Why: a delegated tool call is cut off after 6 minutes (`@jini-ai/mcp`'s
|
|
5
|
+
* `DEFAULT_DELEGATED_TOOL_TIMEOUT_MS`), and a 212 MiB backup — about 283 MB of base64 on the wire,
|
|
6
|
+
* plus any rate-limit waits — can take longer on a home connection. The push call waits for its job
|
|
7
|
+
* up to a budget; if the job is still running then, the call returns its progress, and calling
|
|
8
|
+
* `site_backup_push` again with the same planId waits on the SAME job. A second call never starts a
|
|
9
|
+
* second upload, and the backup is still exactly one commit.
|
|
10
|
+
*
|
|
11
|
+
* A job is keyed by its planId and bound to the principal and workspace that started it, like the
|
|
12
|
+
* plan itself. Its outcome is handed to the first call that sees it finish, then forgotten, so a
|
|
13
|
+
* later call with that planId reads as not found. A finished outcome nobody collected is dropped
|
|
14
|
+
* after {@link FINISHED_JOB_TTL_MS}. In memory only: a server restart drops every job.
|
|
15
|
+
*/
|
|
16
|
+
/** How far a push has got, updated in place as files go up. The manifest is not counted. */
|
|
17
|
+
export interface SiteBackupPushProgress {
|
|
18
|
+
filesDone: number;
|
|
19
|
+
readonly filesTotal: number;
|
|
20
|
+
bytesDone: number;
|
|
21
|
+
readonly bytesTotal: number;
|
|
22
|
+
}
|
|
23
|
+
export interface PushJobKey {
|
|
24
|
+
readonly planId: string;
|
|
25
|
+
readonly principalId: string;
|
|
26
|
+
readonly workspaceId: string;
|
|
27
|
+
}
|
|
28
|
+
export interface PushJob<T> {
|
|
29
|
+
readonly key: PushJobKey;
|
|
30
|
+
readonly controller: AbortController;
|
|
31
|
+
readonly progress: SiteBackupPushProgress;
|
|
32
|
+
readonly startedAtMs: number;
|
|
33
|
+
/** Never rejects: a thrown run is carried as `{ ok: false, error }` so an unwatched job cannot
|
|
34
|
+
* become an unhandled rejection. */
|
|
35
|
+
readonly settled: Promise<{
|
|
36
|
+
ok: true;
|
|
37
|
+
result: T;
|
|
38
|
+
} | {
|
|
39
|
+
ok: false;
|
|
40
|
+
error: unknown;
|
|
41
|
+
}>;
|
|
42
|
+
finishedAtMs?: number;
|
|
43
|
+
}
|
|
44
|
+
export type PushJobWait<T> = {
|
|
45
|
+
readonly state: "done";
|
|
46
|
+
readonly result: T;
|
|
47
|
+
} | {
|
|
48
|
+
readonly state: "running";
|
|
49
|
+
readonly progress: SiteBackupPushProgress;
|
|
50
|
+
readonly elapsedMs: number;
|
|
51
|
+
} | {
|
|
52
|
+
readonly state: "abandoned";
|
|
53
|
+
};
|
|
54
|
+
export declare const FINISHED_JOB_TTL_MS: number;
|
|
55
|
+
export declare class SiteBackupPushJobs<T> {
|
|
56
|
+
private readonly jobs;
|
|
57
|
+
private readonly now;
|
|
58
|
+
constructor(_required: Record<string, never>, { now }?: {
|
|
59
|
+
now?: () => number;
|
|
60
|
+
});
|
|
61
|
+
/** The running or uncollected job for this planId, when the same principal and workspace started
|
|
62
|
+
* it. @complexity O(jobs) for the sweep. */
|
|
63
|
+
find(key: PushJobKey, _optional?: Record<string, never>): PushJob<T> | undefined;
|
|
64
|
+
/** Starts `run` now; it keeps running whether or not anyone waits. @complexity O(jobs). */
|
|
65
|
+
start({ key, progress, run }: {
|
|
66
|
+
key: PushJobKey;
|
|
67
|
+
progress: SiteBackupPushProgress;
|
|
68
|
+
run: (required: {
|
|
69
|
+
signal: AbortSignal;
|
|
70
|
+
progress: SiteBackupPushProgress;
|
|
71
|
+
}) => Promise<T>;
|
|
72
|
+
}, _optional?: Record<string, never>): PushJob<T>;
|
|
73
|
+
/**
|
|
74
|
+
* Waits for `job` up to `budgetMs`. Finished: its outcome, and the job is forgotten. The caller's
|
|
75
|
+
* run stopped while waiting: the job is stopped too (no file after the current ones, no commit).
|
|
76
|
+
* Otherwise its progress, and it keeps running.
|
|
77
|
+
*
|
|
78
|
+
* @throws What the job's run threw, to the call that collects it.
|
|
79
|
+
* @complexity O(1) besides the wait.
|
|
80
|
+
*/
|
|
81
|
+
wait({ job, signal, budgetMs }: {
|
|
82
|
+
job: PushJob<T>;
|
|
83
|
+
signal: AbortSignal;
|
|
84
|
+
budgetMs: number;
|
|
85
|
+
}, _optional?: Record<string, never>): Promise<PushJobWait<T>>;
|
|
86
|
+
private sweep;
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=push-jobs.d.ts.map
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Runs `site_backup_push`'s upload as an in-process job, so a backup can outlast one tool call.
|
|
3
|
+
*
|
|
4
|
+
* Why: a delegated tool call is cut off after 6 minutes (`@jini-ai/mcp`'s
|
|
5
|
+
* `DEFAULT_DELEGATED_TOOL_TIMEOUT_MS`), and a 212 MiB backup — about 283 MB of base64 on the wire,
|
|
6
|
+
* plus any rate-limit waits — can take longer on a home connection. The push call waits for its job
|
|
7
|
+
* up to a budget; if the job is still running then, the call returns its progress, and calling
|
|
8
|
+
* `site_backup_push` again with the same planId waits on the SAME job. A second call never starts a
|
|
9
|
+
* second upload, and the backup is still exactly one commit.
|
|
10
|
+
*
|
|
11
|
+
* A job is keyed by its planId and bound to the principal and workspace that started it, like the
|
|
12
|
+
* plan itself. Its outcome is handed to the first call that sees it finish, then forgotten, so a
|
|
13
|
+
* later call with that planId reads as not found. A finished outcome nobody collected is dropped
|
|
14
|
+
* after {@link FINISHED_JOB_TTL_MS}. In memory only: a server restart drops every job.
|
|
15
|
+
*/
|
|
16
|
+
export const FINISHED_JOB_TTL_MS = 60 * 60 * 1000;
|
|
17
|
+
export class SiteBackupPushJobs {
|
|
18
|
+
jobs = new Map();
|
|
19
|
+
now;
|
|
20
|
+
constructor(_required, { now } = {}) {
|
|
21
|
+
this.now = now ?? Date.now;
|
|
22
|
+
}
|
|
23
|
+
/** The running or uncollected job for this planId, when the same principal and workspace started
|
|
24
|
+
* it. @complexity O(jobs) for the sweep. */
|
|
25
|
+
find(key, _optional = {}) {
|
|
26
|
+
this.sweep();
|
|
27
|
+
const job = this.jobs.get(key.planId);
|
|
28
|
+
return job && job.key.principalId === key.principalId && job.key.workspaceId === key.workspaceId ? job : undefined;
|
|
29
|
+
}
|
|
30
|
+
/** Starts `run` now; it keeps running whether or not anyone waits. @complexity O(jobs). */
|
|
31
|
+
start({ key, progress, run }, _optional = {}) {
|
|
32
|
+
this.sweep();
|
|
33
|
+
const controller = new AbortController();
|
|
34
|
+
const job = {
|
|
35
|
+
key,
|
|
36
|
+
controller,
|
|
37
|
+
progress,
|
|
38
|
+
startedAtMs: this.now(),
|
|
39
|
+
settled: run({ signal: controller.signal, progress }).then((result) => ({ ok: true, result }), (error) => ({ ok: false, error })),
|
|
40
|
+
};
|
|
41
|
+
void job.settled.then(() => {
|
|
42
|
+
job.finishedAtMs = this.now();
|
|
43
|
+
});
|
|
44
|
+
this.jobs.set(key.planId, job);
|
|
45
|
+
return job;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Waits for `job` up to `budgetMs`. Finished: its outcome, and the job is forgotten. The caller's
|
|
49
|
+
* run stopped while waiting: the job is stopped too (no file after the current ones, no commit).
|
|
50
|
+
* Otherwise its progress, and it keeps running.
|
|
51
|
+
*
|
|
52
|
+
* @throws What the job's run threw, to the call that collects it.
|
|
53
|
+
* @complexity O(1) besides the wait.
|
|
54
|
+
*/
|
|
55
|
+
async wait({ job, signal, budgetMs }, _optional = {}) {
|
|
56
|
+
let timer;
|
|
57
|
+
let onAbort;
|
|
58
|
+
const budget = new Promise((resolve) => {
|
|
59
|
+
timer = setTimeout(() => resolve("budget"), budgetMs);
|
|
60
|
+
});
|
|
61
|
+
const aborted = new Promise((resolve) => {
|
|
62
|
+
onAbort = () => resolve("aborted");
|
|
63
|
+
if (signal.aborted)
|
|
64
|
+
onAbort();
|
|
65
|
+
else
|
|
66
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
67
|
+
});
|
|
68
|
+
try {
|
|
69
|
+
const outcome = await Promise.race([job.settled, budget, aborted]);
|
|
70
|
+
if (outcome === "budget")
|
|
71
|
+
return { state: "running", progress: { ...job.progress }, elapsedMs: this.now() - job.startedAtMs };
|
|
72
|
+
this.jobs.delete(job.key.planId);
|
|
73
|
+
if (outcome === "aborted") {
|
|
74
|
+
job.controller.abort();
|
|
75
|
+
return { state: "abandoned" };
|
|
76
|
+
}
|
|
77
|
+
if (!outcome.ok)
|
|
78
|
+
throw outcome.error;
|
|
79
|
+
return { state: "done", result: outcome.result };
|
|
80
|
+
}
|
|
81
|
+
finally {
|
|
82
|
+
clearTimeout(timer);
|
|
83
|
+
if (onAbort)
|
|
84
|
+
signal.removeEventListener("abort", onAbort);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
sweep() {
|
|
88
|
+
const now = this.now();
|
|
89
|
+
for (const [planId, job] of this.jobs) {
|
|
90
|
+
if (job.finishedAtMs !== undefined && now - job.finishedAtMs > FINISHED_JOB_TTL_MS)
|
|
91
|
+
this.jobs.delete(planId);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=push-jobs.js.map
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { SiteBackupPushProgress } from "./push-jobs.js";
|
|
2
|
+
/**
|
|
3
|
+
* @file Uploads deferred content and appends a host-built manifest, in input order, for one commit.
|
|
4
|
+
*
|
|
5
|
+
* Built for large backups:
|
|
6
|
+
* - a bounded number of files are read only when a worker takes them, so at most that many files
|
|
7
|
+
* are in memory, never the whole backup;
|
|
8
|
+
* - small UTF-8 files go inline when the provider accepts them, saving one write request per file
|
|
9
|
+
* against the host's rate limits;
|
|
10
|
+
* - identical content is uploaded once;
|
|
11
|
+
* - a failure stops every worker from taking another file and names the file that failed. Transient
|
|
12
|
+
* host errors are retried inside the provider, so a failure that reaches here is final.
|
|
13
|
+
*/
|
|
14
|
+
/** Files uploaded at a time: a few overlapping requests hide per-request latency, and stay far
|
|
15
|
+
* below a host's concurrent-request limit (GitHub: 100). */
|
|
16
|
+
export declare const SITE_BACKUP_UPLOAD_CONCURRENCY = 4;
|
|
17
|
+
export interface PushFailure {
|
|
18
|
+
readonly ok: false;
|
|
19
|
+
readonly code: string;
|
|
20
|
+
readonly message: string;
|
|
21
|
+
}
|
|
22
|
+
export type BackupUploadEntry = {
|
|
23
|
+
readonly path: string;
|
|
24
|
+
readonly bytes: number;
|
|
25
|
+
readonly sha256: string;
|
|
26
|
+
} & ({
|
|
27
|
+
readonly blobSha: string;
|
|
28
|
+
} | {
|
|
29
|
+
readonly text: string;
|
|
30
|
+
});
|
|
31
|
+
/** One file to upload: its path and how to get its bytes when a worker takes it. */
|
|
32
|
+
export interface PendingFile {
|
|
33
|
+
readonly path: string;
|
|
34
|
+
load(required: Record<string, never>, optional?: Record<string, never>): Promise<{
|
|
35
|
+
ok: true;
|
|
36
|
+
bytes: Uint8Array;
|
|
37
|
+
} | PushFailure>;
|
|
38
|
+
}
|
|
39
|
+
export interface UploadPlannedContentInput {
|
|
40
|
+
readonly files: readonly PendingFile[];
|
|
41
|
+
/** Aborted: no worker takes another file; a file already loading may still upload. */
|
|
42
|
+
readonly signal: AbortSignal;
|
|
43
|
+
readonly progress: SiteBackupPushProgress;
|
|
44
|
+
readonly cancelled: PushFailure;
|
|
45
|
+
readonly uploadBlob: (required: {
|
|
46
|
+
path: string;
|
|
47
|
+
content: Uint8Array;
|
|
48
|
+
}, optional?: Record<string, never>) => Promise<{
|
|
49
|
+
ok: true;
|
|
50
|
+
blobSha: string;
|
|
51
|
+
} | PushFailure>;
|
|
52
|
+
readonly buildManifest: (required: {
|
|
53
|
+
entries: BackupUploadEntry[];
|
|
54
|
+
}, optional?: Record<string, never>) => {
|
|
55
|
+
path: string;
|
|
56
|
+
content: Uint8Array;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Uploads the content and returns the folder's entries, the manifest last.
|
|
61
|
+
*
|
|
62
|
+
* @complexity O(total bytes); one upload per distinct non-inline content.
|
|
63
|
+
*/
|
|
64
|
+
export declare function uploadPlannedContent(input: UploadPlannedContentInput, { concurrency, inlineTextMaxBytes }?: {
|
|
65
|
+
concurrency?: number;
|
|
66
|
+
inlineTextMaxBytes?: number;
|
|
67
|
+
}): Promise<{
|
|
68
|
+
ok: true;
|
|
69
|
+
entries: BackupUploadEntry[];
|
|
70
|
+
} | PushFailure>;
|
|
71
|
+
//# sourceMappingURL=upload.node.d.ts.map
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { ToolInputError } from "@jini-ai/core";
|
|
3
|
+
import { orFallbackSync } from "@jini-ai/core/errors/idioms";
|
|
4
|
+
/**
|
|
5
|
+
* @file Uploads deferred content and appends a host-built manifest, in input order, for one commit.
|
|
6
|
+
*
|
|
7
|
+
* Built for large backups:
|
|
8
|
+
* - a bounded number of files are read only when a worker takes them, so at most that many files
|
|
9
|
+
* are in memory, never the whole backup;
|
|
10
|
+
* - small UTF-8 files go inline when the provider accepts them, saving one write request per file
|
|
11
|
+
* against the host's rate limits;
|
|
12
|
+
* - identical content is uploaded once;
|
|
13
|
+
* - a failure stops every worker from taking another file and names the file that failed. Transient
|
|
14
|
+
* host errors are retried inside the provider, so a failure that reaches here is final.
|
|
15
|
+
*/
|
|
16
|
+
/** Files uploaded at a time: a few overlapping requests hide per-request latency, and stay far
|
|
17
|
+
* below a host's concurrent-request limit (GitHub: 100). */
|
|
18
|
+
export const SITE_BACKUP_UPLOAD_CONCURRENCY = 4;
|
|
19
|
+
/** Inline text is held until the commit, so it is bounded; past this, files go up as blobs. */
|
|
20
|
+
const INLINE_TEXT_BUDGET_BYTES = 64 * 1024 * 1024;
|
|
21
|
+
/** The bytes, as text, when they are valid UTF-8 without a NUL — else `null`. The BOM is kept. */
|
|
22
|
+
function asUtf8Text(content) {
|
|
23
|
+
if (content.includes(0))
|
|
24
|
+
return null;
|
|
25
|
+
return orFallbackSync({
|
|
26
|
+
work: () => new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(content),
|
|
27
|
+
fallback: null,
|
|
28
|
+
step: "decode backup inline UTF-8",
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/** Turns file content into tree entries: inline text when the provider takes it, else an uploaded
|
|
32
|
+
* blob — once per distinct content, even when two workers meet the same bytes at once. */
|
|
33
|
+
class EntryBuilder {
|
|
34
|
+
uploads = new Map();
|
|
35
|
+
inlineBytes = 0;
|
|
36
|
+
input;
|
|
37
|
+
inlineTextMaxBytes;
|
|
38
|
+
constructor(input, { inlineTextMaxBytes } = {}) {
|
|
39
|
+
this.input = input;
|
|
40
|
+
this.inlineTextMaxBytes = inlineTextMaxBytes;
|
|
41
|
+
}
|
|
42
|
+
/** @complexity O(bytes) to hash and decode; at most one upload per distinct content. */
|
|
43
|
+
async entryFor({ path, content }, _optional = {}) {
|
|
44
|
+
const sha256 = createHash("sha256").update(content).digest("hex");
|
|
45
|
+
const text = this.inlineText(content);
|
|
46
|
+
if (text !== null)
|
|
47
|
+
return { path, text, bytes: content.byteLength, sha256 };
|
|
48
|
+
let pending = this.uploads.get(sha256);
|
|
49
|
+
if (pending === undefined) {
|
|
50
|
+
pending = this.input.uploadBlob({ path, content });
|
|
51
|
+
this.uploads.set(sha256, pending);
|
|
52
|
+
}
|
|
53
|
+
const uploaded = await pending;
|
|
54
|
+
if (!uploaded.ok)
|
|
55
|
+
return { ok: false, code: uploaded.code, message: `uploading '${path}' failed: ${uploaded.message}` };
|
|
56
|
+
return { path, blobSha: uploaded.blobSha, bytes: content.byteLength, sha256 };
|
|
57
|
+
}
|
|
58
|
+
inlineText(content) {
|
|
59
|
+
const max = this.inlineTextMaxBytes;
|
|
60
|
+
if (max === undefined || content.byteLength > max || this.inlineBytes + content.byteLength > INLINE_TEXT_BUDGET_BYTES)
|
|
61
|
+
return null;
|
|
62
|
+
const text = asUtf8Text(content);
|
|
63
|
+
if (text !== null)
|
|
64
|
+
this.inlineBytes += content.byteLength;
|
|
65
|
+
return text;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Runs `work` over `count` indexes with at most `concurrency` in flight; the first failure (or an
|
|
70
|
+
* abort) stops every worker from taking another index.
|
|
71
|
+
*
|
|
72
|
+
* @complexity O(count) calls of `work`.
|
|
73
|
+
*/
|
|
74
|
+
async function runBounded({ count, concurrency, signal, cancelled, work }, _optional = {}) {
|
|
75
|
+
let next = 0;
|
|
76
|
+
let failure = null;
|
|
77
|
+
const worker = async () => {
|
|
78
|
+
while (failure === null && !signal.aborted && next < count) {
|
|
79
|
+
const index = next;
|
|
80
|
+
next++;
|
|
81
|
+
const outcome = await work(index);
|
|
82
|
+
if (outcome !== null && failure === null)
|
|
83
|
+
failure = outcome;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
await Promise.all(Array.from({ length: Math.max(1, Math.min(concurrency, count)) }, worker));
|
|
87
|
+
return failure ?? (signal.aborted ? cancelled : null);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Uploads the content and returns the folder's entries, the manifest last.
|
|
91
|
+
*
|
|
92
|
+
* @complexity O(total bytes); one upload per distinct non-inline content.
|
|
93
|
+
*/
|
|
94
|
+
export async function uploadPlannedContent(input, { concurrency = SITE_BACKUP_UPLOAD_CONCURRENCY, inlineTextMaxBytes } = {}) {
|
|
95
|
+
const { files, progress } = input;
|
|
96
|
+
const builder = new EntryBuilder(input, { inlineTextMaxBytes });
|
|
97
|
+
const entries = [];
|
|
98
|
+
entries.length = files.length;
|
|
99
|
+
const failure = await runBounded({ count: files.length, concurrency, signal: input.signal, cancelled: input.cancelled, work: async (index) => {
|
|
100
|
+
const file = files[index];
|
|
101
|
+
if (file === undefined)
|
|
102
|
+
throw new ToolInputError({ message: `Backup upload has no file at index ${index}` });
|
|
103
|
+
const loaded = await file.load({});
|
|
104
|
+
if (!loaded.ok)
|
|
105
|
+
return loaded;
|
|
106
|
+
const entry = await builder.entryFor({ path: file.path, content: loaded.bytes });
|
|
107
|
+
if ("ok" in entry)
|
|
108
|
+
return entry;
|
|
109
|
+
entries[index] = entry;
|
|
110
|
+
progress.filesDone += 1;
|
|
111
|
+
progress.bytesDone += entry.bytes;
|
|
112
|
+
return null;
|
|
113
|
+
} });
|
|
114
|
+
if (failure !== null)
|
|
115
|
+
return failure;
|
|
116
|
+
const manifest = input.buildManifest({ entries });
|
|
117
|
+
const manifestEntry = await builder.entryFor(manifest);
|
|
118
|
+
if ("ok" in manifestEntry)
|
|
119
|
+
return manifestEntry;
|
|
120
|
+
return { ok: true, entries: [...entries, manifestEntry] };
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=upload.node.js.map
|
|
@@ -38,7 +38,7 @@ export declare function evaluateFileTiers({ file, unitRec, integrationRec, thres
|
|
|
38
38
|
unitRec: FileCoverage | undefined;
|
|
39
39
|
integrationRec: FileCoverage | undefined;
|
|
40
40
|
thresholds: TierThresholds;
|
|
41
|
-
}): FileTierEvaluation;
|
|
41
|
+
}, _optional?: Record<string, never>): FileTierEvaluation;
|
|
42
42
|
/** Query a diff port, then parse supplied coverage artifacts only when measurable files changed. */
|
|
43
43
|
export declare function checkCoverageDiff({ baseRef, repoRoot, sourceRoots, diff, reader, isMeasurable, unitCoveragePath, integrationCoveragePath, thresholds }: {
|
|
44
44
|
baseRef: string;
|
|
@@ -50,7 +50,7 @@ export declare function checkCoverageDiff({ baseRef, repoRoot, sourceRoots, diff
|
|
|
50
50
|
unitCoveragePath: string;
|
|
51
51
|
integrationCoveragePath: string;
|
|
52
52
|
thresholds: TierThresholds;
|
|
53
|
-
}): Promise<{
|
|
53
|
+
}, _optional?: Record<string, never>): Promise<{
|
|
54
54
|
ok: boolean;
|
|
55
55
|
files: readonly FileTierEvaluation[];
|
|
56
56
|
}>;
|