@dualityinstitute/blink 0.0.1 → 0.0.3
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 +9 -8
- package/dist/cli.js +23 -79
- package/dist/electron/main.js +3 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ floating popup.
|
|
|
16
16
|
|
|
17
17
|
- macOS; Meeting audio capture requires macOS 26 or newer
|
|
18
18
|
- [Bun](https://bun.sh/) 1.0.17 or newer
|
|
19
|
-
- A Blink
|
|
19
|
+
- A Blink access token from [duality.institute/blink](https://www.duality.institute/blink)
|
|
20
20
|
|
|
21
21
|
The desktop app does not require OpenCode, Codex, Claude Code, or model
|
|
22
22
|
credentials on the Mac.
|
|
@@ -27,18 +27,19 @@ credentials on the Mac.
|
|
|
27
27
|
bunx @dualityinstitute/blink install
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
The terminal UI asks for the
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
The terminal UI asks for the access token, writes `~/.blink/config.json`, and
|
|
31
|
+
installs the global `blink` command. No DMG is required. Blink Cloud is reached
|
|
32
|
+
at its default URL, so only the token is needed.
|
|
33
33
|
|
|
34
34
|
For non-interactive installation:
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
bunx @dualityinstitute/blink install
|
|
38
|
-
--api-url https://blink.example.com \
|
|
39
|
-
--token blink_customer_token
|
|
37
|
+
bunx @dualityinstitute/blink install --token blink_customer_token
|
|
40
38
|
```
|
|
41
39
|
|
|
40
|
+
Pass `--api-url` as well to point the app at a different gateway, such as a
|
|
41
|
+
local one during development.
|
|
42
|
+
|
|
42
43
|
Then launch the menu-bar app:
|
|
43
44
|
|
|
44
45
|
```bash
|
|
@@ -148,7 +149,7 @@ and token totals are kept for billing.
|
|
|
148
149
|
|
|
149
150
|
| Key | Default | Purpose |
|
|
150
151
|
|---|---|---|
|
|
151
|
-
| `apiUrl` |
|
|
152
|
+
| `apiUrl` | Blink Cloud | Gateway base URL; override only for a self-hosted or local gateway |
|
|
152
153
|
| `accessToken` | Empty | Bearer token issued for Blink Cloud |
|
|
153
154
|
| `screenshotDir` | `~/blinkDir/` | Watched PNG directory |
|
|
154
155
|
| `hideFromCapture` | `true` | Enables privacy mode |
|
package/dist/cli.js
CHANGED
|
@@ -1146,30 +1146,6 @@ var u$1 = class u2 extends V {
|
|
|
1146
1146
|
});
|
|
1147
1147
|
}
|
|
1148
1148
|
};
|
|
1149
|
-
class n extends V {
|
|
1150
|
-
get userInputWithCursor() {
|
|
1151
|
-
if (this.state === "submit")
|
|
1152
|
-
return this.userInput;
|
|
1153
|
-
const t2 = this.userInput;
|
|
1154
|
-
if (this.cursor >= t2.length)
|
|
1155
|
-
return `${this.userInput}\u2588`;
|
|
1156
|
-
const r = t2.slice(0, this.cursor), s = t2.slice(this.cursor, this.cursor + 1), e = t2.slice(this.cursor + 1);
|
|
1157
|
-
return `${r}${styleText("inverse", s)}${e}`;
|
|
1158
|
-
}
|
|
1159
|
-
get cursor() {
|
|
1160
|
-
return this._cursor;
|
|
1161
|
-
}
|
|
1162
|
-
constructor(t2) {
|
|
1163
|
-
super({
|
|
1164
|
-
...t2,
|
|
1165
|
-
initialUserInput: t2.initialUserInput ?? t2.initialValue
|
|
1166
|
-
}), this.on("userInput", (r) => {
|
|
1167
|
-
this._setValue(r);
|
|
1168
|
-
}), this.on("finalize", () => {
|
|
1169
|
-
this.value || (this.value = t2.defaultValue), this.value === undefined && (this.value = "");
|
|
1170
|
-
});
|
|
1171
|
-
}
|
|
1172
|
-
}
|
|
1173
1149
|
|
|
1174
1150
|
// node_modules/@clack/prompts/dist/index.mjs
|
|
1175
1151
|
import { styleText as styleText2, stripVTControlCharacters } from "util";
|
|
@@ -1290,44 +1266,6 @@ var SELECT_INSTRUCTIONS = [
|
|
|
1290
1266
|
`${styleText2("dim", "Enter:")} confirm`
|
|
1291
1267
|
];
|
|
1292
1268
|
var i = `${styleText2("gray", S_BAR)} `;
|
|
1293
|
-
var text = (e) => new n({
|
|
1294
|
-
validate: e.validate,
|
|
1295
|
-
placeholder: e.placeholder,
|
|
1296
|
-
defaultValue: e.defaultValue,
|
|
1297
|
-
initialValue: e.initialValue,
|
|
1298
|
-
output: e.output,
|
|
1299
|
-
signal: e.signal,
|
|
1300
|
-
input: e.input,
|
|
1301
|
-
render() {
|
|
1302
|
-
const i2 = e?.withGuide ?? settings.withGuide, s = `${`${i2 ? `${styleText2("gray", S_BAR)}
|
|
1303
|
-
` : ""}${symbol(this.state)} `}${e.message}
|
|
1304
|
-
`, c2 = e.placeholder && e.placeholder.length > 0 ? styleText2("inverse", e.placeholder[0]) + styleText2("dim", e.placeholder.slice(1)) : styleText2(["inverse", "hidden"], "_"), o2 = this.userInput ? this.userInputWithCursor : c2, l = this.value ?? "";
|
|
1305
|
-
switch (this.state) {
|
|
1306
|
-
case "error": {
|
|
1307
|
-
const n2 = this.error ? ` ${styleText2("yellow", this.error)}` : "", r2 = i2 ? `${styleText2("yellow", S_BAR)} ` : "", d = i2 ? styleText2("yellow", S_BAR_END) : "";
|
|
1308
|
-
return `${s.trim()}
|
|
1309
|
-
${r2}${o2}
|
|
1310
|
-
${d}${n2}
|
|
1311
|
-
`;
|
|
1312
|
-
}
|
|
1313
|
-
case "submit": {
|
|
1314
|
-
const n2 = l ? ` ${styleText2("dim", l)}` : "", r2 = i2 ? styleText2("gray", S_BAR) : "";
|
|
1315
|
-
return `${s}${r2}${n2}`;
|
|
1316
|
-
}
|
|
1317
|
-
case "cancel": {
|
|
1318
|
-
const n2 = l ? ` ${styleText2(["strikethrough", "dim"], l)}` : "", r2 = i2 ? styleText2("gray", S_BAR) : "";
|
|
1319
|
-
return `${s}${r2}${n2}${l.trim() ? `
|
|
1320
|
-
${r2}` : ""}`;
|
|
1321
|
-
}
|
|
1322
|
-
default: {
|
|
1323
|
-
const n2 = i2 ? `${styleText2("cyan", S_BAR)} ` : "", r2 = i2 ? styleText2("cyan", S_BAR_END) : "";
|
|
1324
|
-
return `${s}${n2}${o2}
|
|
1325
|
-
${r2}
|
|
1326
|
-
`;
|
|
1327
|
-
}
|
|
1328
|
-
}
|
|
1329
|
-
}
|
|
1330
|
-
}).prompt();
|
|
1331
1269
|
|
|
1332
1270
|
// src/cli.ts
|
|
1333
1271
|
import * as fs3 from "fs";
|
|
@@ -10356,8 +10294,8 @@ function ko_default() {
|
|
|
10356
10294
|
};
|
|
10357
10295
|
}
|
|
10358
10296
|
// node_modules/zod/v4/locales/lt.js
|
|
10359
|
-
var capitalizeFirstCharacter = (
|
|
10360
|
-
return
|
|
10297
|
+
var capitalizeFirstCharacter = (text) => {
|
|
10298
|
+
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
10361
10299
|
};
|
|
10362
10300
|
function getUnitTypeFromNumber(number2) {
|
|
10363
10301
|
const abs = Math.abs(number2);
|
|
@@ -19961,7 +19899,8 @@ var CloudUsageSchema = exports_external.object({
|
|
|
19961
19899
|
answersUsed: exports_external.number().int().nonnegative(),
|
|
19962
19900
|
answersLimit: exports_external.number().int().nonnegative(),
|
|
19963
19901
|
periodStart: exports_external.string().min(1),
|
|
19964
|
-
periodEnd: exports_external.string().min(1)
|
|
19902
|
+
periodEnd: exports_external.string().min(1),
|
|
19903
|
+
cancelAtPeriodEnd: exports_external.boolean().default(false)
|
|
19965
19904
|
});
|
|
19966
19905
|
var CloudIdentitySchema = exports_external.object({
|
|
19967
19906
|
active: exports_external.literal(true),
|
|
@@ -19970,8 +19909,10 @@ var CloudIdentitySchema = exports_external.object({
|
|
|
19970
19909
|
});
|
|
19971
19910
|
var CloudPortalSchema = exports_external.object({ url: exports_external.url() });
|
|
19972
19911
|
function formatUsage(usage) {
|
|
19973
|
-
const
|
|
19974
|
-
|
|
19912
|
+
const date5 = usage.periodEnd.slice(0, 10);
|
|
19913
|
+
const ending = usage.cancelAtPeriodEnd || usage.status === "canceled";
|
|
19914
|
+
const suffix = ending ? `access ends ${date5}` : `renews ${date5}`;
|
|
19915
|
+
return `${usage.answersUsed} / ${usage.answersLimit} answers this period, ${suffix}`;
|
|
19975
19916
|
}
|
|
19976
19917
|
|
|
19977
19918
|
class CloudProtocolError extends Error {
|
|
@@ -20015,7 +19956,7 @@ function parseCloudEvent(line) {
|
|
|
20015
19956
|
import * as fs from "fs";
|
|
20016
19957
|
import * as os from "os";
|
|
20017
19958
|
import * as path from "path";
|
|
20018
|
-
var DEFAULT_API_URL = "
|
|
19959
|
+
var DEFAULT_API_URL = "https://blink-gateway.salmoncoast-a526f33c.northcentralus.azurecontainerapps.io";
|
|
20019
19960
|
var DEFAULTS = {
|
|
20020
19961
|
apiUrl: DEFAULT_API_URL,
|
|
20021
19962
|
accessToken: "",
|
|
@@ -20149,6 +20090,18 @@ function ungrant() {
|
|
|
20149
20090
|
}
|
|
20150
20091
|
console.log("Cleared. Blink asks for Microphone and Screen & System Audio Recording again next launch.");
|
|
20151
20092
|
}
|
|
20093
|
+
function resetGrantsAfterInstall() {
|
|
20094
|
+
if (process.platform !== "darwin")
|
|
20095
|
+
return;
|
|
20096
|
+
try {
|
|
20097
|
+
if (resetGrants()) {
|
|
20098
|
+
console.log("Cleared macOS permissions so Blink can request them fresh.");
|
|
20099
|
+
}
|
|
20100
|
+
} catch (error61) {
|
|
20101
|
+
console.log(`Could not reset macOS permissions automatically: ${error61 instanceof Error ? error61.message : String(error61)}`);
|
|
20102
|
+
console.log("Run `blink ungrant` if capture or the microphone is denied.");
|
|
20103
|
+
}
|
|
20104
|
+
}
|
|
20152
20105
|
function resetGrants() {
|
|
20153
20106
|
const result = spawnSync("tccutil", ["reset", "All", BLINK_BUNDLE_ID], {
|
|
20154
20107
|
encoding: "utf8"
|
|
@@ -20321,6 +20274,7 @@ async function install(args) {
|
|
|
20321
20274
|
throw new Error(`Global installation failed with code ${result.status ?? 1}`);
|
|
20322
20275
|
}
|
|
20323
20276
|
}
|
|
20277
|
+
resetGrantsAfterInstall();
|
|
20324
20278
|
outro(`Configured Blink Cloud in ${getConfigPath()}. Run \`blink\` to start.`);
|
|
20325
20279
|
}
|
|
20326
20280
|
async function configure(args) {
|
|
@@ -20345,17 +20299,7 @@ async function selectCredentials(args, current) {
|
|
|
20345
20299
|
};
|
|
20346
20300
|
}
|
|
20347
20301
|
intro("Blink Cloud setup");
|
|
20348
|
-
|
|
20349
|
-
if (apiUrl === undefined) {
|
|
20350
|
-
const result = await text({
|
|
20351
|
-
message: "Blink Cloud URL",
|
|
20352
|
-
initialValue: current.apiUrl,
|
|
20353
|
-
validate: (value) => validationMessage(() => normalizeApiUrl(value ?? ""))
|
|
20354
|
-
});
|
|
20355
|
-
if (isCancel(result) || typeof result !== "string")
|
|
20356
|
-
return cancelSetup();
|
|
20357
|
-
apiUrl = result;
|
|
20358
|
-
}
|
|
20302
|
+
const apiUrl = explicitUrl ?? current.apiUrl;
|
|
20359
20303
|
let accessToken = explicitToken;
|
|
20360
20304
|
if (accessToken === undefined) {
|
|
20361
20305
|
const result = await password({
|
package/dist/electron/main.js
CHANGED
|
@@ -23061,7 +23061,7 @@ function date4(params) {
|
|
|
23061
23061
|
return _coercedDate(ZodDate, params);
|
|
23062
23062
|
}
|
|
23063
23063
|
// src/core/config.ts
|
|
23064
|
-
var DEFAULT_API_URL = "
|
|
23064
|
+
var DEFAULT_API_URL = "https://blink-gateway.salmoncoast-a526f33c.northcentralus.azurecontainerapps.io";
|
|
23065
23065
|
var DEFAULTS = {
|
|
23066
23066
|
apiUrl: DEFAULT_API_URL,
|
|
23067
23067
|
accessToken: "",
|
|
@@ -24817,7 +24817,8 @@ var CloudUsageSchema = exports_external.object({
|
|
|
24817
24817
|
answersUsed: exports_external.number().int().nonnegative(),
|
|
24818
24818
|
answersLimit: exports_external.number().int().nonnegative(),
|
|
24819
24819
|
periodStart: exports_external.string().min(1),
|
|
24820
|
-
periodEnd: exports_external.string().min(1)
|
|
24820
|
+
periodEnd: exports_external.string().min(1),
|
|
24821
|
+
cancelAtPeriodEnd: exports_external.boolean().default(false)
|
|
24821
24822
|
});
|
|
24822
24823
|
var CloudIdentitySchema = exports_external.object({
|
|
24823
24824
|
active: exports_external.literal(true),
|