Add iOS node push-token registration foundation

This commit is contained in:
William Valentin
2026-02-16 12:47:34 -08:00
parent bea4c54f3b
commit 58c4b0b9bb
19 changed files with 448 additions and 7 deletions
+5
View File
@@ -144,6 +144,7 @@ describe('configSchema — server', () => {
expect(result.server.nodes.allowed_roles).toEqual(['companion']);
expect(result.server.nodes.feature_gates).toEqual({});
expect(result.server.nodes.location.enabled).toBe(false);
expect(result.server.nodes.push.enabled).toBe(false);
});
it('accepts custom node policy settings', () => {
@@ -160,6 +161,9 @@ describe('configSchema — server', () => {
location: {
enabled: true,
},
push: {
enabled: true,
},
},
},
});
@@ -168,6 +172,7 @@ describe('configSchema — server', () => {
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);
expect(result.server.nodes.push.enabled).toBe(true);
});
it('accepts custom discovery settings', () => {
+5
View File
@@ -91,6 +91,11 @@ const serverNodePolicySchema = z.object({
/** Enable node.location.set/get and system.location visibility. */
enabled: z.boolean().default(false),
}).default({}),
/** Node push registration controls (e.g. APNs for iOS companion). */
push: z.object({
/** Enable node.push_token.set and push summary visibility in system.nodes. */
enabled: z.boolean().default(false),
}).default({}),
}).default({});
const serverSchema = z.object({