@forgent3d/cad-runtime 0.1.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/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # @forgent3d/cad-runtime
2
+
3
+ Shared CAD runtime protocol, Python helpers, types, and pure utilities for Forgent3D cloud services.
4
+
5
+ This package is intentionally runtime-light:
6
+
7
+ - no Next.js imports
8
+ - no Cloudflare Worker bindings
9
+ - no React
10
+ - no database clients
11
+
12
+ `cad-agent` and `cf-sandbox` can both depend on this package without coupling their deploy targets together.
13
+
14
+ ## Python Runtime Assets
15
+
16
+ The canonical build123d helper scripts live under:
17
+
18
+ ```text
19
+ python/skill-helpers/
20
+ aicad_attach.py
21
+ aicad_select.py
22
+ ```
23
+
24
+ Consumers copy these files into their own packaging or container build directories as generated assets.
package/dist/index.cjs ADDED
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ SANDBOX_API_PATHS: () => SANDBOX_API_PATHS,
24
+ SANDBOX_AUTH_SCHEME: () => SANDBOX_AUTH_SCHEME,
25
+ normalizeSandboxSecret: () => normalizeSandboxSecret,
26
+ sandboxAuthorizationHeader: () => sandboxAuthorizationHeader
27
+ });
28
+ module.exports = __toCommonJS(index_exports);
29
+
30
+ // src/sandbox-protocol.ts
31
+ var SANDBOX_AUTH_SCHEME = "Bearer";
32
+ var SANDBOX_API_PATHS = {
33
+ resolve: "/v1/sandboxes/resolve",
34
+ runTool: "/v1/tools/run",
35
+ export: "/v1/export"
36
+ };
37
+ function normalizeSandboxSecret(secret) {
38
+ const normalized = secret?.trim();
39
+ return normalized || void 0;
40
+ }
41
+ function sandboxAuthorizationHeader(secret) {
42
+ const normalized = normalizeSandboxSecret(secret);
43
+ return normalized ? `${SANDBOX_AUTH_SCHEME} ${normalized}` : void 0;
44
+ }
45
+ // Annotate the CommonJS export names for ESM import in node:
46
+ 0 && (module.exports = {
47
+ SANDBOX_API_PATHS,
48
+ SANDBOX_AUTH_SCHEME,
49
+ normalizeSandboxSecret,
50
+ sandboxAuthorizationHeader
51
+ });
52
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/sandbox-protocol.ts"],"sourcesContent":["export {\n SANDBOX_API_PATHS,\n SANDBOX_AUTH_SCHEME,\n normalizeSandboxSecret,\n sandboxAuthorizationHeader,\n type SandboxApiPath,\n} from \"./sandbox-protocol.js\";\n","export const SANDBOX_AUTH_SCHEME = \"Bearer\";\n\nexport const SANDBOX_API_PATHS = {\n resolve: \"/v1/sandboxes/resolve\",\n runTool: \"/v1/tools/run\",\n export: \"/v1/export\",\n} as const;\n\nexport type SandboxApiPath = (typeof SANDBOX_API_PATHS)[keyof typeof SANDBOX_API_PATHS];\n\nexport function normalizeSandboxSecret(secret: string | undefined): string | undefined {\n const normalized = secret?.trim();\n return normalized || undefined;\n}\n\nexport function sandboxAuthorizationHeader(secret: string | undefined): string | undefined {\n const normalized = normalizeSandboxSecret(secret);\n return normalized ? `${SANDBOX_AUTH_SCHEME} ${normalized}` : undefined;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,sBAAsB;AAE5B,IAAM,oBAAoB;AAAA,EAC/B,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AACV;AAIO,SAAS,uBAAuB,QAAgD;AACrF,QAAM,aAAa,QAAQ,KAAK;AAChC,SAAO,cAAc;AACvB;AAEO,SAAS,2BAA2B,QAAgD;AACzF,QAAM,aAAa,uBAAuB,MAAM;AAChD,SAAO,aAAa,GAAG,mBAAmB,IAAI,UAAU,KAAK;AAC/D;","names":[]}
@@ -0,0 +1,11 @@
1
+ declare const SANDBOX_AUTH_SCHEME = "Bearer";
2
+ declare const SANDBOX_API_PATHS: {
3
+ readonly resolve: "/v1/sandboxes/resolve";
4
+ readonly runTool: "/v1/tools/run";
5
+ readonly export: "/v1/export";
6
+ };
7
+ type SandboxApiPath = (typeof SANDBOX_API_PATHS)[keyof typeof SANDBOX_API_PATHS];
8
+ declare function normalizeSandboxSecret(secret: string | undefined): string | undefined;
9
+ declare function sandboxAuthorizationHeader(secret: string | undefined): string | undefined;
10
+
11
+ export { SANDBOX_API_PATHS, SANDBOX_AUTH_SCHEME, type SandboxApiPath, normalizeSandboxSecret, sandboxAuthorizationHeader };
@@ -0,0 +1,11 @@
1
+ declare const SANDBOX_AUTH_SCHEME = "Bearer";
2
+ declare const SANDBOX_API_PATHS: {
3
+ readonly resolve: "/v1/sandboxes/resolve";
4
+ readonly runTool: "/v1/tools/run";
5
+ readonly export: "/v1/export";
6
+ };
7
+ type SandboxApiPath = (typeof SANDBOX_API_PATHS)[keyof typeof SANDBOX_API_PATHS];
8
+ declare function normalizeSandboxSecret(secret: string | undefined): string | undefined;
9
+ declare function sandboxAuthorizationHeader(secret: string | undefined): string | undefined;
10
+
11
+ export { SANDBOX_API_PATHS, SANDBOX_AUTH_SCHEME, type SandboxApiPath, normalizeSandboxSecret, sandboxAuthorizationHeader };
package/dist/index.js ADDED
@@ -0,0 +1,22 @@
1
+ // src/sandbox-protocol.ts
2
+ var SANDBOX_AUTH_SCHEME = "Bearer";
3
+ var SANDBOX_API_PATHS = {
4
+ resolve: "/v1/sandboxes/resolve",
5
+ runTool: "/v1/tools/run",
6
+ export: "/v1/export"
7
+ };
8
+ function normalizeSandboxSecret(secret) {
9
+ const normalized = secret?.trim();
10
+ return normalized || void 0;
11
+ }
12
+ function sandboxAuthorizationHeader(secret) {
13
+ const normalized = normalizeSandboxSecret(secret);
14
+ return normalized ? `${SANDBOX_AUTH_SCHEME} ${normalized}` : void 0;
15
+ }
16
+ export {
17
+ SANDBOX_API_PATHS,
18
+ SANDBOX_AUTH_SCHEME,
19
+ normalizeSandboxSecret,
20
+ sandboxAuthorizationHeader
21
+ };
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/sandbox-protocol.ts"],"sourcesContent":["export const SANDBOX_AUTH_SCHEME = \"Bearer\";\n\nexport const SANDBOX_API_PATHS = {\n resolve: \"/v1/sandboxes/resolve\",\n runTool: \"/v1/tools/run\",\n export: \"/v1/export\",\n} as const;\n\nexport type SandboxApiPath = (typeof SANDBOX_API_PATHS)[keyof typeof SANDBOX_API_PATHS];\n\nexport function normalizeSandboxSecret(secret: string | undefined): string | undefined {\n const normalized = secret?.trim();\n return normalized || undefined;\n}\n\nexport function sandboxAuthorizationHeader(secret: string | undefined): string | undefined {\n const normalized = normalizeSandboxSecret(secret);\n return normalized ? `${SANDBOX_AUTH_SCHEME} ${normalized}` : undefined;\n}\n"],"mappings":";AAAO,IAAM,sBAAsB;AAE5B,IAAM,oBAAoB;AAAA,EAC/B,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AACV;AAIO,SAAS,uBAAuB,QAAgD;AACrF,QAAM,aAAa,QAAQ,KAAK;AAChC,SAAO,cAAc;AACvB;AAEO,SAAS,2BAA2B,QAAgD;AACzF,QAAM,aAAa,uBAAuB,MAAM;AAChD,SAAO,aAAa,GAAG,mBAAmB,IAAI,UAAU,KAAK;AAC/D;","names":[]}
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@forgent3d/cad-runtime",
3
+ "version": "0.1.0",
4
+ "description": "Shared CAD runtime protocol, types, and pure utilities for Forgent3D cloud services.",
5
+ "license": "MIT",
6
+ "author": "Forgent3D",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/forgent3d/cad-runtime.git"
10
+ },
11
+ "homepage": "https://github.com/forgent3d/cad-runtime#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/forgent3d/cad-runtime/issues"
14
+ },
15
+ "type": "module",
16
+ "main": "./dist/index.cjs",
17
+ "module": "./dist/index.js",
18
+ "types": "./dist/index.d.ts",
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/index.d.ts",
22
+ "import": "./dist/index.js",
23
+ "require": "./dist/index.cjs"
24
+ },
25
+ "./package.json": "./package.json"
26
+ },
27
+ "files": [
28
+ "dist",
29
+ "python",
30
+ "README.md"
31
+ ],
32
+ "publishConfig": {
33
+ "access": "public"
34
+ },
35
+ "scripts": {
36
+ "build": "tsup",
37
+ "typecheck": "tsc --noEmit",
38
+ "prepublishOnly": "pnpm run build"
39
+ },
40
+ "devDependencies": {
41
+ "tsup": "^8.4.0",
42
+ "typescript": "^5.8.2"
43
+ }
44
+ }