@songsid/agend 2.4.0-beta.35 → 2.4.0-beta.37
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/agent-whats-new.js +10 -0
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/cli-audited.js +8 -2
- package/dist/cli-audited.js.map +1 -1
- package/dist/fleet-manager.js +1 -1
- package/dist/fleet-manager.js.map +1 -1
- package/dist/general-knowledge/skills/hub/SKILL.md +32 -6
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +2 -1
- package/dist/hub/client.js +22 -4
- package/dist/hub/client.js.map +1 -1
- package/dist/hub/compose/server.d.ts +2 -0
- package/dist/hub/compose/server.js +36 -2
- package/dist/hub/compose/server.js.map +1 -1
- package/dist/hub/directory/directory.d.ts +19 -1
- package/dist/hub/directory/directory.js +199 -10
- package/dist/hub/directory/directory.js.map +1 -1
- package/dist/hub/directory/people-index.d.ts +72 -0
- package/dist/hub/directory/people-index.js +265 -0
- package/dist/hub/directory/people-index.js.map +1 -0
- package/dist/hub/directory/types.d.ts +49 -0
- package/dist/hub/directory/types.js +1 -0
- package/dist/hub/directory/types.js.map +1 -1
- package/dist/hub/grant-search.js +38 -23
- package/dist/hub/grant-search.js.map +1 -1
- package/dist/hub/group-policy/admin-api.js +10 -1
- package/dist/hub/group-policy/admin-api.js.map +1 -1
- package/dist/hub/group-policy/admin-control.d.ts +1 -0
- package/dist/hub/group-policy/admin-control.js +1 -1
- package/dist/hub/group-policy/admin-control.js.map +1 -1
- package/dist/hub/group-policy/admin-dto.d.ts +16 -14
- package/dist/hub/group-policy/admin-dto.js +5 -1
- package/dist/hub/group-policy/admin-dto.js.map +1 -1
- package/dist/hub/group-policy/admin-search.d.ts +2 -1
- package/dist/hub/group-policy/admin-search.js +45 -5
- package/dist/hub/group-policy/admin-search.js.map +1 -1
- package/dist/hub/group-policy/resources.d.ts +1 -1
- package/dist/hub/http/compose.js +68 -2
- package/dist/hub/http/compose.js.map +1 -1
- package/dist/hub/http/deps.d.ts +2 -0
- package/dist/hub/mcp/catalog.d.ts +0 -1
- package/dist/hub/mcp/catalog.js +2 -1
- package/dist/hub/mcp/catalog.js.map +1 -1
- package/dist/hub/mcp/http.js +6 -1
- package/dist/hub/mcp/http.js.map +1 -1
- package/dist/hub/mcp/policy.d.ts +9 -2
- package/dist/hub/mcp/policy.js +23 -1
- package/dist/hub/mcp/policy.js.map +1 -1
- package/dist/hub/people-query.d.ts +1 -0
- package/dist/hub/people-query.js +13 -0
- package/dist/hub/people-query.js.map +1 -0
- package/dist/hub/people-resolve.d.ts +34 -0
- package/dist/hub/people-resolve.js +38 -0
- package/dist/hub/people-resolve.js.map +1 -0
- package/dist/hub/protocol.d.ts +2 -0
- package/dist/hub/protocol.js +5 -2
- package/dist/hub/protocol.js.map +1 -1
- package/dist/hub/roles/admin-control.d.ts +0 -1
- package/dist/hub/roles/admin-control.js +29 -1
- package/dist/hub/roles/admin-control.js.map +1 -1
- package/dist/hub/roles/admin-types.d.ts +2 -0
- package/dist/hub/roles/allowed-list-control.d.ts +2 -0
- package/dist/hub/roles/allowed-list-control.js +17 -0
- package/dist/hub/roles/allowed-list-control.js.map +1 -1
- package/dist/hub/rooms/direct-view.js +2 -1
- package/dist/hub/rooms/direct-view.js.map +1 -1
- package/dist/hub/rooms/directory.d.ts +3 -0
- package/dist/hub/rooms/directory.js +38 -0
- package/dist/hub/rooms/directory.js.map +1 -1
- package/dist/hub/rooms/service.d.ts +7 -0
- package/dist/hub/rooms/service.js +17 -1
- package/dist/hub/rooms/service.js.map +1 -1
- package/dist/hub/runtime.js +15 -2
- package/dist/hub/runtime.js.map +1 -1
- package/dist/hub/server.d.ts +7 -0
- package/dist/hub/server.js +26 -4
- package/dist/hub/server.js.map +1 -1
- package/dist/hub/socket.d.ts +14 -0
- package/dist/hub/socket.js +19 -2
- package/dist/hub/socket.js.map +1 -1
- package/dist/hub/teams/index.js +35 -20
- package/dist/hub/teams/index.js.map +1 -1
- package/dist/hub/teams/types.d.ts +7 -1
- package/dist/locale.js +6 -4
- package/dist/locale.js.map +1 -1
- package/dist/runtime-cli-install.js +7 -3
- package/dist/runtime-cli-install.js.map +1 -1
- package/dist/ui/hub-admin-rooms.js +6 -4
- package/dist/ui/hub-ai-apps.js +2 -1
- package/dist/ui/hub-client.js +12 -0
- package/dist/ui/hub-grant-picker.js +42 -5
- package/dist/ui/hub-group-policy.js +3 -1
- package/dist/ui/hub-join-steps.js +3 -1
- package/dist/ui/hub-people-index.js +96 -0
- package/dist/ui/hub-people-paste.js +161 -0
- package/dist/ui/hub-people-query.js +8 -0
- package/dist/ui/hub-personal-agent.js +7 -2
- package/dist/ui/hub-role-forms.js +12 -3
- package/dist/ui/hub-room-new.js +12 -2
- package/dist/ui/hub-room-owner-requests.js +1 -1
- package/dist/ui/hub-room-settings.js +11 -4
- package/dist/ui/hub-room-thread.js +3 -3
- package/dist/ui/hub-subject-picker.js +16 -7
- package/dist/ui/hub-teams-strings.js +2 -2
- package/dist/ui/hub-teams.js +21 -5
- package/dist/ui/panel-hub.js +2 -0
- package/dist/ui/shared/app-update.js +19 -0
- package/dist/ui/shared/app.css +37 -0
- package/dist/ui/shared/update-card-ui.js +3 -3
- package/dist/update-card.d.ts +5 -1
- package/dist/update-card.js +8 -1
- package/dist/update-card.js.map +1 -1
- package/package.json +1 -1
package/dist/hub/http/compose.js
CHANGED
|
@@ -107,7 +107,9 @@ export const HUB_UI_MODULES = Object.freeze(["panel-hub.js", "hub-notify-keep.js
|
|
|
107
107
|
// M-3162: Administration → Overview (the counts dashboard), its own words.
|
|
108
108
|
"hub-admin-overview.js", "hub-ai-apps.js", "hub-ai-apps-strings.js", "hub-room-source.js", "hub-room-source-strings.js",
|
|
109
109
|
// M-3592: Administration → Sign-in.
|
|
110
|
-
"hub-session-limits.js"
|
|
110
|
+
"hub-session-limits.js",
|
|
111
|
+
// M-3975: Administration → People search, and the people-search rule the pickers share.
|
|
112
|
+
"hub-people-index.js", "hub-people-query.js", "hub-people-paste.js"]);
|
|
111
113
|
const BODY_LIMIT = 96 * 1024;
|
|
112
114
|
const UPLOADS_PER_SESSION = 2, UPLOADS_TOTAL = 8;
|
|
113
115
|
const UUID = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;
|
|
@@ -467,7 +469,7 @@ export function createHubHttp(deps, sql) {
|
|
|
467
469
|
}));
|
|
468
470
|
}
|
|
469
471
|
// Composed routes, not enrollment authority or the administrator's on/off switch. Older Hubs omit unsupported cards.
|
|
470
|
-
const offered = ["agent-intro-defaults-v1", "agent-sharing-v1", "agent-intros-v1", "admin-dashboard-v1", "rooms-v1", "room-purpose-v1", "room-pins-v1", "person-prefs-v1", ...(roomAgentRequests ? ["room-owner-requests-v1"] : []), ...(roomDiscovery ? ["room-agent-discovery-v1"] : []), ...(personal ? ["personal-agents-v1"] : []), ...(teams ? ["teams-v1"] : []), ...(deps.roleAdmin ? ["role-settings-v1"] : []), ...(deps.roomAssistant && deps.assistantAdmin ? ["room-assistant-v1"] : []), ...(deps.refreshAuthorization ? ["sharing-pause-v1"] : []), ...(deps.groupHttp ? [GROUP_POLICY_FEATURE, ...(deps.pairingNotices ? ["quick-pairing-v1"] : [])] : []), ...(grantSubjectsOffered() ? ["grant-subjects-v1"] : []),
|
|
472
|
+
const offered = ["agent-intro-defaults-v1", "agent-sharing-v1", "agent-intros-v1", "admin-dashboard-v1", "rooms-v1", "room-purpose-v1", "room-pins-v1", "person-prefs-v1", ...(deps.peopleIndex ? ["people-index-v1"] : []), ...(roomAgentRequests ? ["room-owner-requests-v1"] : []), ...(roomDiscovery ? ["room-agent-discovery-v1"] : []), ...(personal ? ["personal-agents-v1"] : []), ...(teams ? ["teams-v1"] : []), ...(deps.roleAdmin ? ["role-settings-v1"] : []), ...(deps.roomAssistant && deps.assistantAdmin ? ["room-assistant-v1"] : []), ...(deps.refreshAuthorization ? ["sharing-pause-v1"] : []), ...(deps.groupHttp ? [GROUP_POLICY_FEATURE, ...(deps.pairingNotices ? ["quick-pairing-v1"] : [])] : []), ...(grantSubjectsOffered() ? ["grant-subjects-v1"] : []),
|
|
471
473
|
...(deps.companyJoin ? ["company-join-v1", "enrolment-code-v1"] : []), ...(deps.directoryNotices ? ["directory-security-notices-v1"] : []), ...(deps.memberAddressNotices ? ["member-address-notices-v1"] : []),
|
|
472
474
|
...(deps.directorySettings ? [HUB_DIRECTORY_SETTINGS_FEATURE, HUB_DIRECTORY_CA_FEATURE, HUB_DIRECTORY_EDITOR_FEATURE] : [])];
|
|
473
475
|
offered.push("mcp-apps-v1");
|
|
@@ -882,6 +884,8 @@ export function createHubHttp(deps, sql) {
|
|
|
882
884
|
if (query.size)
|
|
883
885
|
throw new HubProtocolError("invalid");
|
|
884
886
|
const b = await body();
|
|
887
|
+
if (path === "/hub/v1/roles/resolve")
|
|
888
|
+
return answer(await guard(() => roles.resolve(ctx, b)));
|
|
885
889
|
if (path === "/hub/v1/roles/preview") {
|
|
886
890
|
if (Object.keys(b).length !== 1 || !Object.hasOwn(b, "policy"))
|
|
887
891
|
throw new HubProtocolError("invalid");
|
|
@@ -922,6 +926,14 @@ export function createHubHttp(deps, sql) {
|
|
|
922
926
|
if (path === "/hub/v1/teams/candidates") {
|
|
923
927
|
if (!teams)
|
|
924
928
|
throw new HttpError(404, "not-found");
|
|
929
|
+
// M-3975: POST resolves a pasted list (people only) under the same authority and rate bucket.
|
|
930
|
+
if (method === "POST") {
|
|
931
|
+
csrf();
|
|
932
|
+
if ([...query.keys()].length)
|
|
933
|
+
throw new HubProtocolError("invalid");
|
|
934
|
+
const b = await body(), out = await guard(() => teams.suggestions(ctx, b));
|
|
935
|
+
return send(res, 200, Array.isArray(out) ? { candidates: out } : out);
|
|
936
|
+
}
|
|
925
937
|
if (method !== "GET")
|
|
926
938
|
throw new HttpError(405, "method");
|
|
927
939
|
signedIn();
|
|
@@ -1002,6 +1014,52 @@ export function createHubHttp(deps, sql) {
|
|
|
1002
1014
|
}
|
|
1003
1015
|
throw new HttpError(405, "method");
|
|
1004
1016
|
}
|
|
1017
|
+
if (deps.peopleIndex && (path === "/hub/v1/admin/people-index" || path === "/hub/v1/admin/people-index/refresh")) {
|
|
1018
|
+
// M-3975: the people-search index is a Hub administrator's switch. Its snapshot only answers searches.
|
|
1019
|
+
const index = deps.peopleIndex;
|
|
1020
|
+
if ([...query.keys()].length)
|
|
1021
|
+
throw new HubProtocolError("invalid");
|
|
1022
|
+
// Turning it on or off and Refresh now are audited, in the transaction that checks the administrator is current.
|
|
1023
|
+
const audited = (permit, action, reasonCode) => core.atomic((_db, tx) => {
|
|
1024
|
+
core.check();
|
|
1025
|
+
permit.assertCurrent();
|
|
1026
|
+
core.audit(tx, { requestId: ctx.requestId, actor: permit.actor.kind === "directory" ? { kind: "person", person: permit.actor.person } : { kind: "local-host" },
|
|
1027
|
+
action, result: "completed", reasonCode });
|
|
1028
|
+
});
|
|
1029
|
+
if (path.endsWith("/refresh")) {
|
|
1030
|
+
if (method !== "POST")
|
|
1031
|
+
throw new HttpError(405, "method");
|
|
1032
|
+
csrf();
|
|
1033
|
+
const permit = await guard(() => core.management(ctx, "hub.admin"));
|
|
1034
|
+
permit.assertCurrent();
|
|
1035
|
+
if (!index.status().enabled)
|
|
1036
|
+
throw new HubProtocolError("conflict");
|
|
1037
|
+
audited(permit, "people-index.refresh-requested", "manual");
|
|
1038
|
+
void index.refresh();
|
|
1039
|
+
return send(res, 200, index.status());
|
|
1040
|
+
}
|
|
1041
|
+
if (method === "GET") {
|
|
1042
|
+
signedIn();
|
|
1043
|
+
const permit = await guard(() => core.management(ctx, "hub.admin"));
|
|
1044
|
+
permit.assertCurrent();
|
|
1045
|
+
return send(res, 200, index.status());
|
|
1046
|
+
}
|
|
1047
|
+
if (method !== "PUT")
|
|
1048
|
+
throw new HttpError(405, "method");
|
|
1049
|
+
csrf();
|
|
1050
|
+
const input = await body(), permit = await guard(() => core.management(ctx, "hub.admin"));
|
|
1051
|
+
if (!input || typeof input !== "object" || Array.isArray(input) || Object.keys(input).join() !== "enabled" || typeof input.enabled !== "boolean")
|
|
1052
|
+
throw new HubProtocolError("invalid");
|
|
1053
|
+
permit.assertCurrent();
|
|
1054
|
+
const on = input.enabled, changed = on !== index.status().enabled;
|
|
1055
|
+
// Audited once the switch has really changed (Fable, #4650): a refused or failed change records nothing.
|
|
1056
|
+
const status = index.setEnabled(on);
|
|
1057
|
+
if (changed)
|
|
1058
|
+
audited(permit, on ? "people-index.enabled" : "people-index.disabled", on ? "on" : "off");
|
|
1059
|
+
if (on)
|
|
1060
|
+
void index.refresh();
|
|
1061
|
+
return send(res, 200, on ? index.status() : status);
|
|
1062
|
+
}
|
|
1005
1063
|
if (path === "/hub/v1/admin/rooms/creators") {
|
|
1006
1064
|
if (method === "GET") {
|
|
1007
1065
|
signedIn();
|
|
@@ -1045,6 +1103,14 @@ export function createHubHttp(deps, sql) {
|
|
|
1045
1103
|
return send(res, 200, { candidates: await guard(() => groupRooms.ownAgentCandidates(ctx, uuid(r[1]), query.get("q") ?? "")) });
|
|
1046
1104
|
}
|
|
1047
1105
|
if (path === "/hub/v1/rooms/candidates") {
|
|
1106
|
+
// M-3975: POST resolves a pasted list of people (same access, rate bucket and fences as the GET search).
|
|
1107
|
+
if (method === "POST") {
|
|
1108
|
+
csrf();
|
|
1109
|
+
if ([...query.keys()].length)
|
|
1110
|
+
throw new HubProtocolError("invalid");
|
|
1111
|
+
const b = await body();
|
|
1112
|
+
return send(res, 200, await guard(() => groupRooms.resolveCandidates(ctx, b)));
|
|
1113
|
+
}
|
|
1048
1114
|
if (method !== "GET")
|
|
1049
1115
|
throw new HttpError(405, "method");
|
|
1050
1116
|
signedIn();
|