codiedev 0.7.5 → 0.7.6
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/__tests__/scope.test.d.ts +1 -0
- package/dist/__tests__/scope.test.js +24 -0
- package/dist/commands/push.js +5 -0
- package/dist/scope.d.ts +8 -0
- package/dist/scope.js +15 -0
- package/dist/utils.js +16 -0
- package/package.json +6 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const vitest_1 = require("vitest");
|
|
4
|
+
const scope_1 = require("../scope");
|
|
5
|
+
(0, vitest_1.describe)("formatScope", () => {
|
|
6
|
+
(0, vitest_1.it)("formats matched-repo case", () => {
|
|
7
|
+
(0, vitest_1.expect)((0, scope_1.formatScope)({
|
|
8
|
+
workspaceName: "Sonifi",
|
|
9
|
+
matchedRepo: { fullName: "Signal-and-Code/codiedev-ea" },
|
|
10
|
+
})).toBe("→ Sonifi (matched Signal-and-Code/codiedev-ea)");
|
|
11
|
+
});
|
|
12
|
+
(0, vitest_1.it)("formats no-match case", () => {
|
|
13
|
+
(0, vitest_1.expect)((0, scope_1.formatScope)({ workspaceName: "Sonifi", matchedRepo: null })).toBe("→ Sonifi (default profile, no repo match)");
|
|
14
|
+
});
|
|
15
|
+
(0, vitest_1.it)("handles unknown workspace gracefully", () => {
|
|
16
|
+
(0, vitest_1.expect)((0, scope_1.formatScope)({ workspaceName: "", matchedRepo: null })).toBe("→ unknown workspace");
|
|
17
|
+
});
|
|
18
|
+
(0, vitest_1.it)("handles unknown workspace with matched repo", () => {
|
|
19
|
+
(0, vitest_1.expect)((0, scope_1.formatScope)({
|
|
20
|
+
workspaceName: "",
|
|
21
|
+
matchedRepo: { fullName: "Foo/Bar" },
|
|
22
|
+
})).toBe("→ unknown workspace");
|
|
23
|
+
});
|
|
24
|
+
});
|
package/dist/commands/push.js
CHANGED
|
@@ -37,6 +37,8 @@ exports.runPush = runPush;
|
|
|
37
37
|
const fs = __importStar(require("fs"));
|
|
38
38
|
const path = __importStar(require("path"));
|
|
39
39
|
const shared_1 = require("./shared");
|
|
40
|
+
const utils_1 = require("../utils");
|
|
41
|
+
const scope_1 = require("../scope");
|
|
40
42
|
const VALID_TYPES = new Set([
|
|
41
43
|
"spec",
|
|
42
44
|
"bugfix",
|
|
@@ -110,6 +112,7 @@ async function runPush(args) {
|
|
|
110
112
|
process.exit(1);
|
|
111
113
|
}
|
|
112
114
|
const filename = path.basename(absolute);
|
|
115
|
+
const gitRemoteUrl = (0, utils_1.getGitRemoteUrl)(process.cwd()) ?? undefined;
|
|
113
116
|
try {
|
|
114
117
|
const res = await (0, shared_1.apiRequest)("POST", "/api/cli/push", {
|
|
115
118
|
config,
|
|
@@ -120,8 +123,10 @@ async function runPush(args) {
|
|
|
120
123
|
kind,
|
|
121
124
|
tags: tags.length > 0 ? tags : undefined,
|
|
122
125
|
force,
|
|
126
|
+
gitRemoteUrl,
|
|
123
127
|
},
|
|
124
128
|
});
|
|
129
|
+
(0, scope_1.printScope)({ workspaceName: res.workspaceName, matchedRepo: res.matchedRepo });
|
|
125
130
|
const tagSummary = res.tags && res.tags.length > 0 ? ` tags=[${res.tags.join(", ")}]` : "";
|
|
126
131
|
console.log(`✓ Pushed ${filename} (kind=${res.kind}${tagSummary}).`);
|
|
127
132
|
console.log(` Visible under: ${res.destination}`);
|
package/dist/scope.d.ts
ADDED
package/dist/scope.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatScope = formatScope;
|
|
4
|
+
exports.printScope = printScope;
|
|
5
|
+
function formatScope(info) {
|
|
6
|
+
if (!info.workspaceName)
|
|
7
|
+
return "→ unknown workspace";
|
|
8
|
+
if (info.matchedRepo) {
|
|
9
|
+
return `→ ${info.workspaceName} (matched ${info.matchedRepo.fullName})`;
|
|
10
|
+
}
|
|
11
|
+
return `→ ${info.workspaceName} (default profile, no repo match)`;
|
|
12
|
+
}
|
|
13
|
+
function printScope(info) {
|
|
14
|
+
console.log(formatScope(info));
|
|
15
|
+
}
|
package/dist/utils.js
CHANGED
|
@@ -330,6 +330,22 @@ asking the team who knows about X, proposing a change. Always pass an
|
|
|
330
330
|
\`link_share\` (fyi), or \`rfc\` (proposing a change). Attach a \`filename\`
|
|
331
331
|
to link a specific artifact and \`mentions\` to tag teammates.
|
|
332
332
|
|
|
333
|
+
**Default feed-post shape.** When the user explicitly says "push/share/post
|
|
334
|
+
to the feed", default to this shape unless they ask for something else:
|
|
335
|
+
- **Title** ≤10 words: *what + why now*. Imperative or declarative — never
|
|
336
|
+
"Check this out".
|
|
337
|
+
- **Body** — three short lines, grounded in the current session and the
|
|
338
|
+
artifact:
|
|
339
|
+
- **Why this exists** — 1–2 sentences from session context (the problem
|
|
340
|
+
or insight that produced the artifact).
|
|
341
|
+
- **What's in it** — 1 sentence pulled from the artifact's frontmatter
|
|
342
|
+
\`description:\` (skills) or first paragraph (specs). Don't restate
|
|
343
|
+
the whole file — the card preview carries the detail.
|
|
344
|
+
- **Ask** — 1 sentence. *Use it / review it / ping me with thoughts.*
|
|
345
|
+
- **Filename**: always attach so the card preview renders.
|
|
346
|
+
This is the default. If the user wants a one-liner or a different
|
|
347
|
+
structure, follow their lead.
|
|
348
|
+
|
|
333
349
|
**Search before pushing.** For any "save this as …" request, call
|
|
334
350
|
\`codiedev_search\` first with a relevant query. If prior art exists, pull
|
|
335
351
|
it and iterate rather than duplicating.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codiedev",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.6",
|
|
4
4
|
"description": "Connect Claude Code, Codex, Cursor, or VS Code Copilot to CodieDev for org-wide session capture and artifact collaboration",
|
|
5
5
|
"bin": {
|
|
6
6
|
"codiedev": "./dist/cli.js",
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "tsc",
|
|
11
11
|
"dev": "tsc --watch",
|
|
12
|
-
"prepublishOnly": "tsc"
|
|
12
|
+
"prepublishOnly": "tsc",
|
|
13
|
+
"test": "vitest run",
|
|
14
|
+
"test:watch": "vitest"
|
|
13
15
|
},
|
|
14
16
|
"files": [
|
|
15
17
|
"dist",
|
|
@@ -39,7 +41,8 @@
|
|
|
39
41
|
},
|
|
40
42
|
"devDependencies": {
|
|
41
43
|
"@types/node": "^20.0.0",
|
|
42
|
-
"typescript": "^5.4.0"
|
|
44
|
+
"typescript": "^5.4.0",
|
|
45
|
+
"vitest": "^3.2.4"
|
|
43
46
|
},
|
|
44
47
|
"dependencies": {
|
|
45
48
|
"@modelcontextprotocol/sdk": "^1.29.0"
|