返回 DeepSeek-Reasonix
README.md
根目录 / sdk / go / examples / starterextension / README.md
1 # Starter Extension
2
3 This directory is a complete, installable Extension Protocol v1 plugin. Its
4 sidecar intercepts `input.receive`; text beginning with `starter: ` is passed to
5 the model with ` [rewritten by starter-extension]` appended.
6
7 The `.exe` suffix is intentional: using one fixed runtime path keeps the
8 manifest identical on every platform. Unix executes the binary normally, and
9 Windows requires the executable suffix.
10
11 ## Build and install
12
13 From this directory on macOS or Linux:
14
15 ```sh
16 go build -o bin/starter-extension.exe .
17 plugin_root="$(pwd -P)"
18 reasonix plugin install "$plugin_root" --dry-run
19 reasonix plugin install "$plugin_root" --link --replace --yes
20 ```
21
22 From PowerShell on Windows:
23
24 ```powershell
25 go build -o bin/starter-extension.exe .
26 $pluginRoot = (Resolve-Path .).Path
27 reasonix plugin install $pluginRoot --dry-run
28 reasonix plugin install $pluginRoot --link --replace --yes
29 ```
30
31 Review the `FULL TRUST` block in the dry-run output before installing. The
32 linked package trusts future changes in this directory and runs outside the
33 Reasonix sandbox.
34
35 Start a new session, or run `/reload` while the current session is idle. Send:
36
37 ```text
38 starter: explain what an Extension Protocol sidecar does
39 ```
40
41 The model receives the rewritten text. Edit `main.go`, rebuild the binary, run
42 `/reload`, and try again. Use `reasonix plugin doctor starter-extension` when
43 the manifest or binary fails validation.
44
45 ## Next steps
46
47 - [`../../README.md`](../../README.md) documents SDK callbacks and the
48 concurrency contract.
49 - [`../../../../docs/EXTENSIONS.md`](../../../../docs/EXTENSIONS.md) explains
50 reload, performance, cache behavior, compatibility, and trust.
51 - [`../../../../docs/PLUGIN_PACKAGES.md`](../../../../docs/PLUGIN_PACKAGES.md)
52 defines every Manifest v1 field.
53 - [`../../../../docs/EXTENSION_PROTOCOL.md`](../../../../docs/EXTENSION_PROTOCOL.md)
54 is the wire-protocol reference.
55 - [`../fullsidecar/main.go`](../fullsidecar/main.go) demonstrates providers,
56 structured UI, strategies, tools, content references, and shutdown.
57
58 For a distributable plugin, build binaries for the target platforms, keep the
59 manifest runtime path aligned with the packaged binary, and publish immutable
60 source or release artifacts for users to review before installation.
61
61 lines MARKDOWN