@t3x-dev/local 0.1.5 → 0.3.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/README.md CHANGED
@@ -2,7 +2,18 @@
2
2
 
3
3
  Minimal local entry package for T3X.
4
4
 
5
- Current PR2 scope:
5
+ ## Release status
6
+
7
+ `@t3x-dev/local@0.3.0` is part of the intended T3X public alpha release surface.
8
+ The npm publish is still in progress.
9
+
10
+ After publish completes, the intended public entrypoint is:
11
+
12
+ ```bash
13
+ npx -p @t3x-dev/local t3x-local start
14
+ ```
15
+
16
+ ## Scope
6
17
 
7
18
  - `t3x-local start` launches the locally built API + Web
8
19
  - `t3x` forwards to `@t3x-dev/cli`
@@ -6,7 +6,7 @@ import {
6
6
  getVersionSnapshot,
7
7
  resolveStartOptions,
8
8
  runStartCommand
9
- } from "../chunk-KNAXB6AU.js";
9
+ } from "../chunk-ESYPP6N2.js";
10
10
  import {
11
11
  clearRuntimeState,
12
12
  getLocalPaths,
@@ -15,9 +15,10 @@ import {
15
15
  getRuntimeProcessStatus,
16
16
  readRuntimeState,
17
17
  terminatePid
18
- } from "../chunk-E4LL4ESG.js";
18
+ } from "../chunk-TJSQMFJE.js";
19
19
 
20
20
  // src/bin/t3x-local.ts
21
+ import { createRequire } from "module";
21
22
  import { Command } from "commander";
22
23
 
23
24
  // src/commands/doctor.ts
@@ -189,8 +190,10 @@ async function runResetCommand(input = {}) {
189
190
  }
190
191
 
191
192
  // src/bin/t3x-local.ts
193
+ var require2 = createRequire(import.meta.url);
194
+ var packageJson = require2("../../package.json");
192
195
  var program = new Command();
193
- program.name("t3x-local").description("T3X local runtime entrypoint").version("0.1.1");
196
+ program.name("t3x-local").description("T3X local runtime entrypoint").version(packageJson.version ?? "0.0.0");
194
197
  program.command("start").description("Start the local API and Web runtimes in the background").option("--data-dir <path>", "Embedded PostgreSQL data directory").option("--api-port <port>", "API port (default: 8000)", parseInteger).option("--web-port <port>", "Web port (default: 3000)", parseInteger).action(async (options) => {
195
198
  await runStartCommand(options);
196
199
  });
@@ -3,7 +3,7 @@ import {
3
3
  getLocalPaths,
4
4
  readRuntimeState,
5
5
  runNodeScript
6
- } from "../chunk-E4LL4ESG.js";
6
+ } from "../chunk-TJSQMFJE.js";
7
7
 
8
8
  // src/bin/t3x-mcp.ts
9
9
  var paths = getLocalPaths();
package/dist/bin/t3x.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  getLocalPaths,
4
4
  readRuntimeState,
5
5
  runNodeScript
6
- } from "../chunk-E4LL4ESG.js";
6
+ } from "../chunk-TJSQMFJE.js";
7
7
 
8
8
  // src/bin/t3x.ts
9
9
  var paths = getLocalPaths();
@@ -9,7 +9,7 @@ import {
9
9
  spawnNodeScript,
10
10
  terminateProcess,
11
11
  writeRuntimeState
12
- } from "./chunk-E4LL4ESG.js";
12
+ } from "./chunk-TJSQMFJE.js";
13
13
 
14
14
  // src/commands/start.ts
15
15
  import fs2 from "fs/promises";
@@ -186,12 +186,6 @@ var FIXED_PACKAGE_WORKSPACE_PATHS = {
186
186
  "@t3x-dev/mcp": path2.join("apps", "mcp", "package.json"),
187
187
  "@t3x-dev/local": path2.join("apps", "local", "package.json")
188
188
  };
