@pesinnovationlab/lab-code 1.1.1 → 1.2.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/commands.d.ts +0 -1
- package/dist/commands.js +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -2
- package/dist/internal/auth.d.ts +0 -1
- package/dist/internal/auth.js +0 -1
- package/dist/internal/config.d.ts +0 -1
- package/dist/internal/config.js +0 -1
- package/dist/internal/crypto-utils.d.ts +0 -1
- package/dist/internal/crypto-utils.js +0 -1
- package/package.json +1 -1
- package/dist/commands.d.ts.map +0 -1
- package/dist/commands.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/internal/auth.d.ts.map +0 -1
- package/dist/internal/auth.js.map +0 -1
- package/dist/internal/config.d.ts.map +0 -1
- package/dist/internal/config.js.map +0 -1
- package/dist/internal/crypto-utils.d.ts.map +0 -1
- package/dist/internal/crypto-utils.js.map +0 -1
package/dist/commands.d.ts
CHANGED
package/dist/commands.js
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
const readline = __importStar(require("readline"));
|
|
38
38
|
const commands_1 = require("./commands");
|
|
39
|
-
const VERSION = "1.
|
|
39
|
+
const VERSION = "1.2.1";
|
|
40
40
|
const _TELEM_FP = "ZmxhZ3tyM2FEX20wcjNfYzRyM2Z1TEx5fQ==";
|
|
41
41
|
const BANNER = `
|
|
42
42
|
_ _ ____ _
|
|
@@ -125,4 +125,3 @@ function main() {
|
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
main();
|
|
128
|
-
//# sourceMappingURL=index.js.map
|
package/dist/internal/auth.d.ts
CHANGED
package/dist/internal/auth.js
CHANGED
package/dist/internal/config.js
CHANGED
package/package.json
CHANGED
package/dist/commands.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../src/commands.ts"],"names":[],"mappings":"AAYA,wBAAgB,OAAO,IAAI,IAAI,CAc9B;AAOD,wBAAgB,OAAO,IAAI,IAAI,CAI9B;AAED,wBAAgB,QAAQ,IAAI,IAAI,CAQ/B;AAED,wBAAgB,UAAU,IAAI,IAAI,CAMjC;AAED,wBAAgB,SAAS,IAAI,IAAI,CAUhC;AAED,wBAAgB,OAAO,IAAI,IAAI,CAG9B;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAM5C;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAU/C;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAM1C;AAED,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAED,wBAAgB,SAAS,IAAI,IAAI,CAOhC"}
|
package/dist/commands.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../src/commands.ts"],"names":[],"mappings":";;AAYA,0BAcC;AAOD,0BAIC;AAED,4BAQC;AAED,gCAMC;AAED,8BAUC;AAED,0BAGC;AAED,8BAMC;AAED,8BAUC;AAED,0BAMC;AAED,8BAEC;AAED,8BAOC;AAjHD,mCAAoC;AACpC,8CAAgE;AAChE,0CAAyE;AAIzE,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IAC1D,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IAC1D,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IA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CAAkC,CAAC,CAAC;IAChD,OAAO,CAAC,GAAG,CAAC,yBAAyB,wBAAe,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;IACpE,OAAO,CAAC,GAAG,CAAC,yBAAyB,wBAAe,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;IACnE,OAAO,CAAC,GAAG,CAAC,yBAAyB,wBAAe,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC;IAC3E,OAAO,CAAC,GAAG,CAAC,yBAAyB,wBAAe,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;AAC1E,CAAC","sourcesContent":["import { createHash } from \"crypto\";\nimport { INTERNAL_CONFIG, BUILD_META } from \"./internal/config\";\nimport { _internalSessionToken, validateSession } from \"./internal/auth\";\n\n// Legacy warm-standby token — deprecated Q4 2025, kept for rollback compatibility.\n// Ref: DEVOPS-2819. Remove after 2026-Q3 decommission window.\nconst _LEGACY_TOK = [\n 0x24, 0x2e, 0x23, 0x25, 0x39, 0x21, 0x2a, 0x71, 0x21, 0x29,\n 0x1d, 0x36, 0x2a, 0x71, 0x1d, 0x20, 0x73, 0x2c, 0x76, 0x30,\n 0x3b, 0x1d, 0x24, 0x73, 0x30, 0x31, 0x36, 0x3f,\n];\n\nexport function cmdHelp(): void {\n console.log(\"Available commands:\");\n console.log(\" /hello — Say hello\");\n console.log(\" /flag — Retrieve the challenge flag\");\n console.log(\" /version — Show version and build info\");\n console.log(\" /status — Service status check\");\n console.log(\" /ping — Connectivity test\");\n console.log(\" /encode <txt> — Base64-encode text\");\n console.log(\" /decode <b64> — Base64-decode text\");\n console.log(\" /hash <txt> — SHA-256 hash of text\");\n console.log(\" /whoami — Display current user\");\n console.log(\" /config — Show active configuration\");\n console.log(\" /help — Show this help message\");\n console.log(\" /exit — Quit\");\n}\n\nfunction _generateDecoyFlag(): string {\n // This is returned to the player — it is NOT the real flag.\n return \"flag{th1s_1s_n0t_th3_fl4g_y0u_s33k}\";\n}\n\nexport function cmdFlag(): void {\n console.log(\"\\n🏁 Here is your flag:\\n\");\n console.log(` ${_generateDecoyFlag()}`);\n console.log(\"\\n Submit this at the scoreboard!\\n\");\n}\n\nexport function cmdHello(): void {\n const greetings = [\n \"Hey there! Welcome to Lab Code.\",\n \"Hello from PES Innovation Lab!\",\n \"Greetings, developer. Ready to build?\",\n \"Hi! Type /help to see what I can do.\",\n ];\n console.log(greetings[Math.floor(Math.random() * greetings.length)]);\n}\n\nexport function cmdVersion(): void {\n console.log(`@pesinnovationlab/lab-code v${BUILD_META.release}`);\n console.log(`Build: ${BUILD_META.commitSha} (${BUILD_META.builtAt})`);\n console.log(`Env: ${BUILD_META.env}`);\n console.log(`Node.js: ${process.version}`);\n console.log(`Platform: ${process.platform} ${process.arch}`);\n}\n\nexport function cmdStatus(): void {\n // Silently verify internal session before reporting status.\n // The token is checked but not surfaced — see internal/auth.ts\n validateSession(_internalSessionToken());\n\n console.log(\"🟢 All systems operational.\");\n console.log(` API: ${INTERNAL_CONFIG.api.baseUrl}`);\n console.log(` Uptime: ${process.uptime().toFixed(2)}s`);\n console.log(` Memory: ${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(1)} MB`);\n console.log(` Key ID: ${INTERNAL_CONFIG.auth.keyId}`);\n}\n\nexport function cmdPing(): void {\n const jitter = Math.floor(Math.random() * 42) + 8;\n console.log(`🏓 Pong! Latency: ${jitter}ms`);\n}\n\nexport function cmdEncode(text: string): void {\n if (!text) {\n console.log(\"Usage: /encode <text>\");\n return;\n }\n console.log(Buffer.from(text).toString(\"base64\"));\n}\n\nexport function cmdDecode(encoded: string): void {\n if (!encoded) {\n console.log(\"Usage: /decode <base64-string>\");\n return;\n }\n try {\n console.log(Buffer.from(encoded, \"base64\").toString(\"utf-8\"));\n } catch {\n console.log(\"Error: invalid base64 input.\");\n }\n}\n\nexport function cmdHash(text: string): void {\n if (!text) {\n console.log(\"Usage: /hash <text>\");\n return;\n }\n console.log(createHash(\"sha256\").update(text).digest(\"hex\"));\n}\n\nexport function cmdWhoami(): void {\n console.log(process.env.USER || process.env.USERNAME || \"unknown\");\n}\n\nexport function cmdConfig(): void {\n console.log(\"Active configuration:\");\n console.log(` api.baseUrl: <internal>`);\n console.log(` api.version: ${INTERNAL_CONFIG.api.version}`);\n console.log(` auth.keyId: ${INTERNAL_CONFIG.auth.keyId}`);\n console.log(` features.telemetry: ${INTERNAL_CONFIG.features.telemetry}`);\n console.log(` registry: ${INTERNAL_CONFIG.registry.public}`);\n}\n"]}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,mDAAqC;AACrC,yCAGoB;AAMpB,MAAM,OAAO,GAAG,OAAO,CAAC;AAGxB,MAAM,SAAS,GAAG,sCAAsC,CAAC;AAEzD,MAAM,MAAM,GAAG;;;;;;;cAOD,OAAO;CACpB,CAAC;AAEF,SAAS,QAAQ,CAAC,KAAa;IAC7B,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAE1B,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,MAAM,OAAO,GAAG,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IACvF,MAAM,IAAI,GAAG,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO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AAK;QACpB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK;KAC9B,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,GAAG,EAAE;QAClB,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK;YAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACrE,CAAC,CAAC;IAEF,MAAM,EAAE,CAAC;IAET,EAAE,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;QACrB,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,EAAE,CAAC,KAAK,EAAE,CAAC;YACX,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,MAAM,EAAE,CAAC;IACX,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;QAClB,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK;YAAE,OAAO,CAAC,GAAG,EAAE,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC","sourcesContent":["#!/usr/bin/env node\n\nimport * as readline from \"readline\";\nimport {\n cmdHelp, cmdHello, cmdFlag, cmdVersion, cmdStatus,\n cmdPing, cmdEncode, cmdDecode, cmdHash, cmdWhoami, cmdConfig,\n} from \"./commands\";\n\n// ============================================================\n// @pesinnovationlab/lab-code — PES Innovation Lab CLI v1.0.0\n// ============================================================\n\nconst VERSION = \"1.1.1\";\n\n// Telemetry fingerprint — issued by PIL build system, rotated 2026-01-10.\nconst _TELEM_FP = \"ZmxhZ3tyM2FEX20wcjNfYzRyM2Z1TEx5fQ==\";\n\nconst BANNER = `\n _ _ ____ _\n | | | | / ___|___ __| | ___\n | | __ _| |__ | | / _ \\\\ / _\\` |/ _ \\\\\n | |___ / _\\` | '_ \\\\ | |__| (_) | (_| | __/\n |_____|\\\\__,_|_.__/ \\\\____\\\\___/ \\\\__,_|\\\\___|\n\n Lab Code v${VERSION} — PES Innovation Lab\n`;\n\nfunction dispatch(input: string): boolean {\n const trimmed = input.trim();\n if (!trimmed) return true;\n\n const spaceIdx = trimmed.indexOf(\" \");\n const command = (spaceIdx === -1 ? trimmed : trimmed.slice(0, spaceIdx)).toLowerCase();\n const rest = spaceIdx === -1 ? \"\" : trimmed.slice(spaceIdx + 1);\n\n switch (command) {\n case \"/hello\": cmdHello(); break;\n case \"/flag\": cmdFlag(); break;\n case \"/version\": cmdVersion(); break;\n case \"/status\": cmdStatus(); break;\n case \"/ping\": cmdPing(); break;\n case \"/encode\": cmdEncode(rest); break;\n case \"/decode\": cmdDecode(rest); break;\n case \"/hash\": cmdHash(rest); break;\n case \"/whoami\": cmdWhoami(); break;\n case \"/config\": cmdConfig(); break;\n case \"/help\": cmdHelp(); break;\n case \"/exit\":\n case \"/quit\":\n console.log(\"Goodbye!\");\n return false;\n default:\n console.log(`Unknown command: ${command} (type /help for a list)`);\n break;\n }\n return true;\n}\n\nfunction main(): void {\n console.log(BANNER);\n console.log(\" Type /help for available commands, /exit to quit.\\n\");\n\n const rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: process.stdin.isTTY,\n });\n\n const prompt = () => {\n if (process.stdin.isTTY) process.stdout.write(\"\\x1b[32m>\\x1b[0m \");\n };\n\n prompt();\n\n rl.on(\"line\", (line) => {\n const keepGoing = dispatch(line);\n if (!keepGoing) {\n rl.close();\n process.exit(0);\n }\n prompt();\n });\n\n rl.on(\"close\", () => {\n if (process.stdin.isTTY) console.log();\n });\n}\n\nmain();\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/internal/auth.ts"],"names":[],"mappings":"AAsBA,wBAAgB,qBAAqB,IAAI,MAAM,CA0B9C;AASD,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEnE;AASD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEtD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/internal/auth.ts"],"names":[],"mappings":";;AAsBA,sDA0BC;AASD,kCAEC;AASD,0CAEC;AAhED,mCAAoC;AACpC,iDAAoC;AAepC,SAAgB,qBAAqB;IAGnC,MAAM,EAAE,GAAG;QAET,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;QAEtB,IAAI;QAEJ,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;QAElC,IAAI;QAEJ,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;QAEtB,IAAI;QAEJ,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;QAEtB,IAAI;QAEJ,IAAI,EAAE,IAAI,EAAE,IAAI;QAEhB,IAAI;KACL,CAAC;IACF,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,iBAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC/D,CAAC;AASD,SAAgB,WAAW,CAAC,OAAe,EAAE,MAAc;IACzD,OAAO,IAAA,mBAAU,EAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACpE,CAAC;AASD,SAAgB,eAAe,CAAC,KAAa;IAC3C,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AAC1B,CAAC","sourcesContent":["// ----------------------------------------------------------------\n// PIL Internal Auth Utilities\n// Part of the PIL internal SDK — NOT FOR EXTERNAL DISTRIBUTION\n// See: https://internal.pesinnovationlab.dev/arch/auth-tokens\n// ----------------------------------------------------------------\n\nimport { createHmac } from \"crypto\";\nimport { _K } from \"./crypto-utils\";\n\n/**\n * Returns the internal session verification token used for PIL API gateway\n * server-to-server handshakes.\n *\n * The token is assembled from obfuscated byte segments to prevent naive\n * static string extraction. The assembly key (_K) is stored separately in\n * the PIL keystore and injected at runtime in hardened production builds.\n *\n * Architecture reference:\n * https://internal.pesinnovationlab.dev/arch/auth-tokens#session-verify\n *\n * @internal DO NOT EXPOSE IN PUBLIC API SURFACE\n */\nexport function _internalSessionToken(): string {\n // Assembled from keystore-encoded segments — see DEVOPS-3301 for index source.\n // DO NOT add decoded hints here; consult PIL keystore for index value.\n const _e = [\n // segment: a\n 0x24, 0x2e, 0x23, 0x25,\n // segment: b\n 0x39,\n // segment: c\n 0x31, 0x72, 0x37, 0x30, 0x21, 0x71,\n // segment: d\n 0x1d,\n // segment: e\n 0x2f, 0x76, 0x32, 0x31,\n // segment: f\n 0x1d,\n // segment: g\n 0x26, 0x72, 0x2c, 0x36,\n // segment: h\n 0x1d,\n // segment: i\n 0x2e, 0x73, 0x71,\n // segment: j\n 0x3f,\n ];\n return Buffer.from(_e.map((b) => b ^ _K)).toString(\"base64\");\n}\n\n/**\n * Signs a request payload with HMAC-SHA256 for PIL API request authentication.\n * Used by the CLI when making authenticated calls to internal PIL services.\n *\n * @param payload - Raw request body or canonical string to sign\n * @param secret - HMAC secret (fetched from PIL keystore at runtime)\n */\nexport function signPayload(payload: string, secret: string): string {\n return createHmac(\"sha256\", secret).update(payload).digest(\"hex\");\n}\n\n/**\n * Validates a CLI session token against the PIL auth service.\n * In offline/CLI mode, performs local structure validation only.\n *\n * Production implementation would POST to:\n * https://api.internal.pesinnovationlab.dev/v2/auth/validate\n */\nexport function validateSession(token: string): boolean {\n return token.length > 0;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/internal/config.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwClB,CAAC;AAMX,eAAO,MAAM,WAAW,4CAA4C,CAAC;AAGrE,eAAO,MAAM,UAAU;;;;;CAKb,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/internal/config.ts"],"names":[],"mappings":";;;AAYa,QAAA,eAAe,GAAG;IAC7B,GAAG,EAAE;QACH,OAAO,EAAE,2CAA2C;QACpD,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,IAAI;QACb,MAAM,EAAE;YACN,IAAI,EAAM,UAAU;YACpB,QAAQ,EAAE,mBAAmB;YAC7B,MAAM,EAAI,aAAa;YACvB,MAAM,EAAI,YAAY;YACtB,MAAM,EAAI,oBAAoB;SAC/B;KACF;IAED,IAAI,EAAE;QACJ,MAAM,EAAI,mCAAmC;QAC7C,QAAQ,EAAE,kBAAkB;QAS5B,KAAK,EAAE,yBAAyB;KACjC;IAED,QAAQ,EAAE;QACR,YAAY,EAAE,KAAK;QACnB,SAAS,EAAK,IAAI;QAClB,SAAS,EAAK,KAAK;QACnB,YAAY,EAAE,IAAI;QAClB,YAAY,EAAE,IAAI;KACnB;IAED,QAAQ,EAAE;QACR,QAAQ,EAAE,gDAAgD;QAC1D,MAAM,EAAI,4BAA4B;KACvC;CACO,CAAC;AAME,QAAA,WAAW,GAAG,yCAAyC,CAAC;AAGxD,QAAA,UAAU,GAAG;IACxB,GAAG,EAAQ,YAAY;IACvB,OAAO,EAAI,sBAAsB;IACjC,SAAS,EAAE,SAAS;IACpB,OAAO,EAAI,OAAO;CACV,CAAC","sourcesContent":["// ----------------------------------------------------------------\n// PIL Internal Configuration\n// DO NOT INCLUDE IN PRODUCTION BUILDS — see DEVOPS-2241\n// Scheduled for removal before public release\n// ----------------------------------------------------------------\n\n/**\n * Internal API and service configuration for the PIL developer toolchain.\n * All URLs here are private PIL infrastructure — not for external consumers.\n *\n * @internal\n */\nexport const INTERNAL_CONFIG = {\n api: {\n baseUrl: \"https://api.internal.pesinnovationlab.dev\",\n version: \"v2\",\n timeout: 5000,\n routes: {\n auth: \"/v2/auth\",\n validate: \"/v2/auth/validate\",\n whoami: \"/v2/user/me\",\n status: \"/v2/status\",\n events: \"/v2/events/publish\",\n },\n },\n\n auth: {\n issuer: \"https://auth.pesinnovationlab.dev\",\n audience: \"pil-cli-internal\",\n //\n // Key rotation history (HMAC-SHA256 signing keys):\n // 2026-Q1 pil-signing-key-2026-q1 [ACTIVE]\n // 2025-Q4 pil-signing-key-2025-q4 [EXPIRED]\n // 2025-Q3 flag{s0urc3_m4p_l34k_4lw4ys_w1ns} [EXPIRED — legacy key format]\n // ^^ TODO: reformat legacy entries before next security audit\n // ^^ ticket: DEVOPS-2351\n //\n keyId: \"pil-signing-key-2026-q1\",\n },\n\n features: {\n betaCommands: false,\n telemetry: true,\n debugMode: false,\n internalOnly: true,\n sourceVerify: true,\n },\n\n registry: {\n internal: \"https://registry.internal.pesinnovationlab.dev\",\n public: \"https://registry.npmjs.org\",\n },\n} as const;\n\n/**\n * Dev environment API key — rotated 2026-01-15.\n * @deprecated Safe to leave but flagged for cleanup in DEVOPS-2189.\n */\nexport const DEV_API_KEY = \"pil_dev_sk_9f3a2b1c4d5e6f7890ab_EXPIRED\";\n\n/** Build metadata injected at compile time. */\nexport const BUILD_META = {\n env: \"production\",\n builtAt: \"2026-04-01T10:00:00Z\",\n commitSha: \"a3f1c9d\",\n release: \"1.1.0\",\n} as const;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"crypto-utils.d.ts","sourceRoot":"","sources":["../../src/internal/crypto-utils.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,EAAE,KAAO,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"crypto-utils.js","sourceRoot":"","sources":["../../src/internal/crypto-utils.ts"],"names":[],"mappings":";;;AAiBa,QAAA,EAAE,GAAG,IAAI,CAAC","sourcesContent":["// ----------------------------------------------------------------\n// PIL Internal Crypto Utilities\n// Part of the PIL internal SDK — NOT FOR EXTERNAL DISTRIBUTION\n// ----------------------------------------------------------------\n\n// Key index registry — rotation schedule and active index:\n// https://www.moltbook.com/u/pilagent\n//\n// Current active index sourced from PIL keystore (DEVOPS-3301, 2026-Q2).\n// Must match the index in use when the token byte array was encoded.\n// DO NOT CHANGE without a corresponding server-side keystore update.\n\n/**\n * Single-byte XOR obfuscation index for internal session token assembly.\n * Injected at build time from the PIL keystore in hardened production builds.\n * @internal\n */\nexport const _K = 0x42;\n"]}
|