@n8n-as-code/n8nac 2.0.0-next.64 → 2.0.0-next.72

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/index.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { accessSync, constants, mkdirSync } from "node:fs";
2
2
  import { join } from "node:path";
3
3
  import { N8N_FACADE_SETUP_MODES } from "@n8n-as-code/workflow-core";
4
+ import { createTelemetryClient } from "@n8n-as-code/telemetry";
4
5
  import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
5
6
  import { registerN8nAcCli } from "./src/cli.js";
6
7
  import { getWorkspaceDir, isWorkspaceInitialized, readWorkspaceBinding } from "./src/workspace.js";
@@ -98,6 +99,7 @@ const n8nAcPlugin = {
98
99
 
99
100
  register(api: OpenClawPluginApi) {
100
101
  const workspaceDir = getWorkspaceDir();
102
+ const telemetry = createTelemetryClient({ facade: "openclaw" });
101
103
 
102
104
  // Ensure the plugin workspace directory always exists.
103
105
  mkdirSync(workspaceDir, { recursive: true });
@@ -111,7 +113,7 @@ const n8nAcPlugin = {
111
113
 
112
114
  // -- CLI status ----------------------------------------------------------
113
115
  api.registerCli(
114
- ({ program }) => registerN8nAcCli({ program, workspaceDir }),
116
+ ({ program }) => registerN8nAcCli({ program, workspaceDir, telemetry }),
115
117
  { commands: ["n8nac:status"] },
116
118
  );
117
119
 
@@ -119,7 +121,9 @@ const n8nAcPlugin = {
119
121
  api.registerService({
120
122
  id: "n8nac-context",
121
123
  start: async () => {
122
- if (isWorkspaceInitialized(workspaceDir)) {
124
+ const initialized = isWorkspaceInitialized(workspaceDir);
125
+ telemetry.track("openclaw_service_started", { workspace_initialized: initialized });
126
+ if (initialized) {
123
127
  if (hasAgentsContext(workspaceDir)) {
124
128
  api.logger.info("[n8nac] Workspace ready — lightweight prompt context enabled; n8n skill available.");
125
129
  } else {
@@ -129,7 +133,9 @@ const n8nAcPlugin = {
129
133
  api.logger.info("[n8nac] Workspace not initialized. Use the n8n-manager and n8n-architect skills to configure it.");
130
134
  }
131
135
  },
132
- stop: async () => {},
136
+ stop: async () => {
137
+ await telemetry.flush(1000);
138
+ },
133
139
  });
134
140
  },
135
141
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@n8n-as-code/n8nac",
3
- "version": "2.0.0-next.64",
3
+ "version": "2.0.0-next.72",
4
4
  "description": "OpenClaw plugin for n8n-as-code — create and manage n8n workflows from OpenClaw",
5
5
  "keywords": [
6
6
  "n8n",
@@ -24,6 +24,7 @@
24
24
  "typecheck": "tsc --noEmit"
25
25
  },
26
26
  "dependencies": {
27
+ "@n8n-as-code/telemetry": "0.1.0",
27
28
  "@n8n-as-code/workflow-core": "0.1.0"
28
29
  },
29
30
  "devDependencies": {
@@ -11,44 +11,44 @@ Use this skill for workflow engineering. Use the `n8n-manager` skill for instanc
11
11
 
12
12
  - Treat the current context root as the directory containing `n8nac-config.json`, `AGENTS.md`, `.agents/skills`, and the workflow sync folder.
13
13
  - Generated context root hint: not embedded. Use the shell launch directory or the workspace path explicitly given by the user.
14
- - Before any n8n work, first run `npx --yes n8nac@next update-ai` from the context root, then read `AGENTS.md`. `update-ai` is designed to create or refresh the n8n-as-code block without destroying existing user or agent instructions.
14
+ - Before any n8n work, first run `npx --yes n8nac update-ai` from the context root, then read `AGENTS.md`. `update-ai` is designed to create or refresh the n8n-as-code block without destroying existing user or agent instructions.
15
15
  - Use the exact `n8nac command` and `n8n-manager command` listed in `AGENTS.md`. Those context-root commands override the portable examples in this skill.
16
- - Run every `npx --yes n8nac@next workspace ...`, `npx --yes n8nac@next list`, `pull`, `push`, `validate`, `test`, and `update-ai` command from the context root unless the user explicitly gives another context root.
16
+ - Run every `npx --yes n8nac workspace ...`, `npx --yes n8nac list`, `pull`, `push`, `validate`, `test`, and `update-ai` command from the context root unless the user explicitly gives another context root.
17
17
  - `AGENTS.md` is bootstrap context only, not a source of configuration truth.
18
18
  - Do not infer instance, project, sync folder, or workflow directory from `AGENTS.md`.
19
19
  - Before n8n work, resolve the effective context from the backend:
20
20
 
21
21
  ```bash
22
- npx --yes n8nac@next workspace status --json
22
+ npx --yes n8nac workspace status --json
23
23
  ```
24
24
 
25
25
  - Use the returned `workflowDir` for workflow files. Do not reconstruct it from `syncFolder`, `instanceIdentifier`, or `projectName`.
26
- - Never write `n8nac-config.json` by hand. Use `npx --yes n8nac@next workspace ...` commands.
26
+ - Never write `n8nac-config.json` by hand. Use `npx --yes n8nac workspace ...` commands.
27
27
 
28
28
  ## Bootstrap Order
29
29
 
30
30
  1. `cd` to the context root.
31
- 2. Run `npx --yes n8nac@next update-ai`, then read `AGENTS.md`.
32
- 3. Run `npx --yes n8nac@next workspace status --json`.
33
- 4. If the context root is not ready, inspect instances with `npx --yes @n8n-as-code/n8n-manager@next instances list`.
31
+ 2. Run `npx --yes n8nac update-ai`, then read `AGENTS.md`.
32
+ 3. Run `npx --yes n8nac workspace status --json`.
33
+ 4. If the context root is not ready, inspect instances with `npx --yes @n8n-as-code/n8n-manager instances list`.
34
34
  5. Reuse an existing instance when suitable.
35
35
  6. If no suitable instance exists, stop and ask the user whether they want to reuse/configure an existing instance, create a managed local n8n instance, or connect an existing/remote n8n instance. Do not create infrastructure by default. If the user chooses a managed local instance, ask separately whether they want a public tunnel.
36
36
  7. Ask for host/API key only for an explicitly remote or existing n8n instance.
37
37
  8. Configure context-root overrides with:
38
38
 
39
39
  ```bash
40
- npx --yes n8nac@next workspace pin-instance --instance-id <id>
41
- npx --yes n8nac@next workspace set-sync-folder workflows
42
- npx --yes n8nac@next workspace set-project --project-id <id> --project-name <name>
40
+ npx --yes n8nac workspace pin-instance --instance-id <id>
41
+ npx --yes n8nac workspace set-sync-folder workflows
42
+ npx --yes n8nac workspace set-project --project-id <id> --project-name <name>
43
43
  ```
44
44
 
45
45
  For self-hosted n8n instances where the projects API is unavailable or returns 401/403, do not keep retrying project discovery. Use the standard personal project override unless the user gave another project:
46
46
 
47
47
  ```bash
48
- npx --yes n8nac@next workspace set-project --project-id personal --project-name Personal
48
+ npx --yes n8nac workspace set-project --project-id personal --project-name Personal
49
49
  ```
50
50
 
51
- 9. Run `npx --yes n8nac@next update-ai` after changing context-root overrides when the facade does not do it automatically.
51
+ 9. Run `npx --yes n8nac update-ai` after changing context-root overrides when the facade does not do it automatically.
52
52
 
53
53
  ## Sync Discipline
54
54
 
@@ -57,13 +57,13 @@ npx --yes n8nac@next workspace set-project --project-id personal --project-name
57
57
  - Use `list` to inspect workflow IDs, file paths, and sync status.
58
58
 
59
59
  ```bash
60
- npx --yes n8nac@next list
61
- npx --yes n8nac@next pull <workflowId>
62
- npx --yes n8nac@next push <path-to-workflow.workflow.ts> --verify
60
+ npx --yes n8nac list
61
+ npx --yes n8nac pull <workflowId>
62
+ npx --yes n8nac push <path-to-workflow.workflow.ts> --verify
63
63
  ```
64
64
 
65
65
  - `push` requires the full workflow file path, either absolute or context-root-relative. Do not pass a bare filename.
66
- - For a new workflow, create the file inside the `workflowDir` returned by `workspace status --json`, then confirm it with `npx --yes n8nac@next list --local`.
66
+ - For a new workflow, create the file inside the `workflowDir` returned by `workspace status --json`, then confirm it with `npx --yes n8nac list --local`.
67
67
  - If push/pull reports a conflict, use explicit resolution commands. Do not overwrite remote changes blindly.
68
68
  - `pull` and conflict resolution operate on a single workflow ID.
69
69
  - `list` is the lightweight command that covers all workflows at once.
@@ -74,8 +74,8 @@ npx --yes n8nac@next push <path-to-workflow.workflow.ts> --verify
74
74
  If push or pull reports a conflict, stop and inspect the conflict. Use explicit resolution commands only after choosing the intended direction:
75
75
 
76
76
  ```bash
77
- npx --yes n8nac@next resolve <workflowId> --mode keep-current
78
- npx --yes n8nac@next resolve <workflowId> --mode keep-incoming
77
+ npx --yes n8nac resolve <workflowId> --mode keep-current
78
+ npx --yes n8nac resolve <workflowId> --mode keep-incoming
79
79
  ```
80
80
 
81
81
  - `keep-current` force-pushes the local version.
@@ -87,10 +87,10 @@ npx --yes n8nac@next resolve <workflowId> --mode keep-incoming
87
87
  Never guess n8n node parameters.
88
88
 
89
89
  ```bash
90
- npx --yes n8nac@next skills examples search "<workflow pattern>"
91
- npx --yes n8nac@next skills search "<node or capability>"
92
- npx --yes n8nac@next skills node-info <nodeName>
93
- npx --yes n8nac@next skills validate <workflow.workflow.ts>
90
+ npx --yes n8nac skills examples search "<workflow pattern>"
91
+ npx --yes n8nac skills search "<node or capability>"
92
+ npx --yes n8nac skills node-info <nodeName>
93
+ npx --yes n8nac skills validate <workflow.workflow.ts>
94
94
  ```
95
95
 
96
96
  - Use exact node `type` and valid `typeVersion` values from `node-info`.
@@ -105,19 +105,19 @@ npx --yes n8nac@next skills validate <workflow.workflow.ts>
105
105
  Use these commands instead of guessing:
106
106
 
107
107
  ```bash
108
- npx --yes n8nac@next skills search "<node or capability>"
109
- npx --yes n8nac@next skills node-info <nodeName>
110
- npx --yes n8nac@next skills node-schema <nodeName>
111
- npx --yes n8nac@next skills docs "<topic>"
112
- npx --yes n8nac@next skills guides "<topic>"
113
- npx --yes n8nac@next skills examples search "<workflow pattern>"
114
- npx --yes n8nac@next skills examples info <id>
115
- npx --yes n8nac@next skills examples download <id>
108
+ npx --yes n8nac skills search "<node or capability>"
109
+ npx --yes n8nac skills node-info <nodeName>
110
+ npx --yes n8nac skills node-schema <nodeName>
111
+ npx --yes n8nac skills docs "<topic>"
112
+ npx --yes n8nac skills guides "<topic>"
113
+ npx --yes n8nac skills examples search "<workflow pattern>"
114
+ npx --yes n8nac skills examples info <id>
115
+ npx --yes n8nac skills examples download <id>
116
116
  ```
117
117
 
118
118
  - Start with `examples search` when the user asks for a common automation pattern.
119
119
  - Use examples to learn patterns, not as authority over current node schemas.
120
- - If a command or flag is unfamiliar, run `npx --yes n8nac@next <subcommand> --help`; do not invent flags.
120
+ - If a command or flag is unfamiliar, run `npx --yes n8nac <subcommand> --help`; do not invent flags.
121
121
 
122
122
  ## Workflow Authoring Rules
123
123
 
@@ -257,15 +257,15 @@ defineRouting() {
257
257
  After pushing:
258
258
 
259
259
  ```bash
260
- npx --yes n8nac@next verify <workflowId>
261
- npx --yes n8nac@next test-plan <workflowId> --json
260
+ npx --yes n8nac verify <workflowId>
261
+ npx --yes n8nac test-plan <workflowId> --json
262
262
  ```
263
263
 
264
264
  For webhook, chat, or form workflows, prefer the production test sequence:
265
265
 
266
266
  ```bash
267
- npx --yes n8nac@next workflow activate <workflowId>
268
- npx --yes n8nac@next test <workflowId> --prod
267
+ npx --yes n8nac workflow activate <workflowId>
268
+ npx --yes n8nac test <workflowId> --prod
269
269
  ```
270
270
 
271
271
  - Class A configuration gaps require user/config action, not workflow rewrites.
@@ -285,7 +285,7 @@ Run it whenever one of these is true:
285
285
  - the user asks to show, open, present, display, or give the URL/link for a workflow.
286
286
 
287
287
  ```bash
288
- npx --yes @n8n-as-code/n8n-manager@next presentWorkflowResult --workflow-id <workflowId> --workspace-root <contextRoot>
288
+ npx --yes @n8n-as-code/n8n-manager presentWorkflowResult --workflow-id <workflowId> --workspace-root <contextRoot>
289
289
  ```
290
290
 
291
291
  Rules:
@@ -293,7 +293,7 @@ Rules:
293
293
  - Do not manually construct n8n workflow URLs.
294
294
  - Do not return an internal local n8n URL when a presentation URL is available.
295
295
  - Use the `url` returned by `presentWorkflowResult` as the user-facing URL.
296
- - If you do not know the workflow ID, run `npx --yes n8nac@next list` first and select the matching workflow.
296
+ - If you do not know the workflow ID, run `npx --yes n8nac list` first and select the matching workflow.
297
297
  - If `presentWorkflowResult` fails, report the backend diagnostic and then provide the best direct n8n URL only as a fallback.
298
298
  - Do this before the final response when the task created, changed, pushed, ran, or explicitly asks to show a workflow.
299
299
 
@@ -307,18 +307,18 @@ For webhook, chat, or form workflows:
307
307
  4. Test with `--prod` by default.
308
308
 
309
309
  ```bash
310
- npx --yes n8nac@next push <path-to-workflow.workflow.ts> --verify
311
- npx --yes n8nac@next test-plan <workflowId> --json
312
- npx --yes n8nac@next workflow activate <workflowId>
313
- npx --yes n8nac@next test <workflowId> --prod
310
+ npx --yes n8nac push <path-to-workflow.workflow.ts> --verify
311
+ npx --yes n8nac test-plan <workflowId> --json
312
+ npx --yes n8nac workflow activate <workflowId>
313
+ npx --yes n8nac test <workflowId> --prod
314
314
  ```
315
315
 
316
- Use bare `npx --yes n8nac@next test <workflowId>` only when a test URL was intentionally armed in the n8n editor.
316
+ Use bare `npx --yes n8nac test <workflowId>` only when a test URL was intentionally armed in the n8n editor.
317
317
 
318
318
  For GET/HEAD webhooks that read from `$json.query`, prefer:
319
319
 
320
320
  ```bash
321
- npx --yes n8nac@next test <workflowId> --query '{"key":"value"}' --prod
321
+ npx --yes n8nac test <workflowId> --query '{"key":"value"}' --prod
322
322
  ```
323
323
 
324
324
  ## Execution Debugging
@@ -326,8 +326,8 @@ npx --yes n8nac@next test <workflowId> --query '{"key":"value"}' --prod
326
326
  If a webhook returns success but the workflow behavior is wrong, inspect executions instead of guessing:
327
327
 
328
328
  ```bash
329
- npx --yes n8nac@next execution list --workflow-id <workflowId> --limit 5 --json
330
- npx --yes n8nac@next execution get <executionId> --include-data --json
329
+ npx --yes n8nac execution list --workflow-id <workflowId> --limit 5 --json
330
+ npx --yes n8nac execution get <executionId> --include-data --json
331
331
  ```
332
332
 
333
333
  - A successful HTTP trigger only means n8n accepted the request.
@@ -339,11 +339,11 @@ npx --yes n8nac@next execution get <executionId> --include-data --json
339
339
  When a workflow is blocked by missing credentials, resolve the credential gap without rewriting unrelated workflow logic.
340
340
 
341
341
  ```bash
342
- npx --yes n8nac@next workflow credential-required <workflowId> --json
343
- npx --yes n8nac@next credential schema <type>
344
- npx --yes n8nac@next credential list --json
345
- npx --yes n8nac@next credential create --type <type> --name <name> --file cred.json --json
346
- npx --yes n8nac@next workflow activate <workflowId>
342
+ npx --yes n8nac workflow credential-required <workflowId> --json
343
+ npx --yes n8nac credential schema <type>
344
+ npx --yes n8nac credential list --json
345
+ npx --yes n8nac credential create --type <type> --name <name> --file cred.json --json
346
+ npx --yes n8nac workflow activate <workflowId>
347
347
  ```
348
348
 
349
349
  - `workflow credential-required` exits non-zero when at least one credential is missing. Treat that as a signal to act, not as a workflow-code failure.
@@ -10,11 +10,11 @@ Use this skill for global n8n instance management. `n8n-manager` is the source o
10
10
  ## Responsibility Boundary
11
11
 
12
12
  - Generated context root hint: not embedded. Use the shell launch directory or the workspace path explicitly given by the user.
13
- - If `n8nac` is available, first run `npx --yes n8nac@next update-ai` from the context root, then read `AGENTS.md`. `update-ai` is designed to create or refresh the n8n-as-code block without destroying existing user or agent instructions.
13
+ - If `n8nac` is available, first run `npx --yes n8nac update-ai` from the context root, then read `AGENTS.md`. `update-ai` is designed to create or refresh the n8n-as-code block without destroying existing user or agent instructions.
14
14
  - Use the exact `n8n-manager command` and `n8nac command` listed in `AGENTS.md` when present. Those context-root commands override the portable examples in this skill.
15
- - Use `npx --yes @n8n-as-code/n8n-manager@next` for global instance, auth, runtime, tunnel, project-default, credential, and workflow-presentation operations.
16
- - Use `npx --yes n8nac@next workspace ...` only for context-root overrides such as pinned instance, sync folder, and project override.
17
- - Use `npx --yes n8nac@next` workflow commands only after the effective context is ready.
15
+ - Use `npx --yes @n8n-as-code/n8n-manager` for global instance, auth, runtime, tunnel, project-default, credential, and workflow-presentation operations.
16
+ - Use `npx --yes n8nac workspace ...` only for context-root overrides such as pinned instance, sync folder, and project override.
17
+ - Use `npx --yes n8nac` workflow commands only after the effective context is ready.
18
18
  - Never edit `n8nac-config.json`, `~/.n8n-manager`, or n8n-manager secret files by hand.
19
19
 
20
20
  ## Core Commands
@@ -22,9 +22,9 @@ Use this skill for global n8n instance management. `n8n-manager` is the source o
22
22
  Inspect existing instances before changing state:
23
23
 
24
24
  ```bash
25
- npx --yes @n8n-as-code/n8n-manager@next instances list
26
- npx --yes @n8n-as-code/n8n-manager@next instances --help
27
- npx --yes @n8n-as-code/n8n-manager@next config get
25
+ npx --yes @n8n-as-code/n8n-manager instances list
26
+ npx --yes @n8n-as-code/n8n-manager instances --help
27
+ npx --yes @n8n-as-code/n8n-manager config get
28
28
  ```
29
29
 
30
30
  Do not invent n8n-manager subcommands. In particular, `instances create` and `--type local` are not valid. Use `instances add --mode ...` exactly as documented by `instances --help`.
@@ -53,56 +53,56 @@ Only run these commands after the user has explicitly chosen the corresponding o
53
53
  Managed local Docker without public tunnel:
54
54
 
55
55
  ```bash
56
- npx --yes @n8n-as-code/n8n-manager@next instances add --name <name> --mode managed-local-docker
57
- npx --yes @n8n-as-code/n8n-manager@next instances setup <id-or-name>
58
- npx --yes @n8n-as-code/n8n-manager@next instances start <id-or-name>
59
- npx --yes @n8n-as-code/n8n-manager@next instances status <id-or-name>
56
+ npx --yes @n8n-as-code/n8n-manager instances add --name <name> --mode managed-local-docker
57
+ npx --yes @n8n-as-code/n8n-manager instances setup <id-or-name>
58
+ npx --yes @n8n-as-code/n8n-manager instances start <id-or-name>
59
+ npx --yes @n8n-as-code/n8n-manager instances status <id-or-name>
60
60
  ```
61
61
 
62
62
  Managed local Docker with public tunnel:
63
63
 
64
64
  ```bash
65
- npx --yes @n8n-as-code/n8n-manager@next instances add --name <name> --mode managed-local-docker --tunnel
66
- npx --yes @n8n-as-code/n8n-manager@next instances setup <id-or-name> --tunnel
67
- npx --yes @n8n-as-code/n8n-manager@next instances start <id-or-name>
68
- npx --yes @n8n-as-code/n8n-manager@next instances tunnel status <id-or-name>
65
+ npx --yes @n8n-as-code/n8n-manager instances add --name <name> --mode managed-local-docker --tunnel
66
+ npx --yes @n8n-as-code/n8n-manager instances setup <id-or-name> --tunnel
67
+ npx --yes @n8n-as-code/n8n-manager instances start <id-or-name>
68
+ npx --yes @n8n-as-code/n8n-manager instances tunnel status <id-or-name>
69
69
  ```
70
70
 
71
71
  Remote or existing instances require user-provided credentials. Prefer stdin for API keys:
72
72
 
73
73
  ```bash
74
- npx --yes @n8n-as-code/n8n-manager@next auth set --url <url> --api-key-stdin --name <name>
75
- npx --yes @n8n-as-code/n8n-manager@next auth test --instance <id-or-name>
74
+ npx --yes @n8n-as-code/n8n-manager auth set --url <url> --api-key-stdin --name <name>
75
+ npx --yes @n8n-as-code/n8n-manager auth test --instance <id-or-name>
76
76
  ```
77
77
 
78
78
  Project selection is instance-level unless the context root explicitly needs a workspace override:
79
79
 
80
80
  ```bash
81
- npx --yes @n8n-as-code/n8n-manager@next projects list --instance <id-or-name>
82
- npx --yes @n8n-as-code/n8n-manager@next projects select <project-id-or-name> --instance <id-or-name>
81
+ npx --yes @n8n-as-code/n8n-manager projects list --instance <id-or-name>
82
+ npx --yes @n8n-as-code/n8n-manager projects select <project-id-or-name> --instance <id-or-name>
83
83
  ```
84
84
 
85
85
  Self-hosted n8n may not expose the projects API or may return 401/403. In that case, do not retry project discovery. Use the n8n-architect workspace override path with the standard personal project unless the user gave another project:
86
86
 
87
87
  ```bash
88
- npx --yes n8nac@next workspace set-project --project-id personal --project-name Personal
88
+ npx --yes n8nac workspace set-project --project-id personal --project-name Personal
89
89
  ```
90
90
 
91
91
  Runtime and tunnel operations are per instance:
92
92
 
93
93
  ```bash
94
- npx --yes @n8n-as-code/n8n-manager@next instances start <id-or-name>
95
- npx --yes @n8n-as-code/n8n-manager@next instances stop <id-or-name>
96
- npx --yes @n8n-as-code/n8n-manager@next instances restart <id-or-name>
97
- npx --yes @n8n-as-code/n8n-manager@next instances tunnel status <id-or-name>
98
- npx --yes @n8n-as-code/n8n-manager@next instances tunnel start <id-or-name>
99
- npx --yes @n8n-as-code/n8n-manager@next instances tunnel refresh <id-or-name>
94
+ npx --yes @n8n-as-code/n8n-manager instances start <id-or-name>
95
+ npx --yes @n8n-as-code/n8n-manager instances stop <id-or-name>
96
+ npx --yes @n8n-as-code/n8n-manager instances restart <id-or-name>
97
+ npx --yes @n8n-as-code/n8n-manager instances tunnel status <id-or-name>
98
+ npx --yes @n8n-as-code/n8n-manager instances tunnel start <id-or-name>
99
+ npx --yes @n8n-as-code/n8n-manager instances tunnel refresh <id-or-name>
100
100
  ```
101
101
 
102
102
  Present workflow results after creating, modifying, pushing, or running a workflow:
103
103
 
104
104
  ```bash
105
- npx --yes @n8n-as-code/n8n-manager@next presentWorkflowResult --workflow-id <workflowId> --workspace-root <contextRoot>
105
+ npx --yes @n8n-as-code/n8n-manager presentWorkflowResult --workflow-id <workflowId> --workspace-root <contextRoot>
106
106
  ```
107
107
 
108
108
  ## Guardrails
package/src/cli.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
2
+ import type { TelemetryClient } from "@n8n-as-code/telemetry";
2
3
  import { isWorkspaceInitialized } from "./workspace.js";
3
4
 
4
5
  type CliProgram = Parameters<Parameters<OpenClawPluginApi["registerCli"]>[0]>[0]["program"];
@@ -6,14 +7,23 @@ type CliProgram = Parameters<Parameters<OpenClawPluginApi["registerCli"]>[0]>[0]
6
7
  type CliOpts = {
7
8
  program: CliProgram;
8
9
  workspaceDir: string;
10
+ telemetry: TelemetryClient;
9
11
  };
10
12
 
11
- export function registerN8nAcCli({ program, workspaceDir }: CliOpts): void {
13
+ export function registerN8nAcCli({ program, workspaceDir, telemetry }: CliOpts): void {
12
14
  program
13
15
  .command("n8nac:status")
14
16
  .description("Show n8n-as-code workspace status")
15
17
  .action(() => {
18
+ const startedAt = Date.now();
16
19
  const initialized = isWorkspaceInitialized(workspaceDir);
20
+ telemetry.track("openclaw_cli_command_completed", {
21
+ command: "n8nac:status",
22
+ outcome: "success",
23
+ duration_ms: Date.now() - startedAt,
24
+ workspace_initialized: initialized,
25
+ });
26
+ telemetry.trackActive({ activation_source_event: "openclaw_cli_command_completed" });
17
27
  console.log(`\nn8n-as-code workspace: ${workspaceDir}`);
18
28
  console.log(`Status: ${initialized ? "✓ Initialized" : "✗ Not initialized"}`);
19
29
  if (!initialized) {