gestalt-mobile 0.41.2 → 0.41.3
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/dist/client/assets/{index-9uZwieND.js → index-BRly-q56.js} +23 -23
- package/dist/client/index.html +1 -1
- package/dist/server/server/composition.contracts.js +9 -13
- package/dist/server/server/composition.js +27 -3
- package/dist/server/server/features/autopilot/application/policy.js +4 -4
- package/dist/server/server/features/autopilot/application/service.js +103 -15
- package/dist/server/server/features/autopilot/domain/supervised-lifecycle.js +9 -4
- package/dist/server/server/features/org-plan-attention/resolve/endpoint.js +5 -3
- package/dist/server/server/features/skills/list-available/endpoint.js +2 -1
- package/dist/server/server/features/skills/model/skill-profile.js +8 -4
- package/dist/server/server/platform/catalog/profile-command.js +2 -12
- package/dist/server/server/platform/codex/codex-process-launcher.js +1 -1
- package/dist/server/server/platform/codex/session-runtime.js +16 -8
- package/dist/server/shared/contracts/org-plan-attention.js +35 -6
- package/package.json +1 -1
|
@@ -41,6 +41,12 @@ export const gestaltOrgPlanAttentionDynamicTool = {
|
|
|
41
41
|
summary: { type: 'string', minLength: 1, maxLength: 600 },
|
|
42
42
|
requestedAction: { type: 'string', minLength: 1, maxLength: 600 },
|
|
43
43
|
resumeCondition: { type: 'string', enum: orgPlanAttentionResumeConditions },
|
|
44
|
+
executorReplacement: {
|
|
45
|
+
type: 'object',
|
|
46
|
+
additionalProperties: false,
|
|
47
|
+
required: ['canonicalTaskName'],
|
|
48
|
+
properties: { canonicalTaskName: { type: 'string', pattern: '^l[1-9][0-9]*$' } },
|
|
49
|
+
},
|
|
44
50
|
},
|
|
45
51
|
oneOf: orgPlanAttentionReasons.map((reason) => ({
|
|
46
52
|
properties: {
|
|
@@ -66,19 +72,31 @@ export function parseOrgPlanAttention(value) {
|
|
|
66
72
|
requestedAction: `Satisfy the ${value.resumeCondition} resume condition, then resume or disable Autopilot.`,
|
|
67
73
|
resumeCondition: value.resumeCondition,
|
|
68
74
|
};
|
|
69
|
-
if (keys.length !== 4)
|
|
75
|
+
if (keys.length !== 4 && keys.length !== 5)
|
|
76
|
+
return null;
|
|
77
|
+
if (keys.some((key) => ![
|
|
78
|
+
'reason',
|
|
79
|
+
'summary',
|
|
80
|
+
'requestedAction',
|
|
81
|
+
'resumeCondition',
|
|
82
|
+
'executorReplacement',
|
|
83
|
+
].includes(key)))
|
|
70
84
|
return null;
|
|
85
|
+
const executorReplacement = parseExecutorReplacement(value.executorReplacement);
|
|
71
86
|
if (!isReason(value.reason) ||
|
|
72
87
|
!isBoundedText(value.summary, 600) ||
|
|
73
88
|
!isBoundedText(value.requestedAction, 600) ||
|
|
74
89
|
!isResumeCondition(value.resumeCondition) ||
|
|
75
|
-
orgPlanAttentionResumeConditionByReason[value.reason] !== value.resumeCondition
|
|
90
|
+
orgPlanAttentionResumeConditionByReason[value.reason] !== value.resumeCondition ||
|
|
91
|
+
(value.executorReplacement !== undefined && !executorReplacement) ||
|
|
92
|
+
(executorReplacement && value.reason !== 'permissionRequired'))
|
|
76
93
|
return null;
|
|
77
94
|
return {
|
|
78
95
|
reason: value.reason,
|
|
79
96
|
summary: value.summary,
|
|
80
97
|
requestedAction: value.requestedAction,
|
|
81
98
|
resumeCondition: value.resumeCondition,
|
|
99
|
+
...(executorReplacement ? { executorReplacement } : {}),
|
|
82
100
|
};
|
|
83
101
|
}
|
|
84
102
|
export function parseOrgPlanAttentionResponse(value) {
|
|
@@ -108,21 +126,32 @@ export function toOrgPlanAttentionAcknowledgement(acknowledgement = { accepted:
|
|
|
108
126
|
};
|
|
109
127
|
}
|
|
110
128
|
export function isOrgPlanAttentionToolResponse(value) {
|
|
129
|
+
return parseOrgPlanAttentionToolResponse(value) !== null;
|
|
130
|
+
}
|
|
131
|
+
export function parseOrgPlanAttentionToolResponse(value) {
|
|
111
132
|
if (!isRecord(value) || value.success !== true || !Array.isArray(value.contentItems))
|
|
112
|
-
return
|
|
133
|
+
return null;
|
|
113
134
|
const item = value.contentItems[0];
|
|
114
135
|
if (value.contentItems.length !== 1 ||
|
|
115
136
|
!isRecord(item) ||
|
|
116
137
|
item.type !== 'inputText' ||
|
|
117
138
|
typeof item.text !== 'string')
|
|
118
|
-
return
|
|
139
|
+
return null;
|
|
119
140
|
try {
|
|
120
|
-
return parseOrgPlanAttentionResponse(JSON.parse(item.text))
|
|
141
|
+
return parseOrgPlanAttentionResponse(JSON.parse(item.text));
|
|
121
142
|
}
|
|
122
143
|
catch {
|
|
123
|
-
return
|
|
144
|
+
return null;
|
|
124
145
|
}
|
|
125
146
|
}
|
|
147
|
+
function parseExecutorReplacement(value) {
|
|
148
|
+
if (!isRecord(value) || Object.keys(value).length !== 1)
|
|
149
|
+
return null;
|
|
150
|
+
return typeof value.canonicalTaskName === 'string' &&
|
|
151
|
+
/^l[1-9][0-9]*$/.test(value.canonicalTaskName)
|
|
152
|
+
? { canonicalTaskName: value.canonicalTaskName }
|
|
153
|
+
: null;
|
|
154
|
+
}
|
|
126
155
|
function isReason(value) {
|
|
127
156
|
return (typeof value === 'string' && orgPlanAttentionReasons.includes(value));
|
|
128
157
|
}
|