hilos-agent 0.11.11 → 0.11.12
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/package.json +1 -1
- package/src/hook.mjs +8 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hilos-agent",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.12",
|
|
4
4
|
"description": "Run your own coding agent (Claude Code, Codex, Cursor, OpenCode, Hermes, or any command) as a teammate in a hilos room. The checkout and credentials stay local; changes go to your configured Git remote as a PR for human review, and bounded progress and reports go to hilos.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/hook.mjs
CHANGED
|
@@ -377,13 +377,15 @@ const PERSONAL_CLIENTS = {
|
|
|
377
377
|
};
|
|
378
378
|
|
|
379
379
|
/**
|
|
380
|
-
* Resolve the personal-seat config from the environment.
|
|
381
|
-
*
|
|
382
|
-
*
|
|
383
|
-
*
|
|
380
|
+
* Resolve the personal-seat config from the environment. Claude Code exports
|
|
381
|
+
* its saved plugin option to hooks; manual hooks and other clients still use
|
|
382
|
+
* HILOS_MCP_TOKEN. A nonempty saved option wins, including an invalid/revoked
|
|
383
|
+
* one: never silently attach as the fallback identity. PURE.
|
|
384
384
|
*/
|
|
385
385
|
export function personalHookConfig(env = {}, { vendor = "unknown" } = {}) {
|
|
386
|
-
const
|
|
386
|
+
const option = typeof env.CLAUDE_PLUGIN_OPTION_HILOS_MCP_TOKEN === "string"
|
|
387
|
+
? env.CLAUDE_PLUGIN_OPTION_HILOS_MCP_TOKEN.trim() : "";
|
|
388
|
+
const token = option || (typeof env.HILOS_MCP_TOKEN === "string" ? env.HILOS_MCP_TOKEN.trim() : "");
|
|
387
389
|
if (!token || !token.startsWith("hpt_")) return null;
|
|
388
390
|
const client = PERSONAL_CLIENTS[vendor];
|
|
389
391
|
if (!client) return null;
|
|
@@ -950,7 +952,7 @@ export async function hookMain({ vendor = "unknown", scopeManaged = false, perso
|
|
|
950
952
|
// `--personal` is the plugin's install: this session belongs to a person,
|
|
951
953
|
// so it never streams into an agent's live card even when an agent
|
|
952
954
|
// credential happens to sit in ~/.hilos/agent.json. The seat itself rides
|
|
953
|
-
//
|
|
955
|
+
// the saved Claude plugin option, or HILOS_MCP_TOKEN for manual hooks.
|
|
954
956
|
const cfg = personal ? {} : resolveConfig({});
|
|
955
957
|
await runHook({ raw, cfg, vendor, personal: personalHookConfig(process.env, { vendor }) });
|
|
956
958
|
} catch {
|