189
- var LOCAL_DIRECT_FIXED_DEPENDENCIES = [
190
- "@t3x-dev/api",
191
- "@t3x-dev/cli",
192
- "@t3x-dev/mcp",
193
- "@t3x-dev/storage"
194
- ];
195
189
  function getVersionSnapshot(paths) {
196
190
  const report = getVersionLockReport(paths);
197
191
  const manifestVersions = readManifestDependencyVersions(paths);
@@ -213,20 +207,17 @@ function getVersionLockReport(paths) {
213
207
  const expectedVersion = localPackageJson.version ?? "unknown";
214
208
  const problems = [];
215
209
  const resolvedVersions = {};
216
- for (const dependencyName of LOCAL_DIRECT_FIXED_DEPENDENCIES) {
217
- const actual = localPackageJson.dependencies?.[dependencyName];
218
- if (actual !== expectedVersion && actual !== `workspace:${expectedVersion}`) {
219
- problems.push(
220
- `Local package dependency ${dependencyName} must pin ${expectedVersion}, found ${actual ?? "missing"}`
221
- );
222
- }
223
- }
224
210
  if (manifest) {
225
211
  if (manifest.packageVersion !== expectedVersion) {
226
212
  problems.push(
227
213
  `runtime-manifest.json packageVersion must be ${expectedVersion}, found ${manifest.packageVersion ?? "missing"}`
228
214
  );
229
215
  }
216
+ if (manifest.fixedVersion !== expectedVersion) {
217
+ problems.push(
218
+ `runtime-manifest.json fixedVersion must be ${expectedVersion}, found ${manifest.fixedVersion ?? "missing"}`
219
+ );
220
+ }
230
221
  for (const packageName of FIXED_VERSION_PACKAGES) {
231
222
  const manifestVersion = manifest.dependencies?.[packageName];
232
223
  if (manifestVersion !== expectedVersion) {
@@ -235,6 +226,24 @@ function getVersionLockReport(paths) {
235
226
  );
236
227
  }
237
228
  }
229
+ const platformEntries = Object.entries(manifest.platforms ?? {});
230
+ if (platformEntries.length === 0) {
231
+ problems.push("runtime-manifest.json must declare at least one runtime platform artifact");
232
+ }
233
+ for (const [platformKey, platform] of platformEntries) {
234
+ const expectedFileNamePrefix = `t3x-local-runtime-${expectedVersion}-`;
235
+ if (!platform.fileName?.startsWith(expectedFileNamePrefix)) {
236
+ problems.push(
237
+ `runtime-manifest.json platform ${platformKey} fileName must include ${expectedVersion}, found ${platform.fileName ?? "missing"}`
238
+ );
239
+ }
240
+ const expectedReleaseTag = `t3x-local-v${expectedVersion}`;
241
+ if (!platform.url?.includes(expectedReleaseTag)) {
242
+ problems.push(
243
+ `runtime-manifest.json platform ${platformKey} url must reference ${expectedReleaseTag}, found ${platform.url ?? "missing"}`
244
+ );
245
+ }
246
+ }
238
247
  }
239
248
  for (const packageName of FIXED_VERSION_PACKAGES) {
240
249
  const actualVersion = packageName === "@t3x-dev/local" ? expectedVersion : resolveFixedPackageVersion(packageName, paths, manifest);
@@ -35,13 +35,13 @@ function getLocalPaths() {
35
35
  ),
36
36
  webStaticDir: runtimeSource === "installed" ? path.join(installedRuntimeDir, "web", "static") : path.join(assertRepoRoot(repoRoot), "apps", "web", ".next", "static"),
37
37
  webPublicDir: runtimeSource === "installed" ? path.join(installedRuntimeDir, "web", "public") : path.join(assertRepoRoot(repoRoot), "apps", "web", "public"),
38
- cliEntryPath: resolvePackageBinEntry({
38
+ cliEntryPath: runtimeSource === "installed" ? path.join(installedRuntimeDir, "cli", "dist", "index.js") : resolvePackageBinEntry({
39
39
  packageName: "@t3x-dev/cli",
40
40
  binName: "t3x",
41
41
  repoRoot,
42
42
  workspaceRelativeDir: path.join("apps", "cli")
43
43
  }),
44
- mcpEntryPath: resolvePackageBinEntry({
44
+ mcpEntryPath: runtimeSource === "installed" ? path.join(installedRuntimeDir, "mcp", "dist", "index.js") : resolvePackageBinEntry({
45
45
  packageName: "@t3x-dev/mcp",
46
46
  binName: "t3x-mcp",
47
47
  repoRoot,
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  runStartCommand
3
- } from "./chunk-KNAXB6AU.js";
4
- import "./chunk-E4LL4ESG.js";
3
+ } from "./chunk-ESYPP6N2.js";
4
+ import "./chunk-TJSQMFJE.js";
5
5
  export {
6
6
  runStartCommand
7
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@t3x-dev/local",
3
- "version": "0.1.5",
3
+ "version": "0.3.1",
4
4
  "description": "T3X local entry package",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -37,12 +37,38 @@
37
37
  "postinstall": "node ./scripts/postinstall-download.mjs"
38
38
  },
39
39
  "dependencies": {
40
+ "@anthropic-ai/sdk": "^0.71.2",
40
41
  "@hono/node-server": "^1.15.2",
41
- "@t3x-dev/api": "0.1.5",
42
- "@t3x-dev/cli": "0.1.5",
43
- "@t3x-dev/mcp": "0.1.5",
44
- "@t3x-dev/storage": "0.1.5",
45
- "commander": "^13.1.0"
42
+ "@hono/node-ws": "^1.3.0",
43
+ "@hono/zod-openapi": "^1.2.0",
44
+ "@hono/zod-validator": "^0.7.6",
45
+ "@modelcontextprotocol/sdk": "^1.0.0",
46
+ "@mozilla/readability": "^0.6.0",
47
+ "@scalar/hono-api-reference": "^0.9.30",
48
+ "bcryptjs": "^3.0.3",
49
+ "chalk": "^5.4.1",
50
+ "commander": "^13.1.0",
51
+ "drizzle-orm": "^0.38.3",
52
+ "embedded-postgres": "^18.3.0-beta.16",
53
+ "fflate": "^0.8.2",
54
+ "hono": "^4.7.10",
55
+ "js-yaml": "^4.1.1",
56
+ "jsdom": "^28.0.0",
57
+ "json-canonicalize": "^2.0.0",
58
+ "mammoth": "^1.8.0",
59
+ "nanoid": "^5.1.6",
60
+ "ora": "^8.1.1",
61
+ "pdf-parse": "^1.1.1",
62
+ "pg": "^8.21.0",
63
+ "pino": "^9.14.0",
64
+ "pino-pretty": "^11.3.0",
65
+ "postgres": "^3.4.5",
66
+ "table": "^6.9.0",
67
+ "turndown": "^7.2.2",
68
+ "turndown-plugin-gfm": "^1.0.2",
69
+ "undici": "^7.16.0",
70
+ "yaml": "^2.8.3",
71
+ "zod": "^4.2.1"
46
72
  },
47
73
  "devDependencies": {
48
74
  "@types/node": "^22.10.0",
@@ -1,26 +1,26 @@
1
1
  {
2
2
  "manifestVersion": 1,
3
- "packageVersion": "0.1.5",
4
- "fixedVersion": "0.1.5",
5
- "generatedAt": "2026-04-27T06:51:55.647Z",
3
+ "packageVersion": "0.3.1",
4
+ "fixedVersion": "0.3.1",
5
+ "generatedAt": "2026-06-02T02:30:22.531Z",
6
6
  "dependencies": {
7
- "@t3x-dev/yops": "0.1.5",
8
- "@t3x-dev/yschema": "0.1.5",
9
- "@t3x-dev/core": "0.1.5",
10
- "@t3x-dev/storage": "0.1.5",
11
- "@t3x-dev/api": "0.1.5",
12
- "@t3x-dev/api-client": "0.1.5",
13
- "@t3x-dev/cli": "0.1.5",
14
- "@t3x-dev/mcp": "0.1.5",
15
- "@t3x-dev/local": "0.1.5",
7
+ "@t3x-dev/yops": "0.3.1",
8
+ "@t3x-dev/yschema": "0.3.1",
9
+ "@t3x-dev/core": "0.3.1",
10
+ "@t3x-dev/storage": "0.3.1",
11
+ "@t3x-dev/api": "0.3.1",
12
+ "@t3x-dev/api-client": "0.3.1",
13
+ "@t3x-dev/cli": "0.3.1",
14
+ "@t3x-dev/mcp": "0.3.1",
15
+ "@t3x-dev/local": "0.3.1",
16
16
  "web": "0.1.0"
17
17
  },
18
18
  "platforms": {
19
19
  "darwin-arm64": {
20
- "fileName": "t3x-local-runtime-0.1.5-darwin-arm64.tar.gz",
21
- "url": "https://github.com/t3x-dev/t3x-core/releases/download/t3x-local-v0.1.5/t3x-local-runtime-0.1.5-darwin-arm64.tar.gz",
22
- "sha256": "943a2f3847d6e7bfcdb288c434059effe3530e104e32ee15fc0ec1bc509e1e1e",
23
- "size": 20377018
20
+ "fileName": "t3x-local-runtime-0.3.1-darwin-arm64.tar.gz",
21
+ "url": "https://github.com/t3x-dev/t3x-core/releases/download/t3x-local-v0.3.1/t3x-local-runtime-0.3.1-darwin-arm64.tar.gz",
22
+ "sha256": "9e0108ebc7731e8224d303b51997d7d2c3585140c1e3026c151936abc50bbbdc",
23
+ "size": 21879930
24
24
  }
25
25
  }
26
26
  }
@@ -33,12 +33,6 @@ const FIXED_VERSION_PACKAGES = [
33
33
  '@t3x-dev/mcp',
34
34
  '@t3x-dev/local',
35
35
  ];
36
- const LOCAL_DIRECT_FIXED_DEPENDENCIES = [
37
- '@t3x-dev/api',
38
- '@t3x-dev/cli',
39
- '@t3x-dev/mcp',
40
- '@t3x-dev/storage',
41
- ];
42
36
  const GITHUB_TOKEN_ENV_NAMES = ['T3X_LOCAL_GITHUB_TOKEN', 'GH_TOKEN', 'GITHUB_TOKEN'];
43
37
  const DOWNLOAD_MAX_ATTEMPTS = parsePositiveInt(process.env.T3X_LOCAL_DOWNLOAD_ATTEMPTS, 3);
44
38
  const DOWNLOAD_RETRY_DELAY_MS = parsePositiveInt(
@@ -391,22 +385,18 @@ async function verifyInstalledVersionLock(packageDir, manifest) {
391
385
  const expectedVersion = packageJson.version;
392
386
  const problems = [];
393
387
 
394
- for (const dependencyName of LOCAL_DIRECT_FIXED_DEPENDENCIES) {
395
- const actual = packageJson.dependencies?.[dependencyName];
396
-
397
- if (actual !== expectedVersion && actual !== `workspace:${expectedVersion}`) {
398
- problems.push(
399
- `package.json dependency ${dependencyName} must pin ${expectedVersion}, found ${actual ?? 'missing'}`
400
- );
401
- }
402
- }
403
-
404
388
  if (manifest.packageVersion !== expectedVersion) {
405
389
  problems.push(
406
390
  `runtime-manifest.json packageVersion must be ${expectedVersion}, found ${manifest.packageVersion ?? 'missing'}`
407
391
  );
408
392
  }
409
393
 
394
+ if (manifest.fixedVersion !== expectedVersion) {
395
+ problems.push(
396
+ `runtime-manifest.json fixedVersion must be ${expectedVersion}, found ${manifest.fixedVersion ?? 'missing'}`
397
+ );
398
+ }
399
+
410
400
  for (const packageName of FIXED_VERSION_PACKAGES) {
411
401
  const manifestVersion = manifest.dependencies?.[packageName];
412
402
  if (manifestVersion !== expectedVersion) {
@@ -416,6 +406,27 @@ async function verifyInstalledVersionLock(packageDir, manifest) {
416
406
  }
417
407
  }
418
408
 
409
+ const platformEntries = Object.entries(manifest.platforms ?? {});
410
+ if (platformEntries.length === 0) {
411
+ problems.push('runtime-manifest.json must declare at least one runtime platform artifact');
412
+ }
413
+
414
+ for (const [platformKey, platform] of platformEntries) {
415
+ const expectedFileNamePrefix = `t3x-local-runtime-${expectedVersion}-`;
416
+ if (!platform?.fileName?.startsWith(expectedFileNamePrefix)) {
417
+ problems.push(
418
+ `runtime-manifest.json platform ${platformKey} fileName must include ${expectedVersion}, found ${platform?.fileName ?? 'missing'}`
419
+ );
420
+ }
421
+
422
+ const expectedReleaseTag = `t3x-local-v${expectedVersion}`;
423
+ if (!platform?.url?.includes(expectedReleaseTag)) {
424
+ problems.push(
425
+ `runtime-manifest.json platform ${platformKey} url must reference ${expectedReleaseTag}, found ${platform?.url ?? 'missing'}`
426
+ );
427
+ }
428
+ }
429
+
419
430
  if (problems.length > 0) {
420
431
  throw new Error(
421
432
  '[t3x-local:postinstall] Fixed version verification failed.\n' +
@@ -29,6 +29,8 @@ const stagingDir = await fs.mkdtemp(path.join(os.tmpdir(), 't3x-local-runtime-')
29
29
 
30
30
  const sources = {
31
31
  apiDist: path.join(repoRoot, 'apps', 'api', 'dist'),
32
+ cliDist: path.join(repoRoot, 'apps', 'cli', 'dist'),
33
+ mcpDist: path.join(repoRoot, 'apps', 'mcp', 'dist'),
32
34
  webStandalone: path.join(repoRoot, 'apps', 'web', '.next', 'standalone'),
33
35
  webStatic: path.join(repoRoot, 'apps', 'web', '.next', 'static'),
34
36
  webPublic: path.join(repoRoot, 'apps', 'web', 'public'),
@@ -50,10 +52,14 @@ if (missingSources.length > 0) {
50
52
 
51
53
  try {
52
54
  await ensureDir(path.join(stagingDir, 'api'));
55
+ await ensureDir(path.join(stagingDir, 'cli'));
56
+ await ensureDir(path.join(stagingDir, 'mcp'));
53
57
  await ensureDir(path.join(stagingDir, 'web'));
54
58
  await ensureDir(artifactDir);
55
59
 
56
60
  await fs.cp(sources.apiDist, path.join(stagingDir, 'api', 'dist'), { recursive: true });
61
+ await fs.cp(sources.cliDist, path.join(stagingDir, 'cli', 'dist'), { recursive: true });
62
+ await fs.cp(sources.mcpDist, path.join(stagingDir, 'mcp', 'dist'), { recursive: true });
57
63
  await fs.cp(sources.webStandalone, path.join(stagingDir, 'web', 'standalone'), {
58
64
  recursive: true,
59
65
  verbatimSymlinks: true,
@@ -5,6 +5,8 @@ import { fileURLToPath } from 'node:url';
5
5
 
6
6
  export const SUPPORTED_RUNTIME_PATHS = [
7
7
  path.join('api', 'dist', 'index.js'),
8
+ path.join('cli', 'dist', 'index.js'),
9
+ path.join('mcp', 'dist', 'index.js'),
8
10
  path.join('web', 'standalone', 'apps', 'web', 'server.js'),
9
11
  path.join('web', 'static'),
10
12
  path.join('web', 'public'),