deepline 0.3.188 → 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.188',
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
  }
@@ -2482,11 +2482,14 @@ async function run(
2482
2482
  succeededRows: 0,
2483
2483
  failedRows: 0,
2484
2484
  };
2485
- // Reused rows are already terminal for this run. No completion callback
2486
- // follows for them, so include them in the eventual terminal settlement.
2487
- const alreadyCompletedRows = mapStartResult.completedRows.length;
2488
- settlement.persistedRows += alreadyCompletedRows;
2489
- settlement.succeededRows += alreadyCompletedRows;
2485
+ // `completedRows` is the sheet admission result, not a terminal write
2486
+ // for this run. Normal maps still execute every admitted row (the tool
2487
+ // receipt may be reused inside that execution), and their terminal
2488
+ // callback below is the authoritative settlement. Counting these rows
2489
+ // here as well would report N rows at map start and another N rows at
2490
+ // terminal persistence, advertising 2N rows for an N-row Dataset Handle.
2491
+ // `net_new` maps exclude these rows before execution, so they must not
2492
+ // be counted here either.
2490
2493
  runtimeMapDatasetSettlements.set(datasetId, settlement);
2491
2494
  emitRunnerEvent(
2492
2495
  {
@@ -2497,8 +2500,8 @@ async function run(
2497
2500
  path: datasetPath,
2498
2501
  tableNamespace,
2499
2502
  phase: 'registered',
2500
- persistedRows: mapStartResult.completedRows.length,
2501
- succeededRows: mapStartResult.completedRows.length,
2503
+ persistedRows: 0,
2504
+ succeededRows: 0,
2502
2505
  failedRows: 0,
2503
2506
  complete: false,
2504
2507
  // ADR 0019 dataset-grain row birth. These rows entered from