maka-agent 0.2.0-dev.47.20260922 → 0.2.0-dev.49.20260924
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/acp/session-event-mapper.js +1 -4
- package/dist/onboarding-catalog.js +20 -4
- package/dist/pi-transcript.js +0 -8
- package/dist/pi-tui-pickers.js +1 -1
- package/dist/pi-tui-runner.js +6 -4
- package/dist/runtime-host-capability-provider-command.js +25 -6
- package/dist/runtime-host-onboarding.js +5 -3
- package/dist/runtime-host-session-channel.js +9 -3
- package/dist/tui-mcp-control.js +37 -24
- package/native/runtime-host-windows-task-launcher/prebuilds/win32-x64/maka-runtime-host-task-launcher.exe +0 -0
- package/node_modules/@maka/acp-executor-plugin/dist/acp-errors.js +26 -0
- package/node_modules/@maka/acp-executor-plugin/dist/acp-filesystem.js +103 -0
- package/node_modules/@maka/acp-executor-plugin/dist/acp-process.js +119 -0
- package/node_modules/@maka/acp-executor-plugin/dist/acp-projection.js +146 -0
- package/node_modules/@maka/acp-executor-plugin/dist/index.js +653 -0
- package/node_modules/@maka/acp-executor-plugin/dist/plugin.mjs +24446 -0
- package/node_modules/@maka/acp-executor-plugin/package.json +15 -0
- package/node_modules/@maka/antigravity-acp-plugin/dist/index.js +88 -0
- package/node_modules/@maka/antigravity-acp-plugin/dist/model-presentation.js +53 -0
- package/node_modules/@maka/antigravity-acp-plugin/dist/plugin.mjs +115 -0
- package/node_modules/@maka/antigravity-acp-plugin/package.json +15 -0
- package/node_modules/@maka/core/dist/events.js +13 -0
- package/node_modules/@maka/core/dist/executor-catalog.js +106 -0
- package/node_modules/@maka/core/dist/llm-connections.js +2 -5
- package/node_modules/@maka/core/dist/mcp.js +4 -1
- package/node_modules/@maka/core/dist/model-facts.js +2 -4
- package/node_modules/@maka/core/dist/model-metadata.generated.js +345 -248
- package/node_modules/@maka/core/dist/model-metadata.js +28 -1
- package/node_modules/@maka/core/dist/model-thinking.js +17 -17
- package/node_modules/@maka/core/dist/model-web-search.js +7 -9
- package/node_modules/@maka/core/dist/models-dev-projection.js +1 -1
- package/node_modules/@maka/core/dist/onboarding.js +1 -4
- package/node_modules/@maka/core/dist/provider-registry.js +60 -86
- package/node_modules/@maka/core/dist/runtime-event-store.js +25 -0
- package/node_modules/@maka/core/dist/runtime-event.js +2 -2
- package/node_modules/@maka/core/dist/runtime-invocation.js +5 -0
- package/node_modules/@maka/core/dist/runtime-policy/connection-catalog-codec.js +28 -16
- package/node_modules/@maka/core/dist/runtime-policy/credential-vault-codec.js +6 -0
- package/node_modules/@maka/core/dist/runtime-policy/policy-codec.js +21 -0
- package/node_modules/@maka/core/dist/runtime-policy.js +1 -1
- package/node_modules/@maka/core/dist/session.js +25 -9
- package/node_modules/@maka/core/dist/settings.js +1 -0
- package/node_modules/@maka/core/dist/tool-ledger-scanner.js +365 -104
- package/node_modules/@maka/core/dist/transcript-search.js +1 -0
- package/node_modules/@maka/core/dist/turn-origin.js +14 -0
- package/node_modules/@maka/core/dist/usage-stats/types.js +1 -0
- package/node_modules/@maka/core/package.json +2 -0
- package/node_modules/@maka/eval/dist/harbor-maka-subject.js +3 -0
- package/node_modules/@maka/eval/dist/maka-subject.js +8 -1
- package/node_modules/@maka/mcp/dist/credential-coordinator.js +6 -1
- package/node_modules/@maka/mcp/dist/index.js +31 -5
- package/node_modules/@maka/mcp/dist/oauth.js +54 -6
- package/node_modules/@maka/runtime/dist/agent-run-inspect.js +1 -1
- package/node_modules/@maka/runtime/dist/ai-sdk-backend.js +1 -11
- package/node_modules/@maka/runtime/dist/ai-sdk-compaction.js +2 -12
- package/node_modules/@maka/runtime/dist/ai-sdk-turn.js +3 -71
- package/node_modules/@maka/runtime/dist/conversation-copy.js +58 -3
- package/node_modules/@maka/runtime/dist/local-web-fetch.js +23 -11
- package/node_modules/@maka/runtime/dist/mcp-tools.js +9 -2
- package/node_modules/@maka/runtime/dist/model-adapter.js +10 -5
- package/node_modules/@maka/runtime/dist/model-factory.js +33 -30
- package/node_modules/@maka/runtime/dist/model-fetcher.js +4 -1
- package/node_modules/@maka/runtime/dist/model-runtime.js +3 -9
- package/node_modules/@maka/runtime/dist/plugin-executor-backend.js +116 -3
- package/node_modules/@maka/runtime/dist/plugin-executor-service.js +212 -16
- package/node_modules/@maka/runtime/dist/read-page.js +11 -8
- package/node_modules/@maka/runtime/dist/recovery-resolver.js +47 -20
- package/node_modules/@maka/runtime/dist/runtime-event-backfill.js +1 -0
- package/node_modules/@maka/runtime/dist/runtime-ledger-repair.js +2 -2
- package/node_modules/@maka/runtime/dist/scheduled-task-tools.js +39 -8
- package/node_modules/@maka/runtime/dist/session-event-runtime-mapper.js +3 -0
- package/node_modules/@maka/runtime/dist/session-manager.js +182 -127
- package/node_modules/@maka/runtime/dist/shell-run-manager.js +3 -0
- package/node_modules/@maka/runtime/dist/stream-graph-coordinator.js +29 -4
- package/node_modules/@maka/runtime/dist/telemetry/model-pricing.generated.js +141 -134
- package/node_modules/@maka/runtime/dist/tool-result-archive-transition.js +3 -3
- package/node_modules/@maka/runtime/dist/workers/filesystem-worker.js +7 -6
- package/node_modules/@maka/runtime-host/dist/adapter/session-projector.js +28 -62
- package/node_modules/@maka/runtime-host/dist/candidate-entry.js +8 -5
- package/node_modules/@maka/runtime-host/dist/client/hosted-execution-target.js +7 -1
- package/node_modules/@maka/runtime-host/dist/client/index.js +1 -1
- package/node_modules/@maka/runtime-host/dist/client/reconnect-lifecycle.js +8 -1
- package/node_modules/@maka/runtime-host/dist/client/session-catalog-summary.js +6 -1
- package/node_modules/@maka/runtime-host/dist/client/session-subscription.js +3 -0
- package/node_modules/@maka/runtime-host/dist/composition-identity.js +19 -0
- package/node_modules/@maka/runtime-host/dist/protocol/connection-effects.js +6 -3
- package/node_modules/@maka/runtime-host/dist/protocol/index.js +14 -2
- package/node_modules/@maka/runtime-host/dist/protocol/operations.js +4 -1
- package/node_modules/@maka/runtime-host/dist/protocol/plugin-platform.js +34 -0
- package/node_modules/@maka/runtime-host/dist/protocol/prompt-suggestions.js +61 -0
- package/node_modules/@maka/runtime-host/dist/protocol/runtime-policy.js +4 -1
- package/node_modules/@maka/runtime-host/dist/protocol/session-catalog.js +40 -2
- package/node_modules/@maka/runtime-host/dist/protocol/session-continuity.js +2 -1
- package/node_modules/@maka/runtime-host/dist/server/builtin-external-agent-plugins.js +188 -0
- package/node_modules/@maka/runtime-host/dist/server/candidate.js +12 -7
- package/node_modules/@maka/runtime-host/dist/server/client-capability-recovery.js +44 -46
- package/node_modules/@maka/runtime-host/dist/server/connection-effect-coordinator.js +3 -0
- package/node_modules/@maka/runtime-host/dist/server/context-coordinator.js +2 -0
- package/node_modules/@maka/runtime-host/dist/server/execution-composition-factory.js +1 -1
- package/node_modules/@maka/runtime-host/dist/server/execution-composition.js +212 -24
- package/node_modules/@maka/runtime-host/dist/server/execution-model-authority.js +41 -2
- package/node_modules/@maka/runtime-host/dist/server/extension-bundle.js +4 -0
- package/node_modules/@maka/runtime-host/dist/server/generated-text.js +39 -0
- package/node_modules/@maka/runtime-host/dist/server/host-composition-source.js +47 -0
- package/node_modules/@maka/runtime-host/dist/server/host-composition.js +1 -29
- package/node_modules/@maka/runtime-host/dist/server/host-kernel.js +2 -9
- package/node_modules/@maka/runtime-host/dist/server/hosted-execution-recovery.js +75 -9
- package/node_modules/@maka/runtime-host/dist/server/hosted-execution-tool-profile.js +12 -0
- package/node_modules/@maka/runtime-host/dist/server/interaction-coordinator.js +45 -0
- package/node_modules/@maka/runtime-host/dist/server/jev-routing-model.js +157 -0
- package/node_modules/@maka/runtime-host/dist/server/listener-set.js +2 -2
- package/node_modules/@maka/runtime-host/dist/server/message-coordinator.js +4 -0
- package/node_modules/@maka/runtime-host/dist/server/plugin-platform-coordinator.js +11 -1
- package/node_modules/@maka/runtime-host/dist/server/process-lifecycle.js +1 -1
- package/node_modules/@maka/runtime-host/dist/server/process-termination-error.js +27 -0
- package/node_modules/@maka/runtime-host/dist/server/prompt-suggestion.js +179 -0
- package/node_modules/@maka/runtime-host/dist/server/root-turn-coordinator.js +93 -14
- package/node_modules/@maka/runtime-host/dist/server/runtime-policy-coordinator.js +2 -0
- package/node_modules/@maka/runtime-host/dist/server/session-catalog-coordinator.js +99 -12
- package/node_modules/@maka/runtime-host/dist/server/session-continuity-coordinator.js +48 -16
- package/node_modules/@maka/runtime-host/dist/server/session-effect-coordinator.js +12 -6
- package/node_modules/@maka/runtime-host/dist/server/session-title.js +3 -16
- package/node_modules/@maka/runtime-host/dist/server/session-transcript-reader.js +71 -3
- package/node_modules/@maka/runtime-host/dist/server/shared-session-transcript.js +3 -0
- package/node_modules/@maka/runtime-host/dist/server/workhub-coordination-action-gate.js +6 -13
- package/node_modules/@maka/runtime-host/dist/server/workhub-coordination-coordinator.js +39 -11
- package/node_modules/@maka/runtime-host/dist/server/workhub-result-coordinator.js +173 -0
- package/node_modules/@maka/runtime-host/dist/server/workhub-result-runtime.js +293 -0
- package/node_modules/@maka/runtime-host/package.json +2 -0
- package/node_modules/@maka/storage/dist/agent-run-store-contract.js +8 -0
- package/node_modules/@maka/storage/dist/config-transfer.js +14 -8
- package/node_modules/@maka/storage/dist/execution-stores.js +19 -6
- package/node_modules/@maka/storage/dist/interaction-store.js +13 -0
- package/node_modules/@maka/storage/dist/mcp-config-store.js +91 -2
- package/node_modules/@maka/storage/dist/operational-state-store.js +15 -1
- package/node_modules/@maka/storage/dist/plan-authority.js +2 -0
- package/node_modules/@maka/storage/dist/plan-store.js +30 -0
- package/node_modules/@maka/storage/dist/runtime-event-persistence.js +1 -0
- package/node_modules/@maka/storage/dist/runtime-policy/connection-catalog-document.js +28 -17
- package/node_modules/@maka/storage/dist/runtime-policy/coordinator.js +9 -3
- package/node_modules/@maka/storage/dist/runtime-policy/credential-vault-document.js +4 -1
- package/node_modules/@maka/storage/dist/runtime-policy/legacy-custom-connection.js +65 -0
- package/node_modules/@maka/storage/dist/runtime-policy/onboarding-transaction.js +10 -5
- package/node_modules/@maka/storage/dist/runtime-policy/policy-document.js +2 -0
- package/node_modules/@maka/storage/dist/session-bundle-policy.js +11 -0
- package/node_modules/@maka/storage/dist/session-store-values.js +16 -4
- package/node_modules/@maka/storage/dist/session-store.js +29 -6
- package/node_modules/@maka/storage/dist/shell-run-authority.js +1 -0
- package/node_modules/@maka/storage/dist/shell-run-store.js +15 -0
- package/node_modules/@maka/storage/dist/sqlite-core-execution-schema.js +3 -0
- package/node_modules/@maka/storage/dist/sqlite-runtime-schema.js +74 -1
- package/node_modules/@maka/storage/dist/sqlite-runtime-store.js +849 -91
- package/node_modules/@maka/storage/dist/sqlite-session-metadata-store.js +21 -3
- package/node_modules/@maka/storage/dist/usage-screen.js +138 -108
- package/package.json +1 -1
|
@@ -22,6 +22,12 @@ import { parseRequestHeaders, RequestCustomizationValidationError, serializeRequ
|
|
|
22
22
|
import { domainError, entityIdValue, exactRecord, integerValue, positiveRevisionValue, } from './domain-codec.js';
|
|
23
23
|
export function decodeCredentialLocator(value) {
|
|
24
24
|
const base = exactRecord(value, 'credential locator', ['scope', 'connectionId', 'provider', 'kind'], ['scope', 'kind']);
|
|
25
|
+
if (base.scope === 'jev') {
|
|
26
|
+
const item = exactRecord(value, 'Jev credential locator', ['scope', 'kind']);
|
|
27
|
+
if (item.kind !== 'api_key')
|
|
28
|
+
throw domainError('Jev credential kind is invalid');
|
|
29
|
+
return { scope: 'jev', kind: 'api_key' };
|
|
30
|
+
}
|
|
25
31
|
if (base.scope === 'connection') {
|
|
26
32
|
const item = exactRecord(value, 'connection credential locator', [
|
|
27
33
|
'scope',
|
|
@@ -137,6 +137,18 @@ function normalizeRuntimePolicy(value) {
|
|
|
137
137
|
'subagents',
|
|
138
138
|
'shell',
|
|
139
139
|
'externalAgents',
|
|
140
|
+
'jev',
|
|
141
|
+
], [
|
|
142
|
+
'networkProxy',
|
|
143
|
+
'personalization',
|
|
144
|
+
'memory',
|
|
145
|
+
'workspaceInstructions',
|
|
146
|
+
'privacy',
|
|
147
|
+
'chatDefaults',
|
|
148
|
+
'webSearch',
|
|
149
|
+
'subagents',
|
|
150
|
+
'shell',
|
|
151
|
+
'externalAgents',
|
|
140
152
|
]);
|
|
141
153
|
return normalizeRuntimePolicyFields(policy, normalizeSubagentSettings(policy.subagents), normalizeShell(policy.shell), normalizeExternalAgents(policy.externalAgents));
|
|
142
154
|
}
|
|
@@ -152,6 +164,7 @@ function normalizeRuntimePolicyFields(policy, subagents, shell, externalAgents =
|
|
|
152
164
|
subagents,
|
|
153
165
|
shell,
|
|
154
166
|
externalAgents,
|
|
167
|
+
...(policy.jev === undefined ? {} : { jev: normalizeJev(policy.jev) }),
|
|
155
168
|
};
|
|
156
169
|
}
|
|
157
170
|
function withoutShell(policy) {
|
|
@@ -160,6 +173,8 @@ function withoutShell(policy) {
|
|
|
160
173
|
}
|
|
161
174
|
function normalizeMutationOperation(operation) {
|
|
162
175
|
switch (operation.kind) {
|
|
176
|
+
case 'set_jev':
|
|
177
|
+
return { kind: operation.kind, value: normalizeJev(operation.value) };
|
|
163
178
|
case 'set_network_proxy':
|
|
164
179
|
return { kind: operation.kind, value: normalizeNetworkProxy(operation.value) };
|
|
165
180
|
case 'set_personalization':
|
|
@@ -374,3 +389,9 @@ function normalizeExternalAgents(value) {
|
|
|
374
389
|
}
|
|
375
390
|
return { antigravity: { executable } };
|
|
376
391
|
}
|
|
392
|
+
function normalizeJev(value) {
|
|
393
|
+
const item = exactRecord(value, 'Jev settings', ['enabled']);
|
|
394
|
+
if (typeof item.enabled !== 'boolean')
|
|
395
|
+
throw domainError('Jev enabled must be boolean');
|
|
396
|
+
return { enabled: item.enabled };
|
|
397
|
+
}
|
|
@@ -22,7 +22,7 @@ export { WEB_SEARCH_PROVIDERS };
|
|
|
22
22
|
export { networkProxyCredentialTarget };
|
|
23
23
|
export { decodeRuntimePolicyEntityId, RuntimePolicyDomainDecodeError, } from './runtime-policy/domain-codec.js';
|
|
24
24
|
export { decodeCanonicalRuntimePolicy, normalizeNetworkProxyCredentialTarget, decodeRuntimePolicyV2, decodeRuntimePolicyV3, normalizeNetworkProxyUpdate, normalizeRuntimePolicyMutation, } from './runtime-policy/policy-codec.js';
|
|
25
|
-
export { CONNECTION_CATALOG_MAX_CONNECTIONS, CONNECTION_CATALOG_MAX_ENABLED_MODEL_IDS, CONNECTION_CATALOG_MAX_ENTRIES_PER_CONNECTION, CONNECTION_CATALOG_MAX_MODELS_PER_CONNECTION, CONNECTION_MODEL_ID_MAX_LENGTH, CONNECTION_NAME_MAX_LENGTH, decodeCanonicalConnectionBaseUrl, decodeCanonicalConnectionCatalogEntry, decodeConnectionModelId, decodeConnectionCredentialTarget, decodeModelOverridesTable, decodeConnectionModel, decodeConnectionModels, decodeConnectionName, decodeConnectionSlug, decodeConnectionTarget, decodeConnectionTestSummary, decodeConnectionVersionBasis, decodeProviderType, normalizeCatalogConnectionBaseUrl, normalizeConnectionCatalogEntryDraft, normalizeConnectionCatalogEntryUpdate, normalizeConnectionCatalogEntryUpdateForProvider, normalizeConnectionModelDiscoveryResult, canonicalConnectionEffectiveBaseUrl, connectionCredentialTarget, normalizeCreateCatalogConnectionInput, normalizeRemoveCatalogConnectionInput, normalizeSetDefaultConnectionTargetInput, normalizeUpdateCatalogConnectionInput, } from './runtime-policy/connection-catalog-codec.js';
|
|
25
|
+
export { CONNECTION_CATALOG_MAX_CONNECTIONS, CONNECTION_CATALOG_MAX_ENABLED_MODEL_IDS, CONNECTION_CATALOG_MAX_ENTRIES_PER_CONNECTION, CONNECTION_CATALOG_MAX_MODELS_PER_CONNECTION, CONNECTION_MODEL_ID_MAX_LENGTH, CONNECTION_NAME_MAX_LENGTH, decodeCanonicalConnectionBaseUrl, decodeCanonicalConnectionCatalogEntry, decodeConnectionModelId, decodeConnectionCredentialTarget, decodeModelOverridesTable, decodeConnectionModel, decodeConnectionModels, decodeConnectionName, decodeConnectionSlug, decodeConnectionTarget, decodeConnectionTestSummary, decodeConnectionVersionBasis, decodeDefaultApiProtocol, decodeProviderType, normalizeCatalogConnectionBaseUrl, normalizeConnectionCatalogEntryDraft, normalizeConnectionCatalogEntryUpdate, normalizeConnectionCatalogEntryUpdateForProvider, normalizeConnectionModelDiscoveryResult, canonicalConnectionEffectiveBaseUrl, connectionCredentialTarget, normalizeCreateCatalogConnectionInput, normalizeRemoveCatalogConnectionInput, normalizeSetDefaultConnectionTargetInput, normalizeUpdateCatalogConnectionInput, } from './runtime-policy/connection-catalog-codec.js';
|
|
26
26
|
export { decodeModelCatalogEntry } from './runtime-policy/model-catalog-entry-codec.js';
|
|
27
27
|
export { decodeCredentialLocator, decodeCredentialStatus, decodeCredentialVersionBasis, normalizeCredentialSecret, normalizeDeleteCredentialInput, normalizeSetCredentialInput, } from './runtime-policy/credential-vault-codec.js';
|
|
28
28
|
export { normalizeRequestBodyOverlay, normalizeOptionalRequestBodyOverlay, normalizeRequestHeaderUpdates, normalizeRequestHeaders, parseRequestHeaders, REQUEST_BODY_OVERLAY_MAX_BYTES, REQUEST_HEADERS_MAX_BYTES, RequestCustomizationValidationError, serializeRequestHeaders, } from './request-customization.js';
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
* under the License.
|
|
18
18
|
*/
|
|
19
19
|
import { isWorkHubActionReceipt } from './workhub-action-result.js';
|
|
20
|
+
import { decodeInteractionRequest, decodeInteractionCanonicalOutcome, isInteractionCanonicalOutcomeValidForRequest, } from './interaction.js';
|
|
20
21
|
import { isExecutorId } from './executor-id.js';
|
|
21
22
|
import { isThinkingLevel } from './model-thinking.js';
|
|
22
23
|
import { MODEL_FAILURE_MESSAGE_MAX_BYTES, isModelRetryDecision, } from './model-failure.js';
|
|
@@ -352,7 +353,6 @@ function isWorkHubDelegationStopResolution(outcome, targetTurnId) {
|
|
|
352
353
|
export const RUNTIME_SYSTEM_NOTE_KINDS = [
|
|
353
354
|
'context_compacted',
|
|
354
355
|
'context_compaction_failed_open',
|
|
355
|
-
'context_provider_dropping',
|
|
356
356
|
'context_window_suggestion',
|
|
357
357
|
'context_window_overrun',
|
|
358
358
|
'context_reported_window_exceeded',
|
|
@@ -360,9 +360,9 @@ export const RUNTIME_SYSTEM_NOTE_KINDS = [
|
|
|
360
360
|
'step_limit',
|
|
361
361
|
];
|
|
362
362
|
/**
|
|
363
|
-
* Notes
|
|
364
|
-
* readable
|
|
365
|
-
*
|
|
363
|
+
* Notes nothing writes any more, still decoded so old transcripts and run
|
|
364
|
+
* ledgers stay readable, and never shown. The session-level ones are owned by
|
|
365
|
+
* the Session header and the invocation's opening and terminal facts.
|
|
366
366
|
*/
|
|
367
367
|
export const RETIRED_SYSTEM_NOTE_KINDS = [
|
|
368
368
|
'session_start',
|
|
@@ -371,10 +371,14 @@ export const RETIRED_SYSTEM_NOTE_KINDS = [
|
|
|
371
371
|
'model_change',
|
|
372
372
|
'error',
|
|
373
373
|
'abort',
|
|
374
|
+
'context_provider_dropping',
|
|
374
375
|
];
|
|
375
376
|
export function isRuntimeSystemNoteKind(kind) {
|
|
376
377
|
return RUNTIME_SYSTEM_NOTE_KINDS.includes(kind);
|
|
377
378
|
}
|
|
379
|
+
export function isSystemNoteKind(kind) {
|
|
380
|
+
return (isRuntimeSystemNoteKind(kind) || RETIRED_SYSTEM_NOTE_KINDS.includes(kind));
|
|
381
|
+
}
|
|
378
382
|
const USER_MESSAGE_SHAPE = defineObjectShape()(['type', 'id', 'turnId', 'ts', 'text'], [
|
|
379
383
|
'displayText',
|
|
380
384
|
'attachments',
|
|
@@ -407,6 +411,7 @@ const TOOL_RESULT_MESSAGE_SHAPE = defineObjectShape()(['type', 'id', 'turnId', '
|
|
|
407
411
|
'parentToolCallId',
|
|
408
412
|
'parentOperationId',
|
|
409
413
|
]);
|
|
414
|
+
const FORM_INTERACTION_MESSAGE_SHAPE = defineObjectShape()(['type', 'id', 'turnId', 'ts', 'request', 'outcome'], []);
|
|
410
415
|
const PERMISSION_DECISION_MESSAGE_SHAPE = defineObjectShape()(['type', 'id', 'turnId', 'ts', 'toolUseId', 'toolName', 'decision'], ['rememberForTurn', 'reviewer', 'rationale', 'riskLevel', 'hint']);
|
|
411
416
|
const TOKEN_USAGE_MESSAGE_SHAPE = defineObjectShape()(['type', 'id', 'turnId', 'ts', 'input', 'output'], [
|
|
412
417
|
'cacheHitInput',
|
|
@@ -463,6 +468,7 @@ const WORKHUB_DELEGATION_ASSIGNED_MESSAGE_SHAPE = defineObjectShape()([
|
|
|
463
468
|
], [
|
|
464
469
|
'attachments',
|
|
465
470
|
'targetAttachments',
|
|
471
|
+
'returnResults',
|
|
466
472
|
'create',
|
|
467
473
|
'steered',
|
|
468
474
|
'replacesActionId',
|
|
@@ -555,10 +561,6 @@ const WORKHUB_DELEGATION_HOST_PATH_WORKSPACE_SHAPE = defineObjectShape()(['kind'
|
|
|
555
561
|
const SYSTEM_NOTE_MESSAGE_SHAPE = defineObjectShape()(['type', 'id', 'ts', 'kind'], ['turnId', 'data']);
|
|
556
562
|
const ASSISTANT_THINKING_PART_SHAPE = defineObjectShape()(['text'], ['signature', 'providerOptions']);
|
|
557
563
|
const ASSISTANT_THINKING_SHAPE = defineObjectShape()(['text'], ['signature', 'providerOptions', 'parts']);
|
|
558
|
-
const SYSTEM_NOTE_KINDS = new Set([
|
|
559
|
-
...RUNTIME_SYSTEM_NOTE_KINDS,
|
|
560
|
-
...RETIRED_SYSTEM_NOTE_KINDS,
|
|
561
|
-
]);
|
|
562
564
|
export function decodeCanonicalMessage(value) {
|
|
563
565
|
return decodeMessage(value, decodeCanonicalToolResultContent);
|
|
564
566
|
}
|
|
@@ -636,6 +638,19 @@ function decodeMessage(value, decodeToolResultContent) {
|
|
|
636
638
|
isToolActivityIdentity(message))
|
|
637
639
|
return message;
|
|
638
640
|
break;
|
|
641
|
+
case 'form_interaction':
|
|
642
|
+
if (hasMessageEnvelope(message, true) &&
|
|
643
|
+
hasExactShape(message, FORM_INTERACTION_MESSAGE_SHAPE)) {
|
|
644
|
+
const request = decodeInteractionRequest(message.request);
|
|
645
|
+
const outcome = decodeInteractionCanonicalOutcome(message.outcome);
|
|
646
|
+
if ((request.kind === 'form' || request.kind === 'question') &&
|
|
647
|
+
(outcome.kind === 'form_answer' ||
|
|
648
|
+
outcome.kind === 'question_answer' ||
|
|
649
|
+
outcome.kind === 'closure') &&
|
|
650
|
+
isInteractionCanonicalOutcomeValidForRequest(request, outcome))
|
|
651
|
+
return { ...message, request, outcome };
|
|
652
|
+
}
|
|
653
|
+
break;
|
|
639
654
|
case 'permission_decision':
|
|
640
655
|
if (hasExactShape(message, PERMISSION_DECISION_MESSAGE_SHAPE) &&
|
|
641
656
|
hasMessageEnvelope(message, true) &&
|
|
@@ -679,7 +694,7 @@ function decodeMessage(value, decodeToolResultContent) {
|
|
|
679
694
|
if (hasExactShape(message, SYSTEM_NOTE_MESSAGE_SHAPE) &&
|
|
680
695
|
hasMessageEnvelope(message, false) &&
|
|
681
696
|
isOptionalString(message.turnId) &&
|
|
682
|
-
|
|
697
|
+
isSystemNoteKind(message.kind))
|
|
683
698
|
return message;
|
|
684
699
|
break;
|
|
685
700
|
}
|
|
@@ -796,6 +811,7 @@ function isWorkHubCoordinationMessage(message) {
|
|
|
796
811
|
typeof message.targetMessageId === 'string' &&
|
|
797
812
|
typeof message.targetSessionName === 'string' &&
|
|
798
813
|
message.targetSessionName.trim().length > 0 &&
|
|
814
|
+
(message.returnResults === undefined || message.returnResults === true) &&
|
|
799
815
|
(message.steered === undefined || message.steered === true) &&
|
|
800
816
|
((message.schemaVersion === WORKHUB_COORDINATION_RECORD_SCHEMA_VERSION &&
|
|
801
817
|
message.replacesActionId === undefined &&
|
|
@@ -363,6 +363,7 @@ export function createDefaultSettings() {
|
|
|
363
363
|
},
|
|
364
364
|
privacy: defaultPrivacySettings(),
|
|
365
365
|
projects: defaultProjectPreferencesSettings(),
|
|
366
|
+
jev: { enabled: false, apiKey: '' },
|
|
366
367
|
chatDefaults: defaultChatDefaultsSettings(),
|
|
367
368
|
notifications: {
|
|
368
369
|
runComplete: true,
|