dsh-team-limits 1.3.4 → 1.3.5
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/CHANGELOG.md +5 -0
- package/index.js +3 -28
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.3.5
|
|
4
|
+
|
|
5
|
+
- Removed the leftover debugging path and the trace calls that appended to it on every load. The
|
|
6
|
+
package now carries no absolute paths and writes nothing outside the profile.
|
|
7
|
+
|
|
3
8
|
## 1.3.4
|
|
4
9
|
|
|
5
10
|
- The panel description no longer explains where the values are stored. It names the four limits
|
package/index.js
CHANGED
|
@@ -28,17 +28,6 @@ const DEFAULTS = {
|
|
|
28
28
|
|
|
29
29
|
const RETRY_DELAYS = [1300, 4000, 8000]
|
|
30
30
|
|
|
31
|
-
const DEBUG = 'C:/Users/Administrator/.dsh/team-limits-debug.log'
|
|
32
|
-
|
|
33
|
-
async function trace(message) {
|
|
34
|
-
try {
|
|
35
|
-
const { appendFileSync } = await import('node:fs')
|
|
36
|
-
appendFileSync(DEBUG, new Date().toISOString() + ' ' + message + '\n')
|
|
37
|
-
} catch {
|
|
38
|
-
/* diagnostics must never break the plugin */
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
31
|
let Schema
|
|
43
32
|
try {
|
|
44
33
|
const loaded = await import('@deepseek-ai/schemastery')
|
|
@@ -121,25 +110,20 @@ function escapeTransaction(ctx, work) {
|
|
|
121
110
|
}
|
|
122
111
|
|
|
123
112
|
/** @returns {Promise<boolean>} true when another attempt is worth making. */
|
|
124
|
-
async function push(ctx, desired
|
|
113
|
+
async function push(ctx, desired) {
|
|
125
114
|
return escapeTransaction(ctx, async () => {
|
|
126
115
|
try {
|
|
127
116
|
const rows = ctx.configEditor.configuration()
|
|
128
117
|
const row = rows.find((item) => entryId(item?.entry) === 'agent-team')
|
|
129
118
|
if (row === undefined) {
|
|
130
|
-
await trace('attempt ' + attempt + ': agent-team row not found')
|
|
131
119
|
return true
|
|
132
120
|
}
|
|
133
121
|
if (alreadyApplied(row.override, desired)) {
|
|
134
|
-
await trace('attempt ' + attempt + ': already applied')
|
|
135
122
|
return false
|
|
136
123
|
}
|
|
137
124
|
await ctx.configEditor.edit(row.entry, () => ({ ...desired }))
|
|
138
|
-
await trace('attempt ' + attempt + ': applied ' + JSON.stringify(desired))
|
|
139
125
|
return false
|
|
140
|
-
} catch
|
|
141
|
-
const message = String((error && error.message) || error)
|
|
142
|
-
await trace('attempt ' + attempt + ': error=' + message)
|
|
126
|
+
} catch {
|
|
143
127
|
return true
|
|
144
128
|
}
|
|
145
129
|
})
|
|
@@ -148,7 +132,7 @@ async function push(ctx, desired, attempt) {
|
|
|
148
132
|
function schedule(ctx, desired, attempt) {
|
|
149
133
|
const delay = RETRY_DELAYS[Math.min(attempt, RETRY_DELAYS.length - 1)]
|
|
150
134
|
setTimeout(() => {
|
|
151
|
-
void push(ctx, desired
|
|
135
|
+
void push(ctx, desired).then((retry) => {
|
|
152
136
|
if (retry && attempt + 1 < RETRY_DELAYS.length) schedule(ctx, desired, attempt + 1)
|
|
153
137
|
})
|
|
154
138
|
}, delay)
|
|
@@ -175,15 +159,6 @@ export function apply(ctx, config) {
|
|
|
175
159
|
ctx.inject(['settings'], (child) => {
|
|
176
160
|
child.settings.configure({ auto: false }, ctx.fiber)
|
|
177
161
|
})
|
|
178
|
-
setTimeout(() => {
|
|
179
|
-
try {
|
|
180
|
-
const settings = ctx.get('settings')
|
|
181
|
-
const rows = settings === undefined ? [] : settings.describe()
|
|
182
|
-
void trace('namespaces=' + rows.map((row) => row.ns).join(','))
|
|
183
|
-
} catch (error) {
|
|
184
|
-
void trace('describe error=' + String((error && error.message) || error))
|
|
185
|
-
}
|
|
186
|
-
}, 3000)
|
|
187
162
|
schedule(ctx, currentValues(config), 0)
|
|
188
163
|
/*
|
|
189
164
|
* Volatile fields are edited in place without remounting this plugin, so the
|
package/package.json
CHANGED