@jsm-mit/chat-motoko-package 0.7.0 → 0.8.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/README.md +43 -9
- package/dist/actor-base.d.ts +23 -1
- package/dist/actor-base.d.ts.map +1 -1
- package/dist/actor-base.js +38 -10
- package/dist/actors/admin-actor.d.ts +2 -2
- package/dist/actors/admin-actor.d.ts.map +1 -1
- package/dist/actors/admin-actor.js +2 -2
- package/dist/actors/chats-actor.d.ts +2 -2
- package/dist/actors/chats-actor.d.ts.map +1 -1
- package/dist/actors/chats-actor.js +2 -2
- package/dist/actors/messages-actor.d.ts +19 -2
- package/dist/actors/messages-actor.d.ts.map +1 -1
- package/dist/actors/messages-actor.js +23 -2
- package/dist/actors/projects-actor.d.ts +2 -2
- package/dist/actors/projects-actor.d.ts.map +1 -1
- package/dist/actors/projects-actor.js +2 -2
- package/dist/actors/rooms-actor.d.ts +2 -2
- package/dist/actors/rooms-actor.d.ts.map +1 -1
- package/dist/actors/rooms-actor.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -29,6 +29,16 @@ await messages.postAsyncUnsafe({ chatId: chat.id, text: "dodaj usługę strzyże
|
|
|
29
29
|
// own post clears it), `presence[].lastReadSeq` for "read up to here".
|
|
30
30
|
const page = await messages.getMessagesAsyncUnsafe({ chatId: chat.id, sinceSeq: 0 });
|
|
31
31
|
|
|
32
|
+
// A host that sends receipts and typing as a courtesy skips the proof: the call is taken
|
|
33
|
+
// in by the IC, the certified reply is never verified (that check is the expensive part
|
|
34
|
+
// on a small CPU), and a refusal goes unnoticed.
|
|
35
|
+
await messages.markReadUnverifiedAsyncUnsafe(chat.id, page.lastSeq);
|
|
36
|
+
await messages.setTypingUnverifiedAsyncUnsafe(chat.id);
|
|
37
|
+
|
|
38
|
+
// Every actor takes `{ blsVerify }` as a third argument: a faster check of the certified
|
|
39
|
+
// replies than agent-js's pure-JS one, for a host that makes many update calls.
|
|
40
|
+
const fast = new MessagesActor(canisterId, identity, { blsVerify: myVerifier });
|
|
41
|
+
|
|
32
42
|
// An agent host: every new message in every chat this identity is a recipient of, with
|
|
33
43
|
// the room and the customer on each message — route by (projectId, roomId).
|
|
34
44
|
const poller = new ChatPoller(messages, 1000, { onError: console.error });
|
|
@@ -52,11 +62,29 @@ call at a time.
|
|
|
52
62
|
`src/` is browser-safe — the same package serves the agent host and a web panel.
|
|
53
63
|
|
|
54
64
|
Scripts: `build`, `typecheck`, `sync-declarations`, `test-suite`,
|
|
55
|
-
`test-access-restrictions`, `user1` / `user2` (an interactive admin/chat console, one
|
|
65
|
+
`test-access-restrictions`, `test-smoke`, `user1` / `user2` (an interactive admin/chat console, one
|
|
56
66
|
person per terminal: the key comes from `USER1_PEM` / `USER2_PEM` in `.env`; another
|
|
57
|
-
canister: `npm run user2 -- <canister-id>`), `redeploy
|
|
58
|
-
|
|
59
|
-
|
|
67
|
+
canister: `npm run user2 -- <canister-id>`), `redeploy`. See `CLAUDE.md` for who runs what.
|
|
68
|
+
|
|
69
|
+
## Integration tests and redeploys
|
|
70
|
+
|
|
71
|
+
The tests always run on the crafting-table slot `short-living`, the short-lived test canister the
|
|
72
|
+
wrapper packages share. `npm run test-suite` (or `test-access-restrictions`, or `test-smoke` —
|
|
73
|
+
the quick check publishing runs) reinstalls the
|
|
74
|
+
current `../chat-motoko` build into `short-living` with a 3-minute lease
|
|
75
|
+
(`npm run craft:deploy -- short-living --lease 3` there), then runs the suite with `CANISTER_ID` set to `short-living`'s id from
|
|
76
|
+
`~/motoko-crafting-table/canister_ids.json`. No prompt. The crafting table refuses while
|
|
77
|
+
another deploy's lease on `short-living` is active; `npm run test-suite -- --force` takes it anyway.
|
|
78
|
+
No `.env`: every identity is generated per run; setup claims the admin role on the fresh canister.
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
npm run redeploy -- [slot] [reinstall|upgrade] [--force]
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
deploys the current `../chat-motoko` build for sandbox play, without tests and without
|
|
85
|
+
`.env`: `craft:deploy` (reinstall) or `craft:upgrade` in `../chat-motoko`. The slot defaults
|
|
86
|
+
to `backend6`; the mode to `upgrade` where the slot allows it and to `reinstall` on `short-living`.
|
|
87
|
+
After a reinstall claim the admin role yourself in the sandbox — the script prints the command.
|
|
60
88
|
|
|
61
89
|
## Publishing
|
|
62
90
|
|
|
@@ -67,10 +95,16 @@ npm run publish-public
|
|
|
67
95
|
```
|
|
68
96
|
|
|
69
97
|
`scripts/publish-public.sh` refuses unless this repo is on `master` equal to
|
|
70
|
-
`origin/master` with nothing uncommitted but the bump,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
98
|
+
`origin/master` with nothing uncommitted but the bump, the version is not on the registry
|
|
99
|
+
yet, and `../chat-motoko` is on `master`, clean and equal to its `origin/master`. It then
|
|
100
|
+
reinstalls that master into `short-living` (`craft:deploy -- short-living --lease 2`), reads the live
|
|
101
|
+
interface (`dfx canister metadata <short-living> candid:service --ic --identity anonymous`) and
|
|
102
|
+
refuses if it differs from the committed `declarations/chat-motoko-backend/chat-motoko-backend.did`
|
|
103
|
+
(trailing whitespace and newlines aside) — sync the declarations, commit, push, publish
|
|
104
|
+
again. On the same deploy it runs the smoke test (`tests/test-smoke.ts`: setup, one write
|
|
105
|
+
and one read per domain) and refuses if it fails. Next `scripts/stamp-canister-commit.sh` repeats the canister-repo checks, rebuilds
|
|
106
|
+
the canister, regenerates the declarations and refuses if that changes what is committed
|
|
74
107
|
here. Only then it writes `chatMotoko.{repo, repoUrl, commit}` into `package.json` — the
|
|
75
108
|
canister commit this version was generated from — publishes, and commits and pushes
|
|
76
|
-
`Version bump to <version
|
|
109
|
+
`Version bump to <version>` (when there is nothing to commit, it stops there without an
|
|
110
|
+
error). A failed publish takes the stamp back out.
|
package/dist/actor-base.d.ts
CHANGED
|
@@ -13,12 +13,23 @@ export interface LogEntry {
|
|
|
13
13
|
* - An `inspect()`-stage rejection is thrown as `Error("CallRefusedAtInspectionStage")`.
|
|
14
14
|
* - Any other transport failure is thrown as `Error("CriticalCanisterError")`.
|
|
15
15
|
*/
|
|
16
|
+
/** How a certified reply's BLS signature is checked: (publicKey, signature, message). */
|
|
17
|
+
export type BlsVerifyFunction = (pk: Uint8Array, sig: Uint8Array, msg: Uint8Array) => Promise<boolean> | boolean;
|
|
18
|
+
export interface ActorOptions {
|
|
19
|
+
/**
|
|
20
|
+
* Replaces agent-js's own BLS check (pure JavaScript, tens to hundreds of ms per update
|
|
21
|
+
* reply). A host that makes many update calls may hand in a faster one; it carries the
|
|
22
|
+
* whole proof that a reply came from the IC, so it must be exactly as strict.
|
|
23
|
+
*/
|
|
24
|
+
blsVerify?: BlsVerifyFunction;
|
|
25
|
+
}
|
|
16
26
|
export declare class ActorBase {
|
|
17
27
|
protected canisterId: string;
|
|
18
28
|
protected identity?: Identity | undefined;
|
|
29
|
+
protected options: ActorOptions;
|
|
19
30
|
protected actor: ActorSubclass<_SERVICE>;
|
|
20
31
|
protected agent: HttpAgent;
|
|
21
|
-
constructor(canisterId: string, identity?: Identity | undefined);
|
|
32
|
+
constructor(canisterId: string, identity?: Identity | undefined, options?: ActorOptions);
|
|
22
33
|
private initAgentAndActor;
|
|
23
34
|
/**
|
|
24
35
|
* Rebuilds the HttpAgent and the actor from scratch. Long-lived consumers (e.g.
|
|
@@ -36,6 +47,17 @@ export declare class ActorBase {
|
|
|
36
47
|
* getLogs, clearLogs) — only the transport-level error translation applies.
|
|
37
48
|
*/
|
|
38
49
|
protected executeRawAsyncUnsafe<T>(fnAsync: () => Promise<T>): Promise<T>;
|
|
50
|
+
/**
|
|
51
|
+
* Sends an update call and waits until the IC has taken it in — executed it, as a rule —
|
|
52
|
+
* but never reads or verifies the certified reply. For best-effort signals only (read
|
|
53
|
+
* receipts, typing): the caller learns neither the canister's answer nor a business
|
|
54
|
+
* error, and an unverified "done" must never be shown to anyone as a fact.
|
|
55
|
+
*
|
|
56
|
+
* Why it exists: verifying a reply's BLS certificate is pure-JS curve arithmetic —
|
|
57
|
+
* some 30 ms on a desktop core, some 300 ms on a small shared vCPU — and a host that
|
|
58
|
+
* sends two signals per answer spends most of its CPU on proofs nobody reads.
|
|
59
|
+
*/
|
|
60
|
+
protected sendUnverifiedAsyncUnsafe(methodName: keyof _SERVICE & string, args: unknown[]): Promise<void>;
|
|
39
61
|
protected handleResultErrors(errorFromCanister: ErrorFromCanister): {
|
|
40
62
|
errorKey: string;
|
|
41
63
|
errorMessage: any;
|
package/dist/actor-base.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actor-base.d.ts","sourceRoot":"","sources":["../src/actor-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,SAAS,EAAE,KAAK,QAAQ,EAAS,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"actor-base.d.ts","sourceRoot":"","sources":["../src/actor-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,SAAS,EAAE,KAAK,QAAQ,EAAS,MAAM,qBAAqB,CAAC;AAG1F,OAAO,KAAK,EAAE,QAAQ,EAAE,KAAK,IAAI,iBAAiB,EAAE,MAAM,gEAAgE,CAAC;AAG3H,MAAM,WAAW,QAAQ;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;GAQG;AACH,yFAAyF;AACzF,MAAM,MAAM,iBAAiB,GAAG,CAAC,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;AAEjH,MAAM,WAAW,YAAY;IACzB;;;;OAIG;IACH,SAAS,CAAC,EAAE,iBAAiB,CAAC;CACjC;AAED,qBAAa,SAAS;IAIN,SAAS,CAAC,UAAU,EAAE,MAAM;IAAE,SAAS,CAAC,QAAQ,CAAC,EAAE,QAAQ;IAAE,SAAS,CAAC,OAAO,EAAE,YAAY;IAHxG,SAAS,CAAC,KAAK,EAAG,aAAa,CAAC,QAAQ,CAAC,CAAC;IAC1C,SAAS,CAAC,KAAK,EAAG,SAAS,CAAC;gBAEN,UAAU,EAAE,MAAM,EAAY,QAAQ,CAAC,EAAE,QAAQ,YAAA,EAAY,OAAO,GAAE,YAAiB;IAI7G,OAAO,CAAC,iBAAiB;IAYzB;;;;OAIG;IACI,iBAAiB,IAAI,IAAI;cAIhB,0BAA0B,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;QAAE,EAAE,EAAE,CAAC,CAAA;KAAE,GAAG;QAAE,GAAG,EAAE,iBAAiB,CAAA;KAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAmCzH;;;OAGG;cACa,qBAAqB,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAW/E;;;;;;;;;OASG;cACa,yBAAyB,CAAC,UAAU,EAAE,MAAM,QAAQ,GAAG,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAwB9G,SAAS,CAAC,kBAAkB,CAAC,iBAAiB,EAAE,iBAAiB;;;;;IAkBjE,SAAS,CAAC,qBAAqB,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO;IAWpD,SAAS,CAAC,oBAAoB,CAAC,KAAK,EAAE,GAAG,GAAG,QAAQ,EAAE,GAAG,IAAI;CAwBhE"}
|
package/dist/actor-base.js
CHANGED
|
@@ -1,23 +1,17 @@
|
|
|
1
1
|
import { HttpAgent, Actor } from "@icp-sdk/core/agent";
|
|
2
|
+
import { IDL } from "@icp-sdk/core/candid";
|
|
2
3
|
import { idlFactory } from "../declarations/chat-motoko-backend/index.js";
|
|
3
4
|
import { BetterJSON } from "@jsm-mit/utils-package";
|
|
4
|
-
/**
|
|
5
|
-
* Base class for every per-domain actor wrapper (ChatsActor, MessagesActor, …). Builds the
|
|
6
|
-
* HttpAgent + raw candid actor and owns the single choke point that turns the canister's
|
|
7
|
-
* Framework.Result<T> into idiomatic TS:
|
|
8
|
-
* - `{ok: T}` resolves with `T` directly.
|
|
9
|
-
* - `{err: ...}` is thrown as `Error("CanisterError", { cause: {errorKey, errorMessage, logs} })`.
|
|
10
|
-
* - An `inspect()`-stage rejection is thrown as `Error("CallRefusedAtInspectionStage")`.
|
|
11
|
-
* - Any other transport failure is thrown as `Error("CriticalCanisterError")`.
|
|
12
|
-
*/
|
|
13
5
|
export class ActorBase {
|
|
14
6
|
canisterId;
|
|
15
7
|
identity;
|
|
8
|
+
options;
|
|
16
9
|
actor;
|
|
17
10
|
agent;
|
|
18
|
-
constructor(canisterId, identity) {
|
|
11
|
+
constructor(canisterId, identity, options = {}) {
|
|
19
12
|
this.canisterId = canisterId;
|
|
20
13
|
this.identity = identity;
|
|
14
|
+
this.options = options;
|
|
21
15
|
this.initAgentAndActor();
|
|
22
16
|
}
|
|
23
17
|
initAgentAndActor() {
|
|
@@ -28,6 +22,7 @@ export class ActorBase {
|
|
|
28
22
|
this.actor = Actor.createActor(idlFactory, {
|
|
29
23
|
agent: this.agent,
|
|
30
24
|
canisterId: this.canisterId,
|
|
25
|
+
blsVerify: this.options.blsVerify,
|
|
31
26
|
});
|
|
32
27
|
}
|
|
33
28
|
/**
|
|
@@ -84,6 +79,39 @@ export class ActorBase {
|
|
|
84
79
|
throw new Error("CriticalCanisterError", { cause: { logs: null, rawError: err } });
|
|
85
80
|
}
|
|
86
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* Sends an update call and waits until the IC has taken it in — executed it, as a rule —
|
|
84
|
+
* but never reads or verifies the certified reply. For best-effort signals only (read
|
|
85
|
+
* receipts, typing): the caller learns neither the canister's answer nor a business
|
|
86
|
+
* error, and an unverified "done" must never be shown to anyone as a fact.
|
|
87
|
+
*
|
|
88
|
+
* Why it exists: verifying a reply's BLS certificate is pure-JS curve arithmetic —
|
|
89
|
+
* some 30 ms on a desktop core, some 300 ms on a small shared vCPU — and a host that
|
|
90
|
+
* sends two signals per answer spends most of its CPU on proofs nobody reads.
|
|
91
|
+
*/
|
|
92
|
+
async sendUnverifiedAsyncUnsafe(methodName, args) {
|
|
93
|
+
try {
|
|
94
|
+
const method = idlFactory({ IDL })._fields.find(([name]) => name === methodName);
|
|
95
|
+
if (!method)
|
|
96
|
+
throw new Error(`Unknown canister method "${methodName}"`);
|
|
97
|
+
const { response } = await this.agent.call(this.canisterId, {
|
|
98
|
+
methodName,
|
|
99
|
+
arg: IDL.encode(method[1].argTypes, args),
|
|
100
|
+
});
|
|
101
|
+
// A replica that refuses a call without running it (inspect, a stopped canister)
|
|
102
|
+
// says so in the body of an otherwise fine HTTP answer.
|
|
103
|
+
const body = response.body;
|
|
104
|
+
if (body && typeof body === "object" && "reject_message" in body) {
|
|
105
|
+
throw new Error(String(body.reject_message));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
catch (err) {
|
|
109
|
+
if (this.isInspectionRejection(err)) {
|
|
110
|
+
throw new Error("CallRefusedAtInspectionStage", { cause: err });
|
|
111
|
+
}
|
|
112
|
+
throw new Error("CriticalCanisterError", { cause: { logs: null, rawError: err } });
|
|
113
|
+
}
|
|
114
|
+
}
|
|
87
115
|
handleResultErrors(errorFromCanister) {
|
|
88
116
|
const logs = BetterJSON.parse(errorFromCanister.logsJson, false);
|
|
89
117
|
const error = errorFromCanister.details;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type Identity } from "@icp-sdk/core/agent";
|
|
2
|
-
import { ActorBase } from "../actor-base.js";
|
|
2
|
+
import { ActorBase, type ActorOptions } from "../actor-base.js";
|
|
3
3
|
import type { QuotaLimitsView } from "../interfaces.js";
|
|
4
4
|
/** 1:1 wrapper for the canister's AdminController plus the three diagnostics. */
|
|
5
5
|
export declare class AdminActor extends ActorBase {
|
|
6
|
-
constructor(canisterId: string, identity?: Identity);
|
|
6
|
+
constructor(canisterId: string, identity?: Identity, options?: ActorOptions);
|
|
7
7
|
/**
|
|
8
8
|
* Bootstrap: succeeds only while the canister has NO admin at all — the first caller
|
|
9
9
|
* claims the admin role. Once any admin exists this always refuses.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-actor.d.ts","sourceRoot":"","sources":["../../src/actors/admin-actor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"admin-actor.d.ts","sourceRoot":"","sources":["../../src/actors/admin-actor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD,iFAAiF;AACjF,qBAAa,UAAW,SAAQ,SAAS;gBAEzB,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,YAAY;IAI3E;;;;;;;OAOG;IACU,0BAA0B,IAAI,OAAO,CAAC,MAAM,CAAC;IAK1D;;;;;OAKG;IACU,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIrE;;;;;OAKG;IACU,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIxE;;;;;OAKG;IACU,oBAAoB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAKtD;;;;;OAKG;IACH;;;;;OAKG;IACU,yBAAyB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IAKzF;;;;;OAKG;IACU,yBAAyB,IAAI,OAAO,CAAC,eAAe,CAAC;IAKrD,4BAA4B,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAI7E;;;;OAIG;IACU,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC;IAKjD;;;OAGG;IACU,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC;IAIlD;;;;OAIG;IACU,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC;CAGrD"}
|
|
@@ -4,8 +4,8 @@ import { ActorBase } from "../actor-base.js";
|
|
|
4
4
|
import { mapQuotaLimitsView, toCandidQuotaLimits } from "../mappers.js";
|
|
5
5
|
/** 1:1 wrapper for the canister's AdminController plus the three diagnostics. */
|
|
6
6
|
export class AdminActor extends ActorBase {
|
|
7
|
-
constructor(canisterId, identity) {
|
|
8
|
-
super(canisterId, identity);
|
|
7
|
+
constructor(canisterId, identity, options) {
|
|
8
|
+
super(canisterId, identity, options);
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* Bootstrap: succeeds only while the canister has NO admin at all — the first caller
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type Identity } from "@icp-sdk/core/agent";
|
|
2
|
-
import { ActorBase } from "../actor-base.js";
|
|
2
|
+
import { ActorBase, type ActorOptions } from "../actor-base.js";
|
|
3
3
|
import type { ChatSummaryView, ChatView, GetMyChatsInput, ListProjectChatsInput, OpenChatInput } from "../interfaces.js";
|
|
4
4
|
/** 1:1 wrapper for the canister's ChatsController — chats opened from rooms. */
|
|
5
5
|
export declare class ChatsActor extends ActorBase {
|
|
6
|
-
constructor(canisterId: string, identity?: Identity);
|
|
6
|
+
constructor(canisterId: string, identity?: Identity, options?: ActorOptions);
|
|
7
7
|
/**
|
|
8
8
|
* Opens the caller's chat in a room: the caller becomes the `customer`, the room's
|
|
9
9
|
* recipients are copied in, the canister writes the `chatCreated` event. One chat per
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chats-actor.d.ts","sourceRoot":"","sources":["../../src/actors/chats-actor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"chats-actor.d.ts","sourceRoot":"","sources":["../../src/actors/chats-actor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,eAAe,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGzH,gFAAgF;AAChF,qBAAa,UAAW,SAAQ,SAAS;gBAEzB,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,YAAY;IAI3E;;;;;;;;;;OAUG;IACU,mBAAmB,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,QAAQ,CAAC;IAWzE;;;;;OAKG;IACU,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAKlE;;;;;;OAMG;IACU,qBAAqB,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAW/E;;;;;;OAMG;IACU,2BAA2B,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAWlG;;;;;;;OAOG;IACU,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAGtE"}
|
|
@@ -3,8 +3,8 @@ import { ActorBase } from "../actor-base.js";
|
|
|
3
3
|
import { mapChatSummaryView, mapChatView, toOpt, toOptBigInt } from "../mappers.js";
|
|
4
4
|
/** 1:1 wrapper for the canister's ChatsController — chats opened from rooms. */
|
|
5
5
|
export class ChatsActor extends ActorBase {
|
|
6
|
-
constructor(canisterId, identity) {
|
|
7
|
-
super(canisterId, identity);
|
|
6
|
+
constructor(canisterId, identity, options) {
|
|
7
|
+
super(canisterId, identity, options);
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Opens the caller's chat in a room: the caller becomes the `customer`, the room's
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type Identity } from "@icp-sdk/core/agent";
|
|
2
|
-
import { ActorBase } from "../actor-base.js";
|
|
2
|
+
import { ActorBase, type ActorOptions } from "../actor-base.js";
|
|
3
3
|
import type { GetMessagesInput, MessageView, MessagesPageView, PollNewMessagesInput, PollResultView, PostInput } from "../interfaces.js";
|
|
4
4
|
/** 1:1 wrapper for the canister's MessagesController. */
|
|
5
5
|
export declare class MessagesActor extends ActorBase {
|
|
6
|
-
constructor(canisterId: string, identity?: Identity);
|
|
6
|
+
constructor(canisterId: string, identity?: Identity, options?: ActorOptions);
|
|
7
7
|
/**
|
|
8
8
|
* Posts a message as the caller. `text` for any participant; `toolTrace` only for the
|
|
9
9
|
* `agent` role.
|
|
@@ -31,6 +31,23 @@ export declare class MessagesActor extends ActorBase {
|
|
|
31
31
|
* @throws Error with message `CallRefusedAtInspectionStage` when the canister's `inspect` rejects the call before execution.
|
|
32
32
|
*/
|
|
33
33
|
setTypingAsyncUnsafe(chatId: string): Promise<boolean>;
|
|
34
|
+
/**
|
|
35
|
+
* markReadAsyncUnsafe without the proof: resolves once the IC has taken the call in,
|
|
36
|
+
* and never reads or verifies the canister's answer — so a refusal (not a participant,
|
|
37
|
+
* a seq beyond the newest message) goes unnoticed. For a host that sends receipts as a
|
|
38
|
+
* courtesy and would only log a failure anyway; verifying every reply is what costs
|
|
39
|
+
* such a host its CPU.
|
|
40
|
+
* @throws Error with message `CriticalCanisterError` when the call could not be handed to the IC.
|
|
41
|
+
* @throws Error with message `CallRefusedAtInspectionStage` when the canister's `inspect` rejects the call before execution.
|
|
42
|
+
*/
|
|
43
|
+
markReadUnverifiedAsyncUnsafe(chatId: string, seq: number): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* setTypingAsyncUnsafe without the proof — see markReadUnverifiedAsyncUnsafe. Resolves
|
|
46
|
+
* once the IC has taken the call in, so a post sent after it still lands after it.
|
|
47
|
+
* @throws Error with message `CriticalCanisterError` when the call could not be handed to the IC.
|
|
48
|
+
* @throws Error with message `CallRefusedAtInspectionStage` when the canister's `inspect` rejects the call before execution.
|
|
49
|
+
*/
|
|
50
|
+
setTypingUnverifiedAsyncUnsafe(chatId: string): Promise<void>;
|
|
34
51
|
/**
|
|
35
52
|
* A chat's messages with seq > sinceSeq, oldest first (max 200 per call), together
|
|
36
53
|
* with `presence`: who is typing and how far each other participant has read.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages-actor.d.ts","sourceRoot":"","sources":["../../src/actors/messages-actor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"messages-actor.d.ts","sourceRoot":"","sources":["../../src/actors/messages-actor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGzI,yDAAyD;AACzD,qBAAa,aAAc,SAAQ,SAAS;gBAE5B,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,YAAY;IAI3E;;;;;;OAMG;IACU,eAAe,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC;IAWpE,2EAA2E;IAC9D,aAAa,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAQzE;;;;;OAKG;IACU,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI/E;;;;;;;;OAQG;IACU,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAInE;;;;;;;;OAQG;IACU,6BAA6B,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAItF;;;;;OAKG;IACU,8BAA8B,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI1E;;;;;;;OAOG;IACU,sBAAsB,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAWvF;;;;;;;OAOG;IACU,0BAA0B,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,cAAc,CAAC;IAU7F,sFAAsF;IACzE,wBAAwB,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;CAOrG"}
|
|
@@ -3,8 +3,8 @@ import { ActorBase } from "../actor-base.js";
|
|
|
3
3
|
import { mapMessageView, mapMessagesPageView, mapPollResultView, toOptBigInt } from "../mappers.js";
|
|
4
4
|
/** 1:1 wrapper for the canister's MessagesController. */
|
|
5
5
|
export class MessagesActor extends ActorBase {
|
|
6
|
-
constructor(canisterId, identity) {
|
|
7
|
-
super(canisterId, identity);
|
|
6
|
+
constructor(canisterId, identity, options) {
|
|
7
|
+
super(canisterId, identity, options);
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Posts a message as the caller. `text` for any participant; `toolTrace` only for the
|
|
@@ -51,6 +51,27 @@ export class MessagesActor extends ActorBase {
|
|
|
51
51
|
async setTypingAsyncUnsafe(chatId) {
|
|
52
52
|
return this.executeFunctionAsyncUnsafe(() => this.actor.setTyping({ chatId }));
|
|
53
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* markReadAsyncUnsafe without the proof: resolves once the IC has taken the call in,
|
|
56
|
+
* and never reads or verifies the canister's answer — so a refusal (not a participant,
|
|
57
|
+
* a seq beyond the newest message) goes unnoticed. For a host that sends receipts as a
|
|
58
|
+
* courtesy and would only log a failure anyway; verifying every reply is what costs
|
|
59
|
+
* such a host its CPU.
|
|
60
|
+
* @throws Error with message `CriticalCanisterError` when the call could not be handed to the IC.
|
|
61
|
+
* @throws Error with message `CallRefusedAtInspectionStage` when the canister's `inspect` rejects the call before execution.
|
|
62
|
+
*/
|
|
63
|
+
async markReadUnverifiedAsyncUnsafe(chatId, seq) {
|
|
64
|
+
return this.sendUnverifiedAsyncUnsafe("markRead", [{ chatId, seq: BigInt(seq) }]);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* setTypingAsyncUnsafe without the proof — see markReadUnverifiedAsyncUnsafe. Resolves
|
|
68
|
+
* once the IC has taken the call in, so a post sent after it still lands after it.
|
|
69
|
+
* @throws Error with message `CriticalCanisterError` when the call could not be handed to the IC.
|
|
70
|
+
* @throws Error with message `CallRefusedAtInspectionStage` when the canister's `inspect` rejects the call before execution.
|
|
71
|
+
*/
|
|
72
|
+
async setTypingUnverifiedAsyncUnsafe(chatId) {
|
|
73
|
+
return this.sendUnverifiedAsyncUnsafe("setTyping", [{ chatId }]);
|
|
74
|
+
}
|
|
54
75
|
/**
|
|
55
76
|
* A chat's messages with seq > sinceSeq, oldest first (max 200 per call), together
|
|
56
77
|
* with `presence`: who is typing and how far each other participant has read.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type Identity } from "@icp-sdk/core/agent";
|
|
2
|
-
import { ActorBase } from "../actor-base.js";
|
|
2
|
+
import { ActorBase, type ActorOptions } from "../actor-base.js";
|
|
3
3
|
import type { CreateProjectInput, DeletionProgressView, ProjectView, UpdateProjectInput } from "../interfaces.js";
|
|
4
4
|
/** 1:1 wrapper for the canister's ProjectsController — a project is the space of one site
|
|
5
5
|
* or company; its admins define the rooms. */
|
|
6
6
|
export declare class ProjectsActor extends ActorBase {
|
|
7
|
-
constructor(canisterId: string, identity?: Identity);
|
|
7
|
+
constructor(canisterId: string, identity?: Identity, options?: ActorOptions);
|
|
8
8
|
/**
|
|
9
9
|
* Creates a project. Canister admin only.
|
|
10
10
|
* @param input - id (max 50 chars, no '/' or '|'), admins (max 10, no anonymous) and the accounts canister the chat asks `isUser` before a non-admin opens a chat.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects-actor.d.ts","sourceRoot":"","sources":["../../src/actors/projects-actor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"projects-actor.d.ts","sourceRoot":"","sources":["../../src/actors/projects-actor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAIlH;8CAC8C;AAC9C,qBAAa,aAAc,SAAQ,SAAS;gBAE5B,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,YAAY;IAI3E;;;;;;OAMG;IACU,wBAAwB,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC;IAWtF;;;;;;OAMG;IACU,wBAAwB,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC;IAWtF;;;;;;;;;;OAUG;IACU,wBAAwB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,oBAAoB,KAAK,IAAI,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAI1I;;;;;;;;OAQG;IACU,4BAA4B,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAK3F;;;;;OAKG;IACU,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAK3E;;;;;OAKG;IACU,uBAAuB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;CAI/E"}
|
|
@@ -6,8 +6,8 @@ import { deleteUntilFinishedAsyncUnsafe } from "../deletion.js";
|
|
|
6
6
|
/** 1:1 wrapper for the canister's ProjectsController — a project is the space of one site
|
|
7
7
|
* or company; its admins define the rooms. */
|
|
8
8
|
export class ProjectsActor extends ActorBase {
|
|
9
|
-
constructor(canisterId, identity) {
|
|
10
|
-
super(canisterId, identity);
|
|
9
|
+
constructor(canisterId, identity, options) {
|
|
10
|
+
super(canisterId, identity, options);
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Creates a project. Canister admin only.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type Identity } from "@icp-sdk/core/agent";
|
|
2
|
-
import { ActorBase } from "../actor-base.js";
|
|
2
|
+
import { ActorBase, type ActorOptions } from "../actor-base.js";
|
|
3
3
|
import type { CreateRoomInput, DeletionProgressView, ListRoomsInput, RoomRefInput, RoomView, UpdateRoomInput } from "../interfaces.js";
|
|
4
4
|
/** 1:1 wrapper for the canister's RoomsController — a room is the template a chat is
|
|
5
5
|
* opened from: it names who receives the customer's messages. */
|
|
6
6
|
export declare class RoomsActor extends ActorBase {
|
|
7
|
-
constructor(canisterId: string, identity?: Identity);
|
|
7
|
+
constructor(canisterId: string, identity?: Identity, options?: ActorOptions);
|
|
8
8
|
/**
|
|
9
9
|
* Creates a room. Project admins and canister admins.
|
|
10
10
|
* @param input - id (max 50 chars, unique in the project, no '/' or '|'), name (max 100), 1–10 recipients (no anonymous, no duplicates, display names present), and optionally the allowed customers (max 50; empty = every account of the project may open a chat here).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rooms-actor.d.ts","sourceRoot":"","sources":["../../src/actors/rooms-actor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"rooms-actor.d.ts","sourceRoot":"","sources":["../../src/actors/rooms-actor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,cAAc,EAAE,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAIvI;iEACiE;AACjE,qBAAa,UAAW,SAAQ,SAAS;gBAEzB,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,YAAY;IAI3E;;;;;;OAMG;IACU,qBAAqB,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC;IAa7E;;;;;OAKG;IACU,qBAAqB,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC;IAa7E;;;;;;;;;OASG;IACU,qBAAqB,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,oBAAoB,KAAK,IAAI,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAIzI;;;;;;;;OAQG;IACU,yBAAyB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAK1F;;;;;;OAMG;IACU,kBAAkB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,QAAQ,CAAC;IAKvE;;;;;;OAMG;IACU,oBAAoB,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;CAIhF"}
|
|
@@ -6,8 +6,8 @@ import { deleteUntilFinishedAsyncUnsafe } from "../deletion.js";
|
|
|
6
6
|
/** 1:1 wrapper for the canister's RoomsController — a room is the template a chat is
|
|
7
7
|
* opened from: it names who receives the customer's messages. */
|
|
8
8
|
export class RoomsActor extends ActorBase {
|
|
9
|
-
constructor(canisterId, identity) {
|
|
10
|
-
super(canisterId, identity);
|
|
9
|
+
constructor(canisterId, identity, options) {
|
|
10
|
+
super(canisterId, identity, options);
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Creates a room. Project admins and canister admins.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ActorBase, type LogEntry } from "./actor-base.js";
|
|
1
|
+
export { ActorBase, type LogEntry, type ActorOptions, type BlsVerifyFunction } from "./actor-base.js";
|
|
2
2
|
export { AdminActor } from "./actors/admin-actor.js";
|
|
3
3
|
export { ProjectsActor } from "./actors/projects-actor.js";
|
|
4
4
|
export { RoomsActor } from "./actors/rooms-actor.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,QAAQ,EAAE,KAAK,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACtG,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACtE,YAAY,EACR,QAAQ,EACR,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,QAAQ,EACR,eAAe,EACf,QAAQ,EACR,eAAe,EACf,eAAe,EACf,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,YAAY,EACZ,cAAc,EACd,aAAa,EACb,eAAe,EACf,qBAAqB,EACrB,SAAS,EACT,gBAAgB,EAChB,oBAAoB,GACvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACH,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,WAAW,EACX,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,GACxB,MAAM,cAAc,CAAC;AACtB,YAAY,EACR,IAAI,EACJ,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,OAAO,EACP,WAAW,EACX,YAAY,EACZ,WAAW,EACX,UAAU,EACV,OAAO,EACP,SAAS,EACT,WAAW,EACX,SAAS,EACT,aAAa,EACb,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,WAAW,EACX,KAAK,IAAI,kBAAkB,EAC3B,YAAY,GACf,MAAM,gEAAgE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsm-mit/chat-motoko-package",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Wrapper TypeScript package for the chat-motoko canister: projects, multi-party chats, messages and a poller for agent hosts.",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "",
|
|
@@ -25,8 +25,9 @@
|
|
|
25
25
|
"publish-public": "bash scripts/publish-public.sh",
|
|
26
26
|
"typecheck": "tsc --noEmit -p tsconfig.tests.json",
|
|
27
27
|
"sync-declarations": "bash scripts/sync-declarations.sh",
|
|
28
|
-
"test-suite": "bash scripts/run-tests.sh tests/test-suite.ts",
|
|
29
|
-
"test-access-restrictions": "bash scripts/run-tests.sh tests/test-access-restrictions.ts",
|
|
28
|
+
"test-suite": "bash scripts/run-tests.sh tests/test-suite.ts --lease 3",
|
|
29
|
+
"test-access-restrictions": "bash scripts/run-tests.sh tests/test-access-restrictions.ts --lease 3",
|
|
30
|
+
"test-smoke": "bash scripts/run-tests.sh tests/test-smoke.ts --lease 3",
|
|
30
31
|
"redeploy": "bash scripts/redeploy.sh",
|
|
31
32
|
"user1": "npx tsx sandbox/main.ts USER1",
|
|
32
33
|
"user2": "npx tsx sandbox/main.ts USER2",
|
|
@@ -58,6 +59,6 @@
|
|
|
58
59
|
"chatMotoko": {
|
|
59
60
|
"repo": "chat-motoko",
|
|
60
61
|
"repoUrl": "https://github.com/JSM-Chat-Platform/chat-motoko",
|
|
61
|
-
"commit": "
|
|
62
|
+
"commit": "3eb9151a19246ce208faea2ac90832d8d2281950"
|
|
62
63
|
}
|
|
63
64
|
}
|