@tianacloud/cli 0.2.0 → 0.2.1-beta.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
@@ -1,17 +1,17 @@
1
1
  # Tiana CLI
2
2
 
3
- This package distributes the Go CLI, its embedded Rust helper, the SQL executor,
4
- and the public Gateway CA for macOS arm64 and Linux amd64. Installation
5
- does not compile source or download additional executables.
3
+ 此预发布包包含 macOS arm64、Linux amd64 的原生 Go CLI 和 Git 启动器。安装时无需下载额外可执行文件,也不编译 Rust。使用 `npm install -g @tianacloud/cli@0.2.1-beta.1` 安装;此版本使用 `next` 标签。
6
4
 
7
- Run `tiana verify-install --json` to check the installed executable pair and
8
- helper contract. Then use `tiana auth login` in a terminal, or connect Tiana in
9
- WorkBuddy. Both workflows use the same local credential store and task journal.
5
+ 本地审核 tarball 也可用 `npm install -g /path/to/tiana-cli-VERSION.tgz` 安装。用 `tiana --version`、`tiana login --help`、`tiana web --help` 核验功能。
10
6
 
11
- Install the pinned preview version with `npm install -g @tianacloud/cli@0.2.0`.
12
- Preview releases use the `next` tag. Access to the configured Tiana
13
- Console and Gateway still requires the Tiana network and Console certificate
14
- trust; installing this public npm package does not grant database access.
7
+ 管理端地址由启动 Agent 或 Shell 时设置的 `TIANA_API_ORIGIN` 提供,技能继承环境,不按命令注入或覆盖;私有 CA 使用 `TIANA_CA_FILE` 或 `--ca-file`。包不内置部署地址或 CA,默认验证 TLS。
15
8
 
16
- Intel Mac support is deferred. The source template is not an installable
17
- release: the release packager adds both native platform directories.
9
+ 对话中运行 `tiana login --start --no-open --json` 并向用户展示 `data.verification_uri`。授权后执行 `tiana login --resume --json`,成功再执行 `tiana status`。普通终端可用 `tiana login`。
10
+
11
+ 数据库:`tiana sqlite create NAME --wait`、`tiana sqlite shell INSTANCE -e 'SELECT 1'`。源码:`tiana git create NAME --wait`,使用返回的远程地址进行普通 Git 推送。连接读取已有账号登录态,不保存本地实例 Token;过期时重新登录。
12
+
13
+ 应用:`tiana web serve --dir DIST`、`tiana web create NAME`、`tiana web upload ID --version VERSION --dir DIST --json`。遵循配套 Tiana Skill 的模板、哈希路由和清单。
14
+
15
+ 构建:分别执行 `node scripts/build-platform.mjs darwin-arm64 ASSETS` 与 `node scripts/build-platform.mjs linux-amd64 ASSETS`,然后 `node scripts/package-cli.mjs ASSETS OUTPUT`。输出 tarball 和校验和,不上传或发布。
16
+
17
+ 应用列表:`tiana web list [--json]`。删除:`tiana web delete ID_OR_NAME`,非交互需 `--force`,可用 `--wait --json` 等待源站文件清理;关联 SQLite、Git 保留。
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ import { run } from './launcher.mjs';
3
+
4
+ // Resolve the native tiana from this package, never another executable on PATH.
5
+ run(['git', 'remote-helper', ...process.argv.slice(2)]);
package/bin/launcher.mjs CHANGED
@@ -9,7 +9,7 @@ export function platformDirectory(platform, arch) {
9
9
  }[`${platform}:${arch}`];
10
10
  }
11
11
 
