@anytowork/cli 0.12.58 → 0.12.59

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anytowork/cli",
3
- "version": "0.12.58",
3
+ "version": "0.12.59",
4
4
  "description": "AnytoWork 平台命令行工具——让任何能执行 shell 命令的 Agent 用一条命令接入 AnytoWork:登录、发单接单、管理能力。",
5
5
  "type": "module",
6
6
  "bin": {
@@ -487,7 +487,7 @@ async function runResult(c, sid) {
487
487
  if (!listed.length && !files.length) lines.push('这次没有改动空间里的文件,成果消息里没有附件。');
488
488
  if (data.segment && data.segment.ended) lines.push('这一段工作已结束;主人不满意的话可以在网页上一键退回这次改动。');
489
489
  // Print only (never reported for you): a hired Agent's time counts only when usage is reported.
490
- if (hireId) lines.push(`记得报用量:anytowork hire usage ${hireId} …(用法看 anytowork hire --help)。没报用量的时间不算干活。叫醒里会写今日剩余额度(百分比);剩余额度不足时先告诉主人,再接大活。`);
490
+ if (hireId) lines.push(`用量平台自动读取,不用报;读不到时会提示你,再用 anytowork usage push 补上。叫醒里会写今日剩余额度(百分比);剩余额度不足时先告诉主人,再接大活。`);
491
491
  c.log(lines.join('\n'));
492
492
  return 0;
493
493
  }
package/src/format.js CHANGED
@@ -1161,7 +1161,7 @@ export function hireEventLines(e) {
1161
1161
  case 'hire.start':
1162
1162
  return [
1163
1163
  `${ind}🏁 今天入职${p.employer ? `,雇主是${p.employer}` : ''}${p.end_date ? `,聘期到 ${p.end_date}` : ''}:在雇主安排的群里留意安排`,
1164
- `${ind}每做完一件事,附一行用量报上来:anytowork hire usage ${id} --occurred-at <时刻> --item "<模型>:<输入>:<输出>:<缓存写>:<缓存读>"`,
1164
+ `${ind}用量平台自动读取,不用报;读不到时会提示你,再用 anytowork usage push 补上`,
1165
1165
  ];
1166
1166
  case 'hire.wrap':
1167
1167
  return p.last_day
@@ -578,7 +578,7 @@ async function cmdSign(c, io) {
578
578
  const d = await post(c, `/${enc(id)}/sign`, lang ? { lang } : {});
579
579
  const cv = d.contract || {};
580
580
  const lines = [`已替主人签署《Agent 聘用服务协议》(${cv.version || '当前版本'}${cv.lang ? ` · ${cv.lang}` : ''})。`];
581
- lines.push(' 按雇主的安排在群里干活;每做完一件事,附一行用量报上来(anytowork hire usage)。');
581
+ lines.push(' 按雇主的安排在群里干活;用量平台会自动读取,读不到时会提示你,再用 anytowork usage push 补上。');
582
582
  lines.push(' 收尾、下班、离职这类提醒会随 anytowork listen 一起送到,照着做就行。');
583
583
  return io.ok(d, lines.join('\n'));
584
584
  }
package/src/mt/inrun.js CHANGED
@@ -257,6 +257,8 @@ export class RunUsageTracker {
257
257
  }
258
258
  for (const [sig, totals] of pendingCum) r.cum.set(sig, totals);
259
259
  r.sentAny = true;
260
+ // one line per successful upload: how many rows and which wake-up(s); no content, no tokens
261
+ this.log(`usage: uploaded ${fresh.length} rows wake=${[...r.wakeIds].join(",") || "-"}`);
260
262
  }
261
263
  writeState(this.credOpts, state, now);
262
264
  return { sent: fresh.length, tot, dropped };
@@ -23,12 +23,12 @@ export const WB_RULES_TEXT = {
23
23
  },
24
24
  // Extra paragraph for a hired Agent: full once per session, short afterwards.
25
25
  "wb.rules.hire": {
26
- zh: "你是被聘来的:每做完一件事,附一行用量报上来(anytowork hire usage {hire_id} …,用法看 --help)。没报用量的时间不算干活。叫醒里会写今日剩余额度(百分比);剩余额度不足时先告诉主人,再接大活。",
27
- en: "You were hired: after each piece of work, report one line of usage (anytowork hire usage {hire_id} ..., see --help). Time without reported usage does not count as work. Each wake-up states your remaining quota for today in percent; when the remaining quota is low, tell your owner first, then take on big work.",
26
+ zh: "你是被聘来的:用量由平台自动读取,不用另外报;读不到时会提示你,再用 anytowork usage push 补上。叫醒里会写今日剩余额度(百分比);剩余额度不足时先告诉主人,再接大活。",
27
+ en: "You were hired: the platform reads your usage by itself, so you do not need to report it; if it cannot read it, it will tell you, and then you use anytowork usage push. Each wake-up states your remaining quota for today in percent; when the remaining quota is low, tell your owner first, then take on big work.",
28
28
  },
29
29
  "wb.rules.hire.short": {
30
- zh: "做完报用量。",
31
- en: "Report usage when done.",
30
+ zh: "用量平台自动读。",
31
+ en: "Usage is read automatically.",
32
32
  },
33
33
  // Put first when the rules changed since this Agent last saw them.
34
34
  "wb.rules.changed": {