@xiashe/cli 0.1.39 → 0.1.40
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 +6 -0
- package/bin/xiashe.mjs +6 -1
- package/lib/use-number.mjs +8 -0
- package/package.json +2 -2
- package/skills/xiashe/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -218,3 +218,9 @@ State is isolated by official actions origin and number, written atomically with
|
|
|
218
218
|
The delivery command validates compressed size, SHA-256 and archive paths without executing package scripts. Read the returned SKILL.md before acknowledging received. Runtime results and received/used receipts are different evidence. Creator --stats requires login and ownership; bounded samples are explicitly marked truncated. Anonymous subjects are not precise unique people.
|
|
219
219
|
|
|
220
220
|
doctor reports host discovery as unverified; only a real host session can validate loading. Website staging packages retain their environment; npm defaults to production.
|
|
221
|
+
|
|
222
|
+
## Short Skill command (0.1.40)
|
|
223
|
+
|
|
224
|
+
`xiashe use 123456` starts or resumes the number protocol in production, regardless of the saved default environment. For staging use `xiashe use 123456 --staging`. No URL configuration is needed. Existing `number` commands retain their behavior.
|
|
225
|
+
|
|
226
|
+
Without a global installation: `npx -y xiashe@0.1.40 use 123456` (Node.js 20+ required). In Codex use `$xiashe 123456` after installing the Skill entry.
|
package/bin/xiashe.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { expandUseNumber } from '../lib/use-number.mjs';
|
|
2
3
|
import { deliverNumber } from '../lib/delivery.mjs';
|
|
3
4
|
import { runAccessCommand } from '../skills/xiashe/scripts/runtime-state.mjs';
|
|
4
5
|
import { runDoctorCommand } from '../lib/doctor.mjs';
|
|
@@ -197,6 +198,7 @@ ${` ${c} access <number> deliver|prepare|start|prompt|describe_action|execute|a
|
|
|
197
198
|
Global flags:
|
|
198
199
|
--profile <name> Local config profile. Default: active profile.
|
|
199
200
|
--convex-url <url> Convex deployment URL.
|
|
201
|
+
use <number> [--staging] Use a creator Skill (production by default).
|
|
200
202
|
--actions-url <url> ${PRODUCT_NAME} action site URL.
|
|
201
203
|
--json Print JSON output.
|
|
202
204
|
--timeout-ms <ms> HTTP timeout. Default: 20000.
|
|
@@ -1832,7 +1834,10 @@ function osPlatform() {
|
|
|
1832
1834
|
}
|
|
1833
1835
|
|
|
1834
1836
|
async function main() {
|
|
1835
|
-
|
|
1837
|
+
let argv;
|
|
1838
|
+
try { argv = expandUseNumber(process.argv.slice(2)); }
|
|
1839
|
+
catch (error) { fail(error.message, EXIT_USAGE); }
|
|
1840
|
+
const parsed = parseGlobal(argv);
|
|
1836
1841
|
const [command, sub, ...args] = parsed.argv;
|
|
1837
1842
|
const global = parsed.global;
|
|
1838
1843
|
if (!command) {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Short use command always selects an official environment, independent of saved defaults. */
|
|
2
|
+
export function expandUseNumber(argv) {
|
|
3
|
+
if (argv[0] !== 'use') return argv;
|
|
4
|
+
const [, number, ...flags] = argv;
|
|
5
|
+
if (!/^[1-9]\d{5,8}$/.test(number || '')) throw new Error('Usage: xiashe use <6–9 digit number> [--staging] [--json]');
|
|
6
|
+
if (flags.some(flag => !['--staging', '--json'].includes(flag))) throw new Error('Supported use flags: --staging, --json');
|
|
7
|
+
return ['number', number, '--start', '--actions-url', flags.includes('--staging') ? 'https://actions.projectphenix.site' : 'https://actions.xiashe.chat', ...flags.filter(flag => flag === '--json')];
|
|
8
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xiashe/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.40",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"xiashe": "bin/xiashe.mjs"
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"lib"
|
|
13
13
|
],
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@xiashe/sdk": "0.1.
|
|
15
|
+
"@xiashe/sdk": "0.1.40"
|
|
16
16
|
},
|
|
17
17
|
"engines": {
|
|
18
18
|
"node": ">=20"
|
package/skills/xiashe/SKILL.md
CHANGED
|
@@ -5,7 +5,7 @@ description: 通过虾舍公开 Skill 的固定号码获取和使用创作者能
|
|
|
5
5
|
|
|
6
6
|
# 虾舍 Skill 号码
|
|
7
7
|
|
|
8
|
-
Claude Code 使用 `/xiashe 123456`,Codex 使用 `$xiashe 123456`(或在技能选择器选择 xiashe)。自然语言提及“虾舍号码”也可触发。
|
|
8
|
+
Claude Code 使用 `/xiashe 123456`,Codex 使用 `$xiashe 123456`(或在技能选择器选择 xiashe)。自然语言提及“虾舍号码”也可触发。Codex 的文档引导以 `$xiashe` 为准;`/xiashe` 作为部分宿主入口或文本触发兼容,不承诺所有 Codex 客户端都提供同名斜杠菜单。终端使用 `xiashe use 123456`,测试环境使用 `xiashe use 123456 --staging`;斜杠和美元前缀不用于 Shell。
|
|
9
9
|
|
|
10
10
|
`/xiashe 123456`、`/xiashe number 123456`、`/xiashe numbers 123456` 含义相同。123456 只是格式示例。将脚本路径解析为本 Skill 目录下的绝对路径;参数作为独立参数传递,不拼接用户 Shell 文本。
|
|
11
11
|
|