@ljwei-stak/dsh-model-route-bot 0.66.4 → 0.67.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/.dsh-plugin/bot-product.mjs +81 -5
- package/.dsh-plugin/client.js +17490 -1791
- package/README.i18n.yaml +4 -4
- package/README.md +409 -364
- package/README.zh.md +409 -364
- package/apps/integration-client/README.md +31 -7
- package/apps/integration-client/api.mjs +14 -3
- package/apps/integration-client/binding-editor.jsx +308 -109
- package/apps/integration-client/binding-model.mjs +262 -0
- package/apps/integration-client/binding.css +144 -0
- package/apps/integration-client/bot-model-status.mjs +18 -0
- package/apps/integration-client/bot-profile-identity.jsx +197 -0
- package/apps/integration-client/bot-profile.css +57 -0
- package/apps/integration-client/bot-profile.mjs +97 -0
- package/apps/integration-client/bot-settings-dialog.css +18 -0
- package/apps/integration-client/bot-settings-dialog.jsx +111 -0
- package/apps/integration-client/bot-thread-header-bridge.css +20 -0
- package/apps/integration-client/bot-thread-header.jsx +278 -0
- package/apps/integration-client/bot-threads-panel.jsx +378 -0
- package/apps/integration-client/bot-threads.css +169 -0
- package/apps/integration-client/chat-design.mjs +250 -0
- package/apps/integration-client/chat-ui.jsx +175 -0
- package/apps/integration-client/chat.css +477 -0
- package/apps/integration-client/composer-draft-binding.mjs +50 -0
- package/apps/integration-client/composer-draft-bound.jsx +14 -0
- package/apps/integration-client/composer-draft-host.jsx +142 -0
- package/apps/integration-client/composer-draft-session.jsx +287 -0
- package/apps/integration-client/composer-draft-witness.mjs +115 -0
- package/apps/integration-client/composer-draft.css +4 -0
- package/apps/integration-client/composer-draft.mjs +322 -0
- package/apps/integration-client/contact-attention.jsx +54 -0
- package/apps/integration-client/data-panel.jsx +439 -0
- package/apps/integration-client/data.css +69 -0
- package/apps/integration-client/desktop-bridge.mjs +1 -0
- package/apps/integration-client/desktop-http-socket.mjs +49 -0
- package/apps/integration-client/desktop-keyboard.mjs +32 -0
- package/apps/integration-client/desktop-pane.jsx +99 -30
- package/apps/integration-client/desktop-stream.mjs +13 -3
- package/apps/integration-client/desktop-tools.jsx +19 -0
- package/apps/integration-client/desktop-touch.mjs +27 -0
- package/apps/integration-client/desktop.css +41 -0
- package/apps/integration-client/independent-chat-controller.mjs +224 -0
- package/apps/integration-client/independent-chat-entry.jsx +61 -0
- package/apps/integration-client/independent-chat-navigation.mjs +21 -0
- package/apps/integration-client/independent-chat-page.jsx +148 -0
- package/apps/integration-client/independent-chat-rich.jsx +64 -0
- package/apps/integration-client/independent-chat-rich.mjs +30 -0
- package/apps/integration-client/independent-chat.css +73 -0
- package/apps/integration-client/index.jsx +24 -16
- package/apps/integration-client/library-panel.jsx +4 -1
- package/apps/integration-client/licenses/jsqr-1.4.0-LICENSE.txt +202 -0
- package/apps/integration-client/main-route-editor.jsx +94 -0
- package/apps/integration-client/main-route-model.mjs +100 -0
- package/apps/integration-client/model-picker.css +37 -0
- package/apps/integration-client/model-picker.jsx +83 -0
- package/apps/integration-client/native-activity.css +141 -0
- package/apps/integration-client/native-activity.jsx +276 -0
- package/apps/integration-client/native-activity.mjs +384 -0
- package/apps/integration-client/notifications-panel.jsx +186 -0
- package/apps/integration-client/notifications.css +126 -0
- package/apps/integration-client/pairing-qr.jsx +79 -0
- package/apps/integration-client/panels.jsx +126 -115
- package/apps/integration-client/product-slots.jsx +46 -0
- package/apps/integration-client/routine-recorder.mjs +23 -2
- package/apps/integration-client/secure-pairing.jsx +84 -0
- package/apps/integration-client/tasks-panel.jsx +32 -10
- package/apps/integration-client/ui-icons.jsx +17 -0
- package/apps/integration-client/usage-explorer.jsx +43 -0
- package/apps/integration-client/usage-report.mjs +71 -0
- package/apps/integration-client/usage.css +34 -0
- package/apps/integration-client/web-panel-model.mjs +140 -0
- package/apps/integration-client/web-panel-page.jsx +221 -0
- package/apps/integration-client/web-panel-pins-live.jsx +28 -0
- package/apps/integration-client/web-panel.css +139 -0
- package/apps/integration-client/workspace-model.mjs +67 -0
- package/apps/integration-client/workspace-navigation.mjs +56 -0
- package/apps/integration-client/workspace-ui.jsx +173 -0
- package/apps/integration-client/workspace.css +332 -0
- package/modules/bot-runtime/SOURCE.json +176 -50
- package/modules/bot-runtime/index.mjs +169 -13
- package/modules/bot-runtime/product-overlay/OVERLAY.json +128 -2
- package/modules/bot-runtime/product-overlay/base/src/client/header.js +244 -0
- package/modules/bot-runtime/product-overlay/base/src/client/learning-card.js +202 -0
- package/modules/bot-runtime/product-overlay/base/src/client/model-menu.js +371 -0
- package/modules/bot-runtime/product-overlay/base/src/client/secret-card.js +363 -0
- package/modules/bot-runtime/product-overlay/base/src/client/sources.js +68 -0
- package/modules/bot-runtime/product-overlay/base/src/client/turn-error.js +260 -0
- package/modules/bot-runtime/product-overlay/base/src/host/channel.js +647 -0
- package/modules/bot-runtime/product-overlay/base/src/host/memory.js +2050 -0
- package/modules/bot-runtime/product-overlay/base/src/host/models.js +314 -0
- package/modules/bot-runtime/product-overlay/base/src/host/parts.js +1473 -0
- package/modules/bot-runtime/product-overlay/base/src/host/privacy.js +368 -0
- package/modules/bot-runtime/product-overlay/base/src/host/roster.js +776 -0
- package/modules/bot-runtime/product-overlay/base/src/host/store.js +512 -0
- package/modules/bot-runtime/product-overlay/base/src/host/usage.js +653 -0
- package/modules/bot-runtime/product-overlay/patches/src/client/details-drawer.js.patch +48 -2
- package/modules/bot-runtime/product-overlay/patches/src/client/header.js.patch +41 -0
- package/modules/bot-runtime/product-overlay/patches/src/client/index.js.patch +33 -1
- package/modules/bot-runtime/product-overlay/patches/src/client/learning-card.js.patch +20 -0
- package/modules/bot-runtime/product-overlay/patches/src/client/model-menu.js.patch +24 -0
- package/modules/bot-runtime/product-overlay/patches/src/client/secret-card.js.patch +25 -0
- package/modules/bot-runtime/product-overlay/patches/src/client/sources.js.patch +52 -0
- package/modules/bot-runtime/product-overlay/patches/src/client/turn-error.js.patch +23 -0
- package/modules/bot-runtime/product-overlay/patches/src/host/channel.js.patch +46 -0
- package/modules/bot-runtime/product-overlay/patches/src/host/memory.js.patch +11 -0
- package/modules/bot-runtime/product-overlay/patches/src/host/models.js.patch +16 -0
- package/modules/bot-runtime/product-overlay/patches/src/host/parts.js.patch +95 -0
- package/modules/bot-runtime/product-overlay/patches/src/host/privacy.js.patch +11 -0
- package/modules/bot-runtime/product-overlay/patches/src/host/roster.js.patch +145 -0
- package/modules/bot-runtime/product-overlay/patches/src/host/store.js.patch +68 -0
- package/modules/bot-runtime/product-overlay/patches/src/host/usage.js.patch +11 -0
- package/modules/bot-runtime/read-model.mjs +19 -4
- package/modules/bot-runtime/vendor/ds-bot/src/client/details-drawer.js +15 -5
- package/modules/bot-runtime/vendor/ds-bot/src/client/header.js +9 -2
- package/modules/bot-runtime/vendor/ds-bot/src/client/index.js +9 -2
- package/modules/bot-runtime/vendor/ds-bot/src/client/learning-card.js +2 -2
- package/modules/bot-runtime/vendor/ds-bot/src/client/model-menu.js +5 -3
- package/modules/bot-runtime/vendor/ds-bot/src/client/secret-card.js +3 -3
- package/modules/bot-runtime/vendor/ds-bot/src/client/sources.js +25 -2
- package/modules/bot-runtime/vendor/ds-bot/src/client/turn-error.js +3 -2
- package/modules/bot-runtime/vendor/ds-bot/src/host/channel.js +14 -2
- package/modules/bot-runtime/vendor/ds-bot/src/host/memory.js +1 -1
- package/modules/bot-runtime/vendor/ds-bot/src/host/models.js +7 -0
- package/modules/bot-runtime/vendor/ds-bot/src/host/parts.js +26 -9
- package/modules/bot-runtime/vendor/ds-bot/src/host/privacy.js +1 -1
- package/modules/bot-runtime/vendor/ds-bot/src/host/roster.js +112 -3
- package/modules/bot-runtime/vendor/ds-bot/src/host/store.js +34 -1
- package/modules/bot-runtime/vendor/ds-bot/src/host/usage.js +1 -1
- package/modules/independent-runtime/index.mjs +152 -62
- package/modules/independent-runtime/remote-tools.mjs +8 -5
- package/modules/openmaus-protocol/NOTICE +10 -0
- package/modules/openmaus-protocol/README.md +15 -0
- package/modules/openmaus-protocol/SOURCE.json +68 -0
- package/modules/openmaus-protocol/dist/protocol.mjs +1203 -0
- package/modules/openmaus-protocol/index.mjs +1 -0
- package/modules/openmaus-protocol/transport.mjs +77 -0
- package/modules/openmaus-protocol/vendor/LICENSE +202 -0
- package/modules/openmaus-protocol/vendor/companion/src/e2e/README.md +405 -0
- package/modules/openmaus-protocol/vendor/companion/src/e2e/credentials.ts +128 -0
- package/modules/openmaus-protocol/vendor/companion/src/e2e/descriptor.ts +84 -0
- package/modules/openmaus-protocol/vendor/companion/src/e2e/noise.ts +456 -0
- package/modules/openmaus-protocol/vendor/companion/src/e2e/phone.ts +104 -0
- package/modules/openmaus-protocol/vendor/companion/src/e2e/session.ts +417 -0
- package/modules/openmaus-protocol/vendor/companion/src/e2e/vectors/v1.json +2565 -0
- package/modules/openmaus-protocol/vendor/companion/src/e2e/vectors/v1.sha256 +1 -0
- package/modules/openmaus-protocol/vendor/companion/src/e2e/yamux.ts +335 -0
- package/package.json +18 -6
- package/packages/bot-acp/README.md +156 -0
- package/packages/bot-acp/licenses/LICENSE-OpenMausBot +202 -0
- package/packages/bot-acp/licenses/NOTICE.md +27 -0
- package/packages/bot-acp/src/acp-adapter.mjs +795 -0
- package/packages/bot-acp/src/acp-host.mjs +148 -0
- package/packages/bot-acp/src/native-launch.mjs +121 -0
- package/packages/bot-acp/src/permission-policy.mjs +283 -0
- package/packages/bot-acp/src/rpc-codec.mjs +265 -0
- package/packages/bot-acp/src/session-core.mjs +581 -0
- package/packages/bot-acp/src/stdio-rpc.mjs +329 -0
- package/packages/bot-engines/README.md +281 -0
- package/packages/bot-engines/licenses/LICENSE-OpenMausBot +202 -0
- package/packages/bot-engines/licenses/NOTICE.md +32 -0
- package/packages/bot-engines/src/claude-engine.mjs +772 -0
- package/packages/bot-engines/src/claude-llm-adapter.mjs +797 -0
- package/packages/bot-engines/src/claude-llm-turn.mjs +292 -0
- package/packages/bot-engines/src/claude-permission-broker.mjs +130 -0
- package/packages/bot-engines/src/claude-permission-proxy.mjs +87 -0
- package/packages/bot-engines/src/claude-protocol.mjs +177 -0
- package/packages/bot-engines/src/driver-catalog.mjs +334 -0
- package/packages/bot-engines/src/host-loop-request.mjs +95 -0
- package/packages/bot-engines/src/host-registrations.mjs +105 -0
- package/packages/capability-broker/src/cli-bootstrap.mjs +86 -16
- package/packages/capability-broker/src/cli-bridge-response.mjs +80 -0
- package/packages/capability-broker/src/cli-stdio-bridge.mjs +21 -8
- package/packages/cli-runtime/src/codex-session-core.mjs +4 -0
- package/packages/cli-runtime/src/native-cli-output.mjs +57 -0
- package/packages/cli-runtime/src/native-peer.ps1 +51 -3
- package/packages/cli-runtime/src/native-process.mjs +77 -14
- package/packages/model-router-plugin/package.json +1 -1
- package/packages/orchestration/src/binding-product.mjs +19 -0
- package/packages/orchestration/src/bot-data-actions.mjs +45 -0
- package/packages/orchestration/src/bot-data-chart.mjs +109 -0
- package/packages/orchestration/src/bot-data-context.mjs +44 -0
- package/packages/orchestration/src/bot-data-engine.mjs +809 -0
- package/packages/orchestration/src/bot-data-io.mjs +186 -0
- package/packages/orchestration/src/bot-data-sql.mjs +195 -0
- package/packages/orchestration/src/bot-data-surface.mjs +144 -0
- package/packages/orchestration/src/bot-data-tools.mjs +68 -0
- package/packages/orchestration/src/bot-data-worker.mjs +228 -0
- package/packages/orchestration/src/bot-independent-execution.mjs +195 -0
- package/packages/orchestration/src/bot-independent-stream.mjs +74 -0
- package/packages/orchestration/src/bot-loop.mjs +152 -19
- package/packages/orchestration/src/bot-notifications.mjs +159 -0
- package/packages/orchestration/src/bot-policy.mjs +43 -4
- package/packages/orchestration/src/bot-profile.mjs +171 -0
- package/packages/orchestration/src/bot-routine.mjs +4 -4
- package/packages/orchestration/src/bot-runtime-assembly.mjs +255 -8
- package/packages/orchestration/src/bot-runtime-switch.mjs +13 -2
- package/packages/orchestration/src/bot-serving.mjs +164 -0
- package/packages/orchestration/src/bot-session-store.mjs +105 -9
- package/packages/orchestration/src/bot-settings.mjs +50 -11
- package/packages/orchestration/src/bot-thread-admission.mjs +84 -0
- package/packages/orchestration/src/bot-thread-host.mjs +187 -0
- package/packages/orchestration/src/bot-threads.mjs +790 -0
- package/packages/orchestration/src/data-product-access.mjs +37 -0
- package/packages/orchestration/src/data-tool-contract.mjs +291 -0
- package/packages/orchestration/src/desktop-http-carrier.mjs +120 -0
- package/packages/orchestration/src/desktop-proxy.mjs +311 -0
- package/packages/orchestration/src/desktop-sessions.mjs +43 -9
- package/packages/orchestration/src/ds-lifecycle.mjs +31 -4
- package/packages/orchestration/src/grant-refresh-queue.mjs +17 -0
- package/packages/orchestration/src/independent-chat-page.mjs +39 -0
- package/packages/orchestration/src/independent-chat-service.mjs +308 -0
- package/packages/orchestration/src/independent-context-state.mjs +44 -0
- package/packages/orchestration/src/independent-message-wire.mjs +84 -0
- package/packages/orchestration/src/independent-tool-catalog.mjs +175 -0
- package/packages/orchestration/src/independent-tool-families.mjs +73 -0
- package/packages/orchestration/src/independent-tool-host.mjs +344 -0
- package/packages/orchestration/src/main-bot-grant.mjs +15 -0
- package/packages/orchestration/src/main-model-routes.mjs +208 -0
- package/packages/orchestration/src/model-accounting.mjs +99 -35
- package/packages/orchestration/src/model-auxiliary-dispatch.mjs +187 -0
- package/packages/orchestration/src/model-loop-frame.mjs +179 -0
- package/packages/orchestration/src/model-prepared-generation.mjs +175 -0
- package/packages/orchestration/src/model-request-bounds.mjs +111 -0
- package/packages/orchestration/src/native-activity-contract.mjs +491 -0
- package/packages/orchestration/src/native-activity-service.mjs +102 -0
- package/packages/orchestration/src/native-activity-store.mjs +249 -0
- package/packages/orchestration/src/native-conversation-tools.mjs +78 -0
- package/packages/orchestration/src/native-data-tools.mjs +100 -0
- package/packages/orchestration/src/native-remote-actions.mjs +742 -0
- package/packages/orchestration/src/native-team-tools.mjs +73 -0
- package/packages/orchestration/src/pairing-invite.mjs +37 -0
- package/packages/orchestration/src/product-composition.mjs +1559 -1001
- package/packages/orchestration/src/remote-machines.mjs +82 -14
- package/packages/orchestration/src/routine-execution.mjs +5 -3
- package/packages/orchestration/src/routine-session.mjs +19 -13
- package/packages/orchestration/src/secure-pairing-host.mjs +112 -0
- package/packages/orchestration/src/task-journal.mjs +29 -0
- package/packages/orchestration/src/task-product.mjs +17 -0
- package/packages/orchestration/src/team-assignment-store.mjs +120 -0
- package/packages/orchestration/src/team-bridge.mjs +282 -0
- package/packages/orchestration/src/team-scheduler.mjs +83 -0
- package/packages/orchestration/src/team-sdk-tools.mjs +84 -0
- package/packages/orchestration/src/team-tool-contract.mjs +284 -0
- package/packages/orchestration/src/ui-host-namespace.mjs +23 -0
- package/packages/orchestration/src/web-panel-actions.mjs +103 -0
- package/packages/orchestration/src/web-panel-framing.mjs +227 -0
- package/packages/orchestration/src/web-panel-store.mjs +206 -0
- package/remote-computer-agent/README.md +39 -29
- package/remote-computer-agent/build.mjs +3 -0
- package/remote-computer-agent/dist/OPENMAUSBOT_LICENSE +202 -0
- package/remote-computer-agent/dist/OPENMAUSBOT_NOTICE +10 -0
- package/remote-computer-agent/dist/OPENMAUSBOT_SOURCE.json +68 -0
- package/remote-computer-agent/dist/cli-stdio-bridge.mjs +215 -25
- package/remote-computer-agent/dist/cli-stdio-bridge.mjs.map +4 -4
- package/remote-computer-agent/dist/cli.mjs +1688 -168
- package/remote-computer-agent/dist/cli.mjs.map +4 -4
- package/remote-computer-agent/dist/index.mjs +1579 -122
- package/remote-computer-agent/dist/index.mjs.map +4 -4
- package/remote-computer-agent/dist/native-peer.ps1 +51 -3
- package/remote-computer-agent/package-lock.json +308 -2
- package/remote-computer-agent/package.json +2 -1
- package/remote-computer-agent/pair-device.ps1 +20 -0
- package/remote-computer-agent/setup.ps1 +38 -16
- package/remote-computer-agent/src/cli.ts +24 -3
- package/remote-computer-agent/src/desktop-session.ts +11 -3
- package/remote-computer-agent/src/e2e-server.ts +81 -0
- package/remote-computer-agent/src/pairing-page.ts +35 -0
- package/remote-computer-agent/src/protocol.ts +25 -25
- package/remote-computer-agent/src/secure-pairing.ts +105 -0
- package/remote-computer-agent/src/store.ts +20 -5
- package/remote-computer-agent/src/transport.ts +39 -15
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
// The Host's own directory of pinned web panels: the few pages an owner keeps
|
|
2
|
+
// one click away (a local dashboard, a CI board). It is a Host component table
|
|
3
|
+
// next to the other SQLite authorities, never a browser-local preference, so a
|
|
4
|
+
// pinned page survives a restart and every client sees the same list.
|
|
5
|
+
//
|
|
6
|
+
// Two rules shape this file:
|
|
7
|
+
//
|
|
8
|
+
// 1. Identity is never taken from the browser. A panel is minted by the Host,
|
|
9
|
+
// the caller's owner class comes from the authenticated product channel, and
|
|
10
|
+
// the only origin the store is told about is the one the client reports as
|
|
11
|
+
// its own embedding origin — used to refuse framing a page that would run
|
|
12
|
+
// with the client's own access, never to identify anybody.
|
|
13
|
+
// 2. A write is only a write once it has been read back. Every mutation runs in
|
|
14
|
+
// one immediate transaction guarded by a revision, and the row is re-read
|
|
15
|
+
// after the commit: a store that reports a change it did not make is worse
|
|
16
|
+
// than one that refuses.
|
|
17
|
+
|
|
18
|
+
import { dirname, resolve } from 'node:path'
|
|
19
|
+
import { mkdirSync } from 'node:fs'
|
|
20
|
+
|
|
21
|
+
export const MAX_WEB_PANELS = 6
|
|
22
|
+
export const MAX_WEB_PANEL_NAME_CHARS = 40
|
|
23
|
+
export const MAX_WEB_PANEL_NAME_BYTES = 120
|
|
24
|
+
export const MAX_WEB_PANEL_URL_BYTES = 2048
|
|
25
|
+
export const WEB_PANEL_LIMITS = Object.freeze({
|
|
26
|
+
maxPanels: MAX_WEB_PANELS,
|
|
27
|
+
maxNameChars: MAX_WEB_PANEL_NAME_CHARS,
|
|
28
|
+
maxNameBytes: MAX_WEB_PANEL_NAME_BYTES,
|
|
29
|
+
maxUrlBytes: MAX_WEB_PANEL_URL_BYTES,
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
const fail = code => { throw Object.assign(new Error(code), { code }) }
|
|
33
|
+
const plain = value => value && typeof value === 'object' && !Array.isArray(value) && Object.getPrototypeOf(value) === Object.prototype
|
|
34
|
+
// A panel name is a label in a list: control characters would break the row, and
|
|
35
|
+
// they carry no meaning a person can read.
|
|
36
|
+
const CONTROL = /[\u0000-\u001f\u007f-\u009f]/
|
|
37
|
+
const ID = /^panel-[1-9][0-9]{0,9}$/
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The closed input check. `embeddingOrigin` is the origin the client framed this
|
|
41
|
+
* page from; a page on that very origin is refused because the frame keeps its
|
|
42
|
+
* page's own origin and would run with the client's access.
|
|
43
|
+
*/
|
|
44
|
+
export function validateWebPanelInput(input, embeddingOrigin = '') {
|
|
45
|
+
if (!plain(input) || Object.keys(input).some(key => !['name', 'url'].includes(key))) fail('WEB_PANEL_INPUT')
|
|
46
|
+
if (typeof input.name !== 'string' || typeof input.url !== 'string') fail('WEB_PANEL_INPUT')
|
|
47
|
+
const name = input.name.trim()
|
|
48
|
+
if (!name || name.length > MAX_WEB_PANEL_NAME_CHARS || Buffer.byteLength(name, 'utf8') > MAX_WEB_PANEL_NAME_BYTES || CONTROL.test(name)) fail('WEB_PANEL_NAME')
|
|
49
|
+
const raw = input.url.trim()
|
|
50
|
+
if (!raw || Buffer.byteLength(raw, 'utf8') > MAX_WEB_PANEL_URL_BYTES) fail('WEB_PANEL_URL')
|
|
51
|
+
let url
|
|
52
|
+
try { url = new URL(raw) } catch { fail('WEB_PANEL_URL') }
|
|
53
|
+
// Only plain web pages. `javascript:`, `data:`, `file:` and every other scheme
|
|
54
|
+
// is refused here rather than being handed to a browser to interpret.
|
|
55
|
+
if (url.protocol !== 'http:' && url.protocol !== 'https:') fail('WEB_PANEL_URL')
|
|
56
|
+
if (url.username || url.password || !url.hostname) fail('WEB_PANEL_URL')
|
|
57
|
+
if (embeddingOrigin && sameOrigin(url, embeddingOrigin)) fail('WEB_PANEL_SELF_URL')
|
|
58
|
+
return Object.freeze({ name, url: url.href })
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function sameOrigin(url, origin) {
|
|
62
|
+
try { return new URL(origin).origin === url.origin } catch { return false }
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** What a client may see. The stored URL is the owner's own input; nothing here adds a path or a secret. */
|
|
66
|
+
export const publicWebPanel = panel => Object.freeze({
|
|
67
|
+
id: panel.id, name: panel.name, url: panel.url, host: hostOf(panel.url), position: panel.position,
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
export function hostOf(url) {
|
|
71
|
+
try { return new URL(url).host } catch { return '' }
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** The same URL without its fragment: a fragment is for the browser, never for a probe. */
|
|
75
|
+
export function probeUrlOf(url) {
|
|
76
|
+
try { const parsed = new URL(url); parsed.hash = ''; return parsed.href } catch { return '' }
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** A URL safe to write to a log or a share card: origin and path, never the query. */
|
|
80
|
+
export function redactWebPanelUrl(url) {
|
|
81
|
+
try { const parsed = new URL(url); return `${parsed.origin}${parsed.pathname}` } catch { return '(unreadable url)' }
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function openWebPanelStore({ Database, file, now = Date.now }) {
|
|
85
|
+
if (typeof Database !== 'function') throw new TypeError('WEB_PANEL_DATABASE_REQUIRED')
|
|
86
|
+
if (typeof file !== 'string' || !file) throw new TypeError('WEB_PANEL_FILE_REQUIRED')
|
|
87
|
+
if (file !== ':memory:') { file = resolve(file); mkdirSync(dirname(file), { recursive: true }) }
|
|
88
|
+
const db = new Database(file)
|
|
89
|
+
db.pragma('busy_timeout=5000')
|
|
90
|
+
db.pragma('journal_mode=WAL')
|
|
91
|
+
db.pragma('synchronous=FULL')
|
|
92
|
+
db.exec(`CREATE TABLE IF NOT EXISTS web_panel_component(component TEXT PRIMARY KEY,version INTEGER NOT NULL);
|
|
93
|
+
CREATE TABLE IF NOT EXISTS web_panel_meta(singleton INTEGER PRIMARY KEY CHECK(singleton=1),revision INTEGER NOT NULL,next_seq INTEGER NOT NULL);
|
|
94
|
+
CREATE TABLE IF NOT EXISTS web_panels(id TEXT PRIMARY KEY,position INTEGER NOT NULL,name TEXT NOT NULL,url TEXT NOT NULL,created_at_ms INTEGER NOT NULL,updated_at_ms INTEGER NOT NULL);
|
|
95
|
+
CREATE UNIQUE INDEX IF NOT EXISTS web_panels_position ON web_panels(position);`)
|
|
96
|
+
const version = db.prepare('SELECT version FROM web_panel_component WHERE component=?').get('web-panels')
|
|
97
|
+
if (version && version.version !== 1) { db.close(); fail('WEB_PANEL_DATABASE_VERSION_UNSUPPORTED') }
|
|
98
|
+
db.prepare('INSERT OR IGNORE INTO web_panel_component VALUES(?,1)').run('web-panels')
|
|
99
|
+
db.prepare('INSERT OR IGNORE INTO web_panel_meta VALUES(1,0,1)').run()
|
|
100
|
+
|
|
101
|
+
let closed = false
|
|
102
|
+
const alive = () => { if (closed) fail('WEB_PANEL_STORE_CLOSED') }
|
|
103
|
+
const rowOf = id => db.prepare('SELECT * FROM web_panels WHERE id=?').get(id)
|
|
104
|
+
const revisionOf = () => db.prepare('SELECT revision FROM web_panel_meta WHERE singleton=1').get().revision
|
|
105
|
+
const ordered = () => db.prepare('SELECT * FROM web_panels ORDER BY position').all()
|
|
106
|
+
|
|
107
|
+
// One immediate transaction, so two writers cannot both believe they hold the
|
|
108
|
+
// list. The busy timeout is what keeps a second Host waiting instead of
|
|
109
|
+
// failing while this one commits.
|
|
110
|
+
const transact = work => {
|
|
111
|
+
db.exec('BEGIN IMMEDIATE')
|
|
112
|
+
try { const value = work(); db.exec('COMMIT'); return value } catch (error) { db.exec('ROLLBACK'); throw error }
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const claim = expected => {
|
|
116
|
+
const current = revisionOf()
|
|
117
|
+
if (!Number.isSafeInteger(expected) || expected !== current) fail('WEB_PANEL_REVISION_CONFLICT')
|
|
118
|
+
db.prepare('UPDATE web_panel_meta SET revision=? WHERE singleton=1').run(current + 1)
|
|
119
|
+
return current + 1
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// The commit is the claim; this is the proof. A row that does not read back as
|
|
123
|
+
// written fails the call instead of letting the panel believe it was saved.
|
|
124
|
+
const readback = (revision, panels) => {
|
|
125
|
+
const after = ordered()
|
|
126
|
+
const same = after.length === panels.length
|
|
127
|
+
&& after.every((row, index) => row.id === panels[index].id && row.name === panels[index].name
|
|
128
|
+
&& row.url === panels[index].url && row.position === panels[index].position)
|
|
129
|
+
if (!same || revisionOf() !== revision) fail('WEB_PANEL_READBACK_MISMATCH')
|
|
130
|
+
return after
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const read = () => { alive(); return { revision: revisionOf(), panels: ordered().map(publicWebPanel), limits: WEB_PANEL_LIMITS } }
|
|
134
|
+
|
|
135
|
+
const save = ({ id = null, name, url, expectedRevision, embeddingOrigin = '' }) => {
|
|
136
|
+
alive()
|
|
137
|
+
if (id !== null && (typeof id !== 'string' || !ID.test(id))) fail('WEB_PANEL_INPUT')
|
|
138
|
+
if (!Number.isSafeInteger(expectedRevision)) fail('WEB_PANEL_INPUT')
|
|
139
|
+
const next = validateWebPanelInput({ name, url }, embeddingOrigin)
|
|
140
|
+
const at = now()
|
|
141
|
+
const committed = transact(() => {
|
|
142
|
+
const revision = claim(expectedRevision)
|
|
143
|
+
const existing = id === null ? undefined : rowOf(id)
|
|
144
|
+
if (id !== null && !existing) fail('WEB_PANEL_NOT_FOUND')
|
|
145
|
+
const count = db.prepare('SELECT COUNT(*) AS n FROM web_panels').get().n
|
|
146
|
+
let row
|
|
147
|
+
if (existing) {
|
|
148
|
+
db.prepare('UPDATE web_panels SET name=?,url=?,updated_at_ms=? WHERE id=?').run(next.name, next.url, at, id)
|
|
149
|
+
row = { ...rowOf(id) }
|
|
150
|
+
} else {
|
|
151
|
+
if (count >= MAX_WEB_PANELS) fail('WEB_PANEL_LIMIT')
|
|
152
|
+
const seq = db.prepare('SELECT next_seq FROM web_panel_meta WHERE singleton=1').get().next_seq
|
|
153
|
+
const fresh = `panel-${seq}`
|
|
154
|
+
db.prepare('UPDATE web_panel_meta SET next_seq=? WHERE singleton=1').run(seq + 1)
|
|
155
|
+
db.prepare('INSERT INTO web_panels VALUES(?,?,?,?,?,?)').run(fresh, count + 1, next.name, next.url, at, at)
|
|
156
|
+
row = { ...rowOf(fresh) }
|
|
157
|
+
}
|
|
158
|
+
readback(revision, ordered())
|
|
159
|
+
return row
|
|
160
|
+
})
|
|
161
|
+
return { revision: revisionOf(), panel: publicWebPanel(committed) }
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const remove = ({ id, expectedRevision }) => {
|
|
165
|
+
alive()
|
|
166
|
+
if (typeof id !== 'string' || !ID.test(id) || !Number.isSafeInteger(expectedRevision)) fail('WEB_PANEL_INPUT')
|
|
167
|
+
const committed = transact(() => {
|
|
168
|
+
const revision = claim(expectedRevision)
|
|
169
|
+
const existing = rowOf(id)
|
|
170
|
+
if (!existing) fail('WEB_PANEL_NOT_FOUND')
|
|
171
|
+
db.prepare('DELETE FROM web_panels WHERE id=?').run(id)
|
|
172
|
+
// Positions stay dense: a gap would let a later insert land in the middle.
|
|
173
|
+
const at = now()
|
|
174
|
+
const rest = ordered()
|
|
175
|
+
for (const [index, row] of rest.entries()) db.prepare('UPDATE web_panels SET position=?,updated_at_ms=? WHERE id=?').run(index + 1, at, row.id)
|
|
176
|
+
readback(revision, ordered())
|
|
177
|
+
return existing
|
|
178
|
+
})
|
|
179
|
+
return { revision: revisionOf(), removed: committed.id }
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
const order = ({ ids, expectedRevision }) => {
|
|
183
|
+
alive()
|
|
184
|
+
if (!Array.isArray(ids) || !ids.every(id => typeof id === 'string' && ID.test(id)) || !Number.isSafeInteger(expectedRevision)) fail('WEB_PANEL_INPUT')
|
|
185
|
+
if (new Set(ids).size !== ids.length || ids.length > MAX_WEB_PANELS) fail('WEB_PANEL_ORDER_INVALID')
|
|
186
|
+
const committed = transact(() => {
|
|
187
|
+
const revision = claim(expectedRevision)
|
|
188
|
+
const current = ordered()
|
|
189
|
+
// The request must be the whole list in a new order, never a partial edit
|
|
190
|
+
// that would silently drop whatever it left out.
|
|
191
|
+
if (current.length !== ids.length || [...ids].sort().join() !== current.map(row => row.id).sort().join()) fail('WEB_PANEL_ORDER_INVALID')
|
|
192
|
+
const at = now()
|
|
193
|
+
// Two passes: an arbitrary permutation cannot be written in place without
|
|
194
|
+
// tripping the unique position index, so the rows step aside first.
|
|
195
|
+
for (const [index, id] of ids.entries()) db.prepare('UPDATE web_panels SET position=? WHERE id=?').run(-(index + 1), id)
|
|
196
|
+
for (const [index, id] of ids.entries()) db.prepare('UPDATE web_panels SET position=?,updated_at_ms=? WHERE id=?').run(index + 1, at, id)
|
|
197
|
+
readback(revision, ordered())
|
|
198
|
+
return ordered()
|
|
199
|
+
})
|
|
200
|
+
return { revision: revisionOf(), panels: committed.map(publicWebPanel) }
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
const close = () => { closed = true; db.close() }
|
|
204
|
+
|
|
205
|
+
return Object.freeze({ kind: 'web-panel-store', limits: WEB_PANEL_LIMITS, read, save, remove, order, close })
|
|
206
|
+
}
|
|
@@ -1,29 +1,39 @@
|
|
|
1
|
-
# DSH remote-computer-agent 0.1.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
The
|
|
16
|
-
|
|
17
|
-
`
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
# DSH remote-computer-agent 0.1.2
|
|
2
|
+
|
|
3
|
+
Version 0.1.2 ships the short-lived QR invitation and six-digit secure pairing flow with Model Router 0.67.0. Use this matching package for the updated Host pairing and desktop transport.
|
|
4
|
+
|
|
5
|
+
Harness Desktop's native viewer uses `dsh-app://app`. Version 0.1.1 accepts this exact Origin only for a live desktop session minted by an authenticated Host; it does not enable it for HTTP API requests or other sessions. Model Router 0.63.3 carries the native viewer Origin through Desktop's HTTP bridge. Upgrade both sides when using the native application; ordinary HTTP/HTTPS viewers retain their existing exact-Origin checks.
|
|
6
|
+
|
|
7
|
+
Credentials are checked again after reading the request body and before each management action. Cached client rows from an older revision cannot issue or revoke newer tickets, and `tools/list` rechecks a live grant. Rotation during a slow request therefore cannot use the old request to revoke a fresh ticket. Temporary cooling also handles wall-clock rollback without extending its backoff beyond the configured cap.
|
|
8
|
+
|
|
9
|
+
Authentication now has separate bounded anonymous-source/global-failure and verified-client request limits, with temporary cooling and `Retry-After`. Valid clients behind a shared proxy remain usable during anonymous guessing attacks. Rotation invalidates old pairing tokens and tickets immediately. Native TLS and optional client-certificate checks have local HTTPS tests; deployment still requires user-provided certificates and a private proxy backend. See [network settings and recovery](../deploy/remote-agent/README.md) and `node --test tests/remote-auth.native.mjs` (OpenSSL required).
|
|
10
|
+
|
|
11
|
+
TypeScript machine-side runtime with a single snake_case tool catalog, versioned MCP transport and a durable SQLite operation ledger. Build with `npm ci && npm run build` in this directory; run `node dist/cli.mjs init CONFIG_JSON AUTHORIZED_ROOT`. Installation and network modes: [deployment guide](../deploy/remote-agent/README.md).
|
|
12
|
+
|
|
13
|
+
For a user-configured Windows computer, unpack the complete Windows package and double-click `start.cmd` (or run `setup.ps1`). The setup wizard defaults to short secure invitations: it selects the shared workspace, one reachable local address, trusted Host/team-Bot permission, and optional command/browser permission, then creates `private/pairing.html` with a QR code, six-digit confirmation and device fingerprint. Scan/copy the invitation into the Host's secure pairing panel within two minutes. `pair-device.cmd` refreshes an unredeemed invitation without changing tasks or permissions. Compatibility mode (`pairingMode:legacy` in an answers file) still creates `private/pairing.private.json`. No device credential is created until a secure invitation is redeemed; invitation proofs and native secrets are not printed.
|
|
14
|
+
|
|
15
|
+
The package needs `dist`, production dependencies, bundled Node or an explicit `-NodePath`, and `helpers/dsh-desktop-helper.exe` (plus `dsh-process-job.exe` when commands are enabled). The wizard registers two tasks for the current signed-in user with `InteractiveToken`/`LeastPrivilege`, starts the Agent hidden, and uses explicit full-desktop mode for the tray helper. No Windows password is stored, no VM is provisioned, and the user must remain signed in. Existing installations are backed up and preserved; configuring another installation uses another empty directory and distinct task names. A second helper still obeys the machine's exclusive desktop arbiter. The QR page is generated offline using [node-qrcode](https://github.com/soldair/node-qrcode); its camera/image counterpart is in the Host client and never uploads images for decoding.
|
|
16
|
+
|
|
17
|
+
`hostManagedBots:true` is an explicit local-admin pairing ceiling for a trusted authenticated Host to add newly created team Bots without repairing the machine for each ID. Only `Store(...,{admin:true}).pair`/the local `pair` CLI can enable it. An ordinary grant request cannot enable it; root/tool ceilings, Bot-ID validation, client revision and revocation continue to apply. Existing fixed `botIds` ceilings retain their behavior. The nonsecret flag is included in pairing metadata; the token remains in the protected pairing file.
|
|
18
|
+
|
|
19
|
+
The trusted Host resolves a pairing `secretRef`, requests a five-minute-or-shorter `/control/v1/grants` ticket, then uses the ticket at `/mcp`. These endpoints accept separate credential classes. Local pairing ceilings restrict Bot IDs, roots and tools. Tickets bind machine/client/Bot/task/attempt, revision and expiry. Caller-supplied business arguments cannot add tools or roots. Control-plane secrets and grant tokens are never tool arguments.
|
|
20
|
+
|
|
21
|
+
`Agent(config, DatabaseConstructor?)` is the direct integration entry. The injectable constructor is `better-sqlite3@13.0.3`, already used by the Host probes. `Store.pair / issue / rotate / revoke` manage local authority; `Agent.call(tool,args,grantContext,operationId)` executes the same tool catalog as HTTP. The machine identity is stored once and survives restart. MCP `params._meta["dsh/operationId"]` is assigned by the Host; never ask a model to invent it.
|
|
22
|
+
|
|
23
|
+
Writes and process starts require an operation ID. Admission is committed before side effects, duplicate IDs return original results, and a changed request using an old ID fails with `OPERATION_CONFLICT`. Restart turns unfinished records into `OUTCOME_UNKNOWN`; only status reconciliation can resolve them. This prevents duplicate admission and does not claim arbitrary scripts are transactionally exactly-once. Status and artifacts remain scoped to the original client/Bot/task/attempt. Authentication, Host/Origin and bounded throttling precede body handling.
|
|
24
|
+
|
|
25
|
+
Filesystem calls are root-relative, reject traversal/ADS/symlink escapes, check descriptors/parents and compare `expectedHash` before atomic replacement. `null` means create-only. Reads and writes are bounded; artifacts have a 256 MiB total quota. The application API does not defeat hostile same-account native processes racing filesystem names; use the dedicated OS account/container profile for the OS boundary. Existing files larger than 1 MiB cannot be replaced through `fs_write`.
|
|
26
|
+
|
|
27
|
+
`shell_exec` receives `workspaceRef:{kind:"remote",machineId,rootId,relativePath}` and either a fixed configured executable ID in `argv[0]`, or an explicitly enabled script interpreter. argv bypasses shell parsing. Default timeout is 60 seconds, maximum 30 minutes. Output capture is limited to 8 MiB and stored as scoped artifacts. Linux cancels the owned process group. Windows requires the bundled Job Object launcher, which creates its child suspended, assigns the job and closes the job on cancellation/launcher death. Missing native isolation fails explicitly. Arbitrary shell grants still carry the account's OS permissions.
|
|
28
|
+
|
|
29
|
+
Worktrees record a clean source HEAD, create a detached remote worktree and return scoped diff artifacts. Conditional integration refuses changed/dirty sources and leaves `integration-pending` on conflicts. No automatic commit occurs. Browser operations use task-specific Playwright contexts, exact allowed origins including redirects/subresources, disabled downloads/popups/service workers, snapshot references and owner checks. Browser contexts are state isolation, not an OS sandbox; profile persistence/upload/script/download APIs are not yet implemented.
|
|
30
|
+
|
|
31
|
+
Desktop calls use a local ACL-protected pipe. Default window mode requires an explicit process/interactive target. Opt-in `--desktop-mode full` enables physical monitor capture for Bots and grant-bound long-lived JPEG WebSocket watching with acknowledged mouse/keyboard takeover. Watch does not block Bot automation; acknowledged human control fences it until release. Renewing the signed grant updates the existing session without reconnecting. See [native helper](../native/windows-desktop/README.md) and [session protocol/acceptance limits](../docs/implementation/20261105-desktop-engine.md). `machine_ping` separates agent health from unverified/unavailable desktop state. Remote CLI adapter execution remains a separate Host integration gate; this runtime does not accept arbitrary CLI executable paths from models.
|
|
32
|
+
|
|
33
|
+
Reproduce native checks from the repository root with `node scripts/integration-remote-agent.mjs [--driver PATH_TO_BETTER_SQLITE3_ENTRY]`. Tests compile the C# helpers on Windows and exercise real subprocesses, cancellation, filesystem/link escapes, CAS/idempotency, unknown recovery, MCP HTTP, grants and Git integration. See the probe's explicit limitations before interpreting results as product acceptance.
|
|
34
|
+
|
|
35
|
+
### Recover an interrupted secure pairing
|
|
36
|
+
|
|
37
|
+
The importable invitation JSON omits the six-digit confirmation code. Read the code from the private pairing page on the target computer and type it in the Host. Keep that page on the target computer.
|
|
38
|
+
|
|
39
|
+
If the Agent already committed a client but the Host lost its credential, inspect the local device list first. Run `pair-device.cmd -ResetPairing` on that target computer to explicitly revoke the previous client and create a fresh invitation under the same client ID. This disconnects its old connections and grants. Refreshing an invitation without this switch never revokes an active pairing. Existing configuration, sharing scope and scheduled tasks are preserved.
|
|
@@ -25,6 +25,9 @@ const files = [...main.outputFiles, ...bridge.outputFiles]
|
|
|
25
25
|
for (const helper of ['native-peer.ps1', 'native-peer.py']) {
|
|
26
26
|
files.push({ path: join(output, helper), contents: await readFile(resolve(root, '../packages/cli-runtime/src', helper)) })
|
|
27
27
|
}
|
|
28
|
+
for (const [source, name] of [['vendor/LICENSE','OPENMAUSBOT_LICENSE'],['NOTICE','OPENMAUSBOT_NOTICE'],['SOURCE.json','OPENMAUSBOT_SOURCE.json']]) {
|
|
29
|
+
files.push({ path: join(output, name), contents: await readFile(resolve(root, '../modules/openmaus-protocol', source)) })
|
|
30
|
+
}
|
|
28
31
|
for (const file of files) assert.equal(dirname(resolve(file.path)), output, 'Agent build files must remain directly inside dist')
|
|
29
32
|
await checkOutput()
|
|
30
33
|
await mkdir(output, { recursive: true })
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
OpenMausBot protocol components
|
|
2
|
+
Upstream: https://github.com/milind-soni/OpenMausBot
|
|
3
|
+
Pinned commit: 1bc4749aa8307d7d6998bf86de4ef6478460dd93
|
|
4
|
+
Author: Milind Soni and OpenMausBot contributors
|
|
5
|
+
License: Apache License 2.0; see vendor/LICENSE.
|
|
6
|
+
|
|
7
|
+
The companion end-to-end encryption protocol, descriptor, credentials, yamux
|
|
8
|
+
codec and interoperability vectors are copied without modification. Product
|
|
9
|
+
adapters and their permission policy are separate from the frozen upstream
|
|
10
|
+
files. SOURCE.json records each source path and byte hash.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"upstream": "https://github.com/milind-soni/OpenMausBot",
|
|
4
|
+
"commit": "1bc4749aa8307d7d6998bf86de4ef6478460dd93",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"files": [
|
|
7
|
+
{
|
|
8
|
+
"source": "companion/src/e2e/credentials.ts",
|
|
9
|
+
"target": "vendor/companion/src/e2e/credentials.ts",
|
|
10
|
+
"sha256": "1b576030c9e795eb64f5bee9fdc5918d6cfb92f2481b70259f7636991d6f5f6f",
|
|
11
|
+
"bytes": 6328
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"source": "companion/src/e2e/noise.ts",
|
|
15
|
+
"target": "vendor/companion/src/e2e/noise.ts",
|
|
16
|
+
"sha256": "9269403237b43246142d5dd69bee0269d3b41f81c6bfe95520693320b6469250",
|
|
17
|
+
"bytes": 15871
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"source": "companion/src/e2e/descriptor.ts",
|
|
21
|
+
"target": "vendor/companion/src/e2e/descriptor.ts",
|
|
22
|
+
"sha256": "5a7b39e4571e8b83fd85a3b6141cc09501918326afcc58c6ccb4a61344bbb2c8",
|
|
23
|
+
"bytes": 4570
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"source": "companion/src/e2e/yamux.ts",
|
|
27
|
+
"target": "vendor/companion/src/e2e/yamux.ts",
|
|
28
|
+
"sha256": "1292b278d229d3ed8b92a32aec4137e04329d6fb2497d90ffee6f6d4bef20683",
|
|
29
|
+
"bytes": 13359
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"source": "companion/src/e2e/session.ts",
|
|
33
|
+
"target": "vendor/companion/src/e2e/session.ts",
|
|
34
|
+
"sha256": "1ff7d26fe674ccab9f75026fec15f85bd791f99d75b888eaf24b7be744c4da0e",
|
|
35
|
+
"bytes": 14336
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"source": "companion/src/e2e/phone.ts",
|
|
39
|
+
"target": "vendor/companion/src/e2e/phone.ts",
|
|
40
|
+
"sha256": "9fd5a069eecdea29afe5fb00ea2bfc5d42d8aae448927cd9ce3770a8cd2de5d0",
|
|
41
|
+
"bytes": 4083
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"source": "companion/src/e2e/vectors/v1.json",
|
|
45
|
+
"target": "vendor/companion/src/e2e/vectors/v1.json",
|
|
46
|
+
"sha256": "5471a0070ddbb69dca34dee6da550de4581e8e1a40e22e0f97873d539793bf4e",
|
|
47
|
+
"bytes": 204553
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"source": "companion/src/e2e/vectors/v1.sha256",
|
|
51
|
+
"target": "vendor/companion/src/e2e/vectors/v1.sha256",
|
|
52
|
+
"sha256": "99de21e9eef973a92e651517d88e977a1ef91fb441183648115b8a06b24796ee",
|
|
53
|
+
"bytes": 74
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"source": "companion/src/e2e/README.md",
|
|
57
|
+
"target": "vendor/companion/src/e2e/README.md",
|
|
58
|
+
"sha256": "b752ee693e97c9674a207561be536105a34f90e99eaaead49b1f644f2b69589d",
|
|
59
|
+
"bytes": 29207
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"source": "LICENSE",
|
|
63
|
+
"target": "vendor/LICENSE",
|
|
64
|
+
"sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30",
|
|
65
|
+
"bytes": 11358
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|