@ai-ecoverse/slicc-spectrum 2.3.1 → 2.4.1
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 +33 -6
- package/dist/{chunk-47KEBIYA.js → chunk-AIE26XNA.js} +12 -2
- package/dist/chunk-AIE26XNA.js.map +7 -0
- package/dist/slicc-dummy.js +113 -1
- package/dist/slicc-dummy.js.map +4 -4
- package/dist/slicc-kernel-model.js +1 -1
- package/dist/slicc-ui.js +541 -242
- package/dist/slicc-ui.js.map +4 -4
- package/dist/types/app/approvals.d.ts +8 -2
- package/dist/types/app/chat.d.ts +1 -0
- package/dist/types/app/command.d.ts +18 -9
- package/dist/types/app/live.d.ts +29 -0
- package/dist/types/app/messages.d.ts +2 -3
- package/dist/types/app/names.d.ts +2 -0
- package/dist/types/dummy/approvals.d.ts +1 -1
- package/dist/types/dummy/index.d.ts +6 -1
- package/dist/types/dummy/live.d.ts +23 -0
- package/dist/types/dummy.d.ts +2 -0
- package/dist/types/model/types.d.ts +74 -1
- package/dist/types/ui.d.ts +2 -1
- package/package.json +3 -3
- package/dist/chunk-47KEBIYA.js.map +0 -7
package/dist/slicc-dummy.js
CHANGED
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
skillEdit,
|
|
30
30
|
tabs,
|
|
31
31
|
terminals
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-AIE26XNA.js";
|
|
33
33
|
import {
|
|
34
34
|
Emitter
|
|
35
35
|
} from "./chunk-T5NHW4KC.js";
|
|
@@ -303,7 +303,48 @@ function levelFixture(scenario, now2) {
|
|
|
303
303
|
verdictError: "The check didn\u2019t answer in time."
|
|
304
304
|
};
|
|
305
305
|
}
|
|
306
|
+
function captureFixtures(scenario, now2) {
|
|
307
|
+
const base = { createdAt: now2, expiresAt: now2 + 5 * minutes };
|
|
308
|
+
if (scenario === "capture")
|
|
309
|
+
return [
|
|
310
|
+
{
|
|
311
|
+
...base,
|
|
312
|
+
id: "capture-screen",
|
|
313
|
+
kind: "capture",
|
|
314
|
+
requester: mara,
|
|
315
|
+
agentId: "cone-sliccy",
|
|
316
|
+
agentName: "sliccy",
|
|
317
|
+
detail: { what: "screen", mode: "video", seconds: 10, microphone: true, program: "media" },
|
|
318
|
+
always: false,
|
|
319
|
+
verdict: {
|
|
320
|
+
level: 2,
|
|
321
|
+
aligned: true,
|
|
322
|
+
reason: "It records the screen and the microphone, which the guest asked for."
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
];
|
|
326
|
+
return [
|
|
327
|
+
{
|
|
328
|
+
...base,
|
|
329
|
+
id: "click-share",
|
|
330
|
+
kind: "click",
|
|
331
|
+
subject: "capture",
|
|
332
|
+
what: "screen",
|
|
333
|
+
program: "media",
|
|
334
|
+
requester: { kind: "agent", name: "sliccy", agentId: "cone-sliccy" },
|
|
335
|
+
title: "Share your screen?",
|
|
336
|
+
body: "media wants to record your screen for sliccy. Choose a screen, window or tab in Chrome\u2019s picker.",
|
|
337
|
+
action: "Choose what to share",
|
|
338
|
+
here: scenario === "click",
|
|
339
|
+
...scenario === "click" ? {} : { device: { id: "device-studio", name: "Studio Mac" } }
|
|
340
|
+
}
|
|
341
|
+
];
|
|
342
|
+
}
|
|
306
343
|
function approvalFixtures(scenario, now2 = Date.now()) {
|
|
344
|
+
if (scenario.startsWith("click") || scenario === "capture") return captureFixtures(scenario, now2);
|
|
345
|
+
return sudoFixtures(scenario, now2);
|
|
346
|
+
}
|
|
347
|
+
function sudoFixtures(scenario, now2) {
|
|
307
348
|
const agent = {
|
|
308
349
|
id: "sudo-jq",
|
|
309
350
|
kind: "sudo",
|
|
@@ -4132,6 +4173,69 @@ var DummyFiles = class extends Emitter {
|
|
|
4132
4173
|
}
|
|
4133
4174
|
};
|
|
4134
4175
|
|
|
4176
|
+
// src/dummy/live.ts
|
|
4177
|
+
function liveFixtures(scenario, now2 = Date.now()) {
|
|
4178
|
+
const screen = {
|
|
4179
|
+
id: "live-screen",
|
|
4180
|
+
kind: "screen",
|
|
4181
|
+
label: "Recording screen",
|
|
4182
|
+
what: "Entire screen",
|
|
4183
|
+
asker: "sliccy",
|
|
4184
|
+
since: now2 - 42e3,
|
|
4185
|
+
action: { label: "Stop" }
|
|
4186
|
+
};
|
|
4187
|
+
if (scenario === "screen") return [screen];
|
|
4188
|
+
return [
|
|
4189
|
+
screen,
|
|
4190
|
+
{
|
|
4191
|
+
id: "live-microphone",
|
|
4192
|
+
kind: "microphone",
|
|
4193
|
+
label: "Recording microphone",
|
|
4194
|
+
what: "Desk microphone",
|
|
4195
|
+
asker: "Seat 2 (Mara) via docs-pass",
|
|
4196
|
+
since: now2 - 7e3,
|
|
4197
|
+
action: { label: "Stop" }
|
|
4198
|
+
}
|
|
4199
|
+
];
|
|
4200
|
+
}
|
|
4201
|
+
var DummyLive = class extends Emitter {
|
|
4202
|
+
#items;
|
|
4203
|
+
acted = [];
|
|
4204
|
+
constructor(scenario) {
|
|
4205
|
+
super();
|
|
4206
|
+
this.#items = liveFixtures(scenario);
|
|
4207
|
+
}
|
|
4208
|
+
items() {
|
|
4209
|
+
return [...this.#items];
|
|
4210
|
+
}
|
|
4211
|
+
add(item) {
|
|
4212
|
+
this.#items = [...this.#items.filter(({ id }) => id !== item.id), item];
|
|
4213
|
+
this.emit("items", this.items());
|
|
4214
|
+
}
|
|
4215
|
+
act(id) {
|
|
4216
|
+
this.acted.push(id);
|
|
4217
|
+
this.#items = this.#items.filter((item) => item.id !== id);
|
|
4218
|
+
this.emit("items", this.items());
|
|
4219
|
+
}
|
|
4220
|
+
};
|
|
4221
|
+
var switchFixtures = [
|
|
4222
|
+
{ key: "camera", label: "Camera", on: true },
|
|
4223
|
+
{ key: "microphone", label: "Microphone", on: true },
|
|
4224
|
+
{ key: "screen", label: "Screen", on: true }
|
|
4225
|
+
];
|
|
4226
|
+
var DummySwitches = class extends Emitter {
|
|
4227
|
+
#list = switchFixtures.map((item) => ({ ...item }));
|
|
4228
|
+
sets = [];
|
|
4229
|
+
list() {
|
|
4230
|
+
return this.#list.map((item) => ({ ...item }));
|
|
4231
|
+
}
|
|
4232
|
+
set(key, on) {
|
|
4233
|
+
this.sets.push([key, on]);
|
|
4234
|
+
this.#list = this.#list.map((item) => item.key === key ? { ...item, on } : item);
|
|
4235
|
+
this.emit("switches", this.list());
|
|
4236
|
+
}
|
|
4237
|
+
};
|
|
4238
|
+
|
|
4135
4239
|
// src/dummy/memory.ts
|
|
4136
4240
|
var DummyMemory = class extends Emitter {
|
|
4137
4241
|
#memories;
|
|
@@ -7438,6 +7542,8 @@ function createDummyModel({
|
|
|
7438
7542
|
tabs: tabs2 = "off",
|
|
7439
7543
|
approvals = "off",
|
|
7440
7544
|
asks = "off",
|
|
7545
|
+
live = "off",
|
|
7546
|
+
switches = "off",
|
|
7441
7547
|
follow = "off",
|
|
7442
7548
|
vault = "off",
|
|
7443
7549
|
guests = "off",
|
|
@@ -7527,6 +7633,8 @@ function createDummyModel({
|
|
|
7527
7633
|
...noticePort ? { notices: noticePort } : {},
|
|
7528
7634
|
...tabs2 === "off" ? {} : { tabs: new DummyTabs(tabs2, time) },
|
|
7529
7635
|
...approvals === "off" ? {} : { approvals: new DummyApprovals(approvals, time, vaultPort) },
|
|
7636
|
+
...live === "off" ? {} : { live: new DummyLive(live) },
|
|
7637
|
+
...switches === "off" ? {} : { switches: new DummySwitches() },
|
|
7530
7638
|
...follow === "off" ? {} : { follow: new DummyFollow(follow, time) },
|
|
7531
7639
|
...vaultPort ? { vault: vaultPort } : {},
|
|
7532
7640
|
...guestsPort(guests, time)
|
|
@@ -7547,8 +7655,10 @@ export {
|
|
|
7547
7655
|
DummyGuestAgent,
|
|
7548
7656
|
DummyGuests,
|
|
7549
7657
|
DummyImport,
|
|
7658
|
+
DummyLive,
|
|
7550
7659
|
DummyNetwork,
|
|
7551
7660
|
DummyNotices,
|
|
7661
|
+
DummySwitches,
|
|
7552
7662
|
DummyTabs,
|
|
7553
7663
|
DummyUpdates,
|
|
7554
7664
|
DummyValueFrame,
|
|
@@ -7584,6 +7694,7 @@ export {
|
|
|
7584
7694
|
joinUrl,
|
|
7585
7695
|
leadersFixtures,
|
|
7586
7696
|
linksFixtures,
|
|
7697
|
+
liveFixtures,
|
|
7587
7698
|
movedDocs,
|
|
7588
7699
|
networkFixtures,
|
|
7589
7700
|
noticeFixtures,
|
|
@@ -7598,6 +7709,7 @@ export {
|
|
|
7598
7709
|
providerAccount,
|
|
7599
7710
|
providerAccounts,
|
|
7600
7711
|
providerFixtures,
|
|
7712
|
+
switchFixtures,
|
|
7601
7713
|
tabsFixtures,
|
|
7602
7714
|
tailnetFixtures,
|
|
7603
7715
|
updateFixtures,
|