@clawos-dev/clawd 0.2.625 → 0.2.627

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.
@@ -21533,7 +21533,8 @@ var DeploySecretPresenceSchema = external_exports.object({
21533
21533
  }).strict();
21534
21534
  var DEPLOY_STAGE_STATUSES = ["pending", "running", "done", "failed", "waiting", "skipped"];
21535
21535
  var DeployStageStatusSchema = external_exports.enum(DEPLOY_STAGE_STATUSES);
21536
- var DEPLOY_STAGE_KEYS = ["build", "smoke", "deploy"];
21536
+ var DEPLOY_VERIFY_STAGE = "verify";
21537
+ var DEPLOY_STAGE_KEYS = ["build", "smoke", "deploy", DEPLOY_VERIFY_STAGE];
21537
21538
  var DeployStageKeySchema = external_exports.enum(DEPLOY_STAGE_KEYS);
21538
21539
  var DeployJobSchema = external_exports.object({
21539
21540
  key: DeployStageKeySchema,
@@ -21714,7 +21714,8 @@ var DeploySecretPresenceSchema = external_exports.object({
21714
21714
  }).strict();
21715
21715
  var DEPLOY_STAGE_STATUSES = ["pending", "running", "done", "failed", "waiting", "skipped"];
21716
21716
  var DeployStageStatusSchema = external_exports.enum(DEPLOY_STAGE_STATUSES);
21717
- var DEPLOY_STAGE_KEYS = ["build", "smoke", "deploy"];
21717
+ var DEPLOY_VERIFY_STAGE = "verify";
21718
+ var DEPLOY_STAGE_KEYS = ["build", "smoke", "deploy", DEPLOY_VERIFY_STAGE];
21718
21719
  var DeployStageKeySchema = external_exports.enum(DEPLOY_STAGE_KEYS);
21719
21720
  var DeployJobSchema = external_exports.object({
21720
21721
  key: DeployStageKeySchema,
@@ -24604,6 +24605,12 @@ var PackageFindingSchema = EnvPackageSchema.omit({ localVersion: true, artifact:
24604
24605
  artifact: external_exports.object({ url: external_exports.string().url(), bin: external_exports.string() }).strict().optional()
24605
24606
  });
24606
24607
 
24608
+ // src/feishu-auth/deploy-environments.ts
24609
+ var DEPLOY_TARGETS = {
24610
+ integration: { api: "https://api-int.clawos.chat", gateway: "https://persona-int.clawos.chat" },
24611
+ production: { api: "https://api.clawos.chat", gateway: "https://persona.clawos.chat" }
24612
+ };
24613
+
24607
24614
  // src/deploy/release-workflow.ts
24608
24615
  function renderDeployWorkflow(config2) {
24609
24616
  const identity = [
@@ -24807,6 +24814,22 @@ function renderDeployWorkflow(config2) {
24807
24814
  ...download("${{ inputs.environment == 'production' && 'persona-candidate' || 'persona-smoked' }}"),
24808
24815
  ...contract,
24809
24816
  ...runtime("register"),
24817
+ ...job(DEPLOY_VERIFY_STAGE),
24818
+ " needs: deploy",
24819
+ " if: inputs.environment != 'production'",
24820
+ " steps:",
24821
+ ...download("persona-smoked"),
24822
+ ...contract,
24823
+ " - name: Verify ordinary user conversation after deployment",
24824
+ " env:",
24825
+ ` CLAWD_INT_API_URL: \${{ vars.CLAWD_INT_API_URL || '${DEPLOY_TARGETS.integration.api}' }}`,
24826
+ " CLAWD_INT_TEST_LOGIN_PASS: ${{ secrets.CLAWD_INT_TEST_LOGIN_PASS }}",
24827
+ " run: |",
24828
+ " node clawos/cloud-host/pipeline/persona-verify.mjs \\",
24829
+ " --file candidate-release.json \\",
24830
+ " --persona-id '${{ steps.plan.outputs.persona_id }}' \\",
24831
+ " --engine '${{ steps.plan.outputs.engine }}'",
24832
+ "",
24810
24833
  ...upload("persona-verified-${{ github.run_attempt }}")
24811
24834
  ].join("\n");
24812
24835
  }
@@ -11,32 +11,15 @@ description: 老板问本机 clawd 状态时触发——装了哪些 persona/ext
11
11
 
12
12
  **第一步先走 RPC**(clawd-rpc MCP 的 list / call)——daemon 在跑时它是状态的真源,目录布局只是实现细节。用 list 拉方法表(每条带中文说明),对着老板的问题挑方法调;方法表就是能力清单,别凭印象说 clawd 没有某能力。
13
13
 
14
- **RPC 查不到答案、或 daemon 没在跑,再翻文件。** 先 fetch 一次 `${CLAWOS_API}/api/docs/introspection/file-map.md`——它讲 `~/.clawd/` 下每个文件/目录是干啥的,是文件路线的地图。
14
+ **文档只解释结构,不代表当前状态。** 需要了解字段含义时 fetch `${CLAWOS_API}/api/docs/introspection/file-map.md` 或 `state-schemas.md`;故障表征参考 `common-issues.md`。
15
15
 
16
- 然后按具体子问题挑:
16
+ **不直接读凭证或扫目录列状态。** `auth.json`、带凭证的 tunnel / owner identity 文件和含 connectToken 的 `contacts.json` 不读、不贴、不落盘;不调会返回 connectToken 的 `contact:list`。联系人授权通过界面或方法表里不返回凭证的接口查看。
17
17
 
18
- | 老板问的 | fetch |
19
- |---|---|
20
- | 具体 state/auth/tunnel/dispatch json 里字段啥意思 | `${CLAWOS_API}/api/docs/introspection/state-schemas.md` |
21
- | 典型故障表征怎么排(比如 tunnel 挂了、dispatch 卡住、session 报错) | `${CLAWOS_API}/api/docs/introspection/common-issues.md` |
22
-
23
- **文件兜底清单(Read / Bash)** —— 仅在 RPC 答不了时用:
24
-
25
- - `~/.clawd/state.json` daemon 运行时状态(pid / url / tunnelUrl)
26
- - `~/.clawd/tunnel.json` 远程接入配置
27
- - `~/.clawd/dispatch.json` dispatch 台账(正在跑 / 已完成的任务)
28
- - `~/.clawd/contacts.json` 联系人 + 授权(T-35 后授权数据全在这一份,legacy `capabilities.json` / `received-capabilities.json` 已 retire)
29
- - `~/.clawd/personas/` 装了哪些 persona
30
- - `~/.clawd/extensions-published.json` / `~/.clawd/extensions/` 装了哪些 extension
31
- - `~/.clawd/*.log` 各类 log(`clawd.log` 是 daemon 主 log)
32
-
33
- 读文件时凭证不外显:`auth.json`(owner token)整份别读,`contacts.json` 里的 `connectToken` 等 token / secret 字段不贴进回答、不落盘。
34
-
35
- 排障时:先走 RPC 看 daemon 侧状态;daemon 没响应再按 file-map 定位文件 Read,最后按 common-issues 里的表征匹配可能原因。
18
+ RPC 不可用时说明无法确认当前状态。诊断可按用户的时间窗读取 `~/.clawd/log/clawd.log`、`frpc.log` 等日志,禁止把 persona 目录、旧 JSON 或远端不在本机的文件当作实时清单。读会话走 `history:read`,一定加 `slim:true`。
36
19
 
37
20
  ## fetch 失败了
38
21
 
39
- fetch 不到文档就照本机文件+ 现有认知答。**如果本机文件也答不了、又需要文档知识,直接告诉老板"我需要那份自省文档但拉不到,稍后再问一次或让 David 看一眼"**。别瞎猜字段含义。
22
+ fetch 不到文档时仍先用 RPC 方法表与返回结果回答;需要的结构知识无法核实时,明确说明缺少哪份文档。RPC 也不可用就说明无法确认当前状态,不以目录或旧文件补猜。
40
23
 
41
24
  ## 回答风格
42
25
 
@@ -21714,7 +21714,8 @@ var DeploySecretPresenceSchema = external_exports.object({
21714
21714
  }).strict();
21715
21715
  var DEPLOY_STAGE_STATUSES = ["pending", "running", "done", "failed", "waiting", "skipped"];
21716
21716
  var DeployStageStatusSchema = external_exports.enum(DEPLOY_STAGE_STATUSES);
21717
- var DEPLOY_STAGE_KEYS = ["build", "smoke", "deploy"];
21717
+ var DEPLOY_VERIFY_STAGE = "verify";
21718
+ var DEPLOY_STAGE_KEYS = ["build", "smoke", "deploy", DEPLOY_VERIFY_STAGE];
21718
21719
  var DeployStageKeySchema = external_exports.enum(DEPLOY_STAGE_KEYS);
21719
21720
  var DeployJobSchema = external_exports.object({
21720
21721
  key: DeployStageKeySchema,
@@ -24604,6 +24605,12 @@ var PackageFindingSchema = EnvPackageSchema.omit({ localVersion: true, artifact:
24604
24605
  artifact: external_exports.object({ url: external_exports.string().url(), bin: external_exports.string() }).strict().optional()
24605
24606
  });
24606
24607
 
24608
+ // src/feishu-auth/deploy-environments.ts
24609
+ var DEPLOY_TARGETS = {
24610
+ integration: { api: "https://api-int.clawos.chat", gateway: "https://persona-int.clawos.chat" },
24611
+ production: { api: "https://api.clawos.chat", gateway: "https://persona.clawos.chat" }
24612
+ };
24613
+
24607
24614
  // src/deploy/release-workflow.ts
24608
24615
  function renderDeployWorkflow(config2) {
24609
24616
  const identity = [
@@ -24807,6 +24814,22 @@ function renderDeployWorkflow(config2) {
24807
24814
  ...download("${{ inputs.environment == 'production' && 'persona-candidate' || 'persona-smoked' }}"),
24808
24815
  ...contract,
24809
24816
  ...runtime("register"),
24817
+ ...job(DEPLOY_VERIFY_STAGE),
24818
+ " needs: deploy",
24819
+ " if: inputs.environment != 'production'",
24820
+ " steps:",
24821
+ ...download("persona-smoked"),
24822
+ ...contract,
24823
+ " - name: Verify ordinary user conversation after deployment",
24824
+ " env:",
24825
+ ` CLAWD_INT_API_URL: \${{ vars.CLAWD_INT_API_URL || '${DEPLOY_TARGETS.integration.api}' }}`,
24826
+ " CLAWD_INT_TEST_LOGIN_PASS: ${{ secrets.CLAWD_INT_TEST_LOGIN_PASS }}",
24827
+ " run: |",
24828
+ " node clawos/cloud-host/pipeline/persona-verify.mjs \\",
24829
+ " --file candidate-release.json \\",
24830
+ " --persona-id '${{ steps.plan.outputs.persona_id }}' \\",
24831
+ " --engine '${{ steps.plan.outputs.engine }}'",
24832
+ "",
24810
24833
  ...upload("persona-verified-${{ github.run_attempt }}")
24811
24834
  ].join("\n");
24812
24835
  }