teamai-cli 0.24.0-beta.7 → 0.24.0-beta.8
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/index.js +32 -14
- package/package.json +11 -5
package/dist/index.js
CHANGED
|
@@ -868,6 +868,9 @@ var init_types = __esm({
|
|
|
868
868
|
* team repo never receives stat commits (e.g. read-only pull setups).
|
|
869
869
|
* Default: on. */
|
|
870
870
|
usageReport: z.boolean().optional(),
|
|
871
|
+
/** Run `git submodule update --init` on pull so skills distributed as git
|
|
872
|
+
* submodules are populated and kept current. Off by default. */
|
|
873
|
+
submodules: z.boolean().optional(),
|
|
871
874
|
// MCP paths are only set for tools whose config location has been verified.
|
|
872
875
|
// Tools left without `mcp` are skipped by MCP sync rather than guessed at, so a
|
|
873
876
|
// wrong guess can never create a junk config file on a user's machine.
|
|
@@ -22021,7 +22024,7 @@ async function refreshTeamRepo(localConfig) {
|
|
|
22021
22024
|
if (!apiKey) {
|
|
22022
22025
|
throw new Error("No API key configured. Re-run `teamai init --http <url> --token <key>` or set TEAMAI_API_TOKEN.");
|
|
22023
22026
|
}
|
|
22024
|
-
return { label: "HTTP (report/sync delivery)", version: null, reportingOnly: true };
|
|
22027
|
+
return { label: "HTTP (report/sync delivery)", version: null, reportingOnly: true, submodulesFailed: false };
|
|
22025
22028
|
}
|
|
22026
22029
|
if (localConfig.repo.kind === "self") {
|
|
22027
22030
|
try {
|
|
@@ -22035,7 +22038,7 @@ async function refreshTeamRepo(localConfig) {
|
|
|
22035
22038
|
} catch {
|
|
22036
22039
|
version3 = null;
|
|
22037
22040
|
}
|
|
22038
|
-
return { label: "single-repo (knowledge on main)", version: version3, reportingOnly: false };
|
|
22041
|
+
return { label: "single-repo (knowledge on main)", version: version3, reportingOnly: false, submodulesFailed: false };
|
|
22039
22042
|
}
|
|
22040
22043
|
const result = await pullRepo(localConfig.repo.localPath);
|
|
22041
22044
|
try {
|
|
@@ -22050,7 +22053,18 @@ async function refreshTeamRepo(localConfig) {
|
|
|
22050
22053
|
log.debug("Rev check failed, proceeding with full sync");
|
|
22051
22054
|
version2 = null;
|
|
22052
22055
|
}
|
|
22053
|
-
|
|
22056
|
+
let submodulesFailed = false;
|
|
22057
|
+
try {
|
|
22058
|
+
const teamConfig = await loadTeamConfig(localConfig.repo.localPath);
|
|
22059
|
+
if (teamConfig?.submodules) {
|
|
22060
|
+
await createGit2(localConfig.repo.localPath).submoduleUpdate(["--init"]);
|
|
22061
|
+
log.debug("Submodules updated");
|
|
22062
|
+
}
|
|
22063
|
+
} catch (e) {
|
|
22064
|
+
submodulesFailed = true;
|
|
22065
|
+
log.warn(`Submodule update failed for ${localConfig.repo.localPath}: ${e.message}`);
|
|
22066
|
+
}
|
|
22067
|
+
return { label: result, version: version2, reportingOnly: false, submodulesFailed };
|
|
22054
22068
|
}
|
|
22055
22069
|
async function usageReportDisabled(repoPath) {
|
|
22056
22070
|
return (await loadTeamConfig(repoPath))?.usageReport === false;
|
|
@@ -22253,11 +22267,13 @@ async function pullForScope(localConfig, options, policy = {}) {
|
|
|
22253
22267
|
const pullSpin = spinner(`[${scopeLabel}] Pulling team repo...`).start();
|
|
22254
22268
|
let currentRev = null;
|
|
22255
22269
|
let reportingOnly = false;
|
|
22270
|
+
let submodulesFailed = false;
|
|
22256
22271
|
try {
|
|
22257
|
-
const
|
|
22258
|
-
currentRev =
|
|
22259
|
-
reportingOnly =
|
|
22260
|
-
|
|
22272
|
+
const refresh = await refreshTeamRepo(localConfig);
|
|
22273
|
+
currentRev = refresh.version;
|
|
22274
|
+
reportingOnly = refresh.reportingOnly;
|
|
22275
|
+
submodulesFailed = refresh.submodulesFailed;
|
|
22276
|
+
pullSpin.succeed(`[${scopeLabel}] Team repo: ${refresh.label}`);
|
|
22261
22277
|
} catch (e) {
|
|
22262
22278
|
pullSpin.fail(`[${scopeLabel}] Pull failed: ${e.message}`);
|
|
22263
22279
|
return;
|
|
@@ -22685,13 +22701,15 @@ async function pullForScope(localConfig, options, policy = {}) {
|
|
|
22685
22701
|
if (revisionField === "lastPullRev") {
|
|
22686
22702
|
state.lastPull = (/* @__PURE__ */ new Date()).toISOString();
|
|
22687
22703
|
}
|
|
22688
|
-
if (
|
|
22689
|
-
|
|
22690
|
-
|
|
22691
|
-
|
|
22692
|
-
|
|
22693
|
-
|
|
22694
|
-
|
|
22704
|
+
if (!submodulesFailed) {
|
|
22705
|
+
if (currentRev !== null) {
|
|
22706
|
+
state[revisionField] = currentRev;
|
|
22707
|
+
} else {
|
|
22708
|
+
try {
|
|
22709
|
+
state[revisionField] = await getHeadRev(localConfig.repo.localPath);
|
|
22710
|
+
} catch {
|
|
22711
|
+
state[revisionField] = null;
|
|
22712
|
+
}
|
|
22695
22713
|
}
|
|
22696
22714
|
}
|
|
22697
22715
|
state[targetsField] = currentTargets ?? await getInstalledResourceTargets(freshConfig, localConfig);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "teamai-cli",
|
|
3
|
-
"version": "0.24.0-beta.
|
|
3
|
+
"version": "0.24.0-beta.8",
|
|
4
4
|
"description": "TeamAI — Make Every Team AI Native (skill sync + shared knowledge base, powered by Git)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -56,26 +56,32 @@
|
|
|
56
56
|
"ora": "^8.1.0",
|
|
57
57
|
"semver": "^7.8.5",
|
|
58
58
|
"simple-git": "^3.36.0",
|
|
59
|
-
"smol-toml": "^1.
|
|
59
|
+
"smol-toml": "^1.7.1",
|
|
60
60
|
"tree-sitter-wasms": "0.1.13",
|
|
61
61
|
"web-tree-sitter": "0.25.10",
|
|
62
62
|
"yaml": "^2.6.0",
|
|
63
63
|
"zod": "^3.24.0"
|
|
64
64
|
},
|
|
65
65
|
"overrides": {
|
|
66
|
-
"js-yaml": "^3.15.
|
|
66
|
+
"js-yaml": "^3.15.2",
|
|
67
|
+
"brace-expansion@1": "1.1.18",
|
|
68
|
+
"brace-expansion@2": "2.1.4",
|
|
69
|
+
"brace-expansion@5": "5.0.9",
|
|
70
|
+
"nanoid": "3.3.19",
|
|
71
|
+
"postcss": "8.5.28",
|
|
72
|
+
"picomatch": "4.0.7"
|
|
67
73
|
},
|
|
68
74
|
"devDependencies": {
|
|
69
75
|
"@types/cross-spawn": "^6.0.6",
|
|
70
76
|
"@types/fs-extra": "^11.0.4",
|
|
71
77
|
"@types/node": "^20.17.0",
|
|
72
78
|
"@types/semver": "^7.8.0",
|
|
73
|
-
"@vitest/coverage-v8": "^2.
|
|
79
|
+
"@vitest/coverage-v8": "^3.2.7",
|
|
74
80
|
"opencode-ai": "1.18.23",
|
|
75
81
|
"standard-version": "^9.5.0",
|
|
76
82
|
"tsup": "^8.3.0",
|
|
77
83
|
"typescript": "^5.7.0",
|
|
78
|
-
"vitest": "^2.
|
|
84
|
+
"vitest": "^3.2.7"
|
|
79
85
|
},
|
|
80
86
|
"main": "index.js",
|
|
81
87
|
"directories": {
|