orizu 0.5.52 → 0.5.53
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/auth-commands.js +2 -2
- package/dist/cli-console-output.d.ts +7 -1
- package/dist/cli-console-output.d.ts.map +1 -1
- package/dist/cli-console-output.js +16 -3
- package/dist/cli-stops.d.ts +14 -0
- package/dist/cli-stops.d.ts.map +1 -0
- package/dist/cli-stops.js +22 -0
- package/dist/egress-allowlist-cli.d.ts +29 -2
- package/dist/egress-allowlist-cli.d.ts.map +1 -1
- package/dist/egress-allowlist-cli.js +16 -89
- package/dist/egress-allowlist-workflow.d.ts +17 -0
- package/dist/egress-allowlist-workflow.d.ts.map +1 -0
- package/dist/egress-allowlist-workflow.js +183 -0
- package/dist/instruction-delivery.d.ts +4 -4
- package/dist/instruction-delivery.d.ts.map +1 -1
- package/dist/instruction-delivery.js +32 -46
- package/dist/instruction-prune.d.ts +24 -0
- package/dist/instruction-prune.d.ts.map +1 -0
- package/dist/instruction-prune.js +33 -0
- package/dist/instruction-set-sync/index.d.ts +0 -2
- package/dist/instruction-set-sync/index.d.ts.map +1 -1
- package/dist/instruction-set-sync/index.js +3 -36
- package/dist/instruction-set-update/index.d.ts +41 -3
- package/dist/instruction-set-update/index.d.ts.map +1 -1
- package/dist/instruction-set-update/index.js +156 -132
- package/dist/instruction-sets-cli.d.ts.map +1 -1
- package/dist/instruction-sets-cli.js +21 -2
- package/dist/instruction-sync-lock.d.ts +9 -0
- package/dist/instruction-sync-lock.d.ts.map +1 -0
- package/dist/instruction-sync-lock.js +24 -0
- package/dist/json-output-scrub.d.ts +3 -0
- package/dist/json-output-scrub.d.ts.map +1 -0
- package/dist/json-output-scrub.js +70 -0
- package/dist/one-request-write.d.ts.map +1 -1
- package/dist/one-request-write.js +2 -9
- package/dist/workbench-cli.d.ts +2 -1
- package/dist/workbench-cli.d.ts.map +1 -1
- package/dist/workbench-cli.js +79 -593
- package/dist/workbench-workflows.d.ts +56 -0
- package/dist/workbench-workflows.d.ts.map +1 -0
- package/dist/workbench-workflows.js +665 -0
- package/dist/workspace-sync-workflow.d.ts +115 -0
- package/dist/workspace-sync-workflow.d.ts.map +1 -0
- package/dist/workspace-sync-workflow.js +642 -0
- package/dist/workspace-sync.d.ts +45 -97
- package/dist/workspace-sync.d.ts.map +1 -1
- package/dist/workspace-sync.js +53 -494
- package/package.json +1 -1
- package/src/auth-commands.ts +2 -2
- package/src/cli-console-output.ts +16 -2
- package/src/cli-stops.ts +27 -0
- package/src/egress-allowlist-cli.ts +18 -90
- package/src/egress-allowlist-workflow.ts +198 -0
- package/src/instruction-delivery.ts +31 -47
- package/src/instruction-prune.ts +59 -0
- package/src/instruction-set-sync/index.ts +3 -43
- package/src/instruction-set-update/index.ts +173 -122
- package/src/instruction-sets-cli.ts +23 -2
- package/src/instruction-sync-lock.ts +27 -0
- package/src/json-output-scrub.ts +73 -0
- package/src/one-request-write.ts +2 -10
- package/src/workbench-cli.ts +83 -684
- package/src/workbench-workflows.ts +815 -0
- package/src/workspace-sync-workflow.ts +838 -0
- package/src/workspace-sync.ts +63 -630
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { type CanonicalOwner, type RepoState } from './workspace.js';
|
|
2
|
+
import { type CommonOptions, type GitRefReader, type TrackedResourceKind, type WorkspaceSyncIo } from './workspace-sync.js';
|
|
3
|
+
interface SyncResourceResult {
|
|
4
|
+
/** Server tracked-resource ROW id (null for untracked — no row exists). */
|
|
5
|
+
id: string | null;
|
|
6
|
+
path: string;
|
|
7
|
+
status: string;
|
|
8
|
+
serverVersionId: string | null;
|
|
9
|
+
serverSha256: string | null;
|
|
10
|
+
lastSyncedAt: string | null;
|
|
11
|
+
}
|
|
12
|
+
interface StatusResourceLine {
|
|
13
|
+
path: string;
|
|
14
|
+
kind: TrackedResourceKind | null;
|
|
15
|
+
owner: CanonicalOwner | null;
|
|
16
|
+
repoState: RepoState | null;
|
|
17
|
+
localSha: string | null;
|
|
18
|
+
baseSha: string | null;
|
|
19
|
+
dirty: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Metadata-only-pull guard (spec §3.3): the base was pulled ahead of the
|
|
22
|
+
* working content, so `apply` will refuse until the bytes are delivered.
|
|
23
|
+
*/
|
|
24
|
+
contentPending?: boolean;
|
|
25
|
+
/** Definitional local statuses: cache-known-but-deleted / rule-less files. */
|
|
26
|
+
localStatus?: 'missing' | 'untracked';
|
|
27
|
+
remoteStatus?: string;
|
|
28
|
+
serverVersionId?: string | null;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* "repo moved since your last pull" — the server's recorded DEFAULT-branch push
|
|
32
|
+
* SHA differs from what the LOCAL repo knows the default branch to be. Compared
|
|
33
|
+
* against the default-branch ref (never bare HEAD) so being on a feature branch
|
|
34
|
+
* or carrying local commits never triggers a false positive.
|
|
35
|
+
*/
|
|
36
|
+
interface FreshnessSignal {
|
|
37
|
+
serverSha: string;
|
|
38
|
+
branch: string | null;
|
|
39
|
+
pushedAt: string | null;
|
|
40
|
+
localDefaultSha: string;
|
|
41
|
+
}
|
|
42
|
+
/** A session branch worth reporting: an old active session or an ended, unmerged one. */
|
|
43
|
+
interface StaleSessionBranch {
|
|
44
|
+
sessionId: string;
|
|
45
|
+
branch: string;
|
|
46
|
+
startedAt: string | null;
|
|
47
|
+
reason: 'active-stale' | 'unmerged';
|
|
48
|
+
}
|
|
49
|
+
type StatusOptions = CommonOptions & {
|
|
50
|
+
remote?: boolean;
|
|
51
|
+
gitRef?: GitRefReader;
|
|
52
|
+
now?: () => number;
|
|
53
|
+
};
|
|
54
|
+
interface SyncResultLine extends SyncResourceResult {
|
|
55
|
+
cacheAdvanced: boolean;
|
|
56
|
+
}
|
|
57
|
+
interface PullResult {
|
|
58
|
+
path: string;
|
|
59
|
+
status: 'converged' | 'refused' | 'noop';
|
|
60
|
+
remoteStatus: string | null;
|
|
61
|
+
reason?: string;
|
|
62
|
+
note?: string;
|
|
63
|
+
manifestUpdated: boolean;
|
|
64
|
+
cacheAdvanced: boolean;
|
|
65
|
+
}
|
|
66
|
+
interface ApplyResult {
|
|
67
|
+
path: string;
|
|
68
|
+
status: 'applied' | 'refused' | 'noop';
|
|
69
|
+
reason?: string;
|
|
70
|
+
/** Recovery guidance for server 409 refusals (re-sync, then re-drive). */
|
|
71
|
+
hint?: string;
|
|
72
|
+
versionId?: string | null;
|
|
73
|
+
contentSha256?: string | null;
|
|
74
|
+
lastSyncedAt?: string | null;
|
|
75
|
+
manifestUpdated: boolean;
|
|
76
|
+
cacheAdvanced: boolean;
|
|
77
|
+
}
|
|
78
|
+
interface RunOptions extends CommonOptions {
|
|
79
|
+
/** Stands in for `renameSync` in every local file replacement (tests). */
|
|
80
|
+
rename?: (from: string, to: string) => void;
|
|
81
|
+
signal?: AbortSignal;
|
|
82
|
+
}
|
|
83
|
+
export declare const runWorkspaceStatus: (opts?: StatusOptions & RunOptions) => Promise<{
|
|
84
|
+
root: string;
|
|
85
|
+
workspaceId: string | null;
|
|
86
|
+
remote: boolean;
|
|
87
|
+
resources: StatusResourceLine[];
|
|
88
|
+
freshness: FreshnessSignal | null;
|
|
89
|
+
staleSessionBranches: StaleSessionBranch[];
|
|
90
|
+
}>;
|
|
91
|
+
export declare const runWorkspaceSync: (opts?: RunOptions) => Promise<{
|
|
92
|
+
root: string;
|
|
93
|
+
workspaceId: string;
|
|
94
|
+
resources: SyncResultLine[];
|
|
95
|
+
}>;
|
|
96
|
+
export declare const runWorkspacePull: (targetPath: string, opts?: RunOptions) => Promise<PullResult>;
|
|
97
|
+
export declare const runWorkspaceApply: (targetPath: string, opts?: RunOptions) => Promise<ApplyResult>;
|
|
98
|
+
declare const COMMAND_NAMES: {
|
|
99
|
+
readonly status: "Workspace status";
|
|
100
|
+
readonly sync: "Workspace sync";
|
|
101
|
+
readonly pull: "Workspace pull";
|
|
102
|
+
readonly apply: "Workspace apply";
|
|
103
|
+
};
|
|
104
|
+
interface WorkspaceCommand {
|
|
105
|
+
subcommand: keyof typeof COMMAND_NAMES;
|
|
106
|
+
target: string | null;
|
|
107
|
+
remote: boolean;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Runs one `orizu workspace` command. Ctrl-C or SIGTERM ends the wait with
|
|
111
|
+
* 130 or 143, saying what may be saved when a write's reply was still out.
|
|
112
|
+
*/
|
|
113
|
+
export declare function runWorkspaceCommand(command: WorkspaceCommand, io: WorkspaceSyncIo): Promise<number>;
|
|
114
|
+
export {};
|
|
115
|
+
//# sourceMappingURL=workspace-sync-workflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-sync-workflow.d.ts","sourceRoot":"","sources":["../src/workspace-sync-workflow.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAoB,KAAK,cAAc,EAAE,KAAK,SAAS,EAAsB,MAAM,gBAAgB,CAAA;AAC1G,OAAO,EAeL,KAAK,aAAa,EAClB,KAAK,YAAY,EAGjB,KAAK,mBAAmB,EAExB,KAAK,eAAe,EACrB,MAAM,qBAAqB,CAAA;AAuM5B,UAAU,kBAAkB;IAC1B,2EAA2E;IAC3E,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;CAC5B;AAmCD,UAAU,kBAAkB;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAAA;IAChC,KAAK,EAAE,cAAc,GAAG,IAAI,CAAA;IAC5B,SAAS,EAAE,SAAS,GAAG,IAAI,CAAA;IAC3B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,KAAK,EAAE,OAAO,CAAA;I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