@rigxyz/tapd 0.6.4 → 0.6.7
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/dist/bin.js +56 -5
- package/dist/bin.js.map +1 -1
- package/dist/{chunk-F3HYZR2Y.js → chunk-32K6ANXS.js} +0 -0
- package/dist/chunk-32K6ANXS.js.map +1 -0
- package/dist/index.d.ts +53 -7
- package/dist/index.js +3 -1
- package/package.json +1 -1
- package/dist/chunk-F3HYZR2Y.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -7,19 +7,30 @@ import { GetBindingResponse, PrepareUploadRequest, PrepareUploadResponse, Comple
|
|
|
7
7
|
* Layers:
|
|
8
8
|
* 1. Built-in defaults — common secrets, dependencies, OS noise, and
|
|
9
9
|
* bulky generated artifacts (per design doc § "Large File Policy").
|
|
10
|
-
*
|
|
10
|
+
* Bulky media/archives are re-included under the top-level
|
|
11
|
+
* `attachments/` folder (chat attachments must sync).
|
|
12
|
+
* A user CAN override the non-secret ones (dependencies, media, …)
|
|
13
|
+
* via `!pattern` in their .tapignore.
|
|
11
14
|
* 2. Project .tapignore.
|
|
12
|
-
* 3.
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
+
* 3. Secrets + conflict sidecars (NON_OVERRIDABLE_IGNORE_LINES), added
|
|
16
|
+
* again after the project file. The .tapignore itself syncs from
|
|
17
|
+
* other members, so a `!.env` there would otherwise make every
|
|
18
|
+
* member's daemon upload their own .env.
|
|
19
|
+
* 4. Always-excluded paths — Tap's own local metadata, plus the paths
|
|
20
|
+
* that never sync between members (core isNeverSyncPath: .git,
|
|
21
|
+
* agent/MCP config). Matched case-insensitively, never re-enabled by
|
|
22
|
+
* `!pattern`; the relay refuses them anyway (validateRigPath rejects
|
|
23
|
+
* reserved paths, the change route refuses never-sync ones).
|
|
15
24
|
*/
|
|
16
25
|
|
|
17
26
|
declare const BUILTIN_IGNORE_LINES: ReadonlyArray<string>;
|
|
18
27
|
declare function loadIgnore(rootDir: string): Ignore;
|
|
19
28
|
/**
|
|
20
29
|
* Hard-exclude check that runs in addition to .tapignore. Tap's own
|
|
21
|
-
* local metadata
|
|
22
|
-
* their .tapignore —
|
|
30
|
+
* local metadata and the never-sync paths (.git, agent/MCP config) are
|
|
31
|
+
* invisible to sync no matter what the user puts in their .tapignore —
|
|
32
|
+
* including `!pattern` overrides. Case-insensitive: on APFS `.RIG/` is
|
|
33
|
+
* `.rig/`.
|
|
23
34
|
*/
|
|
24
35
|
declare function isAlwaysExcluded(posixPath: string): boolean;
|
|
25
36
|
|
|
@@ -285,6 +296,10 @@ declare function hashFile(absPath: string): Promise<string>;
|
|
|
285
296
|
* 7. Populate .rig/tap/state.local.db with last_applied_change_id
|
|
286
297
|
* per path, and the resulting cursor.
|
|
287
298
|
*
|
|
299
|
+
* `deferUpload` stops after step 3a (plus an empty state DB): the binding
|
|
300
|
+
* exists and the config is on disk, and the daemon's first scan uploads
|
|
301
|
+
* everything (`tapd start` pushes whatever the relay doesn't know yet).
|
|
302
|
+
*
|
|
288
303
|
* Returns a summary with the binding, the owner token (so the caller
|
|
289
304
|
* CLI can print it once), upload + change counts, and any walker
|
|
290
305
|
* warnings (oversized files / symlinks / invalid paths). Caller is
|
|
@@ -300,6 +315,15 @@ type InitOptions = {
|
|
|
300
315
|
deviceLabel?: string;
|
|
301
316
|
/** Org slug to scope the new binding to. Caller must already be a member. */
|
|
302
317
|
org?: string;
|
|
318
|
+
/** Create the binding as this kind (the relay defaults to `'rig'`). */
|
|
319
|
+
kind?: "rig" | "space";
|
|
320
|
+
/**
|
|
321
|
+
* Create the binding and write the local config, but leave the initial
|
|
322
|
+
* upload to the daemon's first scan (`tapd start` pushes every file the
|
|
323
|
+
* relay doesn't know yet). For a brand-new folder that should be usable
|
|
324
|
+
* the moment its binding exists — a new space in the desktop app.
|
|
325
|
+
*/
|
|
326
|
+
deferUpload?: boolean;
|
|
303
327
|
/** Test seam: override fetch (used to drive the in-process relay). */
|
|
304
328
|
fetch?: typeof fetch;
|
|
305
329
|
};
|
|
@@ -314,6 +338,8 @@ type InitResult = {
|
|
|
314
338
|
warnings: WalkResult["warnings"];
|
|
315
339
|
/** Cursor written to state.local.db after the initial submit. */
|
|
316
340
|
cursor: string;
|
|
341
|
+
/** True when the upload was left to the daemon's first scan (`deferUpload`). */
|
|
342
|
+
deferredUpload: boolean;
|
|
317
343
|
};
|
|
318
344
|
declare class AlreadyInitializedError extends Error {
|
|
319
345
|
readonly path: string;
|
|
@@ -426,6 +452,11 @@ declare function revoke(opts: {
|
|
|
426
452
|
* Materialization is atomic: download to `<file>.tap-tmp.<rand>` then
|
|
427
453
|
* `rename` into place. Atomic on POSIX; on Windows, `fs.rename` falls
|
|
428
454
|
* back to MoveFileEx-style replace.
|
|
455
|
+
*
|
|
456
|
+
* Files from other members are treated like downloads: never executable
|
|
457
|
+
* (the event's `executable` bit is ignored), quarantined on macOS so
|
|
458
|
+
* Gatekeeper checks them before they run, and never-sync paths (.git,
|
|
459
|
+
* agent/MCP config — core isNeverSyncPath) are not applied at all.
|
|
429
460
|
*/
|
|
430
461
|
|
|
431
462
|
/** State-DB meta key — running count of conflicts surfaced by `tapd status`. */
|
|
@@ -553,6 +584,21 @@ type IntentAssignment = {
|
|
|
553
584
|
* watcher event (debounced).
|
|
554
585
|
*/
|
|
555
586
|
|
|
587
|
+
type NotSyncedFile = {
|
|
588
|
+
path: string;
|
|
589
|
+
reason: "quota_exceeded" | "file_too_large" | "owner_only" | "protected";
|
|
590
|
+
/**
|
|
591
|
+
* Hash of the refused bytes; absent for walker-level oversize skips and
|
|
592
|
+
* for refused deletes/mkdirs/rmdirs.
|
|
593
|
+
*/
|
|
594
|
+
hash?: string;
|
|
595
|
+
size?: number;
|
|
596
|
+
/** The space's byte limit, for quota_exceeded. */
|
|
597
|
+
limitBytes?: number;
|
|
598
|
+
/** When these bytes were (last) refused. */
|
|
599
|
+
at: string;
|
|
600
|
+
};
|
|
601
|
+
declare function readNotSynced(stateDb: StateDb): NotSyncedFile[];
|
|
556
602
|
type ScanAndPushResult = {
|
|
557
603
|
/** Bytes uploaded this cycle. */
|
|
558
604
|
uploaded: number;
|
|
@@ -968,4 +1014,4 @@ type DaemonHandle = {
|
|
|
968
1014
|
};
|
|
969
1015
|
declare function start(opts: StartOptions): Promise<DaemonHandle>;
|
|
970
1016
|
|
|
971
|
-
export { type AddImportOptions, type AddImportResult, AlreadyInitializedError, AlreadyJoinedError, type ApplyMode, type ApplyResult, BINDING_CONFIG_PATH, BUILTIN_IGNORE_LINES, type BindingConfig, type DaemonHandle, type ImportHandle, type ImportMountFile, type ImportSpec, ImportTokenScopeError, type ImportValidationError, ImportValidationFailed, type InitOptions, type InitResult, InvalidInviteUrlError, type JoinOptions, type JoinResult, type LocalPathState, type MintInviteOptions, NotInitializedError, RelayClient, type RelayClientOptions, RelayError, type RemoveImportResult, STATE_KEY_CONFLICT_COUNT, type ScanAndPushResult, type SseSubscriber, type SseSubscriberOptions, type StartOptions, type StartSubscriptionOptions, type StateDb, type SubscriptionConfig, type SubscriptionHandle, type WalkFile, type WalkResult, type WalkWarning, addImport, applyOnce, bindingConfigFile, conflictSidecarPath, createBinding, hashFile, importMountFile, importStateDbPath, importsDir, init, isAlwaysExcluded, join, list as listInvites, loadIgnore, loadImportMounts, mint as mintInvite, normalizeImportPath, openStateDb, parseInviteUrl, primaryStateDbPath, readBindingConfig, readImportMount, removeImport, revoke as revokeInvite, scanAndPush, subscribe as sseSubscribe, start, startSubscription, validateImportName, validateImportPath, validateImports, walk, writeBindingConfig, writeImportMount };
|
|
1017
|
+
export { type AddImportOptions, type AddImportResult, AlreadyInitializedError, AlreadyJoinedError, type ApplyMode, type ApplyResult, BINDING_CONFIG_PATH, BUILTIN_IGNORE_LINES, type BindingConfig, type DaemonHandle, type ImportHandle, type ImportMountFile, type ImportSpec, ImportTokenScopeError, type ImportValidationError, ImportValidationFailed, type InitOptions, type InitResult, InvalidInviteUrlError, type JoinOptions, type JoinResult, type LocalPathState, type MintInviteOptions, NotInitializedError, type NotSyncedFile, RelayClient, type RelayClientOptions, RelayError, type RemoveImportResult, STATE_KEY_CONFLICT_COUNT, type ScanAndPushResult, type SseSubscriber, type SseSubscriberOptions, type StartOptions, type StartSubscriptionOptions, type StateDb, type SubscriptionConfig, type SubscriptionHandle, type WalkFile, type WalkResult, type WalkWarning, addImport, applyOnce, bindingConfigFile, conflictSidecarPath, createBinding, hashFile, importMountFile, importStateDbPath, importsDir, init, isAlwaysExcluded, join, list as listInvites, loadIgnore, loadImportMounts, mint as mintInvite, normalizeImportPath, openStateDb, parseInviteUrl, primaryStateDbPath, readBindingConfig, readImportMount, readNotSynced, removeImport, revoke as revokeInvite, scanAndPush, subscribe as sseSubscribe, start, startSubscription, validateImportName, validateImportPath, validateImports, walk, writeBindingConfig, writeImportMount };
|
package/dist/index.js
CHANGED
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
primaryStateDbPath,
|
|
34
34
|
readBindingConfig,
|
|
35
35
|
readImportMount,
|
|
36
|
+
readNotSynced,
|
|
36
37
|
removeImport,
|
|
37
38
|
revoke,
|
|
38
39
|
scanAndPush,
|
|
@@ -45,7 +46,7 @@ import {
|
|
|
45
46
|
walk,
|
|
46
47
|
writeBindingConfig,
|
|
47
48
|
writeImportMount
|
|
48
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-32K6ANXS.js";
|
|
49
50
|
export {
|
|
50
51
|
AlreadyInitializedError,
|
|
51
52
|
AlreadyJoinedError,
|
|
@@ -80,6 +81,7 @@ export {
|
|
|
80
81
|
primaryStateDbPath,
|
|
81
82
|
readBindingConfig,
|
|
82
83
|
readImportMount,
|
|
84
|
+
readNotSynced,
|
|
83
85
|
removeImport,
|
|
84
86
|
revoke as revokeInvite,
|
|
85
87
|
scanAndPush,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rigxyz/tapd",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.7",
|
|
4
4
|
"description": "Local daemon for the hosted Tap relay — watches files, hashes content, uploads/downloads objects, applies remote changes. Pairs with @rigxyz/cli for shared-rig sync.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Dylan Bourgeois <dtsbourg@gmail.com>",
|