@ran-sh/dsh-crew 1.0.0 → 1.0.2
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 +24 -20
- package/README.zh.md +21 -18
- package/lib/client.js +156 -13
- package/official-web-bridge/lib/client.js +156 -13
- package/package.json +166 -166
- package/src/client/index.tsx +765 -716
- package/src/hub/index.mjs +420 -66
- package/src/install/install-legacy.mjs +184 -185
- package/src/policy-legacy.mjs +2 -2
- package/src/provider-delete-adapters.mjs +1786 -451
- package/src/provider-inventory.mjs +170 -132
- package/src/provider-lifecycle-state.mjs +100 -95
- package/src/provider-lifecycle.mjs +252 -214
- package/src/provider-profile-store.mjs +189 -171
- package/src/provider-settings-store.mjs +215 -0
- package/src/runtime-identity.mjs +72 -72
|
@@ -1,214 +1,252 @@
|
|
|
1
|
-
// Provider deletion planning and transaction state machine.
|
|
2
|
-
//
|
|
3
|
-
// This module is intentionally side-effect free until executeProviderDelete is
|
|
4
|
-
// given explicit adapters. The live profile, credentials and restart hooks are
|
|
5
|
-
// owned by the caller; plans never carry secret values.
|
|
6
|
-
|
|
7
|
-
import { randomUUID } from 'node:crypto';
|
|
8
|
-
|
|
9
|
-
export const PROVIDER_DELETE_STATES = Object.freeze([
|
|
10
|
-
'PLANNED', 'BLOCKED', 'APPLIED', 'RESTART_PENDING', 'VERIFYING',
|
|
11
|
-
'VERIFIED', 'ROLLBACK_PENDING', 'ROLLED_BACK', 'FAILED',
|
|
12
|
-
]);
|
|
13
|
-
|
|
14
|
-
const TRANSITIONS = Object.freeze({
|
|
15
|
-
PLANNED: Object.freeze(['BLOCKED', 'APPLIED', 'FAILED']),
|
|
16
|
-
BLOCKED: Object.freeze(['PLANNED', 'FAILED']),
|
|
17
|
-
APPLIED: Object.freeze(['RESTART_PENDING', 'FAILED']),
|
|
18
|
-
RESTART_PENDING: Object.freeze(['VERIFYING', 'FAILED']),
|
|
19
|
-
VERIFYING: Object.freeze(['VERIFIED', 'FAILED']),
|
|
20
|
-
VERIFIED: Object.freeze(['ROLLBACK_PENDING']),
|
|
21
|
-
ROLLBACK_PENDING: Object.freeze(['ROLLED_BACK', 'FAILED']),
|
|
22
|
-
ROLLED_BACK: Object.freeze([]),
|
|
23
|
-
FAILED: Object.freeze([]),
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
return
|
|
54
|
-
kind
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
1
|
+
// Provider deletion planning and transaction state machine.
|
|
2
|
+
//
|
|
3
|
+
// This module is intentionally side-effect free until executeProviderDelete is
|
|
4
|
+
// given explicit adapters. The live profile, credentials and restart hooks are
|
|
5
|
+
// owned by the caller; plans never carry secret values.
|
|
6
|
+
|
|
7
|
+
import { randomUUID } from 'node:crypto';
|
|
8
|
+
|
|
9
|
+
export const PROVIDER_DELETE_STATES = Object.freeze([
|
|
10
|
+
'PLANNED', 'BLOCKED', 'APPLIED', 'RESTART_PENDING', 'VERIFYING',
|
|
11
|
+
'VERIFIED', 'ROLLBACK_PENDING', 'ROLLED_BACK', 'FAILED',
|
|
12
|
+
]);
|
|
13
|
+
|
|
14
|
+
const TRANSITIONS = Object.freeze({
|
|
15
|
+
PLANNED: Object.freeze(['BLOCKED', 'APPLIED', 'FAILED']),
|
|
16
|
+
BLOCKED: Object.freeze(['PLANNED', 'FAILED']),
|
|
17
|
+
APPLIED: Object.freeze(['RESTART_PENDING', 'FAILED']),
|
|
18
|
+
RESTART_PENDING: Object.freeze(['VERIFYING', 'FAILED']),
|
|
19
|
+
VERIFYING: Object.freeze(['VERIFIED', 'FAILED']),
|
|
20
|
+
VERIFIED: Object.freeze(['ROLLBACK_PENDING']),
|
|
21
|
+
ROLLBACK_PENDING: Object.freeze(['ROLLED_BACK', 'FAILED']),
|
|
22
|
+
ROLLED_BACK: Object.freeze([]),
|
|
23
|
+
FAILED: Object.freeze([]),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const CODE_PATTERN = /^[A-Z][A-Z0-9_]{1,63}$/;
|
|
27
|
+
const AUTHORITY_LOCATORS = Object.freeze({
|
|
28
|
+
'crew-profile': (id) => `llm-pi-ai.config.providers.${id}`,
|
|
29
|
+
'harness-settings': (id) => `llm-pi-ai.providers.${id}`,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
function text(value) {
|
|
33
|
+
return typeof value === 'string' && value.trim() ? value.trim() : null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function boundedCode(value, fallback = 'PROVIDER_DELETE_FAILED') {
|
|
37
|
+
const candidate = text(value);
|
|
38
|
+
return candidate && CODE_PATTERN.test(candidate) ? candidate : fallback;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function fail(code) {
|
|
42
|
+
return { ok: false, code };
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function recordById(inventory, providerId) {
|
|
46
|
+
const records = Array.isArray(inventory?.records) ? inventory.records : [];
|
|
47
|
+
return records.find((record) => record?.id === providerId) ?? null;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function hasCanonicalAuthorities(record, providerId) {
|
|
51
|
+
const authorities = Array.isArray(record?.declaration_authorities) ? record.declaration_authorities : [];
|
|
52
|
+
if (authorities.length === 0) return false;
|
|
53
|
+
return authorities.every((authority) => typeof AUTHORITY_LOCATORS[authority?.kind] === 'function'
|
|
54
|
+
&& authority.locator === AUTHORITY_LOCATORS[authority.kind](providerId));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function activeJobCount(record, activeJobs) {
|
|
58
|
+
if (Array.isArray(activeJobs)) return activeJobs.filter((job) => {
|
|
59
|
+
if (job?.provider !== record.id) return false;
|
|
60
|
+
// WorkerRegistry retains terminal jobs for readiness/audit history. Only
|
|
61
|
+
// non-terminal jobs fence destructive provider lifecycle operations;
|
|
62
|
+
// missing/unknown status remains conservative and is treated as active.
|
|
63
|
+
return !['done', 'failed', 'cancelled'].includes(job?.status);
|
|
64
|
+
}).length;
|
|
65
|
+
return Number.isInteger(record?.references?.active_jobs) ? Math.max(0, record.references.active_jobs) : 0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function sanitizedCredentialRefs(record) {
|
|
69
|
+
return (Array.isArray(record?.credential_refs) ? record.credential_refs : []).map((ref) => ({
|
|
70
|
+
kind: text(ref?.kind) ?? 'unknown',
|
|
71
|
+
name_or_handle: text(ref?.name_or_handle) ?? 'unknown',
|
|
72
|
+
ownership: text(ref?.ownership) ?? 'unknown',
|
|
73
|
+
}));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function pushState(events, state) {
|
|
77
|
+
events.push({ state, at: new Date().toISOString() });
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** Return whether a provider deletion state transition is legal. */
|
|
81
|
+
export function canTransitionProviderDelete(from, to) {
|
|
82
|
+
return PROVIDER_DELETE_STATES.includes(from) && TRANSITIONS[from]?.includes(to) === true;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Validate a provider deletion request and return a secret-free impact plan.
|
|
87
|
+
* The caller must provide a replacement when deleting the active Harness
|
|
88
|
+
* Default; running jobs and unknown declaration sources always fail closed.
|
|
89
|
+
*/
|
|
90
|
+
export function planProviderDelete({ providerId, inventory, activeJobs = [], replacementDefault = null, expectedRevision, expectedRevisions = null } = {}) {
|
|
91
|
+
const id = text(providerId);
|
|
92
|
+
if (!id) return fail('PROVIDER_NOT_FOUND');
|
|
93
|
+
if (id === 'deepseek-official') return fail('PROVIDER_BUILTIN_IMMUTABLE');
|
|
94
|
+
const record = recordById(inventory, id);
|
|
95
|
+
if (!record) return fail('PROVIDER_NOT_FOUND');
|
|
96
|
+
if (record.delete_capability === 'immutable-builtin') return fail('PROVIDER_BUILTIN_IMMUTABLE');
|
|
97
|
+
if (inventory?.catalog_evidence && inventory.catalog_evidence.ok !== true) return fail('PROVIDER_CATALOG_UNAVAILABLE');
|
|
98
|
+
if (inventory?.default_evidence && inventory.default_evidence.ok !== true) return fail(inventory.default_evidence.code ?? 'PROVIDER_DEFAULT_AUTHORITY_UNAVAILABLE');
|
|
99
|
+
if (record.delete_capability !== 'supported') return fail(text(record.delete_blocker) ?? 'PROVIDER_DELETE_SOURCE_UNRESOLVED');
|
|
100
|
+
if (!hasCanonicalAuthorities(record, id)) return fail('PROVIDER_DELETE_SOURCE_UNRESOLVED');
|
|
101
|
+
if (record.desired_state === 'absent') return fail('PROVIDER_ALREADY_ABSENT');
|
|
102
|
+
if (activeJobCount(record, activeJobs) > 0) return fail('PROVIDER_IN_USE');
|
|
103
|
+
|
|
104
|
+
const replacement = text(replacementDefault);
|
|
105
|
+
const replacementRecord = replacement ? recordById(inventory, replacement) : null;
|
|
106
|
+
if (record.references?.harness_default) {
|
|
107
|
+
if (!record.references.harness_default_authority || record.references.harness_default_authority.kind !== 'harness-settings' || record.references.harness_default_authority.locator !== 'agent-default-model') {
|
|
108
|
+
return fail('PROVIDER_DEFAULT_AUTHORITY_UNAVAILABLE');
|
|
109
|
+
}
|
|
110
|
+
if (!replacement || replacement === id || !replacementRecord || replacementRecord.desired_state === 'absent' || replacementRecord.lifecycle?.catalogued !== true) {
|
|
111
|
+
return fail('PROVIDER_DEFAULT_REPLACEMENT_REQUIRED');
|
|
112
|
+
}
|
|
113
|
+
if (typeof replacementRecord.models?.[0] !== 'string' || replacementRecord.models[0].trim() === '') {
|
|
114
|
+
return fail('PROVIDER_DEFAULT_REPLACEMENT_MODEL_REQUIRED');
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return {
|
|
119
|
+
ok: true,
|
|
120
|
+
plan: {
|
|
121
|
+
plan_id: randomUUID(),
|
|
122
|
+
provider_id: id,
|
|
123
|
+
provider: { id, display_name: text(record.display_name) ?? id },
|
|
124
|
+
declaration: record.declaration ?? { present: true },
|
|
125
|
+
declaration_authorities: record.declaration_authorities,
|
|
126
|
+
delete_capability: record.delete_capability,
|
|
127
|
+
expected_revision: text(expectedRevision) ?? text(record.declaration?.revision),
|
|
128
|
+
...(expectedRevisions && typeof expectedRevisions === 'object' ? { expected_revisions: { ...expectedRevisions } } : {}),
|
|
129
|
+
replacement_default: replacement,
|
|
130
|
+
was_harness_default: record.references?.harness_default === true,
|
|
131
|
+
...(record.references?.harness_default === true ? {
|
|
132
|
+
harness_default_before: inventory?.harness_default ?? null,
|
|
133
|
+
harness_default_authority: record.references.harness_default_authority,
|
|
134
|
+
} : {}),
|
|
135
|
+
...(replacement
|
|
136
|
+
? { replacement_default_model: text(replacementRecord?.models?.[0]) }
|
|
137
|
+
: {}),
|
|
138
|
+
will_remove: [
|
|
139
|
+
...(record.declaration_authorities.some((authority) => authority?.kind === 'crew-profile') ? ['profile declaration'] : []),
|
|
140
|
+
...(record.declaration_authorities.some((authority) => authority?.kind === 'harness-settings') ? ['Harness settings declaration'] : []),
|
|
141
|
+
'runtime desired registration',
|
|
142
|
+
'worker priority references', 'reviewer priority references',
|
|
143
|
+
'Harness Default reference', 'cache/health state',
|
|
144
|
+
],
|
|
145
|
+
credential_refs: sanitizedCredentialRefs(record),
|
|
146
|
+
restart_required: true,
|
|
147
|
+
rollback: { config_snapshot_available: true, credentials_included: false },
|
|
148
|
+
},
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function hookError(name) {
|
|
153
|
+
return Object.assign(new Error(`provider delete hook missing: ${name}`), { code: 'PROVIDER_LIFECYCLE_HOOK_MISSING' });
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Execute a deletion plan through injected adapters. All mutating adapters are
|
|
158
|
+
* explicit so the Hub/API layer can provide atomic profile/config stores and a
|
|
159
|
+
* supervisor that only restarts the owned 3210 child.
|
|
160
|
+
*/
|
|
161
|
+
export async function executeProviderDelete(plan, hooks = {}, { deferRestart = false } = {}) {
|
|
162
|
+
let state = 'PLANNED';
|
|
163
|
+
const events = [];
|
|
164
|
+
pushState(events, state);
|
|
165
|
+
let errorCode = null;
|
|
166
|
+
let verification = null;
|
|
167
|
+
let mutationsStarted = false;
|
|
168
|
+
let rollbackAttempted = false;
|
|
169
|
+
let rollbackErrorCode = null;
|
|
170
|
+
let rollbackRuntimeRestarted = null;
|
|
171
|
+
let rollbackRuntimeVerified = null;
|
|
172
|
+
const transition = (next) => {
|
|
173
|
+
if (!canTransitionProviderDelete(state, next)) throw Object.assign(new Error(`illegal provider delete transition ${state} -> ${next}`), { code: 'PROVIDER_DELETE_STATE_INVALID' });
|
|
174
|
+
state = next;
|
|
175
|
+
pushState(events, state);
|
|
176
|
+
};
|
|
177
|
+
try {
|
|
178
|
+
if (!plan?.plan_id || !plan?.provider_id) throw Object.assign(new Error('provider delete plan is invalid'), { code: 'PROVIDER_DELETE_PLAN_INVALID' });
|
|
179
|
+
for (const name of ['backup', 'markTombstone', 'scrubReferences', 'removeDeclarations', 'restart', 'rollback']) {
|
|
180
|
+
if (typeof hooks[name] !== 'function') throw hookError(name);
|
|
181
|
+
}
|
|
182
|
+
await hooks.backup(plan);
|
|
183
|
+
// From this point onward at least one destructive adapter may have
|
|
184
|
+
// committed; any later failure must attempt compensation before returning.
|
|
185
|
+
mutationsStarted = true;
|
|
186
|
+
await hooks.markTombstone(plan.provider_id, 'absent', plan);
|
|
187
|
+
await hooks.scrubReferences(plan);
|
|
188
|
+
await hooks.removeDeclarations(plan);
|
|
189
|
+
if (typeof hooks.captureRuntimeBaseline === 'function') {
|
|
190
|
+
const captured = await hooks.captureRuntimeBaseline(plan, 'delete');
|
|
191
|
+
if (captured?.ok === false) throw Object.assign(new Error('provider runtime baseline unavailable'), { code: captured.code });
|
|
192
|
+
}
|
|
193
|
+
transition('APPLIED');
|
|
194
|
+
transition('RESTART_PENDING');
|
|
195
|
+
if (!deferRestart) {
|
|
196
|
+
const restarted = await hooks.restart(plan);
|
|
197
|
+
if (restarted?.ok === false) throw Object.assign(new Error('provider delete restart failed'), { code: restarted.code });
|
|
198
|
+
if (typeof hooks.verify !== 'function') throw hookError('verify');
|
|
199
|
+
transition('VERIFYING');
|
|
200
|
+
verification = await hooks.verify(plan);
|
|
201
|
+
if (verification?.providerAbsent !== true || verification?.routingClear !== true || verification?.tombstonePresent !== true) {
|
|
202
|
+
throw Object.assign(new Error('provider delete verification incomplete'), { code: 'PROVIDER_DELETE_VERIFY_FAILED' });
|
|
203
|
+
}
|
|
204
|
+
transition('VERIFIED');
|
|
205
|
+
}
|
|
206
|
+
} catch (error) {
|
|
207
|
+
errorCode = boundedCode(error?.code);
|
|
208
|
+
if (mutationsStarted && typeof hooks.rollback === 'function') {
|
|
209
|
+
rollbackAttempted = true;
|
|
210
|
+
try {
|
|
211
|
+
await hooks.rollback(plan);
|
|
212
|
+
if (typeof hooks.restartRollback === 'function') {
|
|
213
|
+
const restarted = await hooks.restartRollback(plan);
|
|
214
|
+
rollbackRuntimeRestarted = restarted?.ok !== false;
|
|
215
|
+
if (rollbackRuntimeRestarted && typeof hooks.verifyRollback === 'function') {
|
|
216
|
+
const verified = await hooks.verifyRollback(plan);
|
|
217
|
+
rollbackRuntimeVerified = verified?.ok !== false;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
} catch (rollbackError) {
|
|
221
|
+
rollbackErrorCode = boundedCode(rollbackError?.code, 'PROVIDER_DELETE_ROLLBACK_FAILED');
|
|
222
|
+
rollbackRuntimeRestarted = false;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
if (state !== 'FAILED' && canTransitionProviderDelete(state, 'FAILED')) transition('FAILED');
|
|
226
|
+
}
|
|
227
|
+
const result = {
|
|
228
|
+
transaction_id: plan?.plan_id ?? null,
|
|
229
|
+
provider_id: plan?.provider_id ?? null,
|
|
230
|
+
state,
|
|
231
|
+
error_code: errorCode,
|
|
232
|
+
rollback_attempted: rollbackAttempted,
|
|
233
|
+
rollback_error_code: rollbackErrorCode,
|
|
234
|
+
rollback_runtime_restarted: rollbackRuntimeRestarted,
|
|
235
|
+
rollback_runtime_verified: rollbackRuntimeVerified,
|
|
236
|
+
verification,
|
|
237
|
+
events,
|
|
238
|
+
};
|
|
239
|
+
if (typeof hooks.recordTransaction === 'function') {
|
|
240
|
+
try {
|
|
241
|
+
await hooks.recordTransaction(result, plan);
|
|
242
|
+
result.audit_recorded = true;
|
|
243
|
+
} catch (error) {
|
|
244
|
+
result.audit_recorded = false;
|
|
245
|
+
result.audit_error_code = boundedCode(error?.code, 'PROVIDER_LIFECYCLE_RECORD_FAILED');
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
if (typeof hooks.release === 'function') {
|
|
249
|
+
try { await hooks.release(plan); } catch {}
|
|
250
|
+
}
|
|
251
|
+
return result;
|
|
252
|
+
}
|