@wirecat/slack-cli 0.0.0-stage → 0.2.0
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 +121 -0
- package/LICENSE +204 -0
- package/README.md +131 -2
- package/contracts/wirecat.json +5526 -0
- package/dist/bin/slack.d.ts +3 -0
- package/dist/bin/slack.d.ts.map +1 -0
- package/dist/bin/slack.js +40 -0
- package/dist/bin/slack.js.map +1 -0
- package/dist/bundle/agent-GOFXFUQP.js +37 -0
- package/dist/bundle/all-profiles-4C7VOT2D.js +320 -0
- package/dist/bundle/anthropic-ZD66TC5S.js +91 -0
- package/dist/bundle/app-server-QNCVEDMY.js +249 -0
- package/dist/bundle/bun-2FULBYXS.js +169 -0
- package/dist/bundle/bun-sqlite-PMS26ZUT.js +76 -0
- package/dist/bundle/chunk-2LB5BWC4.js +362 -0
- package/dist/bundle/chunk-2ZEYRHZV.js +18 -0
- package/dist/bundle/chunk-3IJ3THPV.js +7 -0
- package/dist/bundle/chunk-3IZF5ENR.js +61 -0
- package/dist/bundle/chunk-4HSVEQ3R.js +29 -0
- package/dist/bundle/chunk-4QPMHVM5.js +1007 -0
- package/dist/bundle/chunk-53LIHHXC.js +16 -0
- package/dist/bundle/chunk-5F36CXDM.js +794 -0
- package/dist/bundle/chunk-5LPREGD3.js +12636 -0
- package/dist/bundle/chunk-5R5YRYIP.js +1148 -0
- package/dist/bundle/chunk-5RSQTG7L.js +388 -0
- package/dist/bundle/chunk-5SXZETJF.js +170 -0
- package/dist/bundle/chunk-6PDQP5RM.js +50 -0
- package/dist/bundle/chunk-75BLNPN3.js +1197 -0
- package/dist/bundle/chunk-7BEO72EN.js +131 -0
- package/dist/bundle/chunk-7F6RNAIM.js +230 -0
- package/dist/bundle/chunk-AG7FP64Z.js +77 -0
- package/dist/bundle/chunk-BRXTN5LJ.js +338 -0
- package/dist/bundle/chunk-CABZAU37.js +319 -0
- package/dist/bundle/chunk-CCOSG3F2.js +24616 -0
- package/dist/bundle/chunk-CDTZSFTN.js +58 -0
- package/dist/bundle/chunk-CMZBCWND.js +1246 -0
- package/dist/bundle/chunk-CRQEEJNF.js +185 -0
- package/dist/bundle/chunk-CWYU4R65.js +358 -0
- package/dist/bundle/chunk-CZFR6JQX.js +52 -0
- package/dist/bundle/chunk-D72URWJE.js +532 -0
- package/dist/bundle/chunk-DFDN6AUB.js +21 -0
- package/dist/bundle/chunk-DVHX7R54.js +4072 -0
- package/dist/bundle/chunk-DYKOG7QR.js +9596 -0
- package/dist/bundle/chunk-ECDI42G6.js +100 -0
- package/dist/bundle/chunk-EH6ZEJGT.js +932 -0
- package/dist/bundle/chunk-ELY2TLCY.js +259 -0
- package/dist/bundle/chunk-ERRVUVKR.js +156 -0
- package/dist/bundle/chunk-FBWR4E5D.js +353 -0
- package/dist/bundle/chunk-GKS6KL57.js +6848 -0
- package/dist/bundle/chunk-H2COZZ55.js +2787 -0
- package/dist/bundle/chunk-HGXTEK7R.js +82 -0
- package/dist/bundle/chunk-HXLXM7HV.js +726 -0
- package/dist/bundle/chunk-IPP4N6HD.js +24 -0
- package/dist/bundle/chunk-IWTVR7S7.js +53 -0
- package/dist/bundle/chunk-IYJH75D4.js +63 -0
- package/dist/bundle/chunk-JCZLRT4Z.js +39 -0
- package/dist/bundle/chunk-JGRWMR5H.js +123 -0
- package/dist/bundle/chunk-JYRYQJBN.js +633 -0
- package/dist/bundle/chunk-KIKLDI74.js +161 -0
- package/dist/bundle/chunk-L4WO3XH6.js +2020 -0
- package/dist/bundle/chunk-LQDNUAK3.js +274 -0
- package/dist/bundle/chunk-LV5ONLQH.js +38 -0
- package/dist/bundle/chunk-M27Z23OZ.js +23 -0
- package/dist/bundle/chunk-M5XTZHXM.js +142 -0
- package/dist/bundle/chunk-MJBEGUIZ.js +76 -0
- package/dist/bundle/chunk-N4WOLGIV.js +2333 -0
- package/dist/bundle/chunk-N5K4OHPT.js +206 -0
- package/dist/bundle/chunk-NYAPUET7.js +108 -0
- package/dist/bundle/chunk-P4IFLOIK.js +218 -0
- package/dist/bundle/chunk-P6G2QTCD.js +288 -0
- package/dist/bundle/chunk-PL5P7UKW.js +25216 -0
- package/dist/bundle/chunk-PU7R6XNV.js +80 -0
- package/dist/bundle/chunk-QLLBACDR.js +72 -0
- package/dist/bundle/chunk-QP7XN5KX.js +407 -0
- package/dist/bundle/chunk-QY2F6A3D.js +557 -0
- package/dist/bundle/chunk-RLIT7VAZ.js +66 -0
- package/dist/bundle/chunk-S4UUN6LD.js +1410 -0
- package/dist/bundle/chunk-SKGAKI62.js +86 -0
- package/dist/bundle/chunk-SQMZP5MA.js +66653 -0
- package/dist/bundle/chunk-UB6NTICY.js +95 -0
- package/dist/bundle/chunk-UBHQO5HV.js +778 -0
- package/dist/bundle/chunk-UM4RKO24.js +106 -0
- package/dist/bundle/chunk-VAHFY732.js +1068 -0
- package/dist/bundle/chunk-VGDM4C3F.js +188 -0
- package/dist/bundle/chunk-VOUAKCPM.js +41181 -0
- package/dist/bundle/chunk-WCCFJ4Q6.js +3736 -0
- package/dist/bundle/chunk-WV6EXRDV.js +46 -0
- package/dist/bundle/chunk-WVAT5TGY.js +334 -0
- package/dist/bundle/chunk-WW76JMKE.js +1243 -0
- package/dist/bundle/chunk-XXOMUKC6.js +54 -0
- package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
- package/dist/bundle/chunk-YDO6RJ2P.js +1337 -0
- package/dist/bundle/chunk-ZBCFZCJW.js +388 -0
- package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
- package/dist/bundle/command-contract-BWGRUY6L.js +37 -0
- package/dist/bundle/command-server-entry-BATOWE3Y.js +166 -0
- package/dist/bundle/decode-MZQGYXJH.js +297 -0
- package/dist/bundle/definitions-3EONB23J.js +8600 -0
- package/dist/bundle/dispatch-NYC4ARWX.js +411 -0
- package/dist/bundle/dist-AMLBQVKM.js +7577 -0
- package/dist/bundle/dist-PAKDDIBT.js +191 -0
- package/dist/bundle/echarts-7OYGL2GW.js +42501 -0
- package/dist/bundle/embed-4I25DVKZ.js +38 -0
- package/dist/bundle/embedder-YXKQHAZO.js +111 -0
- package/dist/bundle/emoji-4LYX3GOS.js +4271 -0
- package/dist/bundle/failure-3YOVYZTX.js +25 -0
- package/dist/bundle/first-run-2VL2BOV7.js +29 -0
- package/dist/bundle/first-screen-C7FIWZL2.js +37 -0
- package/dist/bundle/instructions-UMNDHXG2.js +11 -0
- package/dist/bundle/mcp-V27RHILF.js +167 -0
- package/dist/bundle/meeting-combined-LS6XO4JH.js +24 -0
- package/dist/bundle/meeting-model-VIR465CY.js +25 -0
- package/dist/bundle/meeting-semantic-H5J3OOF2.js +22 -0
- package/dist/bundle/node-JJ3WDCNJ.js +2340 -0
- package/dist/bundle/node-PYFPGL4E.js +176 -0
- package/dist/bundle/node-TLZSIHIJ.js +21 -0
- package/dist/bundle/node-sqlite-LFWPGDVP.js +74 -0
- package/dist/bundle/oauth-42VCSIVL.js +20 -0
- package/dist/bundle/open-XJ5R5LHC.js +23 -0
- package/dist/bundle/openai-RZBLV4HG.js +238 -0
- package/dist/bundle/process-DD6H3K7L.js +91 -0
- package/dist/bundle/program-OIYIBNSA.js +35443 -0
- package/dist/bundle/prompt-NQRDM5LY.js +17 -0
- package/dist/bundle/recognize-EM7H2IZS.js +26 -0
- package/dist/bundle/remote-Z6NU6QQA.js +31 -0
- package/dist/bundle/rerank-PNPCSPNF.js +52 -0
- package/dist/bundle/schemas-JMKNP4U3.js +2765 -0
- package/dist/bundle/serve-SQVGX76J.js +199 -0
- package/dist/bundle/server-NPJH45FZ.js +212 -0
- package/dist/bundle/server-Z4ZMGRAH.js +79 -0
- package/dist/bundle/slack.js +184 -0
- package/dist/bundle/sqlite-runtime-F3AJGAPN.js +20 -0
- package/dist/bundle/state-JT7ZFSXN.js +36 -0
- package/dist/bundle/store-FXGMHRF3.js +181 -0
- package/dist/bundle/store-J5ZL2USR.js +295 -0
- package/dist/bundle/store-maintenance-command-TIHOIKLZ.js +66 -0
- package/dist/bundle/surface-NW6T5OR6.js +65 -0
- package/dist/commands/api.d.ts +7 -0
- package/dist/commands/api.d.ts.map +1 -0
- package/dist/commands/api.js +49 -0
- package/dist/commands/api.js.map +1 -0
- package/dist/commands/session.d.ts +7 -0
- package/dist/commands/session.d.ts.map +1 -0
- package/dist/commands/session.js +26 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/config.d.ts +24 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +75 -0
- package/dist/config.js.map +1 -0
- package/dist/context.d.ts +59 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +75 -0
- package/dist/context.js.map +1 -0
- package/dist/generated/definitions.d.ts +3 -0
- package/dist/generated/definitions.d.ts.map +1 -0
- package/dist/generated/definitions.js +8596 -0
- package/dist/generated/definitions.js.map +1 -0
- package/dist/generated/emoji.d.ts +2 -0
- package/dist/generated/emoji.d.ts.map +1 -0
- package/dist/generated/emoji.js +4265 -0
- package/dist/generated/emoji.js.map +1 -0
- package/dist/generated/manifest.d.ts +6 -0
- package/dist/generated/manifest.d.ts.map +1 -0
- package/dist/generated/manifest.js +6139 -0
- package/dist/generated/manifest.js.map +1 -0
- package/dist/generated/schemas.d.ts +631 -0
- package/dist/generated/schemas.d.ts.map +1 -0
- package/dist/generated/schemas.js +2426 -0
- package/dist/generated/schemas.js.map +1 -0
- package/dist/generated/types.d.ts +3220 -0
- package/dist/generated/types.d.ts.map +1 -0
- package/dist/generated/types.js +5 -0
- package/dist/generated/types.js.map +1 -0
- package/dist/identity.d.ts +29 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +32 -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/messenger.d.ts +12 -0
- package/dist/messenger.d.ts.map +1 -0
- package/dist/messenger.js +184 -0
- package/dist/messenger.js.map +1 -0
- package/dist/program.d.ts +6 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +116 -0
- package/dist/program.js.map +1 -0
- package/dist/reasons.d.ts +7 -0
- package/dist/reasons.d.ts.map +1 -0
- package/dist/reasons.js +20 -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 +83 -0
- package/dist/setup/flow.js.map +1 -0
- package/dist/setup/guide.d.ts +6 -0
- package/dist/setup/guide.d.ts.map +1 -0
- package/dist/setup/guide.js +13 -0
- package/dist/setup/guide.js.map +1 -0
- package/dist/setup/texts.d.ts +24 -0
- package/dist/setup/texts.d.ts.map +1 -0
- package/dist/setup/texts.js +24 -0
- package/dist/setup/texts.js.map +1 -0
- package/dist/slack/adapter.d.ts +36 -0
- package/dist/slack/adapter.d.ts.map +1 -0
- package/dist/slack/adapter.js +574 -0
- package/dist/slack/adapter.js.map +1 -0
- package/dist/slack/app-manifest.d.ts +25 -0
- package/dist/slack/app-manifest.d.ts.map +1 -0
- package/dist/slack/app-manifest.js +51 -0
- package/dist/slack/app-manifest.js.map +1 -0
- package/dist/slack/client.d.ts +45 -0
- package/dist/slack/client.d.ts.map +1 -0
- package/dist/slack/client.js +236 -0
- package/dist/slack/client.js.map +1 -0
- package/dist/slack/map.d.ts +437 -0
- package/dist/slack/map.d.ts.map +1 -0
- package/dist/slack/map.js +411 -0
- package/dist/slack/map.js.map +1 -0
- package/dist/slack/mrkdwn.d.ts +9 -0
- package/dist/slack/mrkdwn.d.ts.map +1 -0
- package/dist/slack/mrkdwn.js +56 -0
- package/dist/slack/mrkdwn.js.map +1 -0
- package/dist/slack/search.d.ts +24 -0
- package/dist/slack/search.d.ts.map +1 -0
- package/dist/slack/search.js +99 -0
- package/dist/slack/search.js.map +1 -0
- package/dist/slack/threads.d.ts +28 -0
- package/dist/slack/threads.d.ts.map +1 -0
- package/dist/slack/threads.js +56 -0
- package/dist/slack/threads.js.map +1 -0
- package/dist/slack/tokens.d.ts +17 -0
- package/dist/slack/tokens.d.ts.map +1 -0
- package/dist/slack/tokens.js +27 -0
- package/dist/slack/tokens.js.map +1 -0
- package/dist/slack/writes.d.ts +43 -0
- package/dist/slack/writes.d.ts.map +1 -0
- package/dist/slack/writes.js +277 -0
- package/dist/slack/writes.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/package.json +89 -4
- package/skills/slack-cli/SKILL.md +117 -0
- package/skills/slack-cli/references/api/api-admin.md +541 -0
- package/skills/slack-cli/references/api/api-api.md +13 -0
- package/skills/slack-cli/references/api/api-apps.md +78 -0
- package/skills/slack-cli/references/api/api-auth.md +18 -0
- package/skills/slack-cli/references/api/api-bots.md +12 -0
- package/skills/slack-cli/references/api/api-calls.md +68 -0
- package/skills/slack-cli/references/api/api-chat.md +123 -0
- package/skills/slack-cli/references/api/api-conversations.md +230 -0
- package/skills/slack-cli/references/api/api-dialog.md +13 -0
- package/skills/slack-cli/references/api/api-dnd.md +31 -0
- package/skills/slack-cli/references/api/api-emoji.md +8 -0
- package/skills/slack-cli/references/api/api-files.md +120 -0
- package/skills/slack-cli/references/api/api-migration.md +14 -0
- package/skills/slack-cli/references/api/api-pins.md +37 -0
- package/skills/slack-cli/references/api/api-reactions.md +58 -0
- package/skills/slack-cli/references/api/api-reminders.md +51 -0
- package/skills/slack-cli/references/api/api-search.md +18 -0
- package/skills/slack-cli/references/api/api-stars.md +42 -0
- package/skills/slack-cli/references/api/api-team.md +55 -0
- package/skills/slack-cli/references/api/api-usergroups.md +80 -0
- package/skills/slack-cli/references/api/api-users.md +101 -0
- package/skills/slack-cli/references/api/api-views.md +46 -0
- package/skills/slack-cli/references/api/api-workflows.md +36 -0
- package/skills/slack-cli/references/api.md +35 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
alive
|
|
5
|
+
} from "./chunk-IYJH75D4.js";
|
|
6
|
+
import {
|
|
7
|
+
resolvePaths,
|
|
8
|
+
writeSecurely
|
|
9
|
+
} from "./chunk-H2COZZ55.js";
|
|
10
|
+
import {
|
|
11
|
+
__name
|
|
12
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
13
|
+
|
|
14
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.738.0_@wirecat+cli-base@0.132.0_@scalar+openapi-upgrader@0.4.6_comm_2f4ef0250212140e76029d09a7f79b43/node_modules/@wirecat/cli-core/dist/background/lock.js
|
|
15
|
+
import { existsSync, linkSync, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
16
|
+
import { dirname, join } from "node:path";
|
|
17
|
+
var lockPath = /* @__PURE__ */ __name((app, profile, env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "serve", `${profile}.lock`), "lockPath");
|
|
18
|
+
var readLock = /* @__PURE__ */ __name((path) => {
|
|
19
|
+
try {
|
|
20
|
+
const lock = JSON.parse(readFileSync(path, "utf8"));
|
|
21
|
+
return typeof lock.pid === "number" && typeof lock.startedAt === "string" ? lock : void 0;
|
|
22
|
+
} catch {
|
|
23
|
+
return void 0;
|
|
24
|
+
}
|
|
25
|
+
}, "readLock");
|
|
26
|
+
var holdLock = /* @__PURE__ */ __name((path, lock) => writeSecurely(path, `${JSON.stringify(lock)}
|
|
27
|
+
`, 384), "holdLock");
|
|
28
|
+
var takeLock = /* @__PURE__ */ __name((path, lock) => {
|
|
29
|
+
mkdirSync(dirname(path), { recursive: true, mode: 448 });
|
|
30
|
+
const draft = `${path}.${lock.pid}.tmp`;
|
|
31
|
+
writeFileSync(draft, `${JSON.stringify(lock)}
|
|
32
|
+
`, { mode: 384 });
|
|
33
|
+
try {
|
|
34
|
+
for (let attempt = 0; attempt < 5; attempt++) {
|
|
35
|
+
try {
|
|
36
|
+
linkSync(draft, path);
|
|
37
|
+
return void 0;
|
|
38
|
+
} catch (error) {
|
|
39
|
+
if (error.code !== "EEXIST")
|
|
40
|
+
throw error;
|
|
41
|
+
}
|
|
42
|
+
const held = readLock(path);
|
|
43
|
+
if (held && held.pid !== lock.pid && alive(held.pid))
|
|
44
|
+
return held;
|
|
45
|
+
rmSync(path, { force: true });
|
|
46
|
+
}
|
|
47
|
+
throw new Error(`could not take the lock ${path}: it keeps changing`);
|
|
48
|
+
} finally {
|
|
49
|
+
rmSync(draft, { force: true });
|
|
50
|
+
}
|
|
51
|
+
}, "takeLock");
|
|
52
|
+
var releaseLock = /* @__PURE__ */ __name((path, pid = process.pid) => {
|
|
53
|
+
if (readLock(path)?.pid === pid)
|
|
54
|
+
rmSync(path, { force: true });
|
|
55
|
+
}, "releaseLock");
|
|
56
|
+
var currentPath = /* @__PURE__ */ __name((lock) => lock.replace(/\.lock$/, ".current"), "currentPath");
|
|
57
|
+
var markCurrent = /* @__PURE__ */ __name((lock, at = /* @__PURE__ */ new Date()) => writeSecurely(currentPath(lock), `${JSON.stringify({ at: at.toISOString() })}
|
|
58
|
+
`, 384), "markCurrent");
|
|
59
|
+
var readCurrent = /* @__PURE__ */ __name((lock) => {
|
|
60
|
+
try {
|
|
61
|
+
const { at } = JSON.parse(readFileSync(currentPath(lock), "utf8"));
|
|
62
|
+
return typeof at === "string" ? at : void 0;
|
|
63
|
+
} catch {
|
|
64
|
+
return void 0;
|
|
65
|
+
}
|
|
66
|
+
}, "readCurrent");
|
|
67
|
+
var servingProfiles = /* @__PURE__ */ __name((app, env) => {
|
|
68
|
+
const dir = dirname(lockPath(app, "default", env));
|
|
69
|
+
if (!existsSync(dir))
|
|
70
|
+
return [];
|
|
71
|
+
return readdirSync(dir).filter((name) => name.endsWith(".lock")).map((name) => name.slice(0, -".lock".length)).filter((profile) => {
|
|
72
|
+
const lock = readLock(lockPath(app, profile, env));
|
|
73
|
+
return lock !== void 0 && alive(lock.pid);
|
|
74
|
+
});
|
|
75
|
+
}, "servingProfiles");
|
|
76
|
+
|
|
77
|
+
export {
|
|
78
|
+
lockPath,
|
|
79
|
+
readLock,
|
|
80
|
+
holdLock,
|
|
81
|
+
takeLock,
|
|
82
|
+
releaseLock,
|
|
83
|
+
markCurrent,
|
|
84
|
+
readCurrent,
|
|
85
|
+
servingProfiles
|
|
86
|
+
};
|