@extentos/mcp-server 0.0.56 → 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/data/version.js +7 -7
- 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 -803
- 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,25 +1,21 @@
|
|
|
1
1
|
// Generated Kotlin Application subclass for generateConnectionModule.
|
|
2
|
-
// Header + START/END markers follow INTEGRATION_SHAPE.md § Generated File Conventions.
|
|
3
2
|
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
// or parse failure. Wrapping it in `runCatching { ... }` is a no-op for the
|
|
8
|
-
// error channel (Kotlin's runCatching only catches exceptions, not Err
|
|
9
|
-
// variants), so failures slipped through silently — matcher never started,
|
|
10
|
-
// triggers never fired, dev saw nothing in logs. We pattern-match Ok/Err
|
|
11
|
-
// explicitly and surface both via android.util.Log so a single
|
|
12
|
-
// `adb logcat | grep Extentos` shows what happened on first launch.
|
|
3
|
+
// Post pure-SDK pivot the bootstrap's job is minimal:
|
|
4
|
+
// 1. instantiate ExtentosGlasses (the SDK entry point), and
|
|
5
|
+
// 2. open the persistent transport so capability primitives are usable.
|
|
13
6
|
//
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
//
|
|
7
|
+
// Everything else — wake-word matching, photo/video capture, TTS, business
|
|
8
|
+
// logic — is the customer's Handler class, written by hand against
|
|
9
|
+
// `glasses.audio.*`, `glasses.camera.*`, etc. The bootstrap should not
|
|
10
|
+
// reference handlers by name; the customer wires them from their own root
|
|
11
|
+
// composable or Application class after `bootstrap.glasses` is available.
|
|
12
|
+
//
|
|
13
|
+
// The `EXTENTOS-GENERATED` header marker is load-bearing — validateIntegration
|
|
14
|
+
// reads it to detect drift against the recorded hash and refuses to validate
|
|
15
|
+
// a project whose bootstrap has been hand-edited (those edits would be lost
|
|
16
|
+
// on the next regenerate). Customer-side init code goes outside this file.
|
|
21
17
|
export function renderAndroidBootstrap(appPackage) {
|
|
22
|
-
return `// EXTENTOS-GENERATED — do not edit manually. Regenerate via
|
|
18
|
+
return `// EXTENTOS-GENERATED — do not edit manually. Regenerate via generateConnectionModule.
|
|
23
19
|
package ${appPackage}.extentos
|
|
24
20
|
|
|
25
21
|
import android.app.Application
|
|
@@ -27,12 +23,17 @@ import android.util.Log
|
|
|
27
23
|
import ${appPackage}.BuildConfig
|
|
28
24
|
import com.extentos.glasses.core.ExtentosConfig
|
|
29
25
|
import com.extentos.glasses.core.ExtentosGlasses
|
|
30
|
-
import com.extentos.glasses.core.ExtentosResult
|
|
31
26
|
import kotlinx.coroutines.CoroutineScope
|
|
32
27
|
import kotlinx.coroutines.Dispatchers
|
|
33
28
|
import kotlinx.coroutines.SupervisorJob
|
|
34
29
|
import kotlinx.coroutines.launch
|
|
35
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Application subclass that instantiates the Extentos SDK and opens the
|
|
33
|
+
* transport on app start. Reference \`(application as ExtentosBootstrap).glasses\`
|
|
34
|
+
* from your Activity / Composable / Handler classes to subscribe to SDK
|
|
35
|
+
* primitives.
|
|
36
|
+
*/
|
|
36
37
|
class ExtentosBootstrap : Application() {
|
|
37
38
|
lateinit var glasses: ExtentosGlasses
|
|
38
39
|
private set
|
|
@@ -48,35 +49,7 @@ class ExtentosBootstrap : Application() {
|
|
|
48
49
|
)
|
|
49
50
|
)
|
|
50
51
|
|
|
51
|
-
// EXTENTOS-GENERATED-START:dispatch
|
|
52
|
-
// Callback handler registration is emitted by generateConsumer(kind = "callback").
|
|
53
|
-
// EXTENTOS-GENERATED-END:dispatch
|
|
54
|
-
|
|
55
52
|
appScope.launch {
|
|
56
|
-
val specJson = runCatching {
|
|
57
|
-
assets.open("extentos.spec.json").bufferedReader().use { it.readText() }
|
|
58
|
-
}.onFailure { e ->
|
|
59
|
-
Log.e(EXTENTOS_TAG, "spec asset read failed (assets/extentos.spec.json missing?) — triggers will not fire", e)
|
|
60
|
-
}.getOrNull()
|
|
61
|
-
|
|
62
|
-
if (specJson != null) {
|
|
63
|
-
when (val result = glasses.runtime.loadSpec(specJson)) {
|
|
64
|
-
is ExtentosResult.Ok -> {
|
|
65
|
-
val info = result.value
|
|
66
|
-
Log.i(
|
|
67
|
-
EXTENTOS_TAG,
|
|
68
|
-
"spec loaded: \${info.triggerCount} trigger(s), \${info.blockCount} block(s) [fingerprint=\${info.fingerprint}]"
|
|
69
|
-
)
|
|
70
|
-
}
|
|
71
|
-
is ExtentosResult.Err -> {
|
|
72
|
-
Log.e(EXTENTOS_TAG, "spec load FAILED — triggers will not fire:")
|
|
73
|
-
result.error.forEach { err ->
|
|
74
|
-
Log.e(EXTENTOS_TAG, " \${err.path}: \${err.message}")
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
53
|
runCatching { glasses.connection.connect() }
|
|
81
54
|
.onFailure { Log.e(EXTENTOS_TAG, "glasses.connection.connect() failed", it) }
|
|
82
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"androidBootstrap.js","sourceRoot":"","sources":["../../../src/tools/templates/androidBootstrap.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,
|
|
1
|
+
{"version":3,"file":"androidBootstrap.js","sourceRoot":"","sources":["../../../src/tools/templates/androidBootstrap.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,EAAE;AACF,sDAAsD;AACtD,8DAA8D;AAC9D,0EAA0E;AAC1E,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,uEAAuE;AACvE,0EAA0E;AAC1E,0EAA0E;AAC1E,EAAE;AACF,+EAA+E;AAC/E,6EAA6E;AAC7E,4EAA4E;AAC5E,2EAA2E;AAE3E,MAAM,UAAU,sBAAsB,CAAC,UAAkB;IACvD,OAAO;UACC,UAAU;;;;SAIX,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuClB,CAAC;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iosBootstrap.d.ts","sourceRoot":"","sources":["../../../src/tools/templates/iosBootstrap.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"iosBootstrap.d.ts","sourceRoot":"","sources":["../../../src/tools/templates/iosBootstrap.ts"],"names":[],"mappings":"AAmBA,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAgD7D;AAED,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAShE"}
|
|
@@ -1,25 +1,33 @@
|
|
|
1
1
|
// Generated Swift bootstrap singleton for generateConnectionModule (iOS).
|
|
2
2
|
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
// The previous template did `_ = await glasses.runtime.loadSpec()` which
|
|
7
|
-
// discarded the error channel silently. Pattern-match .success/.failure
|
|
8
|
-
// explicitly and log via Logger so a single Console.app filter on
|
|
9
|
-
// "Extentos" surfaces success/failure on launch.
|
|
3
|
+
// Post pure-SDK pivot the bootstrap's job is minimal:
|
|
4
|
+
// 1. instantiate ExtentosGlasses via Extentos.create(config:), and
|
|
5
|
+
// 2. open the persistent transport so capability primitives are usable.
|
|
10
6
|
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
//
|
|
7
|
+
// Everything else — wake-word matching, photo/video capture, TTS, business
|
|
8
|
+
// logic — is the customer's Handler class, written by hand against
|
|
9
|
+
// `glasses.audio.*`, `glasses.camera.*`, etc. The bootstrap should not
|
|
10
|
+
// reference handlers by name; the customer wires them from their own
|
|
11
|
+
// @main App struct after `ExtentosBootstrap.shared.glasses` is available.
|
|
12
|
+
//
|
|
13
|
+
// The `EXTENTOS-GENERATED` header marker is load-bearing — validateIntegration
|
|
14
|
+
// reads it to detect drift against the recorded hash and refuses to validate
|
|
15
|
+
// a project whose bootstrap has been hand-edited (those edits would be lost
|
|
16
|
+
// on the next regenerate). Customer-side init code goes outside this file.
|
|
14
17
|
import { iosModuleName } from "../util/appPackage.js";
|
|
15
18
|
export function renderIosBootstrap(appPackage) {
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
// moduleName intentionally unused in the body — kept for parity with the
|
|
20
|
+
// patch hint and in case future iOS subsystem tagging needs it.
|
|
21
|
+
void iosModuleName(appPackage);
|
|
22
|
+
return `// EXTENTOS-GENERATED — do not edit manually. Regenerate via generateConnectionModule.
|
|
18
23
|
import Foundation
|
|
19
24
|
import SwiftUI
|
|
20
25
|
import os
|
|
21
26
|
import GlassesCore
|
|
22
27
|
|
|
28
|
+
/// Singleton wrapper that instantiates the Extentos SDK and opens the
|
|
29
|
+
/// transport when the app launches. Reference \`ExtentosBootstrap.shared.glasses\`
|
|
30
|
+
/// from your root view / Handler classes to subscribe to SDK primitives.
|
|
23
31
|
@MainActor
|
|
24
32
|
final class ExtentosBootstrap: ObservableObject {
|
|
25
33
|
static let shared = ExtentosBootstrap()
|
|
@@ -30,10 +38,10 @@ final class ExtentosBootstrap: ObservableObject {
|
|
|
30
38
|
private static let log = Logger(subsystem: "${appPackage}", category: "Extentos")
|
|
31
39
|
|
|
32
40
|
private init() {
|
|
33
|
-
// debug
|
|
34
|
-
//
|
|
35
|
-
//
|
|
36
|
-
//
|
|
41
|
+
// debug=true gates the auto-bind probe path on Android (rule 4 of
|
|
42
|
+
// TransportChoice.Auto). iOS auto-bind isn't built yet, but wiring
|
|
43
|
+
// debug from the build configuration here means this template doesn't
|
|
44
|
+
// need to change when iOS auto-bind ships.
|
|
37
45
|
#if DEBUG
|
|
38
46
|
let isDebugBuild = true
|
|
39
47
|
#else
|
|
@@ -49,25 +57,7 @@ final class ExtentosBootstrap: ObservableObject {
|
|
|
49
57
|
glasses = Extentos.create(config: config)
|
|
50
58
|
sceneObserver = ExtentosSceneObserver(glasses: glasses)
|
|
51
59
|
|
|
52
|
-
// EXTENTOS-GENERATED-START:dispatch
|
|
53
|
-
// Callback handler registration is emitted by generateConsumer(kind: "callback").
|
|
54
|
-
// EXTENTOS-GENERATED-END:dispatch
|
|
55
|
-
|
|
56
60
|
Task.detached { [glasses] in
|
|
57
|
-
switch await glasses.runtime.loadSpec() {
|
|
58
|
-
case .success(let handle):
|
|
59
|
-
let spec = await glasses.runtime.currentSpec()
|
|
60
|
-
let triggers = spec?.triggers.count ?? 0
|
|
61
|
-
let blocks = spec?.blocks.count ?? 0
|
|
62
|
-
Self.log.info("spec loaded: \\(triggers) trigger(s), \\(blocks) block(s) [handle=\\(handle, privacy: .public)]")
|
|
63
|
-
case .failure(let err):
|
|
64
|
-
Self.log.error("spec load FAILED — triggers will not fire: \\(String(describing: err), privacy: .public)")
|
|
65
|
-
if case .validationFailed(let errors) = err {
|
|
66
|
-
for e in errors {
|
|
67
|
-
Self.log.error(" \\(e.path, privacy: .public): \\(e.message, privacy: .public)")
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
61
|
await glasses.connect()
|
|
72
62
|
}
|
|
73
63
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iosBootstrap.js","sourceRoot":"","sources":["../../../src/tools/templates/iosBootstrap.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,EAAE;AACF,
|
|
1
|
+
{"version":3,"file":"iosBootstrap.js","sourceRoot":"","sources":["../../../src/tools/templates/iosBootstrap.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,EAAE;AACF,sDAAsD;AACtD,qEAAqE;AACrE,0EAA0E;AAC1E,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,uEAAuE;AACvE,qEAAqE;AACrE,0EAA0E;AAC1E,EAAE;AACF,+EAA+E;AAC/E,6EAA6E;AAC7E,4EAA4E;AAC5E,2EAA2E;AAE3E,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,MAAM,UAAU,kBAAkB,CAAC,UAAkB;IACnD,yEAAyE;IACzE,gEAAgE;IAChE,KAAK,aAAa,CAAC,UAAU,CAAC,CAAC;IAC/B,OAAO;;;;;;;;;;;;;;;;kDAgByC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2B3D,CAAC;AACF,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,UAAkB;IACtD,MAAM,UAAU,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC;IAC7C,OAAO,2BAA2B,UAAU;;;;;;IAM1C,CAAC;AACL,CAAC"}
|
|
@@ -2,68 +2,7 @@ export interface ManifestInit {
|
|
|
2
2
|
platform: "android" | "ios";
|
|
3
3
|
appPackage: string;
|
|
4
4
|
libraryVersion: string;
|
|
5
|
-
specPath: string;
|
|
6
5
|
}
|
|
7
6
|
export declare function buildEmptyManifest(init: ManifestInit, nowIso: string): Record<string, unknown>;
|
|
8
|
-
export declare const EMPTY_SPEC_CONTENT: Record<string, unknown>;
|
|
9
|
-
export interface ManifestGeneratedFileEntry {
|
|
10
|
-
path: string;
|
|
11
|
-
template: string;
|
|
12
|
-
hash?: string;
|
|
13
|
-
generatedAt?: string;
|
|
14
|
-
generatedByTool: string;
|
|
15
|
-
}
|
|
16
|
-
export interface ManifestPatch {
|
|
17
|
-
/** Update extentos.lastUpdatedAt to this ISO timestamp. Required. */
|
|
18
|
-
lastUpdatedAt: string;
|
|
19
|
-
/** Replace spec.{path,hash,updatedAt} when the spec content changed. */
|
|
20
|
-
specUpdated?: {
|
|
21
|
-
path: string;
|
|
22
|
-
hash: string;
|
|
23
|
-
updatedAt: string;
|
|
24
|
-
};
|
|
25
|
-
/** Append (de-duped by path) to generatedFiles[]. */
|
|
26
|
-
generatedFilesAdded?: ManifestGeneratedFileEntry[];
|
|
27
|
-
/** Replace existing entries in generatedFiles[] keyed by path. */
|
|
28
|
-
generatedFilesUpdated?: ManifestGeneratedFileEntry[];
|
|
29
|
-
/** Remove entries from generatedFiles[] by path. */
|
|
30
|
-
generatedFilesRemoved?: string[];
|
|
31
|
-
/** Union into manifest.permissions[]. */
|
|
32
|
-
permissionsAdded?: string[];
|
|
33
|
-
/** Remove from manifest.permissions[]. */
|
|
34
|
-
permissionsRemoved?: string[];
|
|
35
|
-
/**
|
|
36
|
-
* Authoritative replacement for manifest.permissions[]. Used by
|
|
37
|
-
* updateSpec/initSpec which know the full spec-derived permission list and
|
|
38
|
-
* shouldn't preserve hand-edits — the manifest is tool-managed (see
|
|
39
|
-
* INTEGRATION_SHAPE.md § Modification Rules) and any drift is already
|
|
40
|
-
* surfaced by validateIntegration. Mutually exclusive with
|
|
41
|
-
* permissionsAdded/permissionsRemoved — `permissionsSet` wins when present.
|
|
42
|
-
* Mirrors integrationSet's full-state semantics.
|
|
43
|
-
*/
|
|
44
|
-
permissionsSet?: string[];
|
|
45
|
-
/** Union into integration.{blocks,streams,triggers,handlerNames,togglesOverridden}. Sorted-deduped. */
|
|
46
|
-
integrationAdded?: {
|
|
47
|
-
blocks?: string[];
|
|
48
|
-
streams?: string[];
|
|
49
|
-
triggers?: string[];
|
|
50
|
-
handlerNames?: string[];
|
|
51
|
-
togglesOverridden?: string[];
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* Authoritative replacement for integration[*] arrays. Used by updateSpec
|
|
55
|
-
* which knows the full post-state (unlike incremental tools that only
|
|
56
|
-
* declare what they're adding). Mutually exclusive with integrationAdded
|
|
57
|
-
* for the same field — `integrationSet` wins if both are provided.
|
|
58
|
-
*/
|
|
59
|
-
integrationSet?: {
|
|
60
|
-
blocks?: string[];
|
|
61
|
-
streams?: string[];
|
|
62
|
-
triggers?: string[];
|
|
63
|
-
handlerNames?: string[];
|
|
64
|
-
togglesOverridden?: string[];
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
export declare function applyManifestPatch(current: Record<string, unknown>, patch: ManifestPatch): Record<string, unknown>;
|
|
68
7
|
export declare function manifestPath(): string;
|
|
69
8
|
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../src/tools/util/manifest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../src/tools/util/manifest.ts"],"names":[],"mappings":"AAaA,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,SAAS,GAAG,KAAK,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAwD9F;AAED,wBAAgB,YAAY,IAAI,MAAM,CAErC"}
|
|
@@ -1,38 +1,29 @@
|
|
|
1
|
-
// Build
|
|
2
|
-
// Used by generateConnectionModule
|
|
3
|
-
//
|
|
4
|
-
//
|
|
1
|
+
// Build extentos.manifest.json per schemas/extentos-manifest.schema.json.
|
|
2
|
+
// Used only by generateConnectionModule — the post-pivot world has no
|
|
3
|
+
// per-mutation patcher because there are no per-mutation tools (initSpec,
|
|
4
|
+
// updateSpec, generateConsumer all retired with the pure-SDK pivot).
|
|
5
5
|
//
|
|
6
|
-
// The
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
6
|
+
// The manifest records the SDK integration shape: library version, generated
|
|
7
|
+
// files (the bootstrap module), platform dependencies (Gradle/SPM), declared
|
|
8
|
+
// permissions, and the list of SDK `capabilities` the customer's handler
|
|
9
|
+
// code uses. It does NOT record handler code itself — that's the customer's
|
|
10
|
+
// own source tree, not tool-managed.
|
|
10
11
|
import { VERSION_INFO } from "../data/version.js";
|
|
11
12
|
export function buildEmptyManifest(init, nowIso) {
|
|
12
13
|
const base = {
|
|
13
|
-
manifestVersion:
|
|
14
|
+
manifestVersion: 2,
|
|
14
15
|
platform: init.platform,
|
|
15
16
|
glasses: "meta_rayban",
|
|
16
17
|
appPackage: init.appPackage,
|
|
17
18
|
extentos: {
|
|
18
19
|
libraryVersion: init.libraryVersion,
|
|
19
|
-
specVersion: "1.0",
|
|
20
20
|
installedAt: nowIso,
|
|
21
21
|
lastUpdatedAt: nowIso,
|
|
22
22
|
},
|
|
23
|
-
spec: {
|
|
24
|
-
path: init.specPath,
|
|
25
|
-
hash: "sha256:empty",
|
|
26
|
-
},
|
|
27
23
|
generatedFiles: [],
|
|
28
24
|
permissions: [],
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
streams: [],
|
|
32
|
-
triggers: [],
|
|
33
|
-
handlerNames: [],
|
|
34
|
-
togglesOverridden: [],
|
|
35
|
-
},
|
|
25
|
+
capabilities: [],
|
|
26
|
+
handlerNames: [],
|
|
36
27
|
};
|
|
37
28
|
if (init.platform === "android") {
|
|
38
29
|
base.gradle = {
|
|
@@ -50,7 +41,7 @@ export function buildEmptyManifest(init, nowIso) {
|
|
|
50
41
|
// agp_version_supported check has a stable reference point. The
|
|
51
42
|
// minimums are library-version-coupled (glasses-ui's transitive Compose
|
|
52
43
|
// pin determines the AGP floor); refreshed on next generateConnectionModule
|
|
53
|
-
// when the library is bumped.
|
|
44
|
+
// when the library is bumped.
|
|
54
45
|
minimumAgpVersion: VERSION_INFO.android.minimumAgpVersion,
|
|
55
46
|
minimumGradleVersion: VERSION_INFO.android.minimumGradleVersion,
|
|
56
47
|
};
|
|
@@ -68,101 +59,12 @@ export function buildEmptyManifest(init, nowIso) {
|
|
|
68
59
|
],
|
|
69
60
|
// Toolchain minimum recorded for parity with Android. iOS doesn't have
|
|
70
61
|
// an AGP-equivalent — Xcode IS the toolchain; the version pin lives
|
|
71
|
-
// here.
|
|
62
|
+
// here.
|
|
72
63
|
minimumXcodeVersion: VERSION_INFO.ios.minimumXcodeVersion,
|
|
73
64
|
};
|
|
74
65
|
}
|
|
75
66
|
return base;
|
|
76
67
|
}
|
|
77
|
-
export const EMPTY_SPEC_CONTENT = {
|
|
78
|
-
$schema: "extentos://schema/v1",
|
|
79
|
-
extentos_version: "1.0",
|
|
80
|
-
blocks: [],
|
|
81
|
-
streams: [],
|
|
82
|
-
triggers: [],
|
|
83
|
-
};
|
|
84
|
-
export function applyManifestPatch(current, patch) {
|
|
85
|
-
const next = JSON.parse(JSON.stringify(current));
|
|
86
|
-
const extentos = next.extentos ?? {};
|
|
87
|
-
next.extentos = { ...extentos, lastUpdatedAt: patch.lastUpdatedAt };
|
|
88
|
-
if (patch.specUpdated) {
|
|
89
|
-
next.spec = { ...patch.specUpdated };
|
|
90
|
-
}
|
|
91
|
-
const filesArr = Array.isArray(next.generatedFiles)
|
|
92
|
-
? next.generatedFiles.slice()
|
|
93
|
-
: [];
|
|
94
|
-
const fileIndexByPath = new Map(filesArr.map((f, i) => [f.path, i]));
|
|
95
|
-
if (patch.generatedFilesUpdated) {
|
|
96
|
-
for (const entry of patch.generatedFilesUpdated) {
|
|
97
|
-
const idx = fileIndexByPath.get(entry.path);
|
|
98
|
-
if (idx == null) {
|
|
99
|
-
fileIndexByPath.set(entry.path, filesArr.length);
|
|
100
|
-
filesArr.push(entry);
|
|
101
|
-
}
|
|
102
|
-
else {
|
|
103
|
-
filesArr[idx] = entry;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
if (patch.generatedFilesAdded) {
|
|
108
|
-
for (const entry of patch.generatedFilesAdded) {
|
|
109
|
-
if (fileIndexByPath.has(entry.path)) {
|
|
110
|
-
// De-dupe by path: prefer the newer entry.
|
|
111
|
-
filesArr[fileIndexByPath.get(entry.path)] = entry;
|
|
112
|
-
}
|
|
113
|
-
else {
|
|
114
|
-
fileIndexByPath.set(entry.path, filesArr.length);
|
|
115
|
-
filesArr.push(entry);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
if (patch.generatedFilesRemoved) {
|
|
120
|
-
const removed = new Set(patch.generatedFilesRemoved);
|
|
121
|
-
next.generatedFiles = filesArr.filter((f) => !removed.has(f.path));
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
next.generatedFiles = filesArr;
|
|
125
|
-
}
|
|
126
|
-
if (patch.permissionsSet !== undefined) {
|
|
127
|
-
// Full-state replacement wins over incremental add/remove — see field doc.
|
|
128
|
-
next.permissions = [...new Set(patch.permissionsSet)].sort();
|
|
129
|
-
}
|
|
130
|
-
else if (patch.permissionsAdded?.length || patch.permissionsRemoved?.length) {
|
|
131
|
-
const existing = new Set(Array.isArray(next.permissions) ? next.permissions : []);
|
|
132
|
-
for (const p of patch.permissionsAdded ?? [])
|
|
133
|
-
existing.add(p);
|
|
134
|
-
for (const p of patch.permissionsRemoved ?? [])
|
|
135
|
-
existing.delete(p);
|
|
136
|
-
next.permissions = [...existing].sort();
|
|
137
|
-
}
|
|
138
|
-
if (patch.integrationAdded || patch.integrationSet) {
|
|
139
|
-
const integration = next.integration ?? {
|
|
140
|
-
blocks: [],
|
|
141
|
-
streams: [],
|
|
142
|
-
triggers: [],
|
|
143
|
-
handlerNames: [],
|
|
144
|
-
togglesOverridden: [],
|
|
145
|
-
};
|
|
146
|
-
const resolve = (key) => {
|
|
147
|
-
// integrationSet wins when present — it carries the full post-state.
|
|
148
|
-
if (patch.integrationSet?.[key] !== undefined) {
|
|
149
|
-
return [...new Set(patch.integrationSet[key])].sort();
|
|
150
|
-
}
|
|
151
|
-
const existing = Array.isArray(integration[key]) ? integration[key] : [];
|
|
152
|
-
const incoming = patch.integrationAdded?.[key] ?? [];
|
|
153
|
-
return [...new Set([...existing, ...incoming])].sort();
|
|
154
|
-
};
|
|
155
|
-
next.integration = {
|
|
156
|
-
...integration,
|
|
157
|
-
blocks: resolve("blocks"),
|
|
158
|
-
streams: resolve("streams"),
|
|
159
|
-
triggers: resolve("triggers"),
|
|
160
|
-
handlerNames: resolve("handlerNames"),
|
|
161
|
-
togglesOverridden: resolve("togglesOverridden"),
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
return next;
|
|
165
|
-
}
|
|
166
68
|
export function manifestPath() {
|
|
167
69
|
return "extentos.manifest.json";
|
|
168
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../../src/tools/util/manifest.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../../src/tools/util/manifest.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,sEAAsE;AACtE,0EAA0E;AAC1E,qEAAqE;AACrE,EAAE;AACF,6EAA6E;AAC7E,6EAA6E;AAC7E,yEAAyE;AACzE,4EAA4E;AAC5E,qCAAqC;AAErC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAQlD,MAAM,UAAU,kBAAkB,CAAC,IAAkB,EAAE,MAAc;IACnE,MAAM,IAAI,GAA4B;QACpC,eAAe,EAAE,CAAC;QAClB,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,OAAO,EAAE,aAAa;QACtB,UAAU,EAAE,IAAI,CAAC,UAAU;QAC3B,QAAQ,EAAE;YACR,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,WAAW,EAAE,MAAM;YACnB,aAAa,EAAE,MAAM;SACtB;QACD,cAAc,EAAE,EAAE;QAClB,WAAW,EAAE,EAAE;QACf,YAAY,EAAE,EAAE;QAChB,YAAY,EAAE,EAAE;KACjB,CAAC;IAEF,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;QAChC,IAAI,CAAC,MAAM,GAAG;YACZ,UAAU,EAAE,wBAAwB,IAAI,CAAC,cAAc,EAAE;YACzD,SAAS,EAAE,sBAAsB;YACjC,mBAAmB,EAAE;gBACnB,EAAE,UAAU,EAAE,2BAA2B,IAAI,CAAC,cAAc,EAAE,EAAE,aAAa,EAAE,gBAAgB,EAAE;gBACjG,kEAAkE;gBAClE,wEAAwE;gBACxE,uEAAuE;gBACvE,kEAAkE;gBAClE,sCAAsC;aACvC;YACD,uEAAuE;YACvE,gEAAgE;YAChE,wEAAwE;YACxE,4EAA4E;YAC5E,8BAA8B;YAC9B,iBAAiB,EAAE,YAAY,CAAC,OAAO,CAAC,iBAAiB;YACzD,oBAAoB,EAAE,YAAY,CAAC,OAAO,CAAC,oBAAoB;SAChE,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,IAAI,CAAC,GAAG,GAAG;YACT,OAAO,EAAE,UAAU;YACnB,UAAU,EAAE,2CAA2C;YACvD,OAAO,EAAE,IAAI,CAAC,cAAc;YAC5B,WAAW,EAAE,eAAe;YAC5B,kBAAkB,EAAE;gBAClB,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE;gBACzC,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE;gBACvC,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE;aAC5D;YACD,uEAAuE;YACvE,oEAAoE;YACpE,QAAQ;YACR,mBAAmB,EAAE,YAAY,CAAC,GAAG,CAAC,mBAAmB;SAC1D,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,OAAO,wBAAwB,CAAC;AAClC,CAAC"}
|
|
@@ -27,11 +27,8 @@ export interface MetaDatDerivation {
|
|
|
27
27
|
registrationRequired: boolean;
|
|
28
28
|
registrationSteps: string[];
|
|
29
29
|
}
|
|
30
|
-
export declare function
|
|
31
|
-
export declare function
|
|
32
|
-
export declare function
|
|
33
|
-
export declare
|
|
34
|
-
export declare function derivesInfoPlistPatch(spec: Record<string, unknown>): {
|
|
35
|
-
added: Record<string, string>;
|
|
36
|
-
} | undefined;
|
|
30
|
+
export declare function deriveAndroidFromCapabilities(capabilities: readonly string[]): AndroidDerivation;
|
|
31
|
+
export declare function deriveIosFromCapabilities(capabilities: readonly string[]): IosDerivation;
|
|
32
|
+
export declare function deriveMetaDatFromCapabilities(capabilities: readonly string[]): MetaDatDerivation;
|
|
33
|
+
export declare const KNOWN_CAPABILITIES: readonly string[];
|
|
37
34
|
//# sourceMappingURL=permissions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../../src/tools/util/permissions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../../src/tools/util/permissions.ts"],"names":[],"mappings":"AAgBA,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,iBAAiB,EAAE;QACjB,QAAQ,EAAE,OAAO,CAAC;QAClB,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;KAC5B,CAAC;IACF,oBAAoB,EAAE;QACpB,QAAQ,EAAE,OAAO,CAAC;QAClB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;QAC3B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;KAChC,CAAC;IACF,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAClE;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B;AAgID,wBAAgB,6BAA6B,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,GAAG,iBAAiB,CA2ChG;AAED,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,GAAG,aAAa,CAaxF;AAED,wBAAgB,6BAA6B,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,GAAG,iBAAiB,CAiBhG;AAID,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAAyC,CAAC"}
|