cnagent 2.1.15 → 2.1.16

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/tools/dist/cn.js +30 -30
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnagent",
3
- "version": "2.1.15",
3
+ "version": "2.1.16",
4
4
  "description": "Coherent Network agent CLI — everything runs through cn",
5
5
  "keywords": [
6
6
  "cn-agent",
package/tools/dist/cn.js CHANGED
@@ -11910,25 +11910,25 @@ var require_cn_lib = __commonJS({
11910
11910
  }
11911
11911
  function string_of_agent_op(id) {
11912
11912
  switch (id.TAG) {
11913
- case /* OpAck */
11913
+ case /* Ack */
11914
11914
  0:
11915
11915
  return "ack:" + id._0;
11916
- case /* OpDone */
11916
+ case /* Done */
11917
11917
  1:
11918
11918
  return "done:" + id._0;
11919
- case /* OpFail */
11919
+ case /* Fail */
11920
11920
  2:
11921
11921
  return "fail:" + (id._0 + (" reason:" + id._1));
11922
- case /* OpReply */
11922
+ case /* Reply */
11923
11923
  3:
11924
11924
  return "reply:" + id._0;
11925
- case /* OpSend */
11925
+ case /* Send */
11926
11926
  4:
11927
11927
  return "send:" + id._0;
11928
- case /* OpDelegate */
11928
+ case /* Delegate */
11929
11929
  5:
11930
11930
  return "delegate:" + (id._0 + (" to:" + id._1));
11931
- case /* OpDefer */
11931
+ case /* Defer */
11932
11932
  6:
11933
11933
  const until = id._1;
11934
11934
  const id$1 = id._0;
@@ -11937,10 +11937,10 @@ var require_cn_lib = __commonJS({
11937
11937
  } else {
11938
11938
  return "defer:" + id$1;
11939
11939
  }
11940
- case /* OpDelete */
11940
+ case /* Delete */
11941
11941
  7:
11942
11942
  return "delete:" + id._0;
11943
- case /* OpSurface */
11943
+ case /* Surface */
11944
11944
  8:
11945
11945
  return "surface:" + id._0;
11946
11946
  }
@@ -11950,7 +11950,7 @@ var require_cn_lib = __commonJS({
11950
11950
  case "ack":
11951
11951
  return {
11952
11952
  TAG: (
11953
- /* OpAck */
11953
+ /* Ack */
11954
11954
  0
11955
11955
  ),
11956
11956
  _0: value
@@ -11964,7 +11964,7 @@ var require_cn_lib = __commonJS({
11964
11964
  if (i !== void 0) {
11965
11965
  return {
11966
11966
  TAG: (
11967
- /* OpDefer */
11967
+ /* Defer */
11968
11968
  6
11969
11969
  ),
11970
11970
  _0: Stdlib__String2.sub(value, 0, i),
@@ -11973,7 +11973,7 @@ var require_cn_lib = __commonJS({
11973
11973
  } else {
11974
11974
  return {
11975
11975
  TAG: (
11976
- /* OpDefer */
11976
+ /* Defer */
11977
11977
  6
11978
11978
  ),
11979
11979
  _0: value,
@@ -11989,7 +11989,7 @@ var require_cn_lib = __commonJS({
11989
11989
  if (i$1 !== void 0) {
11990
11990
  return {
11991
11991
  TAG: (
11992
- /* OpDelegate */
11992
+ /* Delegate */
11993
11993
  5
11994
11994
  ),
11995
11995
  _0: Stdlib__String2.sub(value, 0, i$1),
@@ -12001,7 +12001,7 @@ var require_cn_lib = __commonJS({
12001
12001
  case "delete":
12002
12002
  return {
12003
12003
  TAG: (
12004
- /* OpDelete */
12004
+ /* Delete */
12005
12005
  7
12006
12006
  ),
12007
12007
  _0: value
@@ -12009,7 +12009,7 @@ var require_cn_lib = __commonJS({
12009
12009
  case "done":
12010
12010
  return {
12011
12011
  TAG: (
12012
- /* OpDone */
12012
+ /* Done */
12013
12013
  1
12014
12014
  ),
12015
12015
  _0: value
@@ -12023,7 +12023,7 @@ var require_cn_lib = __commonJS({
12023
12023
  if (i$2 !== void 0) {
12024
12024
  return {
12025
12025
  TAG: (
12026
- /* OpFail */
12026
+ /* Fail */
12027
12027
  2
12028
12028
  ),
12029
12029
  _0: Stdlib__String2.sub(value, 0, i$2),
@@ -12032,7 +12032,7 @@ var require_cn_lib = __commonJS({
12032
12032
  } else {
12033
12033
  return {
12034
12034
  TAG: (
12035
- /* OpFail */
12035
+ /* Fail */
12036
12036
  2
12037
12037
  ),
12038
12038
  _0: value,
@@ -12048,7 +12048,7 @@ var require_cn_lib = __commonJS({
12048
12048
  if (i$3 !== void 0) {
12049
12049
  return {
12050
12050
  TAG: (
12051
- /* OpReply */
12051
+ /* Reply */
12052
12052
  3
12053
12053
  ),
12054
12054
  _0: Stdlib__String2.sub(value, 0, i$3),
@@ -12066,7 +12066,7 @@ var require_cn_lib = __commonJS({
12066
12066
  if (i$4 !== void 0) {
12067
12067
  return {
12068
12068
  TAG: (
12069
- /* OpSend */
12069
+ /* Send */
12070
12070
  4
12071
12071
  ),
12072
12072
  _0: Stdlib__String2.sub(value, 0, i$4),
@@ -12079,7 +12079,7 @@ var require_cn_lib = __commonJS({
12079
12079
  case "surface":
12080
12080
  return {
12081
12081
  TAG: (
12082
- /* OpSurface */
12082
+ /* Surface */
12083
12083
  8
12084
12084
  ),
12085
12085
  _0: value
@@ -13260,7 +13260,7 @@ var require_cn_lib = __commonJS({
13260
13260
  );
13261
13261
  }
13262
13262
  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 process Queue inbox \xE2\x86\x92 input.md \xE2\x86\x92 wake agent\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";
13263
- var version = "2.1.15";
13263
+ var version = "2.1.16";
13264
13264
  module2.exports = {
13265
13265
  starts_with,
13266
13266
  strip_prefix,
@@ -29948,7 +29948,7 @@ function mca_dir(hub_path) {
29948
29948
  }
29949
29949
  function execute_op(hub_path, name, input_id, op) {
29950
29950
  switch (op.TAG) {
29951
- case /* OpAck */
29951
+ case /* Ack */
29952
29952
  0:
29953
29953
  log_action(hub_path, "op.ack", input_id);
29954
29954
  const msg = Curry._1(Stdlib__Printf.sprintf({
@@ -29981,7 +29981,7 @@ function execute_op(hub_path, name, input_id, op) {
29981
29981
  }), input_id);
29982
29982
  console.log(color("32", "\xE2\x9C\x93 ") + msg);
29983
29983
  return;
29984
- case /* OpDone */
29984
+ case /* Done */
29985
29985
  1:
29986
29986
  const id = op._0;
29987
29987
  log_action(hub_path, "op.done", id);
@@ -30015,7 +30015,7 @@ function execute_op(hub_path, name, input_id, op) {
30015
30015
  }), id);
30016
30016
  console.log(color("32", "\xE2\x9C\x93 ") + msg$1);
30017
30017
  return;
30018
- case /* OpFail */
30018
+ case /* Fail */
30019
30019
  2:
30020
30020
  const reason = op._1;
30021
30021
  const id$1 = op._0;
@@ -30111,7 +30111,7 @@ function execute_op(hub_path, name, input_id, op) {
30111
30111
  }), id$1, reason);
30112
30112
  console.log(color("33", "\xE2\x9A\xA0 ") + msg$2);
30113
30113
  return;
30114
- case /* OpReply */
30114
+ case /* Reply */
30115
30115
  3:
30116
30116
  const id$2 = op._0;
30117
30117
  const path = find_thread(hub_path, id$2);
@@ -30286,7 +30286,7 @@ function execute_op(hub_path, name, input_id, op) {
30286
30286
  }), id$2);
30287
30287
  console.log(color("33", "\xE2\x9A\xA0 ") + msg$4);
30288
30288
  return;
30289
- case /* OpSend */
30289
+ case /* Send */
30290
30290
  4:
30291
30291
  const msg$5 = op._1;
30292
30292
  const peer = op._0;
@@ -30483,7 +30483,7 @@ function execute_op(hub_path, name, input_id, op) {
30483
30483
  }), peer);
30484
30484
  console.log(color("32", "\xE2\x9C\x93 ") + msg$6);
30485
30485
  return;
30486
- case /* OpDelegate */
30486
+ case /* Delegate */
30487
30487
  5:
30488
30488
  const peer$1 = op._1;
30489
30489
  const id$3 = op._0;
@@ -30633,7 +30633,7 @@ function execute_op(hub_path, name, input_id, op) {
30633
30633
  }), id$3);
30634
30634
  console.log(color("33", "\xE2\x9A\xA0 ") + msg$8);
30635
30635
  return;
30636
- case /* OpDefer */
30636
+ case /* Defer */
30637
30637
  6:
30638
30638
  const id$4 = op._0;
30639
30639
  const path$2 = find_thread(hub_path, id$4);
@@ -30760,7 +30760,7 @@ function execute_op(hub_path, name, input_id, op) {
30760
30760
  }), id$4);
30761
30761
  console.log(color("33", "\xE2\x9A\xA0 ") + msg$10);
30762
30762
  return;
30763
- case /* OpDelete */
30763
+ case /* Delete */
30764
30764
  7:
30765
30765
  const id$5 = op._0;
30766
30766
  const path$3 = find_thread(hub_path, id$5);
@@ -30855,7 +30855,7 @@ function execute_op(hub_path, name, input_id, op) {
30855
30855
  _1: "Thread already gone: %s"
30856
30856
  }), id$5)));
30857
30857
  return;
30858
- case /* OpSurface */
30858
+ case /* Surface */
30859
30859
  8:
30860
30860
  const desc = op._0;
30861
30861
  const dir = Path.join(hub_path, "state/mca");