instar 1.3.1601 → 1.3.1603
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/dashboard/console/nav-model.js +2 -0
- package/dashboard/glance.js +1 -0
- package/dashboard/index.html +23 -0
- package/dashboard/phones.js +146 -0
- package/dist/commands/init.d.ts +7 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +8 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +38 -0
- package/dist/commands/server.js.map +1 -1
- package/dist/core/BrowserCareProbes.d.ts +15 -0
- package/dist/core/BrowserCareProbes.d.ts.map +1 -0
- package/dist/core/BrowserCareProbes.js +78 -0
- package/dist/core/BrowserCareProbes.js.map +1 -0
- package/dist/core/MachineLockStateReader.d.ts +34 -0
- package/dist/core/MachineLockStateReader.d.ts.map +1 -0
- package/dist/core/MachineLockStateReader.js +114 -0
- package/dist/core/MachineLockStateReader.js.map +1 -0
- package/dist/core/MobileDeviceKeys.d.ts +7 -4
- package/dist/core/MobileDeviceKeys.d.ts.map +1 -1
- package/dist/core/MobileDeviceKeys.js +16 -5
- package/dist/core/MobileDeviceKeys.js.map +1 -1
- package/dist/core/MobilePush.d.ts +15 -4
- package/dist/core/MobilePush.d.ts.map +1 -1
- package/dist/core/MobilePush.js +16 -3
- package/dist/core/MobilePush.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts +12 -0
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +47 -0
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/types.d.ts +10 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/data/standards-guard-index.json +1 -1
- package/dist/data/standards-guard-index.meta.json +2 -2
- package/dist/data/standards-registry.meta.json +1 -1
- package/dist/monitoring/machineMaintenance/BrowserCare.d.ts +166 -0
- package/dist/monitoring/machineMaintenance/BrowserCare.d.ts.map +1 -0
- package/dist/monitoring/machineMaintenance/BrowserCare.js +334 -0
- package/dist/monitoring/machineMaintenance/BrowserCare.js.map +1 -0
- package/dist/monitoring/machineMaintenance/lockState.d.ts +34 -0
- package/dist/monitoring/machineMaintenance/lockState.d.ts.map +1 -0
- package/dist/monitoring/machineMaintenance/lockState.js +53 -0
- package/dist/monitoring/machineMaintenance/lockState.js.map +1 -0
- package/dist/monitoring/machineMaintenance/readings.d.ts +4 -0
- package/dist/monitoring/machineMaintenance/readings.d.ts.map +1 -1
- package/dist/monitoring/machineMaintenance/readings.js +2 -1
- package/dist/monitoring/machineMaintenance/readings.js.map +1 -1
- package/dist/native/instar-desktop-host +0 -0
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +3 -1
- package/dist/scaffold/templates.js.map +1 -1
- package/dist/server/AgentServer.d.ts.map +1 -1
- package/dist/server/AgentServer.js +6 -0
- package/dist/server/AgentServer.js.map +1 -1
- package/dist/server/CapabilityIndex.js +4 -4
- package/dist/server/CapabilityIndex.js.map +1 -1
- package/dist/server/mobilePairingRoutes.d.ts +32 -2
- package/dist/server/mobilePairingRoutes.d.ts.map +1 -1
- package/dist/server/mobilePairingRoutes.js +149 -13
- package/dist/server/mobilePairingRoutes.js.map +1 -1
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +19 -1
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/scripts/blocking-decision-surfaces-baseline.json +22 -2
- package/src/data/builtin-manifest.json +64 -64
- package/src/data/standards-guard-index.json +1 -1
- package/src/data/standards-guard-index.meta.json +2 -2
- package/src/data/standards-registry.meta.json +1 -1
- package/src/data/state-coherence-registry.json +37 -0
- package/src/scaffold/templates.ts +3 -1
- package/src/templates/scripts/browser/chrome-close.sh +97 -0
- package/src/templates/scripts/browser/chrome-js.sh +2 -0
- package/src/templates/scripts/browser/chrome-launch.sh +16 -3
- package/src/templates/scripts/browser/chrome-ledger.sh +49 -0
- package/src/templates/scripts/browser/chrome-renew.sh +38 -0
- package/src/templates/scripts/browser/chrome-unsaved.sh +83 -0
- package/upgrades/1.3.1602.md +24 -0
- package/upgrades/1.3.1603.md +26 -0
- package/upgrades/side-effects/machine-self-maintenance-browser-care-lock-reading.md +98 -0
- package/upgrades/side-effects/mobile-native-conversations-inc3.md +116 -0
|
@@ -27,6 +27,7 @@ export const ICONS = {
|
|
|
27
27
|
wallet: '<rect x="3" y="6" width="18" height="14" rx="2"/><path d="M16 13h2M3 10h18"/>',
|
|
28
28
|
chat: '<path d="M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z"/>',
|
|
29
29
|
stamp: '<path d="M5 21h14M7 17h10l1-4H6l1 4zM12 13V8a3 3 0 1 0-3-3"/>',
|
|
30
|
+
phone: '<rect x="7" y="2" width="10" height="20" rx="2"/><path d="M11 18h2"/>',
|
|
30
31
|
lock: '<rect x="4" y="11" width="16" height="10" rx="2"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/>',
|
|
31
32
|
toggle: '<rect x="2" y="7" width="20" height="10" rx="5"/><circle cx="16" cy="12" r="3"/>',
|
|
32
33
|
sparkle: '<path d="M12 3v4M12 17v4M3 12h4M17 12h4M6 6l2.5 2.5M15.5 15.5 18 18M6 18l2.5-2.5M15.5 8.5 18 6"/>',
|
|
@@ -67,6 +68,7 @@ export const GROUPS = [
|
|
|
67
68
|
{ id: 'threadline', label: 'Other agents', icon: 'chat', desc: 'Who is waiting on you, whether each agent I work with is actually there, pairing new ones, and our conversations.' },
|
|
68
69
|
{ id: 'origins', label: 'Messages to you', icon: 'chat', desc: 'Replies held back from you, and the who-wrote-this footer.' },
|
|
69
70
|
{ id: 'mandates', label: 'Permission slips', icon: 'stamp', desc: 'What you have let agents do together, who is waiting for your approval, and every allow and refusal.' },
|
|
71
|
+
{ id: 'phones', label: 'Phones', icon: 'phone', desc: 'Pair the Instar iPhone app (the code shows here after a PIN unlock when there is no Telegram), and the phones already paired.' },
|
|
70
72
|
{ id: 'secrets', label: 'Passwords & keys', icon: 'lock', desc: 'Whether the agent is waiting on a password, a safe one-time link to hand one over, and the keys it already holds.' },
|
|
71
73
|
],
|
|
72
74
|
},
|
package/dashboard/glance.js
CHANGED
|
@@ -50,6 +50,7 @@ export const GLANCE_ADOPTED_TABS = [
|
|
|
50
50
|
'pr-pipeline', 'tokens', 'llm-activity', 'secrets', 'resources', 'initiatives',
|
|
51
51
|
'origins', // real settings / recording / message drills in origin.js
|
|
52
52
|
'feedback-drain', // operated summary reviewed against the F10/F11 floor
|
|
53
|
+
'phones', // phones.js: waiting / paired drills (mobile-native-conversations §4.4)
|
|
53
54
|
];
|
|
54
55
|
|
|
55
56
|
export const GLANCE_GRANDFATHERED = [
|
package/dashboard/index.html
CHANGED
|
@@ -2596,6 +2596,10 @@
|
|
|
2596
2596
|
/* ── Systems Tab ──────────────────────────────────────────── */
|
|
2597
2597
|
/* Origin controls reuse shared action buttons and theme colors. */
|
|
2598
2598
|
#originsTab .action-btn { min-height: 44px; font: inherit; padding: 10px 14px; }
|
|
2599
|
+
#phonesTab .action-btn { min-height: 44px; font: inherit; padding: 10px 14px; }
|
|
2600
|
+
#phonesTab .phone-approval, #phonesTab .phone-row { border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: var(--bg-panel); margin-bottom: 10px; overflow-wrap: anywhere; }
|
|
2601
|
+
#phonesTab .phone-code { font-size: 2rem; font-weight: 700; letter-spacing: 0.15em; margin: 8px 0; }
|
|
2602
|
+
#phonesTab [role=status]:empty { display: none; }
|
|
2599
2603
|
#originsTab .glance-root:has(> .glance-drilldown:not([hidden])) > .glance-layer { display: none; }
|
|
2600
2604
|
#originsTab .glance-drill-back { min-height: 44px; }
|
|
2601
2605
|
#originsTab .origin-settings { border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: var(--bg-panel); display: flex; flex-direction: column; gap: 8px; }
|
|
@@ -3093,6 +3097,7 @@
|
|
|
3093
3097
|
<button class="tab" data-tab="machines" onclick="switchTab('machines')">Machines</button>
|
|
3094
3098
|
<button class="tab" data-tab="jobs" onclick="switchTab('jobs')">Jobs <span class="tab-count" id="tabJobCount">0</span></button>
|
|
3095
3099
|
<button class="tab" data-tab="origins" onclick="switchTab('origins')">Message origins</button>
|
|
3100
|
+
<button class="tab" data-tab="phones" onclick="switchTab('phones')">Phones</button>
|
|
3096
3101
|
<button class="tab" data-tab="systems" onclick="switchTab('systems')">Health</button>
|
|
3097
3102
|
</div>
|
|
3098
3103
|
<div class="tab-group" role="group" aria-label="Work & Delivery">
|
|
@@ -4370,6 +4375,7 @@
|
|
|
4370
4375
|
The old ~390-word subsystem prose became a plain headline + tiles; each
|
|
4371
4376
|
subsystem's full description / processes / metrics live one drill down.
|
|
4372
4377
|
The shared component renders the headline + tiles + drill-down here. -->
|
|
4378
|
+
<section class="systems-container" id="phonesTab" style="display:none;flex-direction:column;overflow:auto;padding:20px;gap:12px;min-width:0"><p class="tab-purpose">Pair the Instar iPhone app and see paired phones.</p></section>
|
|
4373
4379
|
<section class="systems-container" id="originsTab" style="display:none;flex-direction:column;overflow:auto;padding:20px;gap:12px;min-width:0"><p class="tab-purpose">Inspect message authorship and choose which origin details appear.</p></section>
|
|
4374
4380
|
<div class="systems-container" id="systemsTab" style="display:none">
|
|
4375
4381
|
<div class="systems-main">
|
|
@@ -6203,6 +6209,9 @@
|
|
|
6203
6209
|
{
|
|
6204
6210
|
id: 'origins',
|
|
6205
6211
|
panels: ['originsTab'], display: ['flex'], onActivate: () => startOrigins(), onDeactivate: () => originPanel?.stop() },
|
|
6212
|
+
{
|
|
6213
|
+
id: 'phones',
|
|
6214
|
+
panels: ['phonesTab'], display: ['flex'], onActivate: () => startPhones(), onDeactivate: () => phonesPanel?.stop() },
|
|
6206
6215
|
{
|
|
6207
6216
|
id: 'systems',
|
|
6208
6217
|
panels: ['systemsTab'],
|
|
@@ -10782,6 +10791,20 @@
|
|
|
10782
10791
|
}
|
|
10783
10792
|
}
|
|
10784
10793
|
|
|
10794
|
+
// ── Phones tab (mobile-native-conversations §4.4): a no-Telegram agent's pairing codes,
|
|
10795
|
+
// shown only after a PIN unlock (operator session), plus the paired-phones list.
|
|
10796
|
+
let phonesPanel = null;
|
|
10797
|
+
async function startPhones() {
|
|
10798
|
+
try {
|
|
10799
|
+
const { mountPhonesPanel } = await import('/dashboard/phones.js');
|
|
10800
|
+
phonesPanel ??= mountPhonesPanel(document.getElementById('phonesTab'), {
|
|
10801
|
+
request: (url, options = {}) => fetch(url, { ...options, headers: { Authorization: `Bearer ${token}`, ...(operatorSessionToken ? { 'X-Instar-Operator-Session': operatorSessionToken } : {}), ...(options.headers || {}) } }),
|
|
10802
|
+
unlock: () => { document.getElementById('authOverlay').style.display = 'flex'; document.getElementById('pinInput').focus(); },
|
|
10803
|
+
});
|
|
10804
|
+
phonesPanel.start();
|
|
10805
|
+
} catch { document.getElementById('phonesTab').textContent = 'Phones are unavailable. Refresh to try again.'; }
|
|
10806
|
+
}
|
|
10807
|
+
|
|
10785
10808
|
let originPanel = null;
|
|
10786
10809
|
async function startOrigins() {
|
|
10787
10810
|
try {
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* phones.js — the dashboard's Phones card (docs/specs/mobile-native-conversations.md §4.4).
|
|
3
|
+
*
|
|
4
|
+
* On an agent with no Telegram owner, a phone that opens a pairing link waits for a 6-digit
|
|
5
|
+
* code that is shown HERE, only after a PIN unlock (the server refuses the code to anything but a
|
|
6
|
+
* dashboard operator session). The operator types the code into the Instar app, or taps
|
|
7
|
+
* "Not my phone" to decline. Below that, the paired phones on this machine, each revocable.
|
|
8
|
+
*
|
|
9
|
+
* Every dynamic value reaches the DOM through textContent; nothing is rendered as HTML. The code
|
|
10
|
+
* lives only in the server's memory and in this page while it is open; nothing is stored.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { renderGlance } from './glance.js';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The glance (F10/F11): one plain headline and two tiles. Fixed prose plus counts only — no
|
|
17
|
+
* phone name or code reaches the front layer; those live behind the tiles.
|
|
18
|
+
*/
|
|
19
|
+
export function phonesGlanceSpec({ waiting = null, paired = null, locked = false } = {}, activate = {}) {
|
|
20
|
+
const headline = locked ? 'Unlock with your PIN to see a phone that is waiting to pair.'
|
|
21
|
+
: waiting > 0 ? `${waiting === 1 ? 'A phone is' : `${waiting} phones are`} waiting to pair. Open Waiting to see the code.`
|
|
22
|
+
: 'No phone is waiting to pair.';
|
|
23
|
+
return { headline, tiles: [
|
|
24
|
+
{ key: 'waiting', label: 'Waiting to pair', value: waiting === null ? 'Unknown' : String(waiting), tone: waiting > 0 ? 'warn' : undefined, onActivate: activate.waiting },
|
|
25
|
+
{ key: 'paired', label: 'Paired phones', value: paired === null ? 'Unknown' : String(paired), onActivate: activate.paired },
|
|
26
|
+
] };
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const STATUS = { pending: 'Waiting to confirm', active: 'Paired', revoked: 'Removed', declined: 'Declined', expired: 'Expired' };
|
|
30
|
+
|
|
31
|
+
/** "123 456" — easier to read off a screen. */
|
|
32
|
+
export function prettyCode(code) {
|
|
33
|
+
const c = String(code ?? '').replace(/\D/g, '');
|
|
34
|
+
return c.length === 6 ? `${c.slice(0, 3)} ${c.slice(3)}` : c;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** Minutes left, in words. */
|
|
38
|
+
export function minutesLeft(iso, now = Date.now()) {
|
|
39
|
+
const ms = Date.parse(iso) - now;
|
|
40
|
+
if (!(ms > 0)) return 'expired';
|
|
41
|
+
return `${Math.max(1, Math.round(ms / 60_000))} min left`;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function mountPhonesPanel(root, { request, unlock, now = () => Date.now() }) {
|
|
45
|
+
const doc = root.ownerDocument;
|
|
46
|
+
const make = (tag, text, parent = root) => {
|
|
47
|
+
const el = doc.createElement(tag);
|
|
48
|
+
if (tag === 'button') { el.className = 'action-btn'; el.type = 'button'; }
|
|
49
|
+
if (text !== undefined) el.textContent = String(text);
|
|
50
|
+
parent.append(el);
|
|
51
|
+
return el;
|
|
52
|
+
};
|
|
53
|
+
root.replaceChildren();
|
|
54
|
+
make('h2', 'Phones');
|
|
55
|
+
make('p', 'Pair the Instar iPhone app with this agent, and see the phones already paired.').className = 'tab-purpose';
|
|
56
|
+
const notice = make('p'); notice.setAttribute('role', 'status'); notice.setAttribute('aria-live', 'polite');
|
|
57
|
+
const unlockButton = make('button', 'Unlock with PIN to see pairing codes'); unlockButton.hidden = true; unlockButton.onclick = unlock;
|
|
58
|
+
const glance = make('section'); glance.className = 'glance-root';
|
|
59
|
+
const approvals = make('section'); approvals.setAttribute('aria-label', 'Phones waiting to pair');
|
|
60
|
+
const devices = make('section'); devices.setAttribute('aria-label', 'Paired phones');
|
|
61
|
+
// Detail sections live behind the glance tiles; they are refreshed in place.
|
|
62
|
+
approvals.remove(); devices.remove();
|
|
63
|
+
let timer = null, stopped = false, busy = false;
|
|
64
|
+
const counts = { waiting: null, paired: null, locked: false };
|
|
65
|
+
const renderSummary = () => renderGlance(doc, glance, phonesGlanceSpec(counts, {
|
|
66
|
+
waiting: ({ drilldown }) => drilldown.append(approvals),
|
|
67
|
+
paired: ({ drilldown }) => drilldown.append(devices),
|
|
68
|
+
}));
|
|
69
|
+
renderSummary();
|
|
70
|
+
|
|
71
|
+
const renderApprovals = (list) => {
|
|
72
|
+
approvals.replaceChildren();
|
|
73
|
+
make('h3', 'Waiting to pair', approvals);
|
|
74
|
+
counts.waiting = list.length; counts.locked = false;
|
|
75
|
+
if (!list.length) { make('p', 'No phone is waiting. Ask me for a pairing link, open it on the phone, and its code appears here.', approvals); return; }
|
|
76
|
+
for (const a of list) {
|
|
77
|
+
const card = make('div', undefined, approvals); card.className = 'phone-approval';
|
|
78
|
+
make('p', `${a.deviceName || 'A phone'}${a.label ? ` (${a.label})` : ''} is waiting · ${minutesLeft(a.expiresAt, now())}`, card);
|
|
79
|
+
if (a.fingerprint) make('p', `Phone key: ${a.fingerprint}. The app shows the same key; check they match.`, card);
|
|
80
|
+
const code = make('p', prettyCode(a.code), card); code.className = 'phone-code'; code.setAttribute('aria-label', 'Confirmation code');
|
|
81
|
+
make('p', 'Type this code into the Instar app on that phone. Never send it to anyone, including me.', card);
|
|
82
|
+
const decline = make('button', 'Not my phone — decline', card);
|
|
83
|
+
decline.onclick = async () => {
|
|
84
|
+
decline.disabled = true;
|
|
85
|
+
try {
|
|
86
|
+
const r = await request(`/mobile/pairing-approvals/${encodeURIComponent(a.deviceId)}/decline`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: '{}' });
|
|
87
|
+
notice.textContent = r.ok ? 'Declined. That phone cannot pair with this code.' : 'Could not decline. Refresh and try again.';
|
|
88
|
+
} catch { notice.textContent = 'Could not reach the agent.'; }
|
|
89
|
+
await refresh();
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const renderDevices = (list) => {
|
|
95
|
+
devices.replaceChildren();
|
|
96
|
+
make('h3', 'Paired phones', devices);
|
|
97
|
+
const shown = list.filter((d) => d.status === 'active' || d.status === 'pending');
|
|
98
|
+
counts.paired = list.filter((d) => d.status === 'active').length;
|
|
99
|
+
if (!shown.length) { make('p', 'No phones are paired with this machine.', devices); return; }
|
|
100
|
+
for (const d of shown) {
|
|
101
|
+
const row = make('div', undefined, devices); row.className = 'phone-row';
|
|
102
|
+
make('p', `${d.deviceName || 'Unnamed phone'} · ${STATUS[d.status] || d.status}${d.approvedAt ? ` since ${new Date(d.approvedAt).toLocaleDateString()}` : ''}`, row);
|
|
103
|
+
if (d.status === 'active') {
|
|
104
|
+
const revoke = make('button', 'Remove this phone', row);
|
|
105
|
+
revoke.onclick = async () => {
|
|
106
|
+
if (!doc.defaultView?.confirm?.('Remove this phone? It will stop reaching this agent at once.')) return;
|
|
107
|
+
revoke.disabled = true;
|
|
108
|
+
try {
|
|
109
|
+
const r = await request(`/mobile/devices/${encodeURIComponent(d.id)}/revoke`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: '{}' });
|
|
110
|
+
notice.textContent = r.ok ? 'Removed.' : 'Could not remove that phone. Try again.';
|
|
111
|
+
} catch { notice.textContent = 'Could not reach the agent.'; }
|
|
112
|
+
await refresh();
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
async function refresh() {
|
|
119
|
+
if (busy || stopped) return;
|
|
120
|
+
busy = true;
|
|
121
|
+
try {
|
|
122
|
+
const a = await request('/mobile/pairing-approvals');
|
|
123
|
+
if (a.status === 403) {
|
|
124
|
+
unlockButton.hidden = false;
|
|
125
|
+
counts.waiting = null; counts.locked = true;
|
|
126
|
+
approvals.replaceChildren(); make('h3', 'Waiting to pair', approvals);
|
|
127
|
+
make('p', 'Unlock with your PIN to see a waiting phone\'s code.', approvals);
|
|
128
|
+
} else if (a.status === 503) {
|
|
129
|
+
unlockButton.hidden = true; approvals.replaceChildren(); notice.textContent = 'Phone pairing is turned off on this agent.';
|
|
130
|
+
} else if (a.ok) {
|
|
131
|
+
unlockButton.hidden = true;
|
|
132
|
+
const body = await a.json();
|
|
133
|
+
renderApprovals(Array.isArray(body.approvals) ? body.approvals : []);
|
|
134
|
+
} else { notice.textContent = 'Pairing codes are unavailable right now.'; }
|
|
135
|
+
const d = await request('/mobile/devices');
|
|
136
|
+
if (d.ok) { const body = await d.json(); renderDevices(Array.isArray(body.devices) ? body.devices : []); }
|
|
137
|
+
} catch { notice.textContent = 'Could not reach the agent.'; }
|
|
138
|
+
finally { busy = false; renderSummary(); }
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return {
|
|
142
|
+
start() { stopped = false; void refresh(); clearInterval(timer); timer = setInterval(() => { void refresh(); }, 10_000); },
|
|
143
|
+
stop() { stopped = true; clearInterval(timer); timer = null; },
|
|
144
|
+
refresh,
|
|
145
|
+
};
|
|
146
|
+
}
|
package/dist/commands/init.d.ts
CHANGED
|
@@ -161,6 +161,13 @@ export declare function refreshHooksAndSettings(projectDir: string, stateDir: st
|
|
|
161
161
|
export declare const BROWSER_SCRIPT_NAMES: readonly ['chrome-launch.sh', 'chrome-js.sh', 'chrome-mainworld.sh', 'native-drive.ps1', 'ndrive.sh'];
|
|
162
162
|
/** The three macOS (Apple Events) scripts: the ones that refuse with ERR macos-only off macOS. */
|
|
163
163
|
export declare const MACOS_BROWSER_SCRIPT_NAMES: readonly ['chrome-launch.sh', 'chrome-js.sh', 'chrome-mainworld.sh'];
|
|
164
|
+
/**
|
|
165
|
+
* Browser-care helpers (machine self-maintenance, Part B): the instance ledger the launch and JS
|
|
166
|
+
* helpers keep current, and the close, renew and unsaved-input tools. Installed beside the helpers
|
|
167
|
+
* above by the same always-overwrite installer. The three user-facing ones refuse off macOS;
|
|
168
|
+
* chrome-ledger.sh is called by the others with an already-resolved profile.
|
|
169
|
+
*/
|
|
170
|
+
export declare const BROWSER_CARE_SCRIPT_NAMES: readonly ['chrome-ledger.sh', 'chrome-close.sh', 'chrome-renew.sh', 'chrome-unsaved.sh'];
|
|
164
171
|
/**
|
|
165
172
|
* Install the normal-Chrome helper scripts (.instar/scripts/browser/) used by the
|
|
166
173
|
* /normal-chrome-browser skill. Built-in and non-customizable, so they are always
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAuBH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAgDpF,UAAU,WAAW;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4DAA4D;IAC5D,UAAU,CAAC,EAAE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IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAglBrD;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAqElF;AAksCD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,YAAI,kBAAkB,EAAE,cAAc,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,WAAW,CAAU,CAAC;AAC1I,kGAAkG;AAClG,eAAO,MAAM,0BAA0B,YAAI,kBAAkB,EAAE,cAAc,EAAE,qBAAqB,CAAU,CAAC;AAC/G;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,YAAI,kBAAkB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,mBAAmB,CAAU,CAAC;AAElI;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAkBlE"}
|
package/dist/commands/init.js
CHANGED
|
@@ -4958,6 +4958,13 @@ function installSecretGet(projectDir) {
|
|
|
4958
4958
|
export const BROWSER_SCRIPT_NAMES = ['chrome-launch.sh', 'chrome-js.sh', 'chrome-mainworld.sh', 'native-drive.ps1', 'ndrive.sh'];
|
|
4959
4959
|
/** The three macOS (Apple Events) scripts: the ones that refuse with ERR macos-only off macOS. */
|
|
4960
4960
|
export const MACOS_BROWSER_SCRIPT_NAMES = ['chrome-launch.sh', 'chrome-js.sh', 'chrome-mainworld.sh'];
|
|
4961
|
+
/**
|
|
4962
|
+
* Browser-care helpers (machine self-maintenance, Part B): the instance ledger the launch and JS
|
|
4963
|
+
* helpers keep current, and the close, renew and unsaved-input tools. Installed beside the helpers
|
|
4964
|
+
* above by the same always-overwrite installer. The three user-facing ones refuse off macOS;
|
|
4965
|
+
* chrome-ledger.sh is called by the others with an already-resolved profile.
|
|
4966
|
+
*/
|
|
4967
|
+
export const BROWSER_CARE_SCRIPT_NAMES = ['chrome-ledger.sh', 'chrome-close.sh', 'chrome-renew.sh', 'chrome-unsaved.sh'];
|
|
4961
4968
|
/**
|
|
4962
4969
|
* Install the normal-Chrome helper scripts (.instar/scripts/browser/) used by the
|
|
4963
4970
|
* /normal-chrome-browser skill. Built-in and non-customizable, so they are always
|
|
@@ -4970,7 +4977,7 @@ export function installBrowserScripts(projectDir) {
|
|
|
4970
4977
|
const scriptsDir = path.join(projectDir, '.instar', 'scripts', 'browser');
|
|
4971
4978
|
const modDir = __dirname;
|
|
4972
4979
|
const written = [];
|
|
4973
|
-
for (const name of BROWSER_SCRIPT_NAMES) {
|
|
4980
|
+
for (const name of [...BROWSER_SCRIPT_NAMES, ...BROWSER_CARE_SCRIPT_NAMES]) {
|
|
4974
4981
|
const candidates = [
|
|
4975
4982
|
path.resolve(modDir, '..', 'templates', 'scripts', 'browser', name),
|
|
4976
4983
|
path.resolve(modDir, '..', '..', 'src', 'templates', 'scripts', 'browser', name),
|