@xiashe/skill 0.1.8 → 0.1.9

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.
@@ -6,7 +6,7 @@ import { mkdir, readdir, readFile, stat, writeFile } from 'node:fs/promises';
6
6
  import os from 'node:os';
7
7
  import path from 'node:path';
8
8
 
9
- const VERSION = '0.1.7';
9
+ const VERSION = '0.1.9';
10
10
  const COMMAND_NAME = process.env.XIASHE_SKILL_CLI_NAME || 'xiashe-skill';
11
11
  const PRODUCT_NAME = process.env.XIASHE_SKILL_PRODUCT_NAME || (COMMAND_NAME === 'agentpie-skill' ? 'AgentPie' : 'XiaShe');
12
12
  const REGISTRY_PROVIDER = process.env.XIASHE_SKILL_REGISTRY_PROVIDER || (COMMAND_NAME === 'agentpie-skill' ? 'agentpie' : 'xiashe');
@@ -657,7 +657,7 @@ async function writeManifest(root, flags) {
657
657
 
658
658
  function hubInstruction(hub) {
659
659
  if (hub === 'xiashe') {
660
- return '虾舍商店发布是完整 Skill 包和 registry manifest 的主流程。请创建虾舍商店草稿,并保留公开披露、归因和 runtime analytics 回传能力。';
660
+ return '虾舍商店发布是完整 Skill 包和 registry manifest 的主流程。请保留公开披露、归因和 runtime analytics 回传能力;如果本地 manifest 有 registry public token 或已有创作者认证 CLI/API 会话,就创建或复用虾舍商店草稿。';
661
661
  }
662
662
  if (hub === 'red') {
663
663
  return 'Red Skill 的官方上传 prompt / 页面流程是主流程。请先从小红书创作服务平台获取或使用用户提供的 Red Skill 上传 prompt,再把下面的虾舍 registry 要求作为附加说明合并进去。';
@@ -691,7 +691,7 @@ function hubInstruction(hub) {
691
691
 
692
692
  function platformPromptPlaceholder(hub) {
693
693
  if (hub === 'xiashe') {
694
- return '如果用户要发布到虾舍商店,请优先创建虾舍商店草稿;不要把第三方平台限制套用到虾舍完整 Skill 包。';
694
+ return '如果用户要发布到虾舍商店,并且当前环境已有创作者认证 CLI/API 会话,请优先创建虾舍商店草稿;如果没有认证会话,请完成 registry setup、披露、平台 profile 和 handoff 文件,不要要求 Agent 宿主登录或索取账号凭证。不要把第三方平台限制套用到虾舍完整 Skill 包。';
695
695
  }
696
696
  if (hub === 'red') {
697
697
  return '如果用户还没有提供 Red Skill 官方上传 prompt,请先请用户从小红书创作服务平台复制该 prompt;不要用虾舍 prompt 替代 Red Skill 官方 prompt。';
@@ -1067,6 +1067,14 @@ async function writeUnifiedHandoff(root, args) {
1067
1067
  '```',
1068
1068
  '',
1069
1069
  'If the hub cannot run callbacks, keep upload attribution and use campaign links or manual imports. Do not fake runtime events.',
1070
+ '',
1071
+ '## XiaShe Store draft auth',
1072
+ '',
1073
+ `For XiaShe Store, first check whether a submission already exists for this registry. ${COMMAND_NAME} skills publish draft can create or reuse the draft with the local registry public token from ${WORK_DIR}/${MANIFEST_FILE}; it should not require the user to expose their XiaShe login to the Agent.`,
1074
+ '',
1075
+ 'If the registry token is missing or rejected, stop and ask the user to run `xiashe login` locally or generate a new Add Skill task. Do not upload the package as another creator.',
1076
+ '',
1077
+ 'If the claim code expires while you are working, ask for a new code and reuse the existing scan, package plans, disclosure text, and review results instead of starting over.',
1070
1078
  ''
1071
1079
  ].join('\n');
1072
1080
  const handoffPath = path.join(args.outDir, HANDOFF_FILE);
@@ -1585,7 +1593,10 @@ async function main() {
1585
1593
  'Next:',
1586
1594
  '- Treat the target platform official upload flow as authoritative.',
1587
1595
  '- Use the handoff file as the only XiaShe registry checklist.',
1588
- '- For XiaShe Store, create or update the store draft after the manifest is written.',
1596
+ '- Before uploading, check whether this Skill already has a draft, submitted review, or published listing for the selected target; skip duplicate uploads and verify/update the existing record when possible.',
1597
+ '- Check upload readiness and runtime readiness separately before submission.',
1598
+ '- For XiaShe Store, create or update the store draft only when an authenticated creator CLI/API session is available.',
1599
+ '- If no authenticated creator session is available, finish registry setup and handoff files without asking the Agent host for account credentials.',
1589
1600
  '- For Markdown/TXT-only platforms, copy the disclosure text into an allowed public field instead of uploading registry JSON.',
1590
1601
  '- Only count runtime usage when the Skill or Agent callback sends real runtime events.'
1591
1602
  ].filter(Boolean);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xiashe/skill",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "xiashe-skill": "bin/xiashe-skill.mjs"