@glassly/miniapp 0.4.2 → 0.4.3-beta.1211
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/display/index.d.ts +2 -1
- package/dist/display/index.d.ts.map +1 -1
- package/dist/display/index.js +1 -1
- package/dist/display/index.js.map +1 -1
- package/dist/display/measurer/script-detection.d.ts +1 -1
- package/dist/display/measurer/script-detection.d.ts.map +1 -1
- package/dist/display/measurer/script-detection.js +46 -10
- package/dist/display/measurer/script-detection.js.map +1 -1
- package/dist/display/profiles/index.d.ts +3 -2
- package/dist/display/profiles/index.d.ts.map +1 -1
- package/dist/display/profiles/index.js +2 -3
- package/dist/display/profiles/index.js.map +1 -1
- package/dist/display/profiles/nimo.d.ts +10 -3
- package/dist/display/profiles/nimo.d.ts.map +1 -1
- package/dist/display/profiles/nimo.js +35 -3
- package/dist/display/profiles/nimo.js.map +1 -1
- package/dist/display/profiles/textProfile.d.ts +24 -0
- package/dist/display/profiles/textProfile.d.ts.map +1 -0
- package/dist/display/profiles/textProfile.js +48 -0
- package/dist/display/profiles/textProfile.js.map +1 -0
- package/dist/display/profiles/types.d.ts +5 -0
- package/dist/display/profiles/types.d.ts.map +1 -1
- package/dist/display/scene/degrade.d.ts +1 -1
- package/dist/display/scene/degrade.js +1 -1
- package/dist/display/scene/process.d.ts.map +1 -1
- package/dist/display/scene/process.js +2 -3
- package/dist/display/scene/process.js.map +1 -1
- package/dist/host/actionInvoke.d.ts +44 -0
- package/dist/host/actionInvoke.d.ts.map +1 -0
- package/dist/host/actionInvoke.js +87 -0
- package/dist/host/actionInvoke.js.map +1 -0
- package/dist/host/gestureClaims.d.ts +37 -0
- package/dist/host/gestureClaims.d.ts.map +1 -0
- package/dist/host/gestureClaims.js +45 -0
- package/dist/host/gestureClaims.js.map +1 -0
- package/dist/host/index.d.ts +8 -0
- package/dist/host/index.d.ts.map +1 -1
- package/dist/host/index.js +9 -0
- package/dist/host/index.js.map +1 -1
- package/dist/host/manifestActions.d.ts +69 -0
- package/dist/host/manifestActions.d.ts.map +1 -0
- package/dist/host/manifestActions.js +89 -0
- package/dist/host/manifestActions.js.map +1 -0
- package/dist/host/memory/MemoryStore.d.ts +178 -0
- package/dist/host/memory/MemoryStore.d.ts.map +1 -0
- package/dist/host/memory/MemoryStore.js +615 -0
- package/dist/host/memory/MemoryStore.js.map +1 -0
- package/dist/host/memory/search.d.ts +72 -0
- package/dist/host/memory/search.d.ts.map +1 -0
- package/dist/host/memory/search.js +188 -0
- package/dist/host/memory/search.js.map +1 -0
- package/dist/host/miniappPermissions.d.ts +16 -0
- package/dist/host/miniappPermissions.d.ts.map +1 -0
- package/dist/host/miniappPermissions.js +7 -0
- package/dist/host/miniappPermissions.js.map +1 -0
- package/dist/host/settingsBridge.d.ts +49 -0
- package/dist/host/settingsBridge.d.ts.map +1 -0
- package/dist/host/settingsBridge.js +110 -0
- package/dist/host/settingsBridge.js.map +1 -0
- package/dist/host/widgetPlacements.d.ts +44 -0
- package/dist/host/widgetPlacements.d.ts.map +1 -0
- package/dist/host/widgetPlacements.js +84 -0
- package/dist/host/widgetPlacements.js.map +1 -0
- package/dist/session.d.ts +6 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js.map +1 -1
- package/package.json +2 -2
- package/src/display/index.ts +4 -3
- package/src/display/measurer/script-detection.ts +47 -10
- package/src/display/profiles/index.ts +4 -4
- package/src/display/profiles/nimo.ts +38 -3
- package/src/display/profiles/textProfile.ts +62 -0
- package/src/display/profiles/types.ts +2 -0
- package/src/display/scene/degrade.ts +1 -1
- package/src/display/scene/process.ts +2 -3
- package/src/host/actionInvoke.ts +110 -0
- package/src/host/gestureClaims.ts +77 -0
- package/src/host/index.ts +10 -0
- package/src/host/manifestActions.ts +152 -0
- package/src/host/memory/MemoryStore.ts +704 -0
- package/src/host/memory/search.ts +214 -0
- package/src/host/miniappPermissions.ts +19 -0
- package/src/host/settingsBridge.ts +119 -0
- package/src/host/widgetPlacements.ts +135 -0
- package/src/session.ts +6 -0
- package/dist/display/profiles/z100.d.ts +0 -33
- package/dist/display/profiles/z100.d.ts.map +0 -1
- package/dist/display/profiles/z100.js +0 -182
- package/dist/display/profiles/z100.js.map +0 -1
- package/src/display/profiles/z100.ts +0 -198
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { MiniappErrorCode } from "../protocol";
|
|
2
|
+
export const actionFailure = (code, message) => ({ ok: false, error: { code, message } });
|
|
3
|
+
/** Installed, compatible, and declares the action. */
|
|
4
|
+
export function appDeclaresAction(app, actionId) {
|
|
5
|
+
if (!app)
|
|
6
|
+
return false;
|
|
7
|
+
if (app.compatibility && app.compatibility.isCompatible === false)
|
|
8
|
+
return false;
|
|
9
|
+
return (app.actions ?? []).some((a) => a.id === actionId);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Gates shared by miniapp->miniapp invoke and host invoke. Declared actions are
|
|
13
|
+
* public by default; `visibility: "system"` ones need a system caller.
|
|
14
|
+
*/
|
|
15
|
+
export function checkActionAccess(app, target, actionId, callerIsSystem) {
|
|
16
|
+
if (!target || !app) {
|
|
17
|
+
return {
|
|
18
|
+
code: MiniappErrorCode.APP_NOT_FOUND,
|
|
19
|
+
message: `Miniapp not found: ${target ?? "(missing targetPackageName)"}`,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
if (!actionId)
|
|
23
|
+
return { code: MiniappErrorCode.ACTION_NOT_FOUND, message: "invoke requires an actionId" };
|
|
24
|
+
if (app.compatibility && app.compatibility.isCompatible === false) {
|
|
25
|
+
return {
|
|
26
|
+
code: MiniappErrorCode.APP_NOT_COMPATIBLE,
|
|
27
|
+
message: `${target} is not compatible with the connected glasses`,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
const declared = (app.actions ?? []).find((a) => a.id === actionId);
|
|
31
|
+
if (!declared) {
|
|
32
|
+
return { code: MiniappErrorCode.ACTION_NOT_FOUND, message: `${target} does not declare action "${actionId}"` };
|
|
33
|
+
}
|
|
34
|
+
if (declared.visibility === "system" && !callerIsSystem) {
|
|
35
|
+
return {
|
|
36
|
+
code: MiniappErrorCode.NOT_PERMITTED,
|
|
37
|
+
message: `Action "${actionId}" on ${target} is restricted to system apps`,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
/** Outstanding ACTION_CALLs awaiting an ACTION_RESULT, keyed by host-generated callId. */
|
|
43
|
+
export class PendingActionCalls {
|
|
44
|
+
constructor(timers, payloadTooLarge) {
|
|
45
|
+
this.timers = timers;
|
|
46
|
+
this.payloadTooLarge = payloadTooLarge;
|
|
47
|
+
this.calls = new Map();
|
|
48
|
+
}
|
|
49
|
+
/** Register a call; resolves with its outcome, or ACTION_TIMEOUT. */
|
|
50
|
+
register(callId, target, actionId, timeoutMs) {
|
|
51
|
+
return new Promise((resolve) => {
|
|
52
|
+
const timer = this.timers.setTimeout(() => {
|
|
53
|
+
this.calls.delete(callId);
|
|
54
|
+
resolve(actionFailure(MiniappErrorCode.ACTION_TIMEOUT, `action "${actionId}" timed out after ${timeoutMs}ms`));
|
|
55
|
+
}, timeoutMs);
|
|
56
|
+
this.calls.set(callId, { target, settle: resolve, timer });
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/** Settle from a target's ACTION_RESULT payload. Only the invoked target may resolve a call. */
|
|
60
|
+
handleResult(targetPackageName, payload) {
|
|
61
|
+
const callId = payload.callId;
|
|
62
|
+
if (!callId)
|
|
63
|
+
return;
|
|
64
|
+
const pending = this.calls.get(callId);
|
|
65
|
+
// callIds are guessable (timestamp + seq): a different miniapp must not spoof someone else's result.
|
|
66
|
+
if (!pending || pending.target !== targetPackageName)
|
|
67
|
+
return;
|
|
68
|
+
this.calls.delete(callId);
|
|
69
|
+
this.timers.clearTimeout(pending.timer);
|
|
70
|
+
if (payload.ok === true) {
|
|
71
|
+
if (this.payloadTooLarge(payload.result)) {
|
|
72
|
+
pending.settle(actionFailure(MiniappErrorCode.PAYLOAD_TOO_LARGE, "action result exceeded the 256 KB cap"));
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
pending.settle({ ok: true, data: payload.result ?? null });
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
pending.settle({
|
|
79
|
+
ok: false,
|
|
80
|
+
error: payload.error ?? {
|
|
81
|
+
code: MiniappErrorCode.INTERNAL,
|
|
82
|
+
message: "action handler error",
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=actionInvoke.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actionInvoke.js","sourceRoot":"","sources":["../../src/host/actionInvoke.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,aAAa,CAAA;AAY5C,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAY,EAAE,OAAe,EAAiB,EAAE,CAAC,CAAC,EAAC,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAC,IAAI,EAAE,OAAO,EAAC,EAAC,CAAC,CAAA;AAEpH,sDAAsD;AACtD,MAAM,UAAU,iBAAiB,CAAC,GAAgC,EAAE,QAAgB;IAClF,IAAI,CAAC,GAAG;QAAE,OAAO,KAAK,CAAA;IACtB,IAAI,GAAG,CAAC,aAAa,IAAI,GAAG,CAAC,aAAa,CAAC,YAAY,KAAK,KAAK;QAAE,OAAO,KAAK,CAAA;IAC/E,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,QAAQ,CAAC,CAAA;AAC3D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAC/B,GAAgC,EAChC,MAA0B,EAC1B,QAA4B,EAC5B,cAAuB;IAEvB,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC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ACD,OAAO,CAAC,MAAM,CAAC,EAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,MAAM,IAAI,IAAI,EAAC,CAAC,CAAA;YACxD,OAAM;QACR,CAAC;QACD,OAAO,CAAC,MAAM,CAAC;YACb,EAAE,EAAE,KAAK;YACT,KAAK,EAAG,OAAO,CAAC,KAAiC,IAAI;gBACnD,IAAI,EAAE,gBAAgB,CAAC,QAAQ;gBAC/B,OAAO,EAAE,sBAAsB;aAChC;SACF,CAAC,CAAA;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gesture registrations in claim order. Exactly one miniapp receives each
|
|
3
|
+
* gesture: the last registration containing it wins. Named scopes let an
|
|
4
|
+
* app temporarily claim gestures without overwriting its persistent shortcuts.
|
|
5
|
+
* Releasing a scope restores the preceding registration; stopping removes all
|
|
6
|
+
* of the app's scopes. This module has no native dependencies.
|
|
7
|
+
*/
|
|
8
|
+
interface GestureRegistration {
|
|
9
|
+
packageName: string;
|
|
10
|
+
scope: string;
|
|
11
|
+
gestures: ReadonlySet<string>;
|
|
12
|
+
}
|
|
13
|
+
export interface GestureClaimState {
|
|
14
|
+
registrations: readonly GestureRegistration[];
|
|
15
|
+
}
|
|
16
|
+
export interface GestureClaimChange {
|
|
17
|
+
packageName: string;
|
|
18
|
+
gesture: string;
|
|
19
|
+
held: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare function emptyGestureClaims(): GestureClaimState;
|
|
22
|
+
/** The single receiver of this gesture, regardless of how many scopes registered it. */
|
|
23
|
+
export declare function gestureClaimant(state: GestureClaimState, gesture: string): string | null;
|
|
24
|
+
/** Registration and current ownership differ when another app claimed more recently. */
|
|
25
|
+
export declare function hasGestureClaim(state: GestureClaimState, packageName: string, gesture: string): boolean;
|
|
26
|
+
/** Replace one scope's set. A nonempty registration always becomes the newest claim. */
|
|
27
|
+
export declare function setGestureClaims(state: GestureClaimState, packageName: string, gestures: readonly string[], scope?: string): {
|
|
28
|
+
state: GestureClaimState;
|
|
29
|
+
changes: GestureClaimChange[];
|
|
30
|
+
};
|
|
31
|
+
/** Stop removes every scope without notifying the stopped app. */
|
|
32
|
+
export declare function dropGestureClaims(state: GestureClaimState, packageName: string): {
|
|
33
|
+
state: GestureClaimState;
|
|
34
|
+
changes: GestureClaimChange[];
|
|
35
|
+
};
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=gestureClaims.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gestureClaims.d.ts","sourceRoot":"","sources":["../../src/host/gestureClaims.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,UAAU,mBAAmB;IAC3B,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;CAC9B;AAED,MAAM,WAAW,iBAAiB;IAChC,aAAa,EAAE,SAAS,mBAAmB,EAAE,CAAA;CAC9C;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,OAAO,CAAA;CACd;AAED,wBAAgB,kBAAkB,IAAI,iBAAiB,CAEtD;AAED,wFAAwF;AACxF,wBAAgB,eAAe,CAAC,KAAK,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMxF;AAED,wFAAwF;AACxF,wBAAgB,eAAe,CAAC,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAEvG;AAeD,wFAAwF;AACxF,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,iBAAiB,EACxB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,KAAK,SAAY,GAChB;IAAC,KAAK,EAAE,iBAAiB,CAAC;IAAC,OAAO,EAAE,kBAAkB,EAAE,CAAA;CAAC,CAO3D;AAED,kEAAkE;AAClE,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,iBAAiB,EACxB,WAAW,EAAE,MAAM,GAClB;IAAC,KAAK,EAAE,iBAAiB,CAAC;IAAC,OAAO,EAAE,kBAAkB,EAAE,CAAA;CAAC,CAG3D"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export function emptyGestureClaims() {
|
|
2
|
+
return { registrations: [] };
|
|
3
|
+
}
|
|
4
|
+
/** The single receiver of this gesture, regardless of how many scopes registered it. */
|
|
5
|
+
export function gestureClaimant(state, gesture) {
|
|
6
|
+
for (let i = state.registrations.length - 1; i >= 0; i--) {
|
|
7
|
+
const registration = state.registrations[i];
|
|
8
|
+
if (registration.gestures.has(gesture))
|
|
9
|
+
return registration.packageName;
|
|
10
|
+
}
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
/** Registration and current ownership differ when another app claimed more recently. */
|
|
14
|
+
export function hasGestureClaim(state, packageName, gesture) {
|
|
15
|
+
return state.registrations.some((entry) => entry.packageName === packageName && entry.gestures.has(gesture));
|
|
16
|
+
}
|
|
17
|
+
function changesBetween(before, after) {
|
|
18
|
+
const gestures = new Set([...before.registrations, ...after.registrations].flatMap((entry) => [...entry.gestures]));
|
|
19
|
+
const changes = [];
|
|
20
|
+
for (const gesture of gestures) {
|
|
21
|
+
const was = gestureClaimant(before, gesture);
|
|
22
|
+
const now = gestureClaimant(after, gesture);
|
|
23
|
+
if (was === now)
|
|
24
|
+
continue;
|
|
25
|
+
if (was !== null)
|
|
26
|
+
changes.push({ packageName: was, gesture, held: false });
|
|
27
|
+
if (now !== null)
|
|
28
|
+
changes.push({ packageName: now, gesture, held: true });
|
|
29
|
+
}
|
|
30
|
+
return changes;
|
|
31
|
+
}
|
|
32
|
+
/** Replace one scope's set. A nonempty registration always becomes the newest claim. */
|
|
33
|
+
export function setGestureClaims(state, packageName, gestures, scope = "default") {
|
|
34
|
+
const registrations = state.registrations.filter((entry) => entry.packageName !== packageName || entry.scope !== scope);
|
|
35
|
+
if (gestures.length)
|
|
36
|
+
registrations.push({ packageName, scope, gestures: new Set(gestures) });
|
|
37
|
+
const after = { registrations };
|
|
38
|
+
return { state: after, changes: changesBetween(state, after) };
|
|
39
|
+
}
|
|
40
|
+
/** Stop removes every scope without notifying the stopped app. */
|
|
41
|
+
export function dropGestureClaims(state, packageName) {
|
|
42
|
+
const after = { registrations: state.registrations.filter((entry) => entry.packageName !== packageName) };
|
|
43
|
+
return { state: after, changes: changesBetween(state, after).filter((change) => change.packageName !== packageName) };
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=gestureClaims.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gestureClaims.js","sourceRoot":"","sources":["../../src/host/gestureClaims.ts"],"names":[],"mappings":"AAuBA,MAAM,UAAU,kBAAkB;IAChC,OAAO,EAAC,aAAa,EAAE,EAAE,EAAC,CAAA;AAC5B,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,eAAe,CAAC,KAAwB,EAAE,OAAe;IACvE,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QACzD,MAAM,YAAY,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAA;QAC3C,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC;YAAE,OAAO,YAAY,CAAC,WAAW,CAAA;IACzE,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,eAAe,CAAC,KAAwB,EAAE,WAAmB,EAAE,OAAe;IAC5F,OAAO,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,KAAK,WAAW,I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QAAE,aAAa,CAAC,IAAI,CAAC,EAAC,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,GAAG,CAAC,QAAQ,CAAC,EAAC,CAAC,CAAA;IAC1F,MAAM,KAAK,GAAG,EAAC,aAAa,EAAC,CAAA;IAC7B,OAAO,EAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,EAAC,CAAA;AAC9D,CAAC;AAED,kEAAkE;AAClE,MAAM,UAAU,iBAAiB,CAC/B,KAAwB,EACxB,WAAmB;IAEnB,MAAM,KAAK,GAAG,EAAC,aAAa,EAAE,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,KAAK,WAAW,CAAC,EAAC,CAAA;IACvG,OAAO,EAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,KAAK,WAAW,CAAC,EAAC,CAAA;AACrH,CAAC"}
|
package/dist/host/index.d.ts
CHANGED
|
@@ -4,4 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export { buildUiShim, type UiShimOptions } from "./uiShim";
|
|
6
6
|
export { buildWebviewGlobalsScript, buildSafeAreaUpdateScript, type BuildWebviewGlobalsOptions, type CapsuleMenuRect, type MiniappColorScheme, type MiniappSafeArea, } from "./webviewGlobals";
|
|
7
|
+
export * from "./memory/MemoryStore";
|
|
8
|
+
export * from "./memory/search";
|
|
9
|
+
export * from "./widgetPlacements";
|
|
10
|
+
export * from "./gestureClaims";
|
|
11
|
+
export * from "./miniappPermissions";
|
|
12
|
+
export * from "./actionInvoke";
|
|
13
|
+
export * from "./manifestActions";
|
|
14
|
+
export * from "./settingsBridge";
|
|
7
15
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/host/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/host/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAC,WAAW,EAAE,KAAK,aAAa,EAAC,MAAM,UAAU,CAAA;AACxD,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,KAAK,0BAA0B,EAC/B,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,eAAe,GACrB,MAAM,kBAAkB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/host/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAC,WAAW,EAAE,KAAK,aAAa,EAAC,MAAM,UAAU,CAAA;AACxD,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,KAAK,0BAA0B,EAC/B,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,eAAe,GACrB,MAAM,kBAAkB,CAAA;AAGzB,cAAc,sBAAsB,CAAA;AACpC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA"}
|
package/dist/host/index.js
CHANGED
|
@@ -4,4 +4,13 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export { buildUiShim } from "./uiShim";
|
|
6
6
|
export { buildWebviewGlobalsScript, buildSafeAreaUpdateScript, } from "./webviewGlobals";
|
|
7
|
+
// Host rules with no device or network access, shared by the Glassly App and glassly sim.
|
|
8
|
+
export * from "./memory/MemoryStore";
|
|
9
|
+
export * from "./memory/search";
|
|
10
|
+
export * from "./widgetPlacements";
|
|
11
|
+
export * from "./gestureClaims";
|
|
12
|
+
export * from "./miniappPermissions";
|
|
13
|
+
export * from "./actionInvoke";
|
|
14
|
+
export * from "./manifestActions";
|
|
15
|
+
export * from "./settingsBridge";
|
|
7
16
|
//# sourceMappingURL=index.js.map
|
package/dist/host/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/host/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAC,WAAW,EAAqB,MAAM,UAAU,CAAA;AACxD,OAAO,EACL,yBAAyB,EACzB,yBAAyB,GAK1B,MAAM,kBAAkB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/host/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAC,WAAW,EAAqB,MAAM,UAAU,CAAA;AACxD,OAAO,EACL,yBAAyB,EACzB,yBAAyB,GAK1B,MAAM,kBAAkB,CAAA;AAEzB,0FAA0F;AAC1F,cAAc,sBAAsB,CAAA;AACpC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A manifest-declared action a miniapp exposes for other miniapps to invoke
|
|
3
|
+
* via `session.actions`. Populated from `miniapp.json`'s `actions` field.
|
|
4
|
+
* Shape maps 1:1 onto an MCP tool (id→name, description, parameters→inputSchema).
|
|
5
|
+
*/
|
|
6
|
+
export interface DeclaredAction {
|
|
7
|
+
id: string;
|
|
8
|
+
description: string;
|
|
9
|
+
/** JSON-Schema input descriptor (MCP-compatible subset). */
|
|
10
|
+
parameters?: Record<string, unknown>;
|
|
11
|
+
/** JSON-Schema descriptor for the action's structured result. */
|
|
12
|
+
outputSchema?: Record<string, unknown>;
|
|
13
|
+
/**
|
|
14
|
+
* Who may invoke the action: "public" (default — any installed miniapp) or
|
|
15
|
+
* "system" (system miniapps such as the AI assistant only).
|
|
16
|
+
*/
|
|
17
|
+
visibility?: "public" | "system";
|
|
18
|
+
}
|
|
19
|
+
export type DeclaredWidgetSize = "XS" | "XSM" | "SM" | "MD" | "LG";
|
|
20
|
+
/** A dashboard widget a miniapp declares in `miniapp.json` and serves through `session.widgets`. */
|
|
21
|
+
export interface DeclaredWidget {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
sizes: DeclaredWidgetSize[];
|
|
25
|
+
defaultSize: DeclaredWidgetSize;
|
|
26
|
+
/** Lists the `EX` size: a tap on the selected widget can expand it to the full screen. */
|
|
27
|
+
expandable: boolean;
|
|
28
|
+
/** A tap expands it rather than activating the card: expandable, and the wearer left expansion on. */
|
|
29
|
+
expandOnTap: boolean;
|
|
30
|
+
}
|
|
31
|
+
/** The subset of ClientApp that action-listing needs (structural, no cycle on applet types). */
|
|
32
|
+
export interface ActionListApp {
|
|
33
|
+
packageName: string;
|
|
34
|
+
name: string;
|
|
35
|
+
actions?: DeclaredAction[];
|
|
36
|
+
compatibility?: {
|
|
37
|
+
isCompatible: boolean;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/** One row of `session.actions.list` — a flat, MCP-tool-shaped descriptor. */
|
|
41
|
+
export interface ActionListRow {
|
|
42
|
+
packageName: string;
|
|
43
|
+
appName: string;
|
|
44
|
+
id: string;
|
|
45
|
+
description: string;
|
|
46
|
+
parameters?: Record<string, unknown>;
|
|
47
|
+
outputSchema?: Record<string, unknown>;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Project the installed-app set into the caller's invokable-action rows:
|
|
51
|
+
* excludes the caller's own actions, incompatible apps, and placeholder
|
|
52
|
+
* packages; `visibility: "system"` actions only surface for system callers.
|
|
53
|
+
*/
|
|
54
|
+
export declare function visibleActionRows(apps: ActionListApp[], callerPackageName: string, callerIsSystem: boolean): ActionListRow[];
|
|
55
|
+
/**
|
|
56
|
+
* Normalize manifest actions defensively for installed and dev-sideloaded
|
|
57
|
+
* bundles. Input and output schemas are passed through as opaque JSON Schema.
|
|
58
|
+
*/
|
|
59
|
+
export declare function normalizeManifestActions(raw: unknown): DeclaredAction[];
|
|
60
|
+
/**
|
|
61
|
+
* Normalize manifest widgets for installed and dev-sideloaded bundles: an
|
|
62
|
+
* entry without an id, a name or a usable card size is dropped, repeats of a
|
|
63
|
+
* size are folded, and a default size the widget does not offer becomes
|
|
64
|
+
* its first size. Listing `EX` makes a widget expandable; it is not a card
|
|
65
|
+
* size. Taps expand it until the wearer turns that off (AppRegistry applies
|
|
66
|
+
* the choice).
|
|
67
|
+
*/
|
|
68
|
+
export declare function normalizeManifestWidgets(raw: unknown): DeclaredWidget[];
|
|
69
|
+
//# sourceMappingURL=manifestActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifestActions.d.ts","sourceRoot":"","sources":["../../src/host/manifestActions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EAAE,MAAM,CAAA;IACnB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACpC,iEAAiE;IACjE,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACtC;;;OAGG;IACH,UAAU,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAA;CACjC;AAED,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAElE,oGAAoG;AACpG,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,kBAAkB,EAAE,CAAA;IAC3B,WAAW,EAAE,kBAAkB,CAAA;IAC/B,0FAA0F;IAC1F,UAAU,EAAE,OAAO,CAAA;IACnB,sGAAsG;IACtG,WAAW,EAAE,OAAO,CAAA;CACrB;AAED,gGAAgG;AAChG,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,cAAc,EAAE,CAAA;IAC1B,aAAa,CAAC,EAAE;QAAC,YAAY,EAAE,OAAO,CAAA;KAAC,CAAA;CACxC;AAED,8EAA8E;AAC9E,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACvC;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,aAAa,EAAE,EACrB,iBAAiB,EAAE,MAAM,EACzB,cAAc,EAAE,OAAO,GACtB,aAAa,EAAE,CAkBjB;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,OAAO,GAAG,cAAc,EAAE,CA0BvE;AAMD;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,OAAO,GAAG,cAAc,EAAE,CA2BvE"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Project the installed-app set into the caller's invokable-action rows:
|
|
3
|
+
* excludes the caller's own actions, incompatible apps, and placeholder
|
|
4
|
+
* packages; `visibility: "system"` actions only surface for system callers.
|
|
5
|
+
*/
|
|
6
|
+
export function visibleActionRows(apps, callerPackageName, callerIsSystem) {
|
|
7
|
+
const rows = [];
|
|
8
|
+
for (const app of apps) {
|
|
9
|
+
if (!app.packageName || app.packageName === callerPackageName || app.packageName.includes("@empty"))
|
|
10
|
+
continue;
|
|
11
|
+
if (app.compatibility?.isCompatible === false)
|
|
12
|
+
continue;
|
|
13
|
+
for (const action of app.actions ?? []) {
|
|
14
|
+
if (action.visibility === "system" && !callerIsSystem)
|
|
15
|
+
continue;
|
|
16
|
+
rows.push({
|
|
17
|
+
packageName: app.packageName,
|
|
18
|
+
appName: app.name,
|
|
19
|
+
id: action.id,
|
|
20
|
+
description: action.description,
|
|
21
|
+
...(action.parameters ? { parameters: action.parameters } : {}),
|
|
22
|
+
...(action.outputSchema ? { outputSchema: action.outputSchema } : {}),
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return rows;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Normalize manifest actions defensively for installed and dev-sideloaded
|
|
30
|
+
* bundles. Input and output schemas are passed through as opaque JSON Schema.
|
|
31
|
+
*/
|
|
32
|
+
export function normalizeManifestActions(raw) {
|
|
33
|
+
if (!Array.isArray(raw))
|
|
34
|
+
return [];
|
|
35
|
+
const out = [];
|
|
36
|
+
for (const a of raw) {
|
|
37
|
+
if (a && typeof a.id === "string" && typeof a.description === "string") {
|
|
38
|
+
out.push({
|
|
39
|
+
id: a.id,
|
|
40
|
+
description: a.description,
|
|
41
|
+
...(a.parameters && typeof a.parameters === "object" && !Array.isArray(a.parameters)
|
|
42
|
+
? { parameters: a.parameters }
|
|
43
|
+
: {}),
|
|
44
|
+
...(a.outputSchema && typeof a.outputSchema === "object" && !Array.isArray(a.outputSchema)
|
|
45
|
+
? { outputSchema: a.outputSchema }
|
|
46
|
+
: {}),
|
|
47
|
+
// Unknown/absent values fall back to the default ("public") by omission.
|
|
48
|
+
...(a.visibility === "system" || a.visibility === "public" ? { visibility: a.visibility } : {}),
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return out;
|
|
53
|
+
}
|
|
54
|
+
const WIDGET_SIZES = ["XS", "XSM", "SM", "MD", "LG"];
|
|
55
|
+
const isWidgetSize = (value) => WIDGET_SIZES.includes(value);
|
|
56
|
+
/**
|
|
57
|
+
* Normalize manifest widgets for installed and dev-sideloaded bundles: an
|
|
58
|
+
* entry without an id, a name or a usable card size is dropped, repeats of a
|
|
59
|
+
* size are folded, and a default size the widget does not offer becomes
|
|
60
|
+
* its first size. Listing `EX` makes a widget expandable; it is not a card
|
|
61
|
+
* size. Taps expand it until the wearer turns that off (AppRegistry applies
|
|
62
|
+
* the choice).
|
|
63
|
+
*/
|
|
64
|
+
export function normalizeManifestWidgets(raw) {
|
|
65
|
+
if (!Array.isArray(raw))
|
|
66
|
+
return [];
|
|
67
|
+
const out = [];
|
|
68
|
+
const seen = new Set();
|
|
69
|
+
for (const w of raw) {
|
|
70
|
+
if (!w || typeof w.id !== "string" || !w.id || typeof w.name !== "string" || !w.name || seen.has(w.id))
|
|
71
|
+
continue;
|
|
72
|
+
const sizes = Array.isArray(w.sizes) ? Array.from(new Set(w.sizes.filter(isWidgetSize))) : [];
|
|
73
|
+
if (sizes.length === 0)
|
|
74
|
+
continue;
|
|
75
|
+
seen.add(w.id);
|
|
76
|
+
// `expandable: true` is how bundles from before `EX` said the same.
|
|
77
|
+
const expandable = (Array.isArray(w.sizes) && w.sizes.includes("EX")) || w.expandable === true;
|
|
78
|
+
out.push({
|
|
79
|
+
id: w.id,
|
|
80
|
+
name: w.name,
|
|
81
|
+
sizes,
|
|
82
|
+
defaultSize: isWidgetSize(w.defaultSize) && sizes.includes(w.defaultSize) ? w.defaultSize : sizes[0],
|
|
83
|
+
expandable,
|
|
84
|
+
expandOnTap: expandable,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
return out;
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=manifestActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifestActions.js","sourceRoot":"","sources":["../../src/host/manifestActions.ts"],"names":[],"mappings":"AAmDA;;;;GAIG;AACH,MAAM,UA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C,KAAK,CAAC,CAAC,CAAC;YACpG,UAAU;YACV,WAAW,EAAE,UAAU;SACxB,CAAC,CAAA;IACJ,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC"}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MemoryStore — the user's shared, phone-local memory timeline.
|
|
3
|
+
*
|
|
4
|
+
* One unified per-hour stream of what happened around the user — spoken
|
|
5
|
+
* transcript lines AND notes (manual, voice, auto) in one timeline — plus the
|
|
6
|
+
* hourly conversation summary that heads each session. Scoped to the Glassly
|
|
7
|
+
* USER (not to a miniapp): every miniapp that declares the MEMORY manifest
|
|
8
|
+
* permission reads and writes the same store through LocalMiniappRuntime's
|
|
9
|
+
* MEMORY_* handlers, and Settings > Memory manages it via engine.memory.
|
|
10
|
+
*
|
|
11
|
+
* A "session" is one clock hour that has entries, derived from entry
|
|
12
|
+
* timestamps at read time — nothing is stored per-session, so there is no
|
|
13
|
+
* session id to keep in sync.
|
|
14
|
+
*
|
|
15
|
+
* The store began life inside the Assist miniapp (its SessionStore); on first
|
|
16
|
+
* load it migrates Assist's per-app storage namespace into the shared
|
|
17
|
+
* user-scoped keys so existing history survives the move.
|
|
18
|
+
*/
|
|
19
|
+
import type { MemoryBackup, MemoryEntry, MemoryImportResult, MemoryNoteSource, MemorySession, MemorySummary } from "../../modules/memory";
|
|
20
|
+
/**
|
|
21
|
+
* Physical bounds. There is no age cap: the timeline stays until the user
|
|
22
|
+
* deletes it (clear()/removeScope). The entry cap bounds the write cost —
|
|
23
|
+
* every persist re-serializes the whole timeline, so it is a perf ceiling as
|
|
24
|
+
* much as a product number — and the summary cap keeps one row per hour for
|
|
25
|
+
* about half a year of round-the-clock use, far longer at a normal pace.
|
|
26
|
+
*/
|
|
27
|
+
export declare const MEMORY_BOUNDS: {
|
|
28
|
+
maxEntries: number;
|
|
29
|
+
maxSummaries: number;
|
|
30
|
+
};
|
|
31
|
+
export interface MemoryStoreBackend {
|
|
32
|
+
get(key: string): unknown | null;
|
|
33
|
+
set(key: string, value: unknown): void;
|
|
34
|
+
remove(key: string): void;
|
|
35
|
+
}
|
|
36
|
+
export interface MemoryStoreHooks {
|
|
37
|
+
getUserId: () => Promise<string>;
|
|
38
|
+
backend: MemoryStoreBackend;
|
|
39
|
+
/**
|
|
40
|
+
* Debounce window for transcript-line writes, in ms. Appends coalesce into
|
|
41
|
+
* one serialization instead of re-stringifying the whole timeline per
|
|
42
|
+
* utterance. Set to 0 to persist synchronously (tests).
|
|
43
|
+
*/
|
|
44
|
+
writeDebounceMs?: number;
|
|
45
|
+
timers?: MemoryStoreTimers;
|
|
46
|
+
}
|
|
47
|
+
/** The host's background-safe timer (the Glassly App's BgTimer); global timers when absent. */
|
|
48
|
+
export interface MemoryStoreTimers {
|
|
49
|
+
setTimeout(cb: () => void, ms: number): unknown;
|
|
50
|
+
clearTimeout(id: unknown): void;
|
|
51
|
+
}
|
|
52
|
+
export interface MemoryStats {
|
|
53
|
+
entryCount: number;
|
|
54
|
+
lineCount: number;
|
|
55
|
+
noteCount: number;
|
|
56
|
+
summaryCount: number;
|
|
57
|
+
/** Epoch ms of the oldest entry, or null when empty. */
|
|
58
|
+
oldestAt: number | null;
|
|
59
|
+
}
|
|
60
|
+
/** Thrown by importBackup for anything that isn't a backup this build can read. */
|
|
61
|
+
export declare class MemoryBackupError extends Error {
|
|
62
|
+
constructor(message: string);
|
|
63
|
+
}
|
|
64
|
+
export declare function hourStartOf(ms: number): number;
|
|
65
|
+
export declare function dayStartOf(ms: number): number;
|
|
66
|
+
export declare class MemoryStore {
|
|
67
|
+
private readonly hooks;
|
|
68
|
+
private entries;
|
|
69
|
+
private summaries;
|
|
70
|
+
/** User the in-memory cache was loaded for; reload when identity changes. */
|
|
71
|
+
private loadedUserId;
|
|
72
|
+
private loadPromise;
|
|
73
|
+
private readonly changeListeners;
|
|
74
|
+
/** Pending debounced log write (transcript appends), if any. */
|
|
75
|
+
private logFlushTimer;
|
|
76
|
+
private logDirty;
|
|
77
|
+
constructor(hooks: MemoryStoreHooks);
|
|
78
|
+
private get timers();
|
|
79
|
+
/**
|
|
80
|
+
* Write any debounced changes out now. Call before the app backgrounds or
|
|
81
|
+
* terminates so a crash can't lose the coalesced tail of the timeline.
|
|
82
|
+
*/
|
|
83
|
+
flush(): Promise<void>;
|
|
84
|
+
/** Subscribe to mutations (adds, edits, deletes, clears). */
|
|
85
|
+
onChanged(listener: () => void): () => void;
|
|
86
|
+
appendLine(input: {
|
|
87
|
+
text: string;
|
|
88
|
+
speakerId: string | null;
|
|
89
|
+
/** Resolved enrolled-speaker name (on-device speaker ID), when known. */
|
|
90
|
+
resolvedSpeakerName?: string | null;
|
|
91
|
+
language: string | null;
|
|
92
|
+
at: number;
|
|
93
|
+
}): Promise<void>;
|
|
94
|
+
/**
|
|
95
|
+
* Add a note. `at` targets the hour it belongs to — pass a timestamp inside
|
|
96
|
+
* a past hour to append to that session. Dedupes on normalized text within
|
|
97
|
+
* the same hour (auto-notes re-extract); resolves null on duplicate/empty.
|
|
98
|
+
*/
|
|
99
|
+
addNote(text: string, source: MemoryNoteSource, at?: number): Promise<MemoryEntry | null>;
|
|
100
|
+
/** Rewrite a note's text in place (Settings > Memory edit). */
|
|
101
|
+
updateNote(id: string, text: string): Promise<boolean>;
|
|
102
|
+
removeEntry(id: string): Promise<boolean>;
|
|
103
|
+
/** Delete every entry (and summary) in an hour, or a whole day of hours. */
|
|
104
|
+
removeScope(scope: "session" | "day", at: number): Promise<void>;
|
|
105
|
+
/** Drop the entire timeline: every entry and every summary. */
|
|
106
|
+
clear(): Promise<void>;
|
|
107
|
+
addSummary(summary: MemorySummary): Promise<void>;
|
|
108
|
+
/** Entries in [sinceMs, untilMs), newest last. */
|
|
109
|
+
window(sinceMs: number, untilMs?: number): Promise<MemoryEntry[]>;
|
|
110
|
+
/** All note entries, newest first (Settings > Memory list). */
|
|
111
|
+
notes(): Promise<MemoryEntry[]>;
|
|
112
|
+
stats(): Promise<MemoryStats>;
|
|
113
|
+
/** All sessions (hours with entries), newest hour first. */
|
|
114
|
+
sessionList(): Promise<MemorySession[]>;
|
|
115
|
+
/**
|
|
116
|
+
* Query the FULL store by absolute-time window and keyword — the executor
|
|
117
|
+
* behind LLM history-search tools. Newest last, so the limit keeps the most
|
|
118
|
+
* recent matches. `contains` is an exact substring; `terms` is fuzzy any-of
|
|
119
|
+
* matching (mistranscribed-name tolerant) — see search.ts.
|
|
120
|
+
*/
|
|
121
|
+
query(q: {
|
|
122
|
+
sinceMs?: number;
|
|
123
|
+
untilMs?: number;
|
|
124
|
+
contains?: string;
|
|
125
|
+
terms?: string[];
|
|
126
|
+
limit?: number;
|
|
127
|
+
}): Promise<MemoryEntry[]>;
|
|
128
|
+
/**
|
|
129
|
+
* query() plus `windowCount` — how many entries the TIME window held before
|
|
130
|
+
* keyword filtering, so an LLM caller can distinguish "keyword matched
|
|
131
|
+
* nothing" from "history doesn't reach that far back" without a retry.
|
|
132
|
+
*/
|
|
133
|
+
search(q: {
|
|
134
|
+
sinceMs?: number;
|
|
135
|
+
untilMs?: number;
|
|
136
|
+
contains?: string;
|
|
137
|
+
terms?: string[];
|
|
138
|
+
limit?: number;
|
|
139
|
+
}): Promise<{
|
|
140
|
+
entries: MemoryEntry[];
|
|
141
|
+
windowCount: number;
|
|
142
|
+
}>;
|
|
143
|
+
summaryList(): Promise<MemorySummary[]>;
|
|
144
|
+
/** Most recent COMPLETED hour with lines but no summary, or null. */
|
|
145
|
+
pendingSummaryHour(nowMs?: number): Promise<number | null>;
|
|
146
|
+
/** The whole timeline as a backup file body (Settings > Memory, session.memory.exportFile). */
|
|
147
|
+
exportBackup(): Promise<MemoryBackup>;
|
|
148
|
+
/**
|
|
149
|
+
* Merge a backup into the timeline. Skips entries whose id is stored, notes
|
|
150
|
+
* whose text is already in the same hour, and hours that already have a
|
|
151
|
+
* summary. Throws MemoryBackupError when `data` isn't a memory backup.
|
|
152
|
+
*/
|
|
153
|
+
importBackup(data: unknown): Promise<MemoryImportResult>;
|
|
154
|
+
/** Plain-text export of a scope, for the OS share sheet. */
|
|
155
|
+
exportText(scope: "session" | "day" | "all", at?: number): Promise<string>;
|
|
156
|
+
private ensureLoaded;
|
|
157
|
+
private loadFor;
|
|
158
|
+
/**
|
|
159
|
+
* One-time migration: fold the Assist miniapp's per-app store (the previous
|
|
160
|
+
* home of this timeline) into the shared user-scoped keys. Assist's old keys
|
|
161
|
+
* are left in place; its new build reads through the memory bridge instead.
|
|
162
|
+
*/
|
|
163
|
+
private migrateFromAssist;
|
|
164
|
+
/** Keep the newest MEMORY_BOUNDS.maxEntries; nothing goes for age — deleting is the user's call. */
|
|
165
|
+
private prune;
|
|
166
|
+
private key;
|
|
167
|
+
/**
|
|
168
|
+
* Mark the log dirty and arm the debounce timer. Repeated appends inside the
|
|
169
|
+
* window collapse into a single serialization; the first append after a
|
|
170
|
+
* flush starts a fresh window (trailing-edge, so a steady stream of speech
|
|
171
|
+
* still lands on disk every `writeDebounceMs`).
|
|
172
|
+
*/
|
|
173
|
+
private schedulePersistLog;
|
|
174
|
+
private persistLog;
|
|
175
|
+
private persistSummaries;
|
|
176
|
+
private emitChanged;
|
|
177
|
+
}
|
|
178
|
+
//# sourceMappingURL=MemoryStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MemoryStore.d.ts","sourceRoot":"","sources":["../../../src/host/memory/MemoryStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACd,MAAM,sBAAsB,CAAA;AAwB7B;;;;;;GAMG;AACH,eAAO,MAAM,aAAa;;;CAGzB,CAAA;AAWD,MAAM,WAAW,kBAAkB;IACjC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAAA;IAChC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,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