From bdc6a026e4db4c3b993ba50c8b10548c52793031 Mon Sep 17 00:00:00 2001 From: figmar Date: Wed, 2 Sep 2026 07:22:06 +0800 Subject: [PATCH] add lib/index.js (v0.2.0) --- lib/index.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lib/index.js diff --git a/lib/index.js b/lib/index.js new file mode 100644 index 0000000..de17639 --- /dev/null +++ b/lib/index.js @@ -0,0 +1,23 @@ +/** + * dsh-wb-sidebar — WorkBuddy/Tutti-style sidebar enhancement for + * DeepSeek Harness Desktop. + * + * Host-side entry (Node). This half is deliberately minimal: the real value + * lives in the client bundle (lib/client.js) which registers the Tasks / + * Agents / Profile tabs through dsh-better-sidebar's ctx.betterSidebar + * service. The host half exists so the bundle has a Node row to mount (the + * dsh.client.inject declaration in package.json pulls the browser half in). + */ + +export const name = 'dsh-wb-sidebar' + +// NOTE: cordis resolves `inject` as a plain map of `serviceName -> intercept +// config`. An object literal like `{ optional: ['logger'] }` is parsed as a +// dependency on a service literally named "optional", which never exists and +// leaves the fiber pending forever — fatal for the whole plugin tree. Do not +// declare `inject` here; apply() guards ctx.logger at runtime instead. + +export function apply(ctx) { + const log = ctx.logger ? ctx.logger('wb-sidebar') : console + log.info('dsh-wb-sidebar host loaded (tabs register via client bundle)') +}