slacklocalvibe 0.1.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/LICENSE +21 -0
- package/README.md +40 -0
- package/package.json +37 -0
- package/src/cli.js +38 -0
- package/src/commands/daemon.js +289 -0
- package/src/commands/launchd.js +46 -0
- package/src/commands/notify.js +314 -0
- package/src/commands/wizard.js +1143 -0
- package/src/lib/config.js +101 -0
- package/src/lib/launchd.js +237 -0
- package/src/lib/logger.js +67 -0
- package/src/lib/markdown-to-mrkdwn.js +15 -0
- package/src/lib/messages.js +58 -0
- package/src/lib/notify-input.js +191 -0
- package/src/lib/paths.js +88 -0
- package/src/lib/resume.js +86 -0
- package/src/lib/route-store.js +60 -0
- package/src/lib/slack.js +140 -0
- package/src/lib/text.js +62 -0
- package/src/lib/user-config.js +90 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 2001Y
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# SlackLocalVibe
|
|
2
|
+
|
|
3
|
+
Slack DM 通知と「返信 → CLI resume」をつなぐローカルブリッジです。
|
|
4
|
+
Codex / Claude Code の完了通知を Slack に送り、スレッド返信で resume を実行します。
|
|
5
|
+
|
|
6
|
+
## 必要環境
|
|
7
|
+
|
|
8
|
+
- Node.js 18+
|
|
9
|
+
- Slack App(Socket Mode)
|
|
10
|
+
|
|
11
|
+
## インストール
|
|
12
|
+
|
|
13
|
+
ユーザーが実行するのはこれだけです(初回セットアップ)。
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx slacklocalvibe
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
ウィザード内で `npm i -g slacklocalvibe` を実行し、以降の返信/常駐でグローバルコマンドを使います。
|
|
20
|
+
|
|
21
|
+
## 使い方
|
|
22
|
+
|
|
23
|
+
セットアップウィザードを起動します。
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx slacklocalvibe
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### サブコマンド
|
|
30
|
+
|
|
31
|
+
- 通知: `slacklocalvibe notify --tool codex|claude`
|
|
32
|
+
- daemon: `slacklocalvibe daemon`
|
|
33
|
+
- launchd: `slacklocalvibe launchd install|uninstall|status`
|
|
34
|
+
|
|
35
|
+
launchd は **グローバル固定**です。
|
|
36
|
+
|
|
37
|
+
## 設定・ログ
|
|
38
|
+
|
|
39
|
+
- 設定: `~/.config/slacklocalvibe/config.json`
|
|
40
|
+
- ログ: `~/Library/Logs/slacklocalvibe/`
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "slacklocalvibe",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "SlackLocalVibe: Codex/Claude Code turn notifications and reply→resume bridge for Slack DM (Socket Mode)",
|
|
5
|
+
"bin": {
|
|
6
|
+
"slacklocalvibe": "src/cli.js"
|
|
7
|
+
},
|
|
8
|
+
"main": "src/cli.js",
|
|
9
|
+
"files": [
|
|
10
|
+
"src",
|
|
11
|
+
"README.md",
|
|
12
|
+
"LICENSE"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"slack",
|
|
17
|
+
"cli",
|
|
18
|
+
"codex",
|
|
19
|
+
"claude",
|
|
20
|
+
"socket-mode"
|
|
21
|
+
],
|
|
22
|
+
"author": "2001Y",
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"type": "commonjs",
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=18"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@iarna/toml": "^2.2.5",
|
|
30
|
+
"@slack/socket-mode": "^2.0.5",
|
|
31
|
+
"@slack/web-api": "^7.13.0",
|
|
32
|
+
"commander": "^14.0.2",
|
|
33
|
+
"html-to-mrkdwn": "^3.0.0",
|
|
34
|
+
"marked": "^17.0.1",
|
|
35
|
+
"prompts": "^2.4.2"
|
|
36
|
+
}
|
|
37
|
+
}
|
package/src/cli.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { Command } = require("commander");
|
|
3
|
+
const { runWizard } = require("./commands/wizard");
|
|
4
|
+
const { runNotify } = require("./commands/notify");
|
|
5
|
+
const { runDaemon } = require("./commands/daemon");
|
|
6
|
+
const { runLaunchd } = require("./commands/launchd");
|
|
7
|
+
|
|
8
|
+
const program = new Command();
|
|
9
|
+
|
|
10
|
+
program
|
|
11
|
+
.name("slacklocalvibe")
|
|
12
|
+
.description("SlackLocalVibe: Slack DM通知 + 返信resumeブリッジ")
|
|
13
|
+
.version("0.1.0");
|
|
14
|
+
|
|
15
|
+
program
|
|
16
|
+
.command("notify")
|
|
17
|
+
.argument("[payload]", "notify payload json")
|
|
18
|
+
.requiredOption("--tool <tool>", "codex | claude")
|
|
19
|
+
.action(async (_payload, options) => {
|
|
20
|
+
await runNotify({ tool: options.tool });
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
program.command("daemon").action(async () => {
|
|
24
|
+
await runDaemon();
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
program
|
|
28
|
+
.command("launchd")
|
|
29
|
+
.argument("<action>", "install | uninstall | status")
|
|
30
|
+
.action(async (action) => {
|
|
31
|
+
await runLaunchd(action);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
program.action(async () => {
|
|
35
|
+
await runWizard();
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
program.parseAsync(process.argv);
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
const { SocketModeClient } = require("@slack/socket-mode");
|
|
2
|
+
const { randomUUID } = require("crypto");
|
|
3
|
+
const { loadConfig, normalizeConfig, assertDaemonConfig } = require("../lib/config");
|
|
4
|
+
const { createLogger, LEVELS, safeError } = require("../lib/logger");
|
|
5
|
+
const { daemonLogPath, notifyLogPath, wizardLogPath } = require("../lib/paths");
|
|
6
|
+
const { createWebClient, postThreadMessage } = require("../lib/slack");
|
|
7
|
+
const { findRoute } = require("../lib/route-store");
|
|
8
|
+
const {
|
|
9
|
+
buildReplyReceivedMessage,
|
|
10
|
+
REPLY_INVALID_MESSAGE,
|
|
11
|
+
RESUME_FAILED_MESSAGE,
|
|
12
|
+
} = require("../lib/messages");
|
|
13
|
+
const { runCodexResume, runClaudeResume } = require("../lib/resume");
|
|
14
|
+
|
|
15
|
+
function formatErrorHead(text) {
|
|
16
|
+
if (!text) return "";
|
|
17
|
+
const trimmed = String(text).replace(/\s+$/g, "").trim();
|
|
18
|
+
if (!trimmed) return "";
|
|
19
|
+
const firstLine = trimmed.split(/\r?\n/)[0].trim();
|
|
20
|
+
if (!firstLine) return "";
|
|
21
|
+
if (firstLine.length > 200) {
|
|
22
|
+
return `${firstLine.slice(0, 200)}...`;
|
|
23
|
+
}
|
|
24
|
+
return firstLine;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function buildResumeFailedMessage(result) {
|
|
28
|
+
const detail = formatErrorHead(result?.stderrHead || result?.stdoutHead || "");
|
|
29
|
+
if (detail) {
|
|
30
|
+
return `${RESUME_FAILED_MESSAGE}\nエラー: ${detail}`;
|
|
31
|
+
}
|
|
32
|
+
if (result?.code !== undefined && result?.code !== null) {
|
|
33
|
+
return `${RESUME_FAILED_MESSAGE}\nエラーコード: ${result.code}`;
|
|
34
|
+
}
|
|
35
|
+
return RESUME_FAILED_MESSAGE;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
async function runDaemon() {
|
|
39
|
+
const { log } = createLogger({ filePath: daemonLogPath(), scope: "daemon" });
|
|
40
|
+
log(LEVELS.INFO, "daemon.start");
|
|
41
|
+
log(LEVELS.INFO, "daemon.runtime", {
|
|
42
|
+
argv: process.argv,
|
|
43
|
+
exec_path: process.execPath,
|
|
44
|
+
cwd: process.cwd(),
|
|
45
|
+
node: process.version,
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
let config;
|
|
49
|
+
try {
|
|
50
|
+
config = loadConfig();
|
|
51
|
+
} catch (error) {
|
|
52
|
+
log(LEVELS.ERROR, "daemon.config_parse_failed", { error: safeError(error) });
|
|
53
|
+
process.exitCode = 1;
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
if (!config) {
|
|
57
|
+
log(LEVELS.ERROR, "daemon.config_missing");
|
|
58
|
+
process.exitCode = 1;
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
config = normalizeConfig(config);
|
|
62
|
+
|
|
63
|
+
try {
|
|
64
|
+
assertDaemonConfig(config);
|
|
65
|
+
} catch (error) {
|
|
66
|
+
log(LEVELS.ERROR, "daemon.config_invalid", { error: safeError(error) });
|
|
67
|
+
process.exitCode = 1;
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const webClient = createWebClient(config.slack.bot_token);
|
|
72
|
+
const socketClient = new SocketModeClient({
|
|
73
|
+
appToken: config.slack.app_token,
|
|
74
|
+
client: webClient,
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
socketClient.on("error", (error) => {
|
|
78
|
+
log(LEVELS.ERROR, "daemon.socket_error", { error: safeError(error) });
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
socketClient.on("connected", () => {
|
|
82
|
+
log(LEVELS.SUCCRSS, "daemon.socket_connected");
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
socketClient.on("message", async ({ event, body, ack }) => {
|
|
86
|
+
const correlationId = randomUUID();
|
|
87
|
+
const startedAt = Date.now();
|
|
88
|
+
|
|
89
|
+
try {
|
|
90
|
+
await ack();
|
|
91
|
+
log(LEVELS.SUCCRSS, "daemon.ack", {
|
|
92
|
+
correlation_id: correlationId,
|
|
93
|
+
envelope_id: body?.envelope_id,
|
|
94
|
+
});
|
|
95
|
+
} catch (error) {
|
|
96
|
+
log(LEVELS.WARNING, "daemon.ack_failed", {
|
|
97
|
+
correlation_id: correlationId,
|
|
98
|
+
error: safeError(error),
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
handleMessageEvent({
|
|
103
|
+
event,
|
|
104
|
+
body,
|
|
105
|
+
log,
|
|
106
|
+
config,
|
|
107
|
+
webClient,
|
|
108
|
+
correlationId,
|
|
109
|
+
startedAt,
|
|
110
|
+
}).catch((error) => {
|
|
111
|
+
log(LEVELS.ERROR, "daemon.event_error", {
|
|
112
|
+
correlation_id: correlationId,
|
|
113
|
+
error: safeError(error),
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
await socketClient.start();
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
async function handleMessageEvent({
|
|
122
|
+
event,
|
|
123
|
+
body,
|
|
124
|
+
log,
|
|
125
|
+
config,
|
|
126
|
+
webClient,
|
|
127
|
+
correlationId,
|
|
128
|
+
startedAt,
|
|
129
|
+
}) {
|
|
130
|
+
const skipReason = shouldSkipEvent(event);
|
|
131
|
+
if (skipReason) {
|
|
132
|
+
log(LEVELS.DEBUG, "daemon.skip_event", {
|
|
133
|
+
correlation_id: correlationId,
|
|
134
|
+
reason: skipReason,
|
|
135
|
+
});
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
const text = event.text || "";
|
|
140
|
+
if (!text.trim()) {
|
|
141
|
+
log(LEVELS.DEBUG, "daemon.skip_empty", { correlation_id: correlationId });
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const routeEntry = findRoute({
|
|
146
|
+
channel: event.channel,
|
|
147
|
+
threadTs: event.thread_ts,
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
if (!routeEntry) {
|
|
151
|
+
await safeThreadReply({
|
|
152
|
+
log,
|
|
153
|
+
webClient,
|
|
154
|
+
channel: event.channel,
|
|
155
|
+
threadTs: event.thread_ts,
|
|
156
|
+
text: appendLogLocations(REPLY_INVALID_MESSAGE),
|
|
157
|
+
correlationId,
|
|
158
|
+
label: "daemon.reply_invalid",
|
|
159
|
+
});
|
|
160
|
+
log(LEVELS.WARNING, "daemon.route_invalid", {
|
|
161
|
+
correlation_id: correlationId,
|
|
162
|
+
reason: "route_missing",
|
|
163
|
+
});
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
const replyMessage = buildReplyReceivedMessage({
|
|
168
|
+
tool: routeEntry.tool,
|
|
169
|
+
sessionId: routeEntry.session_id,
|
|
170
|
+
cwd: routeEntry.cwd || "",
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
log(LEVELS.STATES, "daemon.reply_payload", {
|
|
174
|
+
correlation_id: correlationId,
|
|
175
|
+
tool: routeEntry.tool,
|
|
176
|
+
session_id: routeEntry.session_id,
|
|
177
|
+
cwd: routeEntry.cwd || "",
|
|
178
|
+
text: replyMessage,
|
|
179
|
+
text_len: replyMessage.length,
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
await safeThreadReply({
|
|
183
|
+
log,
|
|
184
|
+
webClient,
|
|
185
|
+
channel: event.channel,
|
|
186
|
+
threadTs: event.thread_ts,
|
|
187
|
+
text: replyMessage,
|
|
188
|
+
correlationId,
|
|
189
|
+
label: "daemon.reply_received",
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
let result;
|
|
193
|
+
if (routeEntry.tool === "codex") {
|
|
194
|
+
result = await runCodexResume({
|
|
195
|
+
sessionId: routeEntry.session_id,
|
|
196
|
+
prompt: text,
|
|
197
|
+
cwd: routeEntry.cwd || "",
|
|
198
|
+
});
|
|
199
|
+
} else {
|
|
200
|
+
result = await runClaudeResume({
|
|
201
|
+
sessionId: routeEntry.session_id,
|
|
202
|
+
prompt: text,
|
|
203
|
+
cwd: routeEntry.cwd || "",
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
log(LEVELS.STATES, "daemon.resume_result", {
|
|
208
|
+
correlation_id: correlationId,
|
|
209
|
+
tool: routeEntry.tool,
|
|
210
|
+
exit_code: result?.code,
|
|
211
|
+
signal: result?.signal,
|
|
212
|
+
stdout_len: result?.stdoutLen,
|
|
213
|
+
stderr_len: result?.stderrLen,
|
|
214
|
+
stdout_head: formatErrorHead(result?.stdoutHead),
|
|
215
|
+
stderr_head: formatErrorHead(result?.stderrHead),
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
if (result?.code !== 0) {
|
|
219
|
+
await safeThreadReply({
|
|
220
|
+
log,
|
|
221
|
+
webClient,
|
|
222
|
+
channel: event.channel,
|
|
223
|
+
threadTs: event.thread_ts,
|
|
224
|
+
text: appendLogLocations(buildResumeFailedMessage(result)),
|
|
225
|
+
correlationId,
|
|
226
|
+
label: "daemon.reply_failed",
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
log(LEVELS.SUCCRSS, "daemon.event_done", {
|
|
231
|
+
correlation_id: correlationId,
|
|
232
|
+
duration_ms: Date.now() - startedAt,
|
|
233
|
+
input_len: text.length,
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
function shouldSkipEvent(event) {
|
|
238
|
+
if (!event) return "event_missing";
|
|
239
|
+
if (event.subtype) return "subtype";
|
|
240
|
+
if (event.bot_id || event.bot_profile) return "bot_message";
|
|
241
|
+
if (event.channel_type && event.channel_type !== "im") return "not_im";
|
|
242
|
+
if (!event.thread_ts) return "no_thread";
|
|
243
|
+
if (event.thread_ts === event.ts) return "not_reply";
|
|
244
|
+
return "";
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
function appendLogLocations(text) {
|
|
248
|
+
return `${text}\n\n${buildLogLocationsMessage()}`;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
function buildLogLocationsMessage() {
|
|
252
|
+
return [
|
|
253
|
+
"ログの場所:",
|
|
254
|
+
`- notify: ${notifyLogPath()}`,
|
|
255
|
+
`- daemon: ${daemonLogPath()}`,
|
|
256
|
+
`- wizard: ${wizardLogPath()}`,
|
|
257
|
+
].join("\n");
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
async function safeThreadReply({
|
|
261
|
+
log,
|
|
262
|
+
webClient,
|
|
263
|
+
channel,
|
|
264
|
+
threadTs,
|
|
265
|
+
text,
|
|
266
|
+
correlationId,
|
|
267
|
+
label,
|
|
268
|
+
}) {
|
|
269
|
+
try {
|
|
270
|
+
await postThreadMessage({
|
|
271
|
+
client: webClient,
|
|
272
|
+
log,
|
|
273
|
+
channel,
|
|
274
|
+
threadTs,
|
|
275
|
+
text,
|
|
276
|
+
});
|
|
277
|
+
log(LEVELS.SUCCRSS, label, { correlation_id: correlationId });
|
|
278
|
+
} catch (error) {
|
|
279
|
+
log(LEVELS.ERROR, `${label}_failed`, {
|
|
280
|
+
correlation_id: correlationId,
|
|
281
|
+
error: safeError(error),
|
|
282
|
+
});
|
|
283
|
+
throw error;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
module.exports = {
|
|
288
|
+
runDaemon,
|
|
289
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const { createLogger, LEVELS, safeError } = require("../lib/logger");
|
|
2
|
+
const { daemonLogPath } = require("../lib/paths");
|
|
3
|
+
const {
|
|
4
|
+
installLaunchd,
|
|
5
|
+
uninstallLaunchd,
|
|
6
|
+
statusLaunchd,
|
|
7
|
+
} = require("../lib/launchd");
|
|
8
|
+
|
|
9
|
+
async function runLaunchd(action) {
|
|
10
|
+
const { log } = createLogger({ filePath: daemonLogPath(), scope: "launchd" });
|
|
11
|
+
if (action === "install") {
|
|
12
|
+
try {
|
|
13
|
+
const result = installLaunchd();
|
|
14
|
+
log(LEVELS.SUCCRSS, "launchd.install_ok", result);
|
|
15
|
+
} catch (error) {
|
|
16
|
+
log(LEVELS.ERROR, "launchd.install_failed", { error: safeError(error) });
|
|
17
|
+
process.exitCode = 1;
|
|
18
|
+
}
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (action === "uninstall") {
|
|
22
|
+
try {
|
|
23
|
+
const result = uninstallLaunchd();
|
|
24
|
+
log(LEVELS.SUCCRSS, "launchd.uninstall_ok", result);
|
|
25
|
+
} catch (error) {
|
|
26
|
+
log(LEVELS.ERROR, "launchd.uninstall_failed", { error: safeError(error) });
|
|
27
|
+
process.exitCode = 1;
|
|
28
|
+
}
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (action === "status") {
|
|
32
|
+
const result = statusLaunchd();
|
|
33
|
+
if (result.status !== 0) {
|
|
34
|
+
log(LEVELS.WARNING, "launchd.status_not_installed");
|
|
35
|
+
process.exitCode = 1;
|
|
36
|
+
} else {
|
|
37
|
+
log(LEVELS.SUCCRSS, "launchd.status_ok");
|
|
38
|
+
}
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
log(LEVELS.ERROR, "launchd.unknown_action", { action });
|
|
42
|
+
process.exitCode = 1;
|
|
43
|
+
}
|
|
44
|
+
module.exports = {
|
|
45
|
+
runLaunchd,
|
|
46
|
+
};
|