@extentos/mcp-server 0.0.57 → 0.0.58
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 +22 -62
- package/dist/generated/events.d.ts +3 -3
- package/dist/generated/events.d.ts.map +1 -1
- package/dist/generated/events.js +11 -6
- package/dist/generated/events.js.map +1 -1
- package/dist/generated/schemas.d.ts.map +1 -1
- package/dist/generated/schemas.js +41 -124
- package/dist/generated/schemas.js.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/tools/data/capabilityPatterns.d.ts +11 -0
- package/dist/tools/data/capabilityPatterns.d.ts.map +1 -0
- package/dist/tools/data/capabilityPatterns.js +289 -0
- package/dist/tools/data/capabilityPatterns.js.map +1 -0
- package/dist/tools/data/codeExamples.d.ts +15 -0
- package/dist/tools/data/codeExamples.d.ts.map +1 -0
- package/dist/tools/data/codeExamples.js +494 -0
- package/dist/tools/data/codeExamples.js.map +1 -0
- package/dist/tools/definitions.d.ts.map +1 -1
- package/dist/tools/definitions.js +99 -181
- package/dist/tools/definitions.js.map +1 -1
- package/dist/tools/docs/index.d.ts.map +1 -1
- package/dist/tools/docs/index.js +321 -800
- package/dist/tools/docs/index.js.map +1 -1
- package/dist/tools/handlers/createSimulatorSession.d.ts.map +1 -1
- package/dist/tools/handlers/createSimulatorSession.js +36 -51
- package/dist/tools/handlers/createSimulatorSession.js.map +1 -1
- package/dist/tools/handlers/generateConnectionModule.js +14 -15
- package/dist/tools/handlers/generateConnectionModule.js.map +1 -1
- package/dist/tools/handlers/getCapabilityGuide.d.ts +3 -0
- package/dist/tools/handlers/getCapabilityGuide.d.ts.map +1 -0
- package/dist/tools/handlers/getCapabilityGuide.js +47 -0
- package/dist/tools/handlers/getCapabilityGuide.js.map +1 -0
- package/dist/tools/handlers/getCodeExample.d.ts +3 -0
- package/dist/tools/handlers/getCodeExample.d.ts.map +1 -0
- package/dist/tools/handlers/getCodeExample.js +50 -0
- package/dist/tools/handlers/getCodeExample.js.map +1 -0
- package/dist/tools/handlers/getCredentialGuide.d.ts.map +1 -1
- package/dist/tools/handlers/getCredentialGuide.js +44 -84
- package/dist/tools/handlers/getCredentialGuide.js.map +1 -1
- package/dist/tools/handlers/getEventLog.d.ts.map +1 -1
- package/dist/tools/handlers/getEventLog.js +7 -8
- package/dist/tools/handlers/getEventLog.js.map +1 -1
- package/dist/tools/handlers/getPermissions.d.ts.map +1 -1
- package/dist/tools/handlers/getPermissions.js +27 -12
- package/dist/tools/handlers/getPermissions.js.map +1 -1
- package/dist/tools/handlers/getPlatformInfo.d.ts.map +1 -1
- package/dist/tools/handlers/getPlatformInfo.js +112 -46
- package/dist/tools/handlers/getPlatformInfo.js.map +1 -1
- package/dist/tools/handlers/getProductionChecklist.d.ts.map +1 -1
- package/dist/tools/handlers/getProductionChecklist.js +86 -120
- package/dist/tools/handlers/getProductionChecklist.js.map +1 -1
- package/dist/tools/handlers/getSimulatorStatus.d.ts.map +1 -1
- package/dist/tools/handlers/getSimulatorStatus.js +1 -3
- package/dist/tools/handlers/getSimulatorStatus.js.map +1 -1
- package/dist/tools/handlers/getVoiceCommandGuidance.d.ts.map +1 -1
- package/dist/tools/handlers/getVoiceCommandGuidance.js +18 -45
- package/dist/tools/handlers/getVoiceCommandGuidance.js.map +1 -1
- package/dist/tools/handlers/inspectIntegration.d.ts.map +1 -1
- package/dist/tools/handlers/inspectIntegration.js +14 -52
- package/dist/tools/handlers/inspectIntegration.js.map +1 -1
- package/dist/tools/handlers/validateIntegration.d.ts.map +1 -1
- package/dist/tools/handlers/validateIntegration.js +83 -167
- package/dist/tools/handlers/validateIntegration.js.map +1 -1
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/tools/registry.js +6 -11
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/templates/androidBootstrap.d.ts.map +1 -1
- package/dist/tools/templates/androidBootstrap.js +20 -47
- package/dist/tools/templates/androidBootstrap.js.map +1 -1
- package/dist/tools/templates/iosBootstrap.d.ts.map +1 -1
- package/dist/tools/templates/iosBootstrap.js +24 -34
- package/dist/tools/templates/iosBootstrap.js.map +1 -1
- package/dist/tools/util/manifest.d.ts +0 -61
- package/dist/tools/util/manifest.d.ts.map +1 -1
- package/dist/tools/util/manifest.js +14 -112
- package/dist/tools/util/manifest.js.map +1 -1
- package/dist/tools/util/permissions.d.ts +4 -7
- package/dist/tools/util/permissions.d.ts.map +1 -1
- package/dist/tools/util/permissions.js +151 -161
- package/dist/tools/util/permissions.js.map +1 -1
- package/package.json +1 -6
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
1
|
+
// Per-capability derivations: which Android permissions, iOS Info.plist
|
|
2
|
+
// keys, foreground-service types, and Meta DAT scopes does each SDK
|
|
3
|
+
// capability require? Replaces the pre-pivot spec walker that derived
|
|
4
|
+
// the same info from spec.blocks / spec.streams / spec.triggers.
|
|
5
|
+
//
|
|
6
|
+
// "Capability" names match the post-pivot `getPlatformInfo.features[].name`
|
|
7
|
+
// catalog (capture_photo, capture_video, record_audio, video_frames,
|
|
8
|
+
// audio_chunks, transcription_incremental, outgoing_audio_stream,
|
|
9
|
+
// outgoing_video_stream, voice_command, wake_word, push_to_talk,
|
|
10
|
+
// location_updated, phone_notification_forwarded, incoming_call_detected,
|
|
11
|
+
// etc.). Plus one pseudo-capability `capture_video_with_audio` to flag
|
|
12
|
+
// the include_audio=true configuration distinctly so apps that capture
|
|
13
|
+
// silent video don't over-declare RECORD_AUDIO.
|
|
3
14
|
import { VERSION_INFO } from "../data/version.js";
|
|
4
|
-
// Single source of truth for Android SDK levels lives in data/version.ts.
|
|
5
|
-
// Hardcoding them here drifted (lib bumped 34→35; this file didn't) and broke
|
|
6
|
-
// fresh-scaffold builds. Do not re-introduce literal values.
|
|
7
15
|
const ANDROID_MIN_SDK = VERSION_INFO.android.minimumSdk;
|
|
8
16
|
const ANDROID_COMPILE_SDK = VERSION_INFO.android.compileSdk;
|
|
9
17
|
const ANDROID_TARGET_SDK = VERSION_INFO.android.targetSdk;
|
|
@@ -14,167 +22,167 @@ const IOS_PRIVACY_STRINGS = {
|
|
|
14
22
|
NSLocationWhenInUseUsageDescription: "Used to deliver location-aware glasses experiences.",
|
|
15
23
|
NSBluetoothAlwaysUsageDescription: "Used to connect to your Meta Ray-Ban glasses.",
|
|
16
24
|
};
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
const CAPABILITY_NEEDS = {
|
|
26
|
+
capture_photo: {
|
|
27
|
+
android: ["android.permission.CAMERA"],
|
|
28
|
+
iosPlist: ["NSCameraUsageDescription"],
|
|
29
|
+
datScope: "glasses.camera.photo",
|
|
30
|
+
},
|
|
31
|
+
capture_video: {
|
|
32
|
+
android: ["android.permission.CAMERA"],
|
|
33
|
+
iosPlist: ["NSCameraUsageDescription"],
|
|
34
|
+
datScope: "glasses.camera.video",
|
|
35
|
+
},
|
|
36
|
+
// Distinct from capture_video — declare this capability if any capture_video
|
|
37
|
+
// call sets include_audio=true. Apps that only do silent video skip it so
|
|
38
|
+
// they don't over-declare RECORD_AUDIO.
|
|
39
|
+
capture_video_with_audio: {
|
|
40
|
+
android: ["android.permission.RECORD_AUDIO"],
|
|
41
|
+
iosPlist: ["NSMicrophoneUsageDescription"],
|
|
42
|
+
},
|
|
43
|
+
record_audio: {
|
|
44
|
+
android: ["android.permission.RECORD_AUDIO"],
|
|
45
|
+
iosPlist: ["NSMicrophoneUsageDescription", "NSSpeechRecognitionUsageDescription"],
|
|
46
|
+
datScope: "glasses.audio.record",
|
|
47
|
+
},
|
|
48
|
+
video_frames: {
|
|
49
|
+
android: ["android.permission.CAMERA"],
|
|
50
|
+
androidForegroundType: "camera",
|
|
51
|
+
iosPlist: ["NSCameraUsageDescription"],
|
|
52
|
+
datScope: "glasses.camera.stream",
|
|
53
|
+
},
|
|
54
|
+
audio_chunks: {
|
|
55
|
+
android: ["android.permission.RECORD_AUDIO"],
|
|
56
|
+
androidForegroundType: "microphone",
|
|
57
|
+
iosPlist: ["NSMicrophoneUsageDescription", "NSSpeechRecognitionUsageDescription"],
|
|
58
|
+
datScope: "glasses.audio.stream",
|
|
59
|
+
},
|
|
60
|
+
transcription_incremental: {
|
|
61
|
+
android: ["android.permission.RECORD_AUDIO"],
|
|
62
|
+
androidForegroundType: "microphone",
|
|
63
|
+
iosPlist: ["NSMicrophoneUsageDescription", "NSSpeechRecognitionUsageDescription"],
|
|
64
|
+
datScope: "glasses.audio.stream",
|
|
65
|
+
},
|
|
66
|
+
outgoing_audio_stream: {
|
|
67
|
+
android: ["android.permission.RECORD_AUDIO"],
|
|
68
|
+
androidForegroundType: "microphone",
|
|
69
|
+
iosPlist: ["NSMicrophoneUsageDescription"],
|
|
70
|
+
datScope: "glasses.audio.stream",
|
|
71
|
+
},
|
|
72
|
+
outgoing_video_stream: {
|
|
73
|
+
android: ["android.permission.CAMERA"],
|
|
74
|
+
androidForegroundType: "camera",
|
|
75
|
+
iosPlist: ["NSCameraUsageDescription"],
|
|
76
|
+
datScope: "glasses.camera.stream",
|
|
77
|
+
},
|
|
78
|
+
voice_command: {
|
|
79
|
+
android: ["android.permission.RECORD_AUDIO"],
|
|
80
|
+
iosPlist: ["NSMicrophoneUsageDescription", "NSSpeechRecognitionUsageDescription"],
|
|
81
|
+
},
|
|
82
|
+
wake_word: {
|
|
83
|
+
android: ["android.permission.RECORD_AUDIO"],
|
|
84
|
+
iosPlist: ["NSMicrophoneUsageDescription", "NSSpeechRecognitionUsageDescription"],
|
|
85
|
+
},
|
|
86
|
+
push_to_talk: {
|
|
87
|
+
android: ["android.permission.RECORD_AUDIO"],
|
|
88
|
+
iosPlist: ["NSMicrophoneUsageDescription", "NSSpeechRecognitionUsageDescription"],
|
|
89
|
+
},
|
|
90
|
+
location_updated: {
|
|
91
|
+
android: ["android.permission.ACCESS_FINE_LOCATION"],
|
|
92
|
+
iosPlist: ["NSLocationWhenInUseUsageDescription"],
|
|
93
|
+
},
|
|
94
|
+
phone_notification_forwarded: {
|
|
95
|
+
android: ["android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"],
|
|
96
|
+
needsNotificationListener: true,
|
|
97
|
+
},
|
|
98
|
+
incoming_call_detected: {
|
|
99
|
+
android: ["android.permission.READ_PHONE_STATE"],
|
|
100
|
+
},
|
|
23
101
|
};
|
|
24
|
-
|
|
102
|
+
const IOS_REASONS_BY_KEY = {
|
|
103
|
+
NSCameraUsageDescription: () => "capture_photo / capture_video / video_frames / outgoing_video_stream.",
|
|
104
|
+
NSMicrophoneUsageDescription: () => "record_audio / capture_video_with_audio / voice_command / wake_word / push_to_talk / audio_chunks / transcription_incremental / outgoing_audio_stream.",
|
|
105
|
+
NSSpeechRecognitionUsageDescription: () => "voice_command / wake_word / push_to_talk / record_audio / transcription_incremental / audio_chunks.",
|
|
106
|
+
NSLocationWhenInUseUsageDescription: () => "location_updated.",
|
|
107
|
+
NSBluetoothAlwaysUsageDescription: () => "Required by Meta DAT SDK for all glasses connections.",
|
|
108
|
+
};
|
|
109
|
+
const NOTIFICATION_SERVICE_DECLARATION = `<service\n android:name="com.extentos.glasses.core.notifications.ExtentosNotificationListenerService"\n android:label="Notification Mirroring"\n android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"\n android:exported="false">\n <intent-filter>\n <action android:name="android.service.notification.NotificationListenerService" />\n </intent-filter>\n</service>`;
|
|
110
|
+
const NOTIFICATION_DEV_INSTRUCTIONS = "Add the service declaration above inside <application> in AndroidManifest.xml. At runtime, prompt the user to grant Notification Access via NotificationAccessHelper.openSettings(context). The user must enable the toggle in system Settings → Notifications → Notification access; this permission cannot be requested programmatically.";
|
|
111
|
+
function knownCapabilities(input) {
|
|
25
112
|
const set = new Set();
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
if (b.type === "record_audio")
|
|
31
|
-
add("android.permission.RECORD_AUDIO");
|
|
32
|
-
// capture_video defaults to include_audio=false per SPEC_SCHEMA.md — only
|
|
33
|
-
// explicit-true configuration triggers RECORD_AUDIO. Adding it
|
|
34
|
-
// unconditionally would over-declare the permission for any video-capture
|
|
35
|
-
// app that doesn't actually use audio (a user-trust problem on its own).
|
|
36
|
-
if (b.type === "capture_video" && isIncludeAudioTrue(b))
|
|
37
|
-
add("android.permission.RECORD_AUDIO");
|
|
38
|
-
}
|
|
39
|
-
for (const st of streams) {
|
|
40
|
-
if (st.type === "video_frames" || st.type === "outgoing_video_stream")
|
|
41
|
-
add("android.permission.CAMERA");
|
|
42
|
-
if (st.type === "audio_chunks" ||
|
|
43
|
-
st.type === "transcription_incremental" ||
|
|
44
|
-
st.type === "outgoing_audio_stream")
|
|
45
|
-
add("android.permission.RECORD_AUDIO");
|
|
46
|
-
add("android.permission.FOREGROUND_SERVICE");
|
|
47
|
-
}
|
|
48
|
-
for (const t of triggers) {
|
|
49
|
-
if (t.type === "voice_command" || t.type === "wake_word" || t.type === "push_to_talk")
|
|
50
|
-
add("android.permission.RECORD_AUDIO");
|
|
51
|
-
if (t.type === "location_updated")
|
|
52
|
-
add("android.permission.ACCESS_FINE_LOCATION");
|
|
53
|
-
if (t.type === "phone_notification_forwarded")
|
|
54
|
-
add("android.permission.BIND_NOTIFICATION_LISTENER_SERVICE");
|
|
55
|
-
if (t.type === "incoming_call_detected")
|
|
56
|
-
add("android.permission.READ_PHONE_STATE");
|
|
57
|
-
}
|
|
58
|
-
add("android.permission.BLUETOOTH_CONNECT");
|
|
59
|
-
add("android.permission.BLUETOOTH_SCAN");
|
|
60
|
-
add("android.permission.INTERNET");
|
|
61
|
-
return [...set].sort();
|
|
113
|
+
for (const c of input)
|
|
114
|
+
if (typeof c === "string" && CAPABILITY_NEEDS[c])
|
|
115
|
+
set.add(c);
|
|
116
|
+
return set;
|
|
62
117
|
}
|
|
63
|
-
export function
|
|
64
|
-
const
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
118
|
+
export function deriveAndroidFromCapabilities(capabilities) {
|
|
119
|
+
const caps = knownCapabilities(capabilities);
|
|
120
|
+
const perms = new Set([
|
|
121
|
+
"android.permission.BLUETOOTH_CONNECT",
|
|
122
|
+
"android.permission.BLUETOOTH_SCAN",
|
|
123
|
+
"android.permission.INTERNET",
|
|
124
|
+
]);
|
|
69
125
|
const fgTypes = new Set();
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
126
|
+
let needsNotificationListener = false;
|
|
127
|
+
// Streams (anything with foreground type) implicitly need FOREGROUND_SERVICE.
|
|
128
|
+
let anyStream = false;
|
|
129
|
+
for (const name of caps) {
|
|
130
|
+
const need = CAPABILITY_NEEDS[name];
|
|
131
|
+
if (need.android)
|
|
132
|
+
for (const p of need.android)
|
|
133
|
+
perms.add(p);
|
|
134
|
+
if (need.androidForegroundType) {
|
|
135
|
+
fgTypes.add(need.androidForegroundType);
|
|
136
|
+
anyStream = true;
|
|
137
|
+
}
|
|
138
|
+
if (need.needsNotificationListener)
|
|
139
|
+
needsNotificationListener = true;
|
|
77
140
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
// surface that the spec USES streams (so devs know the gap exists),
|
|
83
|
-
// expose the foregroundServiceType the eventual service would need, but
|
|
84
|
-
// do NOT emit a phantom <service> declaration. When the lib ships a real
|
|
85
|
-
// class (Flaw #5b), this returns the real declaration and validation
|
|
86
|
-
// re-tightens to severity: error.
|
|
87
|
-
const fgRequired = fgTypes.size > 0;
|
|
88
|
-
const fgDecl = null;
|
|
89
|
-
// Phone-notification triggers need the lib's NotificationListenerService
|
|
90
|
-
// declared in the consumer app's manifest. The lib provides the class;
|
|
91
|
-
// the host must (1) declare it here and (2) call NotificationAccessHelper
|
|
92
|
-
// .openSettings() so the user can grant Notification Access in system
|
|
93
|
-
// Settings (the BIND_NOTIFICATION_LISTENER_SERVICE permission is
|
|
94
|
-
// system-managed and cannot be requested programmatically).
|
|
95
|
-
const needsNotificationListener = triggers.some((t) => t.type === "phone_notification_forwarded");
|
|
96
|
-
const notifDecl = needsNotificationListener
|
|
97
|
-
? `<service\n android:name="com.extentos.glasses.core.notifications.ExtentosNotificationListenerService"\n android:label="Notification Mirroring"\n android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"\n android:exported="false">\n <intent-filter>\n <action android:name="android.service.notification.NotificationListenerService" />\n </intent-filter>\n</service>`
|
|
98
|
-
: null;
|
|
99
|
-
const notifInstructions = needsNotificationListener
|
|
100
|
-
? "Add the service declaration above inside <application> in AndroidManifest.xml. At runtime, prompt the user to grant Notification Access via NotificationAccessHelper.openSettings(context). The user must enable the toggle in system Settings → Notifications → Notification access; this permission cannot be requested programmatically."
|
|
101
|
-
: null;
|
|
141
|
+
if (anyStream)
|
|
142
|
+
perms.add("android.permission.FOREGROUND_SERVICE");
|
|
143
|
+
const permissions = [...perms].sort();
|
|
144
|
+
const manifestEntries = permissions.map((p) => `<uses-permission android:name="${p}" />`);
|
|
102
145
|
return {
|
|
103
146
|
permissions,
|
|
104
147
|
manifestEntries,
|
|
105
148
|
foregroundService: {
|
|
106
|
-
required:
|
|
149
|
+
required: fgTypes.size > 0,
|
|
107
150
|
types: [...fgTypes].sort(),
|
|
108
|
-
declaration:
|
|
151
|
+
declaration: null, // ExtentosForegroundService class not yet shipped; see permissions.ts comment in pre-pivot version.
|
|
109
152
|
},
|
|
110
153
|
notificationListener: {
|
|
111
154
|
required: needsNotificationListener,
|
|
112
|
-
declaration:
|
|
113
|
-
devInstructions:
|
|
155
|
+
declaration: needsNotificationListener ? NOTIFICATION_SERVICE_DECLARATION : null,
|
|
156
|
+
devInstructions: needsNotificationListener ? NOTIFICATION_DEV_INSTRUCTIONS : null,
|
|
114
157
|
},
|
|
115
158
|
minimumSdk: ANDROID_MIN_SDK,
|
|
116
159
|
compileSdk: ANDROID_COMPILE_SDK,
|
|
117
160
|
targetSdk: ANDROID_TARGET_SDK,
|
|
118
161
|
};
|
|
119
162
|
}
|
|
120
|
-
export function
|
|
121
|
-
const
|
|
122
|
-
const
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
needed.add("NSCameraUsageDescription");
|
|
129
|
-
if (b.type === "record_audio")
|
|
130
|
-
needed.add("NSMicrophoneUsageDescription");
|
|
131
|
-
if (b.type === "capture_video" && isIncludeAudioTrue(b))
|
|
132
|
-
needed.add("NSMicrophoneUsageDescription");
|
|
133
|
-
}
|
|
134
|
-
for (const s of streams) {
|
|
135
|
-
if (s.type === "video_frames" || s.type === "outgoing_video_stream")
|
|
136
|
-
needed.add("NSCameraUsageDescription");
|
|
137
|
-
if (s.type === "audio_chunks" ||
|
|
138
|
-
s.type === "transcription_incremental" ||
|
|
139
|
-
s.type === "outgoing_audio_stream") {
|
|
140
|
-
needed.add("NSMicrophoneUsageDescription");
|
|
141
|
-
needed.add("NSSpeechRecognitionUsageDescription");
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
for (const t of triggers) {
|
|
145
|
-
if (t.type === "voice_command" || t.type === "wake_word" || t.type === "push_to_talk") {
|
|
146
|
-
needed.add("NSMicrophoneUsageDescription");
|
|
147
|
-
needed.add("NSSpeechRecognitionUsageDescription");
|
|
148
|
-
}
|
|
149
|
-
if (t.type === "location_updated")
|
|
150
|
-
needed.add("NSLocationWhenInUseUsageDescription");
|
|
163
|
+
export function deriveIosFromCapabilities(capabilities) {
|
|
164
|
+
const caps = knownCapabilities(capabilities);
|
|
165
|
+
const needed = new Set(["NSBluetoothAlwaysUsageDescription"]);
|
|
166
|
+
for (const name of caps) {
|
|
167
|
+
const plist = CAPABILITY_NEEDS[name].iosPlist;
|
|
168
|
+
if (plist)
|
|
169
|
+
for (const k of plist)
|
|
170
|
+
needed.add(k);
|
|
151
171
|
}
|
|
152
172
|
const plistKeys = [...needed].sort().map((key) => ({
|
|
153
173
|
key,
|
|
154
|
-
value: IOS_PRIVACY_STRINGS[key] ?? "Required by this Extentos
|
|
155
|
-
reason:
|
|
174
|
+
value: IOS_PRIVACY_STRINGS[key] ?? "Required by this Extentos integration.",
|
|
175
|
+
reason: IOS_REASONS_BY_KEY[key]?.(caps) ?? "Required by this Extentos integration.",
|
|
156
176
|
}));
|
|
157
177
|
return { plistKeys };
|
|
158
178
|
}
|
|
159
|
-
export function
|
|
160
|
-
const
|
|
161
|
-
const streams = arr(spec.streams);
|
|
179
|
+
export function deriveMetaDatFromCapabilities(capabilities) {
|
|
180
|
+
const caps = knownCapabilities(capabilities);
|
|
162
181
|
const scopes = new Set(["glasses.connection"]);
|
|
163
|
-
for (const
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
scopes.add("glasses.camera.video");
|
|
168
|
-
if (b.type === "record_audio")
|
|
169
|
-
scopes.add("glasses.audio.record");
|
|
170
|
-
}
|
|
171
|
-
for (const s of streams) {
|
|
172
|
-
if (s.type === "video_frames" || s.type === "outgoing_video_stream")
|
|
173
|
-
scopes.add("glasses.camera.stream");
|
|
174
|
-
if (s.type === "audio_chunks" ||
|
|
175
|
-
s.type === "transcription_incremental" ||
|
|
176
|
-
s.type === "outgoing_audio_stream")
|
|
177
|
-
scopes.add("glasses.audio.stream");
|
|
182
|
+
for (const name of caps) {
|
|
183
|
+
const scope = CAPABILITY_NEEDS[name].datScope;
|
|
184
|
+
if (scope)
|
|
185
|
+
scopes.add(scope);
|
|
178
186
|
}
|
|
179
187
|
return {
|
|
180
188
|
scopes: [...scopes].sort(),
|
|
@@ -187,25 +195,7 @@ export function deriveMetaDat(spec) {
|
|
|
187
195
|
],
|
|
188
196
|
};
|
|
189
197
|
}
|
|
190
|
-
export
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
return undefined;
|
|
194
|
-
const added = {};
|
|
195
|
-
for (const { key, value } of plistKeys)
|
|
196
|
-
added[key] = value;
|
|
197
|
-
return { added };
|
|
198
|
-
}
|
|
199
|
-
function arr(v) {
|
|
200
|
-
return Array.isArray(v) ? v : [];
|
|
201
|
-
}
|
|
202
|
-
// Read `params.include_audio` off a capture_video block. Default is `false`
|
|
203
|
-
// per SPEC_SCHEMA.md — only an explicit-true configuration counts as "this
|
|
204
|
-
// spec uses the microphone via video capture."
|
|
205
|
-
function isIncludeAudioTrue(block) {
|
|
206
|
-
const params = block.params;
|
|
207
|
-
if (!params || typeof params !== "object")
|
|
208
|
-
return false;
|
|
209
|
-
return params.include_audio === true;
|
|
210
|
-
}
|
|
198
|
+
// Convenience export — the full list of capability names the matrix
|
|
199
|
+
// recognizes. Tools use this to validate input lists at parse time.
|
|
200
|
+
export const KNOWN_CAPABILITIES = Object.keys(CAPABILITY_NEEDS).sort();
|
|
211
201
|
//# sourceMappingURL=permissions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permissions.js","sourceRoot":"","sources":["../../../src/tools/util/permissions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"permissions.js","sourceRoot":"","sources":["../../../src/tools/util/permissions.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,oEAAoE;AACpE,sEAAsE;AACtE,iEAAiE;AACjE,EAAE;AACF,4EAA4E;AAC5E,qEAAqE;AACrE,kEAAkE;AAClE,iEAAiE;AACjE,0EAA0E;AAC1E,uEAAuE;AACvE,uEAAuE;AACvE,gDAAgD;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AA8BlD,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC;AACxD,MAAM,mBAAmB,GAAG,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC;AAC5D,MAAM,kBAAkB,GAAG,YAAY,CAAC,OAAO,CAAC,SAAS,CAAC;AAE1D,MAAM,mBAAmB,GAA2B;IAClD,wBAAwB,EAAE,qDAAqD;IAC/E,4BAA4B,EAAE,6DAA6D;IAC3F,mCAAmC,EAAE,sDAAsD;IAC3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,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,wCAAwC;KACpF,CAAC,CAAC,CAAC;IACJ,OAAO,EAAE,SAAS,EAAE,CAAC;AACvB,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,YAA+B;IAC3E,MAAM,IAAI,GAAG,iBAAiB,CAAC,YAAY,CAAC,CAAC;IAC7C,MAAM,MAAM,GAAG,IAAI,GAAG,CAAS,CAAC,oBAAoB,CAAC,CAAC,CAAC;IACvD,KAAK,MAAM,IAAI,IAAI,IAAI,EAAE,CAAC;QACxB,MAAM,KAAK,GAAG,gBAAgB,CAAC,IAAI,CAAE,CAAC,QAAQ,CAAC;QAC/C,IAAI,KAAK;YAAE,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO;QACL,MAAM,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,EAAE;QAC1B,oBAAoB,EAAE,IAAI;QAC1B,iBAAiB,EAAE;YACjB,4EAA4E;YAC5E,mEAAmE;YACnE,+DAA+D;YAC/D,6FAA6F;SAC9F;KACF,CAAC;AACJ,CAAC;AAED,oEAAoE;AACpE,oEAAoE;AACpE,MAAM,CAAC,MAAM,kBAAkB,GAAsB,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,IAAI,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@extentos/mcp-server",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.58",
|
|
4
4
|
"description": "Extentos MCP server — deterministic tools for building Meta-glasses apps.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -19,12 +19,7 @@
|
|
|
19
19
|
"cli": "node dist/cli.js",
|
|
20
20
|
"dev": "tsc --watch",
|
|
21
21
|
"typecheck": "npm run prebuild && tsc --noEmit",
|
|
22
|
-
"smoke": "npm run build && node scripts/example-flow-smoke.mjs",
|
|
23
|
-
"smoke:bundle1": "npm run build && node scripts/bundle1-smoke.mjs",
|
|
24
|
-
"smoke:bundle2": "npm run build && node scripts/bundle2-smoke.mjs",
|
|
25
22
|
"smoke:bundle3": "npm run build && node scripts/bundle3-smoke.mjs",
|
|
26
|
-
"smoke:bundle4": "npm run build && node scripts/bundle4-smoke.mjs",
|
|
27
|
-
"smoke:bundle5": "npm run build && node scripts/bundle5-smoke.mjs",
|
|
28
23
|
"smoke:telemetry": "npm run build && node scripts/telemetry-smoke.mjs",
|
|
29
24
|
"prepublishOnly": "npm run build"
|
|
30
25
|
},
|