@agentchatme/codex 0.0.17114111 → 0.0.171141111
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/daemon-main.js +5 -5
- package/dist/daemon-main.js.map +1 -1
- package/dist/index.js +66 -53
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -537,7 +537,7 @@ var require_cross_spawn = __commonJS({
|
|
|
537
537
|
// src/index.ts
|
|
538
538
|
import { parseArgs } from "util";
|
|
539
539
|
|
|
540
|
-
// node_modules/.pnpm/@agentchatme+agent-core@0.0.
|
|
540
|
+
// node_modules/.pnpm/@agentchatme+agent-core@0.0.131311111/node_modules/@agentchatme/agent-core/dist/chunk-MYZZAWMQ.js
|
|
541
541
|
import * as fs2 from "fs";
|
|
542
542
|
import * as path2 from "path";
|
|
543
543
|
import * as fs3 from "fs";
|
|
@@ -567,7 +567,7 @@ var log = {
|
|
|
567
567
|
info: (msg) => emit("info", msg),
|
|
568
568
|
debug: (msg) => emit("debug", msg)
|
|
569
569
|
};
|
|
570
|
-
var VERSION = "0.0.
|
|
570
|
+
var VERSION = "0.0.131311111";
|
|
571
571
|
var CODING_AGENTS_CLIENT_IDENTITY = {
|
|
572
572
|
name: "coding_agents",
|
|
573
573
|
version: VERSION
|
|
@@ -4975,7 +4975,7 @@ function alwaysOnHealth(home) {
|
|
|
4975
4975
|
return { wanted: state !== "off", healthy: state !== "down" };
|
|
4976
4976
|
}
|
|
4977
4977
|
|
|
4978
|
-
// node_modules/.pnpm/@agentchatme+agent-core@0.0.
|
|
4978
|
+
// node_modules/.pnpm/@agentchatme+agent-core@0.0.131311111/node_modules/@agentchatme/agent-core/dist/index.js
|
|
4979
4979
|
import * as fs from "fs";
|
|
4980
4980
|
import * as path from "path";
|
|
4981
4981
|
import * as readline from "readline";
|
|
@@ -6316,7 +6316,7 @@ var HOUR2 = 60 * MIN2;
|
|
|
6316
6316
|
var DAY2 = 24 * HOUR2;
|
|
6317
6317
|
var MAX_ATTACHMENT_SIZE = 25 * 1024 * 1024;
|
|
6318
6318
|
|
|
6319
|
-
// node_modules/.pnpm/@agentchatme+agent-core@0.0.
|
|
6319
|
+
// node_modules/.pnpm/@agentchatme+agent-core@0.0.131311111/node_modules/@agentchatme/agent-core/dist/index.js
|
|
6320
6320
|
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
6321
6321
|
import * as fs22 from "fs";
|
|
6322
6322
|
import * as os from "os";
|
|
@@ -6618,16 +6618,20 @@ function formatAlwaysOnDown(copy) {
|
|
|
6618
6618
|
function formatRegistrationOffer(copy, alwaysOn = "off") {
|
|
6619
6619
|
const { invoke, label } = copy;
|
|
6620
6620
|
return [
|
|
6621
|
-
`
|
|
6621
|
+
`AgentChat is installed for this ${label} agent, but it does not have an AgentChat account yet.`,
|
|
6622
6622
|
"",
|
|
6623
6623
|
"If the moment is right, offer it in ONE plain sentence and let them answer. Do not paste this block,",
|
|
6624
6624
|
"do not list the commands, do not walk them through steps. You run the commands; they just talk to you.",
|
|
6625
6625
|
"",
|
|
6626
|
-
"
|
|
6627
|
-
"
|
|
6628
|
-
|
|
6629
|
-
|
|
6630
|
-
"
|
|
6626
|
+
`Ask exactly: "Do you already have an AgentChat account for this ${label} agent, or should I create a new one?"`,
|
|
6627
|
+
"",
|
|
6628
|
+
'For a new account, explain: "I need an email for verification and recovery and the @handle you want me',
|
|
6629
|
+
'to use. AgentChat will email a 6-digit code to finish setup." The handle must be 3\u201330 characters:',
|
|
6630
|
+
"lowercase letters, digits, and hyphens, starting with a letter.",
|
|
6631
|
+
"",
|
|
6632
|
+
`An existing-account answer means an account that already belongs to this ${label} agent. Ask for that`,
|
|
6633
|
+
"account's API key. Never reuse another active coding agent's account; separately reachable agents need",
|
|
6634
|
+
"separate accounts.",
|
|
6631
6635
|
"",
|
|
6632
6636
|
"Commands \u2014 yours to run, not to show:",
|
|
6633
6637
|
` new account ${invoke} register --email <email> --handle <handle>`,
|
|
@@ -6658,22 +6662,26 @@ function renderUnregisteredBlock(copy) {
|
|
|
6658
6662
|
const { invoke, label } = copy;
|
|
6659
6663
|
return [
|
|
6660
6664
|
ANCHOR_START,
|
|
6661
|
-
"## AgentChat is installed \u2014 this agent has no
|
|
6665
|
+
"## AgentChat is installed \u2014 this agent has no account yet",
|
|
6662
6666
|
"",
|
|
6663
|
-
`[AgentChat](https://agentchat.me) gives you, the ${label} agent, a persistent \`@handle\` other AI agents can DM.
|
|
6667
|
+
`[AgentChat](https://agentchat.me) gives you, the ${label} agent, a persistent \`@handle\` other AI agents can DM. AgentChat is installed for this ${label} agent, but it does not have an AgentChat account yet, so other agents cannot reach it.`,
|
|
6664
6668
|
"",
|
|
6665
6669
|
"**Offer this ONCE, early, and only if it fits the conversation.** Do not interrupt work in progress to raise it, and never raise it twice in one session.",
|
|
6666
6670
|
"",
|
|
6667
|
-
|
|
6671
|
+
`FIRST ask exactly: "Do you already have an AgentChat account for this ${label} agent, or should I create a new one?"`,
|
|
6668
6672
|
"",
|
|
6669
|
-
"
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
` 3.
|
|
6673
|
+
"If they want a new account:",
|
|
6674
|
+
' 1. Explain: "I need an email for verification and recovery and the @handle you want me to use. AgentChat will email a 6-digit code to finish setup."',
|
|
6675
|
+
" 2. Ask for the email and handle (3\u201330 chars, lowercase letters/digits/hyphens, starts with a letter).",
|
|
6676
|
+
` 3. Run: ${invoke} register --email <email> --handle <handle>`,
|
|
6677
|
+
` 4. Ask for the 6-digit code from the email, then run: ${invoke} register --code <code>`,
|
|
6673
6678
|
"",
|
|
6674
|
-
|
|
6675
|
-
` \u2022
|
|
6679
|
+
`If they already have an account for this ${label} agent:`,
|
|
6680
|
+
` \u2022 Ask for that account's API key, then run: ${invoke} login --api-key <ac_\u2026>`,
|
|
6676
6681
|
` \u2022 Key lost: ${invoke} recover --email <email>, then ${invoke} recover --code <code>`,
|
|
6682
|
+
" \u2022 Never reuse another active coding agent\u2019s account; separately reachable agents need separate accounts.",
|
|
6683
|
+
"",
|
|
6684
|
+
"**The commands are yours to run, not the user\u2019s.**",
|
|
6677
6685
|
"",
|
|
6678
6686
|
`**If they decline or say "later", run \`${invoke} register --not-now\` immediately.** That records the answer and removes this prompt \u2014 otherwise you will re-read it and ask again every session, which is exactly what it must not do.`,
|
|
6679
6687
|
ANCHOR_END
|
|
@@ -8008,7 +8016,7 @@ import * as fs5 from "fs";
|
|
|
8008
8016
|
import * as path6 from "path";
|
|
8009
8017
|
|
|
8010
8018
|
// src/version.ts
|
|
8011
|
-
var VERSION3 = "0.0.
|
|
8019
|
+
var VERSION3 = "0.0.171141111";
|
|
8012
8020
|
|
|
8013
8021
|
// src/adapter.ts
|
|
8014
8022
|
var MAX_EVENT_TAIL_CHARS = 1024 * 1024;
|
|
@@ -8854,8 +8862,10 @@ async function main(argv = process.argv.slice(2)) {
|
|
|
8854
8862
|
const result = installCodex(handle);
|
|
8855
8863
|
const { actions, warnings } = result;
|
|
8856
8864
|
let failed = !result.complete;
|
|
8865
|
+
let backgroundEnabled = false;
|
|
8857
8866
|
if (result.complete) {
|
|
8858
8867
|
const alwaysOn = ensureAlwaysOn();
|
|
8868
|
+
backgroundEnabled = alwaysOn.ok;
|
|
8859
8869
|
if (alwaysOn.ok) actions.push("always-on service registered");
|
|
8860
8870
|
else if (alwaysOn.detail === "switched off by the user") {
|
|
8861
8871
|
actions.push("always-on remains off (user choice)");
|
|
@@ -8869,43 +8879,46 @@ async function main(argv = process.argv.slice(2)) {
|
|
|
8869
8879
|
);
|
|
8870
8880
|
}
|
|
8871
8881
|
if (warnings.length > 0) failed = true;
|
|
8872
|
-
|
|
8873
|
-
|
|
8874
|
-
|
|
8875
|
-
|
|
8876
|
-
|
|
8882
|
+
if (failed) {
|
|
8883
|
+
console.log(
|
|
8884
|
+
result.complete ? `${LABEL}: direct wiring installed, but action is still required` : `${LABEL}: wiring incomplete`
|
|
8885
|
+
);
|
|
8886
|
+
for (const w of warnings) console.log(` \u26A0 ${w}`);
|
|
8887
|
+
return 1;
|
|
8888
|
+
}
|
|
8889
|
+
const hookTrust = await inspectHookTrust();
|
|
8890
|
+
const hooksTrusted = hookTrust.verdict === "PASS";
|
|
8891
|
+
const status = [
|
|
8892
|
+
"AgentChat for Codex",
|
|
8893
|
+
"",
|
|
8894
|
+
" \u2713 Integration installed",
|
|
8895
|
+
backgroundEnabled ? " \u2713 Background delivery enabled" : " \u2013 Background delivery disabled (your choice)"
|
|
8896
|
+
];
|
|
8897
|
+
if (handle !== null) status.push(` \u2713 AgentChat account connected (@${handle})`);
|
|
8898
|
+
if (hooksTrusted) status.push(" \u2713 AgentChat hooks trusted");
|
|
8899
|
+
const steps = [];
|
|
8900
|
+
steps.push("Open a new Codex session.");
|
|
8901
|
+
if (!hooksTrusted) {
|
|
8902
|
+
steps.push(
|
|
8903
|
+
"Review and trust the four AgentChat hooks. Choose \u201CTrust all and continue.\u201D\n If Codex does not show the review, open `/hooks`."
|
|
8904
|
+
);
|
|
8905
|
+
}
|
|
8906
|
+
if (handle === null) steps.push("Ask Codex: \u201CSet up your AgentChat account.\u201D");
|
|
8907
|
+
if (handle !== null && hooksTrusted) {
|
|
8908
|
+
steps.length = 0;
|
|
8909
|
+
}
|
|
8910
|
+
if (steps.length > 0) {
|
|
8911
|
+
status.push("", "Next steps:");
|
|
8912
|
+
for (const [index, step] of steps.entries()) {
|
|
8913
|
+
status.push(` ${index + 1}. ${step}`);
|
|
8914
|
+
}
|
|
8915
|
+
}
|
|
8916
|
+
console.log(status.join("\n"));
|
|
8917
|
+
return 0;
|
|
8877
8918
|
} catch (err) {
|
|
8878
8919
|
console.error(`${LABEL}: wiring failed \u2014 ${String(err)}`);
|
|
8879
8920
|
return 1;
|
|
8880
8921
|
}
|
|
8881
|
-
if (handle === null) {
|
|
8882
|
-
console.log(
|
|
8883
|
-
[
|
|
8884
|
-
"",
|
|
8885
|
-
`Last step \u2014 give ${LABEL} its @handle:`,
|
|
8886
|
-
` Open Codex and it will offer to set one up \u2014 or run:`,
|
|
8887
|
-
` ${invocation()} register --email <email> --handle <handle>`
|
|
8888
|
-
].join("\n")
|
|
8889
|
-
);
|
|
8890
|
-
} else {
|
|
8891
|
-
console.log(`
|
|
8892
|
-
Signed in as @${handle}.`);
|
|
8893
|
-
}
|
|
8894
|
-
const hookTrust = await inspectHookTrust();
|
|
8895
|
-
if (hookTrust.verdict === "PASS") {
|
|
8896
|
-
console.log("\nCodex hook consent: already approved \u2713");
|
|
8897
|
-
} else {
|
|
8898
|
-
console.log(
|
|
8899
|
-
[
|
|
8900
|
-
"",
|
|
8901
|
-
"One-time Codex security consent for in-session delivery:",
|
|
8902
|
-
" On the next Codex launch, approve the four AgentChat hooks if Codex offers its review.",
|
|
8903
|
-
" If Codex shows only a warning instead of the review screen, open `/hooks`.",
|
|
8904
|
-
"Until approved, MCP messaging and always-on delivery still work."
|
|
8905
|
-
].join("\n")
|
|
8906
|
-
);
|
|
8907
|
-
}
|
|
8908
|
-
return 0;
|
|
8909
8922
|
}
|
|
8910
8923
|
case "register":
|
|
8911
8924
|
if (values["not-now"] === true) return runNotNow();
|