@opengate/openclaw 0.1.1 → 0.1.2

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 CHANGED
@@ -199,12 +199,14 @@ function formatEvent(event) {
199
199
  `New task assigned to you${taskRef}`,
200
200
  event.priority ? `Priority: ${event.priority}` : null,
201
201
  event.tags?.length ? `Tags: ${event.tags.join(", ")}` : null,
202
+ event.repo_url ? `Repo: ${event.repo_url}` : null,
202
203
  "",
203
204
  "Next steps:",
204
205
  "1. Use `get_task` to read the full task details",
205
- "2. Use `search_knowledge` to check for relevant project knowledge",
206
- "3. Use `claim_task` to start working on it",
207
- "4. Use `post_comment` to share your planned approach"
206
+ event.project_id ? "2. Use `get_workspace_info` to set up project workspace" : null,
207
+ "3. Use `search_knowledge` to check for relevant project knowledge",
208
+ "4. Use `claim_task` to start working on it",
209
+ "5. Use `post_comment` to share your planned approach"
208
210
  ].filter((line) => line !== null).join("\n");
209
211
  case "task.comment":
210
212
  return [
@@ -294,6 +296,22 @@ function formatNotificationSummary(notifications) {
294
296
  }
295
297
 
296
298
  // src/index.ts
299
+ var PKG_VERSION = "0.1.1";
300
+ async function checkForUpdate() {
301
+ try {
302
+ const res = await fetch("https://registry.npmjs.org/@opengate/openclaw/latest", {
303
+ headers: { "Accept": "application/json" },
304
+ signal: AbortSignal.timeout(5e3)
305
+ });
306
+ if (!res.ok) return;
307
+ const data = await res.json();
308
+ const latest = data.version;
309
+ if (latest && latest !== PKG_VERSION) {
310
+ console.log(`[opengate-bridge] Update available: ${PKG_VERSION} \u2192 ${latest}. Run: openclaw plugins update`);
311
+ }
312
+ } catch {
313
+ }
314
+ }
297
315
  var DEFAULT_POLL_INTERVAL_MS = 6e5;
298
316
  var SESSION_KEY = "opengate:inbox";
299
317
  function register(api, config) {
@@ -322,6 +340,8 @@ function register(api, config) {
322
340
  console.log(
323
341
  `[opengate-bridge] Starting in ${mode} mode (url: ${config.url})`
324
342
  );
343
+ checkForUpdate().catch(() => {
344
+ });
325
345
  if (mode === "websocket") {
326
346
  wsClient = new WsClient(
327
347
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengate/openclaw",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "OpenClaw plugin for OpenGate — real-time agent notifications via HTTP polling or WebSocket",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -61,6 +61,21 @@ Pay attention to:
61
61
  - **Context** — structured data from previous work or the task creator
62
62
  - **Dependencies** — tasks that must complete before this one
63
63
 
64
+ ### 2.5 Set Up Project Workspace
65
+
66
+ If the task's context contains `repo_url` (auto-enriched from project settings):
67
+
68
+ 1. Call `get_workspace_info(project_id)` for repo URL and suggested path
69
+ 2. If repo not yet cloned: `git clone <repo_url> <workspace_path>`
70
+ 3. If already cloned: `cd <workspace_path> && git fetch origin`
71
+ 4. Create feature branch: `git checkout -b task/<task_id_short> <default_branch>`
72
+
73
+ **Isolation rules:**
74
+ - Each project gets its own directory under `~/.opengate/workspaces/`
75
+ - NEVER work on files outside the active project's workspace
76
+ - NEVER mix changes from different projects
77
+ - If `repo_url` is null, the project is not code-related — skip this step
78
+
64
79
  ### 3. Fetch Project Knowledge
65
80
 
66
81
  **Always search the knowledge base before starting work.** This is where architecture decisions, coding patterns, gotchas, and conventions live.
@@ -108,6 +123,7 @@ Store useful artifacts like:
108
123
  - Key decisions and their rationale
109
124
  - Configuration values or environment details
110
125
  - Links to PRs, commits, or external resources
126
+ - Feature branch name (e.g. `task/<task_id_short>`) for workspace continuity
111
127
 
112
128
  ### 9. Complete the Task
113
129