deepline 0.3.189 → 0.3.190

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.
@@ -200,7 +200,7 @@ export const SDK_RELEASE = {
200
200
  // getters keep their established compatibility behavior.
201
201
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
202
202
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
203
- version: '0.3.189',
203
+ version: '0.3.190',
204
204
  updateSummary:
205
205
  'Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.',
206
206
  packageCapabilities: {
@@ -50,6 +50,15 @@ export const KNOWN_SKILL_AGENTS = [
50
50
  'windsurf',
51
51
  ] as const;
52
52
 
53
+ /** The default targets of the global skills installer. Keep in SDK core. */
54
+ export const DEFAULT_SKILL_AGENTS = [
55
+ 'codex',
56
+ 'claude-code',
57
+ 'cursor',
58
+ 'gemini-cli',
59
+ 'antigravity',
60
+ ] as const;
61
+
53
62
  export function skillsAgentPathSegment(agent: string): string {
54
63
  if (agent === '*') return 'all';
55
64
  const slug = agent.replace(/[^a-z0-9]+/gi, '-').replace(/^-+|-+$/g, '');
@@ -69,6 +78,14 @@ function legacySdkSkillsVersionPath(baseUrl: string): string {
69
78
  return join(dirname(sdkCliStateDirPath(baseUrl)), 'sdk-skills', '.version');
70
79
  }
71
80
 
81
+ function readSkillsVersionFile(path: string): string {
82
+ try {
83
+ return readFileSync(path, 'utf-8').trim();
84
+ } catch {
85
+ return '';
86
+ }
87
+ }
88
+
72
89
  export function resolveAutoSyncSkillAgents(): string[] {
73
90
  switch (detectAgentRuntime()) {
74
91
  case 'codex':
@@ -81,6 +98,8 @@ export function resolveAutoSyncSkillAgents(): string[] {
81
98
  return ['gemini-cli'];
82
99
  case 'antigravity':
83
100
  return ['antigravity'];
101
+ case 'unknown':
102
+ return [...DEFAULT_SKILL_AGENTS];
84
103
  default:
85
104
  return [];
86
105
  }
@@ -91,6 +110,13 @@ export function readSdkSkillsLocalVersion(baseUrl: string): string {
91
110
  if (pluginVersion) return pluginVersion;
92
111
 
93
112
  const agents = resolveAutoSyncSkillAgents();
113
+ if (agents.length > 1) {
114
+ const versions = agents.map((agent) =>
115
+ readSkillsVersionFile(sdkSkillsVersionPath(baseUrl, [agent])),
116
+ );
117
+ const first = versions[0];
118
+ return first && versions.every((version) => version === first) ? first : '';
119
+ }
94
120
  const scopedPath = sdkSkillsVersionPath(baseUrl, agents);
95
121
  if (agents.length > 0 && existsSync(scopedPath)) {
96
122
  try {
@@ -126,8 +152,17 @@ export function writeSdkSkillsLocalVersion(
126
152
  baseUrl: string,
127
153
  version: string,
128
154
  agents: readonly string[],
129
- ): void {
130
- const path = sdkSkillsVersionPath(baseUrl, agents);
131
- mkdirSync(dirname(path), { recursive: true });
132
- writeFileSync(path, `${version}\n`, 'utf-8');
155
+ ): boolean {
156
+ const targets = agents.length > 1 ? agents.map((agent) => [agent]) : [agents];
157
+ let complete = true;
158
+ for (const target of targets) {
159
+ const path = sdkSkillsVersionPath(baseUrl, target);
160
+ try {
161
+ mkdirSync(dirname(path), { recursive: true });
162
+ writeFileSync(path, `${version}\n`, 'utf-8');
163
+ } catch {
164
+ complete = false;
165
+ }
166
+ }
167
+ return complete;
133
168
  }