openclaw-openagent 1.0.11 → 1.0.13
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/index.js +3 -1
- package/dist/src/app/remote-agent-tool.js +110 -14
- package/dist/src/app/types.d.ts +2 -2
- package/dist/src/config/config-schema.d.ts +9 -0
- package/dist/src/config/config-schema.js +6 -0
- package/dist/src/plugin-ui/adapters/adapters/oc-2026-04.js +103 -0
- package/dist/src/plugin-ui/adapters/adapters/oc-2026-05.js +125 -0
- package/dist/src/plugin-ui/adapters/adapters/oc-2026-06.js +125 -0
- package/dist/src/plugin-ui/adapters/adapters/oc-unknown.js +48 -0
- package/dist/src/plugin-ui/adapters/oc-2026-04.js +103 -0
- package/dist/src/plugin-ui/adapters/oc-2026-05.js +125 -0
- package/dist/src/plugin-ui/adapters/oc-2026-06.js +125 -0
- package/dist/src/plugin-ui/adapters/oc-unknown.js +48 -0
- package/dist/src/plugin-ui/assets/openagent-override.js +1129 -273
- package/dist/src/plugin-ui/index.d.ts +1 -1
- package/dist/src/plugin-ui/index.js +2 -2
- package/dist/src/plugin-ui/ui-extension-loader/index.d.ts +2 -1
- package/dist/src/plugin-ui/ui-extension-loader/index.js +5 -5
- package/dist/src/plugin-ui/ui-extension-loader/registry-regex.js +75 -8
- package/dist/src/plugin-ui/ui-extension-loader/types.d.ts +4 -1
- package/dist/src/proxy/auth-proxy.js +5 -0
- package/dist/src/runtime/update-checker.d.ts +18 -0
- package/dist/src/runtime/update-checker.js +253 -0
- package/dist/src/state/store.d.ts +21 -0
- package/dist/src/state/store.js +54 -0
- package/dist/src/transport/oasn/oasn-invocation.d.ts +3 -0
- package/dist/src/transport/oasn/oasn-invocation.js +28 -12
- package/dist/src/transport/oasn/oasn-types.d.ts +8 -4
- package/index.ts +4 -1
- package/package.json +4 -3
- package/src/app/remote-agent-tool.ts +131 -16
- package/src/app/types.ts +2 -2
- package/src/config/config-schema.ts +6 -0
- package/src/plugin-ui/adapters/oc-2026-04.js +103 -0
- package/src/plugin-ui/adapters/oc-2026-05.js +125 -0
- package/src/plugin-ui/adapters/oc-2026-06.js +125 -0
- package/src/plugin-ui/adapters/oc-unknown.js +48 -0
- package/src/plugin-ui/assets/openagent-override.js +1129 -273
- package/src/plugin-ui/build.cjs +249 -38
- package/src/plugin-ui/index.ts +2 -2
- package/src/plugin-ui/modules/agent-book/panel/agent-book.js +102 -12
- package/src/plugin-ui/modules/agent-book/panel/inject-ui.js +105 -3
- package/src/plugin-ui/modules/agent-book/panel/styles.js +54 -48
- package/src/plugin-ui/modules/agent-book/remote-agent-tool/components-core.js +4 -2
- package/src/plugin-ui/modules/agent-book/remote-agent-tool/thought-chain-card.js +4 -1
- package/src/plugin-ui/modules/agent-book/scanner.js +17 -5
- package/src/plugin-ui/modules/agent-book/travelcard/travel-styles.js +12 -1
- package/src/plugin-ui/modules/loader/bootstrap.js +95 -0
- package/src/plugin-ui/modules/loader/shared-state.js +244 -20
- package/src/plugin-ui/modules/remote-agent/execution-card.js +54 -16
- package/src/plugin-ui/modules/remote-agent/native-style-adapter.js +5 -23
- package/src/plugin-ui/modules/remote-agent/output-card.js +13 -7
- package/src/plugin-ui/modules/remote-agent/render-hooks.js +53 -41
- package/src/plugin-ui/modules/remote-agent/styles.js +238 -89
- package/src/plugin-ui/modules/remote-agent/tool-card-model.js +72 -4
- package/src/plugin-ui/postinstall-deploy.cjs +52 -0
- package/src/plugin-ui/ui-extension-loader/index.ts +6 -6
- package/src/plugin-ui/ui-extension-loader/registry-regex.ts +81 -9
- package/src/plugin-ui/ui-extension-loader/types.ts +5 -1
- package/src/proxy/auth-proxy.ts +5 -0
- package/src/runtime/update-checker.ts +286 -0
- package/src/state/store.ts +80 -0
- package/src/transport/oasn/oasn-invocation.ts +47 -12
- package/src/transport/oasn/oasn-types.ts +6 -2
- package/src/types/openclaw-plugin-sdk-media-store.d.ts +9 -0
|
@@ -407,15 +407,10 @@ export class OasnInvocation {
|
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
409
|
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
const message = userError?.message
|
|
415
|
-
?? inlineResult?.summary
|
|
416
|
-
?? visible?.inlineResultSummary
|
|
417
|
-
?? visible?.inline_result_summary
|
|
418
|
-
?? `Invocation ended with status=${final.status}`;
|
|
410
|
+
const message = this._invocationFailureMessage(
|
|
411
|
+
final,
|
|
412
|
+
`Invocation ended with status=${final.status}`,
|
|
413
|
+
);
|
|
419
414
|
return {
|
|
420
415
|
requestId: invocationId,
|
|
421
416
|
status: 'error',
|
|
@@ -450,15 +445,55 @@ export class OasnInvocation {
|
|
|
450
445
|
|
|
451
446
|
/** 终态错误专用 TransportError,便于上层 catch */
|
|
452
447
|
private _terminalError(final: GetInvocationResponse, handle: TaskHandle): TransportError {
|
|
453
|
-
const
|
|
454
|
-
const
|
|
455
|
-
const msg = userError?.message ?? `Invocation ${final.status}`;
|
|
448
|
+
const code = this._invocationFailureCode(final) ?? `INVOCATION_${final.status.toUpperCase()}`;
|
|
449
|
+
const msg = this._invocationFailureMessage(final, `Invocation ${final.status}`);
|
|
456
450
|
return makeTransportError(code, msg, {
|
|
457
451
|
invocationId: handle.invocationId,
|
|
458
452
|
sessionId: handle.sessionId,
|
|
459
453
|
});
|
|
460
454
|
}
|
|
461
455
|
|
|
456
|
+
private _invocationFailureCode(final: GetInvocationResponse): string | undefined {
|
|
457
|
+
return this._firstText(
|
|
458
|
+
final.userError?.code,
|
|
459
|
+
final.user_error?.code,
|
|
460
|
+
final.userErrorCode,
|
|
461
|
+
final.user_error_code,
|
|
462
|
+
);
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
private _invocationFailureMessage(final: GetInvocationResponse, fallback: string): string {
|
|
466
|
+
const userMessage = this._firstText(
|
|
467
|
+
final.userError?.message,
|
|
468
|
+
final.user_error?.message,
|
|
469
|
+
final.userErrorMessage,
|
|
470
|
+
final.user_error_message,
|
|
471
|
+
);
|
|
472
|
+
if (userMessage) return userMessage;
|
|
473
|
+
|
|
474
|
+
const inlineResult = final.inlineResult ?? final.inline_result;
|
|
475
|
+
const visible = final.visibleResult ?? final.visible_result;
|
|
476
|
+
const fallbackMessage = this._firstText(
|
|
477
|
+
inlineResult?.summary,
|
|
478
|
+
visible?.inlineResultSummary,
|
|
479
|
+
visible?.inline_result_summary,
|
|
480
|
+
final.progress?.safeStatusMessage,
|
|
481
|
+
final.progress?.safe_status_message,
|
|
482
|
+
);
|
|
483
|
+
const code = this._invocationFailureCode(final);
|
|
484
|
+
if (fallbackMessage && code && !fallbackMessage.includes(code)) return `${fallbackMessage} (${code})`;
|
|
485
|
+
return fallbackMessage ?? code ?? fallback;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
private _firstText(...values: Array<unknown>): string | undefined {
|
|
489
|
+
for (const value of values) {
|
|
490
|
+
if (typeof value !== 'string') continue;
|
|
491
|
+
const trimmed = value.trim();
|
|
492
|
+
if (trimmed) return trimmed;
|
|
493
|
+
}
|
|
494
|
+
return undefined;
|
|
495
|
+
}
|
|
496
|
+
|
|
462
497
|
private _toArtifactRef(art: ArtifactResponse): ArtifactRef {
|
|
463
498
|
return {
|
|
464
499
|
id: art.artifactId ?? art.artifact_id ?? '',
|
|
@@ -316,8 +316,12 @@ export interface GetInvocationResponse {
|
|
|
316
316
|
nextPollAfterMs?: number | null;
|
|
317
317
|
next_poll_after_ms?: number | null;
|
|
318
318
|
warnings?: string[];
|
|
319
|
-
userError?: { code
|
|
320
|
-
user_error?: { code
|
|
319
|
+
userError?: { code?: string; message?: string | null };
|
|
320
|
+
user_error?: { code?: string; message?: string | null };
|
|
321
|
+
userErrorCode?: string;
|
|
322
|
+
user_error_code?: string;
|
|
323
|
+
userErrorMessage?: string | null;
|
|
324
|
+
user_error_message?: string | null;
|
|
321
325
|
createdAt?: string;
|
|
322
326
|
created_at?: string;
|
|
323
327
|
updatedAt?: string;
|