deepseek-coordination 0.1.9 → 0.10.1
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 +21 -21
- package/README.md +351 -1083
- package/README.zh-CN.md +351 -697
- package/cordis.patch.yml +5 -74
- package/lib/client.js +33772 -0
- package/lib/index.d.mts +252 -0
- package/lib/index.mjs +27378 -0
- package/package.json +98 -114
- package/client.js +0 -338
- package/src/host/bin/dsh-os.bat +0 -19
- package/src/host/bin/dsh-os.ps1 +0 -5039
- package/src/host/bin/dsh-os.sh +0 -3385
- package/src/host/bin/dsh-os7.ps1 +0 -5518
- package/src/host/command.txt +0 -136
- package/src/host/docs/command-original.txt +0 -26
- package/src/host/docs/os-spec.md +0 -528
- package/src/host/docs/permission-model.md +0 -206
- package/src/host/spec/charsets.tsv +0 -28
- package/src/host/spec/verbs.tsv +0 -120
- package/src/permission/index.js +0 -546
- package/src/plugin/index.js +0 -226
- package/src/plugin/invoke.js +0 -306
- package/src/plugin/settings.js +0 -349
- package/src/plugin/takeover.js +0 -436
- package/src/plugin/workflow.js +0 -1494
- package/tools/measure-cache.mjs +0 -223
package/src/host/command.txt
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
// dsh-os atomic command surface (authoritative contract).
|
|
2
|
-
// Implementation: bin/dsh-os.ps1 (Windows) + bin/dsh-os.sh (Linux/Unix) + bin/dsh-os.bat shim.
|
|
3
|
-
// Full spec: docs/os-spec.md Machine-readable verb table: spec/verbs.tsv
|
|
4
|
-
// Original draft preserved at: docs/command-original.txt
|
|
5
|
-
//
|
|
6
|
-
// Permission: R = read-only/query, never prompts.
|
|
7
|
-
// W = mutating; requires an authorization the user accepted (--allow).
|
|
8
|
-
// W group: execute, delete, create, edit, window, keyboard, clipboard, text, structure
|
|
9
|
-
//
|
|
10
|
-
// Values are separate argv elements; never assembled into a shell string.
|
|
11
|
-
//
|
|
12
|
-
// HARD CONVENTION: every argument is quoted. Two equivalent forms are accepted:
|
|
13
|
-
// positional: file create "./a.txt" "123" "utf-8-bom"
|
|
14
|
-
// named: file create path="./a.txt" content="123" charset="utf-8-bom"
|
|
15
|
-
// Named arguments may be written in any order; order is taken from this file's parameter list.
|
|
16
|
-
// Giving the same parameter positionally and by name is refused, as is an unknown name. Quoting is
|
|
17
|
-
// the caller's job: the harness passes argv directly, so the quotes are consumed by the calling
|
|
18
|
-
// shell, and the value arrives as one argument.
|
|
19
|
-
//
|
|
20
|
-
// Results are agent-first, never human-oriented: exactly one JSON envelope on stdout, `result`
|
|
21
|
-
// carrying structured fields (no decorative formatting, no human line-number rendering), `error.code`
|
|
22
|
-
// authoritative for branching, and `file search` returning its matches as a JSON array.
|
|
23
|
-
//
|
|
24
|
-
// Charset names are IANA: utf-8, utf-8-bom, utf-16le, utf-16be, gbk, gb18030, big5, shift_jis, latin1, windows-1252.
|
|
25
|
-
// Offsets are BYTE offsets in a half-open range [start,end) and must fall on a character boundary.
|
|
26
|
-
|
|
27
|
-
file create path content charset // W create a file; fails with E_EXISTS if it already exists.
|
|
28
|
-
file charset path // R query charset of file, throw exception as not a file.
|
|
29
|
-
file encode path charset // W convert encode of a file, throw exception as not a file.
|
|
30
|
-
file length path // R query length of a file/directory
|
|
31
|
-
file information path // R query information of a file/directory
|
|
32
|
-
file list path // R list one directory level
|
|
33
|
-
file delete path // W recycle by default; --permanent unlinks.
|
|
34
|
-
file move source destination // W
|
|
35
|
-
file copy source destination // W
|
|
36
|
-
file mkdir path // W
|
|
37
|
-
file append path content // W append at end of file, preserving original BOM and EOL. Optional third positional <charset> asserts the existing charset.
|
|
38
|
-
file insert path content offset // W insert at a byte offset; must be a character boundary. Charset is --charset, not a positional, so an omitted one cannot shift offset.
|
|
39
|
-
file view path charset start end // R charset is an optional assertion; start/end an optional byte range.
|
|
40
|
-
file search directory name // R returns a JSON array of matching paths. Literal substring by default, --regex to switch.
|
|
41
|
-
|
|
42
|
-
execute command arguments... // W arguments is an array passed straight to argv; no shell. The whole positional list is argv, so there is no separate <command> parameter.
|
|
43
|
-
execute synchronous commands // W walk the command array one after another; stop at the first failure.
|
|
44
|
-
execute asynchronous commands // W walk the command array concurrently; wait for all of them.
|
|
45
|
-
execute query pid // R query a running process
|
|
46
|
-
execute kill pid // W terminate a process
|
|
47
|
-
|
|
48
|
-
mouse click x y // W click point with left mouse key.
|
|
49
|
-
mouse context x y // W click point with right mouse key.
|
|
50
|
-
mouse over x y // W move the mouse to the point
|
|
51
|
-
mouse wheel x y // W the distance to wheel over x and y
|
|
52
|
-
mouse down x y // W press and hold a mouse button
|
|
53
|
-
mouse up // W release the mouse button
|
|
54
|
-
mouse cursor // R read back the cursor position
|
|
55
|
-
screenshot x y width height // R catch a screenshot for a rectangle range (x y width height; omit for full screen).
|
|
56
|
-
|
|
57
|
-
keyboard down code // W trigger a key down.
|
|
58
|
-
keyboard up code // W trigger a key up.
|
|
59
|
-
keyboard press code // W one atomic down+up; use this instead of down followed by up.
|
|
60
|
-
keyboard combination phase keys // W phase is down, up or press; keys are the chord, e.g. ctrl c. `keyboard combination down a b c d` releases nothing; the same verb with phase up does.
|
|
61
|
-
keyboard type text // W type arbitrary text; non-ASCII goes through the clipboard.
|
|
62
|
-
keyboard codes // R list accepted key names for this platform.
|
|
63
|
-
|
|
64
|
-
clipboard read // R
|
|
65
|
-
clipboard write text // W
|
|
66
|
-
clipboard paste // W write the text then send Ctrl+V.
|
|
67
|
-
|
|
68
|
-
window find name // R find a window
|
|
69
|
-
window list // R enumerate top-level windows in z-order
|
|
70
|
-
window active // R report the foreground window
|
|
71
|
-
window close name // W close a window
|
|
72
|
-
window top name // W bring a window to front
|
|
73
|
-
window bottom name // W bring a window to back.
|
|
74
|
-
window move name x y // W
|
|
75
|
-
window resize name width height // W
|
|
76
|
-
|
|
77
|
-
wait window name // R block until a window appears; --absent waits for it to go.
|
|
78
|
-
wait ms ms // R explicit wait, in milliseconds. Bounded to one hour.
|
|
79
|
-
|
|
80
|
-
text x y // R find the complete text around the point.
|
|
81
|
-
structure x y // R find view structure around the point.
|
|
82
|
-
|
|
83
|
-
selfcheck // R report the verb table and the platform capability matrix.
|
|
84
|
-
|
|
85
|
-
// ---------------------------------------------------------------------------
|
|
86
|
-
// Round 2 additions. Same conventions as above. Where the request was ambiguous the chosen
|
|
87
|
-
// reading is stated on the line and explained in docs/os-spec.md.
|
|
88
|
-
// ---------------------------------------------------------------------------
|
|
89
|
-
|
|
90
|
-
file verify charset path charset // R assert the declared charset; reports observed vs expected.
|
|
91
|
-
file verify encoding path charset // R assert every byte sequence is legal in that charset (no replacement chars).
|
|
92
|
-
file verify completion path // R assert a write completed: --length/--sha256/--bom/--eol must all match.
|
|
93
|
-
|
|
94
|
-
system brand // R windows | macos | linux | wsl, plus version and architecture.
|
|
95
|
-
system cpu // R CPU model, cores, threads, clocks.
|
|
96
|
-
system gpu // R GPU adapters; degrades to an empty list when no driver is present.
|
|
97
|
-
system version // R OS version, build, kernel.
|
|
98
|
-
system info // R brand + cpu + gpu + version in one envelope.
|
|
99
|
-
|
|
100
|
-
task list // R enumerate processes.
|
|
101
|
-
task query pid // R process detail: name, path, user, memory, start time.
|
|
102
|
-
task show pid // R bring the process's window to the front.
|
|
103
|
-
task kill pid // W terminate; --force for a hard kill.
|
|
104
|
-
task launch path // W launch a program or open a document by path (no shell string).
|
|
105
|
-
|
|
106
|
-
window minimize name // W
|
|
107
|
-
window maximize name // W
|
|
108
|
-
window restore name // W undo minimize or maximize.
|
|
109
|
-
|
|
110
|
-
service list // R OS services (Windows SCM / systemd / launchd).
|
|
111
|
-
service query name // R service state, start type, account.
|
|
112
|
-
service start name // W needs elevation; reports E_ELEVATION_REQUIRED otherwise.
|
|
113
|
-
service stop name // W
|
|
114
|
-
service restart name // W
|
|
115
|
-
|
|
116
|
-
environment list // R --scope process|user|machine, defaults to user.
|
|
117
|
-
environment get name // R the raw value of one variable.
|
|
118
|
-
environment add name value // W fails with E_EXISTS when the variable is already set.
|
|
119
|
-
environment set name value // W overwrites; fails with E_NOT_FOUND when absent.
|
|
120
|
-
environment delete name // W
|
|
121
|
-
environment attribute list // R attributes of a list variable; --attr selects one, default PATH.
|
|
122
|
-
environment attribute get name // R the attribute's entries as an ordered list.
|
|
123
|
-
environment attribute add name value // W append one entry to the attribute.
|
|
124
|
-
environment attribute set name index value // W replace one entry by index.
|
|
125
|
-
environment attribute delete name // W remove an entry, by --index or by --value.
|
|
126
|
-
// On POSIX the list mutations are --scope process only, and a persistent scope is refused with
|
|
127
|
-
// E_NOT_SUPPORTED rather than half-applied: this platform has no kernel API for a list variable, so
|
|
128
|
-
// persisting one means rewriting a startup file, and a wrong reconstruction of PATH there can make a
|
|
129
|
-
// machine's shells unusable. The read views are --scope process only for the same reason.
|
|
130
|
-
|
|
131
|
-
permission query verb target // R current decision, matched rule, and enforcement strength.
|
|
132
|
-
permission list // R all durable rules.
|
|
133
|
-
permission audit // R recent authorization decisions.
|
|
134
|
-
permission grant verb target decision // W delegate-only; requires a user-accepted dialog.
|
|
135
|
-
permission revoke rule-id // W delegate-only; requires a user-accepted dialog.
|
|
136
|
-
permission acl init // W idempotently enable kernel-level protection of permission.json.
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
//execute, delete, create, edit, window needs permission. A dialog accepted by user.
|
|
2
|
-
file create path content charset//create a file.
|
|
3
|
-
file charset path//query charset of file, throw exception as not a file.
|
|
4
|
-
file encode path charset//convert encode of a file, throw exception as not a file.
|
|
5
|
-
file length path//query length of a file/directory
|
|
6
|
-
file information path//query information of a file/directory
|
|
7
|
-
file delete path
|
|
8
|
-
file edit path content charset mode//mode = insert or append
|
|
9
|
-
file view path charset start end
|
|
10
|
-
execute command arguments
|
|
11
|
-
mouse click x y//click point with left mouse key.
|
|
12
|
-
mouse context x y//click point with right mouse key.
|
|
13
|
-
mouse over x y//move the mouse to the point
|
|
14
|
-
mouse wheel x y//the distance to wheel over x and y
|
|
15
|
-
keyboard down code//trigger a key down.
|
|
16
|
-
keyboard up code//trigger a key up.
|
|
17
|
-
keyboard combination down a b c d//such as alt+tab
|
|
18
|
-
keyboard combination up a b c d//such as alt+tab
|
|
19
|
-
window find name//find a window
|
|
20
|
-
window close name//close a window
|
|
21
|
-
window top name//bring a window to front
|
|
22
|
-
window bottom name//bring a window to back.
|
|
23
|
-
text x y//find text structure round the point
|
|
24
|
-
structure x y//find view structure around the point
|
|
25
|
-
screenshot x y width height//catch a screenshot for a rectange range.
|
|
26
|
-
|