sprag-cli 3.80.0 → 3.80.2
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/README.ko.md +1 -1
- package/README.md +1 -1
- package/docs/TEAM.ko.md +5 -5
- package/docs/TEAM.md +5 -5
- package/package.json +1 -1
- package/src/commands/team.js +4 -4
- package/src/formatters/statusline.js +5 -2
- package/src/team-sync.js +3 -1
package/README.ko.md
CHANGED
|
@@ -258,7 +258,7 @@ sprag feedback "Bedrock에서 5m TTL 칩이 사라지지 않아요"
|
|
|
258
258
|
|
|
259
259
|
## 팀
|
|
260
260
|
|
|
261
|
-
CLI는 무료이고 컴퓨터 한 대에서 혼자 동작합니다. 조직에는 **Sprag Pro** 와 **Sprag Enterprise** 가 같은 로컬 세션 로그로 만든 공용 대시보드를 더해 줍니다. 도입은 [
|
|
261
|
+
CLI는 무료이고 컴퓨터 한 대에서 혼자 동작합니다. 조직에는 **Sprag Pro** 와 **Sprag Enterprise** 가 같은 로컬 세션 로그로 만든 공용 대시보드를 더해 줍니다. 도입은 [support@sprag.io](mailto:support@sprag.io)로 문의해 주세요.
|
|
262
262
|
|
|
263
263
|
### Pro: 팀 대시보드
|
|
264
264
|
|
package/README.md
CHANGED
|
@@ -312,7 +312,7 @@ For a bug, please include the tool version (`sprag --version`) and your OS. For
|
|
|
312
312
|
|
|
313
313
|
## Teams
|
|
314
314
|
|
|
315
|
-
The CLI is free and works on its own on one machine. For organizations, **Sprag Pro** and **Sprag Enterprise** add a shared dashboard built from the same local session logs. To start, write to [
|
|
315
|
+
The CLI is free and works on its own on one machine. For organizations, **Sprag Pro** and **Sprag Enterprise** add a shared dashboard built from the same local session logs. To start, write to [support@sprag.io](mailto:support@sprag.io).
|
|
316
316
|
|
|
317
317
|
### Pro: team dashboard
|
|
318
318
|
|
package/docs/TEAM.ko.md
CHANGED
|
@@ -24,7 +24,7 @@ Sprag 은 기본적으로 로컬에서만 동작합니다. 팀 기능은 켜야
|
|
|
24
24
|
|
|
25
25
|
하루 단위 집계 업로드는 마지막 성공 이후 5분에 한 번 이하로 실행됩니다. SessionStart 훅(그리고 작은 로컬 파일만 읽는 프롬프트 훅)이 띄운 분리된 자식 프로세스가 보냅니다. 네트워크가 끊기는 등 동기화가 실패하면 5분 주기 대신 15분, 30분, 60분 뒤에 다시 시도합니다(최대 60분 간격). 마지막으로 올린 날짜를 기억해 두었다가 그 전날부터 최대 30일 치를 다시 보내므로, 며칠 꺼져 있던 컴퓨터도 처음 성공하는 동기화에서 빠진 날을 따라잡습니다. 하루 단위 행은 덮어쓰기라 다시 보내도 안전합니다. 프롬프트 수집을 켠 엔터프라이즈 팀의 프롬프트 업로드는 따로 30분 타이머로 움직입니다("프롬프트 사용량 (엔터프라이즈)" 절 참고). statusline 을 그리는 경로에서는 절대 실행되지 않습니다.
|
|
26
26
|
|
|
27
|
-
팀에 참여한 동안 statusline 에 `team` 칩이 나타나 멤버 ID 와 가상 사무실(Sprag 타운)에서 받은 동물을 보여 줍니다. 예를 들면 `member-1e500474 🦊
|
|
27
|
+
팀에 참여한 동안 statusline 에 `team` 칩이 나타나 멤버 ID 와 가상 사무실(Sprag 타운)에서 받은 동물을 보여 줍니다. 예를 들면 `member-1e500474 🦊 여우 12명 중 3위` 처럼 조직에서 순위에 오른 사람 가운데 몇 위인지도 함께 보여 줍니다. 동물은 5분마다 도는 전체 동기화가 서버에서 받아 `team.json` 에 저장한 순위로 정합니다. 서버가 아직 이 기능을 지원하지 않거나 마지막으로 받은 지 하루가 넘었다면 멤버 ID 만 표시합니다. 칩을 그릴 때는 로컬 파일만 읽습니다. 버전 칩 바로 앞에 놓이며, `--segments team` 으로 이 칩만 따로 볼 수 있습니다.
|
|
28
28
|
|
|
29
29
|
목적지는 `https://hiycfjwswtkixyoqkznm.supabase.co/rest/v1/rpc/*` 입니다(Supabase, ap-northeast-2 리전). 호출하는 RPC 는 `team_join`, `ledger_upsert`, `team_rules_get`, `team_rule_propose`, `team_leave`, `prompt_chunk_put`(엔터프라이즈 프롬프트 수집일 때만), `member_set_sync`(업로드 스위치 상태 호출, "업로드 스위치" 참고), `member_set_info`(OS 이름과 버전, `arch` 인자는 항상 빈 값), `member_standing`(statusline 칩에 쓸 본인의 사무실 동물과 순위만 받고 다른 사람의 수치는 받지 않음) 입니다.
|
|
30
30
|
|
|
@@ -102,14 +102,14 @@ Sprag 은 룰을 `~/.claude/ratchet-team.md`(Codex 는 `<CODEX_HOME>/ratchet-tea
|
|
|
102
102
|
|
|
103
103
|
## 조직과 좌석
|
|
104
104
|
|
|
105
|
-
모든 팀은 조직에 속하고, 좌석은 팀이 아니라 조직 단위로 구매합니다. 조직은 Sprag만 개설합니다.
|
|
105
|
+
모든 팀은 조직에 속하고, 좌석은 팀이 아니라 조직 단위로 구매합니다. 조직은 Sprag만 개설합니다. support@sprag.io 로 문의하면 슈퍼유저가 sprag.io/ops/ 에서 조직을 열고 첫 오너를 이메일로 지정하며, 그다음부터 오너와 어드민이 그 안에 팀을 만듭니다. 오너 이메일은 필수이고 계정이 미리 없어도 됩니다. 한 번도 로그인한 적 없는 이메일이면 Sprag가 초대로 보관해 두었다가, 그 사람이 https://sprag.io/team/ 에 그 이메일로 처음 로그인하는 순간 오너가 됩니다.
|
|
106
106
|
|
|
107
107
|
컴퓨터 한 대는 조직마다 좌석 하나를 씁니다. `sprag team leave` 뒤에 다시 참여하거나, 재설치하거나, 같은 조직의 다른 팀 초대로 참여해도 서버가 기기 ID로 예전 행을 찾아 초대받은 팀으로 옮기고 멤버 키만 새로 발급합니다. 행도 좌석도 두 개가 되지 않습니다. 다른 조직에 참여하면 그 조직의 좌석을 따로 씁니다.
|
|
108
108
|
|
|
109
109
|
- **좌석이란.** 팀을 떠나지 않았고, 최근 30일 안에 무엇이든 보냈거나 업로드를 멈춘 상태인 컴퓨터 한 대(멤버 키 하나)입니다. 멈추지 않았는데 30일 넘게 연락이 없는 컴퓨터는 좌석을 차지하지 않습니다. 떠난 멤버도 세지 않습니다.
|
|
110
110
|
- **두 번째 컴퓨터.** 같은 사람이 컴퓨터 두 대를 쓰면 오너나 어드민이 두 번째 컴퓨터를 첫 번째에 합쳐 좌석 하나를 같이 쓰게 할 수 있습니다. 대시보드의 멤버 행에서 "좌석 합치기"를 누르고, "합치기 해제"를 누르면 다시 따로 셉니다. 합쳐진 행에는 "OO님과 자리를 같이 씁니다"가 보입니다.
|
|
111
111
|
- **한도.** 조직마다 좌석 한도가 있고, 한도를 넘는 참여는 거절됩니다. `sprag team join` 은 "이 조직에 남은 좌석이 없습니다. 조직 오너나 어드민에게 좌석 추가를 요청한 뒤 다시 참여하세요"를 출력하고 종료 코드 1로 끝납니다. 환경 변수로 하는 자동 참여는 조용히 넘어갔다가 다음 세션 시작 때 다시 시도합니다. 한도를 현재 사용량보다 낮춰도 기존 멤버는 그대로 쓰고, Sprag가 다시 올릴 때까지 새 참여만 거절됩니다.
|
|
112
|
-
- **역할.** 권한 단계는 세 가지입니다. 슈퍼유저는 Sprag 직원이며 요금제와 좌석 한도를 정하고, 조직을 정지하고, 이메일로 오너를 추가하고(계정이 없으면 초대로 처리), sprag.io/ops/ 에서 모든 조직을 봅니다. 오너는 회사의 최상위 단계로, 어드민을 이메일로 지정하거나 해제하고(계정이 없으면 초대되며, 오너가 취소하거나 본인이 처음 로그인할 때까지 "첫 로그인 대기"로 표시됩니다) 어드민이 하는 일을 모두 합니다. 어드민은 회사의 관리 단계로, 팀을 만들고 구성원과 룰과 좌석을 관리합니다. 팀을 만든 사람에게도 특별한 권한이 없으며, 팀은 조직의 오너와 어드민, 그리고 슈퍼유저만 관리합니다. 오너와 어드민은 대시보드에서 좌석 한도를 볼 수 있습니다. 좌석을 늘리려면
|
|
112
|
+
- **역할.** 권한 단계는 세 가지입니다. 슈퍼유저는 Sprag 직원이며 요금제와 좌석 한도를 정하고, 조직을 정지하고, 이메일로 오너를 추가하고(계정이 없으면 초대로 처리), sprag.io/ops/ 에서 모든 조직을 봅니다. 오너는 회사의 최상위 단계로, 어드민을 이메일로 지정하거나 해제하고(계정이 없으면 초대되며, 오너가 취소하거나 본인이 처음 로그인할 때까지 "첫 로그인 대기"로 표시됩니다) 어드민이 하는 일을 모두 합니다. 어드민은 회사의 관리 단계로, 팀을 만들고 구성원과 룰과 좌석을 관리합니다. 팀을 만든 사람에게도 특별한 권한이 없으며, 팀은 조직의 오너와 어드민, 그리고 슈퍼유저만 관리합니다. 오너와 어드민은 대시보드에서 좌석 한도를 볼 수 있습니다. 좌석을 늘리려면 support@sprag.io 로 문의합니다.
|
|
113
113
|
|
|
114
114
|
관리하는 조직 안에 팀을 만들려면 `sprag team create --org <조직 ID>` 를 씁니다. 조직은 Sprag만 개설하므로 `--org` 없이 실행하면 서버가 거절합니다. 명령은 조직 이름과 사용 중인 좌석 수를 함께 출력하고, `sprag team status` 는 조직 이름을 보여 줍니다.
|
|
115
115
|
|
|
@@ -119,7 +119,7 @@ Sprag 은 룰을 `~/.claude/ratchet-team.md`(Codex 는 `<CODEX_HOME>/ratchet-tea
|
|
|
119
119
|
|
|
120
120
|
## 대시보드
|
|
121
121
|
|
|
122
|
-
https://sprag.io/team/ 에서 등록된 오너나 어드민이 이메일 코드로 로그인하고, 팀을 만들고, 초대 토큰을 받습니다. 새 조직은
|
|
122
|
+
https://sprag.io/team/ 에서 등록된 오너나 어드민이 이메일 코드로 로그인하고, 팀을 만들고, 초대 토큰을 받습니다. 새 조직은 support@sprag.io 로 문의합니다. 오너, 어드민, 초대 대기 중 어느 쪽에도 없는 이메일은 코드를 보내기 전에 거절하며, 조직 오너에게 추가를 요청하라고 안내합니다. 초대받은 사람은 처음 로그인할 때 자동으로 오너나 어드민이 됩니다. 여기서 구성원별 지출과 절감액을 보고, 규칙 탭에서 조직 룰과 팀 룰을 관리하고, 구성원을 내보낼 수 있습니다. 조직 패널에는 요금제, 한도 대비 사용 좌석, 어드민, 전체 팀이 보입니다. 슈퍼유저는 sprag.io/ops/ 에서 모든 조직을 봅니다.
|
|
123
123
|
|
|
124
124
|
대시보드 맨 위의 기간 선택(7일, 30일, 90일, 이번 달, 지난 달, 직접 선택)이 멤버 표, 사용량 차트, 프롬프트 사용량 탭의 기간을 정합니다. 기본값은 최근 30일이고, 내 컴퓨터의 달력 날짜를 쓰며 종료일도 포함합니다. 최대 365일까지 고를 수 있습니다. 고른 기간은 주소(`?from=2026-10-01&to=2026-10-18`)에 남으므로 새로고침하거나 링크를 공유해도 같은 기간이 보입니다. sprag.io/ops/ 슈퍼유저 콘솔에도 같은 선택이 있어 조직 표, 조직 머리말, 조직의 프롬프트 사용량에 적용됩니다.
|
|
125
125
|
|
|
@@ -142,7 +142,7 @@ https://sprag.io/team/ 에서 등록된 오너나 어드민이 이메일 코드
|
|
|
142
142
|
|
|
143
143
|
## 플랜
|
|
144
144
|
|
|
145
|
-
Free, 프로(좌석당 월 $5), 엔터프라이즈(좌석당 월 $10, 프롬프트 수집과 사용자별 프롬프트 사용량 포함)가 있습니다. 대량 구매나 연간 청구는 맞춤 계약이며
|
|
145
|
+
Free, 프로(좌석당 월 $5), 엔터프라이즈(좌석당 월 $10, 프롬프트 수집과 사용자별 프롬프트 사용량 포함)가 있습니다. 대량 구매나 연간 청구는 맞춤 계약이며 support@sprag.io 로 문의합니다. 자세한 내용은 https://sprag.io/pricing/ 에 있습니다.
|
|
146
146
|
|
|
147
147
|
## 프롬프트 사용량 (엔터프라이즈)
|
|
148
148
|
|
package/docs/TEAM.md
CHANGED
|
@@ -24,7 +24,7 @@ Not sent: prompts, transcripts, file paths, project names, rule text, API keys.
|
|
|
24
24
|
|
|
25
25
|
The daily aggregate upload runs at most once every 5 minutes after the last successful one, from a detached child process that the SessionStart hook (and the prompt hook, which only reads a small local file) spawns. If a sync fails, for example because the network is down, it is retried after 15, then 30, then 60 minutes (60 at most) instead of every 5 minutes. The CLI remembers the last day it uploaded and re-sends from the day before it, up to 30 days, so a machine that was offline for days catches up on its first successful sync. Re-sending a day is safe because each day is an upsert. The prompt upload of an Enterprise team with capture on has its own 30-minute timer (see "Prompt usage (Enterprise)"). It never runs on the statusline path.
|
|
26
26
|
|
|
27
|
-
While this machine is joined, the statusline shows a `team` chip with your member id and your animal from the virtual office (Sprag Town), for example `member-1e500474 🦊 Fox
|
|
27
|
+
While this machine is joined, the statusline shows a `team` chip with your member id and your animal from the virtual office (Sprag Town), for example `member-1e500474 🦊 Fox #3 of 12`, with your overall rank among the ranked people of the organization. The animal comes from the standing the full sync fetches every 5 minutes and stores in `team.json`; if the server does not offer it yet, or the last fetch is more than a day old, only the member id is shown. Rendering the chip reads local files only. It sits just before the version chip, and `--segments team` shows it on its own.
|
|
28
28
|
|
|
29
29
|
Destination: `https://hiycfjwswtkixyoqkznm.supabase.co/rest/v1/rpc/*` (Supabase, region ap-northeast-2). The calls are the RPCs `team_join`, `ledger_upsert`, `team_rules_get`, `team_rule_propose`, `team_leave`, `prompt_chunk_put` (Enterprise prompt capture only), `member_set_sync` (the upload-switch status call, see "The upload switch") `member_set_info` (OS name and version; the `arch` argument is always empty) and `member_standing` (your own office animal and rank for the statusline chip; it returns nobody else's figures); `sprag team create` also calls `team_create` with your sign-in session.
|
|
30
30
|
|
|
@@ -102,14 +102,14 @@ Sprag writes the rules to `~/.claude/ratchet-team.md` (Codex: `<CODEX_HOME>/ratc
|
|
|
102
102
|
|
|
103
103
|
## Organizations and seats
|
|
104
104
|
|
|
105
|
-
Every team belongs to an organization, and seats are bought per organization, not per team. Only Sprag opens organizations: write to
|
|
105
|
+
Every team belongs to an organization, and seats are bought per organization, not per team. Only Sprag opens organizations: write to support@sprag.io, and the superuser opens one at sprag.io/ops/ and names its first owner by email. The owner email is required, and the owner does not need an account yet: if the email has never signed in, Sprag keeps it as an invite, and the person becomes the owner the first time they sign in at https://sprag.io/team/ with that email. Owners and admins then create teams inside it.
|
|
106
106
|
|
|
107
107
|
A machine holds one seat per organization. When it joins again, with `sprag team join` after `sprag team leave`, after a reinstall, or with the invite of another team in the same organization, the server finds its earlier row by the machine ID, moves it to the invited team and issues a new member key; no second row and no second seat appear. Joins to a different organization take a seat there.
|
|
108
108
|
|
|
109
109
|
- **What a seat is.** One machine (one member key) that has not left and either sent anything in the last 30 days or is paused. A machine that has been silent for 30 days or more without being paused holds no seat. Members who left are not counted.
|
|
110
110
|
- **Second machine.** When the same person uses two machines, an owner or admin can merge the second one into the first so the two share one seat. In the dashboard, use "Merge seat" on the member row; "Unmerge" gives it its own seat back. A merged row shows "shares a seat with <name>".
|
|
111
111
|
- **The limit.** Each organization has a seat limit. A join past the limit is refused: `sprag team join` exits 1 with "This organization has no free seat. Ask your organization owner or admin to add seats", and an environment auto-join stays silent and tries again at a later session start. Lowering the limit below current use never removes anyone; it only refuses new joins until Sprag raises it again.
|
|
112
|
-
- **Roles.** There are three permission levels. The superuser is Sprag staff: it sets the plan and the seat limit, suspends organizations, adds owners by email (an email without an account is invited), and sees every organization at sprag.io/ops/. An owner is a company's top level: it appoints and removes admins by email (an email without an account is invited and shown as waiting for its first sign-in until the owner cancels it or the person signs in), and does everything an admin does. An admin is a company's management level: it creates teams and manages members, rules and seats. The person who created a team has no special rights over it; only the organization's owners and admins and the superuser manage teams. Owners and admins see the seat limit in the dashboard. To add seats, write to
|
|
112
|
+
- **Roles.** There are three permission levels. The superuser is Sprag staff: it sets the plan and the seat limit, suspends organizations, adds owners by email (an email without an account is invited), and sees every organization at sprag.io/ops/. An owner is a company's top level: it appoints and removes admins by email (an email without an account is invited and shown as waiting for its first sign-in until the owner cancels it or the person signs in), and does everything an admin does. An admin is a company's management level: it creates teams and manages members, rules and seats. The person who created a team has no special rights over it; only the organization's owners and admins and the superuser manage teams. Owners and admins see the seat limit in the dashboard. To add seats, write to support@sprag.io.
|
|
113
113
|
- **The plan.** Sprag sets the plan (`pro` or `enterprise`) on the organization; owners and admins cannot change it. Prompt capture can be switched on only while the organization is on Enterprise. To change the plan, contact us.
|
|
114
114
|
|
|
115
115
|
Create a team inside an organization you administer from the CLI with `sprag team create --org <org-id>`; without `--org` the server refuses, because only Sprag opens organizations. The command prints the organization name and how many seats are used. `sprag team status` shows the organization name.
|
|
@@ -120,7 +120,7 @@ Create a team inside an organization you administer from the CLI with `sprag tea
|
|
|
120
120
|
|
|
121
121
|
## The dashboard
|
|
122
122
|
|
|
123
|
-
https://sprag.io/team/ is where a registered owner or admin signs in with an email code, creates a team and gets the invite token. A new organization starts by writing to
|
|
123
|
+
https://sprag.io/team/ is where a registered owner or admin signs in with an email code, creates a team and gets the invite token. A new organization starts by writing to support@sprag.io. An email that is not an owner, an admin or a pending invite is refused before any code is sent, with a message to ask the organization's owner to add it. Invited people become owner or admin automatically on their first sign-in. From there they see per-member spend and savings, manage organization and team rules on the Rules tab, and remove members. The organization panel shows the plan, seats used against the limit, admins and every team. The superuser sees every organization at sprag.io/ops/.
|
|
124
124
|
|
|
125
125
|
A date range control at the top of the dashboard (7d, 30d, 90d, This month, Last month or Custom) sets the period for the members table, the Usage chart and the prompt usage tab. It defaults to the last 30 days, uses your local calendar days with the end date included, and allows 365 days at most. The choice is kept in the page address (`?from=2026-10-01&to=2026-10-18`), so a reload or a shared link shows the same period. The superuser console at /ops/ has the same control for the organization table, the organization header and its prompt usage.
|
|
126
126
|
|
|
@@ -143,7 +143,7 @@ Below the roster, an activity log lists joined, paused, resumed, left, removed,
|
|
|
143
143
|
|
|
144
144
|
## Plans
|
|
145
145
|
|
|
146
|
-
Free, Pro ($5 per seat per month) and Enterprise ($10 per seat per month, with prompt capture and per-user prompt usage). Volume or annual invoicing is a custom agreement; write to
|
|
146
|
+
Free, Pro ($5 per seat per month) and Enterprise ($10 per seat per month, with prompt capture and per-user prompt usage). Volume or annual invoicing is a custom agreement; write to support@sprag.io. Details are on https://sprag.io/pricing/.
|
|
147
147
|
|
|
148
148
|
## Prompt usage (Enterprise)
|
|
149
149
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sprag-cli",
|
|
3
|
-
"version": "3.80.
|
|
3
|
+
"version": "3.80.2",
|
|
4
4
|
"description": "Model-delegation router for Claude Code and Codex: lookups, checks and test runs go to cheaper models, documents go in as compact Markdown, and a live statusline shows spend and savings.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/commands/team.js
CHANGED
|
@@ -40,12 +40,12 @@ const T = {
|
|
|
40
40
|
aborted: 'Not joined.',
|
|
41
41
|
joined: (n) => `Joined team "${n}". Check it with: sprag team status`,
|
|
42
42
|
seatLimit: 'This organization has no free seat. Ask your organization owner or admin to add seats, then join again.',
|
|
43
|
-
orgExpired: "This organization's paid term has ended, so the server no longer accepts uploads or joins. Ask your organization owner to renew it (
|
|
43
|
+
orgExpired: "This organization's paid term has ended, so the server no longer accepts uploads or joins. Ask your organization owner to renew it (support@sprag.io).",
|
|
44
44
|
org: 'Organization',
|
|
45
45
|
seats: (u, l) => `${u}/${l} seats used`,
|
|
46
46
|
orgCreated: (n, u, l) => `Organization: ${n}${u != null && l != null ? ` (${u}/${l} seats used)` : ''}`,
|
|
47
47
|
badOrg: '--org needs an organization id.',
|
|
48
|
-
noOrgCreate: 'Only Sprag opens new organizations. Pass --org <id> for an organization you administer (the id is on the dashboard), or write to
|
|
48
|
+
noOrgCreate: 'Only Sprag opens new organizations. Pass --org <id> for an organization you administer (the id is on the dashboard), or write to support@sprag.io to open one.',
|
|
49
49
|
left: 'Left the team. Nothing is uploaded any more.',
|
|
50
50
|
notJoined: 'Not in a team. Join with: sprag team join <token>',
|
|
51
51
|
team: 'Team', plan: 'Plan', capture: 'Prompt capture', name: 'Display name',
|
|
@@ -106,12 +106,12 @@ const T = {
|
|
|
106
106
|
aborted: '참여하지 않았습니다.',
|
|
107
107
|
joined: (n) => `팀 "${n}" 에 참여했습니다. 확인: sprag team status`,
|
|
108
108
|
seatLimit: '이 조직에 남은 좌석이 없습니다. 조직 오너나 어드민에게 좌석 추가를 요청한 뒤 다시 참여하세요',
|
|
109
|
-
orgExpired: '조직의 이용 기간이 끝나 서버가 업로드와 참여를 받지 않습니다. 조직 오너에게 연장을 요청하세요(
|
|
109
|
+
orgExpired: '조직의 이용 기간이 끝나 서버가 업로드와 참여를 받지 않습니다. 조직 오너에게 연장을 요청하세요(support@sprag.io)',
|
|
110
110
|
org: '조직',
|
|
111
111
|
seats: (u, l) => `좌석 ${u}/${l} 사용 중`,
|
|
112
112
|
orgCreated: (n, u, l) => `조직: ${n}${u != null && l != null ? ` (좌석 ${u}/${l} 사용 중)` : ''}`,
|
|
113
113
|
badOrg: '--org 에는 조직 ID 가 필요합니다',
|
|
114
|
-
noOrgCreate: '새 조직은 Sprag가 개설합니다. 관리하는 조직이 있으면 --org <ID> 를 붙여 주세요(ID 는 대시보드에 있습니다). 조직 개설은
|
|
114
|
+
noOrgCreate: '새 조직은 Sprag가 개설합니다. 관리하는 조직이 있으면 --org <ID> 를 붙여 주세요(ID 는 대시보드에 있습니다). 조직 개설은 support@sprag.io 로 문의해 주세요.',
|
|
115
115
|
left: '팀에서 나왔습니다. 이제 아무것도 업로드하지 않습니다.',
|
|
116
116
|
notJoined: '참여한 팀이 없습니다. 참여하려면: sprag team join <토큰>',
|
|
117
117
|
team: '팀', plan: '플랜', capture: '프롬프트 수집', name: '표시 이름',
|
|
@@ -371,7 +371,7 @@ const TEAM_STANDING_MAX_AGE_MS = 24 * 60 * 60 * 1000;
|
|
|
371
371
|
|
|
372
372
|
/**
|
|
373
373
|
* Team chip: the member id and, once the server has told us, the animal that
|
|
374
|
-
* member is in the team's virtual office (`member-1e500474 🦊 Fox`). Renders only
|
|
374
|
+
* member is in the team's virtual office and the rank (`member-1e500474 🦊 Fox #3 of 12`). Renders only
|
|
375
375
|
* for a joined machine. A missing, unknown or day-old standing leaves just the
|
|
376
376
|
* member label. Gray like the other identity chips; the emoji brings its own colour.
|
|
377
377
|
*/
|
|
@@ -380,7 +380,10 @@ function buildTeamSeg(team, c, now = Date.now()) {
|
|
|
380
380
|
const st = team.standing;
|
|
381
381
|
const fresh = st && Number.isFinite(st.fetchedAt) && now - st.fetchedAt <= TEAM_STANDING_MAX_AGE_MS;
|
|
382
382
|
const animal = fresh ? speciesLabel(st.grade, team.lang) : null;
|
|
383
|
-
|
|
383
|
+
// The rank among the ranked people, the same standing the office drawer shows; a ghost has none.
|
|
384
|
+
const ranked = animal && Number.isInteger(st.rank) && Number.isInteger(st.ranked) && st.rank >= 1 && st.ranked >= st.rank;
|
|
385
|
+
const place = ranked ? (team.lang === 'ko' ? ` ${st.ranked}명 중 ${st.rank}위` : ` #${st.rank} of ${st.ranked}`) : '';
|
|
386
|
+
return `${c(GRAY)}${team.label}${animal ? ` ${animal}${place}` : ''}${c(RESET)}`;
|
|
384
387
|
}
|
|
385
388
|
|
|
386
389
|
/**
|
package/src/team-sync.js
CHANGED
|
@@ -107,7 +107,9 @@ export function readTeamChip({ dir = userDataDir() } = {}) {
|
|
|
107
107
|
return {
|
|
108
108
|
label,
|
|
109
109
|
lang: userLanguage(),
|
|
110
|
-
standing: st && typeof st.grade === 'string'
|
|
110
|
+
standing: st && typeof st.grade === 'string'
|
|
111
|
+
? { grade: st.grade, rank: Number.isFinite(st.rank) ? st.rank : null, ranked: Number.isFinite(st.ranked) ? st.ranked : null, fetchedAt: Number(st.fetchedAt) || 0 }
|
|
112
|
+
: null,
|
|
111
113
|
};
|
|
112
114
|
} catch (e) { debug('team-sync', e); return null; }
|
|
113
115
|
}
|