@wirecat/amo-cli 0.0.0-stage → 0.1.1
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/CHANGELOG.md +70 -0
- package/LICENSE +204 -0
- package/README.md +265 -2
- package/contracts/wirecat.json +1356 -0
- package/dist/amo/account.d.ts +18 -0
- package/dist/amo/account.d.ts.map +1 -0
- package/dist/amo/account.js +48 -0
- package/dist/amo/account.js.map +1 -0
- package/dist/amo/allow-list.d.ts +31 -0
- package/dist/amo/allow-list.d.ts.map +1 -0
- package/dist/amo/allow-list.js +106 -0
- package/dist/amo/allow-list.js.map +1 -0
- package/dist/amo/errors.d.ts +12 -0
- package/dist/amo/errors.d.ts.map +1 -0
- package/dist/amo/errors.js +72 -0
- package/dist/amo/errors.js.map +1 -0
- package/dist/amo/json.d.ts +3 -0
- package/dist/amo/json.d.ts.map +1 -0
- package/dist/amo/json.js +3 -0
- package/dist/amo/json.js.map +1 -0
- package/dist/amo/oauth.d.ts +55 -0
- package/dist/amo/oauth.d.ts.map +1 -0
- package/dist/amo/oauth.js +189 -0
- package/dist/amo/oauth.js.map +1 -0
- package/dist/amo/operation.d.ts +45 -0
- package/dist/amo/operation.d.ts.map +1 -0
- package/dist/amo/operation.js +119 -0
- package/dist/amo/operation.js.map +1 -0
- package/dist/amo/operations.d.ts +3 -0
- package/dist/amo/operations.d.ts.map +1 -0
- package/dist/amo/operations.js +1407 -0
- package/dist/amo/operations.js.map +1 -0
- package/dist/amo/routes.d.ts +67 -0
- package/dist/amo/routes.d.ts.map +1 -0
- package/dist/amo/routes.js +65 -0
- package/dist/amo/routes.js.map +1 -0
- package/dist/amo/transport.d.ts +62 -0
- package/dist/amo/transport.d.ts.map +1 -0
- package/dist/amo/transport.js +282 -0
- package/dist/amo/transport.js.map +1 -0
- package/dist/api-keys.d.ts +47 -0
- package/dist/api-keys.d.ts.map +1 -0
- package/dist/api-keys.js +224 -0
- package/dist/api-keys.js.map +1 -0
- package/dist/bin/amo.d.ts +3 -0
- package/dist/bin/amo.d.ts.map +1 -0
- package/dist/bin/amo.js +40 -0
- package/dist/bin/amo.js.map +1 -0
- package/dist/bundle/all-profiles-3KQVWDV4.js +278 -0
- package/dist/bundle/amo.js +198 -0
- package/dist/bundle/anthropic-N5NOX7K7.js +90 -0
- package/dist/bundle/app-server-2MST5EZ5.js +245 -0
- package/dist/bundle/bun-4NHWOFX2.js +169 -0
- package/dist/bundle/bun-sqlite-DRSXPWPR.js +75 -0
- package/dist/bundle/chunk-2B24PDH7.js +1718 -0
- package/dist/bundle/chunk-2I5UVMLW.js +3232 -0
- package/dist/bundle/chunk-3IRJDH2U.js +731 -0
- package/dist/bundle/chunk-4ZAK773N.js +100 -0
- package/dist/bundle/chunk-5D4AEUVA.js +24783 -0
- package/dist/bundle/chunk-5D4Z2B5B.js +334 -0
- package/dist/bundle/chunk-5E5R65CA.js +54 -0
- package/dist/bundle/chunk-5HGGG3QO.js +73 -0
- package/dist/bundle/chunk-5RLUHTK6.js +23 -0
- package/dist/bundle/chunk-5SBLU7D7.js +63 -0
- package/dist/bundle/chunk-5Z5PEEKP.js +206 -0
- package/dist/bundle/chunk-63F65DHU.js +29 -0
- package/dist/bundle/chunk-6RS7OYTD.js +64 -0
- package/dist/bundle/chunk-73CXFE36.js +88 -0
- package/dist/bundle/chunk-7GTUZY7M.js +170 -0
- package/dist/bundle/chunk-7PKFYX7V.js +189 -0
- package/dist/bundle/chunk-7U5HJEPZ.js +1400 -0
- package/dist/bundle/chunk-A33TIM5D.js +4172 -0
- package/dist/bundle/chunk-ADEWU4P4.js +38 -0
- package/dist/bundle/chunk-ADLS6FVG.js +24600 -0
- package/dist/bundle/chunk-AHJ4W2IL.js +106 -0
- package/dist/bundle/chunk-AUBB72VF.js +2572 -0
- package/dist/bundle/chunk-BVMNXI53.js +1266 -0
- package/dist/bundle/chunk-CDY2NJFE.js +136 -0
- package/dist/bundle/chunk-CHUKWON6.js +244 -0
- package/dist/bundle/chunk-CUZRHF34.js +230 -0
- package/dist/bundle/chunk-D72URWJE.js +532 -0
- package/dist/bundle/chunk-DAY6TSPF.js +786 -0
- package/dist/bundle/chunk-DFDN6AUB.js +21 -0
- package/dist/bundle/chunk-DJD7TBYG.js +2791 -0
- package/dist/bundle/chunk-DOSJONCX.js +1197 -0
- package/dist/bundle/chunk-DQV2IKCF.js +72 -0
- package/dist/bundle/chunk-DXGGCGRP.js +218 -0
- package/dist/bundle/chunk-EH6ZEJGT.js +932 -0
- package/dist/bundle/chunk-EPOV5UIO.js +185 -0
- package/dist/bundle/chunk-EQ7A6NA6.js +53 -0
- package/dist/bundle/chunk-EQUKVVHX.js +353 -0
- package/dist/bundle/chunk-EROSAUNP.js +133 -0
- package/dist/bundle/chunk-ESZSMZKT.js +82 -0
- package/dist/bundle/chunk-FKR3M62D.js +407 -0
- package/dist/bundle/chunk-GNTJMB6X.js +142 -0
- package/dist/bundle/chunk-GQ7VFIYM.js +316 -0
- package/dist/bundle/chunk-JH3UOHRE.js +161 -0
- package/dist/bundle/chunk-JMDLPBXK.js +1068 -0
- package/dist/bundle/chunk-JR6TSMFX.js +9435 -0
- package/dist/bundle/chunk-L6AFE73L.js +18 -0
- package/dist/bundle/chunk-LDEBZ3IX.js +238 -0
- package/dist/bundle/chunk-LGQXGOPJ.js +58 -0
- package/dist/bundle/chunk-LJQUYECN.js +6848 -0
- package/dist/bundle/chunk-LRBPT7LQ.js +95 -0
- package/dist/bundle/chunk-LSND5QYI.js +460 -0
- package/dist/bundle/chunk-NC76INB2.js +27955 -0
- package/dist/bundle/chunk-NHXJYS4R.js +1334 -0
- package/dist/bundle/chunk-NJYAL3UW.js +92 -0
- package/dist/bundle/chunk-O2UCU52O.js +4065 -0
- package/dist/bundle/chunk-ODNQU7DH.js +1028 -0
- package/dist/bundle/chunk-P3WQRTYZ.js +24 -0
- package/dist/bundle/chunk-P5LYZRKW.js +63373 -0
- package/dist/bundle/chunk-PFO76YFP.js +2003 -0
- package/dist/bundle/chunk-PM77PRB6.js +12269 -0
- package/dist/bundle/chunk-Q2VNBY4Y.js +38109 -0
- package/dist/bundle/chunk-QDMXZZG4.js +604 -0
- package/dist/bundle/chunk-QRQYUHCZ.js +761 -0
- package/dist/bundle/chunk-RPWAJYI6.js +2336 -0
- package/dist/bundle/chunk-SMSTGO2G.js +58 -0
- package/dist/bundle/chunk-SZ2V62HB.js +72 -0
- package/dist/bundle/chunk-T2UDLX76.js +259 -0
- package/dist/bundle/chunk-TGEQNS6G.js +16 -0
- package/dist/bundle/chunk-TNUFLULO.js +2333 -0
- package/dist/bundle/chunk-TZSUZGWM.js +25 -0
- package/dist/bundle/chunk-U7RLVJ34.js +274 -0
- package/dist/bundle/chunk-UBRREVLJ.js +72 -0
- package/dist/bundle/chunk-ULXQ5MJM.js +76 -0
- package/dist/bundle/chunk-UMVRT7VQ.js +46 -0
- package/dist/bundle/chunk-V77XNPXG.js +360 -0
- package/dist/bundle/chunk-VVHRQ46X.js +193 -0
- package/dist/bundle/chunk-VX37MPTJ.js +7 -0
- package/dist/bundle/chunk-WCYCUTSK.js +362 -0
- package/dist/bundle/chunk-XEFAMLSD.js +288 -0
- package/dist/bundle/chunk-XQL7FEF4.js +721 -0
- package/dist/bundle/chunk-XRTD2GCU.js +627 -0
- package/dist/bundle/chunk-Y37A3232.js +804 -0
- package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
- package/dist/bundle/chunk-ZM7I52EP.js +78 -0
- package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
- package/dist/bundle/cli-QVWTXADI.js +1193 -0
- package/dist/bundle/command-contract-QBUQBXH7.js +39 -0
- package/dist/bundle/command-server-entry-5VL5U5EE.js +168 -0
- package/dist/bundle/decode-SQ5WGNDX.js +296 -0
- package/dist/bundle/dispatch-LA4DFXJD.js +411 -0
- package/dist/bundle/dist-T54K3FJV.js +7577 -0
- package/dist/bundle/echarts-25Z3RINX.js +42501 -0
- package/dist/bundle/embed-BNOTNXMA.js +37 -0
- package/dist/bundle/embedder-BCUT7KKV.js +110 -0
- package/dist/bundle/failure-PKAC6XCT.js +24 -0
- package/dist/bundle/first-run-EO5K5GME.js +28 -0
- package/dist/bundle/first-screen-GMN3T6RW.js +39 -0
- package/dist/bundle/instructions-VLM3QAYB.js +11 -0
- package/dist/bundle/mcp-7ILNMJH5.js +167 -0
- package/dist/bundle/meeting-combined-LAMF7S2B.js +24 -0
- package/dist/bundle/meeting-model-GHMMUQ34.js +24 -0
- package/dist/bundle/meeting-semantic-BMP6323L.js +21 -0
- package/dist/bundle/node-CT3N3TNL.js +176 -0
- package/dist/bundle/node-P4E63KXA.js +2340 -0
- package/dist/bundle/node-TLZSIHIJ.js +21 -0
- package/dist/bundle/node-sqlite-MELD2SBX.js +73 -0
- package/dist/bundle/oauth-YBH5OKC2.js +19 -0
- package/dist/bundle/open-WNSBWTAG.js +22 -0
- package/dist/bundle/openai-XSNMNLW6.js +237 -0
- package/dist/bundle/process-I2QKOMM7.js +91 -0
- package/dist/bundle/program-DV73CIGP.js +4940 -0
- package/dist/bundle/prompt-SOG4AKPM.js +16 -0
- package/dist/bundle/recognize-WMQLWMXH.js +25 -0
- package/dist/bundle/remote-4BTFOLFY.js +30 -0
- package/dist/bundle/rerank-LJ3TWRNV.js +51 -0
- package/dist/bundle/serve-B6UANKXN.js +198 -0
- package/dist/bundle/server-S6XD6V6E.js +77 -0
- package/dist/bundle/server-YRH6GJ5Z.js +206 -0
- package/dist/bundle/source-DGFTA2TN.js +42 -0
- package/dist/bundle/sqlite-runtime-R7QFWFE7.js +19 -0
- package/dist/bundle/state-DIJ5YUOE.js +35 -0
- package/dist/bundle/store-6WFWW7EC.js +294 -0
- package/dist/bundle/store-FJCNZULV.js +32 -0
- package/dist/bundle/store-MYTYDV6A.js +177 -0
- package/dist/bundle/store-maintenance-command-B5TMKFMG.js +68 -0
- package/dist/bundle/writer-GP7VIMAU.js +44 -0
- package/dist/commands/account.d.ts +3 -0
- package/dist/commands/account.d.ts.map +1 -0
- package/dist/commands/account.js +86 -0
- package/dist/commands/account.js.map +1 -0
- package/dist/commands/api.d.ts +3 -0
- package/dist/commands/api.d.ts.map +1 -0
- package/dist/commands/api.js +224 -0
- package/dist/commands/api.js.map +1 -0
- package/dist/commands/crm-shared.d.ts +8 -0
- package/dist/commands/crm-shared.d.ts.map +1 -0
- package/dist/commands/crm-shared.js +111 -0
- package/dist/commands/crm-shared.js.map +1 -0
- package/dist/commands/schedule.d.ts +3 -0
- package/dist/commands/schedule.d.ts.map +1 -0
- package/dist/commands/schedule.js +9 -0
- package/dist/commands/schedule.js.map +1 -0
- package/dist/commands/session.d.ts +18 -0
- package/dist/commands/session.d.ts.map +1 -0
- package/dist/commands/session.js +265 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/commands/write.d.ts +14 -0
- package/dist/commands/write.d.ts.map +1 -0
- package/dist/commands/write.js +36 -0
- package/dist/commands/write.js.map +1 -0
- package/dist/config.d.ts +4 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +29 -0
- package/dist/config.js.map +1 -0
- package/dist/context.d.ts +62 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +97 -0
- package/dist/context.js.map +1 -0
- package/dist/crm/activities.d.ts +32 -0
- package/dist/crm/activities.d.ts.map +1 -0
- package/dist/crm/activities.js +196 -0
- package/dist/crm/activities.js.map +1 -0
- package/dist/crm/records.d.ts +20 -0
- package/dist/crm/records.d.ts.map +1 -0
- package/dist/crm/records.js +175 -0
- package/dist/crm/records.js.map +1 -0
- package/dist/crm/source.d.ts +41 -0
- package/dist/crm/source.d.ts.map +1 -0
- package/dist/crm/source.js +673 -0
- package/dist/crm/source.js.map +1 -0
- package/dist/crm/writer.d.ts +14 -0
- package/dist/crm/writer.d.ts.map +1 -0
- package/dist/crm/writer.js +247 -0
- package/dist/crm/writer.js.map +1 -0
- package/dist/identity.d.ts +7 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +33 -0
- package/dist/identity.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/program.d.ts +6 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +91 -0
- package/dist/program.js.map +1 -0
- package/dist/reasons.d.ts +10 -0
- package/dist/reasons.d.ts.map +1 -0
- package/dist/reasons.js +35 -0
- package/dist/reasons.js.map +1 -0
- package/dist/setup/flow.d.ts +2 -0
- package/dist/setup/flow.d.ts.map +1 -0
- package/dist/setup/flow.js +127 -0
- package/dist/setup/flow.js.map +1 -0
- package/dist/setup/texts.en.json +25 -0
- package/dist/setup/texts.es.json +25 -0
- package/dist/setup/texts.ru.json +25 -0
- package/dist/store.d.ts +15 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +16 -0
- package/dist/store.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/dist/wcat.d.ts +3 -0
- package/dist/wcat.d.ts.map +1 -0
- package/dist/wcat.js +4 -0
- package/dist/wcat.js.map +1 -0
- package/dist/whoami.d.ts +24 -0
- package/dist/whoami.d.ts.map +1 -0
- package/dist/whoami.js +33 -0
- package/dist/whoami.js.map +1 -0
- package/package.json +85 -4
- package/skills/amo-cli/SKILL.md +116 -0
- package/skills/amo-cli/references/mcp.md +38 -0
- package/skills/amo-cli/references/output.md +42 -0
- package/skills/amo-cli/references/reading.md +77 -0
- package/skills/amo-cli/references/setup.md +59 -0
- package/skills/amo-cli/references/writing.md +86 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
CAPABILITY_STATEMENTS,
|
|
5
|
+
storeCapable
|
|
6
|
+
} from "./chunk-LRBPT7LQ.js";
|
|
7
|
+
import {
|
|
8
|
+
importFrom
|
|
9
|
+
} from "./chunk-Y5E2WNWB.js";
|
|
10
|
+
import {
|
|
11
|
+
__name
|
|
12
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
13
|
+
|
|
14
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.113.0_commander@15.0.0_esbuild@0.28.2_typ_9a2e508bb6f63e7e29f0d776540ec8fd/node_modules/@wirecat/cli-core/dist/sqlite-runtime.js
|
|
15
|
+
import { spawn, spawnSync } from "node:child_process";
|
|
16
|
+
import { readFileSync } from "node:fs";
|
|
17
|
+
import { dirname } from "node:path";
|
|
18
|
+
var RESTARTED = "CLI_MESSAGING_SQLITE_RESTARTED";
|
|
19
|
+
var USER_LIBRARY_PATH = "CLI_MESSAGING_USER_LD_LIBRARY_PATH";
|
|
20
|
+
var FORWARDED = ["SIGTERM", "SIGHUP", "SIGQUIT"];
|
|
21
|
+
var ensureSqlite = /* @__PURE__ */ __name(async (runtime = nodeRuntime()) => {
|
|
22
|
+
const { env } = runtime;
|
|
23
|
+
if (env[RESTARTED]) {
|
|
24
|
+
if (env[USER_LIBRARY_PATH] === void 0)
|
|
25
|
+
delete env.LD_LIBRARY_PATH;
|
|
26
|
+
else
|
|
27
|
+
env.LD_LIBRARY_PATH = env[USER_LIBRARY_PATH];
|
|
28
|
+
delete env[USER_LIBRARY_PATH];
|
|
29
|
+
delete env[RESTARTED];
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (runtime.bun || runtime.platform !== "linux")
|
|
33
|
+
return;
|
|
34
|
+
const maps = runtime.maps();
|
|
35
|
+
if (!maps.includes("libsqlite3"))
|
|
36
|
+
return;
|
|
37
|
+
if (await runtime.capable())
|
|
38
|
+
return;
|
|
39
|
+
const library = await runtime.library(maps.includes("ld-musl"));
|
|
40
|
+
if (!library)
|
|
41
|
+
return;
|
|
42
|
+
const restarted = {
|
|
43
|
+
...env,
|
|
44
|
+
LD_LIBRARY_PATH: [dirname(library.path), env.LD_LIBRARY_PATH].filter(Boolean).join(":"),
|
|
45
|
+
[RESTARTED]: "1"
|
|
46
|
+
};
|
|
47
|
+
if (env.LD_LIBRARY_PATH !== void 0)
|
|
48
|
+
restarted[USER_LIBRARY_PATH] = env.LD_LIBRARY_PATH;
|
|
49
|
+
if (!runtime.works(restarted, library.version))
|
|
50
|
+
return;
|
|
51
|
+
await runtime.restart(restarted);
|
|
52
|
+
}, "ensureSqlite");
|
|
53
|
+
var trialScript = /* @__PURE__ */ __name((version) => `
|
|
54
|
+
const { DatabaseSync } = await import("node:sqlite")
|
|
55
|
+
const database = new DatabaseSync(":memory:")
|
|
56
|
+
if (database.prepare("SELECT sqlite_version() AS v").get().v !== ${JSON.stringify(version)}) process.exit(1)
|
|
57
|
+
for (const statement of ${JSON.stringify(CAPABILITY_STATEMENTS)}) database.exec(statement)
|
|
58
|
+
`, "trialScript");
|
|
59
|
+
var nodeRuntime = /* @__PURE__ */ __name(() => ({
|
|
60
|
+
env: process.env,
|
|
61
|
+
platform: process.platform,
|
|
62
|
+
bun: "Bun" in globalThis,
|
|
63
|
+
maps: /* @__PURE__ */ __name(() => {
|
|
64
|
+
try {
|
|
65
|
+
return readFileSync("/proc/self/maps", "utf8");
|
|
66
|
+
} catch {
|
|
67
|
+
return "";
|
|
68
|
+
}
|
|
69
|
+
}, "maps"),
|
|
70
|
+
capable: /* @__PURE__ */ __name(() => storeCapable().then(() => true, () => false), "capable"),
|
|
71
|
+
library: /* @__PURE__ */ __name(async (musl) => {
|
|
72
|
+
try {
|
|
73
|
+
const { libraryFor, SQLITE_VERSION } = await importFrom(new URL("sqlite-runtime.js", import.meta.resolve("@wirecat/cli-core")).href, "@wirecat/cli-core-sqlite");
|
|
74
|
+
const path = libraryFor({ musl });
|
|
75
|
+
return path === void 0 ? void 0 : { path, version: SQLITE_VERSION };
|
|
76
|
+
} catch {
|
|
77
|
+
return void 0;
|
|
78
|
+
}
|
|
79
|
+
}, "library"),
|
|
80
|
+
works: /* @__PURE__ */ __name((env, version) => spawnSync(process.execPath, ["--no-warnings", "--input-type=module", "-e", trialScript(version)], {
|
|
81
|
+
env,
|
|
82
|
+
stdio: "ignore",
|
|
83
|
+
timeout: 1e4
|
|
84
|
+
}).status === 0, "works"),
|
|
85
|
+
restart: /* @__PURE__ */ __name((env) => relay(spawn(process.execPath, [...process.execArgv, ...process.argv.slice(1)], { env, stdio: "inherit" })), "restart")
|
|
86
|
+
}), "nodeRuntime");
|
|
87
|
+
var relay = /* @__PURE__ */ __name((child, host = process) => new Promise(() => {
|
|
88
|
+
for (const signal of FORWARDED)
|
|
89
|
+
host.on(signal, () => child.kill(signal));
|
|
90
|
+
host.on("SIGINT", () => {
|
|
91
|
+
});
|
|
92
|
+
child.on("error", () => host.exit(1));
|
|
93
|
+
child.on("exit", (code, signal) => {
|
|
94
|
+
if (signal) {
|
|
95
|
+
host.removeAllListeners(signal);
|
|
96
|
+
host.kill(host.pid, signal);
|
|
97
|
+
} else
|
|
98
|
+
host.exit(code ?? 1);
|
|
99
|
+
});
|
|
100
|
+
}), "relay");
|
|
101
|
+
|
|
102
|
+
export {
|
|
103
|
+
ensureSqlite,
|
|
104
|
+
nodeRuntime,
|
|
105
|
+
relay
|
|
106
|
+
};
|