@anytowork/cli 0.12.17 → 0.12.18
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 +2 -2
- package/package.json +1 -1
- package/src/index.js +2 -2
- package/src/libra-commands.js +7 -15
- package/src/refund-commands.js +1 -1
package/README.md
CHANGED
|
@@ -128,12 +128,12 @@ anytowork task reject <task_id> --reason "不符合要求" # 先看报价(
|
|
|
128
128
|
anytowork libra quote --task <task_id> [--claim full|partial:30|libra] [--evidence <file_id>]... # 申请裁决前报价
|
|
129
129
|
anytowork libra file --task <task_id> [--quote <quote_id>] # 不再提交:发起裁决需用户本人在网页完成,只打印网页链接(退出码 5)
|
|
130
130
|
anytowork libra status --task <task_id> # 阶段、倒计时、双方陈述情况
|
|
131
|
-
anytowork libra statement --task <task_id> --text-file ./s.txt
|
|
131
|
+
anytowork libra statement --task <task_id> --text-file ./s.txt # 陈述 / 补充陈述(文字免费);证据在申请裁决时一次交齐,开审后不能再补
|
|
132
132
|
# 写陈述时请分段、用序号:一条一个要点。双方看到的是原文,换行与分段都会保留。
|
|
133
133
|
anytowork libra answer --task <task_id> --question <q_id> --text "回答" # 回答追问(仅一轮)
|
|
134
134
|
anytowork libra ruling --task <task_id> [--round 1|2] # 读裁决书
|
|
135
135
|
anytowork libra accept --task <task_id> # 接受裁决(需主人在网页完成)
|
|
136
|
-
anytowork libra review quote --task <task_id> ... #
|
|
136
|
+
anytowork libra review quote --task <task_id> ... # 复核报价(不扣费);复核期只能补充陈述
|
|
137
137
|
anytowork libra review file --task <task_id> [--quote <quote_id>] # 同 libra file:申请复核需用户本人在网页完成(退出码 5)
|
|
138
138
|
anytowork libra withdraw --task <task_id> # 撤回裁决(发起方;只能本人在网页操作,Agent 会得到退出码 5 和网页链接)
|
|
139
139
|
anytowork libra concede --task <task_id> --expect-pct 30 # 提前结案:接单方认可对方公开的退款主张,比例必须是你读到的那个
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -480,12 +480,12 @@ const HELP = `${BRAND.name} CLI v${PKG_VERSION}
|
|
|
480
480
|
请把链接交给用户;退出码 5(--json: {ok:false, error:"human_required", web_url})
|
|
481
481
|
libra status --task <task_id> 阶段、倒计时、双方是否已陈述、服务费明细
|
|
482
482
|
libra statement --task <task_id> (--text-file <路径> | --text "文字")
|
|
483
|
-
|
|
483
|
+
陈述 / 补充陈述(文字免费);证据在申请裁决时一次交齐,开审后不能再补
|
|
484
484
|
请分段、用序号写清楚:一条一个要点。双方看到的是你的原文(换行保留)
|
|
485
485
|
libra answer --task <task_id> --question <q_id> (--text "回答" | --text-file <路径>) 回答追问(仅一轮,逾期视为放弃)
|
|
486
486
|
libra ruling --task <task_id> [--round 1|2] 读裁决书(初裁 / 复核)
|
|
487
487
|
libra accept --task <task_id> 接受裁决(需主人在网页完成;双方都接受则立即执行,到期无人复核则自动执行)
|
|
488
|
-
libra review quote --task <task_id> [--
|
|
488
|
+
libra review quote --task <task_id> [--points 1,3] 复核报价(每案一次,终局;复核期只能补充陈述,不能再补证据)
|
|
489
489
|
libra review file --task <task_id> [--quote <quote_id>] 同 libra file:申请复核需要用户本人在网页完成,打印网页链接,退出码 5
|
|
490
490
|
提前结案(出裁决书之前,三种方式;libra status 会列出现在能用哪些、区间和待回应的提议):
|
|
491
491
|
libra withdraw --task <task_id> 发起方撤回自己付费立案的裁决(视为确认验收);只能本人在网页操作,Agent 会得到退出码 5 和网页链接
|
package/src/libra-commands.js
CHANGED
|
@@ -24,7 +24,7 @@ import path from 'node:path';
|
|
|
24
24
|
import { atomicWriteFile } from './atomic-write.js';
|
|
25
25
|
import { resolveCredDir } from './profile.js';
|
|
26
26
|
import {
|
|
27
|
-
libraQuote, libraTaskCase, libraStatement,
|
|
27
|
+
libraQuote, libraTaskCase, libraStatement, libraAnswer,
|
|
28
28
|
libraRulings, libraAccept, libraReviewQuote,
|
|
29
29
|
libraGetCase, libraWithdrawCase, libraConcede, libraProposeOffer, libraAcceptOffer, libraRejectOffer, libraWithdrawOffer,
|
|
30
30
|
} from './api.js';
|
|
@@ -38,6 +38,7 @@ const MAX_PAGES_PER_FILE = 5000;
|
|
|
38
38
|
export { EXIT_HUMAN_REQUIRED };
|
|
39
39
|
|
|
40
40
|
/** One generic sentence about how to write a statement (v0.22.x C6). Never names a particular Agent product. */
|
|
41
|
+
export const EVIDENCE_CLOSED_MSG = '已不支持 --evidence:证据在申请裁决时一次交齐,开审后不再补充。陈述期和复核期只能补充文字陈述。';
|
|
41
42
|
export const STATEMENT_TIP = '请分段、用序号写清楚:一条一个要点。';
|
|
42
43
|
|
|
43
44
|
/** Plain-language notices every fee-taking command must show (PRD section 6.2 / 16, docs section 5). */
|
|
@@ -396,9 +397,9 @@ async function cmdStatement(ctx, io) {
|
|
|
396
397
|
if (!flags.task) return io.fail(2, 'missing_task', '缺少 --task <task-id>');
|
|
397
398
|
const st = readText(flags.textFile, flags.text[0], '陈述', io);
|
|
398
399
|
if (st.fail !== undefined) return st.fail;
|
|
399
|
-
|
|
400
|
-
if (
|
|
401
|
-
if (!st.text
|
|
400
|
+
// v0.29.46: evidence is handed in once when the ruling is applied for; no more evidence after the hearing opens.
|
|
401
|
+
if (flags.evidence.length) return io.fail(2, 'evidence_closed', EVIDENCE_CLOSED_MSG);
|
|
402
|
+
if (!st.text) return io.fail(2, 'nothing_to_submit', '没有内容:--text-file <路径> / --text "文字"');
|
|
402
403
|
if (cpLen(st.text) > STATEMENT_MAX_CHARS) return io.fail(2, 'statement_too_long', `单次陈述不能超过 ${STATEMENT_MAX_CHARS} 字(现在 ${cpLen(st.text)} 字)`);
|
|
403
404
|
const lc = await loadCase(ctx, io, flags.task);
|
|
404
405
|
if (lc.fail !== undefined) return lc.fail;
|
|
@@ -411,14 +412,6 @@ async function cmdStatement(ctx, io) {
|
|
|
411
412
|
lines.push(`${STATEMENT_TIP}双方会看到你的原文,换行和分段都会保留。`);
|
|
412
413
|
if (out.statement.review_opened) lines.push('双方都已陈述,审理已提前开始。');
|
|
413
414
|
}
|
|
414
|
-
if (evid.evidence.length) {
|
|
415
|
-
const order = await libraAddEvidence(ctx.baseUrl, ctx.credOpts, caseId, evid.evidence, undefined, { fetchImpl: ctx.fetchImpl });
|
|
416
|
-
out.evidence_order = order;
|
|
417
|
-
const url = cashierUrl(ctx, order);
|
|
418
|
-
lines.push(`补充关键证据需要你支付 ${yuan(order.amount_cents)}(计费证据由补充方承担,不退还),订单号 ${order.order_no || order.order_id}`);
|
|
419
|
-
if (url) lines.push(`收银台:${url}`);
|
|
420
|
-
lines.push('支付成功后证据才会进入案卷。');
|
|
421
|
-
}
|
|
422
415
|
return io.ok({ case_id: caseId, ...out }, lines.join('\n'));
|
|
423
416
|
}
|
|
424
417
|
|
|
@@ -476,11 +469,10 @@ async function cmdAccept(ctx, io) {
|
|
|
476
469
|
async function cmdReviewQuote(ctx, io) {
|
|
477
470
|
const { flags } = ctx;
|
|
478
471
|
if (!flags.task) return io.fail(2, 'missing_task', '缺少 --task <task-id>');
|
|
479
|
-
|
|
480
|
-
if (ev.fail !== undefined) return ev.fail;
|
|
472
|
+
if (flags.evidence.length) return io.fail(2, 'evidence_closed', EVIDENCE_CLOSED_MSG);
|
|
481
473
|
const lc = await loadCase(ctx, io, flags.task);
|
|
482
474
|
if (lc.fail !== undefined) return lc.fail;
|
|
483
|
-
const q = await libraReviewQuote(ctx.baseUrl, ctx.credOpts, lc.caseView.id, {
|
|
475
|
+
const q = await libraReviewQuote(ctx.baseUrl, ctx.credOpts, lc.caseView.id, {}, { fetchImpl: ctx.fetchImpl });
|
|
484
476
|
saveQuote(ctx.credOpts, q.quote_id, {
|
|
485
477
|
kind: 'review', task_id: flags.task, case_id: lc.caseView.id, points: flags.points || null,
|
|
486
478
|
total_cents: q.total_cents, expires_at: q.expires_at,
|
package/src/refund-commands.js
CHANGED
|
@@ -158,7 +158,7 @@ export function describeNegotiation(ctx, view, taskId) {
|
|
|
158
158
|
} else {
|
|
159
159
|
const c = n.closed || {};
|
|
160
160
|
lines.push(` 状态:已结束(${KIND_WORDS[c.kind] || n.status})`);
|
|
161
|
-
if (c.refund_pct != null) lines.push(` 退还比例:${c.refund_pct}%${n.amounts ? `(退还 ${money(view, n.amounts.refund_cents)},结算给接单方 ${money(view, n.amounts.release_cents)})` : ''}`);
|
|
161
|
+
if (c.refund_pct != null) lines.push(` 退还比例:${c.refund_pct}%${n.amounts ? `(退还 ${money(view, n.amounts.refund_cents)},结算给接单方 ${money(view, n.amounts.release_cents)}${n.amounts.release_net_cents != null ? `,扣掉平台费用和同款分成后接单方预计到手 ${money(view, n.amounts.release_net_cents)}` : ''})` : ''}`);
|
|
162
162
|
if (c.kind === 'court') lines.push(' 已转入 AI 法庭裁决,请用 anytowork libra status 看进展。');
|
|
163
163
|
}
|
|
164
164
|
if ((n.entries || []).length) lines.push(' 记录:', ...n.entries.map((en) => entryLine(view, en)));
|