zigmini 0.9.0-beta.3 → 1.0.0-beta.2
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.ko.md +36 -4
- package/README.md +36 -4
- package/assets/agent/gateway-rules.md +29 -19
- package/assets/android/zigmini.apk +0 -0
- package/assets/android/zigmini.apk.json +3 -3
- package/assets/build.json +1 -1
- package/docs/manual.ko.md +60 -11
- package/docs/manual.md +61 -12
- package/host/omo-bridge/agent-control.ts +274 -0
- package/host/omo-bridge/bridge.ts +1 -1
- package/host/omo-bridge/continuity-control.ts +1 -1
- package/host/omo-bridge/task-control.ts +26 -16
- package/host/omo-check/patches/omo-5.1.51-compaction-long-context.patch +92 -0
- package/host/omo-check/patches/omo-5.1.51-compaction-port.patch +2635 -0
- package/host/omo-check/patches/omo-5.1.51-compaction-recovery.patch +911 -0
- package/host/omo-check/patches/omo-5.1.51-gateway-port.manifest.json +363 -0
- package/host/omo-check/patches/omo-5.1.51-provider-failover.patch +50 -0
- package/host/omo-check/patches/omo-5.1.51-provider-port.patch +441 -0
- package/host/omo-check/patches/omo-5.1.51-rpc-port.patch +799 -0
- package/host/omo-check/patches/omo-5.1.51-runtime-compat.patch +31 -0
- package/package.json +3 -2
- package/src/agent/api.ts +215 -0
- package/src/agent/definition.ts +177 -0
- package/src/agent/fields.ts +42 -0
- package/src/agent/files.ts +192 -0
- package/src/agent/legacy-files.ts +46 -0
- package/src/agent/list.ts +21 -0
- package/src/agent-rules.ts +97 -13
- package/src/approvals.ts +6 -1
- package/src/cli/doctor.ts +7 -0
- package/src/cli/main.ts +38 -0
- package/src/cli/messages.ts +10 -2
- package/src/cli/rotate-main.ts +2 -1
- package/src/cli/rules.ts +70 -0
- package/src/cli/scan.ts +414 -0
- package/src/cli/security-import.ts +155 -0
- package/src/compact.ts +22 -0
- package/src/decisions.ts +6 -4
- package/src/engine/compat.json +3 -3
- package/src/engine/index.ts +1 -0
- package/src/engine/schema-guard.ts +12 -4
- package/src/engine/sdk.ts +8 -0
- package/src/formal-verification.ts +366 -0
- package/src/gc.ts +37 -6
- package/src/hub.ts +339 -79
- package/src/main.ts +95 -9
- package/src/maintenance.ts +1 -1
- package/src/manual.ts +9 -2
- package/src/profile-prompt.ts +73 -0
- package/src/profile.ts +33 -10
- package/src/protocol.ts +11 -2
- package/src/question-notifications.ts +4 -1
- package/src/reply-notifications.ts +7 -1
- package/src/repo-security-setting.ts +33 -0
- package/src/runtime/paths.ts +16 -0
- package/src/security/baseline.ts +172 -0
- package/src/security/dex-strings.ts +242 -0
- package/src/security/repo-scan.ts +369 -0
- package/src/security/revision-probe.ts +144 -0
- package/src/security/terms.ts +97 -0
- package/src/security-allow.ts +1 -0
- package/src/security-baseline.ts +113 -0
- package/src/security-check.ts +91 -16
- package/src/server-text.ts +38 -0
- package/src/store.ts +142 -16
- package/src/transcript.ts +7 -1
- package/src/ui-language.ts +33 -0
- package/src/update/check.ts +7 -3
- package/src/update/handoff-system.ts +24 -16
- package/src/update/handoff.ts +23 -12
- package/src/update/helper.ts +72 -36
- package/src/update/request.ts +46 -30
- package/src/update/state.ts +21 -11
- package/src/update/strategy.ts +12 -5
- package/src/update/target.ts +32 -15
- package/src/usage.ts +43 -20
- package/src/version.ts +39 -16
- package/src/voice/agents.ts +8 -3
- package/src/voice/install.ts +29 -18
- package/src/work-watch.ts +40 -18
- package/web/agent-icon.js +15 -9
- package/web/agents.d.ts +201 -0
- package/web/agents.js +813 -0
- package/web/app-download.js +32 -19
- package/web/app.js +1407 -278
- package/web/autocopy.js +6 -1
- package/web/boot.js +27 -8
- package/web/commands.js +20 -11
- package/web/decisions.js +70 -49
- package/web/devlog.js +25 -19
- package/web/diagram.js +8 -3
- package/web/enroll.js +43 -22
- package/web/gc.js +32 -19
- package/web/i18n/agent-icon.js +24 -0
- package/web/i18n/agents.js +48 -0
- package/web/i18n/app-download.js +26 -0
- package/web/i18n/autocopy.js +5 -0
- package/web/i18n/boot.js +24 -0
- package/web/i18n/commands.js +34 -0
- package/web/i18n/decisions.js +24 -0
- package/web/i18n/devlog.js +60 -0
- package/web/i18n/diagram.js +12 -0
- package/web/i18n/enroll.js +22 -0
- package/web/i18n/gc.js +38 -0
- package/web/i18n/lastsent.js +10 -0
- package/web/i18n/main.d.ts +4 -0
- package/web/i18n/main.js +527 -0
- package/web/i18n/manual.d.ts +4 -0
- package/web/i18n/manual.js +14 -0
- package/web/i18n/memo.js +30 -0
- package/web/i18n/notifications.js +16 -0
- package/web/i18n/profile.js +13 -0
- package/web/i18n/reference.js +26 -0
- package/web/i18n/security-inbox.js +40 -0
- package/web/i18n/slash.js +38 -0
- package/web/i18n/turn-stats.js +5 -0
- package/web/i18n/update.js +42 -0
- package/web/i18n/voice.js +28 -0
- package/web/i18n/wake.js +16 -0
- package/web/i18n/workid.js +10 -0
- package/web/i18n/workstatus.js +20 -0
- package/web/i18n.d.ts +20 -0
- package/web/i18n.js +63 -0
- package/web/index.html +156 -96
- package/web/lastsent.js +9 -4
- package/web/manual.d.ts +1 -1
- package/web/manual.js +11 -5
- package/web/memo.js +18 -13
- package/web/notifications.js +12 -7
- package/web/profile.js +42 -17
- package/web/reference.js +20 -15
- package/web/security-inbox.d.ts +18 -1
- package/web/security-inbox.js +173 -4
- package/web/slash.js +23 -13
- package/web/style.css +132 -3
- package/web/tooltip.js +5 -2
- package/web/turn-stats.js +6 -2
- package/web/update.js +31 -23
- package/web/voice.js +18 -8
- package/web/wake.d.ts +4 -0
- package/web/wake.js +7 -3
- package/web/workid.js +12 -2
- package/web/workstatus.js +36 -32
package/web/app-download.js
CHANGED
|
@@ -1,19 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { onLanguageChange, registerStrings, t } from "./i18n.js";
|
|
2
|
+
import strings from "./i18n/app-download.js";
|
|
3
|
+
|
|
4
|
+
registerStrings(strings);
|
|
4
5
|
|
|
5
6
|
export const DOWNLOAD_LINK_PATH = "/api/app/download-link";
|
|
6
7
|
export const APK_LINK = /^https?:\/\/[^\s/]+\/app\/zigmini\.apk\?t=[A-Za-z0-9_-]+$/;
|
|
7
8
|
export const QR_MARGIN = 4;
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
apk_unavailable: "
|
|
13
|
-
access_url_unknown: "
|
|
14
|
-
qr_unavailable: "
|
|
15
|
-
network: "
|
|
9
|
+
export let INSTALL_HINT = t("appDownload.installHint");
|
|
10
|
+
export let LOADING_LINE = t("appDownload.loading");
|
|
11
|
+
export let EXPIRED_LINE = t("appDownload.expired");
|
|
12
|
+
export let ERROR_LINES = Object.freeze({
|
|
13
|
+
apk_unavailable: t("appDownload.apkUnavailable"),
|
|
14
|
+
access_url_unknown: t("appDownload.accessUrlUnknown"),
|
|
15
|
+
qr_unavailable: t("appDownload.qrUnavailable"),
|
|
16
|
+
network: t("appDownload.network"),
|
|
16
17
|
});
|
|
18
|
+
function refreshStrings() {
|
|
19
|
+
INSTALL_HINT = t("appDownload.installHint");
|
|
20
|
+
LOADING_LINE = t("appDownload.loading");
|
|
21
|
+
EXPIRED_LINE = t("appDownload.expired");
|
|
22
|
+
ERROR_LINES = Object.freeze({
|
|
23
|
+
apk_unavailable: t("appDownload.apkUnavailable"),
|
|
24
|
+
access_url_unknown: t("appDownload.accessUrlUnknown"),
|
|
25
|
+
qr_unavailable: t("appDownload.qrUnavailable"),
|
|
26
|
+
network: t("appDownload.network"),
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
onLanguageChange(refreshStrings);
|
|
17
30
|
|
|
18
31
|
export function parseDownloadLink(body) {
|
|
19
32
|
if (body === null || typeof body !== "object") return null;
|
|
@@ -34,21 +47,21 @@ export function formatLeft(seconds) {
|
|
|
34
47
|
}
|
|
35
48
|
|
|
36
49
|
export function errorLine(error) {
|
|
37
|
-
return
|
|
50
|
+
return t(({ apk_unavailable: "appDownload.apkUnavailable", access_url_unknown: "appDownload.accessUrlUnknown", qr_unavailable: "appDownload.qrUnavailable", network: "appDownload.network" })[error] ?? "appDownload.error", { error });
|
|
38
51
|
}
|
|
39
52
|
|
|
40
53
|
/**
|
|
41
|
-
* What the
|
|
42
|
-
* `renew` the
|
|
54
|
+
* What the app download area shows: `qr` the drawing, `version` the served version, `countdown` the remaining time and
|
|
55
|
+
* `renew` the create-new button. No APK on this install leaves only the message, with no button to press.
|
|
43
56
|
*/
|
|
44
57
|
export function downloadView(state, now) {
|
|
45
58
|
const none = { qr: false, version: null, countdown: null, renew: false, expired: false, error: false };
|
|
46
|
-
if (state.status === "loading") return { ...none, message:
|
|
59
|
+
if (state.status === "loading") return { ...none, message: t("appDownload.loading") };
|
|
47
60
|
if (state.status === "error") return { ...none, renew: state.error !== "apk_unavailable", error: true, message: errorLine(state.error) };
|
|
48
|
-
if (!state.link) return { ...none, renew: true, message:
|
|
61
|
+
if (!state.link) return { ...none, renew: true, message: t("appDownload.installHint") };
|
|
49
62
|
const left = secondsLeft(state.link.expiresAt, now);
|
|
50
|
-
if (left === 0) return { ...none, renew: true, expired: true, message:
|
|
51
|
-
return { ...none, qr: true, version:
|
|
63
|
+
if (left === 0) return { ...none, renew: true, expired: true, message: t("appDownload.expired") };
|
|
64
|
+
return { ...none, qr: true, version: t("appDownload.version", { version: state.link.versionName }), countdown: t("appDownload.countdown", { time: formatLeft(left) }), message: t("appDownload.installHint") };
|
|
52
65
|
}
|
|
53
66
|
|
|
54
67
|
export function downloadQrSvg(qrcode, url) {
|
|
@@ -62,7 +75,7 @@ export function linkRequest() {
|
|
|
62
75
|
return { path: DOWNLOAD_LINK_PATH, init: { method: "POST" } };
|
|
63
76
|
}
|
|
64
77
|
|
|
65
|
-
/** The
|
|
78
|
+
/** The app download state machine; `deps.render(view, svg)` paints after every change, `svg` null whenever no QR shows. */
|
|
66
79
|
export function createAppDownload(deps) {
|
|
67
80
|
const s = { status: "idle", error: "", link: null, svg: null, timer: null };
|
|
68
81
|
|