@kmlckj/licos-ai-cli 0.0.19 → 0.0.21

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.
@@ -4,7 +4,7 @@ version = "0.1.0"
4
4
  description = "LICOS LangGraph agent project"
5
5
  requires-python = ">=3.12"
6
6
  dependencies = [
7
- "licos-agent-runtime>=0.2.7",
7
+ "licos-agent-runtime>=0.2.8",
8
8
  ]
9
9
 
10
10
  [tool.uv]
@@ -1 +1 @@
1
- licos-agent-runtime>=0.2.7
1
+ licos-agent-runtime>=0.2.8
@@ -1,6 +1,6 @@
1
1
  loglevel=error
2
2
  registry=https://registry.npmmirror.com/
3
- @kmlckj:registry=https://registry.npmjs.org/
3
+ @kmlckj:registry=https://registry.npmmirror.com/
4
4
 
5
5
  strictStorePkgContentCheck=false
6
6
  verifyStoreIntegrity=false
@@ -1,2 +1,2 @@
1
1
  registry=https://registry.npmmirror.com/
2
- @kmlckj:registry=https://registry.npmjs.org/
2
+ @kmlckj:registry=https://registry.npmmirror.com/
@@ -5,7 +5,6 @@
5
5
  "private": true,
6
6
  "scripts": {
7
7
  "check-deps": "npx depcheck",
8
- "postinstall": "npm run install-missing",
9
8
  "install-missing": "node ./scripts/install-missing-deps.js",
10
9
  "lint": "tsc --noEmit; eslint ./ -f ./scripts/formatter.mjs --quiet",
11
10
  "start": "expo start --web --clear",
@@ -1,6 +1,6 @@
1
1
  loglevel=error
2
2
  registry=https://registry.npmmirror.com/
3
- @kmlckj:registry=https://registry.npmjs.org/
3
+ @kmlckj:registry=https://registry.npmmirror.com/
4
4
 
5
5
  strictStorePkgContentCheck=false
6
6
  verifyStoreIntegrity=false
@@ -1,2 +1,2 @@
1
1
  registry=https://registry.npmmirror.com/
2
- @kmlckj:registry=https://registry.npmjs.org/
2
+ @kmlckj:registry=https://registry.npmmirror.com/
@@ -1,6 +1,6 @@
1
1
  loglevel=error
2
2
  registry=https://registry.npmmirror.com/
3
- @kmlckj:registry=https://registry.npmjs.org/
3
+ @kmlckj:registry=https://registry.npmmirror.com/
4
4
 
5
5
  strictStorePkgContentCheck=false
6
6
  verifyStoreIntegrity=false
@@ -1,2 +1,2 @@
1
1
  registry=https://registry.npmmirror.com/
2
- @kmlckj:registry=https://registry.npmjs.org/
2
+ @kmlckj:registry=https://registry.npmmirror.com/
@@ -67,7 +67,7 @@ export default defineNuxtConfig({
67
67
  // Development server configuration
68
68
  devServer: {
69
69
  port: parseInt(process.env.PORT || '<%= port %>', 10),
70
- host: process.env.HOSTNAME || 'localhost',
70
+ host: process.env.HOST || '0.0.0.0',
71
71
  },
72
72
 
73
73
  // TypeScript configuration
@@ -36,4 +36,4 @@ echo "Clearing port ${PORT} before start."
36
36
  kill_port_if_listening
37
37
  echo "Starting Nuxt dev server on port ${PORT}..."
38
38
 
39
- PORT=$PORT pnpm nuxt dev
39
+ HOST=0.0.0.0 PORT=$PORT pnpm nuxt dev --host 0.0.0.0
@@ -14,7 +14,7 @@ DEPLOY_RUN_PORT="${DEPLOY_RUN_PORT:-$PORT}"
14
14
  start_service() {
15
15
  cd "${PROJECT_DIR}"
16
16
  echo "Starting Nuxt.js service on port ${DEPLOY_RUN_PORT} for production..."
17
- PORT=${DEPLOY_RUN_PORT} node .output/server/index.mjs
17
+ HOST=0.0.0.0 PORT=${DEPLOY_RUN_PORT} node .output/server/index.mjs
18
18
  }
19
19
 
20
20
  echo "Starting Nuxt.js service on port ${DEPLOY_RUN_PORT} for production..."
@@ -1,6 +1,6 @@
1
1
  loglevel=error
2
2
  registry=https://registry.npmmirror.com/
3
- @kmlckj:registry=https://registry.npmjs.org/
3
+ @kmlckj:registry=https://registry.npmmirror.com/
4
4
 
5
5
  strictStorePkgContentCheck=false
6
6
  verifyStoreIntegrity=false
@@ -1,2 +1,2 @@
1
1
  registry=https://registry.npmmirror.com/
2
- @kmlckj:registry=https://registry.npmjs.org/
2
+ @kmlckj:registry=https://registry.npmmirror.com/
@@ -1,6 +1,6 @@
1
1
  loglevel=error
2
2
  registry=https://registry.npmmirror.com/
3
- @kmlckj:registry=https://registry.npmjs.org/
3
+ @kmlckj:registry=https://registry.npmmirror.com/
4
4
 
5
5
  strictStorePkgContentCheck=false
6
6
  verifyStoreIntegrity=false
@@ -1,2 +1,2 @@
1
1
  registry=https://registry.npmmirror.com/
2
- @kmlckj:registry=https://registry.npmjs.org/
2
+ @kmlckj:registry=https://registry.npmmirror.com/
@@ -4,7 +4,7 @@ version = "0.1.0"
4
4
  description = "LICOS LangGraph workflow project"
5
5
  requires-python = ">=3.12"
6
6
  dependencies = [
7
- "licos-agent-runtime>=0.2.7",
7
+ "licos-agent-runtime>=0.2.8",
8
8
  ]
9
9
 
10
10
  [tool.uv]
@@ -1 +1 @@
1
- licos-agent-runtime>=0.2.7
1
+ licos-agent-runtime>=0.2.8
package/lib/cli.js CHANGED
@@ -2107,7 +2107,7 @@ const EventBuilder = {
2107
2107
  };
2108
2108
 
2109
2109
  var name = "@kmlckj/licos-ai-cli";
2110
- var version = "0.0.19";
2110
+ var version = "0.0.21";
2111
2111
  var description = "LICOS AI coding workspace CLI - project template engine and dev tools";
2112
2112
  var license = "MIT";
2113
2113
  var author = "kmlckj";
@@ -5811,6 +5811,10 @@ const loadLicosConfig = async (
5811
5811
  try {
5812
5812
  content = await fs$1.readFile(licosConfigPath, 'utf-8');
5813
5813
  } catch (error) {
5814
+ const recoveredConfig = await recoverLicosConfig(projectPath);
5815
+ if (recoveredConfig) {
5816
+ return recoveredConfig;
5817
+ }
5814
5818
  throw new Error(
5815
5819
  `.licos config file not found in ${projectPath}\n` +
5816
5820
  'Please ensure you are in a project directory initialized with licos-coding.\n' +
@@ -5968,6 +5972,96 @@ const detectTemplateKey = async (
5968
5972
  }
5969
5973
  };
5970
5974
 
5975
+ const resolveProjectScriptCommand = (
5976
+ projectPath,
5977
+ scriptPath,
5978
+ fallback,
5979
+ ) => {
5980
+ if (fs.existsSync(path.join(projectPath, scriptPath))) {
5981
+ return ['bash', `./${scriptPath.replace(/\\/g, '/')}`];
5982
+ }
5983
+
5984
+ return fallback;
5985
+ };
5986
+
5987
+ const createFallbackLicosConfig = async (
5988
+ projectPath,
5989
+ ) => {
5990
+ const template = await detectTemplateKey(projectPath);
5991
+ if (!template) {
5992
+ return null;
5993
+ }
5994
+
5995
+ const common = {
5996
+ project: {
5997
+ requires: ['nodejs-24'],
5998
+ template,
5999
+ version: packageJson.version,
6000
+ appliedPatches: [],
6001
+ },
6002
+ };
6003
+
6004
+ if (template === 'expo') {
6005
+ return {
6006
+ ...common,
6007
+ dev: {
6008
+ build: resolveProjectScriptCommand(projectPath, '.licosproj/scripts/dev_build.sh', ['pnpm', 'install']),
6009
+ run: resolveProjectScriptCommand(projectPath, '.licosproj/scripts/dev_run.sh', ['pnpm', 'dev']),
6010
+ },
6011
+ deploy: {
6012
+ build: resolveProjectScriptCommand(projectPath, '.licosproj/scripts/prod_build.sh', ['pnpm', 'build']),
6013
+ run: resolveProjectScriptCommand(projectPath, '.licosproj/scripts/prod_run.sh', ['pnpm', 'start']),
6014
+ },
6015
+ };
6016
+ }
6017
+
6018
+ if (template === 'taro') {
6019
+ return {
6020
+ ...common,
6021
+ dev: {
6022
+ build: resolveProjectScriptCommand(projectPath, '.licosproj/scripts/dev_build.sh', ['pnpm', 'install']),
6023
+ run: resolveProjectScriptCommand(projectPath, '.licosproj/scripts/dev_run.sh', ['pnpm', 'dev']),
6024
+ },
6025
+ deploy: {
6026
+ build: resolveProjectScriptCommand(projectPath, '.licosproj/scripts/deploy_build.sh', ['pnpm', 'build']),
6027
+ run: resolveProjectScriptCommand(projectPath, '.licosproj/scripts/deploy_run.sh', ['pnpm', 'start']),
6028
+ },
6029
+ };
6030
+ }
6031
+
6032
+ const fallbackDevRun =
6033
+ template === 'nextjs'
6034
+ ? ['pnpm', 'dev', '--hostname', '0.0.0.0', '-p', '${LICOS_RUN_PORT:-5000}']
6035
+ : ['pnpm', 'dev', '--', '--host', '0.0.0.0'];
6036
+
6037
+ return {
6038
+ ...common,
6039
+ dev: {
6040
+ build: resolveProjectScriptCommand(projectPath, 'scripts/prepare.sh', ['pnpm', 'install']),
6041
+ run: resolveProjectScriptCommand(projectPath, 'scripts/dev.sh', fallbackDevRun),
6042
+ },
6043
+ deploy: {
6044
+ build: resolveProjectScriptCommand(projectPath, 'scripts/build.sh', ['pnpm', 'build']),
6045
+ run: resolveProjectScriptCommand(projectPath, 'scripts/start.sh', ['pnpm', 'start']),
6046
+ },
6047
+ };
6048
+ };
6049
+
6050
+ const recoverLicosConfig = async (
6051
+ projectPath,
6052
+ ) => {
6053
+ const config = await createFallbackLicosConfig(projectPath);
6054
+ if (!config) {
6055
+ return null;
6056
+ }
6057
+
6058
+ logger.warn(
6059
+ `.licos config file not found in ${projectPath}; recovered config for ${config.project.template}`,
6060
+ );
6061
+ await saveTomlLicosConfig(config, projectPath);
6062
+ return config;
6063
+ };
6064
+
5971
6065
  const PATCH_FG_ENDPOINT =
5972
6066
  'about:blank';
5973
6067
  const PATCH_FG_TIMEOUT_MS = 2000;
@@ -6579,7 +6673,7 @@ const loadExistingTomlConfig = async (
6579
6673
  try {
6580
6674
  await fs$1.access(path.resolve(projectFolder, '.licos'));
6581
6675
  } catch (e) {
6582
- return null;
6676
+ return recoverLicosConfig(projectFolder);
6583
6677
  }
6584
6678
 
6585
6679
  return loadTomlLicosConfig(projectFolder);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmlckj/licos-ai-cli",
3
- "version": "0.0.19",
3
+ "version": "0.0.21",
4
4
  "description": "LICOS AI coding workspace CLI - project template engine and dev tools",
5
5
  "license": "MIT",
6
6
  "author": "kmlckj",