You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/run-sessions.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ A **session** is a runtime conversation started from a managed agent. Sessions a
12
12
agents session run "Summarize the repo structure" --agent assistant
13
13
```
14
14
15
-
`session run` creates a session, sends the prompt, and polls until the response completes. Pass `--stream` to receive live events over SSE. When only one agent is configured, `--agent` is auto-detected. For a Qoder agent with `delivery.qoder.type: forward`, Identity is optional: without one OpenCMA looks up the enabled Identity whose `external_id` is `__qca_admin_identity__` and sends its real `idn_...` id. Configure `defaults.session.qoder.identity_id` or pass `--identity-id` to select an existing business Identity. OpenCMA never creates or updates Identity resources implicitly.
15
+
`session run` creates a session, sends the prompt, and polls until the response completes. Pass `--stream` to receive live events over SSE. When only one agent is configured, `--agent` is auto-detected. A Qoder agent with `delivery.qoder.type: forward` requires a declared Identity selected through `defaults.identity`; `agents apply` creates or resolves it before sessions run. Pass `--identity-id`only to override the resolved default with an existing provider Identity for one invocation.
|`session events <session-id>`| List event history for a session. |
112
112
|`session delete <session-id>`| Delete a session. |
113
113
114
-
`session create` / `session run` accept `--agent`, `--identity-id`, `--environment`, `--vault`, `--memory-stores`, `--title`, and `--provider`. `--identity-id` selects an existing Qoder Forward Identity and overrides `defaults.session.qoder.identity_id`; when neither is provided, OpenCMA resolves the Identity whose `external_id` is `__qca_admin_identity__`. OpenCMA never creates or updates an Identity. `session run` and `session send` use polling by default and accept `--stream` to opt into SSE streaming, plus `--json` for JSON output. `session list` accepts `--agent` and `--all`; `session events` accepts `--limit`, `--all`, `--json`.
114
+
`session create` / `session run` accept `--agent`, `--identity-id`, `--environment`, `--vault`, `--memory-stores`, `--title`, and `--provider`. Forward Sessions resolve the declared logical `defaults.identity`; `--identity-id` overrides it with an existing provider id for one invocation. `session run` and `session send` use polling by default and accept `--stream` to opt into SSE streaming, plus `--json` for JSON output. `session list` accepts `--agent` and `--all`; `session events` accepts `--limit`, `--all`, `--json`.
| `providers` | map | yes | One block per provider; each holds its credentials. |
28
29
| `defaults.provider` | string | no | Default target for `plan`/`apply`. `all` targets every declared provider. |
29
-
| `defaults.session.qoder.identity_id` | string | no | Existing Qoder Forward Identity used as the local Session default. If omitted, OpenCMA looks up the enabled Identity whose `external_id` is `__qca_admin_identity__` and sends its real `idn_...` id. Never created or managed by `apply`. |
30
+
| `defaults.identity` | string | no | Logical name of the default declared Identity used by identity-aware resources and Forward Sessions. |
30
31
| `environments` | map | no | Cloud runtimes. |
31
32
| `tunnels` | map | no | Existing Qoder BYOC tunnels referenced by sessions; OpenCMA does not manage their lifecycle. |
| `files` | map | no | Local files uploaded to the Files API (Bailian, Volcengine Ark). |
37
+
| `identities` | map | no | Stable end-user identities. Provider support is capability-gated. |
36
38
| `agents` | map | no | The core managed-agent resources. |
39
+
| `channels` | map | no | External messaging channels bound to an Identity and Agent. Provider support is capability-gated. |
37
40
| `deployments` | map | no | Repeatable run units. |
38
41
39
42
Secrets use `${VAR_NAME}` and resolve from `.env` (walking up to the project root). `agents init` appends `agents.state.json` and `.env` to `.gitignore`.
40
43
44
+
## Identity
45
+
46
+
Managed identities use the integrating product's stable end-user id:
47
+
48
+
```yaml
49
+
identities:
50
+
chen:
51
+
provider: qoder
52
+
external_id: user_456
53
+
name: Chen
54
+
enabled: true
55
+
metadata:
56
+
department: engineering
57
+
```
58
+
59
+
`agents apply` creates or updates the remote Identity and stores its provider id in state. To reference an Identity managed outside this project, use the mutually exclusive external-reference form:
60
+
61
+
```yaml
62
+
identities:
63
+
chen:
64
+
provider: qoder
65
+
identity_id: idn_019eabc123
66
+
```
67
+
68
+
External references are verified and recorded but never updated or deleted.
name: Support DingTalk # optional; defaults to the YAML key
80
+
enabled: true # optional; defaults to true
81
+
credentials:
82
+
client_id: ${DINGTALK_CLIENT_ID}
83
+
client_secret: ${DINGTALK_CLIENT_SECRET}
84
+
options:
85
+
include_tool_calls: false
86
+
include_thinking: false
87
+
```
88
+
89
+
The declaration intentionally uses logical `agent` and `identity` references. Provider adapters resolve remote ids and map `type`, `credentials`, and `options` to provider wire fields. Qoder Channels require the referenced Agent to use Forward delivery. Credential-based Qoder support currently covers DingTalk, Feishu, and WeCom; personal WeChat remains QR-only.
90
+
41
91
## Provider configuration
42
92
43
93
Each provider under `providers` is validated by the provider's own config schema.
This example declares a Forward Identity, Forward Template, and DingTalk Channel without copying remote Qoder ids.
4
+
5
+
Set `QODER_PAT`, `SUPPORT_USER_ID`, `DINGTALK_CLIENT_ID`, and `DINGTALK_CLIENT_SECRET`, then run:
6
+
7
+
```bash
8
+
agents plan
9
+
agents apply
10
+
```
11
+
12
+
For Feishu, set `type: feishu` and use `app_id` / `app_secret`. For WeCom, set `type: wecom` and use `bot_id` / `secret`. Personal WeChat requires QR binding and is outside this credential-based workflow.
0 commit comments