commonswarm 0.1.17 → 0.1.19

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 (3) hide show
  1. package/README.md +4 -4
  2. package/cswarm.cjs +21 -10
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -1,11 +1,11 @@
1
- # cswarm
1
+ # commonswarm
2
2
 
3
3
  The CommonSwarm CLI. CommonSwarm is a coordination service for teams where people and AI
4
4
  agents work side by side: agents post short, immutable *signals* of intent ("I'm about to
5
5
  refactor auth") so collaborators don't step on each other.
6
6
 
7
7
  ```sh
8
- npm install -g cswarm
8
+ npm install -g commonswarm
9
9
  cswarm --help
10
10
  ```
11
11
 
@@ -20,8 +20,8 @@ able to reach the service — ask whoever controls the environment's egress allo
20
20
  permit:
21
21
 
22
22
  - `commonswarm.com` (target discovery and the web app)
23
- - your deployment's API host (shown by `cswarm target show`; for the hosted free tier
24
- this is a `*.supabase.co` URL until it moves under `commonswarm.com`)
23
+ - `api.commonswarm.com` — the hosted service's API host, a subdomain of the same
24
+ domain (a self-hosted deployment's host is shown by `cswarm target show`)
25
25
 
26
26
  If those are blocked you can install but not connect.
27
27
 
package/cswarm.cjs CHANGED
@@ -21409,7 +21409,7 @@ function cloudTarget(url, anonKey) {
21409
21409
  throw new Error(
21410
21410
  /* Not "who invited you" — self-serve signup is live and that reader has no inviter.
21411
21411
  * See D-067 and the matching wording in current-target.ts. */
21412
- "--url is required: use the Supabase project base URL (https://<ref>.supabase.co) from whoever runs this deployment, or from your own project's API settings if you created it, or start with cswarm accept --link-stdin because invite links carry the Cloud target; if you already have a project, pass --url and --anon-key or set SWARM_CLOUD_URL and SWARM_CLOUD_ANON_KEY."
21412
+ "--url is required: the hosted CommonSwarm service is https://api.commonswarm.com; a self-hosted deployment uses its Supabase project base URL (https://<ref>.supabase.co) from whoever runs it, or from your own project's API settings if you created it. Or start with cswarm accept --link-stdin because invite links carry the Cloud target; scripts and CI may pass --url and --anon-key or set SWARM_CLOUD_URL and SWARM_CLOUD_ANON_KEY."
21413
21413
  );
21414
21414
  }
21415
21415
  const parsed = new URL(url);
@@ -22105,7 +22105,7 @@ registerUpcaster("TaskCreated", 0, (p) => ({ task_id: p.id, slug: p.name }));
22105
22105
  // src/protocol/workspace-commands.ts
22106
22106
  var INVITATION_MAX_TTL_MS = 7 * 24 * 60 * 60 * 1e3;
22107
22107
  var AGENT_TOKEN_DEFAULT_TTL_MS = 60 * 60 * 1e3;
22108
- var AGENT_TOKEN_MAX_TTL_MS = 8 * 60 * 60 * 1e3;
22108
+ var AGENT_TOKEN_MAX_TTL_MS = 24 * 60 * 60 * 1e3;
22109
22109
  var RENEWAL_HORIZON_DEFAULT_MS = 30 * 24 * 60 * 60 * 1e3;
22110
22110
  var RENEWAL_HORIZON_MAX_MS = 90 * 24 * 60 * 60 * 1e3;
22111
22111
 
@@ -23368,7 +23368,12 @@ function missingTargetError(mode3) {
23368
23368
  * their own workspace has no such person and the sentence sends them to nobody. Same family
23369
23369
  * as the 3-project cap telling the account holder to ask an operator who is themselves —
23370
23370
  * instruction text written for a different reader than the one receiving it. See D-067. */
23371
- "no Cloud target is selected: start with cswarm accept --link-stdin because invite links carry the Cloud target and save its Supabase project base URL, or run cswarm target set --url https://<ref>.supabase.co --anon-key <key> using values from whoever runs this deployment, or from your own project's API settings if you created it; scripts and CI may instead pass --url and --anon-key or set SWARM_CLOUD_URL and SWARM_CLOUD_ANON_KEY"
23371
+ /* The hosted reader must be able to FINISH the target-set command, not just start it: the
23372
+ * inversion arm on this change showed every listed route was closed for the self-serve
23373
+ * hosted reader because <key> named no source. The anon key is public (RLS-protected) and
23374
+ * published in the meta tags of https://commonswarm.com/start — say so. Same F-1/D-067
23375
+ * family: a route you cannot complete is not a route. */
23376
+ "no Cloud target is selected: most commands discover the hosted target from https://commonswarm.com automatically, so seeing this usually means that fetch failed \u2014 check network or your egress allowlist. Otherwise start with cswarm accept --link-stdin because invite links carry the Cloud target and save its Supabase project base URL, or run cswarm target set --url https://api.commonswarm.com --anon-key <key> for the hosted service \u2014 the anon key is public, in the meta tags at https://commonswarm.com/start (a self-hosted deployment uses its https://<ref>.supabase.co URL from whoever runs it, or from your own project's API settings if you created it); scripts and CI may instead pass --url and --anon-key or set SWARM_CLOUD_URL and SWARM_CLOUD_ANON_KEY"
23372
23377
  );
23373
23378
  }
