@openspecui/server 11.1.0 → 12.0.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.mjs +32 -9
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -33,7 +33,7 @@ import { NodeWorkerSearchProvider } from "@openspecui/search/node";
|
|
|
33
33
|
import * as pty from "@lydell/node-pty";
|
|
34
34
|
import { EventEmitter as EventEmitter$1 } from "events";
|
|
35
35
|
import { HostedCliProjectionNoticeSchema, HostedRootContextProjectionStateSchema, HostedRootContextResolvedStateSchema, HostedStoreContentChangesProjectionStateSchema, HostedStoreContentSpecsProjectionStateSchema, HostedStoreDoctorEnvelopeSchema, HostedStoreDoctorProjectionStateSchema, HostedStoreListEnvelopeSchema, HostedStoreListProjectionStateSchema } from "@openspecui/core/hosted-contract";
|
|
36
|
-
import { OPENSPEC_CLI_TARGET_SERIES, deriveOpenSpecCliCapabilities, parseOpenSpecCliVersion } from "@openspecui/core/openspec-compat";
|
|
36
|
+
import { OPENSPEC_CLI_ACCEPTED_RANGE, OPENSPEC_CLI_TARGET_SERIES, deriveOpenSpecCliCapabilities, parseOpenSpecCliVersion } from "@openspecui/core/openspec-compat";
|
|
37
37
|
import { StoreContentChangeListSchema, StoreContentSpecListSchema } from "@openspecui/core/store-content-projection";
|
|
38
38
|
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
|
|
39
39
|
import { NodeSDK } from "@opentelemetry/sdk-node";
|
|
@@ -13068,8 +13068,8 @@ function buildShowDiffCommand(changeId, store) {
|
|
|
13068
13068
|
* Read the CLI MODIFIED-delta diff evidence for one change.
|
|
13069
13069
|
*
|
|
13070
13070
|
* The projection is separately fetched CLI evidence: the local delta parser keeps owning the
|
|
13071
|
-
* delta display and nothing here recomputes or backfills a diff. Sessions without the
|
|
13072
|
-
* `requirementDiff` capability (
|
|
13071
|
+
* delta display and nothing here recomputes or backfills a diff. Sessions without the
|
|
13072
|
+
* `requirementDiff` capability (retired, bypassed, or unavailable CLI) and
|
|
13073
13073
|
* sessions without a resolved planning root return a typed unavailable projection without
|
|
13074
13074
|
* spawning any process.
|
|
13075
13075
|
*/
|
|
@@ -15863,15 +15863,38 @@ const cliRouter = router({
|
|
|
15863
15863
|
]),
|
|
15864
15864
|
strict: z.boolean().optional()
|
|
15865
15865
|
}),
|
|
15866
|
-
z.object({ kind: z.literal("archived") })
|
|
15866
|
+
z.object({ kind: z.literal("archived") }),
|
|
15867
|
+
z.object({
|
|
15868
|
+
kind: z.literal("findings"),
|
|
15869
|
+
scope: z.enum([
|
|
15870
|
+
"all",
|
|
15871
|
+
"changes",
|
|
15872
|
+
"specs",
|
|
15873
|
+
"archived"
|
|
15874
|
+
])
|
|
15875
|
+
})
|
|
15867
15876
|
])).mutation(async ({ ctx, input }) => {
|
|
15868
|
-
return runPlanningRoot(ctx, ({ rootContext }) => {
|
|
15869
|
-
|
|
15870
|
-
|
|
15871
|
-
|
|
15877
|
+
return runPlanningRoot(ctx, async ({ rootContext }) => {
|
|
15878
|
+
const cli = rootContext.cli;
|
|
15879
|
+
const capabilities = deriveOpenSpecCliCapabilities(cli.available ? parseOpenSpecCliVersion(cli.version) : null);
|
|
15880
|
+
if (input.kind === "archived" && !capabilities.archivedValidation) throw new TRPCError({
|
|
15881
|
+
code: "PRECONDITION_FAILED",
|
|
15882
|
+
message: "Archived task validation requires an admitted OpenSpec CLI line (the admitted line declares the archived-validation capability)."
|
|
15883
|
+
});
|
|
15884
|
+
if (input.kind === "findings") {
|
|
15885
|
+
const gated = await ctx.cliExecutor.contracts.validateFindings({
|
|
15886
|
+
target: input.scope === "archived" ? { kind: "archived" } : {
|
|
15887
|
+
kind: "scope",
|
|
15888
|
+
scope: input.scope
|
|
15889
|
+
},
|
|
15890
|
+
capabilities: { findingsReport: capabilities.findingsReport },
|
|
15891
|
+
...getRootContextCliSelector(rootContext)
|
|
15892
|
+
});
|
|
15893
|
+
if (gated.kind !== "executed") throw new TRPCError({
|
|
15872
15894
|
code: "PRECONDITION_FAILED",
|
|
15873
|
-
message:
|
|
15895
|
+
message: `Validation findings require the admitted OpenSpec CLI line (accepted ${OPENSPEC_CLI_ACCEPTED_RANGE} declares the findings-report capability).`
|
|
15874
15896
|
});
|
|
15897
|
+
return gated.result;
|
|
15875
15898
|
}
|
|
15876
15899
|
return ctx.cliExecutor.contracts.validate({
|
|
15877
15900
|
target: input.kind === "item" ? {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openspecui/server",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"@hono/node-server": "^1.14.1",
|
|
34
34
|
"@huggingface/hub": "^2.12.0",
|
|
35
35
|
"@lydell/node-pty": "^1.1.0",
|
|
36
|
-
"@openspecui/core": "
|
|
37
|
-
"@openspecui/search": "
|
|
36
|
+
"@openspecui/core": "12.0.0",
|
|
37
|
+
"@openspecui/search": "12.0.0",
|
|
38
38
|
"@opentelemetry/api": "^1.9.1",
|
|
39
39
|
"@opentelemetry/exporter-trace-otlp-http": "^0.221.0",
|
|
40
40
|
"@opentelemetry/sdk-node": "^0.221.0",
|