@oda-agent/openclaw-plugin 0.1.5 → 0.1.7
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/credentials.d.ts +9 -0
- package/dist/credentials.d.ts.map +1 -0
- package/dist/credentials.js +20 -0
- package/dist/credentials.js.map +1 -0
- package/dist/entry.d.ts +44 -0
- package/dist/entry.d.ts.map +1 -0
- package/dist/entry.js +159 -0
- package/dist/entry.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/openclaw.plugin.json +3 -11
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
export interface PluginCredentials {
|
|
3
|
+
email: string;
|
|
4
|
+
password: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const ODA_EMAIL_ENV_VAR = "ODA_EMAIL";
|
|
7
|
+
export declare const ODA_PASSWORD_ENV_VAR = "ODA_PASSWORD";
|
|
8
|
+
export declare function readEnvironmentCredentials(env?: NodeJS.ProcessEnv): PluginCredentials;
|
|
9
|
+
//# sourceMappingURL=credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":";AAAA,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,iBAAiB,cAAc,CAAC;AAC7C,eAAO,MAAM,oBAAoB,iBAAiB,CAAC;AAOnD,wBAAgB,0BAA0B,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,iBAAiB,CAYlG"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readEnvironmentCredentials = exports.ODA_PASSWORD_ENV_VAR = exports.ODA_EMAIL_ENV_VAR = void 0;
|
|
4
|
+
exports.ODA_EMAIL_ENV_VAR = 'ODA_EMAIL';
|
|
5
|
+
exports.ODA_PASSWORD_ENV_VAR = 'ODA_PASSWORD';
|
|
6
|
+
function readEnvironmentValue(env, name) {
|
|
7
|
+
const value = env[name];
|
|
8
|
+
return typeof value === 'string' ? value.trim() : '';
|
|
9
|
+
}
|
|
10
|
+
function readEnvironmentCredentials(env = process.env) {
|
|
11
|
+
const email = readEnvironmentValue(env, exports.ODA_EMAIL_ENV_VAR);
|
|
12
|
+
const password = readEnvironmentValue(env, exports.ODA_PASSWORD_ENV_VAR);
|
|
13
|
+
if (!email || !password) {
|
|
14
|
+
throw new Error('Oda credentials are required before using this plugin. ' +
|
|
15
|
+
`Set both ${exports.ODA_EMAIL_ENV_VAR} and ${exports.ODA_PASSWORD_ENV_VAR} in the environment before launching OpenClaw.`);
|
|
16
|
+
}
|
|
17
|
+
return { email, password };
|
|
18
|
+
}
|
|
19
|
+
exports.readEnvironmentCredentials = readEnvironmentCredentials;
|
|
20
|
+
//# sourceMappingURL=credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":";;;AAKa,QAAA,iBAAiB,GAAG,WAAW,CAAC;AAChC,QAAA,oBAAoB,GAAG,cAAc,CAAC;AAEnD,SAAS,oBAAoB,CAAC,GAAsB,EAAE,IAAY;IAChE,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;IACxB,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AACvD,CAAC;AAED,SAAgB,0BAA0B,CAAC,MAAyB,OAAO,CAAC,GAAG;IAC7E,MAAM,KAAK,GAAG,oBAAoB,CAAC,GAAG,EAAE,yBAAiB,CAAC,CAAC;IAC3D,MAAM,QAAQ,GAAG,oBAAoB,CAAC,GAAG,EAAE,4BAAoB,CAAC,CAAC;IAEjE,IAAI,CAAC,KAAK,IAAI,CAAC,QAAQ,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CACb,yDAAyD;YACvD,YAAY,yBAAiB,QAAQ,4BAAoB,gDAAgD,CAC5G,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AAC7B,CAAC;AAZD,gEAYC"}
|
package/dist/entry.d.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenClaw native plugin entry.
|
|
3
|
+
*
|
|
4
|
+
* OpenClaw loads `dist/index.js` and expects a **default export** that is a
|
|
5
|
+
* plugin entry object with `register()` and `activate()` methods. This file
|
|
6
|
+
* provides that entrypoint by registering every tool that the Oda shopping
|
|
7
|
+
* assistant exposes, wired up to a lazily-authenticated OdaClient.
|
|
8
|
+
*
|
|
9
|
+
* The `definePluginEntry` helper is defined locally so that this package has
|
|
10
|
+
* no runtime dependency on the OpenClaw SDK. When the OpenClaw team publishes
|
|
11
|
+
* `openclaw/plugin-sdk`, this file can be updated to import from there instead.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Minimal OpenClaw plugin API surface passed to the `register()` callback.
|
|
15
|
+
* The complete interface is defined by the OpenClaw runtime; only the
|
|
16
|
+
* members used by this plugin are declared here.
|
|
17
|
+
*/
|
|
18
|
+
export interface OpenClawApi {
|
|
19
|
+
/** Register a named tool with the plugin runtime. */
|
|
20
|
+
registerTool(name: string, description: string, handler: (params: unknown) => Promise<unknown>): void;
|
|
21
|
+
/** Return the plugin configuration provided by the user or environment. */
|
|
22
|
+
getConfig(): Record<string, unknown>;
|
|
23
|
+
}
|
|
24
|
+
/** Shape of an OpenClaw native plugin entry. */
|
|
25
|
+
export interface OpenClawPluginEntry {
|
|
26
|
+
/** Unique identifier for the plugin (must match `openclaw.plugin.json` id). */
|
|
27
|
+
id: string;
|
|
28
|
+
/** Human-readable plugin name. */
|
|
29
|
+
name: string;
|
|
30
|
+
/** Short description of the plugin. */
|
|
31
|
+
description: string;
|
|
32
|
+
/**
|
|
33
|
+
* Called once by the OpenClaw runtime during plugin installation.
|
|
34
|
+
* Use the provided `api` to register all tools this plugin exposes.
|
|
35
|
+
*/
|
|
36
|
+
register(api: OpenClawApi): void;
|
|
37
|
+
/** Called once by the OpenClaw runtime when the plugin is activated. */
|
|
38
|
+
activate(): void;
|
|
39
|
+
}
|
|
40
|
+
export declare function register(api: OpenClawApi): void;
|
|
41
|
+
export declare function activate(): void;
|
|
42
|
+
declare const pluginEntry: OpenClawPluginEntry;
|
|
43
|
+
export default pluginEntry;
|
|
44
|
+
//# sourceMappingURL=entry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry.d.ts","sourceRoot":"","sources":["../src/entry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAcH;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,qDAAqD;IACrD,YAAY,CACV,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,GAC7C,IAAI,CAAC;IACR,2EAA2E;IAC3E,SAAS,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED,gDAAgD;AAChD,MAAM,WAAW,mBAAmB;IAClC,+EAA+E;IAC/E,EAAE,EAAE,MAAM,CAAC;IACX,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAAC;IACjC,wEAAwE;IACxE,QAAQ,IAAI,IAAI,CAAC;CAClB;AAeD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CA8J/C;AAED,wBAAgB,QAAQ,IAAI,IAAI,CAG/B;AAMD,QAAA,MAAM,WAAW,qBAOf,CAAC;AAEH,eAAe,WAAW,CAAC"}
|
package/dist/entry.js
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* OpenClaw native plugin entry.
|
|
4
|
+
*
|
|
5
|
+
* OpenClaw loads `dist/index.js` and expects a **default export** that is a
|
|
6
|
+
* plugin entry object with `register()` and `activate()` methods. This file
|
|
7
|
+
* provides that entrypoint by registering every tool that the Oda shopping
|
|
8
|
+
* assistant exposes, wired up to a lazily-authenticated OdaClient.
|
|
9
|
+
*
|
|
10
|
+
* The `definePluginEntry` helper is defined locally so that this package has
|
|
11
|
+
* no runtime dependency on the OpenClaw SDK. When the OpenClaw team publishes
|
|
12
|
+
* `openclaw/plugin-sdk`, this file can be updated to import from there instead.
|
|
13
|
+
*/
|
|
14
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
17
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
18
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
19
|
+
}
|
|
20
|
+
Object.defineProperty(o, k2, desc);
|
|
21
|
+
}) : (function(o, m, k, k2) {
|
|
22
|
+
if (k2 === undefined) k2 = k;
|
|
23
|
+
o[k2] = m[k];
|
|
24
|
+
}));
|
|
25
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
26
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
27
|
+
}) : function(o, v) {
|
|
28
|
+
o["default"] = v;
|
|
29
|
+
});
|
|
30
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.activate = exports.register = void 0;
|
|
39
|
+
const core_1 = require("@oda-agent/core");
|
|
40
|
+
const readOnlyTools = __importStar(require("./tools/readOnlyTools.js"));
|
|
41
|
+
const cartMutationTools = __importStar(require("./tools/cartMutationTools.js"));
|
|
42
|
+
const credentials_js_1 = require("./credentials.js");
|
|
43
|
+
const plugin_js_1 = require("./plugin.js");
|
|
44
|
+
/**
|
|
45
|
+
* Identity helper that mirrors `definePluginEntry` from the OpenClaw SDK.
|
|
46
|
+
* Defined locally so the package has no runtime dependency on the OpenClaw SDK.
|
|
47
|
+
*/
|
|
48
|
+
function definePluginEntry(entry) {
|
|
49
|
+
return entry;
|
|
50
|
+
}
|
|
51
|
+
function register(api) {
|
|
52
|
+
let runtimePromise = null;
|
|
53
|
+
let authenticatedRuntimePromise = null;
|
|
54
|
+
function getRuntime() {
|
|
55
|
+
if (runtimePromise === null) {
|
|
56
|
+
runtimePromise = Promise.resolve()
|
|
57
|
+
.then(() => {
|
|
58
|
+
const credentials = (0, credentials_js_1.readEnvironmentCredentials)();
|
|
59
|
+
const client = new core_1.OdaClient({ credentials });
|
|
60
|
+
return {
|
|
61
|
+
client,
|
|
62
|
+
plugin: (0, plugin_js_1.createOpenClawPlugin)(client),
|
|
63
|
+
};
|
|
64
|
+
})
|
|
65
|
+
.catch((error) => {
|
|
66
|
+
runtimePromise = null;
|
|
67
|
+
throw error;
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
return runtimePromise;
|
|
71
|
+
}
|
|
72
|
+
async function ensureLoggedIn() {
|
|
73
|
+
if (authenticatedRuntimePromise === null) {
|
|
74
|
+
authenticatedRuntimePromise = getRuntime()
|
|
75
|
+
.then(async (runtime) => {
|
|
76
|
+
await runtime.client.login();
|
|
77
|
+
return runtime;
|
|
78
|
+
})
|
|
79
|
+
.catch((error) => {
|
|
80
|
+
authenticatedRuntimePromise = null;
|
|
81
|
+
throw error;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
return authenticatedRuntimePromise;
|
|
85
|
+
}
|
|
86
|
+
// ── Read-only tools ─────────────────────────────────────────────────────
|
|
87
|
+
api.registerTool('searchProducts', 'Search for products in the Oda catalogue by keyword.', async (params) => {
|
|
88
|
+
const { client } = await ensureLoggedIn();
|
|
89
|
+
return readOnlyTools.searchProducts(client, params);
|
|
90
|
+
});
|
|
91
|
+
api.registerTool('getCart', 'Retrieve the current shopping cart.', async () => {
|
|
92
|
+
const { client } = await ensureLoggedIn();
|
|
93
|
+
return readOnlyTools.getCart(client);
|
|
94
|
+
});
|
|
95
|
+
api.registerTool('getOrders', 'Fetch paginated order history.', async (params) => {
|
|
96
|
+
const { client } = await ensureLoggedIn();
|
|
97
|
+
return readOnlyTools.getOrders(client, params);
|
|
98
|
+
});
|
|
99
|
+
api.registerTool('getDeliverySlots', 'List available delivery time slots.', async () => {
|
|
100
|
+
const { client } = await ensureLoggedIn();
|
|
101
|
+
return readOnlyTools.getDeliverySlots(client);
|
|
102
|
+
});
|
|
103
|
+
api.registerTool('getShoppingLists', "List the user's saved shopping lists.", async () => {
|
|
104
|
+
const { client } = await ensureLoggedIn();
|
|
105
|
+
return readOnlyTools.getShoppingLists(client);
|
|
106
|
+
});
|
|
107
|
+
// ── Higher-level read-only helpers ──────────────────────────────────────
|
|
108
|
+
api.registerTool('analyseOrderHistory', 'Analyse past orders and return a summary of frequently ordered products.', async (params) => {
|
|
109
|
+
const { plugin } = await ensureLoggedIn();
|
|
110
|
+
const p = params;
|
|
111
|
+
return plugin.analyseOrderHistory(p?.maxPages);
|
|
112
|
+
});
|
|
113
|
+
api.registerTool('buildShoppingList', 'Resolve plain-text queries into a structured shopping list without mutating the cart.', async (params) => {
|
|
114
|
+
const { plugin } = await ensureLoggedIn();
|
|
115
|
+
const p = params;
|
|
116
|
+
return plugin.buildShoppingList(p.name, p.items);
|
|
117
|
+
});
|
|
118
|
+
api.registerTool('findCheapestDeliverySlot', 'Return the cheapest available delivery slot without booking it.', async () => {
|
|
119
|
+
const { plugin } = await ensureLoggedIn();
|
|
120
|
+
return plugin.findCheapestDeliverySlot();
|
|
121
|
+
});
|
|
122
|
+
// ── Cart-mutation tools (disabled by default in manifest) ───────────────
|
|
123
|
+
api.registerTool('addToCart', 'Add a single product to the cart. Requires explicit user confirmation before use.', async (params) => {
|
|
124
|
+
const { client } = await ensureLoggedIn();
|
|
125
|
+
const p = params;
|
|
126
|
+
return cartMutationTools.addToCart(client, p.productId, p.quantity);
|
|
127
|
+
});
|
|
128
|
+
api.registerTool('removeFromCart', 'Remove an item from the cart by product ID. Requires explicit user confirmation before use.', async (params) => {
|
|
129
|
+
const { client } = await ensureLoggedIn();
|
|
130
|
+
const p = params;
|
|
131
|
+
return cartMutationTools.removeFromCart(client, p.productId);
|
|
132
|
+
});
|
|
133
|
+
api.registerTool('clearCart', 'Remove all items from the cart. Requires explicit user confirmation before use.', async () => {
|
|
134
|
+
const { client } = await ensureLoggedIn();
|
|
135
|
+
return cartMutationTools.clearCart(client);
|
|
136
|
+
});
|
|
137
|
+
api.registerTool('prepareCart', 'Add all items from a shopping list to the cart. Requires explicit user confirmation before use.', async (params) => {
|
|
138
|
+
const { client } = await ensureLoggedIn();
|
|
139
|
+
return cartMutationTools.prepareCart(client, params);
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
exports.register = register;
|
|
143
|
+
function activate() {
|
|
144
|
+
// Lifecycle hook called when the plugin is activated by OpenClaw.
|
|
145
|
+
// No additional setup is required for the Oda shopping assistant.
|
|
146
|
+
}
|
|
147
|
+
exports.activate = activate;
|
|
148
|
+
// ---------------------------------------------------------------------------
|
|
149
|
+
// Plugin entry
|
|
150
|
+
// ---------------------------------------------------------------------------
|
|
151
|
+
const pluginEntry = definePluginEntry({
|
|
152
|
+
id: '@oda-agent/openclaw-plugin',
|
|
153
|
+
name: 'oda-shopping-assistant',
|
|
154
|
+
description: 'Oda grocery shopping assistant — safe cart planning, order history analysis, and delivery slot discovery.',
|
|
155
|
+
register,
|
|
156
|
+
activate,
|
|
157
|
+
});
|
|
158
|
+
exports.default = pluginEntry;
|
|
159
|
+
//# sourceMappingURL=entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry.js","sourceRoot":"","sources":["../src/entry.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,0CAA4C;AAE5C,wEAA0D;AAC1D,gFAAkE;AAClE,qDAA8D;AAC9D,2CAAmD;AAwCnD;;;GAGG;AACH,SAAS,iBAAiB,CAAC,KAA0B;IACnD,OAAO,KAAK,CAAC;AACf,CAAC;AAOD,SAAgB,QAAQ,CAAC,GAAgB;IACvC,IAAI,cAAc,GAAkC,IAAI,CAAC;IACzD,IAAI,2BAA2B,GAAkC,IAAI,CAAC;IAEtE,SAAS,UAAU;QACjB,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;YAC5B,cAAc,GAAG,OAAO,CAAC,OAAO,EAAE;iBAC/B,IAAI,CAAC,GAAG,EAAE;gBACT,MAAM,WAAW,GAAG,IAAA,2CAA0B,GAAE,CAAC;gBACjD,MAAM,MAAM,GAAG,IAAI,gBAAS,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;gBAE9C,OAAO;oBACL,MAAM;oBACN,MAAM,EAAE,IAAA,gCAAoB,EAAC,MAAM,CAAC;iBACrC,CAAC;YACJ,CAAC,CAAC;iBACD,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;gBACxB,cAAc,GAAG,IAAI,CAAC;gBACtB,MAAM,KAAK,CAAC;YACd,CAAC,CAAC,CAAC;QACP,CAAC;QA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AAW,EACT,2GAA2G;IAC7G,QAAQ;IACR,QAAQ;CACT,CAAC,CAAC;AAEH,kBAAe,WAAW,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { default, register, activate } from './entry.js';
|
|
2
|
+
export type { OpenClawApi, OpenClawPluginEntry } from './entry.js';
|
|
1
3
|
export { createOpenClawPlugin } from './plugin.js';
|
|
2
4
|
export type { ShoppingList, OrderHistorySummary, OpenClawPlugin } from './plugin.js';
|
|
3
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACzD,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createOpenClawPlugin = void 0;
|
|
6
|
+
exports.createOpenClawPlugin = exports.activate = exports.register = exports.default = void 0;
|
|
7
|
+
var entry_js_1 = require("./entry.js");
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(entry_js_1).default; } });
|
|
9
|
+
Object.defineProperty(exports, "register", { enumerable: true, get: function () { return entry_js_1.register; } });
|
|
10
|
+
Object.defineProperty(exports, "activate", { enumerable: true, get: function () { return entry_js_1.activate; } });
|
|
4
11
|
var plugin_js_1 = require("./plugin.js");
|
|
5
12
|
Object.defineProperty(exports, "createOpenClawPlugin", { enumerable: true, get: function () { return plugin_js_1.createOpenClawPlugin; } });
|
|
6
13
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAyD;AAAhD,oHAAA,OAAO,OAAA;AAAE,oGAAA,QAAQ,OAAA;AAAE,oGAAA,QAAQ,OAAA;AAEpC,yCAAmD;AAA1C,iHAAA,oBAAoB,OAAA"}
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "@oda-agent/openclaw-plugin",
|
|
3
3
|
"name": "oda-shopping-assistant",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.7",
|
|
5
5
|
"description": "Oda grocery shopping assistant — safe cart planning, order history analysis, and delivery slot discovery.",
|
|
6
6
|
"author": "oda-agent-kit",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"configSchema": {
|
|
9
9
|
"type": "object",
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
"type": "string",
|
|
13
|
-
"description": "Your Oda.no account email address. Falls back to the ODA_EMAIL environment variable if omitted."
|
|
14
|
-
},
|
|
15
|
-
"password": {
|
|
16
|
-
"type": "string",
|
|
17
|
-
"description": "Your Oda.no account password. Falls back to the ODA_PASSWORD environment variable if omitted."
|
|
18
|
-
}
|
|
19
|
-
},
|
|
10
|
+
"description": "Set ODA_EMAIL and ODA_PASSWORD in the environment before launching OpenClaw. Reload the plugin after changing either value.",
|
|
11
|
+
"properties": {},
|
|
20
12
|
"required": []
|
|
21
13
|
},
|
|
22
14
|
"toolGroups": [
|