@hwip/cli 0.1.19 → 0.1.20
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/installer.d.ts +3 -0
- package/dist/installer.js +6 -1
- package/dist/transcript-tail.js +7 -3
- package/package.json +1 -1
package/dist/installer.d.ts
CHANGED
|
@@ -28,6 +28,9 @@ export declare const failedStepCount: () => number;
|
|
|
28
28
|
export declare const reportDetectedAgents: (agents: Agent[]) => void;
|
|
29
29
|
/** The install's last line. Exported for tests. */
|
|
30
30
|
export declare const closingLine: (failed: number) => string;
|
|
31
|
+
/** Where the install's last screen sends a new user for the phone app. `ct`/`utm_source` name this surface. */
|
|
32
|
+
export declare const APP_STORE_URL = "https://apps.apple.com/app/id6818053606?ct=cli-install";
|
|
33
|
+
export declare const PLAY_STORE_URL = "https://play.google.com/store/apps/details?id=app.hwip&referrer=utm_source%3Dcli-install";
|
|
31
34
|
/** Exported for tests (installGemini shells out to the real `gemini` binary,
|
|
32
35
|
* so the merge semantics can't be covered through it deterministically). */
|
|
33
36
|
export declare const mergeJsonFile: (filePath: string, patch: Record<string, unknown>) => void;
|
package/dist/installer.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.handleInstall = exports.serviceInstallChoice = exports.collectCredentials = exports.unknownOnlyIds = exports.filterAgentsByIds = exports.AGENT_INSTALLERS = exports.firstStderrLine = exports.injectCodexMcpEntry = exports.injectMcpEntry = exports.addAiderReadDirective = exports.writeManagedRule = exports.mergeJsonFile = exports.closingLine = exports.reportDetectedAgents = exports.failedStepCount = exports.failMerge = exports.mergeFailureLines = exports.shouldReauth = void 0;
|
|
3
|
+
exports.handleInstall = exports.serviceInstallChoice = exports.collectCredentials = exports.unknownOnlyIds = exports.filterAgentsByIds = exports.AGENT_INSTALLERS = exports.firstStderrLine = exports.injectCodexMcpEntry = exports.injectMcpEntry = exports.addAiderReadDirective = exports.writeManagedRule = exports.mergeJsonFile = exports.PLAY_STORE_URL = exports.APP_STORE_URL = exports.closingLine = exports.reportDetectedAgents = exports.failedStepCount = exports.failMerge = exports.mergeFailureLines = exports.shouldReauth = void 0;
|
|
4
4
|
const child_process_1 = require("child_process");
|
|
5
5
|
const os_1 = require("os");
|
|
6
6
|
const path_1 = require("path");
|
|
@@ -136,6 +136,9 @@ const closingLine = (failed) => {
|
|
|
136
136
|
return `Done, but ${steps} you: see the lines marked "-" above. Then restart your agents.`;
|
|
137
137
|
};
|
|
138
138
|
exports.closingLine = closingLine;
|
|
139
|
+
/** Where the install's last screen sends a new user for the phone app. `ct`/`utm_source` name this surface. */
|
|
140
|
+
exports.APP_STORE_URL = 'https://apps.apple.com/app/id6818053606?ct=cli-install';
|
|
141
|
+
exports.PLAY_STORE_URL = 'https://play.google.com/store/apps/details?id=app.hwip&referrer=utm_source%3Dcli-install';
|
|
139
142
|
/** An edit that would lose a comment of the user's names the file, like every other refusal. */
|
|
140
143
|
const namingFile = (filePath, edit) => {
|
|
141
144
|
try {
|
|
@@ -837,6 +840,8 @@ const handleInstall = async (args) => {
|
|
|
837
840
|
console.log('\n Testing connection...');
|
|
838
841
|
await testConnection(apiKey, baseUrl);
|
|
839
842
|
console.log(`\n ${(0, exports.closingLine)(failedSteps)}\n`);
|
|
843
|
+
console.log(` Get the app: ${exports.APP_STORE_URL}`);
|
|
844
|
+
console.log(` Android: ${exports.PLAY_STORE_URL}\n`);
|
|
840
845
|
// The single most-reported surprise: pushes are not scoped to `hwip cc`.
|
|
841
846
|
// Hooks fire for every session of every configured agent, so say it here —
|
|
842
847
|
// at the moment the hooks get installed — together with the volume dials.
|
package/dist/transcript-tail.js
CHANGED
|
@@ -507,6 +507,8 @@ const contentBlocks = (entry) => {
|
|
|
507
507
|
const SYNTHETIC_BLOCKS = /<(task-notification|system-reminder|local-command-caveat|local-command-stdout|command-message|command-name|command-args)>[\s\S]*?<\/\1>/g;
|
|
508
508
|
/** `<command-name>/simplify</command-name>` — the one wrapper worth keeping, as what it names. */
|
|
509
509
|
const COMMAND_NAME = /<command-name>([^<]*)<\/command-name>/;
|
|
510
|
+
/** `<command-args>prompt run</command-args>` — what the person typed after the command name. */
|
|
511
|
+
const COMMAND_ARGS = /<command-args>([\s\S]*?)<\/command-args>/;
|
|
510
512
|
/**
|
|
511
513
|
* Whether this entry is a person speaking.
|
|
512
514
|
*
|
|
@@ -577,10 +579,12 @@ const typedTextOf = (entry) => {
|
|
|
577
579
|
* separate feature, not a reason to ship the path.
|
|
578
580
|
*/
|
|
579
581
|
const stripAttachmentMarkers = (text) => {
|
|
580
|
-
const
|
|
582
|
+
const name = text.match(COMMAND_NAME)?.[1]?.trim();
|
|
583
|
+
const args = text.match(COMMAND_ARGS)?.[1]?.trim();
|
|
581
584
|
const body = text.replace(SYNTHETIC_BLOCKS, '');
|
|
582
|
-
// A slash command is a person's turn, and its name
|
|
583
|
-
// said — the wrapper around
|
|
585
|
+
// A slash command is a person's turn, and its name and arguments are the
|
|
586
|
+
// whole of what they said — the wrapper around them is not.
|
|
587
|
+
const command = name && args ? `${name} ${args}` : name;
|
|
584
588
|
const withCommand = command ? `${command}\n${body}` : body;
|
|
585
589
|
return withCommand.replace(/\[Image:[^\]]*\]/g, '').replace(/\n{3,}/g, '\n\n');
|
|
586
590
|
};
|