@cotal-ai/pi 0.28.0-hack-20260823210619 → 0.28.0
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/dist/index.js +2 -2
- package/dist/standalone.js +7 -5
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -89,7 +89,7 @@ function configFromEnv(env = process.env) {
|
|
|
89
89
|
if (!name)
|
|
90
90
|
throw new Error("COTAL_NAME, COTAL_AGENT_FILE or COTAL_LINK is required \u2014 a Cotal session needs an explicit identity from its launcher");
|
|
91
91
|
const subscribe = splitList(env.COTAL_SUBSCRIBE);
|
|
92
|
-
const resolvedSubscribe = subscribe.length ? subscribe : def?.subscribe ?? link?.channels ?? [
|
|
92
|
+
const resolvedSubscribe = subscribe.length ? subscribe : def?.subscribe ?? link?.channels ?? [];
|
|
93
93
|
const allowSub = splitList(env.COTAL_ALLOW_SUBSCRIBE);
|
|
94
94
|
const resolvedAllowSub = allowSub.length ? allowSub : def?.allowSubscribe ?? resolvedSubscribe;
|
|
95
95
|
for (const ch of resolvedSubscribe)
|
|
@@ -15963,7 +15963,7 @@ import { isConcreteChannel as isConcreteChannel3, channelInAllow as channelInAll
|
|
|
15963
15963
|
|
|
15964
15964
|
// ../connector-core/dist/docs-bundle.generated.js
|
|
15965
15965
|
var DOCS_BUNDLE = {
|
|
15966
|
-
"version": "0.
|
|
15966
|
+
"version": "0.28.0",
|
|
15967
15967
|
"generatedFrom": "docs/*.md + SPEC.md + spec/cotal-lang.md + spec/cotal.schema.json",
|
|
15968
15968
|
"pages": [
|
|
15969
15969
|
{
|
package/dist/standalone.js
CHANGED
|
@@ -36082,7 +36082,7 @@ function loadAgentFile(path) {
|
|
|
36082
36082
|
} catch (e) {
|
|
36083
36083
|
throw new Error(`agent file ${path}: ${e.message}`);
|
|
36084
36084
|
}
|
|
36085
|
-
const effSubscribe = subscribe
|
|
36085
|
+
const effSubscribe = subscribe ?? [];
|
|
36086
36086
|
const effAllow = allowSubscribe?.length ? allowSubscribe : effSubscribe;
|
|
36087
36087
|
for (const ch of effSubscribe)
|
|
36088
36088
|
if (!channelInAllow(effAllow, ch))
|
|
@@ -36562,7 +36562,7 @@ var CotalEndpoint = class _CotalEndpoint extends EventEmitter {
|
|
|
36562
36562
|
this.user = opts.user;
|
|
36563
36563
|
this.pass = opts.pass;
|
|
36564
36564
|
this.tls = opts.tls ?? false;
|
|
36565
|
-
this.channels = opts.channels ?? [
|
|
36565
|
+
this.channels = opts.channels ?? [];
|
|
36566
36566
|
this.heartbeatMs = opts.heartbeatMs ?? 2e3;
|
|
36567
36567
|
this.ttlMs = opts.ttlMs ?? 6e3;
|
|
36568
36568
|
this.doRegister = opts.registerPresence ?? true;
|
|
@@ -37089,7 +37089,9 @@ var CotalEndpoint = class _CotalEndpoint extends EventEmitter {
|
|
|
37089
37089
|
// ---- messaging -----------------------------------------------------------
|
|
37090
37090
|
/** Multicast: broadcast to everyone on a channel. */
|
|
37091
37091
|
async multicast(text, opts) {
|
|
37092
|
-
const channel = opts?.channel ?? this.channels.find(isConcreteChannel)
|
|
37092
|
+
const channel = opts?.channel ?? this.channels.find(isConcreteChannel);
|
|
37093
|
+
if (!channel)
|
|
37094
|
+
throw new Error("send() needs a channel: this endpoint is on no concrete channel, so there is no default to fall back to - pass opts.channel");
|
|
37093
37095
|
if (!isConcreteChannel(channel))
|
|
37094
37096
|
throw new Error(`cannot publish to wildcard channel "${channel}" - pick a concrete sub-channel`);
|
|
37095
37097
|
const msg = {
|
|
@@ -40159,7 +40161,7 @@ function configFromEnv(env = process.env) {
|
|
|
40159
40161
|
if (!name)
|
|
40160
40162
|
throw new Error("COTAL_NAME, COTAL_AGENT_FILE or COTAL_LINK is required \u2014 a Cotal session needs an explicit identity from its launcher");
|
|
40161
40163
|
const subscribe = splitList(env.COTAL_SUBSCRIBE);
|
|
40162
|
-
const resolvedSubscribe = subscribe.length ? subscribe : def?.subscribe ?? link?.channels ?? [
|
|
40164
|
+
const resolvedSubscribe = subscribe.length ? subscribe : def?.subscribe ?? link?.channels ?? [];
|
|
40163
40165
|
const allowSub = splitList(env.COTAL_ALLOW_SUBSCRIBE);
|
|
40164
40166
|
const resolvedAllowSub = allowSub.length ? allowSub : def?.allowSubscribe ?? resolvedSubscribe;
|
|
40165
40167
|
for (const ch of resolvedSubscribe)
|
|
@@ -55865,7 +55867,7 @@ config(en_default());
|
|
|
55865
55867
|
|
|
55866
55868
|
// ../connector-core/dist/docs-bundle.generated.js
|
|
55867
55869
|
var DOCS_BUNDLE = {
|
|
55868
|
-
"version": "0.
|
|
55870
|
+
"version": "0.28.0",
|
|
55869
55871
|
"generatedFrom": "docs/*.md + SPEC.md + spec/cotal-lang.md + spec/cotal.schema.json",
|
|
55870
55872
|
"pages": [
|
|
55871
55873
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cotal-ai/pi",
|
|
3
|
-
"version": "0.28.0
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"node": ">=20"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@cotal-ai/core": "0.
|
|
27
|
+
"@cotal-ai/core": ">=0.1.0",
|
|
28
28
|
"@earendil-works/pi-tui": ">=0.79.10"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"esbuild": "^0.28.0",
|
|
35
35
|
"typebox": "^1.1.0",
|
|
36
36
|
"zod": "^4.4.3",
|
|
37
|
-
"@cotal-ai/core": "0.28.0
|
|
38
|
-
"@cotal-ai/
|
|
37
|
+
"@cotal-ai/connector-core": "0.28.0",
|
|
38
|
+
"@cotal-ai/core": "0.28.0"
|
|
39
39
|
},
|
|
40
40
|
"files": [
|
|
41
41
|
"dist"
|