@cello-protocol/cli 0.0.314 → 0.0.315

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.
@@ -14,6 +14,19 @@ function usageText(result) {
14
14
  return "There are no agents on this daemon.\n";
15
15
  return `${result.agents.map((a) => (a.ok ? `${a.agent}: ready, ${usageSentence(a.usage)}` : `${a.agent}: ${a.message}`)).join("\n")}\n`;
16
16
  }
17
+ // "9 signals, all current, nothing new." — what a person needs from a collect, and each refusal by what failed.
18
+ function collectSentence(c) {
19
+ const news = c.stored === 0 ? "nothing new" : `${c.stored} new`;
20
+ const refused = c.refused.length === 0 ? "" : ` ${c.refused.length} failed a check and ${c.refused.length === 1 ? "was" : "were"} left out: ${c.refused.map((r) => r.fault).join(", ")}.`;
21
+ return `${c.held} signal${c.held === 1 ? "" : "s"}, all current, ${news}.${refused}`;
22
+ }
23
+ function collectText(result) {
24
+ if (!("agents" in result))
25
+ return `${collectSentence(result)}\n`;
26
+ if (result.agents.length === 0)
27
+ return "There are no agents on this daemon.\n";
28
+ return `${result.agents.map((a) => (a.ok ? `${a.agent}: ${collectSentence(a)}` : `${a.agent}: ${a.message}`)).join("\n")}\n`;
29
+ }
17
30
  const SIGNAL_HASH = { name: "hash", kind: "string", required: true, positional: true, description: "At least 8 hex characters of the signal's hash. signals-list shows them." };
18
31
  const SESSION = { name: "session_id", kind: "string", required: true, positional: true, description: "The session id, 32 hex characters" };
19
32
  const DEFINITIONS = [
@@ -748,6 +761,7 @@ The code stops agents that are simply trying commands, and pipes and scripts wit
748
761
  scoped: false,
749
762
  acts: false,
750
763
  description: "Fetch the signals the issuer has already made, with a request signed by each agent's key, and keep those that pass every check. With no agent named, every agent on this daemon, each answered on its own: one refusing stops none of the rest. A repeat changes nothing. refused names any that failed a check.",
764
+ plain: (result) => collectText(result),
751
765
  params: [ANY_AGENT],
752
766
  },
753
767
  {
@@ -46,7 +46,8 @@ export function signalViewText(s) {
46
46
  `subject_kind: ${s.subject_kind}`,
47
47
  `issuer_kind: ${s.issuer_kind}`,
48
48
  `issuer: ${s.issuer_address} (${s.issuer_standing})`,
49
- `issuer_pubkey: ${s.issuer_pubkey}`,
49
+ // Both keys in hex run to thousands of characters and bury the rest. The start identifies it; --json carries it whole.
50
+ `issuer_pubkey: ${s.issuer_pubkey.slice(0, 16)}… (the whole key: --json)`,
50
51
  `schema_version: ${s.schema_version ?? "—"}`,
51
52
  `issued_at: ${when(s.issued_at)}`,
52
53
  `expires_at: ${when(s.expires_at)}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cello-protocol/cli",
3
- "version": "0.0.314",
3
+ "version": "0.0.315",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=24.7"