@native-marketing/cli 0.1.1 → 0.3.0

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/README.md CHANGED
@@ -19,10 +19,33 @@ cf capabilities find '当前定位' --profile marketing --json
19
19
 
20
20
  Request the scopes needed for your authorized work. A project code or profile name does not grant access. Credentials are stored owner-only in `~/.config/content-factory-agent/` unless `CF_AGENT_CONFIG_DIR` is set. Never pass a token as a command argument. `auth import --token-file` accepts a protected local file; it does not exchange AgentStack API keys for Native OAuth.
21
21
 
22
- Help is layered: `help`, `help <group>`, `help all`. Discovery returns only currently visible capabilities; exact input schema is loaded on demand. `search` finds saved content. Supply exact business inputs through stdin or `--input-file`, keeping schema/view controls separate. Business writes require the existing request ID, concurrency checks and human authorization.
22
+ Help is layered: `help`, `help <group>`, `help all`. `capabilities find` uses AGENT_V3 bilingual action/object matching, returns only currently visible capabilities and reports scoped NO_MATCH explicitly. Small definitions include their schema and fingerprint; larger definitions are loaded on demand. `search` finds saved content. Supply exact business inputs through stdin or `--input-file`, keeping schema/view controls separate. Business writes require the existing request ID, concurrency checks and human authorization. Native Marketing exports content and records manual publication; it does not publish to external platforms.
23
23
 
24
24
  `--json` returns one JSON envelope on stdout; OAuth interaction prompts go to stderr. Errors carry code, outcome and safe recovery details. UNKNOWN means the original write may have happened: query its original read-only receipt before deciding what to do. The CLI never automatically replays an unknown write. A receipt is the original result; reread current state separately. A lost write permission may still allow authorized receipt recovery, but cannot authorize a new write.
25
25
 
26
26
  The package exports its existing programmatic CLI surface and an `/agent` entry. Use `@native-marketing/sdk` for direct client APIs, or `@native-marketing/sdk/http` for typed HTTP calls. Installing or asking for help does not start work or a Runtime.
27
27
 
28
+ ## Tenant application connections and event permissions
29
+
30
+ ```sh
31
+ cf auth login --resource https://ip.shipkitx.com/mcp/tenants/TEN-000001 \
32
+ --profile tenant --scope 'cf.context.read cf.knowledge.manage' --json
33
+ cf help event-exchanges --json
34
+ cf event-exchanges list --profile tenant --json
35
+ cf capabilities describe cf_configure_event_exchange --profile tenant --json
36
+ ```
37
+
38
+ Replace the Tenant code with your exact authorized Tenant. Current `permissions.manage` permission is required; login alone grants no application connection. Both `cf` and `cf-agent` support:
39
+
40
+ | Command | Effect |
41
+ | -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
42
+ | `event-exchanges list` | One bounded page of local connections and per-event grants |
43
+ | `event-exchanges configure --input-file registration.json` | Explicitly register/revoke one exact EventSDK type using requestId, expectedRevision and the current schema |
44
+ | `event-exchanges receipt --input-file original-request.json` | Read the original configure receipt, without replay |
45
+ | `event-exchanges outbox-list` | Bounded delivery/backlog/Worker observation |
46
+ | `event-exchanges outbox-recover --input-file original-delivery.json` | Explicitly recover one original delivery with expectedGeneration |
47
+ | `event-exchanges outbox-receipt --input-file original-request.json` | Read the original delivery recovery receipt |
48
+
49
+ Events are never selected automatically. Use only the precise public source/target Tenant refs and consumer agreed by both applications; local ACTIVE does not confirm peer authorization or business completion. For configure or recovery UNKNOWN, preserve the original request/resource/client and read its corresponding receipt. Never generate a replacement request ID or automatically repeat the write. These commands use the same native capabilities as MCP, keep authorization in the Native database and do not publish a separate authorization-change CloudEvent.
50
+
28
51
  The package's `release.json` identifies the source commit. Public availability does not change source licensing (UNLICENSED). Installation does not deploy or migrate a Native Marketing server.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@native-marketing/cli",
3
- "version": "0.1.1",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "engines": {
@@ -36,6 +36,6 @@
36
36
  }
37
37
  },
38
38
  "dependencies": {
39
- "@native-marketing/sdk": "0.1.1"
39
+ "@native-marketing/sdk": "0.3.0"
40
40
  }
41
41
  }
package/release.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
- "sourceCommit": "d5c864b995aaa63230e895df3d7cbe50d4947202",
2
+ "sourceCommit": "10c5dcfba354af4dfed4a2faaffbb6ff6b743c62",
3
3
  "workingTreeDirty": false,
4
- "version": "0.1.1",
5
- "openapiTypesSha256": "ab00b08c6f94b2b39d7f4010de2335d70be26e7987e9db6dc57fa308426aecc4",
4
+ "version": "0.3.0",
5
+ "openapiTypesSha256": "1a86e24ce9e458e945e4df5e9c7423c9bf4253ac24b3f627f67ba38c92856a38",
6
6
  "localBuild": true
7
7
  }