12
- export function run() {
12
+ export function run(args = process.argv.slice(2)) {
13
13
  const platform = platformDirectory(process.platform, process.arch);
14
14
  if (!platform) {
15
15
  console.error(`Tiana CLI does not support ${process.platform}/${process.arch}`);
@@ -17,7 +17,7 @@ export function run() {
17
17
  return;
18
18
  }
19
19
  const executable = fileURLToPath(new URL(`../platforms/${platform}/tiana`, import.meta.url));
20
- const child = spawn(executable, process.argv.slice(2), { stdio: 'inherit' });
20
+ const child = spawn(executable, args, { stdio: 'inherit' });
21
21
  const onInterrupt = () => child.kill('SIGINT');
22
22
  const onTerminate = () => child.kill('SIGTERM');
23
23
  process.on('SIGINT', onInterrupt);
package/package.json CHANGED
@@ -1,10 +1,23 @@
1
1
  {
2
2
  "name": "@tianacloud/cli",
3
- "version": "0.2.0",
4
- "description": "Tiana CLI with precompiled database helpers",
3
+ "version": "0.2.1-beta.1",
4
+ "description": "Tiana CLI for account login, SQLite, Git and application publication",
5
5
  "type": "module",
6
- "engines": { "node": ">=20" },
7
- "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/", "tag": "next" },
8
- "bin": { "tiana": "bin/tiana.mjs" },
9
- "files": ["bin", "platforms", "README.md"]
6
+ "engines": {
7
+ "node": ">=20"
8
+ },
9
+ "publishConfig": {
10
+ "access": "public",
11
+ "registry": "https://registry.npmjs.org/",
12
+ "tag": "next"
13
+ },
14
+ "bin": {
15
+ "tiana": "bin/tiana.mjs",
16
+ "git-remote-tiana": "bin/git-remote-tiana.mjs"
17
+ },
18
+ "files": [
19
+ "bin",
20
+ "platforms",
21
+ "README.md"
22
+ ]
10
23
  }
@@ -1,3 +1,2 @@
1
- d9b95aeed88063d54ab0ebe41dd0e3da80828202f5a4ed198c69bda3d8558a56 tiana
2
- af11364c247c60d8f63a09cf79dcea35ef845f8834296a73acb6cb3920f5d0a7 tiana-sql-executor
3
- a58227c8de2b5bdf3785a3194b35773a0dbe99be090348adfc15d3a06595c8f1 gateway-ca.pem
1
+ e0fb20d5ab16991ce0fa74356ee42c85477b2a814c277212028f4b9a50dcc32c tiana
2
+ c0ae5f5c3387c24980b271f63cb5adba25d6317b3a4bcb38b2322e59b872da7d git-remote-tiana
@@ -0,0 +1,9 @@
1
+ #!/bin/sh
2
+ set -eu
3
+ # Resolve only this launcher's directory; never search PATH for tiana.
4
+ case "$0" in
5
+ */*) launcher=$0 ;;
6
+ *) launcher=$(command -v "$0") ;;
7
+ esac
8
+ launcher_dir=$(CDPATH='' cd -P -- "$(dirname -- "$launcher")" && pwd)
9
+ exec "$launcher_dir/tiana" git remote-helper "$@"
@@ -1,27 +1,15 @@
1
1
  {
2
- "version": "0.2.0",
2
+ "version": "0.2.1-beta.1",
3
3
  "platform": "darwin",
4
4
  "arch": "arm64",
5
5
  "cli": {
6
- "revision": "557957ae294443632a4094cd432c8bc2af1cb653",
7
- "dirty": true
6
+ "revision": "9622cc1b997fe5abcf3c5310116f701abf27329b",
7
+ "dirty": false
8
8
  },
9
- "helper": {
10
- "contract": 3,
11
- "revision": "c681e209a9151eee8dc3a0b9ed0277145617ac82",
12
- "tags": [],
13
- "dirty": false,
14
- "sha256": "79ddd75756093c3e6ca2dcb28aeabf5f608c1a7f6af5780cfd721d047abda521"
15
- },
16
- "sql_executor": {
17
- "sdk_tag": "v0.1.0-dev.5",
18
- "sdk_revision": "0d955224802d793539835b868f75f5163f27057f"
19
- },
20
- "gateway_port": "9443",
9
+ "runtime": "native-go",
21
10
  "insecure_tls": false,
22
11
  "files": {
23
- "tiana": "d9b95aeed88063d54ab0ebe41dd0e3da80828202f5a4ed198c69bda3d8558a56",
24
- "tiana-sql-executor": "af11364c247c60d8f63a09cf79dcea35ef845f8834296a73acb6cb3920f5d0a7",
25
- "gateway-ca.pem": "a58227c8de2b5bdf3785a3194b35773a0dbe99be090348adfc15d3a06595c8f1"
12
+ "tiana": "e0fb20d5ab16991ce0fa74356ee42c85477b2a814c277212028f4b9a50dcc32c",
13
+ "git-remote-tiana": "c0ae5f5c3387c24980b271f63cb5adba25d6317b3a4bcb38b2322e59b872da7d"
26
14
  }
27
15
  }
Binary file
@@ -1,3 +1,2 @@
1
- 01de9b66e158665c9656e02fcff3fb0c94557657d668ba8d8289828398cf7fc0 tiana
2
- 9f656ddfa0abdb0e51c3341dca29e73d988c1779da7a1f0391daee209b401426 tiana-sql-executor
3
- a58227c8de2b5bdf3785a3194b35773a0dbe99be090348adfc15d3a06595c8f1 gateway-ca.pem
1
+ 760ae1f7108eeda1c3b81b049caba113fe29d21bf14a3d4d4bc1f0779d8759f0 tiana
2
+ c0ae5f5c3387c24980b271f63cb5adba25d6317b3a4bcb38b2322e59b872da7d git-remote-tiana
@@ -0,0 +1,9 @@
1
+ #!/bin/sh
2
+ set -eu
3
+ # Resolve only this launcher's directory; never search PATH for tiana.
4
+ case "$0" in
5
+ */*) launcher=$0 ;;
6
+ *) launcher=$(command -v "$0") ;;
7
+ esac
8
+ launcher_dir=$(CDPATH='' cd -P -- "$(dirname -- "$launcher")" && pwd)
9
+ exec "$launcher_dir/tiana" git remote-helper "$@"
@@ -1,27 +1,15 @@
1
1
  {
2
- "version": "0.2.0",
2
+ "version": "0.2.1-beta.1",
3
3
  "platform": "linux",
4
4
  "arch": "amd64",
5
5
  "cli": {
6
- "revision": "557957ae294443632a4094cd432c8bc2af1cb653",
7
- "dirty": true
6
+ "revision": "9622cc1b997fe5abcf3c5310116f701abf27329b",
7
+ "dirty": false
8
8
  },
9
- "helper": {
10
- "contract": 3,
11
- "revision": "c681e209a9151eee8dc3a0b9ed0277145617ac82",
12
- "tags": [],
13
- "dirty": false,
14
- "sha256": "9ef85e2719024639f0da90ac97218490252660297e42cdf6f41e79d80e66f24c"
15
- },
16
- "sql_executor": {
17
- "sdk_tag": "v0.1.0-dev.5",
18
- "sdk_revision": "0d955224802d793539835b868f75f5163f27057f"
19
- },
20
- "gateway_port": "9443",
9
+ "runtime": "native-go",
21
10
  "insecure_tls": false,
22
11
  "files": {
23
- "tiana": "01de9b66e158665c9656e02fcff3fb0c94557657d668ba8d8289828398cf7fc0",
24
- "tiana-sql-executor": "9f656ddfa0abdb0e51c3341dca29e73d988c1779da7a1f0391daee209b401426",
25
- "gateway-ca.pem": "a58227c8de2b5bdf3785a3194b35773a0dbe99be090348adfc15d3a06595c8f1"
12
+ "tiana": "760ae1f7108eeda1c3b81b049caba113fe29d21bf14a3d4d4bc1f0779d8759f0",
13
+ "git-remote-tiana": "c0ae5f5c3387c24980b271f63cb5adba25d6317b3a4bcb38b2322e59b872da7d"
26
14
  }
27
15
  }
Binary file
@@ -1,11 +0,0 @@
1
- -----BEGIN CERTIFICATE-----
2
- MIIBpjCCAUugAwIBAgIUNWu+Mh42CLohPNuB/NWYYyV5WbwwCgYIKoZIzj0EAwIw
3
- KDEmMCQGA1UEAwwdVGlhbmEgV3VsYW5jaGFidSBHYXRld2F5IFJvb3QwHhcNMjYw
4
- ODMxMTMzMzEzWhcNMjcwODMxMTMzMzEzWjAoMSYwJAYDVQQDDB1UaWFuYSBXdWxh
5
- bmNoYWJ1IEd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