cnagent 2.2.0 → 2.2.2
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 +1 -1
- package/tools/dist/cn.js +20 -16
package/package.json
CHANGED
package/tools/dist/cn.js
CHANGED
|
@@ -12130,7 +12130,7 @@ var require_cn_lib = __commonJS({
|
|
|
12130
12130
|
return "push";
|
|
12131
12131
|
case /* Inbound */
|
|
12132
12132
|
7:
|
|
12133
|
-
return "
|
|
12133
|
+
return "in";
|
|
12134
12134
|
case /* Update */
|
|
12135
12135
|
8:
|
|
12136
12136
|
return "update";
|
|
@@ -13057,16 +13057,11 @@ var require_cn_lib = __commonJS({
|
|
|
13057
13057
|
_0: c
|
|
13058
13058
|
};
|
|
13059
13059
|
}), parse_peer_cmd(param.tl));
|
|
13060
|
+
case "in":
|
|
13060
13061
|
case "inbound":
|
|
13061
13062
|
case "process":
|
|
13062
|
-
|
|
13063
|
-
|
|
13064
|
-
} else {
|
|
13065
|
-
return (
|
|
13066
|
-
/* Inbound */
|
|
13067
|
-
7
|
|
13068
|
-
);
|
|
13069
|
-
}
|
|
13063
|
+
exit = 2;
|
|
13064
|
+
break;
|
|
13070
13065
|
case "push":
|
|
13071
13066
|
if (param.tl) {
|
|
13072
13067
|
return;
|
|
@@ -13101,7 +13096,7 @@ var require_cn_lib = __commonJS({
|
|
|
13101
13096
|
};
|
|
13102
13097
|
}
|
|
13103
13098
|
}
|
|
13104
|
-
exit =
|
|
13099
|
+
exit = 3;
|
|
13105
13100
|
break;
|
|
13106
13101
|
case "reply":
|
|
13107
13102
|
const match$2 = param.tl;
|
|
@@ -13115,7 +13110,7 @@ var require_cn_lib = __commonJS({
|
|
|
13115
13110
|
_1: Stdlib__String2.concat(" ", match$2.tl)
|
|
13116
13111
|
};
|
|
13117
13112
|
}
|
|
13118
|
-
exit =
|
|
13113
|
+
exit = 3;
|
|
13119
13114
|
break;
|
|
13120
13115
|
case "save":
|
|
13121
13116
|
return {
|
|
@@ -13137,7 +13132,7 @@ var require_cn_lib = __commonJS({
|
|
|
13137
13132
|
_1: Stdlib__String2.concat(" ", match$3.tl)
|
|
13138
13133
|
};
|
|
13139
13134
|
}
|
|
13140
|
-
exit =
|
|
13135
|
+
exit = 3;
|
|
13141
13136
|
break;
|
|
13142
13137
|
case "status":
|
|
13143
13138
|
if (param.tl) {
|
|
@@ -13167,7 +13162,7 @@ var require_cn_lib = __commonJS({
|
|
|
13167
13162
|
);
|
|
13168
13163
|
}
|
|
13169
13164
|
default:
|
|
13170
|
-
exit =
|
|
13165
|
+
exit = 3;
|
|
13171
13166
|
}
|
|
13172
13167
|
switch (exit) {
|
|
13173
13168
|
case 1:
|
|
@@ -13180,6 +13175,15 @@ var require_cn_lib = __commonJS({
|
|
|
13180
13175
|
);
|
|
13181
13176
|
}
|
|
13182
13177
|
case 2:
|
|
13178
|
+
if (param.tl) {
|
|
13179
|
+
return;
|
|
13180
|
+
} else {
|
|
13181
|
+
return (
|
|
13182
|
+
/* Inbound */
|
|
13183
|
+
7
|
|
13184
|
+
);
|
|
13185
|
+
}
|
|
13186
|
+
case 3:
|
|
13183
13187
|
if (param.tl) {
|
|
13184
13188
|
return;
|
|
13185
13189
|
}
|
|
@@ -13593,8 +13597,8 @@ var require_cn_lib = __commonJS({
|
|
|
13593
13597
|
10
|
|
13594
13598
|
);
|
|
13595
13599
|
}
|
|
13596
|
-
var help_text = "cn - Coherent Network agent CLI\n\nUsage: cn <command> [options]\n\nCommands:\n # Agent decisions (output)\n delete <thread> GTD: discard\n defer <thread> GTD: postpone\n delegate <t> <peer> GTD: forward\n do <thread> GTD: claim/start\n done <thread> GTD: complete \xE2\x86\x92 archive\n reply <thread> <msg> Append to thread\n send <peer> <msg> Message to peer (or self)\n \n # cn operations (orchestrator)\n sync Fetch inbound + send outbound\n
|
|
13597
|
-
var version = "2.2.
|
|
13600
|
+
var help_text = "cn - Coherent Network agent CLI\n\nUsage: cn <command> [options]\n\nCommands:\n # Agent decisions (output)\n delete <thread> GTD: discard\n defer <thread> GTD: postpone\n delegate <t> <peer> GTD: forward\n do <thread> GTD: claim/start\n done <thread> GTD: complete \xE2\x86\x92 archive\n reply <thread> <msg> Append to thread\n send <peer> <msg> Message to peer (or self)\n \n # cn operations (orchestrator)\n sync Fetch inbound + send outbound\n in Queue inbox \xE2\x86\x92 input.md \xE2\x86\x92 wake agent (alias: inbound, process)\n queue [list|clear] View or clear the task queue\n mca [list|add <desc>] Surface MCAs for community pickup\n inbox List inbox threads\n outbox List outbox threads\n next Get next inbox item (with cadence)\n read <thread> Read thread with cadence\n \n # Hub management\n init [name] Create new hub\n status Show hub state\n commit [msg] Stage + commit\n push Push to origin\n save [msg] Commit + push\n peer Manage peers\n doctor Health check\n update Update cn to latest version\n\nAliases:\n i = inbox, o = outbox, s = status, d = doctor\n\nFlags:\n --help, -h Show help\n --version, -V Show version\n --json Machine-readable output\n --quiet, -q Minimal output\n --dry-run Show what would happen\n\nActor Model:\n cn runs on cron (every 5 min). It:\n 1. Syncs peers \xE2\x86\x92 queues new inbox items to state/queue/\n 2. If input.md empty \xE2\x86\x92 pops from queue \xE2\x86\x92 writes input.md \xE2\x86\x92 wakes agent\n Agent reads input.md, processes, deletes when done.\n";
|
|
13601
|
+
var version = "2.2.2";
|
|
13598
13602
|
module2.exports = {
|
|
13599
13603
|
starts_with,
|
|
13600
13604
|
strip_prefix,
|
|
@@ -34194,7 +34198,7 @@ function auto_save(hub_path, name) {
|
|
|
34194
34198
|
console.log(color("33", "\xE2\x9A\xA0 ") + "Auto-commit failed");
|
|
34195
34199
|
}
|
|
34196
34200
|
function run_inbound(hub_path, name) {
|
|
34197
|
-
console.log(color("36", "cn
|
|
34201
|
+
console.log(color("36", "cn in: handling external input..."));
|
|
34198
34202
|
const queued = queue_inbox_items(hub_path);
|
|
34199
34203
|
if (queued > 0) {
|
|
34200
34204
|
console.log(color("36", Curry._1(Stdlib__Printf.sprintf({
|