@volter/supercode-teams 0.2.32 → 0.2.34
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-MIT +21 -0
- package/bin/workspace/args.mjs +1 -1
- package/bin/workspace.mjs +5 -3
- package/package.json +2 -1
- package/worker/wrangler.toml +13 -13
package/LICENSE-MIT
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 supercode 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/bin/workspace/args.mjs
CHANGED
|
@@ -11,7 +11,7 @@ const VALUES = new Set([
|
|
|
11
11
|
'out', 'ttl', 'type', 'name', 'visibility', 'backfill', 'format', 'to',
|
|
12
12
|
'grant', 'binding', 'caps', 'fidelity', 'cwd', 'root', 'workspace-from', 'since', 'until', 'session',
|
|
13
13
|
'on', 'timeout', 'plan', 'tmux-socket', 'volter-issuer', 'delegated-issuer', 'workplace', 'organization', 'key', 'room',
|
|
14
|
-
'conversation', 'rh2',
|
|
14
|
+
'conversation', 'rh2', 'scope',
|
|
15
15
|
]);
|
|
16
16
|
|
|
17
17
|
export function parseArgs(argv) {
|
package/bin/workspace.mjs
CHANGED
|
@@ -758,7 +758,7 @@ async function connectorCommand(verb, { flags, rest, output, client, context, te
|
|
|
758
758
|
* `--workplace-only`. `unpublish --record-only` deletes the record here and leaves the workplace alone.
|
|
759
759
|
*/
|
|
760
760
|
async function publishCommand(verb, sub, { flags, rest, output, context, team, client, home, env }) {
|
|
761
|
-
only(flags, ['json', 'help', 'context', 'room', 'workplace', 'organization', 'name', 'key', 'machine', 'token_stdin', 'record_only', 'workplace_only']);
|
|
761
|
+
only(flags, ['json', 'help', 'context', 'room', 'workplace', 'organization', 'name', 'key', 'machine', 'token_stdin', 'record_only', 'workplace_only', 'scope']);
|
|
762
762
|
const recordOnly = Boolean(flags.record_only);
|
|
763
763
|
if (!flags.room || !flags.workplace || (!recordOnly && !flags.organization)) usage(`teams ${verb} needs --room ROOM --workplace ORIGIN --organization ORG`);
|
|
764
764
|
const workplace = new URL(flags.workplace).origin;
|
|
@@ -807,7 +807,9 @@ async function publishCommand(verb, sub, { flags, rest, output, context, team, c
|
|
|
807
807
|
const key = flags.key ?? `${sub === 'pane' ? 'pane' : 'folder'}-${label.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '').slice(0, 48) || createHash('sha256').update(target).digest('hex').slice(0, 8)}`;
|
|
808
808
|
const kind = sub === 'pane' ? 'pane' : 'folder';
|
|
809
809
|
const existed = (await recorded()).some(item => item.target === target && item.workplace === workplace && item.room === flags.room);
|
|
810
|
-
|
|
810
|
+
// --scope view caps what the workplace's tokens can open the surface as (they can watch it, not drive it).
|
|
811
|
+
if (flags.scope !== undefined && flags.scope !== 'view' && flags.scope !== 'control') usage('--scope must be view or control');
|
|
812
|
+
const publication = (await client.request('POST', publications, { body: { kind, target, workplace, room: flags.room, surface_key: key, ...(flags.scope ? { max_scope: flags.scope } : {}) } })).data;
|
|
811
813
|
if (recordOnly) return output({ version: 1, context: scope(context), data: { publication } });
|
|
812
814
|
let payload;
|
|
813
815
|
try {
|
|
@@ -913,7 +915,7 @@ function printHelp() {
|
|
|
913
915
|
login [ORIGIN] [--team TEAM] [--as CONTEXT] [--token-stdin|--invite-stdin] (Volter sign-in in the browser by default)
|
|
914
916
|
identity link
|
|
915
917
|
server start [--volter-issuer ORIGIN] [--delegated-issuer ORIGIN]
|
|
916
|
-
publish pane|root TARGET --room ROOM --workplace ORIGIN --organization ORG [--name] [--key] [--machine] [--token-stdin] [--record-only]
|
|
918
|
+
publish pane|root TARGET --room ROOM --workplace ORIGIN --organization ORG [--scope view|control] [--name] [--key] [--machine] [--token-stdin] [--record-only]
|
|
917
919
|
unpublish SURFACE --room ROOM --workplace ORIGIN --organization ORG [--machine] [--token-stdin] [--record-only|--workplace-only]
|
|
918
920
|
connect|disconnect|status
|
|
919
921
|
members invite|list|remove|role
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/supercode-teams",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.34",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A machine daemon serving this machine's doors, and a local or remote Teams server for shared session discovery, OpenTelemetry ingestion and access to enrolled machines.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"supercode-teams-fleet": "./bin/fleet.mjs"
|
|
40
40
|
},
|
|
41
41
|
"files": [
|
|
42
|
+
"LICENSE-MIT",
|
|
42
43
|
"*.mjs",
|
|
43
44
|
"workspace-client.d.ts",
|
|
44
45
|
"porthole-hook.cjs",
|
package/worker/wrangler.toml
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
# A hosted Teams server on Cloudflare: one Worker, one Durable Object (SQLite).
|
|
2
2
|
# supercode teams server token | npx wrangler secret put SUPERCODE_TEAMS_BOOTSTRAP_TOKEN
|
|
3
|
-
# npx wrangler deploy --config sdk/teams/worker/wrangler.toml
|
|
4
|
-
#
|
|
5
|
-
# owner's first credential (`supercode teams login <origin> --token-stdin`).
|
|
3
|
+
# npx wrangler deploy --config sdk/teams/worker/wrangler.toml --name <worker> \
|
|
4
|
+
# --var PUBLIC_ORIGIN:https://<worker>.<account>.workers.dev --var INIT_TEAM:<first team>
|
|
5
|
+
# The token printed above is the owner's first credential (`supercode teams login <origin> --token-stdin`).
|
|
6
|
+
#
|
|
7
|
+
# A deployment's variables live with the deployment (the first deploy's --var, or the dashboard), not here:
|
|
8
|
+
# keep_vars leaves them in place, so a later deploy of new code never resets its origin or issuers.
|
|
9
|
+
# PUBLIC_ORIGIN the https origin the Worker is served at (required)
|
|
10
|
+
# INIT_TEAM the first team's name, used once at bootstrap
|
|
11
|
+
# VOLTER_ISSUER optional: members sign in with Volter (supercode teams login --volter); the issuer
|
|
12
|
+
# must have this origin registered as a resource
|
|
13
|
+
# DELEGATED_ISSUER optional: a workplace (RH2) whose delegated tokens open published panes and folders and
|
|
14
|
+
# bound sessions; its keys are at <issuer>/.well-known/jwks.json
|
|
6
15
|
name = "supercode-teams"
|
|
7
16
|
main = "index.mjs"
|
|
8
17
|
compatibility_date = "2026-09-01"
|
|
9
18
|
compatibility_flags = ["nodejs_compat"]
|
|
10
|
-
|
|
11
|
-
[vars]
|
|
12
|
-
PUBLIC_ORIGIN = "https://supercode-teams.example.workers.dev"
|
|
13
|
-
INIT_TEAM = "Team"
|
|
14
|
-
# Optional: members sign in with Volter (supercode teams login --volter); the
|
|
15
|
-
# issuer must have this origin registered as a resource.
|
|
16
|
-
# VOLTER_ISSUER = "https://id.volter.ai"
|
|
17
|
-
# Optional: a workplace (RH2) whose delegated tokens open one pane or folder in the
|
|
18
|
-
# hosted viewer (/view); its keys are at <issuer>/.well-known/jwks.json.
|
|
19
|
-
# DELEGATED_ISSUER = "https://pilot.runhuman.com"
|
|
19
|
+
keep_vars = true
|
|
20
20
|
|
|
21
21
|
[[durable_objects.bindings]]
|
|
22
22
|
name = "TEAMS_SERVER"
|