@empirical-gauzza/cli 1.0.17 → 1.0.19
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/bin/empirical.js +1 -1
- package/lib/help.js +1 -14
- package/lib/installers/hooks.js +12 -5
- package/package.json +1 -1
package/bin/empirical.js
CHANGED
package/lib/help.js
CHANGED
|
@@ -13,8 +13,6 @@ function showHelp() {
|
|
|
13
13
|
log('');
|
|
14
14
|
log('Usage:');
|
|
15
15
|
log(' empirical install');
|
|
16
|
-
log(' empirical -install');
|
|
17
|
-
log(' empirical --install');
|
|
18
16
|
log(' empirical plugin install <codex|copilot|claude|all> [--all-optional]');
|
|
19
17
|
log(' empirical plugin check [--force]');
|
|
20
18
|
log(' empirical policy show [--refresh]');
|
|
@@ -45,23 +43,12 @@ function showHelp() {
|
|
|
45
43
|
log(' empirical workspace invite revoke <token> Revoke a previously created invite');
|
|
46
44
|
log(' empirical workspace delete <number|name|id> [--confirm]');
|
|
47
45
|
log(' Soft-delete a team workspace (dry-run without --confirm)');
|
|
48
|
-
log(' empirical oauth bootstrap openclaw [--print-access-token] (legacy alias)');
|
|
49
|
-
log(' empirical oauth refresh openclaw [--print-access-token] (legacy alias)');
|
|
50
|
-
log(' empirical --oauth-bootstrap-headless [--print-access-token]');
|
|
51
|
-
log(' empirical --oauth-refresh-headless [--print-access-token]');
|
|
52
|
-
log(' empirical --oauth-bootstrap-openclaw [--print-access-token] (legacy alias)');
|
|
53
|
-
log(' empirical --oauth-refresh-openclaw [--print-access-token] (legacy alias)');
|
|
54
46
|
log('');
|
|
55
47
|
log('Options:');
|
|
56
|
-
log(' install
|
|
48
|
+
log(' install Interactive installer for Codex/Copilot/Claude CLI integration');
|
|
57
49
|
log(' plugin install <target> Install core plugin; add --all-optional or capability flags');
|
|
58
50
|
log(' plugin check [--force] Check for native plugin updates');
|
|
59
51
|
log(' policy show/set Inspect or update native Empirical behavior policy');
|
|
60
|
-
log(' Step 1 checks/provisions OAuth client credentials locally');
|
|
61
|
-
log(' --oauth-bootstrap-headless, --oauth-bootstrap-openclaw');
|
|
62
|
-
log(' Headless OAuth bootstrap using client_credentials (client ID + client secret)');
|
|
63
|
-
log(' --oauth-refresh-headless, --oauth-refresh-openclaw');
|
|
64
|
-
log(' Refresh headless token from stored refresh token file (if available)');
|
|
65
52
|
log(' --client-id <id> Client ID override for headless bootstrap');
|
|
66
53
|
log(' --client-secret <sec> Client secret override for headless bootstrap');
|
|
67
54
|
log(' --print-access-token Print only access token (for scripting)');
|
package/lib/installers/hooks.js
CHANGED
|
@@ -643,13 +643,20 @@ try {
|
|
|
643
643
|
// The message itself is generated per-install from the actual plugin set being installed, not one
|
|
644
644
|
// fixed string for everyone - e.g. someone who declined empirical-scar-tissue at install time
|
|
645
645
|
// never sees a scar-tissue reminder, since that capability isn't actually available to them.
|
|
646
|
-
function buildPromptReminderMessage(pluginNames) {
|
|
646
|
+
function buildPromptReminderMessage(pluginNames, platform) {
|
|
647
647
|
const names = normalizePluginNames(pluginNames);
|
|
648
648
|
const lines = [
|
|
649
649
|
'Before responding: if this task needs prior context (research, debugging, a spec or status update, a handoff), query Empirical memory first via the empirical-memory skill or empirical memory query - do not assume you already have enough context.'
|
|
650
650
|
];
|
|
651
|
-
if (names.includes('empirical-work-history')) {
|
|
652
|
-
lines.push('If you are picking up previously completed work, check for a recent work-history entry before assuming there is none.');
|
|
651
|
+
if (names.includes('empirical-work-history')) {
|
|
652
|
+
lines.push('If you are picking up previously completed work, check for a recent work-history entry before assuming there is none.');
|
|
653
|
+
// Codex Stop runs after its final response has already been emitted, so it can only be an
|
|
654
|
+
// advisory reminder. Put the completion gate into the pre-response context instead, where
|
|
655
|
+
// Codex can still act on it. Keep this Codex-specific: Claude and Copilot have their own
|
|
656
|
+
// stop-hook control flows and should not receive a changed prompt contract here.
|
|
657
|
+
if (platform === 'codex') {
|
|
658
|
+
lines.push('If this turn results in meaningful completed work, BEFORE sending your final response you MUST use the empirical-work-history skill or record it via Empirical. The entry must carry tag work-history and mass 1; verify the create receipt. CLI fallback must use --json-file with data.session and data.git; do not use the shorthand record command for coding work. Do not wait for the Stop hook.');
|
|
659
|
+
}
|
|
653
660
|
}
|
|
654
661
|
if (names.includes('empirical-scar-tissue')) {
|
|
655
662
|
lines.push('Check for scar tissue before repeating a past mistake in this area.');
|
|
@@ -678,8 +685,8 @@ function buildPromptReminderMessage(pluginNames) {
|
|
|
678
685
|
// - default (Claude/Copilot's plain console.log was the old assumption for both - WRONG for
|
|
679
686
|
// Copilot, which requires valid JSON on stdout for every event, confirmed via the same fetch
|
|
680
687
|
// above): plain console.log, confirmed correct for Claude only.
|
|
681
|
-
function buildUserPromptSubmitHookSource(pluginNames, platform) {
|
|
682
|
-
const messageLiteral = JSON.stringify(buildPromptReminderMessage(pluginNames));
|
|
688
|
+
function buildUserPromptSubmitHookSource(pluginNames, platform) {
|
|
689
|
+
const messageLiteral = JSON.stringify(buildPromptReminderMessage(pluginNames, platform));
|
|
683
690
|
|
|
684
691
|
let stdinHelper = '';
|
|
685
692
|
let outputStatement;
|