Skip to content

Commit b686b01

Browse files
committed
Merge remote-tracking branch 'upstream/main' into codex/msteams-multi-account-clean-rebuild
2 parents 204a0c7 + a3f06fb commit b686b01

13 files changed

Lines changed: 444 additions & 198 deletions

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ Docs: https://docs.openclaw.ai
4141
### Fixes
4242

4343
- **Mattermost progress command details:** accept the documented `streaming.preview.commandText` and `streaming.progress.commandText` modes in channel config validation and bundled metadata. Thanks @shakkernerd.
44+
- **1Password authorization handoff:** persist nonce-bound pending approvals in shared plugin state so hook and tool execution across broker instances remain single-use and fail closed.
4445
- **Control UI chat transcripts:** preserve loaded history across session and pane returns, bound automatic backscroll loading, virtualize long transcripts, and keep prepends, streaming, and responsive layouts from flickering or jumping. Thanks @shakkernerd.
4546
- **Codex dynamic tool outcomes:** use the shared tool-result failure contract for arbitrary lifecycle metadata, preventing successful Skill Workshop results from being displayed and persisted as failed calls. Fixes #107684. Thanks @shakkernerd.
4647
- **Nested resource ignores:** honor slash-free patterns and escaped literal exclamation marks in nested ignore files during skill and resource discovery. Thanks @moguangyu5-design.

extensions/onepassword/index.test.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
import { createTestPluginApi } from "openclaw/plugin-sdk/plugin-test-api";
22
import { describe, expect, it, vi } from "vitest";
33
import plugin from "./index.js";
4+
import { MemorySyncKeyedStore } from "./src/memory-store.test-support.js";
45

56
describe("onepassword plugin", () => {
6-
it("opens bounded fail-closed grant and audit stores", () => {
7+
it("opens bounded grant, audit, and pending stores", () => {
78
const store = {
89
register: vi.fn(),
910
lookup: vi.fn(),
1011
delete: vi.fn(),
1112
entries: vi.fn(async () => []),
1213
};
1314
const openKeyedStore = vi.fn(() => store);
15+
const openSyncKeyedStore = vi.fn(() => new MemorySyncKeyedStore());
1416
const registerCli = vi.fn();
1517
const registerTool = vi.fn();
1618

@@ -23,6 +25,7 @@ describe("onepassword plugin", () => {
2325
runtime: {
2426
state: {
2527
openKeyedStore,
28+
openSyncKeyedStore,
2629
resolveStateDir: () => "/tmp/openclaw-onepassword-test",
2730
},
2831
} as never,
@@ -41,6 +44,11 @@ describe("onepassword plugin", () => {
4144
maxEntries: 40_000,
4245
overflowPolicy: "evict-oldest",
4346
});
47+
expect(openSyncKeyedStore).toHaveBeenCalledWith({
48+
namespace: "pending",
49+
maxEntries: 512,
50+
overflowPolicy: "evict-oldest",
51+
});
4452
expect(registerCli).toHaveBeenCalledTimes(1);
4553
expect(registerTool).not.toHaveBeenCalled();
4654
});
@@ -87,6 +95,7 @@ describe("onepassword plugin", () => {
8795
config: { current },
8896
state: {
8997
openKeyedStore: () => store,
98+
openSyncKeyedStore: () => new MemorySyncKeyedStore(),
9099
resolveStateDir: () => "/tmp/openclaw-onepassword-test",
91100
},
92101
} as never,

extensions/onepassword/index.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
resolveLivePluginConfigObject,
77
} from "openclaw/plugin-sdk/plugin-config-runtime";
88
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
9-
import type { AuditRow, StandingGrant } from "./src/broker.js";
9+
import type { AuditRow, PendingAuthorization, StandingGrant } from "./src/broker.js";
1010
import { OnePasswordBroker } from "./src/broker.js";
1111
import { MAX_REGISTERED_ITEMS, parseOnePasswordConfig } from "./src/config.js";
1212
import { OpClient } from "./src/op-client.js";
@@ -54,6 +54,11 @@ export default definePluginEntry({
5454
maxEntries: MAX_AUDIT_ROWS,
5555
overflowPolicy: "evict-oldest",
5656
});
57+
const pending = api.runtime.state.openSyncKeyedStore<PendingAuthorization>({
58+
namespace: "pending",
59+
maxEntries: 512,
60+
overflowPolicy: "evict-oldest",
61+
});
5762
const tokenFile = path.join(
5863
api.runtime.state.resolveStateDir(process.env),
5964
"credentials",
@@ -82,7 +87,7 @@ export default definePluginEntry({
8287
opClient: {
8388
getItem: (params) => resolveCurrentOpClient().getItem(params),
8489
},
85-
stores: { audit, grants },
90+
stores: { audit, grants, pending },
8691
})
8792
: undefined;
8893

0 commit comments

Comments
 (0)