23374
23379
  function missingAnonKeyError(mode3, mismatchedStoredTarget) {
@@ -26599,7 +26604,10 @@ var CURRENT_INVITE_SCHEME = "cswarm://accept/";
26599
26604
  var RETIRED_INVITE_SCHEME = "coswarm://accept/";
26600
26605
  var INVITE_WRAPPER_ERROR = "invite link wrapper is not recognized; use https://commonswarm.com/invite#invite=<payload> or cswarm://accept/<payload>";
26601
26606
  var ACCEPT_INPUT_ERROR = "accept input was not recognized; use an https://...#invite=<payload> link, cswarm://accept/<payload>, or a swm_inv_ invitation capability";
26602
- var PRODUCTION_CLOUD_ORIGIN = "https://ukezjcnxjvkpkeezxaew.supabase.co";
26607
+ var PRODUCTION_CLOUD_ORIGINS = /* @__PURE__ */ new Set([
26608
+ "https://api.commonswarm.com",
26609
+ "https://ukezjcnxjvkpkeezxaew.supabase.co"
26610
+ ]);
26603
26611
  function exactKeys(value, required, optional = []) {
26604
26612
  const allowed = /* @__PURE__ */ new Set([...required, ...optional]);
26605
26613
  return required.every((key2) => Object.hasOwn(value, key2)) && Object.keys(value).every((key2) => allowed.has(key2));
@@ -26759,7 +26767,7 @@ function equalExact(actual, expected) {
26759
26767
  return equal && left.length === right.length;
26760
26768
  }
26761
26769
  async function requirePinnedOrigin(target2, options) {
26762
- if (target2.url === PRODUCTION_CLOUD_ORIGIN || loopback(target2)) return;
26770
+ if (PRODUCTION_CLOUD_ORIGINS.has(target2.url) || loopback(target2)) return;
26763
26771
  if (options.interactive && devOrigins(options.devAllowedOrigins).has(target2.url)) {
26764
26772
  return;
26765
26773
  }
@@ -29917,7 +29925,10 @@ var AcpHostSession = class _AcpHostSession {
29917
29925
  },
29918
29926
  clientInfo: {
29919
29927
  name: clientName ?? "cswarm-host",
29920
- version: clientVersion ?? "0.1.4"
29928
+ /* "0.0.0" and not a real release number: this fallback only fires when a caller
29929
+ * passes no version, and a hardcoded one here silently rots (it read "0.1.4"
29930
+ * thirteen releases later). Callers that know the build version pass it. */
29931
+ version: clientVersion ?? "0.0.0"
29921
29932
  }
29922
29933
  },
29923
29934
  this.requestTimeoutMs
@@ -36326,8 +36337,8 @@ var ACCEPTED_AGENT_CREDENTIAL_MESSAGES = [
36326
36337
  AGENT_CREDENTIAL_MESSAGE_D088
36327
36338
  ];
36328
36339
  function packageVersion() {
36329
- if ("0.1.17".length > 0) {
36330
- return "0.1.17";
36340
+ if ("0.1.19".length > 0) {
36341
+ return "0.1.19";
36331
36342
  }
36332
36343
  try {
36333
36344
  const value = JSON.parse(
@@ -36882,7 +36893,7 @@ async function runTarget(args) {
36882
36893
  }
36883
36894
  if (saved === null) {
36884
36895
  process.stdout.write(
36885
- "No current Cloud target is saved. Start with cswarm accept --link-stdin, or run cswarm target set --url <project-url> --anon-key <key>.\n"
36896
+ "No current Cloud target is saved. Start with cswarm accept --link-stdin, or run cswarm target set --url https://api.commonswarm.com --anon-key <key> for the hosted service (the anon key is public, in the meta tags at https://commonswarm.com/start); a self-hosted deployment uses its own URL and key.\n"
36886
36897
  );
36887
36898
  return;
36888
36899
  }
@@ -37431,7 +37442,7 @@ async function runToken(args) {
37431
37442
  ...ttl === void 0 ? {} : {
37432
37443
  ttl_ms: integer2(args, "ttl-ms", {
37433
37444
  minimum: 1,
37434
- maximum: 288e5
37445
+ maximum: 864e5
37435
37446
  })
37436
37447
  }
37437
37448
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "commonswarm",
3
- "version": "0.1.17",
4
- "description": "CommonSwarm CLI \u2014 coordination for teams where people and AI agents work side by side.",
3
+ "version": "0.1.19",
4
+ "description": "CommonSwarm CLI coordination for teams where people and AI agents work side by side.",
5
5
  "bin": {
6
6
  "cswarm": "cswarm.cjs"
7
7
  },
@@ -24,4 +24,4 @@
24
24
  "commonswarm",
25
25
  "swarm"
26
26
  ]
27
- }
27
+ }