niceeval 0.16.3-canary.99 → 0.17.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/dist/cli/bootstrap.cjs +7 -1
- package/dist/cli/bootstrap.cjs.map +1 -1
- package/dist/cli/project-configuration.cjs +8 -11
- package/dist/cli/project-configuration.cjs.map +1 -1
- package/dist/expect/index.cjs.map +1 -1
- package/dist/expect/index.d.cts +2 -1
- package/dist/expect/index.d.mts +2 -1
- package/dist/expect/index.d.ts +2 -1
- package/dist/experiment/host/cli/contribution.cjs +6 -11
- package/dist/experiment/host/cli/contribution.cjs.map +1 -1
- package/dist/experiment/host/cli/contribution.d.cts +0 -16
- package/dist/experiment/host/cli/contribution.d.mts +0 -16
- package/dist/experiment/host/cli/contribution.d.ts +0 -16
- package/dist/experiment/host/operations.cjs +3 -3
- package/dist/experiment/host/operations.cjs.map +1 -1
- package/dist/experiment/host/types.cjs.map +1 -1
- package/dist/experiment/host/types.d.cts +0 -4
- package/dist/experiment/host/types.d.mts +0 -4
- package/dist/experiment/host/types.d.ts +0 -4
- package/dist/fresh-import.cjs +2 -2
- package/dist/fresh-import.cjs.map +1 -1
- package/dist/fresh-import.d.cts +3 -3
- package/dist/fresh-import.d.mts +3 -3
- package/dist/fresh-import.d.ts +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/inspection/codec.cjs.map +1 -1
- package/dist/inspection/codec.d.cts +1 -1
- package/dist/inspection/codec.d.mts +1 -1
- package/dist/inspection/codec.d.ts +1 -1
- package/dist/inspection/facts.cjs +66 -9
- package/dist/inspection/facts.cjs.map +1 -1
- package/dist/inspection/facts.d.cts +4 -0
- package/dist/inspection/facts.d.mts +4 -0
- package/dist/inspection/facts.d.ts +4 -0
- package/dist/inspection/facts.js +4 -2
- package/dist/inspection/index.cjs +1 -3
- package/dist/inspection/index.cjs.map +1 -1
- package/dist/inspection/index.d.cts +1 -1
- package/dist/inspection/index.d.mts +1 -1
- package/dist/inspection/index.d.ts +1 -1
- package/dist/inspection/index.js +44 -48
- package/dist/inspection/limits.cjs +3 -1
- package/dist/inspection/limits.cjs.map +1 -1
- package/dist/inspection/limits.d.cts +2 -0
- package/dist/inspection/limits.d.mts +2 -0
- package/dist/inspection/limits.d.ts +2 -0
- package/dist/inspection/limits.js +6 -4
- package/dist/inspection/project-source.cjs +4 -1
- package/dist/inspection/project-source.cjs.map +1 -1
- package/dist/inspection/protocol.cjs +10 -18
- package/dist/inspection/protocol.cjs.map +1 -1
- package/dist/inspection/protocol.d.cts +111 -173
- package/dist/inspection/protocol.d.mts +111 -173
- package/dist/inspection/protocol.d.ts +111 -173
- package/dist/inspection/public.mjs +73 -109
- package/dist/inspection/results.cjs +12 -48
- package/dist/inspection/results.cjs.map +1 -1
- package/dist/inspection/results.d.cts +124 -122
- package/dist/inspection/results.d.mts +124 -122
- package/dist/inspection/results.d.ts +124 -122
- package/dist/inspection/results.js +16 -20
- package/dist/inspection/select.cjs +80 -117
- package/dist/inspection/select.cjs.map +1 -1
- package/dist/inspection/source.cjs +14 -15
- package/dist/inspection/source.cjs.map +1 -1
- package/dist/inspection/source.d.cts +6 -3
- package/dist/inspection/source.d.mts +6 -3
- package/dist/inspection/source.d.ts +6 -3
- package/dist/inspection/trace.cjs +1 -1
- package/dist/inspection/trace.cjs.map +1 -1
- package/dist/load-config.cjs +17 -11
- package/dist/load-config.cjs.map +1 -1
- package/dist/load-config.d.cts +3 -2
- package/dist/load-config.d.mts +3 -2
- package/dist/load-config.d.ts +3 -2
- package/dist/o11y/adapter-usage-projection.cjs +5 -1
- package/dist/o11y/adapter-usage-projection.cjs.map +1 -1
- package/dist/o11y/adapter-usage-projection.d.cts +109 -1
- package/dist/o11y/adapter-usage-projection.d.mts +109 -1
- package/dist/o11y/adapter-usage-projection.d.ts +109 -1
- package/dist/o11y/cache-read.cjs +113 -0
- package/dist/o11y/cache-read.cjs.map +1 -0
- package/dist/o11y/cache-read.d.cts +80 -0
- package/dist/o11y/cache-read.d.mts +80 -0
- package/dist/o11y/cache-read.d.ts +80 -0
- package/dist/o11y/cache-read.js +8 -0
- package/dist/o11y/cache-read.js.map +1 -0
- package/dist/o11y/eval-usage.cjs +22 -1
- package/dist/o11y/eval-usage.cjs.map +1 -1
- package/dist/o11y/eval-usage.d.cts +9 -1
- package/dist/o11y/eval-usage.d.mts +9 -1
- package/dist/o11y/eval-usage.d.ts +9 -1
- package/dist/record/host/sqlite-host.cjs +188 -53
- package/dist/record/host/sqlite-host.cjs.map +1 -1
- package/dist/record/host/sqlite-host.d.cts +37 -1
- package/dist/record/host/sqlite-host.d.mts +37 -1
- package/dist/record/host/sqlite-host.d.ts +37 -1
- package/dist/record/host/sqlite-host.js +16 -8
- package/dist/record/maintenance/runtime.cjs +3 -3
- package/dist/record/maintenance/runtime.cjs.map +1 -1
- package/dist/record/sqlite/admission-repository.cjs +18 -18
- package/dist/record/sqlite/admission-repository.cjs.map +1 -1
- package/dist/record/sqlite/case-repository.cjs +6 -6
- package/dist/record/sqlite/case-repository.cjs.map +1 -1
- package/dist/record/sqlite/coordination-repository.cjs +25 -25
- package/dist/record/sqlite/coordination-repository.cjs.map +1 -1
- package/dist/record/sqlite/current-schema.cjs +115 -111
- package/dist/record/sqlite/current-schema.cjs.map +1 -1
- package/dist/record/sqlite/current-schema.d.cts +3 -3
- package/dist/record/sqlite/current-schema.d.mts +3 -3
- package/dist/record/sqlite/current-schema.d.ts +3 -3
- package/dist/record/sqlite/database.cjs +56 -53
- package/dist/record/sqlite/database.cjs.map +1 -1
- package/dist/record/sqlite/index.cjs +3 -1
- package/dist/record/sqlite/index.cjs.map +1 -1
- package/dist/record/sqlite/index.d.cts +5 -2
- package/dist/record/sqlite/index.d.mts +5 -2
- package/dist/record/sqlite/index.d.ts +5 -2
- package/dist/record/sqlite/legacy-schema-018.cjs +443 -0
- package/dist/record/sqlite/legacy-schema-018.cjs.map +1 -0
- package/dist/record/sqlite/legacy-schema-018.d.cts +6 -0
- package/dist/record/sqlite/legacy-schema-018.d.mts +6 -0
- package/dist/record/sqlite/legacy-schema-018.d.ts +6 -0
- package/dist/record/sqlite/legacy-schema-018.js +6 -0
- package/dist/record/sqlite/legacy-schema-018.js.map +1 -0
- package/dist/record/sqlite/migration.cjs +105 -46
- package/dist/record/sqlite/migration.cjs.map +1 -1
- package/dist/record/sqlite/migration.d.cts +2 -1
- package/dist/record/sqlite/migration.d.mts +2 -1
- package/dist/record/sqlite/migration.d.ts +2 -1
- package/dist/record/sqlite/portable-capture.cjs +13 -13
- package/dist/record/sqlite/portable-capture.cjs.map +1 -1
- package/dist/record/sqlite/registry-repository.cjs +22 -22
- package/dist/record/sqlite/registry-repository.cjs.map +1 -1
- package/dist/record/sqlite/schema.cjs +10 -2
- package/dist/record/sqlite/schema.cjs.map +1 -1
- package/dist/record/sqlite/schema.d.cts +4 -1
- package/dist/record/sqlite/schema.d.mts +4 -1
- package/dist/record/sqlite/schema.d.ts +4 -1
- package/dist/record/sqlite/schema.js +20 -14
- package/dist/record/sqlite/storage-worker.cjs +1 -1
- package/dist/record/sqlite/storage-worker.cjs.map +1 -1
- package/dist/record/sqlite/storage.cjs +316 -232
- package/dist/record/sqlite/storage.cjs.map +1 -1
- package/dist/record/sqlite/storage.d.cts +10 -2
- package/dist/record/sqlite/storage.d.mts +10 -2
- package/dist/record/sqlite/storage.d.ts +10 -2
- package/dist/record/sqlite/storage.js +54 -50
- package/dist/record/sqlite/types.cjs +1 -1
- package/dist/record/sqlite/types.cjs.map +1 -1
- package/dist/record/sqlite/types.d.cts +13 -1
- package/dist/record/sqlite/types.d.mts +13 -1
- package/dist/record/sqlite/types.d.ts +13 -1
- package/dist/run/cli/contribution.cjs +17 -12
- package/dist/run/cli/contribution.cjs.map +1 -1
- package/dist/run/host/lifecycle-adapter.cjs +1 -1
- package/dist/run/host/lifecycle-adapter.cjs.map +1 -1
- package/dist/run/storage/owner-identity.cjs +78 -16
- package/dist/run/storage/owner-identity.cjs.map +1 -1
- package/dist/run/storage/owner-identity.d.cts +2 -1
- package/dist/run/storage/owner-identity.d.mts +2 -1
- package/dist/run/storage/owner-identity.d.ts +2 -1
- package/dist/run/storage/sqlite.cjs +55 -55
- package/dist/run/storage/sqlite.cjs.map +1 -1
- package/dist/runner/accept.cjs +12 -42
- package/dist/runner/accept.cjs.map +1 -1
- package/dist/runner/accept.d.cts +2 -3
- package/dist/runner/accept.d.mts +2 -3
- package/dist/runner/accept.d.ts +2 -3
- package/dist/runner/adapter-usage.cjs +2 -2
- package/dist/runner/adapter-usage.cjs.map +1 -1
- package/dist/runner/adoption.cjs +14 -26
- package/dist/runner/adoption.cjs.map +1 -1
- package/dist/runner/adoption.d.cts +5 -13
- package/dist/runner/adoption.d.mts +5 -13
- package/dist/runner/adoption.d.ts +5 -13
- package/dist/runner/adoption.js +2 -4
- package/dist/runner/record.cjs +24 -18
- package/dist/runner/record.cjs.map +1 -1
- package/dist/runner/rename-experiment.cjs +5 -7
- package/dist/runner/rename-experiment.cjs.map +1 -1
- package/dist/runner/reuse-plan.cjs +37 -18
- package/dist/runner/reuse-plan.cjs.map +1 -1
- package/dist/runner/reuse-plan.d.cts +4 -1
- package/dist/runner/reuse-plan.d.mts +4 -1
- package/dist/runner/reuse-plan.d.ts +4 -1
- package/dist/runner/setup-prefix-plan.cjs +17 -12
- package/dist/runner/setup-prefix-plan.cjs.map +1 -1
- package/dist/runner/setup-prefix-plan.d.cts +0 -2
- package/dist/runner/setup-prefix-plan.d.mts +0 -2
- package/dist/runner/setup-prefix-plan.d.ts +0 -2
- package/dist/runner/setup-prefix-plan.js +8 -12
- package/dist/sandbox/backend.cjs +10 -1
- package/dist/sandbox/backend.cjs.map +1 -1
- package/dist/sandbox/backend.d.cts +16 -8
- package/dist/sandbox/backend.d.mts +16 -8
- package/dist/sandbox/backend.d.ts +16 -8
- package/dist/sandbox/backend.js +28 -26
- package/dist/sandbox/docker.cjs +7 -1
- package/dist/sandbox/docker.cjs.map +1 -1
- package/dist/sandbox/e2b-cache-repository.cjs +13 -3
- package/dist/sandbox/e2b-cache-repository.cjs.map +1 -1
- package/dist/sandbox/e2b-cache-repository.d.cts +3 -0
- package/dist/sandbox/e2b-cache-repository.d.mts +3 -0
- package/dist/sandbox/e2b-cache-repository.d.ts +3 -0
- package/dist/sandbox/e2b-cache-repository.js +16 -12
- package/dist/sandbox/e2b.cjs +2 -2
- package/dist/sandbox/e2b.cjs.map +1 -1
- package/dist/sandbox/incus/materialize.cjs +1 -1
- package/dist/sandbox/incus/materialize.cjs.map +1 -1
- package/dist/show/contribution.cjs +3 -3
- package/dist/show/contribution.cjs.map +1 -1
- package/dist/show/model.cjs +14 -13
- package/dist/show/model.cjs.map +1 -1
- package/dist/show/model.d.cts +7 -7
- package/dist/show/model.d.mts +7 -7
- package/dist/show/model.d.ts +7 -7
- package/dist/show/render.cjs +14 -0
- package/dist/show/render.cjs.map +1 -1
- package/dist/user-database/storage-worker.cjs +13 -3
- package/dist/user-database/storage-worker.cjs.map +1 -1
- package/dist/view/app-dist/.vite/manifest.json +2 -2
- package/dist/view/app-dist/assets/{index-CmVoXbwG.js → index-B3ijZRph.js} +17 -17
- package/dist/view/app-dist/assets/{quality-cost-scatter-BuLISaH4.js → quality-cost-scatter-B--DfJ9s.js} +1 -1
- package/dist/view/app-dist/index.html +1 -1
- package/dist/view/application-runtime.cjs +8 -0
- package/dist/view/application-runtime.cjs.map +1 -0
- package/dist/view/application-runtime.d.cts +9 -0
- package/dist/view/application-runtime.d.mts +9 -0
- package/dist/view/application-runtime.d.ts +9 -0
- package/dist/view/application-runtime.js +6 -0
- package/dist/view/application-runtime.js.map +1 -0
- package/dist/view/cli/contribution.cjs +5 -2
- package/dist/view/cli/contribution.cjs.map +1 -1
- package/dist/view/cli/contribution.d.cts +2 -1
- package/dist/view/cli/contribution.d.mts +2 -1
- package/dist/view/cli/contribution.d.ts +2 -1
- package/dist/view/function-runtime.mjs +1019 -456
- package/dist/view/http-protocol.d.cts +1 -9
- package/dist/view/http-protocol.d.mts +1 -9
- package/dist/view/http-protocol.d.ts +1 -9
- package/dist/view/inspection-host.cjs +39 -30
- package/dist/view/inspection-host.cjs.map +1 -1
- package/dist/view/inspection-host.d.cts +7545 -2
- package/dist/view/inspection-host.d.mts +7545 -2
- package/dist/view/inspection-host.d.ts +7545 -2
- package/dist/view/server.cjs +8 -5
- package/dist/view/server.cjs.map +1 -1
- package/dist/view/server.d.cts +4 -2
- package/dist/view/server.d.mts +4 -2
- package/dist/view/server.d.ts +4 -2
- package/docs-site/zh/reference/cli.mdx +1 -2
- package/docs-site/zh/tutorials/control-run-cost.mdx +61 -0
- package/docs-site/zh/tutorials/niceeval-taste-application.mdx +21 -0
- package/package.json +1 -1
|
@@ -32,21 +32,13 @@ export declare const ViewInspectionHttpRequestSchema: Schema.Struct<{
|
|
|
32
32
|
} & {
|
|
33
33
|
experimentId: Schema.Codec<import("../record/model/identifiers.cjs").ExperimentId, string, never, never>;
|
|
34
34
|
}> | Schema.Struct<{
|
|
35
|
-
readonly kind: Schema.Literal<"
|
|
35
|
+
readonly kind: Schema.Literal<"run.list">;
|
|
36
36
|
} & {
|
|
37
37
|
continuation: Schema.optional<Schema.String>;
|
|
38
38
|
}> | Schema.Struct<{
|
|
39
39
|
readonly kind: Schema.Literal<"run.get">;
|
|
40
40
|
} & {
|
|
41
41
|
runId: Schema.Codec<import("../record/model/identifiers.cjs").RunId, string, never, never>;
|
|
42
|
-
}> | Schema.Struct<{
|
|
43
|
-
readonly kind: Schema.Literal<"run.summary">;
|
|
44
|
-
} & {
|
|
45
|
-
runId: Schema.Codec<import("../record/model/identifiers.cjs").RunId, string, never, never>;
|
|
46
|
-
}> | Schema.Struct<{
|
|
47
|
-
readonly kind: Schema.Literal<"run.overview">;
|
|
48
|
-
} & {
|
|
49
|
-
runId: Schema.Codec<import("../record/model/identifiers.cjs").RunId, string, never, never>;
|
|
50
42
|
}> | Schema.Struct<{
|
|
51
43
|
readonly kind: Schema.Literal<"attempt.get">;
|
|
52
44
|
} & {
|
|
@@ -32,21 +32,13 @@ export declare const ViewInspectionHttpRequestSchema: Schema.Struct<{
|
|
|
32
32
|
} & {
|
|
33
33
|
experimentId: Schema.Codec<import("../record/model/identifiers.mjs").ExperimentId, string, never, never>;
|
|
34
34
|
}> | Schema.Struct<{
|
|
35
|
-
readonly kind: Schema.Literal<"
|
|
35
|
+
readonly kind: Schema.Literal<"run.list">;
|
|
36
36
|
} & {
|
|
37
37
|
continuation: Schema.optional<Schema.String>;
|
|
38
38
|
}> | Schema.Struct<{
|
|
39
39
|
readonly kind: Schema.Literal<"run.get">;
|
|
40
40
|
} & {
|
|
41
41
|
runId: Schema.Codec<import("../record/model/identifiers.mjs").RunId, string, never, never>;
|
|
42
|
-
}> | Schema.Struct<{
|
|
43
|
-
readonly kind: Schema.Literal<"run.summary">;
|
|
44
|
-
} & {
|
|
45
|
-
runId: Schema.Codec<import("../record/model/identifiers.mjs").RunId, string, never, never>;
|
|
46
|
-
}> | Schema.Struct<{
|
|
47
|
-
readonly kind: Schema.Literal<"run.overview">;
|
|
48
|
-
} & {
|
|
49
|
-
runId: Schema.Codec<import("../record/model/identifiers.mjs").RunId, string, never, never>;
|
|
50
42
|
}> | Schema.Struct<{
|
|
51
43
|
readonly kind: Schema.Literal<"attempt.get">;
|
|
52
44
|
} & {
|
|
@@ -32,21 +32,13 @@ export declare const ViewInspectionHttpRequestSchema: Schema.Struct<{
|
|
|
32
32
|
} & {
|
|
33
33
|
experimentId: Schema.Codec<import("../record/model/identifiers.js").ExperimentId, string, never, never>;
|
|
34
34
|
}> | Schema.Struct<{
|
|
35
|
-
readonly kind: Schema.Literal<"
|
|
35
|
+
readonly kind: Schema.Literal<"run.list">;
|
|
36
36
|
} & {
|
|
37
37
|
continuation: Schema.optional<Schema.String>;
|
|
38
38
|
}> | Schema.Struct<{
|
|
39
39
|
readonly kind: Schema.Literal<"run.get">;
|
|
40
40
|
} & {
|
|
41
41
|
runId: Schema.Codec<import("../record/model/identifiers.js").RunId, string, never, never>;
|
|
42
|
-
}> | Schema.Struct<{
|
|
43
|
-
readonly kind: Schema.Literal<"run.summary">;
|
|
44
|
-
} & {
|
|
45
|
-
runId: Schema.Codec<import("../record/model/identifiers.js").RunId, string, never, never>;
|
|
46
|
-
}> | Schema.Struct<{
|
|
47
|
-
readonly kind: Schema.Literal<"run.overview">;
|
|
48
|
-
} & {
|
|
49
|
-
runId: Schema.Codec<import("../record/model/identifiers.js").RunId, string, never, never>;
|
|
50
42
|
}> | Schema.Struct<{
|
|
51
43
|
readonly kind: Schema.Literal<"attempt.get">;
|
|
52
44
|
} & {
|
|
@@ -9,38 +9,47 @@ const codec_ts_1 = require("../inspection/codec.cjs");
|
|
|
9
9
|
const source_ts_1 = require("../inspection/source.cjs");
|
|
10
10
|
const select_ts_1 = require("../inspection/select.cjs");
|
|
11
11
|
const project_input_ts_1 = require("../inspection/project-input.cjs");
|
|
12
|
+
const facts_ts_1 = require("../inspection/facts.cjs");
|
|
12
13
|
// @concord-code ne-surface-inspect-view-generation
|
|
13
14
|
// @concord-implements docs/feature/inspection/architecture.md
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if (decoded.success.operation.kind === "project.get" && generation.target.kind === "current") {
|
|
28
|
-
if (generation.target.input.cutoffIdentity !== cutoff.identity ||
|
|
29
|
-
generation.target.input.target.identity !== generation.target.identity) {
|
|
30
|
-
return yield* effect_1.Effect.fail(new Error("Pinned current target did not match its descriptor"));
|
|
15
|
+
function inspectViewGeneration(generation, input) {
|
|
16
|
+
return effect_1.Effect.suspend(() => {
|
|
17
|
+
const decoded = (0, codec_ts_1.decodeInspectionRequest)(input);
|
|
18
|
+
if (effect_1.Result.isFailure(decoded))
|
|
19
|
+
return effect_1.Effect.fail(decoded.failure);
|
|
20
|
+
return effect_1.Effect.scoped(effect_1.Effect.gen(function* () {
|
|
21
|
+
const opened = yield* (0, source_ts_1.openHostOwnedInspectionSource)(generation.recordPath);
|
|
22
|
+
const facts = decoded.success.operation.kind === "project.get" && generation.target.kind === "current"
|
|
23
|
+
? Object.freeze({ ...opened, kind: "project-record" })
|
|
24
|
+
: opened;
|
|
25
|
+
const cutoff = facts.cutoff();
|
|
26
|
+
if (cutoff.identity !== generation.sourceCutoffIdentity) {
|
|
27
|
+
return yield* effect_1.Effect.fail(new Error("Pinned generation cutoff did not match its descriptor"));
|
|
31
28
|
}
|
|
32
|
-
(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
29
|
+
if (decoded.success.operation.kind === "project.get" && generation.target.kind === "current") {
|
|
30
|
+
if (generation.target.input.cutoffIdentity !== cutoff.identity ||
|
|
31
|
+
generation.target.input.target.identity !== generation.target.identity) {
|
|
32
|
+
return yield* effect_1.Effect.fail(new Error("Pinned current target did not match its descriptor"));
|
|
33
|
+
}
|
|
34
|
+
// Prepared Runs contain lazy attachment readers owned by preparation's
|
|
35
|
+
// closed Scope. Rebind their exact identities to this request's reader
|
|
36
|
+
// at the already verified generation cutoff; keep the frozen target.
|
|
37
|
+
(0, project_input_ts_1.bindProjectInput)(facts, {
|
|
38
|
+
...generation.target.input,
|
|
39
|
+
runs: (0, facts_ts_1.loadSelectedInspectionRuns)(facts, generation.target.input.runs.map((run) => run.run.runId)),
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
return (0, select_ts_1.selectInspectionOperation)(facts, decoded.success.operation);
|
|
43
|
+
})).pipe(effect_1.Effect.catch(() => effect_1.Effect.succeed(Object.freeze({
|
|
44
|
+
protocol: codec_ts_1.QUERY_PROTOCOL,
|
|
45
|
+
outcome: "failure",
|
|
46
|
+
operation: decoded.success.operation.kind,
|
|
47
|
+
failure: Object.freeze({
|
|
48
|
+
code: "inspection-operation-failed",
|
|
49
|
+
reason: "Inspection could not be completed for this generation.",
|
|
50
|
+
correction: "retry",
|
|
51
|
+
}),
|
|
52
|
+
}))));
|
|
53
|
+
});
|
|
45
54
|
}
|
|
46
55
|
//# sourceMappingURL=inspection-host.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspection-host.js","sourceRoot":"","sources":["inspection-host.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"inspection-host.js","sourceRoot":"","sources":["inspection-host.ts"],"names":[],"mappings":"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","sourcesContent":["// @concord-file ne-surface-view-inspection-host\n// @concord-implements docs/feature/inspection/architecture.md\n// @concord-implements docs/feature/run-inspection/README.md\nimport { Effect, Result } from \"effect\";\nimport { decodeInspectionRequest, QUERY_PROTOCOL } from \"../inspection/codec.ts\";\nimport { openHostOwnedInspectionSource } from \"../inspection/source.ts\";\nimport { selectInspectionOperation } from \"../inspection/select.ts\";\nimport { bindProjectInput } from \"../inspection/project-input.ts\";\nimport { loadSelectedInspectionRuns } from \"../inspection/facts.ts\";\nimport type { InspectionDocument } from \"../inspection/protocol.ts\";\nimport type { ViewGeneration } from \"./revision.ts\";\n// @concord-code ne-surface-inspect-view-generation\n// @concord-implements docs/feature/inspection/architecture.md\nexport function inspectViewGeneration(generation: ViewGeneration, input: unknown) {\n return Effect.suspend(() => {\n const decoded = decodeInspectionRequest(input);\n if (Result.isFailure(decoded))\n return Effect.fail(decoded.failure);\n return Effect.scoped(Effect.gen(function* () {\n const opened = yield* openHostOwnedInspectionSource(generation.recordPath);\n const facts = decoded.success.operation.kind === \"project.get\" && generation.target.kind === \"current\"\n ? Object.freeze({ ...opened, kind: \"project-record\" as const })\n : opened;\n const cutoff = facts.cutoff();\n if (cutoff.identity !== generation.sourceCutoffIdentity) {\n return yield* Effect.fail(new Error(\"Pinned generation cutoff did not match its descriptor\"));\n }\n if (decoded.success.operation.kind === \"project.get\" && generation.target.kind === \"current\") {\n if (generation.target.input.cutoffIdentity !== cutoff.identity ||\n generation.target.input.target.identity !== generation.target.identity) {\n return yield* Effect.fail(new Error(\"Pinned current target did not match its descriptor\"));\n }\n // Prepared Runs contain lazy attachment readers owned by preparation's\n // closed Scope. Rebind their exact identities to this request's reader\n // at the already verified generation cutoff; keep the frozen target.\n bindProjectInput(facts, {\n ...generation.target.input,\n runs: loadSelectedInspectionRuns(facts, generation.target.input.runs.map((run) => run.run.runId)),\n });\n }\n return selectInspectionOperation(facts, decoded.success.operation);\n })).pipe(Effect.catch(() => Effect.succeed(Object.freeze({\n protocol: QUERY_PROTOCOL,\n outcome: \"failure\" as const,\n operation: decoded.success.operation.kind,\n failure: Object.freeze({\n code: \"inspection-operation-failed\" as const,\n reason: \"Inspection could not be completed for this generation.\",\n correction: \"retry\" as const,\n }),\n }) satisfies InspectionDocument)));\n });\n}\n"]}
|