Add node location access RPCs and operator visibility

This commit is contained in:
William Valentin
2026-02-16 12:30:55 -08:00
parent 1d16cd54e6
commit fe8674e108
19 changed files with 693 additions and 15 deletions
+5
View File
@@ -143,6 +143,7 @@ describe('configSchema — server', () => {
expect(result.server.nodes.enabled).toBe(false);
expect(result.server.nodes.allowed_roles).toEqual(['companion']);
expect(result.server.nodes.feature_gates).toEqual({});
expect(result.server.nodes.location.enabled).toBe(false);
});
it('accepts custom node policy settings', () => {
@@ -156,6 +157,9 @@ describe('configSchema — server', () => {
'ui.canvas': true,
'fs.sync': false,
},
location: {
enabled: true,
},
},
},
});
@@ -163,6 +167,7 @@ describe('configSchema — server', () => {
expect(result.server.nodes.allowed_roles).toEqual(['companion', 'observer']);
expect(result.server.nodes.feature_gates['ui.canvas']).toBe(true);
expect(result.server.nodes.feature_gates['fs.sync']).toBe(false);
expect(result.server.nodes.location.enabled).toBe(true);
});
it('accepts custom discovery settings', () => {
+5
View File
@@ -86,6 +86,11 @@ const serverNodePolicySchema = z.object({
allowed_roles: z.array(z.string().min(1)).default(['companion']),
/** Optional feature gates exposed via system/node capability APIs. */
feature_gates: z.record(z.string(), z.boolean()).default({}),
/** Node location access controls. */
location: z.object({
/** Enable node.location.set/get and system.location visibility. */
enabled: z.boolean().default(false),
}).default({}),
}).default({});
const serverSchema = z.object({