@bizagent/dsh 0.0.0-stage → 1.0.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/CHANGELOG.md +124 -0
- package/LICENSE +21 -0
- package/README.md +61 -2
- package/cordis.patch.yml +14 -0
- package/docs/README.md +23 -0
- package/docs/architecture.md +154 -0
- package/docs/concepts.md +192 -0
- package/docs/configuration.md +154 -0
- package/docs/quickstart.md +103 -0
- package/docs/quickstart.zh-CN.md +86 -0
- package/docs/tools.md +607 -0
- package/docs/user-guide.zh-CN.md +132 -0
- package/docs/verification.md +69 -0
- package/examples/README.md +64 -0
- package/examples/demo-runtime.mjs +71 -0
- package/examples/learning-lab.mjs +263 -0
- package/examples/scenarios.mjs +45 -0
- package/lib/agent-preset.d.ts +20 -0
- package/lib/agent-preset.js +46 -0
- package/lib/agent-session-address.d.ts +14 -0
- package/lib/agent-session-address.js +15 -0
- package/lib/agent-session-coordinator.d.ts +24 -0
- package/lib/agent-session-coordinator.js +101 -0
- package/lib/cli.d.ts +3 -0
- package/lib/cli.js +142 -0
- package/lib/client-types/agent-session-address.d.ts +13 -0
- package/lib/client-types/client/agent-mentions.d.ts +3 -0
- package/lib/client-types/client/api.d.ts +180 -0
- package/lib/client-types/client/components.d.ts +22 -0
- package/lib/client-types/client/controller.d.ts +23 -0
- package/lib/client-types/client/frame-participants.d.ts +5 -0
- package/lib/client-types/client/home-name.d.ts +9 -0
- package/lib/client-types/client/human-inbox.d.ts +8 -0
- package/lib/client-types/client/index.d.ts +13 -0
- package/lib/client-types/client/locales.d.ts +796 -0
- package/lib/client-types/client/markdown.d.ts +12 -0
- package/lib/client-types/client/project-artifact-link.d.ts +10 -0
- package/lib/client-types/client/project-outcome-review-inbox.d.ts +13 -0
- package/lib/client-types/client/projects.d.ts +11 -0
- package/lib/client-types/client/sample-guide.d.ts +9 -0
- package/lib/client-types/client/session-resource.d.ts +34 -0
- package/lib/client-types/client/session-surfaces.d.ts +24 -0
- package/lib/client-types/client/styles.d.ts +1 -0
- package/lib/client-types/config.d.ts +55 -0
- package/lib/client-types/cron.d.ts +8 -0
- package/lib/client-types/domain.d.ts +818 -0
- package/lib/client-types/frame-reference.d.ts +4 -0
- package/lib/client-types/home-directory.d.ts +5 -0
- package/lib/client-types/home-space.d.ts +49 -0
- package/lib/client-types/home-store.d.ts +125 -0
- package/lib/client-types/inbox-stalled-topic.d.ts +15 -0
- package/lib/client-types/inbox-wake-policy.d.ts +18 -0
- package/lib/client-types/known-format.d.ts +2 -0
- package/lib/client-types/learning-scheduler.d.ts +36 -0
- package/lib/client-types/learning-session-runner.d.ts +49 -0
- package/lib/client-types/learning-trigger.d.ts +17 -0
- package/lib/client-types/learning-usage.d.ts +17 -0
- package/lib/client-types/ledger.d.ts +190 -0
- package/lib/client-types/local-owner.d.ts +7 -0
- package/lib/client-types/message-source.d.ts +9 -0
- package/lib/client-types/organization-location.d.ts +19 -0
- package/lib/client-types/project-ledger.d.ts +182 -0
- package/lib/client-types/project-seat-context.d.ts +17 -0
- package/lib/client-types/safe-file.d.ts +23 -0
- package/lib/client-types/sample-organization.d.ts +9 -0
- package/lib/client-types/service.d.ts +596 -0
- package/lib/client-types/shared-knowledge.d.ts +116 -0
- package/lib/client-types/ui-contract.d.ts +276 -0
- package/lib/client-types/untrusted-text.d.ts +15 -0
- package/lib/client-types/work-ledger.d.ts +108 -0
- package/lib/client-types/work-output-eval.d.ts +15 -0
- package/lib/client-types/worklog-ledger.d.ts +88 -0
- package/lib/client-types/worklog-snapshot.d.ts +33 -0
- package/lib/client.js +5463 -0
- package/lib/config.d.ts +56 -0
- package/lib/config.js +115 -0
- package/lib/cron.d.ts +9 -0
- package/lib/cron.js +127 -0
- package/lib/domain.d.ts +819 -0
- package/lib/domain.js +662 -0
- package/lib/frame-admission.d.ts +6 -0
- package/lib/frame-admission.js +39 -0
- package/lib/frame-reference.d.ts +5 -0
- package/lib/frame-reference.js +12 -0
- package/lib/home-archive.d.ts +17 -0
- package/lib/home-archive.js +177 -0
- package/lib/home-directory.d.ts +6 -0
- package/lib/home-directory.js +38 -0
- package/lib/home-space.d.ts +50 -0
- package/lib/home-space.js +120 -0
- package/lib/home-store.d.ts +126 -0
- package/lib/home-store.js +837 -0
- package/lib/host.d.ts +22 -0
- package/lib/host.js +15 -0
- package/lib/human-inbox-transport.d.ts +23 -0
- package/lib/human-inbox-transport.js +105 -0
- package/lib/human-notification-runner.d.ts +83 -0
- package/lib/human-notification-runner.js +138 -0
- package/lib/human-notification-webhook.d.ts +18 -0
- package/lib/human-notification-webhook.js +102 -0
- package/lib/human-turn-completion.d.ts +61 -0
- package/lib/human-turn-completion.js +157 -0
- package/lib/inbox-return-notifier.d.ts +46 -0
- package/lib/inbox-return-notifier.js +279 -0
- package/lib/inbox-stalled-escalation-runner.d.ts +31 -0
- package/lib/inbox-stalled-escalation-runner.js +68 -0
- package/lib/inbox-stalled-topic.d.ts +16 -0
- package/lib/inbox-stalled-topic.js +44 -0
- package/lib/inbox-wake-policy.d.ts +19 -0
- package/lib/inbox-wake-policy.js +28 -0
- package/lib/inbox-wake-runner.d.ts +45 -0
- package/lib/inbox-wake-runner.js +481 -0
- package/lib/index.d.ts +29 -0
- package/lib/index.js +480 -0
- package/lib/known-format.d.ts +3 -0
- package/lib/known-format.js +8 -0
- package/lib/learning-scheduler.d.ts +37 -0
- package/lib/learning-scheduler.js +182 -0
- package/lib/learning-session-runner.d.ts +50 -0
- package/lib/learning-session-runner.js +435 -0
- package/lib/learning-trigger.d.ts +18 -0
- package/lib/learning-trigger.js +92 -0
- package/lib/learning-usage.d.ts +18 -0
- package/lib/learning-usage.js +49 -0
- package/lib/ledger.d.ts +191 -0
- package/lib/ledger.js +752 -0
- package/lib/local-human-host.d.ts +11 -0
- package/lib/local-human-host.js +191 -0
- package/lib/local-human-token.d.ts +9 -0
- package/lib/local-human-token.js +32 -0
- package/lib/local-owner.d.ts +8 -0
- package/lib/local-owner.js +26 -0
- package/lib/message-source.d.ts +10 -0
- package/lib/message-source.js +2 -0
- package/lib/organization-location.d.ts +20 -0
- package/lib/organization-location.js +80 -0
- package/lib/organization-workspace.d.ts +22 -0
- package/lib/organization-workspace.js +32 -0
- package/lib/project-ledger.d.ts +183 -0
- package/lib/project-ledger.js +189 -0
- package/lib/project-review-transport.d.ts +23 -0
- package/lib/project-review-transport.js +155 -0
- package/lib/project-seat-context.d.ts +18 -0
- package/lib/project-seat-context.js +34 -0
- package/lib/proposal-review-transport.d.ts +26 -0
- package/lib/proposal-review-transport.js +104 -0
- package/lib/route-guard.d.ts +31 -0
- package/lib/route-guard.js +80 -0
- package/lib/safe-file.d.ts +24 -0
- package/lib/safe-file.js +93 -0
- package/lib/sample-organization.d.ts +10 -0
- package/lib/sample-organization.js +46 -0
- package/lib/service.d.ts +597 -0
- package/lib/service.js +4076 -0
- package/lib/session-surface.d.ts +11 -0
- package/lib/session-surface.js +109 -0
- package/lib/shared-knowledge-review-transport.d.ts +28 -0
- package/lib/shared-knowledge-review-transport.js +85 -0
- package/lib/shared-knowledge.d.ts +117 -0
- package/lib/shared-knowledge.js +240 -0
- package/lib/tools.d.ts +7 -0
- package/lib/tools.js +955 -0
- package/lib/ui-contract.d.ts +277 -0
- package/lib/ui-contract.js +12 -0
- package/lib/ui-host.d.ts +24 -0
- package/lib/ui-host.js +471 -0
- package/lib/untrusted-text.d.ts +16 -0
- package/lib/untrusted-text.js +50 -0
- package/lib/work-ledger.d.ts +109 -0
- package/lib/work-ledger.js +107 -0
- package/lib/work-output-eval.d.ts +16 -0
- package/lib/work-output-eval.js +58 -0
- package/lib/work-runner.d.ts +47 -0
- package/lib/work-runner.js +352 -0
- package/lib/worklog-ledger.d.ts +89 -0
- package/lib/worklog-ledger.js +91 -0
- package/lib/worklog-snapshot.d.ts +34 -0
- package/lib/worklog-snapshot.js +100 -0
- package/lib/writer-guard.d.ts +11 -0
- package/lib/writer-guard.js +207 -0
- package/package.json +172 -4
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Configuration
|
|
2
|
+
|
|
3
|
+
New users can follow the [quick start](quickstart.md) without editing configuration.
|
|
4
|
+
This page is the reference for model connections, custom settings, and data locations.
|
|
5
|
+
|
|
6
|
+
## Model connection
|
|
7
|
+
|
|
8
|
+
For another OpenAI-compatible endpoint, use DSH's model settings or add provider rows to
|
|
9
|
+
`$DSH_HOME/profiles/web/cordis.patch.yml` (`DSH_HOME` defaults to `~/.dsh`):
|
|
10
|
+
|
|
11
|
+
```yaml
|
|
12
|
+
- id: llm-pi-ai
|
|
13
|
+
config:
|
|
14
|
+
providers:
|
|
15
|
+
my-model:
|
|
16
|
+
displayName: My model
|
|
17
|
+
apiKeyEnv: MY_MODEL_KEY
|
|
18
|
+
api: openai-completions
|
|
19
|
+
baseURL: http://127.0.0.1:8000/v1
|
|
20
|
+
models:
|
|
21
|
+
- id: your-model-id
|
|
22
|
+
name: My model
|
|
23
|
+
input: [text]
|
|
24
|
+
contextWindow: 131072
|
|
25
|
+
maxTokens: 16384
|
|
26
|
+
- id: agent-default-model
|
|
27
|
+
config:
|
|
28
|
+
provider: my-model
|
|
29
|
+
model: your-model-id
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Replace the URL, model ID, limits, and modalities with the endpoint's actual capabilities. Provide
|
|
33
|
+
`MY_MODEL_KEY` through DSH's credentials or the environment of a new DSH process. Selecting a
|
|
34
|
+
model in DSH can also save its default; check that default before starting automatic Work.
|
|
35
|
+
|
|
36
|
+
## Applying changes
|
|
37
|
+
|
|
38
|
+
Add only the options you change to the profile patch. For example:
|
|
39
|
+
|
|
40
|
+
```yaml
|
|
41
|
+
- id: bizagent
|
|
42
|
+
config:
|
|
43
|
+
timeZone: Europe/Berlin
|
|
44
|
+
owner: alice
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Rows merge over the bundle defaults. DSH Web profiles with HMR can apply profile changes and
|
|
48
|
+
reload changed plugins without restarting the main process. Disabled HMR, headless profiles, or
|
|
49
|
+
host dependency changes may require a planned restart. Let active work settle and inspect DSH's
|
|
50
|
+
reload result rather than assuming an edit has taken effect.
|
|
51
|
+
|
|
52
|
+
## Plugin options
|
|
53
|
+
|
|
54
|
+
| Option | Default | Meaning |
|
|
55
|
+
| --- | --- | --- |
|
|
56
|
+
| `homeRoot` | `$BIZAGENT_HOME`, else `~/BizAgent` | BizAgent's data folder: your personal Homes, the pointer to the active organization, and organizations under `orgs/`. Data from before 1.0 at `$DSH_HOME/bizagent` keeps being used until you move it. |
|
|
57
|
+
| `defaultHome` | `personal:default` | Your personal Home: it takes every session that no other Home claims, with or without an organization. |
|
|
58
|
+
| `autoCreateDefaultHome` | `true` | Create `defaultHome` in `homeRoot` on first start. |
|
|
59
|
+
| `defaultIdentity` | (none) | Text for the default Home's `identity.md` when BizAgent creates it. |
|
|
60
|
+
| `owner` | `$BIZAGENT_LOCAL_HUMAN_ID`, else your OS user name | The person who owns Homes BizAgent creates: the default Home, organizations, and Homes added in the panel. |
|
|
61
|
+
| `timeZone` | the host's time zone | IANA zone for cron schedules and daily limits, such as `Asia/Shanghai`. |
|
|
62
|
+
| `workspaceHomes` | `{}` | Extra directories mapped to Homes, as `{ "/path/to/repo": "role:engineering" }`. A session started in a mapped directory binds to that Home, and Work or Inbox wake-ups for that Home start there instead of in its own folder. |
|
|
63
|
+
| `identityMaxBytes` | `6144` | Most bytes of `identity.md` placed in a session's Home snapshot. |
|
|
64
|
+
| `indexMaxBytes` | `16384` | Most bytes of the asset index placed in a session's Home snapshot. |
|
|
65
|
+
| `learningCheckpointEnabled` | `true` | After a turn with an explicit correction, ask the agent once whether to keep it. |
|
|
66
|
+
| `learningSchedulerEnabled` | `false` | Run the `learningSchedules` below. Enable it on one DSH process per profile only. |
|
|
67
|
+
| `learningSchedules` | `[]` | Scheduled learning reviews; see below. |
|
|
68
|
+
|
|
69
|
+
### Scheduled learning reviews
|
|
70
|
+
|
|
71
|
+
A schedule starts a separate learning session in a Home when there is unreviewed material:
|
|
72
|
+
|
|
73
|
+
```yaml
|
|
74
|
+
- id: bizagent
|
|
75
|
+
config:
|
|
76
|
+
learningSchedulerEnabled: true
|
|
77
|
+
workspaceHomes:
|
|
78
|
+
/home/alice/work/analytics: role:analytics
|
|
79
|
+
learningSchedules:
|
|
80
|
+
- home: role:analytics
|
|
81
|
+
cron: '0 3 * * *' # every day at 03:00 in timeZone
|
|
82
|
+
model: deepseek-flash # add provider: <id> to pick a provider
|
|
83
|
+
dailyRuns: 1 # 1 to 4
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Each scheduled Home needs exactly one directory in `workspaceHomes`. The Home's page under
|
|
87
|
+
**Learning** then shows the schedule; its owner can pause it or change the time and daily runs
|
|
88
|
+
within the limits above.
|
|
89
|
+
|
|
90
|
+
## Environment variables
|
|
91
|
+
|
|
92
|
+
| Variable | Meaning |
|
|
93
|
+
| --- | --- |
|
|
94
|
+
| `BIZAGENT_HOME` | BizAgent's data folder when `homeRoot` is not set (default `~/BizAgent`). Isolated runs set it next to their own `DSH_HOME`. |
|
|
95
|
+
| `DSH_HOME` | DSH's data directory (default `~/.dsh`). Holds sessions and BizAgent's ledgers. |
|
|
96
|
+
| `BIZAGENT_LOCAL_HUMAN_ID` | Your user id for owning Homes and reviewing, if it should differ from your OS user name. Letters, digits, `.`, `_`, `-`. |
|
|
97
|
+
| `BIZAGENT_LOCAL_HUMAN` | Set to `off` to disable the local review routes (Project acceptance, proposal decisions, My Inbox). |
|
|
98
|
+
| `BIZAGENT_LOCAL_HUMAN_TOKEN_FILE` | A private (mode 0600) file holding a 32 to 512 character token. Scripts can then call the review routes with `Authorization: Bearer <token>`. Not needed in the browser. |
|
|
99
|
+
| `BIZAGENT_LOCAL_PLATFORM_ADMIN` | Set to `1` to let the local owner review platform-wide shared Knowledge. |
|
|
100
|
+
|
|
101
|
+
## Local review
|
|
102
|
+
|
|
103
|
+
The `bizagent-local-human` plugin row (inserted by BizAgent's bundle) serves the routes behind
|
|
104
|
+
**Accept result**, proposal decisions, and **My Inbox**. In the DSH web app the person signed in
|
|
105
|
+
to DSH is the reviewer, acting as `owner`, so nothing needs to be set up. These routes only run
|
|
106
|
+
when DSH Web listens on `127.0.0.1`, which is the DSH default.
|
|
107
|
+
|
|
108
|
+
To accept a Project from a script, set `BIZAGENT_LOCAL_HUMAN_TOKEN_FILE` before starting DSH and
|
|
109
|
+
send the token:
|
|
110
|
+
|
|
111
|
+
```sh
|
|
112
|
+
curl -X POST 'http://127.0.0.1:<port>/api/bizagent/project-review' \
|
|
113
|
+
-H "Authorization: Bearer $(cat ~/.config/bizagent/human.token)" \
|
|
114
|
+
-H "Origin: http://127.0.0.1:<port>" -H 'Content-Type: application/json' \
|
|
115
|
+
-d '{"projectId":"<id>","claimId":"<claim>","expectedRevision":3,"decision":"accept","reason":"Checked."}'
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
`GET /api/bizagent/project-review?projectId=<id>` with the same header returns the current claim
|
|
119
|
+
id and revision.
|
|
120
|
+
|
|
121
|
+
## Data and backups
|
|
122
|
+
|
|
123
|
+
- Home files live in `~/BizAgent` (or `homeRoot` / `BIZAGENT_HOME`): your outside personal Homes
|
|
124
|
+
under `homes/`, and organization Homes under `orgs/<id>/homes/`. A Home folder is also its
|
|
125
|
+
normal chat/worker directory, unless an explicit workspace mapping is configured.
|
|
126
|
+
- Bindings, proposals, Inbox, Work, Projects, and Worklogs live in DSH storage under `DSH_HOME`.
|
|
127
|
+
Original conversations are DSH sessions. Retained artifact snapshots belong to the Home's data space.
|
|
128
|
+
|
|
129
|
+
An organization directory alone is not a full backup. Preserve both the Home data and the matching
|
|
130
|
+
DSH data. The Home archive commands verify the file portion; from `packages/dsh`:
|
|
131
|
+
|
|
132
|
+
```sh
|
|
133
|
+
BIZAGENT_ORG_ROOT="$HOME/BizAgent/orgs/your-organization"
|
|
134
|
+
node lib/cli.js --root "$BIZAGENT_ORG_ROOT" archive export ./homes-backup
|
|
135
|
+
node lib/cli.js archive verify ./homes-backup
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
One organization is active at a time. There is no general organization-switching UI in this
|
|
139
|
+
version. Keep the current organization when trying practice Homes; do not delete its directory
|
|
140
|
+
or active pointer as an onboarding step. For a separate sandbox, use new, matching `DSH_HOME`
|
|
141
|
+
and `BIZAGENT_HOME` directories and leave the existing instance intact.
|
|
142
|
+
|
|
143
|
+
## Hosts with their own login
|
|
144
|
+
|
|
145
|
+
Embedding BizAgent in another host, with real user accounts or notification channels, uses the
|
|
146
|
+
building blocks exported from `@bizagent/dsh/host`: route handlers for Project review, proposal
|
|
147
|
+
review, shared Knowledge review, and the human Inbox, each taking your own authentication and
|
|
148
|
+
authorization callbacks; runners for notifications and stalled conversations; and Home archive
|
|
149
|
+
export, verify, and import. Disable the local review row when you mount your own:
|
|
150
|
+
|
|
151
|
+
```yaml
|
|
152
|
+
- id: bizagent-local-human
|
|
153
|
+
disabled: true
|
|
154
|
+
```
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Install and first success
|
|
2
|
+
|
|
3
|
+
[文档导航 / Documentation](README.md) · English | [中文](quickstart.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
Already using BizAgent? Skip to [Use BizAgent](#use-bizagent).
|
|
6
|
+
This page gets you to one saved rule; configuration and architecture can wait.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
Use Node.js 24+ or 22.19+ on the 22.x line, and pnpm 11. The commands below pin the DSH version
|
|
11
|
+
used in the manual browser acceptance run. Existing DSH users should first check `dsh --version`;
|
|
12
|
+
there is no need to replace a working installation just to try the plugin.
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
# Only if DSH / pnpm is not installed:
|
|
16
|
+
npm install --global @deepseek-ai/dsh@0.2.1-rc.2 pnpm@11
|
|
17
|
+
|
|
18
|
+
git clone https://github.com/phonism/bizagent.git
|
|
19
|
+
cd bizagent/packages/dsh
|
|
20
|
+
npm ci
|
|
21
|
+
npm run build
|
|
22
|
+
BIZAGENT_PACKAGE=$(npm pack --silent)
|
|
23
|
+
dsh plugin --profile web add "$PWD/$BIZAGENT_PACKAGE"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Installation, development dependencies, and CI use DSH `0.2.1-rc.2`, the same version used for
|
|
27
|
+
manual browser acceptance. See
|
|
28
|
+
[Verification](verification.md). Install into the same profile and `DSH_HOME` you intend to run.
|
|
29
|
+
|
|
30
|
+
## Connect a model and open DSH
|
|
31
|
+
|
|
32
|
+
For a new DSH process, configure the default DeepSeek provider before starting it:
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
export DEEPSEEK_API_KEY=sk-...
|
|
36
|
+
dsh --profile web
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
If DSH is already running, use its model/credential settings; exporting a variable in a new
|
|
40
|
+
terminal does not change the running process. The model must support tool calling and have room
|
|
41
|
+
for DSH's tools plus BizAgent's 59 tools. Other OpenAI-compatible endpoints are covered in
|
|
42
|
+
[Configuration](configuration.md#model-connection).
|
|
43
|
+
|
|
44
|
+
Open the login URL DSH prints in the terminal. **BizAgent organization** should appear in the
|
|
45
|
+
sidebar. If adding a plugin to a running profile, let DSH apply the profile change and refresh
|
|
46
|
+
the page. Consult the startup errors if the entry is missing; [troubleshooting](#troubleshooting)
|
|
47
|
+
does not require deleting existing data.
|
|
48
|
+
|
|
49
|
+
## Save your first rule
|
|
50
|
+
|
|
51
|
+
No organization is required:
|
|
52
|
+
|
|
53
|
+
1. Open **BizAgent organization → Learning → My personal Home → Chat**.
|
|
54
|
+
2. Send:
|
|
55
|
+
|
|
56
|
+
> Remember this practice-only rule in this Home: for the fictional onboarding orders, GMV
|
|
57
|
+
> includes paid orders and excludes cancelled and refunded orders. Save it, then tell me its
|
|
58
|
+
> asset ID and status. Do not apply it as a real business policy.
|
|
59
|
+
|
|
60
|
+
3. Click the Home in the conversation header, or return to **Learning**. Expand the saved asset
|
|
61
|
+
and check its body, source, and status. A success message in chat alone is not enough.
|
|
62
|
+
4. If it is `active`, start another DSH session **in that Home's workspace** and ask it to read
|
|
63
|
+
the saved rule. Check the new session's Home. Clicking **Chat** again reopens the same
|
|
64
|
+
Principal; it does not create a fresh session.
|
|
65
|
+
|
|
66
|
+
A `candidate` is saved for review but stays out of the default active index. Ask the agent to
|
|
67
|
+
review its evidence before publishing it. New sessions receive an asset index, not every full body.
|
|
68
|
+
|
|
69
|
+
## Use BizAgent
|
|
70
|
+
|
|
71
|
+
| What you want | Where to go | What to check |
|
|
72
|
+
| --- | --- | --- |
|
|
73
|
+
| Recall or inspect a rule | Home button → Learning | Body, evidence, active/candidate status |
|
|
74
|
+
| Borrow shared knowledge | Pick a shared Home from the composer's `@` suggestions | Frame bar; no independent worker is launched |
|
|
75
|
+
| Give another agent a deliverable | Ask for formal Work; open **Work & learning** | Assignee, work status, **View worker Session**, result |
|
|
76
|
+
| Accept a Project | Open the Project from **Work & learning**, or **Projects → My review queue** | Submitted claim, evidence, review reason, **Accept result** |
|
|
77
|
+
| Reply to an agent | **My Inbox** | Send a reply; check it returns to the originating session |
|
|
78
|
+
|
|
79
|
+
If no organization exists, **Create sample team** builds Sample Shop with a guide and an
|
|
80
|
+
`orders.csv`. Follow its four steps: teach the analyst a rule, ask the lead to create a Project,
|
|
81
|
+
open the Project's separate chat to dispatch Work, then inspect and accept its result. The sample
|
|
82
|
+
excludes cancelled/refunded orders and includes `shipped`: **120.50 + 45.25 + 200 + 34.75 = 400.50**.
|
|
83
|
+
You can then propose the rule to the Sample Shop Home and review it in Learning.
|
|
84
|
+
|
|
85
|
+
If an organization already exists, keep it. Open **Learning → Create Home** for practice agents,
|
|
86
|
+
or use your existing members. The [Chinese user guide](user-guide.zh-CN.md) supplies an isolated
|
|
87
|
+
four-order exercise with an expected total of **300**, including exact prompts and checkpoints.
|
|
88
|
+
To build your own organization on a fresh setup, choose the organization wizard instead of the sample.
|
|
89
|
+
|
|
90
|
+
## Troubleshooting
|
|
91
|
+
|
|
92
|
+
| Symptom | First check |
|
|
93
|
+
| --- | --- |
|
|
94
|
+
| `pnpm was not found` | Install pnpm 11 and check it is on the DSH process's PATH. |
|
|
95
|
+
| No BizAgent sidebar entry | Confirm profile / `DSH_HOME`; inspect activation errors and the [tested versions](verification.md). |
|
|
96
|
+
| Writer already reserved | Check which process owns the data. Use a separate `DSH_HOME` **and** `BIZAGENT_HOME` for a sandbox; do not stop an unknown process. |
|
|
97
|
+
| Rule is missing | Check the Home, filters, and `candidate` status; inspect the save tool result. |
|
|
98
|
+
| No independent worker | Inspect Work status and launch errors; automatic execution requires the same owner. A Frame does not dispatch Work. |
|
|
99
|
+
| No Project or acceptance button | Return to the lead/project session, or use **My review queue**; verify login, ownership, a pending claim, and a filled review reason. |
|
|
100
|
+
| Wrong example total | Sample Shop is 400.50; the four-order exercise is 300. They use different orders and rules. |
|
|
101
|
+
|
|
102
|
+
Next: [Concepts](concepts.md) for the ownership model; [Configuration](configuration.md) for
|
|
103
|
+
custom settings, data locations, and backup scope.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# 安装与首次成功
|
|
2
|
+
|
|
3
|
+
[文档导航](README.md) · 中文 | [English](quickstart.md)
|
|
4
|
+
|
|
5
|
+
已经能打开 BizAgent?直接进入[用户指南](user-guide.zh-CN.md)。这一页只带你完成安装并确认一条记忆真正保存成功。
|
|
6
|
+
|
|
7
|
+
## 安装
|
|
8
|
+
|
|
9
|
+
准备 Node.js 24 及以上,或 22.19 及以上的 22.x,以及 pnpm 11。
|
|
10
|
+
已有 DSH 时先运行 `dsh --version`,跳过全局安装命令,保留正在工作的环境。
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
# 仅在未安装 DSH / pnpm 时执行:
|
|
14
|
+
npm install --global @deepseek-ai/dsh@0.2.1-rc.2 pnpm@11
|
|
15
|
+
|
|
16
|
+
git clone https://github.com/phonism/bizagent.git
|
|
17
|
+
cd bizagent/packages/dsh
|
|
18
|
+
npm ci
|
|
19
|
+
npm run build
|
|
20
|
+
BIZAGENT_PACKAGE=$(npm pack --silent)
|
|
21
|
+
dsh plugin --profile web add "$PWD/$BIZAGENT_PACKAGE"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
安装、开发依赖和 CI 统一使用 DSH `0.2.1-rc.2`,与真实浏览器验收版本一致。
|
|
25
|
+
验证范围见[兼容与验证](verification.md)。
|
|
26
|
+
安装和启动需要使用同一个 profile、同一个 `DSH_HOME`;默认是 `web` 和 `~/.dsh`。
|
|
27
|
+
|
|
28
|
+
## 连接模型并启动
|
|
29
|
+
|
|
30
|
+
新启动的 DSH 默认使用 DeepSeek;先设置自己的 Key,再启动:
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
export DEEPSEEK_API_KEY=sk-...
|
|
34
|
+
dsh --profile web
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
已经运行的 DSH 请在模型/凭据设置中配置;在新终端 `export` 不会改变已有进程的环境。
|
|
38
|
+
模型需要支持工具调用,并能容纳 DSH 自带工具及 BizAgent 的 59 个工具。
|
|
39
|
+
其他 OpenAI 兼容模型的配置见[配置参考](configuration.md#model-connection)。
|
|
40
|
+
|
|
41
|
+
打开终端打印的登录链接。侧边栏应出现 **BizAgent 组织**。
|
|
42
|
+
给运行中的 profile 安装插件后,等待 DSH 应用变更并刷新页面;入口未出现时先看终端的插件加载错误。
|
|
43
|
+
|
|
44
|
+
## 第一次成功:存下一条规则
|
|
45
|
+
|
|
46
|
+
不用先建组织,也不用先理解所有概念。
|
|
47
|
+
|
|
48
|
+
1. 点 **BizAgent 组织 → 学习 → 我的个人 Home → 对话**。
|
|
49
|
+
2. 发送:
|
|
50
|
+
|
|
51
|
+
> 请在当前 Home 记住一条仅用于上手练习的规则:虚构订单的 GMV 只计 paid,排除 cancelled 和 refunded。
|
|
52
|
+
> 请实际保存,并告诉我资产编号和状态。不要把它当成真实业务规则。
|
|
53
|
+
|
|
54
|
+
3. 点会话顶部的 Home,回到「学习」,展开这条资产,检查**正文、证据来源和状态**。
|
|
55
|
+
Agent 口头说“记住了”不足以证明保存成功。
|
|
56
|
+
4. 若状态为 `active`,在**同一个 Home 工作区**中新建 DSH 会话,请它读取刚保存的规则。
|
|
57
|
+
核对新会话顶部的 Home;再点「对话」会重新打开原来的主会话,不算新会话验证。
|
|
58
|
+
|
|
59
|
+
**成功标志**:学习页有这条规则及来源,新会话实际读取了它。
|
|
60
|
+
若是 `candidate`,先让 Agent 核对证据再发布;候选内容不会进入默认生效索引。
|
|
61
|
+
新会话默认拿到索引,需要使用规则时再读取正文。
|
|
62
|
+
|
|
63
|
+
## 下一步怎么走
|
|
64
|
+
|
|
65
|
+
| 当前情况 | 建议下一步 |
|
|
66
|
+
| --- | --- |
|
|
67
|
+
| 只需要个人记忆 | 继续在自己的 Home 工作,按需查看、修订经验 |
|
|
68
|
+
| 首次设置,想体验团队 | 在「组织」点「创建示例团队」,跟随页面向导;内置订单结果为 400.50 元 |
|
|
69
|
+
| 已有组织,想试协作 | 按[用户指南](user-guide.zh-CN.md)创建两个练习 Home,完成 300 元订单练习 |
|
|
70
|
+
| 想直接建自己的团队 | 在首次组织向导填写使命、成员和共享能力,再从各 Home 的「对话」进入 |
|
|
71
|
+
|
|
72
|
+
已有组织时保留它,不必删除目录来重跑向导。
|
|
73
|
+
|
|
74
|
+
## 遇到问题时
|
|
75
|
+
|
|
76
|
+
| 现象 | 先检查 |
|
|
77
|
+
| --- | --- |
|
|
78
|
+
| 找不到 pnpm | pnpm 11 是否在 DSH 进程的 PATH 中 |
|
|
79
|
+
| 侧边栏没有 BizAgent | profile、`DSH_HOME`、终端加载错误,以及[已验证版本](verification.md) |
|
|
80
|
+
| 提示 writer 已占用 | 确认数据由哪个进程使用;独立试用同时设置新的 `DSH_HOME` 和 `BIZAGENT_HOME`,不要结束不明进程 |
|
|
81
|
+
| 看不到新记忆 | 是否选对 Home、是否被筛选隐藏、是否为 candidate;检查保存工具结果 |
|
|
82
|
+
| 分析师没有运行 | 「工作与经验」的 Work 状态与启动错误;自动执行要求双方 owner 相同;`@` 引用只提供上下文 |
|
|
83
|
+
| 找不到项目或验收按钮 | 返回负责人/项目会话,或从「我的审核待办」查找;确认已登录、具备权限、有待验收提交,并填了理由 |
|
|
84
|
+
| GMV 与教程不一致 | 内置示例为 400.50 元;独立的四笔订单练习为 300 元,不能混用口径 |
|
|
85
|
+
|
|
86
|
+
下一页:[用户指南](user-guide.zh-CN.md),按界面完成独立派工、查看交付和人工验收。
|