gestalt-mobile 0.44.0 → 0.44.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 +22 -6
- package/dist/client/assets/{index-7g7-CxvF.js → index-6WgZCe9g.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server/composition.contracts.js +80 -3
- package/dist/server/server/composition.js +30 -6
- package/dist/server/server/features/agent-activity/registry.js +12 -2
- package/dist/server/server/features/autopilot/application/service.js +184 -61
- package/dist/server/server/features/autopilot/domain/executor-commands.js +28 -0
- package/dist/server/server/features/autopilot/domain/persisted-state-error.js +14 -0
- package/dist/server/server/features/autopilot/domain/plan-fingerprint.js +24 -0
- package/dist/server/server/features/autopilot/domain/supervised-lifecycle.js +33 -7
- package/dist/server/server/features/org-plan-checkpoint/application/validate.js +45 -16
- package/dist/server/server/platform/codex/session-runtime.js +39 -8
- package/dist/server/server/platform/persistence/migrate.js +1 -0
- package/dist/server/server/platform/persistence/sqlite-autopilot-store.js +73 -14
- package/dist/server/shared/contracts/org-plan-health.js +21 -0
- package/package.json +1 -1
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
* Designed by Denis Roio <jaromil@dyne.org>
|
|
4
4
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
5
5
|
*/
|
|
6
|
+
import { checkpointTarget } from '../../autopilot/domain/supervised-lifecycle.js';
|
|
6
7
|
/** Terminal roster entries remain visible and are not active implementation writers. */
|
|
7
8
|
export function hasActiveL1Writer(snapshot, position) {
|
|
8
9
|
return snapshot.subagents.some((child) => child.canonicalPosition === position &&
|
|
9
10
|
['working', 'awaitingAgent', 'awaitingHuman'].includes(child.state));
|
|
10
11
|
}
|
|
11
12
|
/** Expands a host-owned compact boundary signal from authoritative plan state. */
|
|
12
|
-
export function resolveOrgPlanCheckpointSignal(kind, plan, planIdentity, publicationReason = null) {
|
|
13
|
+
export function resolveOrgPlanCheckpointSignal(kind, plan, planIdentity, publicationReason = null, completedTargets = [], pendingTarget) {
|
|
13
14
|
if (kind === 'terminalReviewAccepted')
|
|
14
15
|
return {
|
|
15
16
|
version: 1,
|
|
@@ -17,16 +18,34 @@ export function resolveOrgPlanCheckpointSignal(kind, plan, planIdentity, publica
|
|
|
17
18
|
planIdentity,
|
|
18
19
|
verdict: 'ACCEPT',
|
|
19
20
|
};
|
|
20
|
-
const
|
|
21
|
+
const pending = pendingTarget ? JSON.parse(pendingTarget) : undefined;
|
|
22
|
+
const reviewedId = (pending?.[0] === 'l1' ? pending[1] : undefined) ??
|
|
23
|
+
publicationReason?.match(/^review:([^:]{1,128}):REVIEWED$/)?.[1];
|
|
24
|
+
const completedId = (pending?.[0] === 'l2' ? pending[2] : undefined) ??
|
|
25
|
+
publicationReason?.match(/^l2:([^:]{1,128}):DONE$/)?.[1];
|
|
26
|
+
// Publication identifies the actual transition, regardless of list order.
|
|
27
|
+
// Without it, expand only an unambiguous boundary; never guess the last row.
|
|
28
|
+
const allReviewed = plan.steps.filter((step) => step.state === 'DONE' && step.reviewStatus === 'REVIEWED');
|
|
29
|
+
const unreportedReviewed = allReviewed.filter((step) => !completedTargets.includes(checkpointTarget('l1', step.id)));
|
|
30
|
+
const reviewed = reviewedId || !unreportedReviewed.length ? allReviewed : unreportedReviewed;
|
|
31
|
+
const allCompleted = plan.steps.flatMap((parent) => parent.reviewStatus === 'UNREVIEWED'
|
|
32
|
+
? parent.children
|
|
33
|
+
.filter((child) => child.state === 'DONE' &&
|
|
34
|
+
(!completedId || child.id === completedId) &&
|
|
35
|
+
(pending?.[0] !== 'l2' || parent.id === pending[1]))
|
|
36
|
+
.map((child) => ({ parent, child }))
|
|
37
|
+
: []);
|
|
38
|
+
const unreportedCompleted = allCompleted.filter(({ parent, child }) => !completedTargets.includes(checkpointTarget('l2', parent.id, child.id)));
|
|
39
|
+
const completed = completedId || !unreportedCompleted.length ? allCompleted : unreportedCompleted;
|
|
21
40
|
const selected = kind === 'l1Accepted'
|
|
22
|
-
?
|
|
23
|
-
?
|
|
24
|
-
:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
41
|
+
? reviewedId
|
|
42
|
+
? reviewed.find((step) => step.id === reviewedId)
|
|
43
|
+
: reviewed.length === 1
|
|
44
|
+
? reviewed[0]
|
|
45
|
+
: undefined
|
|
46
|
+
: completed.length === 1
|
|
47
|
+
? completed[0]?.parent
|
|
48
|
+
: undefined;
|
|
30
49
|
if (!selected)
|
|
31
50
|
return null;
|
|
32
51
|
const l1Position = `L${plan.steps.indexOf(selected) + 1}`;
|
|
@@ -40,7 +59,7 @@ export function resolveOrgPlanCheckpointSignal(kind, plan, planIdentity, publica
|
|
|
40
59
|
verdict: 'ACCEPT',
|
|
41
60
|
commit: { kind: 'notRequired' },
|
|
42
61
|
};
|
|
43
|
-
const child = [
|
|
62
|
+
const child = completed[0]?.child;
|
|
44
63
|
if (!child)
|
|
45
64
|
return null;
|
|
46
65
|
return {
|
|
@@ -65,10 +84,17 @@ export function validateOrgPlanCheckpoint(input) {
|
|
|
65
84
|
return { valid: false, reasonCode: 'rootNotOwner' };
|
|
66
85
|
if (checkpoint.planIdentity !== planIdentity)
|
|
67
86
|
return { valid: false, reasonCode: 'planIdentityMismatch' };
|
|
68
|
-
if (checkpoint.kind === 'terminalReviewAccepted')
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
87
|
+
if (checkpoint.kind === 'terminalReviewAccepted') {
|
|
88
|
+
if (!plan.steps.length ||
|
|
89
|
+
!plan.steps.every((step) => step.state === 'DONE' && step.reviewStatus === 'REVIEWED'))
|
|
90
|
+
return { valid: false, reasonCode: 'terminalReviewIncomplete' };
|
|
91
|
+
for (const [index, step] of plan.steps.entries()) {
|
|
92
|
+
const result = validateCompletedChildren(step, input.hasActiveL1Writer(`L${index + 1}`));
|
|
93
|
+
if (!result.valid)
|
|
94
|
+
return result;
|
|
95
|
+
}
|
|
96
|
+
return { valid: true };
|
|
97
|
+
}
|
|
72
98
|
const l1 = plan.steps.find((step) => step.id === checkpoint.l1Id);
|
|
73
99
|
if (!l1)
|
|
74
100
|
return { valid: false, reasonCode: 'l1NotFound' };
|
|
@@ -117,6 +143,9 @@ export function validateOrgPlanCheckpoint(input) {
|
|
|
117
143
|
expected: { reviewStatus: 'REVIEWED' },
|
|
118
144
|
observed: { reviewStatus: l1.reviewStatus ?? null },
|
|
119
145
|
};
|
|
146
|
+
return validateCompletedChildren(l1, input.hasActiveL1Writer(position));
|
|
147
|
+
}
|
|
148
|
+
function validateCompletedChildren(l1, activeWriter) {
|
|
120
149
|
const incompleteChild = l1.children.find((child) => child.state !== 'DONE');
|
|
121
150
|
if (incompleteChild)
|
|
122
151
|
return {
|
|
@@ -125,7 +154,7 @@ export function validateOrgPlanCheckpoint(input) {
|
|
|
125
154
|
expected: { childrenDone: true },
|
|
126
155
|
observed: { childrenDone: false, childState: incompleteChild.state },
|
|
127
156
|
};
|
|
128
|
-
if (
|
|
157
|
+
if (activeWriter)
|
|
129
158
|
return {
|
|
130
159
|
valid: false,
|
|
131
160
|
reasonCode: 'executorStillActive',
|
|
@@ -10,6 +10,7 @@ import { canRebindMissingRollout, rebindMissingRollout, } from '../../features/s
|
|
|
10
10
|
import { gestaltQuizDynamicTool } from '../../../shared/contracts/quiz.js';
|
|
11
11
|
import { gestaltOrgPlanAttentionDynamicTool } from '../../../shared/contracts/org-plan-attention.js';
|
|
12
12
|
import { gestaltOrgPlanCheckpointDynamicTool } from '../../../shared/contracts/org-plan-checkpoint.js';
|
|
13
|
+
import { gestaltOrgPlanHealthDynamicTool } from '../../../shared/contracts/org-plan-health.js';
|
|
13
14
|
import { gestaltAutopilotWaitLeaseDynamicTool } from '../../../shared/contracts/autopilot-wait-lease.js';
|
|
14
15
|
import { gestaltAgentCapacityRecoveryDynamicTool } from '../../../shared/contracts/agent-capacity-recovery.js';
|
|
15
16
|
import { countDiffLines } from '../../../shared/contracts/file-change.js';
|
|
@@ -19,14 +20,13 @@ import { isCodexThreadWriterBusy, isMissingCodexThreadRollout } from './json-rpc
|
|
|
19
20
|
import { resolvedServerRequestId } from './server-request.js';
|
|
20
21
|
/** Sticky thread config keeps skill paths out of the app-server process argv. */
|
|
21
22
|
export function threadSkillConfig(skillsConfig, modelConfig = {}) {
|
|
22
|
-
return
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
23
|
+
return {
|
|
24
|
+
config: {
|
|
25
|
+
...modelConfig,
|
|
26
|
+
'tools.update_plan.enabled': true,
|
|
27
|
+
...(skillsConfig === undefined ? {} : { skills: { config: skillsConfig } }),
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
30
|
}
|
|
31
31
|
/** One private owner for every resource acquired for a live Codex child. */
|
|
32
32
|
class SessionResource {
|
|
@@ -341,6 +341,35 @@ export class CodexSessionRuntime {
|
|
|
341
341
|
const token = this.sessions.get(sessionId)?.planMeasurementToken;
|
|
342
342
|
return Boolean(token && authorization === `Bearer ${token}`);
|
|
343
343
|
}
|
|
344
|
+
/** Activity needs status, not turn history (untouched threads may not support list_turns). */
|
|
345
|
+
async readActivity(session) {
|
|
346
|
+
if (!session.threadId)
|
|
347
|
+
throw new Error('CODEX_THREAD_ID_MISSING');
|
|
348
|
+
const owned = this.sessions.get(session.id);
|
|
349
|
+
const process = owned?.process ??
|
|
350
|
+
this.launch({ profile: session.profile, cwd: this.readerCwd ?? session.workspacePath });
|
|
351
|
+
try {
|
|
352
|
+
if (!owned)
|
|
353
|
+
await process.rpc.request('initialize', {
|
|
354
|
+
clientInfo: { name: 'gestalt-mobile', version: '0.1.0' },
|
|
355
|
+
capabilities: { experimentalApi: true },
|
|
356
|
+
});
|
|
357
|
+
const response = (await process.rpc.request('thread/read', {
|
|
358
|
+
threadId: session.threadId,
|
|
359
|
+
includeTurns: false,
|
|
360
|
+
}));
|
|
361
|
+
if (response?.thread?.id !== session.threadId)
|
|
362
|
+
throw new Error('CODEX_ACTIVITY_STATUS_UNAVAILABLE');
|
|
363
|
+
const status = response.thread.status?.type;
|
|
364
|
+
if (status !== 'idle' && status !== 'active')
|
|
365
|
+
throw new Error('CODEX_ACTIVITY_STATUS_UNAVAILABLE');
|
|
366
|
+
return { active: status === 'active' };
|
|
367
|
+
}
|
|
368
|
+
finally {
|
|
369
|
+
if (!owned)
|
|
370
|
+
process.close();
|
|
371
|
+
}
|
|
372
|
+
}
|
|
344
373
|
async readHistory(session) {
|
|
345
374
|
if (!session.threadId)
|
|
346
375
|
throw new Error('CODEX_THREAD_ID_MISSING');
|
|
@@ -705,6 +734,7 @@ export class CodexSessionRuntime {
|
|
|
705
734
|
gestaltQuizDynamicTool,
|
|
706
735
|
gestaltOrgPlanAttentionDynamicTool,
|
|
707
736
|
gestaltOrgPlanCheckpointDynamicTool,
|
|
737
|
+
gestaltOrgPlanHealthDynamicTool,
|
|
708
738
|
gestaltAutopilotWaitLeaseDynamicTool,
|
|
709
739
|
gestaltAgentCapacityRecoveryDynamicTool,
|
|
710
740
|
],
|
|
@@ -798,6 +828,7 @@ export class CodexSessionRuntime {
|
|
|
798
828
|
gestaltQuizDynamicTool,
|
|
799
829
|
gestaltOrgPlanAttentionDynamicTool,
|
|
800
830
|
gestaltOrgPlanCheckpointDynamicTool,
|
|
831
|
+
gestaltOrgPlanHealthDynamicTool,
|
|
801
832
|
gestaltAutopilotWaitLeaseDynamicTool,
|
|
802
833
|
gestaltAgentCapacityRecoveryDynamicTool,
|
|
803
834
|
],
|
|
@@ -28,6 +28,7 @@ function migrateWorkspaceGitDefaults(database) {
|
|
|
28
28
|
}
|
|
29
29
|
export function migrate(database) {
|
|
30
30
|
database.exec(schema);
|
|
31
|
+
database.exec('CREATE TABLE IF NOT EXISTS autopilot_state_quarantine (id INTEGER PRIMARY KEY AUTOINCREMENT, session_id TEXT NOT NULL REFERENCES relay_sessions(id) ON DELETE CASCADE, record_json TEXT NOT NULL, created_at TEXT NOT NULL)');
|
|
31
32
|
database.exec("CREATE INDEX IF NOT EXISTS session_events_autopilot_audit_tail_v3 ON session_events(session_id, type, sequence DESC) WHERE type IN ('autopilot.continuation-scheduled','autopilot.control-issued','autopilot.turn-started','autopilot.turn-failed','autopilot.progress-reset','autopilot.final-rejected','autopilot.executor-resumed','autopilot.process-monitoring','autopilot.process-result-consumed','autopilot.process-terminated','autopilot.updated','org-plan.attention-required','org-plan.attention-resolved')");
|
|
32
33
|
const columns = database.prepare('PRAGMA table_info(relay_sessions)').all();
|
|
33
34
|
if (!columns.some((column) => column.name === 'effective_skill_selection_json'))
|
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
* Designed by Denis Roio <jaromil@dyne.org>
|
|
4
4
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
5
5
|
*/
|
|
6
|
+
import { disabledAutopilot, } from '../../features/autopilot/domain/autopilot-session.js';
|
|
7
|
+
import { AutopilotStateError } from '../../features/autopilot/domain/persisted-state-error.js';
|
|
6
8
|
import { parsePersistedSupervisedLifecycle } from '../../features/autopilot/domain/supervised-lifecycle.js';
|
|
9
|
+
import { MAX_AUTOPILOT_RECORD_BYTES, parsePlanFingerprint, } from '../../features/autopilot/domain/plan-fingerprint.js';
|
|
7
10
|
export class SqliteAutopilotStore {
|
|
8
11
|
db;
|
|
9
12
|
constructor(db) {
|
|
@@ -15,15 +18,20 @@ export class SqliteAutopilotStore {
|
|
|
15
18
|
.get(sessionId);
|
|
16
19
|
if (!row)
|
|
17
20
|
return null;
|
|
21
|
+
return this.decodeRow(row);
|
|
22
|
+
}
|
|
23
|
+
decodeRow(row) {
|
|
18
24
|
const lifecycle = parseLifecycle(row.lifecycle_json);
|
|
19
|
-
if (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
if (Buffer.byteLength(JSON.stringify(row), 'utf8') > MAX_AUTOPILOT_RECORD_BYTES ||
|
|
26
|
+
(row.plan_fingerprint !== null && parsePlanFingerprint(row.plan_fingerprint) === undefined) ||
|
|
27
|
+
![
|
|
28
|
+
'disabled',
|
|
29
|
+
'monitoring',
|
|
30
|
+
'backoff',
|
|
31
|
+
'attentionRequired',
|
|
32
|
+
'completed',
|
|
33
|
+
'safetyPaused',
|
|
34
|
+
].includes(String(row.state)) ||
|
|
27
35
|
![
|
|
28
36
|
'manualDisabled',
|
|
29
37
|
'planRequired',
|
|
@@ -46,7 +54,7 @@ export class SqliteAutopilotStore {
|
|
|
46
54
|
Number(row.no_progress_count) < 0 ||
|
|
47
55
|
![0, 1].includes(Number(row.requested_enabled)) ||
|
|
48
56
|
lifecycle === null)
|
|
49
|
-
|
|
57
|
+
throw new AutopilotStateError(String(row.session_id));
|
|
50
58
|
return {
|
|
51
59
|
sessionId: String(row.session_id),
|
|
52
60
|
state: row.state,
|
|
@@ -63,16 +71,67 @@ export class SqliteAutopilotStore {
|
|
|
63
71
|
};
|
|
64
72
|
}
|
|
65
73
|
save(state) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
74
|
+
const lifecycleJson = [
|
|
75
|
+
state.executor,
|
|
76
|
+
state.blocking,
|
|
77
|
+
state.supervision,
|
|
78
|
+
state.checkpoints,
|
|
79
|
+
].some((value) => value !== undefined)
|
|
69
80
|
? JSON.stringify({
|
|
70
81
|
executor: state.executor,
|
|
71
82
|
blocking: state.blocking,
|
|
72
83
|
supervision: state.supervision,
|
|
73
84
|
checkpoints: state.checkpoints,
|
|
74
85
|
})
|
|
75
|
-
: null
|
|
86
|
+
: null;
|
|
87
|
+
// Use the reader's exact contract before any write (including transaction/outbox writes).
|
|
88
|
+
this.decodeRow({
|
|
89
|
+
session_id: state.sessionId,
|
|
90
|
+
state: state.state,
|
|
91
|
+
requested_enabled: state.requestedEnabled ? 1 : 0,
|
|
92
|
+
plan_identity: state.planIdentity,
|
|
93
|
+
plan_fingerprint: state.planFingerprint,
|
|
94
|
+
generation: state.generation,
|
|
95
|
+
no_progress_count: state.consecutiveNoProgress,
|
|
96
|
+
next_evaluation_at: state.nextEvaluationAt,
|
|
97
|
+
last_control_id: state.lastControlId,
|
|
98
|
+
stop_reason: state.stopReason,
|
|
99
|
+
lifecycle_json: lifecycleJson,
|
|
100
|
+
updated_at: state.updatedAt,
|
|
101
|
+
});
|
|
102
|
+
this.db
|
|
103
|
+
.prepare('INSERT INTO autopilot_sessions (session_id,state,requested_enabled,plan_identity,plan_fingerprint,generation,no_progress_count,next_evaluation_at,last_control_id,stop_reason,lifecycle_json,updated_at) VALUES (?,?,?,?,?,?,?,?,?,?,?,?) ON CONFLICT(session_id) DO UPDATE SET state=excluded.state,requested_enabled=excluded.requested_enabled,plan_identity=excluded.plan_identity,plan_fingerprint=excluded.plan_fingerprint,generation=excluded.generation,no_progress_count=excluded.no_progress_count,next_evaluation_at=excluded.next_evaluation_at,last_control_id=excluded.last_control_id,stop_reason=excluded.stop_reason,lifecycle_json=excluded.lifecycle_json,updated_at=excluded.updated_at')
|
|
104
|
+
.run(state.sessionId, state.state, state.requestedEnabled ? 1 : 0, state.planIdentity, state.planFingerprint, state.generation, state.consecutiveNoProgress, state.nextEvaluationAt, state.lastControlId, state.stopReason, lifecycleJson, state.updatedAt);
|
|
105
|
+
}
|
|
106
|
+
/** Explicit manual Off recovery only. Preserve the original row for local diagnosis. */
|
|
107
|
+
recoverInvalid(sessionId, now) {
|
|
108
|
+
this.db.exec('BEGIN IMMEDIATE');
|
|
109
|
+
try {
|
|
110
|
+
const row = this.db
|
|
111
|
+
.prepare('SELECT * FROM autopilot_sessions WHERE session_id = ?')
|
|
112
|
+
.get(sessionId);
|
|
113
|
+
if (row) {
|
|
114
|
+
try {
|
|
115
|
+
this.decodeRow(row);
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
if (!(error instanceof AutopilotStateError))
|
|
119
|
+
throw error;
|
|
120
|
+
this.db
|
|
121
|
+
.prepare('INSERT INTO autopilot_state_quarantine (session_id,record_json,created_at) VALUES (?,?,?)')
|
|
122
|
+
.run(sessionId, JSON.stringify(row), now);
|
|
123
|
+
this.save(disabledAutopilot(sessionId, now));
|
|
124
|
+
this.db
|
|
125
|
+
.prepare("UPDATE autopilot_controls SET status = 'cancelled', updated_at = ? WHERE session_id = ? AND status = 'scheduled'")
|
|
126
|
+
.run(now, sessionId);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
this.db.exec('COMMIT');
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
this.db.exec('ROLLBACK');
|
|
133
|
+
throw error;
|
|
134
|
+
}
|
|
76
135
|
}
|
|
77
136
|
findControl(sessionId, controlId) {
|
|
78
137
|
const row = this.db
|
|
@@ -180,7 +239,7 @@ export class SqliteAutopilotStore {
|
|
|
180
239
|
function parseLifecycle(value) {
|
|
181
240
|
if (value === null || value === undefined)
|
|
182
241
|
return {};
|
|
183
|
-
if (typeof value !== 'string' || value
|
|
242
|
+
if (typeof value !== 'string' || Buffer.byteLength(value, 'utf8') > MAX_AUTOPILOT_RECORD_BYTES)
|
|
184
243
|
return null;
|
|
185
244
|
try {
|
|
186
245
|
return parsePersistedSupervisedLifecycle(JSON.parse(value)) ?? null;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2026 Dyne.org foundation
|
|
3
|
+
* Designed by Denis Roio <jaromil@dyne.org>
|
|
4
|
+
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
5
|
+
*/
|
|
6
|
+
export const gestaltOrgPlanHealthDynamicTool = {
|
|
7
|
+
type: 'function',
|
|
8
|
+
name: 'gestalt_org_plan_health',
|
|
9
|
+
description: 'Read the current session’s authoritative Org execution health, using the same controller state as Mobile. Read-only; does not enable, resume, checkpoint, or change the Org Plan.',
|
|
10
|
+
inputSchema: { type: 'object', additionalProperties: false, properties: {} },
|
|
11
|
+
};
|
|
12
|
+
export function isOrgPlanHealthCall(input) {
|
|
13
|
+
if (input.method !== 'item/tool/call' || !input.params || typeof input.params !== 'object')
|
|
14
|
+
return false;
|
|
15
|
+
const params = input.params;
|
|
16
|
+
return (params.tool === gestaltOrgPlanHealthDynamicTool.name &&
|
|
17
|
+
params.arguments !== null &&
|
|
18
|
+
typeof params.arguments === 'object' &&
|
|
19
|
+
!Array.isArray(params.arguments) &&
|
|
20
|
+
Object.keys(params.arguments).length === 0);
|
|
21
|
+
}
|