@aiti-ai/aiti-msg-share 0.0.0-stage → 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 aiti-ai contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,83 @@
1
- # Temporary Holding Version
1
+ # @aiti-ai/aiti-msg-share
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ > Share sessions, single messages, selections, files and images through pluggable targets — Gitee / image hosts / object storage / note archives — with secret redaction before upload and a QR code for the resulting URL
4
+
5
+ English · [简体中文](./docs/README.zh-CN.md)
6
+
7
+ ## About aiti
8
+
9
+ This package is part of the **aiti** ecosystem — a personal AI development workbench powered by [pi](https://pi.dev): **aiti-agent** (a self-hosted web workbench built on the open-source [pi-web](https://github.com/aiti-ai/pi-web)) plus debug injection into mainstream dev tools (aiti-devtools) and a rich extension system.
10
+
11
+ - Workbench (aiti-agent, built on pi-web): <https://github.com/aiti-ai/pi-web>
12
+ - Ecosystem monorepo: <https://github.com/aiti-ai/aiti-ai>
13
+ - Site: <https://aiti.pw>
14
+
15
+ Category: Content & sharing · Tags: `share` · `session` · `message` · `qrcode` · `redaction` · `sxcu` · `gitee` · `oss` · `joplin`
16
+
17
+ ## What it does
18
+
19
+ The workbench runs on your own machine, so a session URL is not reachable from outside. This extension uploads the content you pick through a **configurable share target** and gives you back a public URL — plus a QR code, clipboard copy and (where supported) the OS share sheet.
20
+
21
+ Sharing happens only when you say so, and the preview is always editable first.
22
+
23
+ ## Where you can share from
24
+
25
+ | Entry | What gets shared |
26
+ | --- | --- |
27
+ | Message hover actions | That single message |
28
+ | `msg-smart` selection popover (copy/quote/new-session row) | The selected text |
29
+ | `msg-smart` file card | The referenced file |
30
+ | Session row → `⋯` more menu | The whole session (markdown export) |
31
+ | File editor toolbar | The open file, or the current selection |
32
+ | Image preview window | The image |
33
+ | Command palette | Share center |
34
+
35
+ Every entry is a **host slot or extension topic** — this extension registers providers, other extensions render them. No hard-coded buttons.
36
+
37
+ ## Targets
38
+
39
+ 161 built-in targets come from [`@aiti-ai/content-share`](https://www.npmjs.com/package/@aiti-ai/content-share):
40
+
41
+ - **Publish** (public URL): Gitee Snippet, Lsky Pro, SM.MS, Pastebin, Rentry, paste.rs, Alibaba Cloud OSS, plus the full ShareX `.sxcu` catalog (catbox, imgbb, gofile, 0x0.st, …)
42
+ - **Archive** (deep link into your own notes): Joplin, Obsidian Local REST, memos, SiYuan, Flomo
43
+ - **Local** (no upload): a link to the session on your own workbench
44
+ - **Custom**: any HTTP endpoint via a `.sxcu` config or the template provider
45
+
46
+ The share dialog shows a **recommended set** by default; "Add more…" opens the full catalog with search, config-state badges (🟢 anonymous / 🟠 needs setup / ✓ configured / 💀 dead) and a one-click **Use** action.
47
+
48
+ ## Redaction
49
+
50
+ Before uploading, the text passes through [`@aiti-ai/secret-mask-core`](https://www.npmjs.com/package/@aiti-ai/secret-mask-core) — the same deterministic credential-detection engine that powers `pi-secret-mask`. Hits become `[REDACTED:RULE#hash]` placeholders, shown in the preview; the toggle re-renders the textarea immediately and restores the original when unchecked.
51
+
52
+ Binary content (images/files) is not scanned — the UI says so.
53
+
54
+ ## Page info stamp
55
+
56
+ A multi-select in the preview header prepends optional context to the shared text: **OS**, **browser**, **URL**, **session id**, **session name**. Handy when sharing a screenshot-free snippet with someone who needs to know which machine/browser/session it came from.
57
+
58
+ ## AI skills
59
+
60
+ Declared through `aiti-helper`'s standard `skills/` mechanism:
61
+
62
+ - `configure-target` — walk through obtaining and storing a token/key for a provider, then verify it
63
+ - `troubleshoot` — read share history, classify the failure, recommend a fix or another target
64
+ - `import-sxcu` — validate a ShareX config and register it as a target
65
+
66
+ ## Install
67
+
68
+ Bundled with **aiti-agent** (`@aiti-ai/pi-web`) — enable it from the in-app extension manager (ExtMan / App Center).
69
+
70
+ Standalone use requires the pi-web host; this package is not a general-purpose library (see [`@aiti-ai/content-share`](https://www.npmjs.com/package/@aiti-ai/content-share) for that).
71
+
72
+ ## Data & privacy
73
+
74
+ - Target credentials live in `<configDir>/targets.json` with mode `0600`; API responses are masked.
75
+ - Uploads go through the extension's own server route — the browser never holds a token and there are no CORS workarounds.
76
+ - Share history is stored in `<stateDir>/shares.json` (last 200 entries).
77
+ - File shares respect the host's allowed-roots policy (`ctx.core.fileAccess`).
78
+
79
+ ## License
80
+
81
+ MIT
82
+
83
+ [简体中文](./docs/README.zh-CN.md)