@amerged/ohmyhost-mcp 0.1.31 → 0.1.32
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 +1 -1
- package/dist/{chunk-QHKLOHN4.js → chunk-B2W7NWLK.js} +7 -7
- package/dist/index.js +1 -1
- package/dist/stdio-main.js +430 -121
- package/package.json +1 -1
- package/src/apps/mcp/package.json +1 -1
- package/src/apps/product-cli/package.json +1 -1
- package/src/apps/product-cli/src/composition.ts +2 -1
- package/src/apps/product-cli/src/repository-init.ts +443 -713
- package/src/apps/product-cli/src/runtime-contract.ts +18 -5
- package/src/packages/agent-skills/src/generated-skill-resources.ts +6 -6
- package/src/packages/contracts/package.json +10 -0
- package/src/packages/contracts/src/framework-admission-corpus.ts +390 -0
- package/src/packages/contracts/src/framework-admission.ts +641 -197
- package/src/packages/contracts/src/framework-build-script.mjs +155 -13
- package/src/packages/contracts/src/framework-build-script.ts +15 -1
- package/src/packages/contracts/src/framework-source-rules.ts +1101 -0
- package/src/packages/contracts/src/operation-failure.ts +22 -4
- package/src/packages/contracts/src/problem-policy.ts +2 -2
- package/src/packages/sdk-ts/package.json +1 -1
- package/src/packages/sdk-ts/src/generated/sdk.gen.ts +1 -1
- package/src/packages/sdk-ts/src/generated/types.gen.ts +8 -0
|
@@ -7,7 +7,10 @@ import {
|
|
|
7
7
|
parseProjectDataChangePlan as readProjectDataChangePlan,
|
|
8
8
|
type ProjectDataChangePlan,
|
|
9
9
|
} from "@ohmyhost/contracts/project-data-changes";
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
frameworkConversionDiagnosticFromDetail,
|
|
12
|
+
parseFrameworkConversionDetail,
|
|
13
|
+
} from "@ohmyhost/contracts/framework-admission";
|
|
11
14
|
import {
|
|
12
15
|
parseOperationDeploymentProgress,
|
|
13
16
|
type OperationDeploymentProgress,
|
|
@@ -1459,17 +1462,27 @@ export const parseOperation = (value: unknown): PublicOperation => {
|
|
|
1459
1462
|
};
|
|
1460
1463
|
};
|
|
1461
1464
|
|
|
1465
|
+
/**
|
|
1466
|
+
* The client's own catalog copy of an operation failure. Only a rejected GitHub push carries a
|
|
1467
|
+
* detail, and only an exact catalog sentence naming the refused file; it is rendered again here.
|
|
1468
|
+
*/
|
|
1462
1469
|
function parseOperationFailure(value: unknown): PublicOperationFailure {
|
|
1463
|
-
const input = exactRecord(value, ["code", "message", "retryable", "suggested_action"]);
|
|
1470
|
+
const input = exactRecord(value, ["code", "message", "retryable", "suggested_action", "detail"]);
|
|
1471
|
+
const detail = input["detail"];
|
|
1472
|
+
const diagnostic =
|
|
1473
|
+
detail === undefined || input["code"] !== "auto_deploy_plan_rejected"
|
|
1474
|
+
? null
|
|
1475
|
+
: frameworkConversionDiagnosticFromDetail(detail);
|
|
1464
1476
|
if (
|
|
1465
1477
|
typeof input["code"] !== "string" ||
|
|
1466
1478
|
!boundedString(input["message"], 1, 512) ||
|
|
1467
1479
|
input["retryable"] !== false ||
|
|
1468
|
-
!boundedString(input["suggested_action"], 1, 500)
|
|
1480
|
+
!boundedString(input["suggested_action"], 1, 500) ||
|
|
1481
|
+
(detail !== undefined && diagnostic === null)
|
|
1469
1482
|
)
|
|
1470
1483
|
throw new ResponseContractError();
|
|
1471
|
-
const safe = publicOperationFailure(input["code"]);
|
|
1472
|
-
if (safe.code !== input["code"]) throw new ResponseContractError();
|
|
1484
|
+
const safe = publicOperationFailure(input["code"], diagnostic);
|
|
1485
|
+
if (safe.code !== input["code"] || safe.detail !== detail) throw new ResponseContractError();
|
|
1473
1486
|
return safe;
|
|
1474
1487
|
}
|
|
1475
1488
|
|