codiedev 0.9.52 → 0.10.0-beta.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/README.md +9 -1
- package/dist/captureLog.d.ts +1 -1
- package/dist/cli.js +17 -12
- package/dist/codie.js +146 -1
- package/dist/codieLauncher.d.ts +5 -0
- package/dist/codieLauncher.js +22 -1
- package/dist/codieRuntime.d.ts +11 -1
- package/dist/codieRuntime.js +20 -3
- package/dist/codieRuntimeInstall.d.ts +12 -11
- package/dist/codieRuntimeInstall.js +3 -1
- package/dist/codieStartup.d.ts +26 -0
- package/dist/codieStartup.js +30 -0
- package/dist/commands/doctor.js +8 -0
- package/dist/commands/security.d.ts +1 -0
- package/dist/commands/security.js +156 -0
- package/dist/connect.js +56 -4
- package/dist/cursorHooks.d.ts +23 -0
- package/dist/cursorHooks.js +81 -0
- package/dist/hook.js +272 -26
- package/dist/limitEvent.d.ts +5 -1
- package/dist/limitEvent.js +5 -1
- package/dist/mcp.js +1 -93
- package/dist/repoResolver.js +10 -4
- package/dist/security.d.ts +102 -0
- package/dist/security.js +437 -0
- package/dist/securityDeepScan.d.ts +41 -0
- package/dist/securityDeepScan.js +248 -0
- package/dist/securityDoctor.d.ts +32 -0
- package/dist/securityDoctor.js +63 -0
- package/dist/securityFeature.d.ts +5 -0
- package/dist/securityFeature.js +7 -0
- package/dist/securityInstall.d.ts +63 -0
- package/dist/securityInstall.js +239 -0
- package/dist/securityInventory.d.ts +54 -0
- package/dist/securityInventory.js +556 -0
- package/dist/securityPilot.d.ts +19 -0
- package/dist/securityPilot.js +61 -0
- package/dist/securityPolicy.d.ts +33 -0
- package/dist/securityPolicy.js +188 -0
- package/dist/securitySession.d.ts +6 -0
- package/dist/securitySession.js +72 -0
- package/dist/upgradeNudge.d.ts +1 -0
- package/dist/upgradeNudge.js +1 -0
- package/dist/utils.d.ts +16 -6
- package/dist/utils.js +311 -70
- package/package.json +14 -3
- package/dist/commands/post.d.ts +0 -2
- package/dist/commands/post.js +0 -96
package/dist/commands/post.js
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// `codiedev post --title ... --body ... [--intent share|...] [--filename ...]
|
|
3
|
-
// [--mention NAME ...] [--tag X ...]` — publish to the team feed. Intended
|
|
4
|
-
// for broad-team reach: announcing a skill, asking who knows about X,
|
|
5
|
-
// proposing a change. Use `codiedev send` to address a single teammate.
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.runPost = runPost;
|
|
8
|
-
const shared_1 = require("./shared");
|
|
9
|
-
const VALID_INTENTS = new Set([
|
|
10
|
-
"share",
|
|
11
|
-
"request_review",
|
|
12
|
-
"request_expertise",
|
|
13
|
-
"link_share",
|
|
14
|
-
"rfc",
|
|
15
|
-
]);
|
|
16
|
-
const VALID_FORMATS = new Set(["article", "quick", "workflow", "review"]);
|
|
17
|
-
function parseArgs(args) {
|
|
18
|
-
let title;
|
|
19
|
-
let body;
|
|
20
|
-
let intent;
|
|
21
|
-
let filename;
|
|
22
|
-
let format;
|
|
23
|
-
const mentions = [];
|
|
24
|
-
const tags = [];
|
|
25
|
-
for (let i = 0; i < args.length; i++) {
|
|
26
|
-
const a = args[i];
|
|
27
|
-
const next = (k) => a === k && i + 1 < args.length ? args[++i] : a.startsWith(k + "=") ? a.slice(k.length + 1) : undefined;
|
|
28
|
-
let v;
|
|
29
|
-
if ((v = next("--title")) !== undefined)
|
|
30
|
-
title = v;
|
|
31
|
-
else if ((v = next("--body")) !== undefined)
|
|
32
|
-
body = v;
|
|
33
|
-
else if ((v = next("--intent")) !== undefined)
|
|
34
|
-
intent = v;
|
|
35
|
-
else if ((v = next("--filename")) !== undefined)
|
|
36
|
-
filename = v;
|
|
37
|
-
else if ((v = next("--format")) !== undefined)
|
|
38
|
-
format = v;
|
|
39
|
-
else if ((v = next("--mention")) !== undefined)
|
|
40
|
-
mentions.push(v);
|
|
41
|
-
else if ((v = next("--tag")) !== undefined)
|
|
42
|
-
tags.push(v);
|
|
43
|
-
}
|
|
44
|
-
if (!title || !title.trim()) {
|
|
45
|
-
console.error('Usage: codiedev post --title "<title>" --body "<body>" [--intent share|request_review|request_expertise|link_share|rfc] [--filename <key>] [--mention <name>]...');
|
|
46
|
-
process.exit(1);
|
|
47
|
-
}
|
|
48
|
-
if (!body || !body.trim()) {
|
|
49
|
-
console.error("--body required");
|
|
50
|
-
process.exit(1);
|
|
51
|
-
}
|
|
52
|
-
if (intent && !VALID_INTENTS.has(intent)) {
|
|
53
|
-
console.error(`Invalid --intent. Valid: ${[...VALID_INTENTS].join(", ")}`);
|
|
54
|
-
process.exit(1);
|
|
55
|
-
}
|
|
56
|
-
if (format && !VALID_FORMATS.has(format)) {
|
|
57
|
-
console.error(`Invalid --format. Valid: ${[...VALID_FORMATS].join(", ")}`);
|
|
58
|
-
process.exit(1);
|
|
59
|
-
}
|
|
60
|
-
return { title, body, intent, filename, format, mentions, tags };
|
|
61
|
-
}
|
|
62
|
-
async function runPost(args, configOverride) {
|
|
63
|
-
const parsed = parseArgs(args);
|
|
64
|
-
const config = configOverride ?? (0, shared_1.requireConfig)();
|
|
65
|
-
const start = Date.now();
|
|
66
|
-
try {
|
|
67
|
-
const res = await (0, shared_1.apiRequest)("POST", "/api/cli/post-to-feed", {
|
|
68
|
-
config,
|
|
69
|
-
body: {
|
|
70
|
-
title: parsed.title,
|
|
71
|
-
body: parsed.body,
|
|
72
|
-
intent: parsed.intent,
|
|
73
|
-
filename: parsed.filename,
|
|
74
|
-
format: parsed.format,
|
|
75
|
-
mentions: parsed.mentions.length > 0 ? parsed.mentions : undefined,
|
|
76
|
-
tags: parsed.tags.length > 0 ? parsed.tags : undefined,
|
|
77
|
-
},
|
|
78
|
-
});
|
|
79
|
-
(0, shared_1.recordAgentEvent)(config, {
|
|
80
|
-
tool: "codiedev_post_to_feed",
|
|
81
|
-
ok: true,
|
|
82
|
-
latencyMs: Date.now() - start,
|
|
83
|
-
});
|
|
84
|
-
console.log(`Posted to the team feed${res.postId ? ` (id: ${res.postId})` : ""}.`);
|
|
85
|
-
}
|
|
86
|
-
catch (err) {
|
|
87
|
-
(0, shared_1.recordAgentEvent)(config, {
|
|
88
|
-
tool: "codiedev_post_to_feed",
|
|
89
|
-
ok: false,
|
|
90
|
-
latencyMs: Date.now() - start,
|
|
91
|
-
error: err.message,
|
|
92
|
-
});
|
|
93
|
-
console.error(`Post failed: ${err.message}`);
|
|
94
|
-
process.exit(1);
|
|
95
|
-
}
|
|
96
|
-
}
|