swarmdo 1.37.0 → 1.50.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/README.md +9 -5
- package/package.json +1 -1
- package/v3/@swarmdo/cli/dist/src/apply/apply.js +6 -1
- package/v3/@swarmdo/cli/dist/src/changelog/changelog.d.ts +21 -0
- package/v3/@swarmdo/cli/dist/src/changelog/changelog.js +43 -0
- package/v3/@swarmdo/cli/dist/src/commands/changelog.js +15 -4
- package/v3/@swarmdo/cli/dist/src/commands/config.js +37 -1
- package/v3/@swarmdo/cli/dist/src/commands/coupling.d.ts +17 -0
- package/v3/@swarmdo/cli/dist/src/commands/coupling.js +85 -0
- package/v3/@swarmdo/cli/dist/src/commands/hidden-coupling.d.ts +19 -0
- package/v3/@swarmdo/cli/dist/src/commands/hidden-coupling.js +92 -0
- package/v3/@swarmdo/cli/dist/src/commands/hooks.js +55 -0
- package/v3/@swarmdo/cli/dist/src/commands/hotspots.js +2 -1
- package/v3/@swarmdo/cli/dist/src/commands/index.js +12 -3
- package/v3/@swarmdo/cli/dist/src/commands/ownership.d.ts +18 -0
- package/v3/@swarmdo/cli/dist/src/commands/ownership.js +88 -0
- package/v3/@swarmdo/cli/dist/src/commands/pack.js +4 -4
- package/v3/@swarmdo/cli/dist/src/commands/redact.js +11 -0
- package/v3/@swarmdo/cli/dist/src/commands/release.js +27 -5
- package/v3/@swarmdo/cli/dist/src/commands/task.js +57 -2
- package/v3/@swarmdo/cli/dist/src/config-lint/agents-lint.d.ts +30 -0
- package/v3/@swarmdo/cli/dist/src/config-lint/agents-lint.js +87 -0
- package/v3/@swarmdo/cli/dist/src/config-lint/commands-lint.d.ts +31 -0
- package/v3/@swarmdo/cli/dist/src/config-lint/commands-lint.js +127 -0
- package/v3/@swarmdo/cli/dist/src/config-lint/lint.d.ts +8 -0
- package/v3/@swarmdo/cli/dist/src/config-lint/lint.js +7 -0
- package/v3/@swarmdo/cli/dist/src/coupling/coupling.d.ts +56 -0
- package/v3/@swarmdo/cli/dist/src/coupling/coupling.js +86 -0
- package/v3/@swarmdo/cli/dist/src/coupling/hidden.d.ts +45 -0
- package/v3/@swarmdo/cli/dist/src/coupling/hidden.js +66 -0
- package/v3/@swarmdo/cli/dist/src/hooks-recipe/command-guard.d.ts +46 -0
- package/v3/@swarmdo/cli/dist/src/hooks-recipe/command-guard.js +120 -0
- package/v3/@swarmdo/cli/dist/src/hooks-recipe/recipe.js +8 -0
- package/v3/@swarmdo/cli/dist/src/mcp-client.js +4 -0
- package/v3/@swarmdo/cli/dist/src/mcp-tools/coupling-tools.d.ts +14 -0
- package/v3/@swarmdo/cli/dist/src/mcp-tools/coupling-tools.js +56 -0
- package/v3/@swarmdo/cli/dist/src/mcp-tools/index.d.ts +2 -0
- package/v3/@swarmdo/cli/dist/src/mcp-tools/index.js +2 -0
- package/v3/@swarmdo/cli/dist/src/mcp-tools/ownership-tools.d.ts +14 -0
- package/v3/@swarmdo/cli/dist/src/mcp-tools/ownership-tools.js +51 -0
- package/v3/@swarmdo/cli/dist/src/mcp-tools/profiles.js +2 -0
- package/v3/@swarmdo/cli/dist/src/mcp-tools/task-deps.d.ts +35 -0
- package/v3/@swarmdo/cli/dist/src/mcp-tools/task-deps.js +87 -0
- package/v3/@swarmdo/cli/dist/src/ownership/ownership.d.ts +61 -0
- package/v3/@swarmdo/cli/dist/src/ownership/ownership.js +151 -0
- package/v3/@swarmdo/cli/dist/src/pack/pack.d.ts +1 -1
- package/v3/@swarmdo/cli/dist/src/pack/pack.js +12 -4
- package/v3/@swarmdo/cli/dist/src/redact/redact.js +47 -16
- package/v3/@swarmdo/cli/dist/src/redact/sarif.d.ts +28 -0
- package/v3/@swarmdo/cli/dist/src/redact/sarif.js +53 -0
- package/v3/@swarmdo/cli/dist/src/release/release.d.ts +19 -0
- package/v3/@swarmdo/cli/dist/src/release/release.js +28 -0
- package/v3/@swarmdo/cli/dist/src/usage/reflect.d.ts +9 -1
- package/v3/@swarmdo/cli/dist/src/usage/reflect.js +14 -4
- package/v3/@swarmdo/cli/dist/src/util/since.d.ts +13 -0
- package/v3/@swarmdo/cli/dist/src/util/since.js +21 -0
- package/v3/@swarmdo/cli/package.json +1 -1
|
@@ -40,11 +40,21 @@ export function monthsBefore(iso, n) {
|
|
|
40
40
|
const dd = String(dt.getDate()).padStart(2, '0');
|
|
41
41
|
return `${yy}-${mm}-${dd}`;
|
|
42
42
|
}
|
|
43
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* Inclusive whole-day span between two ISO dates (from <= to). Pure.
|
|
45
|
+
*
|
|
46
|
+
* Counts on the UTC timeline (`Date.UTC`), NOT local midnights: a local
|
|
47
|
+
* `new Date('…T00:00:00')` is DST-sensitive, so a range crossing a spring-forward
|
|
48
|
+
* day (only 23h long) would floor-divide to one day short — e.g. under
|
|
49
|
+
* TZ=America/New_York a full March would read 30. UTC calendar midnights are
|
|
50
|
+
* always an exact 86.4M ms apart, so this is correct in every process timezone.
|
|
51
|
+
*/
|
|
44
52
|
export function spanDays(from, to) {
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
|
|
53
|
+
const [ay, am, ad] = from.split('-').map(Number);
|
|
54
|
+
const [by, bm, bd] = to.split('-').map(Number);
|
|
55
|
+
const a = Date.UTC(ay, am - 1, ad);
|
|
56
|
+
const b = Date.UTC(by, bm - 1, bd);
|
|
57
|
+
return Math.round((b - a) / 86_400_000) + 1;
|
|
48
58
|
}
|
|
49
59
|
/** Longest run of consecutive calendar days present in the set. Pure. */
|
|
50
60
|
export function longestStreakOf(days) {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* since.ts — normalize compact age windows for `git log --since`.
|
|
3
|
+
*
|
|
4
|
+
* git's approxidate parser does NOT understand the bare compact form `90d`
|
|
5
|
+
* (it silently matches nothing — `git log --since=90d` returns zero commits),
|
|
6
|
+
* yet `hotspots`/`coupling` document `--since 90d`. This maps the compact forms
|
|
7
|
+
* (`90d`, `6mo`, `2w`, `1y`, `3h`) to the spelled-out `"90 days ago"` git DOES
|
|
8
|
+
* understand. Anything already spelled out (`"3 months ago"`), an ISO date, or
|
|
9
|
+
* an unrecognized token passes through unchanged. Pure + unit-tested.
|
|
10
|
+
*/
|
|
11
|
+
/** Convert `90d`→`90 days ago`, `6mo`→`6 months ago`, etc. Passthrough otherwise. */
|
|
12
|
+
export declare function normalizeSince(since: string): string;
|
|
13
|
+
//# sourceMappingURL=since.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* since.ts — normalize compact age windows for `git log --since`.
|
|
3
|
+
*
|
|
4
|
+
* git's approxidate parser does NOT understand the bare compact form `90d`
|
|
5
|
+
* (it silently matches nothing — `git log --since=90d` returns zero commits),
|
|
6
|
+
* yet `hotspots`/`coupling` document `--since 90d`. This maps the compact forms
|
|
7
|
+
* (`90d`, `6mo`, `2w`, `1y`, `3h`) to the spelled-out `"90 days ago"` git DOES
|
|
8
|
+
* understand. Anything already spelled out (`"3 months ago"`), an ISO date, or
|
|
9
|
+
* an unrecognized token passes through unchanged. Pure + unit-tested.
|
|
10
|
+
*/
|
|
11
|
+
const COMPACT = /^\s*(\d+)\s*(d|days?|w|wks?|weeks?|mo|mons?|months?|y|yrs?|years?|h|hrs?|hours?)\s*$/i;
|
|
12
|
+
/** Convert `90d`→`90 days ago`, `6mo`→`6 months ago`, etc. Passthrough otherwise. */
|
|
13
|
+
export function normalizeSince(since) {
|
|
14
|
+
const m = COMPACT.exec(since);
|
|
15
|
+
if (!m)
|
|
16
|
+
return since;
|
|
17
|
+
const c0 = m[2][0].toLowerCase(); // the allowed units are uniquely keyed by first letter
|
|
18
|
+
const unit = c0 === 'd' ? 'days' : c0 === 'w' ? 'weeks' : c0 === 'y' ? 'years' : c0 === 'h' ? 'hours' : 'months';
|
|
19
|
+
return `${m[1]} ${unit} ago`;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=since.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swarmdo/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.50.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Swarmdo CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
|
|
6
6
|
"main": "dist/src/index.js",
|