rvlib-shipkit 2.13.0 → 2.15.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/CHANGELOG.md +38 -13
- package/package.json +1 -1
- package/src/assets/run-assets.ts +2 -2
- package/src/assets/server/studio-server.ts +27 -23
- package/src/check.ts +3 -3
- package/src/checks/SK001-package-json-shape.check.ts +4 -4
- package/src/checks/SK002-contracts-fulfillness.check.ts +2 -2
- package/src/checks/SK003-claude-md-shape.check.ts +19 -12
- package/src/checks/SK004-gitignore-policy.check.ts +18 -4
- package/src/checks/SK005-rvlib-versions.check.ts +1 -1
- package/src/checks/SK006-npm-publish-safety.check.ts +3 -3
- package/src/checks/SK007-github-visibility.check.ts +2 -2
- package/src/checks/SK008-reviewer-agent.check.ts +1 -1
- package/src/checks/SK010-undeclared-unit.check.ts +2 -2
- package/src/checks/SK011-sibling-unit-ranges.check.ts +2 -2
- package/src/checks/SK012-config-barrel-import.check.ts +1 -1
- package/src/checks/SK013-one-way-in-policy.check.ts +2 -2
- package/src/checks/SK015-nested-repo.check.ts +2 -2
- package/src/checks/SK016-legacy-check-shapes.check.ts +2 -2
- package/src/checks/SK017-vscode-hub-task.check.ts +2 -2
- package/src/checks/SK018-test-files-run.check.ts +2 -2
- package/src/checks/SK019-tests-run-in-units.check.ts +2 -2
- package/src/checks/SK020-self-spawning-check.check.ts +2 -2
- package/src/checks/SK022-machine-runs-the-pin.check.ts +2 -2
- package/src/checks/SK024-identity-colors.check.ts +1 -1
- package/src/checks/SK025-release-drift.check.ts +2 -2
- package/src/checks/SK026-asks-autoclose.check.ts +2 -2
- package/src/checks/SK027-agent-wiki-links.check.ts +8 -2
- package/src/checks/SK028-readme.check.ts +2 -2
- package/src/checks/SK029-explicit-check-files.check.ts +3 -3
- package/src/checks/SK030-cache-audit.check.ts +7 -5
- package/src/checks/SK031-trace-audit.check.ts +7 -7
- package/src/checks/SK032-ignored-inputs.check.ts +3 -3
- package/src/checks/SK033-global-contribution.check.ts +11 -4
- package/src/checks/SK034-commit-gates-armed.check.ts +2 -2
- package/src/checks/SK035-public-clean.check.ts +4 -4
- package/src/checks/SK036-draft-media-size.check.ts +2 -2
- package/src/checks/SK037-keyword-additions.check.ts +43 -0
- package/src/cli/cmd_Backup.ts +2 -2
- package/src/cli/cmd_Commands.ts +4 -4
- package/src/cli/cmd_ConfigKeys.ts +2 -2
- package/src/cli/cmd_Drill.ts +30 -1
- package/src/cli/cmd_Home.ts +1 -1
- package/src/cli/cmd_Init.ts +1 -1
- package/src/cli/cmd_Media.ts +5 -5
- package/src/cli/cmd_Mv.ts +14 -7
- package/src/cli/cmd_Review.ts +2 -2
- package/src/cli/cmd_Smoke.ts +1 -1
- package/src/cli/cmd_Social.ts +3 -3
- package/src/cli/cmd_Sound.ts +1 -1
- package/src/cli/cmd_TraceAudit.ts +6 -6
- package/src/cli/cmd_Trailer.ts +2 -2
- package/src/cli/cmd_Veille.ts +2 -2
- package/src/cli/cmd_When.ts +2 -2
- package/src/cli/family-pages.ts +19 -19
- package/src/cli/registry.ts +2 -1
- package/src/collections/collection-types.ts +2 -2
- package/src/collections/review.ts +1 -1
- package/src/comfy/comfy-panel.ts +2 -2
- package/src/contracts/manifests/discord.contract.ts +1 -1
- package/src/contracts/manifests/identity.contract.ts +1 -1
- package/src/contracts/manifests/itch.contract.ts +1 -1
- package/src/contracts/manifests/steam.contract.ts +1 -1
- package/src/core/agent-dir-at.ts +12 -0
- package/src/core/agent-dir.ts +28 -0
- package/src/core/budget.ts +1 -1
- package/src/core/canonical-scripts.ts +2 -2
- package/src/core/discover-checks.ts +1 -1
- package/src/core/global-contribution.ts +4 -1
- package/src/core/ignored-block.ts +1 -1
- package/src/core/ignored-inputs.ts +3 -2
- package/src/core/layout.ts +3 -3
- package/src/core/loop-watch.ts +1 -1
- package/src/core/motherhome.ts +2 -2
- package/src/core/one-way-in-policy.ts +8 -8
- package/src/core/run-ci.ts +3 -3
- package/src/core/runs-matrix.ts +1 -1
- package/src/core/slots.ts +14 -5
- package/src/core/trace-audit.ts +50 -9
- package/src/core/tree-rev.ts +1 -1
- package/src/drill/clean.ts +54 -0
- package/src/drill/run.ts +1 -1
- package/src/home/daemon-jobs.ts +1 -1
- package/src/home/global-context.ts +11 -8
- package/src/home/gui-app/ShipkitGui.swift +91 -2
- package/src/home/inbox-shape.ts +1 -1
- package/src/home/inbox.ts +1 -1
- package/src/home/pm-config.ts +4 -1
- package/src/home/pm-inputs.ts +2 -0
- package/src/home/resources.ts +7 -2
- package/src/home/run-pm.ts +1 -1
- package/src/home/serve-web.ts +2 -2
- package/src/hooks/commit-message.ts +1 -1
- package/src/hooks/hook-gates.ts +1 -1
- package/src/hooks/leak-guard.ts +61 -8
- package/src/hooks/run-hooks.ts +18 -18
- package/src/identities/identities.ts +1 -1
- package/src/identities/machine-route.ts +1 -1
- package/src/identities/machine.ts +1 -1
- package/src/init-repo.ts +2 -2
- package/src/ledger/gate-checks.ts +1 -1
- package/src/ledger/record-kept.ts +1 -1
- package/src/media-kinds.ts +1 -1
- package/src/media-store/backup/daemon.ts +1 -1
- package/src/media-store/backup/keys.ts +1 -1
- package/src/media-store/backup/manifest.ts +1 -1
- package/src/media-store/backup/restore.ts +1 -1
- package/src/media-store/backup/run.ts +1 -1
- package/src/media-store/backup/secret.ts +1 -1
- package/src/media-store/backup/snapshot.ts +1 -1
- package/src/media-store/backup/sources.ts +1 -1
- package/src/media-store/content.ts +1 -1
- package/src/media-store/daemon.ts +1 -1
- package/src/media-store/db.ts +1 -1
- package/src/media-store/fact.ts +1 -1
- package/src/media-store/hand.ts +1 -1
- package/src/media-store/kind.ts +1 -1
- package/src/media-store/purge.ts +1 -1
- package/src/media-store/put.ts +1 -1
- package/src/media-store/remote.ts +1 -1
- package/src/media-store/space.ts +1 -1
- package/src/mv/mv-md.ts +63 -22
- package/src/pages/forward.ts +1 -1
- package/src/pages/frame-client.ts +1 -1
- package/src/pages/routes.ts +1 -1
- package/src/pages/unit.ts +1 -1
- package/src/plan/planner.ts +1 -1
- package/src/plan/repo-source.ts +1 -1
- package/src/release/public-clean.ts +25 -7
- package/src/release/run-bump.ts +1 -1
- package/src/release/run-release.ts +3 -3
- package/src/repo-config.ts +23 -16
- package/src/review/anim.ts +1 -1
- package/src/review/auto.ts +1 -1
- package/src/review/cells.ts +15 -1
- package/src/review/format.ts +2 -2
- package/src/review/marks.ts +1 -1
- package/src/review/media-kind.ts +1 -1
- package/src/review/media-read.ts +1 -1
- package/src/review/model.ts +14 -4
- package/src/review/notes.ts +52 -4
- package/src/review/previews.ts +1 -1
- package/src/review/project.ts +1 -1
- package/src/review/role.ts +1 -1
- package/src/review/routes.ts +14 -2
- package/src/review/store.ts +2 -2
- package/src/review/threads.ts +1 -1
- package/src/review/trailer-desk.ts +3 -3
- package/src/review/trailer-media.ts +1 -1
- package/src/review/trailer-model.ts +1 -1
- package/src/review/trailer-routes.ts +1 -1
- package/src/review/trailer-shots.ts +1 -1
- package/src/review/unit.ts +1 -1
- package/src/scaffold/files/tsconfig.json +1 -1
- package/src/scaffold/project-scaffold.ts +1 -1
- package/src/serve/embed.ts +1 -1
- package/src/serve/hub-app/check-words.ts +1 -1
- package/src/serve/hub-app/frames-st.ts +1 -1
- package/src/serve/hub-app/hash-route.ts +1 -1
- package/src/serve/hub-app/home-st.ts +1 -1
- package/src/serve/hub-app/home-strip.css +1 -1
- package/src/serve/hub-app/hub-app.tsx +2 -2
- package/src/serve/hub-app/identities-st.ts +1 -1
- package/src/serve/hub-app/identities-view.tsx +5 -4
- package/src/serve/hub-app/identity-address.ts +1 -1
- package/src/serve/hub-app/inbox-st.ts +1 -1
- package/src/serve/hub-app/inbox-view.tsx +1 -1
- package/src/serve/hub-app/kept-cols.tsx +30 -0
- package/src/serve/hub-app/keys.ts +1 -1
- package/src/serve/hub-app/media-svc.ts +1 -1
- package/src/serve/hub-app/pages-frames.tsx +1 -1
- package/src/serve/hub-app/pages-svc.ts +1 -1
- package/src/serve/hub-app/projects-svc.ts +1 -1
- package/src/serve/hub-app/repo-st.ts +1 -1
- package/src/serve/hub-app/review/review-board.tsx +1 -1
- package/src/serve/hub-app/review/review-cells.tsx +3 -2
- package/src/serve/hub-app/review/review-page.tsx +5 -4
- package/src/serve/hub-app/review/review-st.ts +15 -7
- package/src/serve/hub-app/review/review-thread.tsx +52 -5
- package/src/serve/hub-app/review/review-views.tsx +50 -33
- package/src/serve/hub-app/review/thread-st.ts +79 -27
- package/src/serve/hub-app/review/trailer-page.tsx +5 -4
- package/src/serve/hub-app/review/trailer-st.ts +1 -1
- package/src/serve/hub-app/review.css +9 -1
- package/src/serve/hub-app/site/site-part.tsx +1 -1
- package/src/serve/hub-app/site/site-st.ts +1 -1
- package/src/serve/hub-app/social/calendar.tsx +1 -1
- package/src/serve/hub-app/social/comms-page.tsx +29 -5
- package/src/serve/hub-app/social/kit.tsx +1 -1
- package/src/serve/hub-app/social/post-card.tsx +1 -1
- package/src/serve/hub-app/social/social-model.ts +1 -1
- package/src/serve/hub-app/social/social-page.tsx +12 -5
- package/src/serve/hub-app/social/social-st.ts +31 -3
- package/src/serve/hub-app/social.css +1 -1
- package/src/serve/hub-app/stores/stores-page.tsx +5 -4
- package/src/serve/hub-app/stores/stores-st.ts +1 -1
- package/src/serve/hub-app/stores.css +1 -1
- package/src/serve/hub-app/tree-row.tsx +1 -1
- package/src/serve/hub-app/veille/veille-page.tsx +5 -4
- package/src/serve/hub-app/veille/veille-st.ts +1 -1
- package/src/serve/hub-app/veille.css +1 -1
- package/src/serve/hub-runtime.ts +6 -2
- package/src/serve/project-gutter-route.ts +1 -1
- package/src/shot/box.ts +5 -7
- package/src/shot/browser-slot.ts +18 -6
- package/src/shot/client.ts +1 -2
- package/src/shot/clip-encoder.ts +16 -13
- package/src/shot/film-box.ts +132 -28
- package/src/shot/shooter.ts +21 -2
- package/src/shot/stepped-clip.ts +1 -1
- package/src/site/desk.ts +2 -2
- package/src/site/routes.ts +1 -1
- package/src/site/unit.ts +1 -1
- package/src/social/card-drafts.ts +24 -0
- package/src/social/compose.ts +2 -2
- package/src/social/desk-index.ts +1 -1
- package/src/social/desk-wire.ts +1 -1
- package/src/social/drafts.ts +3 -3
- package/src/social/load.ts +14 -1
- package/src/social/media-facts.ts +1 -1
- package/src/social/media-kind.ts +1 -1
- package/src/social/media-limit.ts +1 -1
- package/src/social/media-of.ts +1 -1
- package/src/social/migrate.ts +1 -1
- package/src/social/post-url.ts +1 -1
- package/src/social/presence.ts +2 -2
- package/src/social/public-read.ts +1 -1
- package/src/social/publish/bluesky.ts +1 -1
- package/src/social/publish/discord.ts +1 -1
- package/src/social/push.ts +10 -4
- package/src/social/richtext.ts +1 -1
- package/src/social/routes.ts +10 -4
- package/src/social/stats.ts +1 -1
- package/src/social/text.ts +1 -1
- package/src/social/tracker-route.ts +1 -1
- package/src/social/tracker.ts +1 -1
- package/src/social/unit.ts +1 -1
- package/src/social/writes.ts +1 -1
- package/src/stores/collection.ts +1 -1
- package/src/stores/desk.ts +1 -1
- package/src/stores/model.ts +1 -1
- package/src/stores/routes.ts +1 -1
- package/src/stores/unit.ts +1 -1
- package/src/suite/judge-suites.ts +1 -1
- package/src/trace/tracer.ts +12 -5
- package/src/trailer/adapter.ts +1 -1
- package/src/trailer/build.ts +6 -4
- package/src/trailer/holes.ts +1 -1
- package/src/trailer/passage.ts +1 -1
- package/src/trailer/prune.ts +1 -1
- package/src/trailer/states.ts +1 -1
- package/src/trailer/versions.ts +1 -1
- package/src/trailer/words.ts +1 -1
- package/src/tui/run-tui.ts +1 -1
- package/src/tui/tui-store.ts +1 -1
- package/src/veille/asks.ts +1 -1
- package/src/veille/auto.ts +1 -1
- package/src/veille/batch.ts +1 -1
- package/src/veille/chrome.ts +1 -1
- package/src/veille/collection.ts +1 -1
- package/src/veille/desk.ts +1 -1
- package/src/veille/identity.ts +1 -1
- package/src/veille/import.ts +1 -1
- package/src/veille/log.ts +1 -1
- package/src/veille/platforms.ts +1 -1
- package/src/veille/reads.ts +1 -1
- package/src/veille/replied.ts +1 -1
- package/src/veille/routes.ts +2 -2
- package/src/veille/watch.ts +1 -1
- package/src/veille/worth.ts +2 -2
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
// a repo's Social page (`#page:social`, wiki
|
|
1
|
+
// a repo's Social page (`#page:social`, wiki tools/shipkit/social.md, The desks in the hub): the identity the repo
|
|
2
2
|
// speaks as on the left, open on its company and its accounts with their places; in the middle the identity, the
|
|
3
3
|
// company or the account (its head, what can be automated, its setup, its messages); on the right its pictures, its
|
|
4
4
|
// payouts, its profile or the place's rules. Its parts are the home's identity view too (identities-view.tsx). Green
|
|
5
5
|
// is only ever a link he pasted
|
|
6
6
|
import { observer } from 'mobx-react-lite'
|
|
7
7
|
import { useEffect, type CSSProperties } from 'react'
|
|
8
|
-
import {
|
|
8
|
+
import { Panel, Separator } from 'react-resizable-panels'
|
|
9
|
+
import { KeptCols } from '../kept-cols.tsx'
|
|
9
10
|
import { plainClick } from '../home-st.ts'
|
|
10
11
|
import type { RepoSt } from '../repo-st.ts'
|
|
11
12
|
import { PANEL, PhoneTop } from '../review/review-page.tsx'
|
|
@@ -47,7 +48,7 @@ export const SocialPage = observer(({ app }: { app: RepoSt }) => {
|
|
|
47
48
|
)
|
|
48
49
|
return (
|
|
49
50
|
<div className="so-page">
|
|
50
|
-
<
|
|
51
|
+
<KeptCols id="social">
|
|
51
52
|
<Panel id="social-list" defaultSize="22%" minSize={240} className="rv-pane" style={PANEL}>
|
|
52
53
|
<IdentityList so={so} />
|
|
53
54
|
</Panel>
|
|
@@ -63,7 +64,7 @@ export const SocialPage = observer(({ app }: { app: RepoSt }) => {
|
|
|
63
64
|
<Right so={so} />
|
|
64
65
|
</div>
|
|
65
66
|
</Panel>
|
|
66
|
-
</
|
|
67
|
+
</KeptCols>
|
|
67
68
|
<Lightbox so={so} />
|
|
68
69
|
<Toast so={so} />
|
|
69
70
|
</div>
|
|
@@ -347,7 +348,8 @@ const YOUTUBE_AREAS = [
|
|
|
347
348
|
{ w: 1546, label: 'phone', cls: ' phone' },
|
|
348
349
|
]
|
|
349
350
|
|
|
350
|
-
/** one picture: the image (a clip plays muted), its name and size, « copy
|
|
351
|
+
/** one picture: the image (a clip plays muted), its name and size, « copy », « ⬇ » and 📂 the Finder (the desktop has
|
|
352
|
+
* one, a phone none); `width` a tile, else full width */
|
|
351
353
|
const PictureTile = observer(({ so, i, f, width, tile }: { so: SocialSt; i: DeskIdentity; f: Picture; width?: number; tile?: boolean }) => {
|
|
352
354
|
const { url, clip } = so.picture(i, f)
|
|
353
355
|
const size = f.w !== null ? ` · ${f.w}×${f.h}` : ''
|
|
@@ -377,6 +379,11 @@ const PictureTile = observer(({ so, i, f, width, tile }: { so: SocialSt; i: Desk
|
|
|
377
379
|
<a className="so-icon" href={url} download={fileName(f.file)} title="download">
|
|
378
380
|
⬇
|
|
379
381
|
</a>
|
|
382
|
+
{!so.phone ? (
|
|
383
|
+
<button className="so-icon" onClick={() => void so.revealPicture(i.id, f.file)} title={`show ${fileName(f.file)} in the Finder`}>
|
|
384
|
+
📂
|
|
385
|
+
</button>
|
|
386
|
+
) : null}
|
|
380
387
|
</div>
|
|
381
388
|
</div>
|
|
382
389
|
)
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
// the Communications and Social pages as state (wiki
|
|
1
|
+
// the Communications and Social pages as state (wiki tools/shipkit/social.md, The desks in the hub): one desk read from
|
|
2
2
|
// the hub for both, what each page picked, the list's view, the folds he set, the editor, his notes, the writes. A
|
|
3
3
|
// pick goes through RepoSt (showComms, showSocial), the one writer of the address
|
|
4
4
|
import { makeAutoObservable, runInAction } from 'mobx'
|
|
5
5
|
import { compose, messageLength } from '../../../social/compose.ts'
|
|
6
6
|
import { deskOfWire, type Wire } from '../../../social/desk-wire.ts'
|
|
7
|
+
import type { AskedPost } from '../../../review/notes.ts'
|
|
7
8
|
import { identityAddress } from '../identity-address.ts'
|
|
8
9
|
import { SEARCH_KEY } from '../keys.ts'
|
|
9
10
|
import { reach } from '../reach.ts'
|
|
@@ -125,6 +126,8 @@ export class SocialSt {
|
|
|
125
126
|
/** the headings open in the editor, `<heading key>/<slug>` */
|
|
126
127
|
edits: Record<string, DraftEdit> = {}
|
|
127
128
|
notes: Record<string, DraftNote[]> = {}
|
|
129
|
+
/** the posts he asked from a review card that no draft answers yet (« 📣 post »), oldest first */
|
|
130
|
+
asked: AskedPost[] = []
|
|
128
131
|
toast: string | null = null
|
|
129
132
|
/** the phone shows one pane at a time: the list, or what it opened */
|
|
130
133
|
phonePane: 'list' | 'detail' = 'list'
|
|
@@ -184,6 +187,7 @@ export class SocialSt {
|
|
|
184
187
|
this.trackerTimer = setInterval(() => void this.loadTracker(), TRACKER_MS)
|
|
185
188
|
}
|
|
186
189
|
void this.load()
|
|
190
|
+
void this.loadAsked()
|
|
187
191
|
void this.loadStats()
|
|
188
192
|
void this.loadTracker()
|
|
189
193
|
}
|
|
@@ -260,7 +264,10 @@ export class SocialSt {
|
|
|
260
264
|
}
|
|
261
265
|
}
|
|
262
266
|
|
|
263
|
-
private readonly onBack = (): void =>
|
|
267
|
+
private readonly onBack = (): void => {
|
|
268
|
+
void this.load()
|
|
269
|
+
void this.loadAsked()
|
|
270
|
+
}
|
|
264
271
|
|
|
265
272
|
/** what the page says while the desk is not read yet: never a bare « loading… » */
|
|
266
273
|
get waitText(): string {
|
|
@@ -887,8 +894,17 @@ export class SocialSt {
|
|
|
887
894
|
|
|
888
895
|
/** a media file shown in the Finder */
|
|
889
896
|
async reveal(slug: string, m: Media): Promise<void> {
|
|
897
|
+
await this.revealBody({ slug, name: m.name })
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
/** an identity's picture shown in the Finder, its folder open and the file selected */
|
|
901
|
+
async revealPicture(identity: string, file: string): Promise<void> {
|
|
902
|
+
await this.revealBody({ identity, file })
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
private async revealBody(body: Record<string, string>): Promise<void> {
|
|
890
906
|
try {
|
|
891
|
-
await postJson(this.st.url('/api/social/reveal'),
|
|
907
|
+
await postJson(this.st.url('/api/social/reveal'), body)
|
|
892
908
|
} catch (e) {
|
|
893
909
|
runInAction(() => (this.error = (e as Error).message))
|
|
894
910
|
}
|
|
@@ -938,6 +954,18 @@ export class SocialSt {
|
|
|
938
954
|
|
|
939
955
|
// ── his notes on a draft ─────────────────────────────────────────────
|
|
940
956
|
|
|
957
|
+
/** the post requests still open: the review store's, the same items the card's bar shows */
|
|
958
|
+
async loadAsked(): Promise<void> {
|
|
959
|
+
try {
|
|
960
|
+
const r = await reach(this.st.url('/api/social/asked'))
|
|
961
|
+
const body = (await r.json()) as { asked?: AskedPost[]; error?: string }
|
|
962
|
+
if (!r.ok) throw new Error(body.error ?? `HTTP ${r.status}`)
|
|
963
|
+
runInAction(() => (this.asked = body.asked ?? []))
|
|
964
|
+
} catch (e) {
|
|
965
|
+
runInAction(() => (this.error = (e as Error).message))
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
|
|
941
969
|
async loadNotes(slug: string): Promise<void> {
|
|
942
970
|
try {
|
|
943
971
|
const r = await reach(this.st.url(`/api/social/notes?slug=${encodeURIComponent(slug)}`))
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* the Communications and Social pages (hub-app/social/, wiki
|
|
1
|
+
/* the Communications and Social pages (hub-app/social/, wiki tools/shipkit/social.md): panel cards on the page's
|
|
2
2
|
ground, the hub's tokens. A platform's colour rides inline as --brand (data), a tone class sets --tone, so no rule
|
|
3
3
|
here writes a colour (tests/hub-css-invariants.test.ts) */
|
|
4
4
|
.so-page{flex:1;min-height:0;display:flex;flex-direction:column;height:100%}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
// a repo's stores page (`#page:stores`, wiki
|
|
1
|
+
// a repo's stores page (`#page:stores`, wiki tools/shipkit/stores.md, The page): the stores and their state on the
|
|
2
2
|
// left, the page's texts to paste in the middle, its pictures on the right, each with the lightbox, the Finder, a
|
|
3
3
|
// note, its family made again. On a phone the three stacked
|
|
4
4
|
import { observer } from 'mobx-react-lite'
|
|
5
5
|
import { useEffect, useState, type ReactNode } from 'react'
|
|
6
|
-
import {
|
|
6
|
+
import { Panel, Separator } from 'react-resizable-panels'
|
|
7
|
+
import { KeptCols } from '../kept-cols.tsx'
|
|
7
8
|
import { namesOf, toSteamMarkup, type Tone } from '../../../stores/model.ts'
|
|
8
9
|
import { editorHref } from '../check-words.ts'
|
|
9
10
|
import { renderMd } from '../md.ts'
|
|
@@ -31,7 +32,7 @@ export const StoresPage = observer(({ app }: { app: RepoSt }) => {
|
|
|
31
32
|
return (
|
|
32
33
|
<>
|
|
33
34
|
<Toast so={so} />
|
|
34
|
-
<
|
|
35
|
+
<KeptCols id="stores">
|
|
35
36
|
<Panel id="stores-list" defaultSize="20%" minSize={220} className="rv-pane" style={PANEL}>
|
|
36
37
|
<div className="rv-scroll"><StoreList so={so} /></div>
|
|
37
38
|
</Panel>
|
|
@@ -43,7 +44,7 @@ export const StoresPage = observer(({ app }: { app: RepoSt }) => {
|
|
|
43
44
|
<Panel id="stores-pictures" defaultSize="42%" minSize={340} className="rv-pane" style={PANEL}>
|
|
44
45
|
<div className="rv-scroll sto-ground"><StorePictures so={so} /></div>
|
|
45
46
|
</Panel>
|
|
46
|
-
</
|
|
47
|
+
</KeptCols>
|
|
47
48
|
<Lightbox so={so} />
|
|
48
49
|
</>
|
|
49
50
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// a repo's stores page as state (wiki
|
|
1
|
+
// a repo's stores page as state (wiki tools/shipkit/stores.md, The page): the desk read from the hub, the store
|
|
2
2
|
// picked, the section open in the editor, the capsules fitted or at their real size, the lightbox, a family made again
|
|
3
3
|
// with its log, his notes. The desk is read when the page opens, when the window comes back, and after each act
|
|
4
4
|
import { makeAutoObservable, runInAction } from 'mobx'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* the stores page (hub-app/stores/, wiki
|
|
1
|
+
/* the stores page (hub-app/stores/, wiki tools/shipkit/stores.md): white cards on the gray ground, the hub's tokens.
|
|
2
2
|
A tone class sets --tone and the parts read it, so no rule here writes a colour (tests/hub-css-invariants.test.ts) */
|
|
3
3
|
.t-ok{--tone:var(--ok)}.t-warn{--tone:var(--warn)}.t-red{--tone:var(--red)}.t-dim{--tone:var(--dim)}
|
|
4
4
|
.sto-wrap.t-ok,.sto-wrap.t-warn,.sto-wrap.t-red,.sto-count.t-red,.sto-picrow .t-red{color:var(--tone)}
|
|
@@ -56,7 +56,7 @@ export const SectionRowView = observer(({ app, row }: { app: RepoSt; row: TreeRo
|
|
|
56
56
|
)
|
|
57
57
|
})
|
|
58
58
|
|
|
59
|
-
/** a row of the repo's own pages (wiki
|
|
59
|
+
/** a row of the repo's own pages (wiki tools/shipkit/project-pages.md): drawn as a section, its icon its own, its
|
|
60
60
|
* badge the page's, its key ⌥⇧ and its letter; the first one draws the rule under shipkit's rows */
|
|
61
61
|
export const PageRowView = observer(({ app, row }: { app: RepoSt; row: TreeRow }) => {
|
|
62
62
|
const t = app.tree
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
// a repo's Veille page (`#page:veille`, wiki
|
|
1
|
+
// a repo's Veille page (`#page:veille`, wiki tools/shipkit/veille.md, The page): one column a platform, side by side
|
|
2
2
|
// like a deck, each grouped by the worth of a reply; the post picked and its reply on the right. On a phone the deck
|
|
3
3
|
// takes the top and scrolls sideways, the reply under it
|
|
4
4
|
import { observer } from 'mobx-react-lite'
|
|
5
5
|
import { useEffect, useState } from 'react'
|
|
6
|
-
import {
|
|
6
|
+
import { Panel, Separator } from 'react-resizable-panels'
|
|
7
|
+
import { KeptCols } from '../kept-cols.tsx'
|
|
7
8
|
import { BRANDS } from '../../../social/brands.ts'
|
|
8
9
|
import { COLUMNS, READER_QUIET_MS, replyUrl } from '../../../veille/platforms.ts'
|
|
9
10
|
import type { RepoSt } from '../repo-st.ts'
|
|
@@ -65,7 +66,7 @@ export const VeillePage = observer(({ app }: { app: RepoSt }) => {
|
|
|
65
66
|
return (
|
|
66
67
|
<>
|
|
67
68
|
<Toast v={v} />
|
|
68
|
-
<
|
|
69
|
+
<KeptCols id="veille">
|
|
69
70
|
<Panel id="veille-deck" defaultSize="72%" minSize={480} className="rv-pane" style={PANEL}>
|
|
70
71
|
<Deck v={v} />
|
|
71
72
|
</Panel>
|
|
@@ -75,7 +76,7 @@ export const VeillePage = observer(({ app }: { app: RepoSt }) => {
|
|
|
75
76
|
<ReplyPanel v={v} />
|
|
76
77
|
</div>
|
|
77
78
|
</Panel>
|
|
78
|
-
</
|
|
79
|
+
</KeptCols>
|
|
79
80
|
</>
|
|
80
81
|
)
|
|
81
82
|
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// the Veille page as state (wiki
|
|
1
|
+
// the Veille page as state (wiki tools/shipkit/veille.md, The page): the feed in columns, one a platform; the post picked
|
|
2
2
|
// and its reply; the window, the chips and the folds in the address, the columns' order in the browser. The feed is
|
|
3
3
|
// read again when its stamp moves (the log, a mark, a draft, an ask), every 2 s while the page shows
|
|
4
4
|
import { makeAutoObservable, runInAction } from 'mobx'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* the Veille page (hub-app/veille/, wiki
|
|
1
|
+
/* the Veille page (hub-app/veille/, wiki tools/shipkit/veille.md): a deck of columns, one a platform, the reply panel on
|
|
2
2
|
the right. A tone class sets --tone (the t-* of the hub's sheets, .t-review here) and the parts read it */
|
|
3
3
|
.t-review{--tone:var(--review)}
|
|
4
4
|
.vl-deckwrap{height:100%;display:flex;flex-direction:column;min-height:0}
|
package/src/serve/hub-runtime.ts
CHANGED
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
// Port of a hub serving on its own: --port > serve.port > a deterministic
|
|
16
16
|
// house-range default (4800-4979, hashed from the repo name, stable across
|
|
17
17
|
// launches; pin serve.port when two repos collide).
|
|
18
|
+
import { nestedAgentDir } from '../core/agent-dir.ts'
|
|
19
|
+
import { agentDirAt } from '../core/agent-dir-at.ts'
|
|
18
20
|
import { loopWatch } from '../core/loop-watch.ts'
|
|
19
21
|
import { existsSync, readFileSync, statSync } from 'fs'
|
|
20
22
|
import { homedir } from 'os'
|
|
@@ -156,8 +158,10 @@ export async function resolveHubDeps(root: string, boot: RepoConfig, io: ServeIo
|
|
|
156
158
|
const baseWiki = baseWikiRoot(root)
|
|
157
159
|
if (baseWiki != null)
|
|
158
160
|
graphs.push({ id: 'base', label: wikiLabel(baseWiki), title: wikiLabel(baseWiki), load: () => scanMdGraph({ root: baseWiki }), dir: baseWiki, lint: null })
|
|
159
|
-
|
|
160
|
-
|
|
161
|
+
// a nested agent folder (a folder of another wiki) shows in that wiki's graph
|
|
162
|
+
const agentDir = agentDirAt(root)
|
|
163
|
+
const agentRoot = join(root, agentDir)
|
|
164
|
+
if (!nestedAgentDir(agentDir) && existsSync(agentRoot))
|
|
161
165
|
graphs.push({ id: 'agent', label: 'agent/', title: `${c.name} agent/`, load: () => scanMdGraph({ root: agentRoot, index: c.serve?.agentIndex }), dir: agentRoot, lint: { root: agentRoot, index: c.serve?.agentIndex } })
|
|
162
166
|
// ONE page for every repo: the studio ALWAYS
|
|
163
167
|
// mounts — kit-less repos get an empty media section, never a second
|
|
@@ -95,7 +95,7 @@ export type ProjectRow = {
|
|
|
95
95
|
live: string | null
|
|
96
96
|
/** the colours its repo.config.ts declares (SK024), null when it declares none */
|
|
97
97
|
identity: Identity | null
|
|
98
|
-
/** the identity it speaks as (wiki
|
|
98
|
+
/** the identity it speaks as (wiki tools/shipkit/social.md): its `speaksAs`, else the default; null when none holds it */
|
|
99
99
|
speaksAs: string | null
|
|
100
100
|
/** its app icon cropped to the plate (core/app-icon.ts), what the folded rail draws; null with no mark */
|
|
101
101
|
appIcon: string | null
|
package/src/shot/box.ts
CHANGED
|
@@ -9,13 +9,9 @@
|
|
|
9
9
|
// browser launched on the Mac instead (the Mac is the machine the route protects).
|
|
10
10
|
import { createHash } from 'crypto'
|
|
11
11
|
import { readFileSync } from 'fs'
|
|
12
|
-
import { browserCap,
|
|
12
|
+
import { browserCap, browserSlot, filmBox, HERE_ENV } from './browser-slot.ts'
|
|
13
13
|
import { CDP_PORT } from './film-box.ts'
|
|
14
14
|
|
|
15
|
-
/** the box this machine films on for the repo, or null: a Mac whose repo names one, unless SK_FILM_HERE=1 */
|
|
16
|
-
export function filmBox(c: Pick<BrowserCap, 'box'> | null, env: Record<string, string | undefined> = process.env, platform = process.platform): string | null {
|
|
17
|
-
return c?.box != null && platform === 'darwin' && env[HERE_ENV] !== '1' ? c.box : null
|
|
18
|
-
}
|
|
19
15
|
|
|
20
16
|
/** the slice of playwright the route drives: a browser to connect to, its default context, a page's viewport */
|
|
21
17
|
type PwPage = { setViewportSize(v: { width: number; height: number }): Promise<void>; addInitScript(s: { content: string }): Promise<void>; close(): Promise<void> }
|
|
@@ -130,8 +126,10 @@ export async function openBrowser<B>(pw: Pw, o: { root?: string; who: string; ar
|
|
|
130
126
|
const version = (JSON.parse(readFileSync(Bun.resolveSync('playwright-core/package.json', import.meta.dir), 'utf8')) as { version: string }).version
|
|
131
127
|
const state = await boxUp(box, version, say)
|
|
132
128
|
const own: { p: ReturnType<typeof Bun.spawn> | null } = { p: null }
|
|
133
|
-
|
|
134
|
-
|
|
129
|
+
// the box's browser answers on the port up names (a replacement runs beside a draining one on another)
|
|
130
|
+
const port = Number(/ port (\d+)/.exec(state)?.[1] ?? CDP_PORT)
|
|
131
|
+
const cdp = localCdp(box) + (port - CDP_PORT)
|
|
132
|
+
await forward(box, ['-L', `${cdp}:127.0.0.1:${port}`], own)
|
|
135
133
|
const b = await pw.chromium.connectOverCDP(`http://127.0.0.1:${cdp}`)
|
|
136
134
|
say(`${o.who}: filming on ${box} (${state.split(' ').slice(0, 2).join(' ')}, ${Math.round(performance.now() - t)} ms to its browser)`)
|
|
137
135
|
const reached = new Set<number>()
|
package/src/shot/browser-slot.ts
CHANGED
|
@@ -9,12 +9,20 @@
|
|
|
9
9
|
// trailer's lanes are the cap) and never holds a slot for them.
|
|
10
10
|
import { existsSync } from 'fs'
|
|
11
11
|
import { dirname, join, resolve } from 'path'
|
|
12
|
-
import { browserPool, browsersProblem, DEFAULT_BROWSERS, takeSlot } from '../core/slots.ts'
|
|
12
|
+
import { browserPool, browsersProblem, DEFAULT_BOX_BROWSERS, DEFAULT_BROWSERS, takeSlot } from '../core/slots.ts'
|
|
13
13
|
|
|
14
14
|
/** one run films on this machine even though its repo names a box: the owner's switch when the box is off */
|
|
15
15
|
export const HERE_ENV = 'SK_FILM_HERE'
|
|
16
16
|
|
|
17
|
-
export type BrowserCap = { repo: string; cap: number; root: string; box: string | null }
|
|
17
|
+
export type BrowserCap = { repo: string; cap: number; root: string; box: { host: string; max: number } | null }
|
|
18
|
+
|
|
19
|
+
/** the box this machine films on for the repo, or null: a Mac whose repo names one, unless SK_FILM_HERE=1 */
|
|
20
|
+
export function filmBox(c: Pick<BrowserCap, 'box'> | null, env: Record<string, string | undefined> = process.env, platform = process.platform): string | null {
|
|
21
|
+
return c?.box != null && platform === 'darwin' && env[HERE_ENV] !== '1' ? c.box.host : null
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** how many browsers of the repo run at once where this run films: its box's cap there, else browsers.max */
|
|
25
|
+
export const filmingCap = (c: BrowserCap): number => (filmBox(c) != null ? c.box!.max : c.cap)
|
|
18
26
|
|
|
19
27
|
/** the nearest dir at or above `from` holding a repo.config.ts, or null */
|
|
20
28
|
function configRoot(from: string): string | null {
|
|
@@ -33,14 +41,15 @@ export async function browserCap(root?: string): Promise<BrowserCap | null> {
|
|
|
33
41
|
const c = await loadRepoConfig(at)
|
|
34
42
|
const bad = browsersProblem(c.browsers)
|
|
35
43
|
if (bad != null) throw new Error(`${join(at, 'repo.config.ts')}: ${bad}`)
|
|
36
|
-
|
|
44
|
+
const box = c.browsers?.box
|
|
45
|
+
return { repo: c.name, cap: c.browsers?.max ?? DEFAULT_BROWSERS, root: at, box: box == null ? null : { host: box.host, max: box.max ?? DEFAULT_BOX_BROWSERS } }
|
|
37
46
|
}
|
|
38
47
|
|
|
39
48
|
/** why `who` may not start a browser of this repo on this machine, or null: a repo filmed by its box never starts one
|
|
40
49
|
* on a Mac, unless the slot is the box route's own (its browser on the box) */
|
|
41
50
|
export function browserRefusal(c: Pick<BrowserCap, 'repo' | 'box'>, who: string, onBox: boolean, platform = process.platform, env: Record<string, string | undefined> = process.env): string | null {
|
|
42
51
|
if (c.box == null || onBox || platform !== 'darwin' || env[HERE_ENV] === '1') return null
|
|
43
|
-
return `${who}: ${c.repo} films on ${c.box} (repo.config.ts browsers.box), so no browser of it starts on this Mac: a browser goes through shot/box.ts openBrowser (${HERE_ENV}=1 films here for one run, the owner's call)`
|
|
52
|
+
return `${who}: ${c.repo} films on ${c.box.host} (repo.config.ts browsers.box), so no browser of it starts on this Mac: a browser goes through shot/box.ts openBrowser (${HERE_ENV}=1 films here for one run, the owner's call)`
|
|
44
53
|
}
|
|
45
54
|
|
|
46
55
|
/** wait for one of the repo's browser slots and hold it until the returned release (or this process ends), saying
|
|
@@ -52,10 +61,13 @@ export async function browserSlot(who: string, o: { root?: string; say?: (l: str
|
|
|
52
61
|
const no = browserRefusal(c, who, o.onBox === true)
|
|
53
62
|
if (no != null) throw new Error(no)
|
|
54
63
|
const say = o.say ?? ((l: string) => console.error(l))
|
|
55
|
-
|
|
64
|
+
// the box's browsers are a pool apart, sized by browsers.box.max
|
|
65
|
+
const box = o.onBox === true && c.box != null ? c.box : null
|
|
66
|
+
const [pool, cap, key] = box ? [browserPool(`${c.repo}@${box.host}`, box.max), box.max, 'browsers.box.max'] : [browserPool(c.repo, c.cap), c.cap, 'browsers.max']
|
|
67
|
+
const got = await takeSlot(pool, { repo: c.repo, check: who }, {
|
|
56
68
|
pollMs: o.pollMs ?? 250,
|
|
57
69
|
onWait: (held) =>
|
|
58
|
-
say(`${who}: waiting for a browser of ${c.repo}, all ${
|
|
70
|
+
say(`${who}: waiting for a browser of ${c.repo}${box ? ` on ${box.host}` : ''}, all ${cap} held (repo.config.ts ${key}): ${held.map((h) => `pid ${h.pid} (${h.check})`).join(', ') || 'a holder starting'}`),
|
|
59
71
|
})
|
|
60
72
|
if (got == null) throw new Error(`${who}: the browser slot wait of ${c.repo} stopped with no slot`)
|
|
61
73
|
return got.release
|
package/src/shot/client.ts
CHANGED
|
@@ -51,8 +51,7 @@ const quiet = (): void => {}
|
|
|
51
51
|
/** a repo whose browsers live on its box films there from a Mac (box.ts): on a Shooter of this process, connected to
|
|
52
52
|
* the box's warm browser, never on this machine's shot service; null when the repo films here */
|
|
53
53
|
async function onBox(who: string, i: ShotInput, log: (l: string) => void, run: (s: import('./shooter.ts').Shooter) => Promise<ShotDone>): Promise<ShotResult | null> {
|
|
54
|
-
const { browserCap } = await import('./browser-slot.ts')
|
|
55
|
-
const { filmBox } = await import('./box.ts')
|
|
54
|
+
const { browserCap, filmBox } = await import('./browser-slot.ts')
|
|
56
55
|
const cap = await browserCap(i.root)
|
|
57
56
|
if (cap == null || filmBox(cap) == null) return null
|
|
58
57
|
const { Shooter } = await import('./shooter.ts')
|
package/src/shot/clip-encoder.ts
CHANGED
|
@@ -72,17 +72,20 @@ export async function installClip(a: PageClipAsk): Promise<string | null> {
|
|
|
72
72
|
const height = even(canvas.height)
|
|
73
73
|
const blocks = Math.ceil(width / 16) * Math.ceil(height / 16)
|
|
74
74
|
const level = blocks <= 8192 ? '28' : blocks <= 36864 ? '33' : '34'
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
bitrateMode: '
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
75
|
+
const base: VideoEncoderConfig = { codec: `avc1.6400${level}`, width, height, framerate: a.fps, latencyMode: 'quality', avc: { format: 'annexb' } }
|
|
76
|
+
// a fixed quantizer where the encoder takes one; Windows' takes none, so there a variable bitrate of half a bit a
|
|
77
|
+
// pixel and frame (31 Mb/s at 1080p30)
|
|
78
|
+
let config: VideoEncoderConfig | null = null
|
|
79
|
+
for (const c of [
|
|
80
|
+
{ ...base, bitrateMode: 'quantizer', hardwareAcceleration: 'prefer-hardware' },
|
|
81
|
+
{ ...base, bitrateMode: 'variable', bitrate: Math.round(width * height * a.fps * 0.5), hardwareAcceleration: 'no-preference' },
|
|
82
|
+
] as VideoEncoderConfig[])
|
|
83
|
+
if ((await VideoEncoder.isConfigSupported(c)).supported) {
|
|
84
|
+
config = c
|
|
85
|
+
break
|
|
86
|
+
}
|
|
87
|
+
if (config == null) return `the page's H.264 encoder takes no ${width}x${height}, at a fixed quantizer or a variable bitrate`
|
|
88
|
+
const per = config.bitrateMode === 'quantizer' ? { avc: { quantizer: a.quantizer } } : {}
|
|
86
89
|
const box = canvas.getBoundingClientRect()
|
|
87
90
|
const canvasOfViewport = `${Math.round(box.width)}x${Math.round(box.height)} css px of ${innerWidth}x${innerHeight}`
|
|
88
91
|
const st: ClipState = { chunks: [], next: 0, failed: null, done: Promise.resolve({ frames: 0, repeated: 0, width, height, canvasOfViewport }) }
|
|
@@ -142,7 +145,7 @@ export async function installClip(a: PageClipAsk): Promise<string | null> {
|
|
|
142
145
|
if (last === drawn.frame) drawn.frame = null
|
|
143
146
|
}
|
|
144
147
|
const f = new VideoFrame(last, { timestamp: Math.round(n * us), duration: Math.round(us), visibleRect: rect })
|
|
145
|
-
enc.encode(f, { keyFrame: n % a.keyEvery === 0,
|
|
148
|
+
enc.encode(f, { keyFrame: n % a.keyEvery === 0, ...per } as VideoEncoderEncodeOptions)
|
|
146
149
|
f.close()
|
|
147
150
|
while (enc.encodeQueueSize > 4) await frame()
|
|
148
151
|
}
|
|
@@ -184,7 +187,7 @@ export async function installClip(a: PageClipAsk): Promise<string | null> {
|
|
|
184
187
|
let made = 0
|
|
185
188
|
while (n < total && n * step <= t - t0) {
|
|
186
189
|
const frame = new VideoFrame(last!, { timestamp: Math.round(n * step * 1000), duration: Math.round(step * 1000) })
|
|
187
|
-
enc.encode(frame, { keyFrame: n % a.keyEvery === 0,
|
|
190
|
+
enc.encode(frame, { keyFrame: n % a.keyEvery === 0, ...per } as VideoEncoderEncodeOptions)
|
|
188
191
|
frame.close()
|
|
189
192
|
if (made++ > 0 || !fresh) repeated++
|
|
190
193
|
n++
|