@ai-ecoverse/slicc-spectrum 1.83.0 → 1.84.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 +832 -123
- package/dist/slicc-dummy.js +29 -0
- package/dist/slicc-dummy.js.map +2 -2
- package/dist/slicc-ui.js +64 -31
- package/dist/slicc-ui.js.map +3 -3
- package/dist/types/app/approvals.d.ts +1 -0
- package/dist/types/app/guests.d.ts +3 -1
- package/dist/types/dummy/approvals.d.ts +1 -1
- package/dist/types/dummy/guests.d.ts +4 -2
- package/dist/types/dummy.d.ts +1 -1
- package/dist/types/model/types.d.ts +7 -2
- package/package.json +3 -3
package/dist/slicc-dummy.js
CHANGED
|
@@ -62,6 +62,23 @@ function guestFixtures(now2 = Date.now()) {
|
|
|
62
62
|
}
|
|
63
63
|
];
|
|
64
64
|
}
|
|
65
|
+
function guestAlways(now2 = Date.now()) {
|
|
66
|
+
return [
|
|
67
|
+
{
|
|
68
|
+
id: "guest-read",
|
|
69
|
+
kind: "guest-tool",
|
|
70
|
+
requester: mara,
|
|
71
|
+
agentId: "cone-sliccy",
|
|
72
|
+
agentName: "sliccy",
|
|
73
|
+
tool: "read_file",
|
|
74
|
+
summary: "/workspace/harbor/schedule.csv",
|
|
75
|
+
createdAt: now2,
|
|
76
|
+
expiresAt: now2 + 5 * minutes,
|
|
77
|
+
always: true,
|
|
78
|
+
verdict: { decision: "allow", reason: "it reads a file inside the shared folder." }
|
|
79
|
+
}
|
|
80
|
+
];
|
|
81
|
+
}
|
|
65
82
|
function approvalFixtures(scenario, now2 = Date.now()) {
|
|
66
83
|
const agent = {
|
|
67
84
|
id: "sudo-jq",
|
|
@@ -106,6 +123,7 @@ function approvalFixtures(scenario, now2 = Date.now()) {
|
|
|
106
123
|
}
|
|
107
124
|
];
|
|
108
125
|
if (scenario === "guest" || scenario === "guest-follower") return guestFixtures(now2);
|
|
126
|
+
if (scenario === "guest-always") return guestAlways(now2);
|
|
109
127
|
if (scenario === "none") return [];
|
|
110
128
|
if (scenario === "user") return [user];
|
|
111
129
|
if (scenario === "many") return [agent, user, cache];
|
|
@@ -2422,6 +2440,10 @@ var day2 = 24 * hour2;
|
|
|
2422
2440
|
var cap = 30 * day2;
|
|
2423
2441
|
var guestsUnavailable = "Guests need the tray hub. Connect this SLICC to a tray to invite one.";
|
|
2424
2442
|
var guestsRefused = "The hub couldn\u2019t make a link right now. Try again in a minute.";
|
|
2443
|
+
var guestsPolicy = {
|
|
2444
|
+
messages: ["user", "agent", "cone", "scoop:*", "off"],
|
|
2445
|
+
tools: ["user", "agent", "scoop:*", "off"]
|
|
2446
|
+
};
|
|
2425
2447
|
function guestsFixtures(scenario, now2 = Date.now()) {
|
|
2426
2448
|
if (scenario === "none" || scenario === "unavailable") return [];
|
|
2427
2449
|
return [
|
|
@@ -2452,11 +2474,16 @@ var DummyGuests = class extends Emitter {
|
|
|
2452
2474
|
#seats;
|
|
2453
2475
|
#clock;
|
|
2454
2476
|
#count = 0;
|
|
2477
|
+
gates;
|
|
2455
2478
|
constructor(scenario, clock2) {
|
|
2456
2479
|
super();
|
|
2457
2480
|
this.scenario = scenario;
|
|
2458
2481
|
this.#clock = clock2;
|
|
2459
2482
|
this.#seats = guestsFixtures(scenario);
|
|
2483
|
+
this.#policy();
|
|
2484
|
+
}
|
|
2485
|
+
#policy() {
|
|
2486
|
+
this.gates = this.scenario === "policy" ? () => guestsPolicy : void 0;
|
|
2460
2487
|
}
|
|
2461
2488
|
list() {
|
|
2462
2489
|
return this.#seats;
|
|
@@ -2467,6 +2494,7 @@ var DummyGuests = class extends Emitter {
|
|
|
2467
2494
|
setScenario(scenario) {
|
|
2468
2495
|
this.scenario = scenario;
|
|
2469
2496
|
this.#seats = guestsFixtures(scenario);
|
|
2497
|
+
this.#policy();
|
|
2470
2498
|
this.emit("unavailable", this.unavailable());
|
|
2471
2499
|
this.emit("seats", this.#seats);
|
|
2472
2500
|
}
|
|
@@ -7280,6 +7308,7 @@ export {
|
|
|
7280
7308
|
guestSeat,
|
|
7281
7309
|
guestTranscript,
|
|
7282
7310
|
guestsFixtures,
|
|
7311
|
+
guestsPolicy,
|
|
7283
7312
|
guestsRefused,
|
|
7284
7313
|
guestsUnavailable,
|
|
7285
7314
|
joinUrl,
|