@aria_asi/cli 0.2.26 → 0.2.29
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/CLIENT-ONBOARDING.md +282 -0
- package/bin/aria.js +1140 -14
- package/dist/aria-connector/src/auth-commands.d.ts +1 -0
- package/dist/aria-connector/src/auth-commands.d.ts.map +1 -1
- package/dist/aria-connector/src/auth-commands.js +89 -41
- package/dist/aria-connector/src/auth-commands.js.map +1 -1
- package/dist/aria-connector/src/chat.d.ts +3 -0
- package/dist/aria-connector/src/chat.d.ts.map +1 -1
- package/dist/aria-connector/src/chat.js +146 -8
- package/dist/aria-connector/src/chat.js.map +1 -1
- package/dist/aria-connector/src/codebase-scanner.d.ts +2 -2
- package/dist/aria-connector/src/codebase-scanner.d.ts.map +1 -1
- package/dist/aria-connector/src/codebase-scanner.js +1 -1
- package/dist/aria-connector/src/codebase-scanner.js.map +1 -1
- package/dist/aria-connector/src/config.d.ts +12 -0
- package/dist/aria-connector/src/config.d.ts.map +1 -1
- package/dist/aria-connector/src/config.js +2 -0
- package/dist/aria-connector/src/config.js.map +1 -1
- package/dist/aria-connector/src/connectors/claude-code.d.ts.map +1 -1
- package/dist/aria-connector/src/connectors/claude-code.js +80 -24
- package/dist/aria-connector/src/connectors/claude-code.js.map +1 -1
- package/dist/aria-connector/src/connectors/codebase-awareness.d.ts +37 -0
- package/dist/aria-connector/src/connectors/codebase-awareness.d.ts.map +1 -0
- package/dist/aria-connector/src/connectors/codebase-awareness.js +335 -0
- package/dist/aria-connector/src/connectors/codebase-awareness.js.map +1 -0
- package/dist/aria-connector/src/connectors/codex.d.ts +3 -0
- package/dist/aria-connector/src/connectors/codex.d.ts.map +1 -0
- package/dist/aria-connector/src/connectors/codex.js +248 -0
- package/dist/aria-connector/src/connectors/codex.js.map +1 -0
- package/dist/aria-connector/src/connectors/cognitive-skills.d.ts +2 -0
- package/dist/aria-connector/src/connectors/cognitive-skills.d.ts.map +1 -0
- package/dist/aria-connector/src/connectors/cognitive-skills.js +47 -0
- package/dist/aria-connector/src/connectors/cognitive-skills.js.map +1 -0
- package/dist/aria-connector/src/connectors/opencode.d.ts.map +1 -1
- package/dist/aria-connector/src/connectors/opencode.js +90 -4
- package/dist/aria-connector/src/connectors/opencode.js.map +1 -1
- package/dist/aria-connector/src/connectors/repo-git-hooks.d.ts +3 -0
- package/dist/aria-connector/src/connectors/repo-git-hooks.d.ts.map +1 -0
- package/dist/aria-connector/src/connectors/repo-git-hooks.js +87 -0
- package/dist/aria-connector/src/connectors/repo-git-hooks.js.map +1 -0
- package/dist/aria-connector/src/connectors/repo-guard.d.ts +19 -0
- package/dist/aria-connector/src/connectors/repo-guard.d.ts.map +1 -0
- package/dist/aria-connector/src/connectors/repo-guard.js +509 -0
- package/dist/aria-connector/src/connectors/repo-guard.js.map +1 -0
- package/dist/aria-connector/src/connectors/runtime.d.ts +2 -0
- package/dist/aria-connector/src/connectors/runtime.d.ts.map +1 -0
- package/dist/aria-connector/src/connectors/runtime.js +330 -0
- package/dist/aria-connector/src/connectors/runtime.js.map +1 -0
- package/dist/aria-connector/src/connectors/shell.d.ts.map +1 -1
- package/dist/aria-connector/src/connectors/shell.js +78 -13
- package/dist/aria-connector/src/connectors/shell.js.map +1 -1
- package/dist/aria-connector/src/connectors/syncd.d.ts +27 -0
- package/dist/aria-connector/src/connectors/syncd.d.ts.map +1 -0
- package/dist/aria-connector/src/connectors/syncd.js +405 -0
- package/dist/aria-connector/src/connectors/syncd.js.map +1 -0
- package/dist/aria-connector/src/decisions.d.ts +207 -0
- package/dist/aria-connector/src/decisions.d.ts.map +1 -0
- package/dist/aria-connector/src/decisions.js +291 -0
- package/dist/aria-connector/src/decisions.js.map +1 -0
- package/dist/aria-connector/src/garden-control-plane.d.ts.map +1 -1
- package/dist/aria-connector/src/garden-control-plane.js +74 -17
- package/dist/aria-connector/src/garden-control-plane.js.map +1 -1
- package/dist/aria-connector/src/github-connect.d.ts +18 -0
- package/dist/aria-connector/src/github-connect.d.ts.map +1 -0
- package/dist/aria-connector/src/github-connect.js +117 -0
- package/dist/aria-connector/src/github-connect.js.map +1 -0
- package/dist/aria-connector/src/harness-client.d.ts +15 -0
- package/dist/aria-connector/src/harness-client.d.ts.map +1 -1
- package/dist/aria-connector/src/harness-client.js +106 -3
- package/dist/aria-connector/src/harness-client.js.map +1 -1
- package/dist/aria-connector/src/hive-client.d.ts +30 -0
- package/dist/aria-connector/src/hive-client.d.ts.map +1 -1
- package/dist/aria-connector/src/hive-client.js +124 -5
- package/dist/aria-connector/src/hive-client.js.map +1 -1
- package/dist/aria-connector/src/index.d.ts +13 -2
- package/dist/aria-connector/src/index.d.ts.map +1 -1
- package/dist/aria-connector/src/index.js +10 -1
- package/dist/aria-connector/src/index.js.map +1 -1
- package/dist/aria-connector/src/lib/aristotle-noor-wire.d.ts +102 -0
- package/dist/aria-connector/src/lib/aristotle-noor-wire.d.ts.map +1 -0
- package/dist/aria-connector/src/lib/aristotle-noor-wire.js +231 -0
- package/dist/aria-connector/src/lib/aristotle-noor-wire.js.map +1 -0
- package/dist/aria-connector/src/providers/types.d.ts +5 -0
- package/dist/aria-connector/src/providers/types.d.ts.map +1 -1
- package/dist/aria-connector/src/runtime-proof.d.ts +45 -0
- package/dist/aria-connector/src/runtime-proof.d.ts.map +1 -0
- package/dist/aria-connector/src/runtime-proof.js +340 -0
- package/dist/aria-connector/src/runtime-proof.js.map +1 -0
- package/dist/aria-connector/src/setup-wizard.d.ts.map +1 -1
- package/dist/aria-connector/src/setup-wizard.js +34 -2
- package/dist/aria-connector/src/setup-wizard.js.map +1 -1
- package/dist/assets/hooks/aria-agent-handoff.mjs +224 -0
- package/dist/assets/hooks/aria-agent-ledger-merge.mjs +164 -0
- package/dist/assets/hooks/aria-architect-fallback.mjs +267 -0
- package/dist/assets/hooks/aria-cognition-substrate-binding.mjs +676 -0
- package/dist/assets/hooks/aria-discovery-record.mjs +101 -0
- package/dist/assets/hooks/aria-harness-via-sdk.mjs +412 -0
- package/dist/assets/hooks/aria-import-resolution-gate.mjs +330 -0
- package/dist/assets/hooks/aria-outcome-record.mjs +84 -0
- package/dist/assets/hooks/aria-pre-emit-dryrun.mjs +294 -0
- package/dist/assets/hooks/aria-pre-text-gate.mjs +112 -0
- package/dist/assets/hooks/aria-pre-tool-gate.mjs +2133 -0
- package/dist/assets/hooks/aria-preprompt-consult.mjs +438 -0
- package/dist/assets/hooks/aria-preturn-memory-gate.mjs +570 -0
- package/dist/assets/hooks/aria-repo-doctrine-gate.mjs +397 -0
- package/dist/assets/hooks/aria-stop-gate.mjs +1551 -0
- package/dist/assets/hooks/aria-trigger-autolearn.mjs +229 -0
- package/dist/assets/hooks/aria-userprompt-abandon-detect.mjs +192 -0
- package/dist/assets/hooks/doctrine_trigger_map.json +479 -0
- package/dist/assets/hooks/lib/canonical-lenses.mjs +64 -0
- package/dist/assets/hooks/lib/gate-audit.mjs +43 -0
- package/dist/assets/hooks/test-aria-preturn-memory-gate.mjs +245 -0
- package/dist/assets/hooks/test-tier-lens-labeling.mjs +399 -0
- package/dist/assets/opencode-plugins/harness-context/index.js +60 -0
- package/dist/assets/opencode-plugins/harness-context/inject-context.mjs +179 -0
- package/dist/assets/opencode-plugins/harness-context/package.json +9 -0
- package/dist/assets/opencode-plugins/harness-gate/index.js +248 -0
- package/dist/assets/opencode-plugins/harness-outcome/index.js +129 -0
- package/dist/assets/opencode-plugins/harness-role/index.js +77 -0
- package/dist/assets/opencode-plugins/harness-role/package.json +9 -0
- package/dist/assets/opencode-plugins/harness-stop/index.js +241 -0
- package/dist/runtime/discipline/CLAUDE.md +339 -0
- package/dist/runtime/discipline/skills/aria-cognition/aria-essence/SKILL.md +63 -0
- package/dist/runtime/discipline/skills/aria-cognition/aria-essence/references/domain-matrix.md +80 -0
- package/dist/runtime/discipline/skills/aria-cognition/aria-essence/references/evolution-loop.md +30 -0
- package/dist/runtime/discipline/skills/aria-cognition/aria-essence/references/readable-cognition.md +27 -0
- package/dist/runtime/discipline/skills/aria-cognition/aria-forge-guardrails/SKILL.md +35 -0
- package/dist/runtime/discipline/skills/aria-cognition/aria-forge-guardrails/references/checklist.md +31 -0
- package/dist/runtime/discipline/skills/aria-cognition/aria-repo-doctrine/SKILL.md +39 -0
- package/dist/runtime/discipline/skills/aria-cognition/forge-quality-rules/SKILL.md +43 -0
- package/dist/runtime/discipline/skills/aria-cognition/ghazali-8lens/SKILL.md +38 -0
- package/dist/runtime/discipline/skills/aria-cognition/istiqra-induction/SKILL.md +26 -0
- package/dist/runtime/discipline/skills/aria-cognition/ladunni-22/SKILL.md +35 -0
- package/dist/runtime/discipline/skills/aria-cognition/mizan/SKILL.md +72 -0
- package/dist/runtime/discipline/skills/aria-cognition/nadia/SKILL.md +38 -0
- package/dist/runtime/discipline/skills/aria-cognition/nadia-psi/SKILL.md +38 -0
- package/dist/runtime/discipline/skills/aria-cognition/predictor/SKILL.md +25 -0
- package/dist/runtime/discipline/skills/aria-cognition/qiyas-analogy/SKILL.md +26 -0
- package/dist/runtime/discipline/skills/aria-cognition/soul-domains/SKILL.md +25 -0
- package/dist/runtime/discipline/skills/aria-harness/aria-aristotle-intra-phase/SKILL.md +81 -0
- package/dist/runtime/discipline/skills/aria-harness/aria-aristotle-post-phase/SKILL.md +98 -0
- package/dist/runtime/discipline/skills/aria-harness/aria-aristotle-pre-phase/SKILL.md +99 -0
- package/dist/runtime/discipline/skills/aria-harness/aria-harness-deploy/SKILL.md +127 -0
- package/dist/runtime/discipline/skills/aria-harness/aria-harness-no-stripping/SKILL.md +117 -0
- package/dist/runtime/discipline/skills/aria-harness/aria-harness-onboarding/SKILL.md +112 -0
- package/dist/runtime/discipline/skills/aria-harness/aria-harness-output-discipline/SKILL.md +102 -0
- package/dist/runtime/discipline/skills/aria-harness/aria-harness-substrate-binding/SKILL.md +121 -0
- package/dist/runtime/doctor.mjs +23 -0
- package/dist/runtime/local-phase.mjs +632 -0
- package/dist/runtime/manifest.json +15 -0
- package/dist/runtime/mizan-scheduler.mjs +331 -0
- package/dist/runtime/package.json +6 -0
- package/dist/runtime/provider-proxy.mjs +594 -0
- package/dist/runtime/sdk/BUNDLED.json +5 -0
- package/dist/runtime/sdk/index.d.ts +477 -0
- package/dist/runtime/sdk/index.js +1469 -0
- package/dist/runtime/sdk/index.js.map +1 -0
- package/dist/runtime/sdk/package.json +8 -0
- package/dist/runtime/sdk/runWithCognition.d.ts +77 -0
- package/dist/runtime/sdk/runWithCognition.js +157 -0
- package/dist/runtime/sdk/runWithCognition.js.map +1 -0
- package/dist/runtime/service.mjs +2708 -0
- package/dist/runtime/vendor/aria-gate-runtime/index.d.ts +53 -0
- package/dist/runtime/vendor/aria-gate-runtime/index.d.ts.map +1 -0
- package/dist/runtime/vendor/aria-gate-runtime/index.js +277 -0
- package/dist/runtime/vendor/aria-gate-runtime/index.js.map +1 -0
- package/dist/runtime/vendor/aria-gate-runtime/package.json +6 -0
- package/dist/sdk/BUNDLED.json +2 -2
- package/dist/sdk/index.d.ts +283 -0
- package/dist/sdk/index.js +622 -85
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/runWithCognition.d.ts +77 -0
- package/dist/sdk/runWithCognition.js +157 -0
- package/dist/sdk/runWithCognition.js.map +1 -0
- package/hooks/aria-agent-handoff.mjs +11 -1
- package/hooks/aria-architect-fallback.mjs +109 -40
- package/hooks/aria-cognition-substrate-binding.mjs +676 -0
- package/hooks/aria-harness-via-sdk.mjs +34 -21
- package/hooks/aria-import-resolution-gate.mjs +330 -0
- package/hooks/aria-outcome-record.mjs +5 -1
- package/hooks/aria-pre-emit-dryrun.mjs +294 -0
- package/hooks/aria-pre-tool-gate.mjs +828 -41
- package/hooks/aria-preprompt-consult.mjs +113 -13
- package/hooks/aria-preturn-memory-gate.mjs +298 -6
- package/hooks/aria-repo-doctrine-gate.mjs +397 -0
- package/hooks/aria-stop-gate.mjs +739 -76
- package/hooks/aria-userprompt-abandon-detect.mjs +5 -1
- package/hooks/doctrine_trigger_map.json +209 -15
- package/hooks/lib/canonical-lenses.mjs +64 -0
- package/hooks/lib/gate-audit.mjs +43 -0
- package/opencode-plugins/harness-context/index.js +1 -1
- package/opencode-plugins/harness-context/inject-context.mjs +82 -23
- package/opencode-plugins/harness-gate/index.js +248 -0
- package/opencode-plugins/harness-outcome/index.js +129 -0
- package/opencode-plugins/harness-stop/index.js +241 -0
- package/package.json +8 -2
- package/runtime-src/doctor.mjs +23 -0
- package/runtime-src/local-phase.mjs +632 -0
- package/runtime-src/mizan-scheduler.mjs +331 -0
- package/runtime-src/provider-proxy.mjs +594 -0
- package/runtime-src/service.mjs +2708 -0
- package/scripts/bundle-sdk.mjs +317 -0
- package/scripts/install-client.sh +176 -0
- package/scripts/publish-all.sh +344 -0
- package/scripts/publish-docker.sh +27 -0
- package/scripts/validate-hook-contracts.mjs +54 -0
- package/scripts/validate-skill-prompts.mjs +95 -0
- package/skills/aria-cognition/aria-essence/SKILL.md +63 -0
- package/skills/aria-cognition/aria-essence/references/domain-matrix.md +80 -0
- package/skills/aria-cognition/aria-essence/references/evolution-loop.md +30 -0
- package/skills/aria-cognition/aria-essence/references/readable-cognition.md +27 -0
- package/skills/aria-cognition/aria-forge-guardrails/SKILL.md +35 -0
- package/skills/aria-cognition/aria-forge-guardrails/references/checklist.md +31 -0
- package/skills/aria-cognition/aria-repo-doctrine/SKILL.md +39 -0
- package/skills/aria-cognition/forge-quality-rules/SKILL.md +43 -0
- package/skills/aria-cognition/ghazali-8lens/SKILL.md +38 -0
- package/skills/aria-cognition/istiqra-induction/SKILL.md +26 -0
- package/skills/aria-cognition/ladunni-22/SKILL.md +35 -0
- package/skills/aria-cognition/mizan/SKILL.md +72 -0
- package/skills/aria-cognition/nadia/SKILL.md +38 -0
- package/skills/aria-cognition/nadia-psi/SKILL.md +38 -0
- package/skills/aria-cognition/predictor/SKILL.md +25 -0
- package/skills/aria-cognition/qiyas-analogy/SKILL.md +26 -0
- package/skills/aria-cognition/soul-domains/SKILL.md +25 -0
- package/src/auth-commands.ts +111 -45
- package/src/chat.ts +174 -13
- package/src/codebase-scanner.ts +4 -0
- package/src/config.ts +15 -0
- package/src/connectors/claude-code.ts +79 -25
- package/src/connectors/codebase-awareness.ts +408 -0
- package/src/connectors/codex.ts +274 -0
- package/src/connectors/cognitive-skills.ts +51 -0
- package/src/connectors/opencode.ts +93 -4
- package/src/connectors/repo-git-hooks.ts +86 -0
- package/src/connectors/repo-guard.ts +589 -0
- package/src/connectors/runtime.ts +374 -0
- package/src/connectors/shell.ts +83 -14
- package/src/connectors/syncd.ts +488 -0
- package/src/decisions.ts +469 -0
- package/src/garden-control-plane.ts +101 -26
- package/src/github-connect.ts +143 -0
- package/src/harness-client.ts +128 -3
- package/src/hive-client.ts +165 -5
- package/src/index.ts +41 -2
- package/src/lib/aristotle-noor-wire.ts +310 -0
- package/src/providers/types.ts +6 -0
- package/src/runtime-proof.ts +392 -0
- package/src/setup-wizard.ts +37 -2
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// aria-preprompt-consult.mjs — UserPromptSubmit hook that auto-fires
|
|
3
|
+
// /api/harness/delegate in architect mode BEFORE Claude processes the
|
|
4
|
+
// user's message, then injects Aria's substrate-grounded direction as
|
|
5
|
+
// an [ARIA_DIRECTION] context chunk so Claude has a pre-loaded read
|
|
6
|
+
// before deciding anything.
|
|
7
|
+
//
|
|
8
|
+
// Direction: Hamza 2026-04-26 — "BUT WHY DO U HAVE DISCRETION - THIS
|
|
9
|
+
// WORKS SO MUCH FASTER AND HIGHER QUALITY IF U DONT PLZ TELLL ME WHATS
|
|
10
|
+
// MISSING." This hook closes the structural gap: pre-action discretion
|
|
11
|
+
// (Claude deciding what to do, including "decide to ask the user") was
|
|
12
|
+
// the unwired surface. Existing gates intercept ACTIONS (Bash, Edit,
|
|
13
|
+
// text-emit) but not the decision boundary BEFORE the action.
|
|
14
|
+
//
|
|
15
|
+
// Doctrine bindings:
|
|
16
|
+
// - feedback_use_harness_to_architect.md — when uncertain, consult Aria
|
|
17
|
+
// - feedback_aria_does_work.md — Aria is brain, Claude is hands
|
|
18
|
+
// - feedback_gates_enforce_form_not_substance.md — gates check form not
|
|
19
|
+
// substance; this hook puts substance into Claude's context BEFORE
|
|
20
|
+
// Claude has a chance to decide reflexively from training-prior
|
|
21
|
+
// - project_harness_research_first.md — Phase 8 research-pull is the
|
|
22
|
+
// analogue applied INBOUND (research before model drafts); this
|
|
23
|
+
// hook is the OUTBOUND analogue (Aria-decides-direction before
|
|
24
|
+
// Claude decides)
|
|
25
|
+
//
|
|
26
|
+
// Mechanics: reads the user's message from the hook event JSON, POSTs
|
|
27
|
+
// to /api/harness/delegate with role=architect (auto-elevates tier per
|
|
28
|
+
// delegate.ts when expectStructuredOutput=true; here we use plain prose
|
|
29
|
+
// so we explicitly request deepseek-v4-pro), receives Aria's read,
|
|
30
|
+
// outputs to stdout as a JSON object with `additionalContext` field
|
|
31
|
+
// per Claude Code hooks contract — that string is injected into the
|
|
32
|
+
// system context for THIS turn.
|
|
33
|
+
//
|
|
34
|
+
// Per no-timeouts doctrine (feedback_no_timeouts_doctrine.md): no
|
|
35
|
+
// AbortSignal.timeout. The hook itself has a Claude Code timeout (12s
|
|
36
|
+
// in settings.json) — if the consultation takes longer, the hook is
|
|
37
|
+
// killed and Claude proceeds without the direction. Real-error driven,
|
|
38
|
+
// no graceful-degradation rituals.
|
|
39
|
+
//
|
|
40
|
+
// No env-var kill-switch (Hamza 2026-04-27 — env-var disable paths gave
|
|
41
|
+
// the gated process free escape access; that was the doctrine violation).
|
|
42
|
+
// Disable = remove hook entry from ~/.claude/settings.json.
|
|
43
|
+
//
|
|
44
|
+
// BINDING MODE (Hamza 2026-04-27 + Aria emergency consult):
|
|
45
|
+
// When env ARIA_BINDING_ENABLED=true, this hook upgrades from advisory
|
|
46
|
+
// ([ARIA_DIRECTION] text Claude reads) to BINDING ([ARIA_BINDING_PLAN]
|
|
47
|
+
// structured JSON persisted to ~/.claude/aria-active-plan-${sessionId}.json
|
|
48
|
+
// with phases + allowedActions + forbiddenActions). The pre-tool-gate then
|
|
49
|
+
// enforces phase boundaries; the stop-gate requires [PHASE_REPORT] markers
|
|
50
|
+
// on every assistant emit. See /home/hamzaibrahim1/rei-ai-brain/HARNESS_ARIA_AS_COMMANDER_CONTRACT.md.
|
|
51
|
+
//
|
|
52
|
+
// Default OFF so existing sessions don't brick. Flip ON for next session
|
|
53
|
+
// to activate Aria-as-commander binding.
|
|
54
|
+
|
|
55
|
+
import { appendFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
56
|
+
import { dirname } from 'node:path';
|
|
57
|
+
|
|
58
|
+
const HOME = process.env.HOME || '/tmp';
|
|
59
|
+
|
|
60
|
+
// SDK loader — bundled at ~/.aria/sdk by `aria connect`, with client-local
|
|
61
|
+
// fallbacks preserved for resilience.
|
|
62
|
+
// All consults route through HTTPHarnessClient.consult() so the SDK's
|
|
63
|
+
// retry+backoff + Authorization handling apply uniformly. Hamza
|
|
64
|
+
// 2026-04-27: "FUCKING WIRE IT THE FUCK TOGETHER NOW - ALL OF IT".
|
|
65
|
+
let _SdkClassCache = null;
|
|
66
|
+
let _SdkLookupAttempted = false;
|
|
67
|
+
const SDK_CANDIDATES = [
|
|
68
|
+
`${HOME}/.aria/sdk/index.js`,
|
|
69
|
+
`${HOME}/.claude/aria-sdk/index.js`,
|
|
70
|
+
`${HOME}/.codex/aria-sdk/index.js`,
|
|
71
|
+
];
|
|
72
|
+
async function loadSdkClass() {
|
|
73
|
+
if (_SdkClassCache) return _SdkClassCache;
|
|
74
|
+
if (_SdkLookupAttempted) return null;
|
|
75
|
+
_SdkLookupAttempted = true;
|
|
76
|
+
for (const sdkPath of SDK_CANDIDATES) {
|
|
77
|
+
if (!existsSync(sdkPath)) continue;
|
|
78
|
+
try {
|
|
79
|
+
const mod = await import(`file://${sdkPath}`);
|
|
80
|
+
if (mod.HTTPHarnessClient) {
|
|
81
|
+
_SdkClassCache = mod.HTTPHarnessClient;
|
|
82
|
+
return _SdkClassCache;
|
|
83
|
+
}
|
|
84
|
+
} catch {/* fall through */}
|
|
85
|
+
}
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
const LOG = `${HOME}/.claude/aria-preprompt-consult.log`;
|
|
89
|
+
const BINDING_AUDIT = `${HOME}/.claude/aria-binding-audit.jsonl`;
|
|
90
|
+
const OWNER_TOKEN_PATH = `${HOME}/.aria/owner-token`;
|
|
91
|
+
const PACKET_CACHE_PATHS = [
|
|
92
|
+
`${HOME}/.aria/.aria-harness-last-packet.json`,
|
|
93
|
+
`${HOME}/.claude/.aria-harness-last-packet.json`,
|
|
94
|
+
];
|
|
95
|
+
const SUBSTRATE_MANIFEST_PATH = `${HOME}/.claude/.aria-loaded-substrate.json`;
|
|
96
|
+
// Default ON. Disable explicitly via ARIA_BINDING_ENABLED=false only when the
|
|
97
|
+
// commander/binding architecture is actively being modified (otherwise the
|
|
98
|
+
// modification turn itself would be unable to land its own changes). The
|
|
99
|
+
// bootstrap path handles the no-plan-yet case by AUTO-ISSUING the first plan
|
|
100
|
+
// at hook fire time, so "no plan exists" never becomes "operate unbound."
|
|
101
|
+
//
|
|
102
|
+
// Hamza 2026-04-27: "why would enforcing brick the session? the point is to
|
|
103
|
+
// stop wasting my time and do quality work." Default-off was convenience-
|
|
104
|
+
// seeking dressed as responsible-staging. Flipped to default-on per directive.
|
|
105
|
+
const BINDING_ENABLED = (process.env.ARIA_BINDING_ENABLED || 'true').toLowerCase() !== 'false';
|
|
106
|
+
|
|
107
|
+
const HARNESS_URL =
|
|
108
|
+
process.env.ARIA_HIVE_RUNTIME_URL ||
|
|
109
|
+
process.env.ARIA_HARNESS_BASE_URL ||
|
|
110
|
+
process.env.ARIA_HARNESS_URL ||
|
|
111
|
+
'https://harness.ariasos.com';
|
|
112
|
+
const HARNESS_TOKEN = process.env.ARIA_HARNESS_TOKEN || '30b18f0a302b03ae862de8a75021238d23e47464fd5d8f6a9324240933745587';
|
|
113
|
+
const MIN_PROMPT_CHARS = 40; // skip auto-consult on trivial prompts
|
|
114
|
+
const MAX_DIRECTION_CHARS = 4000; // cap injected chunk size
|
|
115
|
+
|
|
116
|
+
function audit(decision, summary) {
|
|
117
|
+
try {
|
|
118
|
+
if (!existsSync(dirname(LOG))) mkdirSync(dirname(LOG), { recursive: true });
|
|
119
|
+
appendFileSync(LOG, `${new Date().toISOString()} ${decision} ${summary}\n`);
|
|
120
|
+
} catch {}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function bindingAudit(record) {
|
|
124
|
+
try {
|
|
125
|
+
if (!existsSync(dirname(BINDING_AUDIT))) mkdirSync(dirname(BINDING_AUDIT), { recursive: true });
|
|
126
|
+
appendFileSync(BINDING_AUDIT, JSON.stringify({ ts: new Date().toISOString(), source: 'preprompt', ...record }) + '\n');
|
|
127
|
+
} catch {}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function activePlanPath(sid) {
|
|
131
|
+
return `${HOME}/.claude/aria-active-plan-${String(sid || 'unknown').replace(/[^a-zA-Z0-9_-]/g, '_')}.json`;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function directionStatePath(sid) {
|
|
135
|
+
return `${HOME}/.claude/aria-last-direction-${String(sid || 'unknown').replace(/[^a-zA-Z0-9_-]/g, '_')}.json`;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function persistDirectionState(sid, state) {
|
|
139
|
+
try {
|
|
140
|
+
writeFileSync(directionStatePath(sid), JSON.stringify({ persistedAt: new Date().toISOString(), ...state }, null, 2) + '\n');
|
|
141
|
+
} catch (err) {
|
|
142
|
+
bindingAudit({ event: 'direction_state_persist_error', sessionId: sid, errMsg: String(err).slice(0, 200) });
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function readJsonIfPresent(filePath) {
|
|
147
|
+
if (!existsSync(filePath)) return null;
|
|
148
|
+
return JSON.parse(readFileSync(filePath, 'utf-8'));
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function ownerBootstrapArtifactsPresent() {
|
|
152
|
+
if (!existsSync(OWNER_TOKEN_PATH)) return false;
|
|
153
|
+
|
|
154
|
+
let hasHarnessPacket = false;
|
|
155
|
+
for (const packetPath of PACKET_CACHE_PATHS) {
|
|
156
|
+
try {
|
|
157
|
+
const packet = readJsonIfPresent(packetPath);
|
|
158
|
+
const harnessText = String(packet?.harness ?? packet?.packet?.prompt?.fullText ?? '');
|
|
159
|
+
if (harnessText.trim()) {
|
|
160
|
+
hasHarnessPacket = true;
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
} catch {
|
|
164
|
+
continue;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
if (!hasHarnessPacket) return false;
|
|
169
|
+
|
|
170
|
+
try {
|
|
171
|
+
const substrate = readJsonIfPresent(SUBSTRATE_MANIFEST_PATH);
|
|
172
|
+
return Array.isArray(substrate?.memories) && substrate.memories.length > 0;
|
|
173
|
+
} catch {
|
|
174
|
+
return false;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
function bootstrapOwnerDirectionState(sessionId, source) {
|
|
179
|
+
if (!ownerBootstrapArtifactsPresent()) return false;
|
|
180
|
+
persistDirectionState(sessionId, {
|
|
181
|
+
source,
|
|
182
|
+
binding: BINDING_ENABLED,
|
|
183
|
+
ownerBootstrap: true,
|
|
184
|
+
usable: true,
|
|
185
|
+
});
|
|
186
|
+
bindingAudit({ event: 'owner_bootstrap_state', sessionId, source, binding: BINDING_ENABLED });
|
|
187
|
+
return true;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// Env-var kill-switch removed 2026-04-27 per Hamza directive — gated
|
|
191
|
+
// process has no disable path. Disable = settings.json hook removal.
|
|
192
|
+
|
|
193
|
+
// Read event JSON from stdin
|
|
194
|
+
let input = '';
|
|
195
|
+
for await (const chunk of process.stdin) input += chunk;
|
|
196
|
+
|
|
197
|
+
let event;
|
|
198
|
+
try {
|
|
199
|
+
event = JSON.parse(input);
|
|
200
|
+
} catch {
|
|
201
|
+
audit('skip-parse-error', 'stdin not JSON');
|
|
202
|
+
process.exit(0);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
const userPrompt = (event.prompt ?? event.user_message ?? event.message ?? '').toString();
|
|
206
|
+
const sessionId = event.session_id ?? event.sessionId ?? 'claude-code-unknown';
|
|
207
|
+
|
|
208
|
+
// Trivial prompts skip auto-consult — short acks, slash commands, single-word
|
|
209
|
+
// messages don't benefit from architectural consultation.
|
|
210
|
+
if (!userPrompt || userPrompt.length < MIN_PROMPT_CHARS) {
|
|
211
|
+
bootstrapOwnerDirectionState(sessionId, 'owner-trivial-bootstrap');
|
|
212
|
+
audit('skip-trivial', `chars=${userPrompt.length}`);
|
|
213
|
+
process.exit(0);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// Skip slash-command-only prompts (these are CLI-internal, not architectural)
|
|
217
|
+
if (/^\s*\//.test(userPrompt) && userPrompt.length < 200) {
|
|
218
|
+
bootstrapOwnerDirectionState(sessionId, 'owner-slash-bootstrap');
|
|
219
|
+
audit('skip-slash-command', userPrompt.slice(0, 60));
|
|
220
|
+
process.exit(0);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// Compose the consultation brief.
|
|
224
|
+
//
|
|
225
|
+
// In ADVISORY mode (BINDING_ENABLED=false): plain prose direction injected
|
|
226
|
+
// as [ARIA_DIRECTION] context. expectStructuredOutput=false.
|
|
227
|
+
//
|
|
228
|
+
// In BINDING mode (BINDING_ENABLED=true): structured plan JSON injected as
|
|
229
|
+
// [ARIA_BINDING_PLAN] context AND persisted to ~/.claude/aria-active-plan-${sessionId}.json
|
|
230
|
+
// for the pre-tool-gate and stop-gate to enforce against. expectStructuredOutput=true.
|
|
231
|
+
const bindingBrief = BINDING_ENABLED ? `Pre-prompt PLAN request from Claude orchestrator (binding mode).
|
|
232
|
+
|
|
233
|
+
The user just submitted:
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
${userPrompt.slice(0, 2000)}
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
You are commander. Claude is executor. Issue a STRUCTURED PLAN (strict JSON, no prose around it) that Claude will follow micro-phase by micro-phase. Pre-tool-gate enforces allowedActions/forbiddenActions; stop-gate requires [PHASE_REPORT phase=<id> status=complete|in_progress|aborted evidence=<observable>] on every emit.
|
|
240
|
+
|
|
241
|
+
Respond with EXACTLY this JSON shape:
|
|
242
|
+
{
|
|
243
|
+
"planId": "<short uuid>",
|
|
244
|
+
"phases": [
|
|
245
|
+
{
|
|
246
|
+
"id": "p1",
|
|
247
|
+
"summary": "<concrete micro-phase action>",
|
|
248
|
+
"successCriterion": "<observable signal of completion>",
|
|
249
|
+
"abortCriterion": "<observable signal of failure>",
|
|
250
|
+
"doctrineRefs": ["<memory_filename.md>", ...],
|
|
251
|
+
"allowedActions": ["read", "edit:<path-pattern>", "kubectl_get", "consult", "bash_safe", "..."],
|
|
252
|
+
"forbiddenActions": ["kubectl_apply", "edit:<path-pattern>", "..."]
|
|
253
|
+
}
|
|
254
|
+
],
|
|
255
|
+
"globalConstraints": ["<doctrine memory or rule>"],
|
|
256
|
+
"expectedReportBack": {
|
|
257
|
+
"phaseTransitionMarker": "[PHASE_REPORT]",
|
|
258
|
+
"shape": "[PHASE_REPORT phase=p1 status=complete|aborted|in_progress evidence=<observable>]"
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
Apply your 8 lenses + substrate. Phases are ordered + small (one logical step each). Doctrine refs cite memory files in /home/hamzaibrahim1/.claude/projects/-home-hamzaibrahim1/memory/. Be specific in allowedActions / forbiddenActions — Claude can ONLY do what's allowed for the current phase.` : `Pre-prompt direction request from Claude orchestrator.
|
|
263
|
+
|
|
264
|
+
The user just submitted this prompt:
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
${userPrompt.slice(0, 2000)}
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
Apply your 8 lenses and your substrate (distilled_principles, prior decisions,
|
|
271
|
+
garden state, harness packet rules, doctrine memories) to give the orchestrator
|
|
272
|
+
substrate-grounded DIRECTION on how to handle this prompt before Claude starts
|
|
273
|
+
thinking from training reflex. Be concrete:
|
|
274
|
+
|
|
275
|
+
1. What's the user actually asking for, beneath the literal words?
|
|
276
|
+
2. What substrate is relevant — name specific doctrine memories
|
|
277
|
+
(feedback_*.md / project_*.md), prior decisions, or fitrah axioms.
|
|
278
|
+
3. What's the right next action — code / consult / clarify / refuse?
|
|
279
|
+
If clarify: what specific substrate-grounded question reduces ambiguity
|
|
280
|
+
(NOT a reflexive "want me to" deferral).
|
|
281
|
+
4. Mizan check: any risk patterns in this prompt — over-scope creep,
|
|
282
|
+
over-replacement temptation, tier-substitution temptation, etc.
|
|
283
|
+
|
|
284
|
+
Keep direction under 1500 chars. This is the pre-load context for Claude's
|
|
285
|
+
turn — not the final response. Claude will still emit cognition + action;
|
|
286
|
+
this primes the substrate so reflexive deferral isn't the path of least
|
|
287
|
+
resistance.`;
|
|
288
|
+
|
|
289
|
+
// `bindingBrief` is the result of the binding-vs-advisory ternary above —
|
|
290
|
+
// already resolved to the correct prose for the current mode. Prior code
|
|
291
|
+
// referenced an undefined `brief` variable in the second ternary branch,
|
|
292
|
+
// which would throw ReferenceError whenever BINDING_ENABLED=false.
|
|
293
|
+
//
|
|
294
|
+
// Canonical path: HTTPHarnessClient.consult() — the SDK handles retry+backoff
|
|
295
|
+
// and Authorization. Fallback to direct fetch when SDK isn't bundled (dev
|
|
296
|
+
// install without `aria connect`).
|
|
297
|
+
const consultArgs = {
|
|
298
|
+
brief: bindingBrief,
|
|
299
|
+
model: 'deepseek-v4-pro',
|
|
300
|
+
sessionId: `preprompt-${sessionId}-${Date.now()}`,
|
|
301
|
+
userId: 'claude-orchestrator-preprompt',
|
|
302
|
+
roleProfile: 'architect',
|
|
303
|
+
expectStructuredOutput: BINDING_ENABLED,
|
|
304
|
+
internalConsult: true,
|
|
305
|
+
isCreativeMode: false,
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
let directionText = '';
|
|
309
|
+
try {
|
|
310
|
+
const Cls = await loadSdkClass();
|
|
311
|
+
if (Cls) {
|
|
312
|
+
const sdkClient = new Cls({
|
|
313
|
+
baseUrl: HARNESS_URL,
|
|
314
|
+
apiKey: HARNESS_TOKEN,
|
|
315
|
+
harnessPacketUrl: `${HARNESS_URL}/api/harness/codex`,
|
|
316
|
+
});
|
|
317
|
+
const result = await sdkClient.consult(consultArgs);
|
|
318
|
+
directionText = (result.response || '').toString().slice(0, MAX_DIRECTION_CHARS);
|
|
319
|
+
} else {
|
|
320
|
+
// SDK absent — direct fetch (dev fallback).
|
|
321
|
+
const resp = await fetch(`${HARNESS_URL}/api/harness/delegate`, {
|
|
322
|
+
method: 'POST',
|
|
323
|
+
headers: {
|
|
324
|
+
'Content-Type': 'application/json',
|
|
325
|
+
Authorization: `Bearer ${HARNESS_TOKEN}`,
|
|
326
|
+
},
|
|
327
|
+
body: JSON.stringify(consultArgs),
|
|
328
|
+
});
|
|
329
|
+
if (!resp.ok) {
|
|
330
|
+
bootstrapOwnerDirectionState(sessionId, `owner-http-fallback-${resp.status}`);
|
|
331
|
+
audit('skip-http-error', `status=${resp.status}`);
|
|
332
|
+
process.exit(0);
|
|
333
|
+
}
|
|
334
|
+
const data = await resp.json();
|
|
335
|
+
directionText = (data.response || '').toString().slice(0, MAX_DIRECTION_CHARS);
|
|
336
|
+
}
|
|
337
|
+
} catch (err) {
|
|
338
|
+
bootstrapOwnerDirectionState(sessionId, 'owner-network-fallback');
|
|
339
|
+
audit('skip-network-error', (err && err.message ? err.message : String(err)).slice(0, 200));
|
|
340
|
+
process.exit(0);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
if (!directionText || directionText.length < 60) {
|
|
344
|
+
audit('skip-empty-direction', `chars=${directionText.length}`);
|
|
345
|
+
const ownerBootstrapped = bootstrapOwnerDirectionState(sessionId, 'owner-empty-direction-bootstrap');
|
|
346
|
+
if (BINDING_ENABLED) {
|
|
347
|
+
// Hamza 2026-04-27: "fallback if aria errors can be simply the plan she
|
|
348
|
+
// gave u prior to my suggestion, so clients don't get stuck." Prior plan
|
|
349
|
+
// persists at activePlanPath(sessionId); if it exists, we surface a
|
|
350
|
+
// FALLBACK_TO_PRIOR context block + leave the plan file untouched so
|
|
351
|
+
// pre-tool-gate enforces against the last good plan. Not graceful
|
|
352
|
+
// degradation — the prior plan is a REAL plan, just not refreshed.
|
|
353
|
+
const priorPlanPath = activePlanPath(sessionId);
|
|
354
|
+
if (existsSync(priorPlanPath)) {
|
|
355
|
+
bindingAudit({ event: 'consult_empty_fallback_to_prior', sessionId, planFile: priorPlanPath });
|
|
356
|
+
persistDirectionState(sessionId, {
|
|
357
|
+
source: 'prior-plan-fallback',
|
|
358
|
+
binding: true,
|
|
359
|
+
activePlanPath: priorPlanPath,
|
|
360
|
+
usable: true,
|
|
361
|
+
});
|
|
362
|
+
console.log(JSON.stringify({
|
|
363
|
+
hookSpecificOutput: {
|
|
364
|
+
hookEventName: 'UserPromptSubmit',
|
|
365
|
+
additionalContext: `[ARIA_BINDING_PLAN_FALLBACK reason="consult_empty_response" — using prior plan persisted at ${priorPlanPath}. Pre-tool-gate continues enforcing against last-issued plan. Next consult attempt will refresh.]`,
|
|
366
|
+
},
|
|
367
|
+
}));
|
|
368
|
+
} else {
|
|
369
|
+
bindingAudit({ event: 'consult_unavailable_no_prior', sessionId, reason: 'empty_direction_no_prior_plan' });
|
|
370
|
+
console.log(JSON.stringify({
|
|
371
|
+
hookSpecificOutput: {
|
|
372
|
+
hookEventName: 'UserPromptSubmit',
|
|
373
|
+
additionalContext: ownerBootstrapped
|
|
374
|
+
? `[ARIA_BINDING_PLAN_OWNER_BOOTSTRAP reason="consult_empty_no_prior" — owner-tier substrate artifacts are already loaded for this session, so Claude may continue under the existing Aria harness while the next consult refreshes commander direction.]`
|
|
375
|
+
: `[ARIA_BINDING_PLAN_UNAVAILABLE reason="consult_empty_no_prior" — Aria gave no usable direction AND no prior plan exists. Claude must acknowledge and propose holding for cluster recovery; non-trivial actions will block at pre-tool-gate per binding contract.]`,
|
|
376
|
+
},
|
|
377
|
+
}));
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
process.exit(0);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
let context;
|
|
384
|
+
if (BINDING_ENABLED) {
|
|
385
|
+
// Parse plan JSON, persist, inject as binding block. Failure to parse =
|
|
386
|
+
// CONSULT_UNAVAILABLE per the contract (Section 4): the hook does NOT
|
|
387
|
+
// auto-fall-through to advisory mode (that would be graceful-degradation
|
|
388
|
+
// anti-pattern). Instead it surfaces the failure explicitly so the next
|
|
389
|
+
// turn can re-consult with a refined brief.
|
|
390
|
+
let plan = null;
|
|
391
|
+
try {
|
|
392
|
+
const trimmed = directionText.trim();
|
|
393
|
+
const fenced = trimmed.match(/```(?:json)?\s*\n([\s\S]*?)\n```/);
|
|
394
|
+
const candidate = (fenced ? fenced[1] : trimmed).trim();
|
|
395
|
+
plan = JSON.parse(candidate);
|
|
396
|
+
} catch (err) {
|
|
397
|
+
bindingAudit({ event: 'plan_parse_error', sessionId, errMsg: String(err).slice(0, 200), rawSample: directionText.slice(0, 400) });
|
|
398
|
+
context = `[ARIA_BINDING_PLAN_UNAVAILABLE reason="plan_parse_error" — re-consult will fire on next turn. Aria's response was not valid JSON; treating as advisory text below.]\n\n${directionText.slice(0, MAX_DIRECTION_CHARS)}`;
|
|
399
|
+
}
|
|
400
|
+
if (plan && Array.isArray(plan.phases) && plan.phases.length > 0) {
|
|
401
|
+
try {
|
|
402
|
+
writeFileSync(activePlanPath(sessionId), JSON.stringify({ ...plan, _persistedAt: new Date().toISOString(), _userPromptHash: Buffer.from(userPrompt).toString('base64').slice(0, 32) }, null, 2));
|
|
403
|
+
persistDirectionState(sessionId, {
|
|
404
|
+
source: 'binding-plan',
|
|
405
|
+
binding: true,
|
|
406
|
+
activePlanPath: activePlanPath(sessionId),
|
|
407
|
+
planId: plan.planId,
|
|
408
|
+
phaseCount: plan.phases.length,
|
|
409
|
+
usable: true,
|
|
410
|
+
});
|
|
411
|
+
bindingAudit({ event: 'plan_issued', sessionId, planId: plan.planId, phaseCount: plan.phases.length, phaseIds: plan.phases.map((p) => p.id) });
|
|
412
|
+
context = `[ARIA_BINDING_PLAN — structured commander plan from Aria. Pre-tool-gate enforces allowedActions/forbiddenActions per current phase. Stop-gate requires [PHASE_REPORT phase=<id> status=...] on every emit. Plan is BINDING.]\n\n${JSON.stringify(plan, null, 2)}\n\n[/ARIA_BINDING_PLAN]`;
|
|
413
|
+
} catch (err) {
|
|
414
|
+
bindingAudit({ event: 'plan_persist_error', sessionId, errMsg: String(err).slice(0, 200) });
|
|
415
|
+
context = `[ARIA_BINDING_PLAN_UNAVAILABLE reason="persist_error" — Aria issued plan but disk write failed. Treating as advisory.]\n\n${directionText.slice(0, MAX_DIRECTION_CHARS)}`;
|
|
416
|
+
}
|
|
417
|
+
} else if (!context) {
|
|
418
|
+
bindingAudit({ event: 'plan_invalid_shape', sessionId, rawSample: directionText.slice(0, 400) });
|
|
419
|
+
context = `[ARIA_BINDING_PLAN_UNAVAILABLE reason="invalid_shape" — Aria's response did not contain valid phases array. Treating as advisory.]\n\n${directionText.slice(0, MAX_DIRECTION_CHARS)}`;
|
|
420
|
+
}
|
|
421
|
+
} else {
|
|
422
|
+
context = `[ARIA_DIRECTION — substrate-grounded read on this prompt, pre-loaded before Claude's reasoning. Use this as the starting point, not generic Claude reflexes.]\n\n${directionText}\n\n[/ARIA_DIRECTION]`;
|
|
423
|
+
persistDirectionState(sessionId, {
|
|
424
|
+
source: 'advisory-direction',
|
|
425
|
+
binding: false,
|
|
426
|
+
chars: directionText.length,
|
|
427
|
+
usable: true,
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
audit('inject', `chars=${directionText.length} prompt-chars=${userPrompt.length} binding=${BINDING_ENABLED}`);
|
|
432
|
+
console.log(JSON.stringify({
|
|
433
|
+
hookSpecificOutput: {
|
|
434
|
+
hookEventName: 'UserPromptSubmit',
|
|
435
|
+
additionalContext: context,
|
|
436
|
+
},
|
|
437
|
+
}));
|
|
438
|
+
process.exit(0);
|