@skaile/workspaces 4.24.0 → 4.25.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.
Files changed (78) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/{asset-feeds-65J4N2TB.js → asset-feeds-72RJOE4E.js} +4 -4
  3. package/dist/{asset-feeds-65J4N2TB.js.map → asset-feeds-72RJOE4E.js.map} +1 -1
  4. package/dist/asset-manager/index.js +1 -1
  5. package/dist/{chunk-SMXHEEJP.js → chunk-253427M3.js} +3 -3
  6. package/dist/{chunk-SMXHEEJP.js.map → chunk-253427M3.js.map} +1 -1
  7. package/dist/{chunk-4FFUB4ZB.js → chunk-2JGUFDKZ.js} +3 -3
  8. package/dist/{chunk-4FFUB4ZB.js.map → chunk-2JGUFDKZ.js.map} +1 -1
  9. package/dist/{chunk-VFGEIFRT.js → chunk-2N6NQUVB.js} +5 -5
  10. package/dist/{chunk-VFGEIFRT.js.map → chunk-2N6NQUVB.js.map} +1 -1
  11. package/dist/{chunk-3SZLZ56M.js → chunk-EZOFQW3G.js} +761 -234
  12. package/dist/chunk-EZOFQW3G.js.map +1 -0
  13. package/dist/{chunk-OTRHFPUF.js → chunk-H4XNX2FG.js} +2 -2
  14. package/dist/{chunk-OTRHFPUF.js.map → chunk-H4XNX2FG.js.map} +1 -1
  15. package/dist/{chunk-SWXUBDTV.js → chunk-IHFQTKUP.js} +2 -2
  16. package/dist/{chunk-SWXUBDTV.js.map → chunk-IHFQTKUP.js.map} +1 -1
  17. package/dist/{chunk-VTTBDFXM.js → chunk-OQRSSFTU.js} +3 -3
  18. package/dist/{chunk-VTTBDFXM.js.map → chunk-OQRSSFTU.js.map} +1 -1
  19. package/dist/{chunk-MTNIVJWB.js → chunk-SB4U7HLP.js} +6 -6
  20. package/dist/{chunk-MTNIVJWB.js.map → chunk-SB4U7HLP.js.map} +1 -1
  21. package/dist/{chunk-QD4ZCIPQ.js → chunk-SSODNBSC.js} +3 -3
  22. package/dist/{chunk-QD4ZCIPQ.js.map → chunk-SSODNBSC.js.map} +1 -1
  23. package/dist/{chunk-JCT4UMGQ.js → chunk-XZCRIPWT.js} +3 -3
  24. package/dist/{chunk-JCT4UMGQ.js.map → chunk-XZCRIPWT.js.map} +1 -1
  25. package/dist/{chunk-4U3NSLGV.js → chunk-YR3CLEQG.js} +6 -6
  26. package/dist/{chunk-4U3NSLGV.js.map → chunk-YR3CLEQG.js.map} +1 -1
  27. package/dist/cli/index.js +28 -28
  28. package/dist/connectors/index.js +1 -1
  29. package/dist/connectors/src/connector-prompt.d.ts.map +1 -1
  30. package/dist/{ensure-sources-TKY7PTWF.js → ensure-sources-HEOQJ4CS.js} +4 -4
  31. package/dist/{ensure-sources-TKY7PTWF.js.map → ensure-sources-HEOQJ4CS.js.map} +1 -1
  32. package/dist/factory-assets/connectors/box.js +1 -1
  33. package/dist/factory-assets/connectors/deploy.js +1 -1
  34. package/dist/factory-assets/connectors/devserver.js +1 -1
  35. package/dist/factory-assets/connectors/flow/adapter.js +1 -1
  36. package/dist/factory-assets/connectors/flow/run-flow.js +2 -2
  37. package/dist/factory-assets/connectors/flow.js +1 -1
  38. package/dist/factory-assets/connectors/git/CONNECTOR.md +63 -6
  39. package/dist/factory-assets/connectors/git/driver.d.ts +111 -27
  40. package/dist/factory-assets/connectors/git/driver.d.ts.map +1 -1
  41. package/dist/factory-assets/connectors/git.js +1 -1
  42. package/dist/factory-assets/connectors/gmail.js +1 -1
  43. package/dist/factory-assets/connectors/googledrive.js +1 -1
  44. package/dist/factory-assets/connectors/local.js +1 -1
  45. package/dist/factory-assets/connectors/mattermost.js +1 -1
  46. package/dist/factory-assets/connectors/memory.js +1 -1
  47. package/dist/factory-assets/connectors/minio.js +1 -1
  48. package/dist/factory-assets/connectors/postgres.js +1 -1
  49. package/dist/factory-assets/connectors/s3.js +1 -1
  50. package/dist/factory-assets/connectors/sharepoint.js +1 -1
  51. package/dist/factory-assets/connectors/sqlite.js +1 -1
  52. package/dist/factory-assets/connectors/static-server.js +1 -1
  53. package/dist/factory-assets/connectors/tunnel.js +1 -1
  54. package/dist/factory-assets/connectors/webdav.js +1 -1
  55. package/dist/factory-assets/connectors/xstate-store.js +1 -1
  56. package/dist/factory-assets/connectors/xstate.js +1 -1
  57. package/dist/{helpers-5GMEJWMX.js → helpers-VZJCQSLY.js} +4 -4
  58. package/dist/{helpers-5GMEJWMX.js.map → helpers-VZJCQSLY.js.map} +1 -1
  59. package/dist/{library-publish-FLQICZF4.js → library-publish-VBLSTO7S.js} +6 -6
  60. package/dist/{library-publish-FLQICZF4.js.map → library-publish-VBLSTO7S.js.map} +1 -1
  61. package/dist/{open-library-OOUZG24B.js → open-library-SJ54ZBGJ.js} +5 -5
  62. package/dist/{open-library-OOUZG24B.js.map → open-library-SJ54ZBGJ.js.map} +1 -1
  63. package/dist/{project-ZUYKJX3V.js → project-GLZR4SLT.js} +5 -5
  64. package/dist/{project-ZUYKJX3V.js.map → project-GLZR4SLT.js.map} +1 -1
  65. package/dist/runner/index.js +4 -4
  66. package/dist/sdk/asset-manager.js +1 -1
  67. package/dist/sdk/index.js +4 -4
  68. package/dist/sdk/runner.js +4 -4
  69. package/dist/{setup-RERVKTPI.js → setup-X73AWRMD.js} +5 -5
  70. package/dist/{setup-RERVKTPI.js.map → setup-X73AWRMD.js.map} +1 -1
  71. package/dist/{source-SUHVAXK6.js → source-HYXJO2IE.js} +6 -6
  72. package/dist/{source-SUHVAXK6.js.map → source-HYXJO2IE.js.map} +1 -1
  73. package/dist/{source-manifest-publish-VMW6ZHW6.js → source-manifest-publish-V5LCVOYZ.js} +7 -7
  74. package/dist/{source-manifest-publish-VMW6ZHW6.js.map → source-manifest-publish-V5LCVOYZ.js.map} +1 -1
  75. package/dist/tui/index.js +4 -4
  76. package/dist/workspace-plugin/index.js +1 -1
  77. package/package.json +1 -1
  78. package/dist/chunk-3SZLZ56M.js.map +0 -1
@@ -70,7 +70,7 @@ export declare const REFRESH_LEAD_MS: number;
70
70
  * {@link REFRESH_LEAD_MS} would otherwise be asked for a new one every second.
71
71
  * A token living under this floor lapses until the next tick: Tier-2 recovers
72
72
  * sooner through the reactive retry-401 path, Tier-1 (no helper) waits for the
73
- * tick to re-bake origin.
73
+ * tick to put a fresh token in state.
74
74
  */
75
75
  export declare const MIN_REFRESH_DELAY_MS = 30000;
76
76
  /**
@@ -79,6 +79,54 @@ export declare const MIN_REFRESH_DELAY_MS = 30000;
79
79
  * runner's AI-credential scheduler uses.
80
80
  */
81
81
  export declare const MAX_REARM_MS: number;
82
+ /**
83
+ * The remote a network git command authenticates against. `GitState` satisfies
84
+ * it, and is passed as-is so a rotated token is read at spawn time.
85
+ */
86
+ interface GitRemoteAuth {
87
+ url: string;
88
+ token?: string;
89
+ /**
90
+ * Scope the header to this repository's URL instead of its host. For the
91
+ * agent's ops: a same-host `pushurl` / `insteadOf` the agent sets after the
92
+ * origin check then gets no header. Off for the driver's own commands, whose
93
+ * relative submodules on the same host need it.
94
+ */
95
+ repoScoped?: boolean;
96
+ }
97
+ /**
98
+ * `auth.url` without userinfo when a token will authenticate it — the URL that
99
+ * goes into `origin`. Without a token the declared URL is used unchanged.
100
+ */
101
+ declare function plainRemoteUrl(auth: GitRemoteAuth): string;
102
+ /**
103
+ * Child environment for a network git command: the token as an
104
+ * `http.<origin>.extraHeader` through `GIT_CONFIG_COUNT`, so it reaches git
105
+ * without touching `.git/config`, a credentials file, or the argv (which
106
+ * `/proc/<pid>/cmdline` and git's own error messages expose).
107
+ *
108
+ * Scoped to scheme, host and port, not the repository path: a relative
109
+ * submodule on the same host needs it too, and git does not send it to a host
110
+ * that `origin` or an `insteadOf` rule was re-pointed at.
111
+ */
112
+ declare function networkGitEnv(auth: GitRemoteAuth | undefined, base?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
113
+ /**
114
+ * Run a git command that talks to a remote, authenticated for this one
115
+ * command only. Every clone, fetch, pull, push, ls-remote and submodule update
116
+ * of this driver goes through here.
117
+ */
118
+ declare function runRemoteGit(args: string[], auth: GitRemoteAuth | undefined, options: {
119
+ cwd?: string;
120
+ safeDir: string;
121
+ timeout: number;
122
+ env?: NodeJS.ProcessEnv;
123
+ }): Promise<string>;
124
+ /**
125
+ * An https remote without userinfo, query or fragment (as `origin` is written
126
+ * on either tier); any other URL unchanged. Used to compare remotes and as the
127
+ * repository scope of a header.
128
+ */
129
+ declare function comparableRemoteUrl(url: string): string;
82
130
  /**
83
131
  * Snapshot returned by the `sync_status` tool op. JSON-serialised over the
84
132
  * transport; the platform overlays `available`/`containerAwake`/`reason`
@@ -106,6 +154,23 @@ export interface GitSyncStatusResult {
106
154
  /** Current HEAD commit SHA, or `null` when unavailable. */
107
155
  commitSha: string | null;
108
156
  }
157
+ /**
158
+ * Result of the agent-facing `push`, `pull` and `fetch` tool ops, JSON-serialised.
159
+ * An expected outcome the agent must act on (a rejected push, a conflicting
160
+ * pull) is a `status`, not a thrown error; auth or network failures throw.
161
+ */
162
+ export interface GitRemoteOpResult {
163
+ op: "push" | "pull" | "fetch";
164
+ /** The mount's branch the op acted on (the session branch on a branching mount). */
165
+ branch: string;
166
+ status: "pushed" | "rejected" | "fetched" | "merged" | "up-to-date" | "no-upstream" | "conflict" | "blocked";
167
+ /** What happened and what to do next, in words the agent can act on. */
168
+ message?: string;
169
+ /** Files that conflicted, for `status: "conflict"` (the merge itself was aborted). */
170
+ conflicts?: string[];
171
+ /** Sync status after the op. */
172
+ sync: GitSyncStatusResult;
173
+ }
109
174
  /**
110
175
  * Read git sync status for an in-container checkout. Pure and never throws —
111
176
  * every git call degrades to a safe default. No network fetch:
@@ -137,6 +202,24 @@ export declare class GitConnector extends AbstractConnector {
137
202
  readonly tools: ToolFace;
138
203
  private _describeOperations;
139
204
  private _executeOp;
205
+ /**
206
+ * Run `fn` after every earlier job on this mount has settled. Network git and
207
+ * index-writing git on one checkout must not overlap: two of them contend for
208
+ * `.git/index.lock`, and a push racing a pull can push a half-merged branch.
209
+ * Not re-entrant — a job must never wait on the lock it runs under.
210
+ */
211
+ private withMountLock;
212
+ /**
213
+ * The agent's network git: the driver runs it with the mount's credential, so
214
+ * an agent on a mount without `exposeAccessToken` can push and pull without
215
+ * ever holding the token. Acts only on the mount's own branch, never forces.
216
+ */
217
+ private agentRemoteOp;
218
+ /** Fetch origin's base branch and, on a branching mount, the session branch. */
219
+ private fetchActiveBranch;
220
+ private agentFetch;
221
+ private agentPush;
222
+ private agentPull;
140
223
  connect(declaration: ConnectorDeclaration, ctx: ConnectContext): Promise<ConnectorHandle>;
141
224
  /**
142
225
  * Bring `targetDir` into a usable checkout state for `connect()`.
@@ -343,7 +426,7 @@ export declare class GitConnector extends AbstractConnector {
343
426
  * The intent is to preserve whatever the agent last had on disk. We
344
427
  * therefore:
345
428
  * - `git init` — creates `.git/`; does not modify any existing file.
346
- * - `git remote add origin <authUrl>` — wires up the remote so the
429
+ * - `git remote add origin <remoteUrl>` — wires up the remote so the
347
430
  * normal lifecycle hooks (`pushOnHibernate`, `pushAfterCommit`)
348
431
  * have a target.
349
432
  *
@@ -355,14 +438,12 @@ export declare class GitConnector extends AbstractConnector {
355
438
  * user's last on-disk state. The agent or autocommit reconciles
356
439
  * with the remote later.
357
440
  *
358
- * Token persistence: the auth URL gets written into `.git/config`
359
- * exactly like the `git clone <authUrl>` path does — token-rotation
360
- * handling is external to this method (managed-gitconfig credential
361
- * helper refresh in Tier-2 connectors).
441
+ * `remoteUrl` carries no credential; network commands authenticate per
442
+ * command (see `runRemoteGit`).
362
443
  */
363
444
  private initInPlace;
364
445
  /**
365
- * Count `refs/heads/*` on `authUrl`, optionally narrowed to one `branch`.
446
+ * Count `refs/heads/*` on the remote, optionally narrowed to one `branch`.
366
447
  *
367
448
  * Returns `null` when the probe itself fails (network, auth, bad URL).
368
449
  * "Cannot tell" must never collapse into "no refs": the empty-remote
@@ -419,11 +500,8 @@ export declare class GitConnector extends AbstractConnector {
419
500
  * `reset --hard`. Files that do not conflict with the remote stay
420
501
  * exactly where they are.
421
502
  *
422
- * Auth-URL handling matches `initInPlace`: a pre-existing `origin`
423
- * remote is replaced with the authed URL so the fetch works even
424
- * after token rotation. This persists the token in `.git/config`
425
- * the same way `git clone <authUrl>` does — token-rotation handling
426
- * is external to this connector method.
503
+ * A pre-existing `origin` is replaced with the declared URL, which also
504
+ * drops a token an older driver wrote into it.
427
505
  */
428
506
  private bootstrapFromOrigin;
429
507
  /**
@@ -442,7 +520,6 @@ export declare class GitConnector extends AbstractConnector {
442
520
  * bootstrap.
443
521
  */
444
522
  private preserveConflictingUntracked;
445
- private authUrl;
446
523
  /**
447
524
  * Align `origin` with the exact sanitized URL used by the Tier-2 helper.
448
525
  * Git does not normalize query/fragment data, path case, or `.git` aliases
@@ -451,19 +528,16 @@ export declare class GitConnector extends AbstractConnector {
451
528
  */
452
529
  private alignRemoteWithCredentialScope;
453
530
  /**
454
- * Tier-1 only: rewrite `origin` so it carries the token freshly minted on
455
- * this connect. The "use as-is" wake path leaves whatever token the first
456
- * connect baked in — long-dead for short-lived (GitHub App) tokens. Without
457
- * a Tier-2 helper this URL token is the sole credential, so it must be
458
- * refreshed here. No-op for anonymous (no token) or non-https remotes.
459
- */
460
- private rebakeRemoteAuth;
461
- /**
462
- * Tier-1: remove the userinfo from `origin`, so the token baked by
463
- * connect/refresh does not stay in `.git/config` after teardown. No-op when
464
- * `origin` carries none, or nothing was baked (no token, non-https remote).
465
- */
466
- private stripRemoteAuth;
531
+ * Point `origin` at the declared URL, without a credential in it.
532
+ *
533
+ * Clones made before the driver authenticated per command hold
534
+ * `https://x-access-token:<token>@…` in `.git/config`, where the agent can
535
+ * read it; this is what removes it, on the first connect after an upgrade.
536
+ * With a token in hand `origin` is set to the declared URL, as the old
537
+ * re-bake did. Without one only a token-bearing origin is rewritten: a URL
538
+ * the user declared with their own userinfo is theirs to keep.
539
+ */
540
+ private reconcileRemoteUrl;
467
541
  private startPeriodicFetch;
468
542
  /** One periodic-fetch tick. Bails out at each resumption point once disconnected. */
469
543
  private runPeriodicFetch;
@@ -482,6 +556,12 @@ export declare class GitConnector extends AbstractConnector {
482
556
  * save "theirs" as `.conflict` files.
483
557
  */
484
558
  private mergeBaseIntoSessionBranch;
559
+ /**
560
+ * True (and logged) when a merge or rebase is already open in the checkout,
561
+ * so a driver merge must not start: its failure path would abort or resolve
562
+ * the agent's own operation.
563
+ */
564
+ private skipOverUnfinishedOperation;
485
565
  /**
486
566
  * Attempt to resolve merge/rebase conflicts by keeping "ours" and copying
487
567
  * "theirs" to a .conflict file. If resolution fails entirely, abort.
@@ -503,9 +583,13 @@ export declare class GitConnector extends AbstractConnector {
503
583
  * @docLink packages/factory-assets/api-reference#git-connector-factory
504
584
  */
505
585
  export declare function createConnector(): GitConnector;
506
- /** Test-only surface — exposes the mode→config resolver for unit assertions. */
586
+ /** Test-only surface for unit assertions. */
507
587
  export declare const __test: {
508
588
  resolveGitConfig: typeof resolveGitConfig;
589
+ networkGitEnv: typeof networkGitEnv;
590
+ plainRemoteUrl: typeof plainRemoteUrl;
591
+ runRemoteGit: typeof runRemoteGit;
592
+ comparableRemoteUrl: typeof comparableRemoteUrl;
509
593
  };
510
594
  export {};
511
595
  //# sourceMappingURL=driver.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../../../factory-assets/connectors/git/driver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EAEf,cAAc,EAMd,QAAQ,EAER,WAAW,EACX,YAAY,EACb,MAAM,+BAA+B,CAAC;AAIvC,OAAO,EACL,iBAAiB,EAelB,MAAM,+BAA+B,CAAC;AAOvC,UAAU,gBAAgB;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,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I,YAAY,CAE9C;AAED,gFAAgF;AAChF,eAAO,MAAM,MAAM;;CAAuB,CAAC"}
1
+ {"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../../../factory-assets/connectors/git/driver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EAEf,cAAc,EAMd,QAAQ,EAER,WAAW,EACX,YAAY,EACb,MAAM,+BAA+B,CAAC;AAIvC,OAAO,EACL,iBAAiB,EAelB,MAAM,+BAA+B,CAAC;AAOvC,UAAU,gBAAgB;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,aAAa;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,UAAU,kBAAkB;IAC1B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,eAAe,EAAE,OAAO,CAAC;IACzB,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;IACrB,qFAAqF;IACrF,gBAAgB,EAAE,MAAM,CAAC;IACzB,6CAA6C;IAC7C,eAAe,EAAE,OAAO,CAAC;IACzB;4EACwE;IACxE,eAAe,EAAE,OAAO,CAAC;CAC1B;AAyLD;;;;;GAKG;AACH,iBAAS,gBAAgB,CAAC,IAAI,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GAAG;IAC/F,OAAO,EAAE,gBAAgB,CAAC;IAC1B,IAAI,EAAE,aAAa,CAA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G;YACW,gBAAgB;IAuB9B;;;;;;;;;;;;;;;;;;;;;;;OAuBG;YACW,oBAAoB;IA4DlC;;;;;;;;OAQG;YACW,qBAAqB;IASnC;;;;;;;;;;;;;;;;OAgBG;YACW,mBAAmB;IAuBjC;;;;;;;;;;;;;;OAcG;YACW,4BAA4B;IAoC1C;;;;;OAKG;YACW,8BAA8B;IAgB5C;;;;;;;;;OASG;YACW,kBAAkB;IA+BhC,OAAO,CAAC,kBAAkB;IAoC1B,qFAAqF;YACvE,gBAAgB;IAwC9B;;;;;;OAMG;YACW,WAAW;IA6BzB;;;;;OAKG;YACW,0BAA0B;IAuBxC;;;;OAIG;YACW,2BAA2B;IAOzC;;;;OAIG;YACW,uBAAuB;IAoDrC;;OAEG;YACW,mBAAmB;IAgDjC,OAAO,CAAC,qBAAqB;IAM7B,OAAO,CAAC,oBAAoB;YAmCd,iBAAiB;YAoBjB,qBAAqB;CAapC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,YAAY,CAE9C;AAED,6CAA6C;AAC7C,eAAO,MAAM,MAAM;;;;;;CAMlB,CAAC"}
@@ -1,4 +1,4 @@
1
- export { GitConnector, MAX_REARM_MS, MIN_REFRESH_DELAY_MS, REFRESH_LEAD_MS, __test, createConnector5 as createConnector, readGitSyncStatus } from '../../chunk-3SZLZ56M.js';
1
+ export { GitConnector, MAX_REARM_MS, MIN_REFRESH_DELAY_MS, REFRESH_LEAD_MS, __test, createConnector5 as createConnector, readGitSyncStatus } from '../../chunk-EZOFQW3G.js';
2
2
  import '../../chunk-KVWSBQNP.js';
3
3
  import '../../chunk-2OLNNQKT.js';
4
4
  import '../../chunk-IN466NSZ.js';
@@ -1,4 +1,4 @@
1
- export { GmailConnector, createConnector6 as createConnector } from '../../chunk-3SZLZ56M.js';
1
+ export { GmailConnector, createConnector6 as createConnector } from '../../chunk-EZOFQW3G.js';
2
2
  import '../../chunk-KVWSBQNP.js';
3
3
  import '../../chunk-2OLNNQKT.js';
4
4
  import '../../chunk-IN466NSZ.js';
@@ -1,4 +1,4 @@
1
- export { GoogleDriveConnector, createConnector7 as createConnector } from '../../chunk-3SZLZ56M.js';
1
+ export { GoogleDriveConnector, createConnector7 as createConnector } from '../../chunk-EZOFQW3G.js';
2
2
  import '../../chunk-KVWSBQNP.js';
3
3
  import '../../chunk-2OLNNQKT.js';
4
4
  import '../../chunk-IN466NSZ.js';
@@ -1,4 +1,4 @@
1
- export { LocalConnector, createConnector8 as createConnector } from '../../chunk-3SZLZ56M.js';
1
+ export { LocalConnector, createConnector8 as createConnector } from '../../chunk-EZOFQW3G.js';
2
2
  import '../../chunk-KVWSBQNP.js';
3
3
  import '../../chunk-2OLNNQKT.js';
4
4
  import '../../chunk-IN466NSZ.js';
@@ -1,4 +1,4 @@
1
- export { MattermostConnector, createConnector9 as createConnector } from '../../chunk-3SZLZ56M.js';
1
+ export { MattermostConnector, createConnector9 as createConnector } from '../../chunk-EZOFQW3G.js';
2
2
  import '../../chunk-KVWSBQNP.js';
3
3
  import '../../chunk-2OLNNQKT.js';
4
4
  import '../../chunk-IN466NSZ.js';
@@ -1,4 +1,4 @@
1
- export { MemoryConnector, createConnector10 as createConnector } from '../../chunk-3SZLZ56M.js';
1
+ export { MemoryConnector, createConnector10 as createConnector } from '../../chunk-EZOFQW3G.js';
2
2
  import '../../chunk-KVWSBQNP.js';
3
3
  import '../../chunk-2OLNNQKT.js';
4
4
  import '../../chunk-IN466NSZ.js';
@@ -1,4 +1,4 @@
1
- export { MinIOConnector, createConnector11 as createConnector } from '../../chunk-3SZLZ56M.js';
1
+ export { MinIOConnector, createConnector11 as createConnector } from '../../chunk-EZOFQW3G.js';
2
2
  import '../../chunk-KVWSBQNP.js';
3
3
  import '../../chunk-2OLNNQKT.js';
4
4
  import '../../chunk-IN466NSZ.js';
@@ -1,4 +1,4 @@
1
- export { PostgresConnector, createConnector12 as createConnector } from '../../chunk-3SZLZ56M.js';
1
+ export { PostgresConnector, createConnector12 as createConnector } from '../../chunk-EZOFQW3G.js';
2
2
  import '../../chunk-KVWSBQNP.js';
3
3
  import '../../chunk-2OLNNQKT.js';
4
4
  import '../../chunk-IN466NSZ.js';
@@ -1,4 +1,4 @@
1
- export { S3Connector, S3FetchStoppedError, S3PresignedRequestError, S3_PRESIGN_BATCH, createConnector13 as createConnector, parseListObjectsV2, presignScopePrefix, presignableKey } from '../../chunk-3SZLZ56M.js';
1
+ export { S3Connector, S3FetchStoppedError, S3PresignedRequestError, S3_PRESIGN_BATCH, createConnector13 as createConnector, parseListObjectsV2, presignScopePrefix, presignableKey } from '../../chunk-EZOFQW3G.js';
2
2
  import '../../chunk-KVWSBQNP.js';
3
3
  import '../../chunk-2OLNNQKT.js';
4
4
  import '../../chunk-IN466NSZ.js';
@@ -1,4 +1,4 @@
1
- export { SharePointConnector, createConnector14 as createConnector } from '../../chunk-3SZLZ56M.js';
1
+ export { SharePointConnector, createConnector14 as createConnector } from '../../chunk-EZOFQW3G.js';
2
2
  import '../../chunk-KVWSBQNP.js';
3
3
  import '../../chunk-2OLNNQKT.js';
4
4
  import '../../chunk-IN466NSZ.js';
@@ -1,4 +1,4 @@
1
- export { SQLiteConnector, createConnector15 as createConnector } from '../../chunk-3SZLZ56M.js';
1
+ export { SQLiteConnector, createConnector15 as createConnector } from '../../chunk-EZOFQW3G.js';
2
2
  import '../../chunk-KVWSBQNP.js';
3
3
  import '../../chunk-2OLNNQKT.js';
4
4
  import '../../chunk-IN466NSZ.js';
@@ -1,4 +1,4 @@
1
- export { StaticServerConnector, createConnector16 as createConnector } from '../../chunk-3SZLZ56M.js';
1
+ export { StaticServerConnector, createConnector16 as createConnector } from '../../chunk-EZOFQW3G.js';
2
2
  import '../../chunk-KVWSBQNP.js';
3
3
  import '../../chunk-2OLNNQKT.js';
4
4
  import '../../chunk-IN466NSZ.js';
@@ -1,4 +1,4 @@
1
- export { TunnelConnector, createConnector17 as createConnector } from '../../chunk-3SZLZ56M.js';
1
+ export { TunnelConnector, createConnector17 as createConnector } from '../../chunk-EZOFQW3G.js';
2
2
  import '../../chunk-KVWSBQNP.js';
3
3
  import '../../chunk-2OLNNQKT.js';
4
4
  import '../../chunk-IN466NSZ.js';
@@ -1,4 +1,4 @@
1
- export { WebDAVConnector, createConnector18 as createConnector } from '../../chunk-3SZLZ56M.js';
1
+ export { WebDAVConnector, createConnector18 as createConnector } from '../../chunk-EZOFQW3G.js';
2
2
  import '../../chunk-KVWSBQNP.js';
3
3
  import '../../chunk-2OLNNQKT.js';
4
4
  import '../../chunk-IN466NSZ.js';
@@ -1,4 +1,4 @@
1
- export { XStateStoreConnector, createConnector20 as createConnector } from '../../chunk-3SZLZ56M.js';
1
+ export { XStateStoreConnector, createConnector20 as createConnector } from '../../chunk-EZOFQW3G.js';
2
2
  import '../../chunk-KVWSBQNP.js';
3
3
  import '../../chunk-2OLNNQKT.js';
4
4
  import '../../chunk-IN466NSZ.js';
@@ -1,4 +1,4 @@
1
- export { XStateConnector, createConnector19 as createConnector } from '../../chunk-3SZLZ56M.js';
1
+ export { XStateConnector, createConnector19 as createConnector } from '../../chunk-EZOFQW3G.js';
2
2
  import '../../chunk-KVWSBQNP.js';
3
3
  import '../../chunk-2OLNNQKT.js';
4
4
  import '../../chunk-IN466NSZ.js';
@@ -1,5 +1,5 @@
1
- export { KIND_COL_WIDTH, S, bareSoftDepName, colorRef, fitWidth, formatRelativeTime, formatSoftDepAddPreview, formatSoftDepHint, formatSoftDepRemovePreview, formatSoftDepSection, kindColor, kindColorPad, logErr, logInfo, logOk, logWarn } from './chunk-QD4ZCIPQ.js';
2
- import './chunk-SWXUBDTV.js';
1
+ export { KIND_COL_WIDTH, S, bareSoftDepName, colorRef, fitWidth, formatRelativeTime, formatSoftDepAddPreview, formatSoftDepHint, formatSoftDepRemovePreview, formatSoftDepSection, kindColor, kindColorPad, logErr, logInfo, logOk, logWarn } from './chunk-SSODNBSC.js';
2
+ import './chunk-IHFQTKUP.js';
3
3
  import './chunk-UFWADBG6.js';
4
4
  import './chunk-HGPSZXZP.js';
5
5
  import './chunk-VOEBLPXO.js';
@@ -28,5 +28,5 @@ import './chunk-UQ6LFBPZ.js';
28
28
  import './chunk-DKCFWSVW.js';
29
29
  import './chunk-N7B3LZ7V.js';
30
30
  import './chunk-NSBPE2FW.js';
31
- //# sourceMappingURL=helpers-5GMEJWMX.js.map
32
- //# sourceMappingURL=helpers-5GMEJWMX.js.map
31
+ //# sourceMappingURL=helpers-VZJCQSLY.js.map
32
+ //# sourceMappingURL=helpers-VZJCQSLY.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"helpers-5GMEJWMX.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"helpers-VZJCQSLY.js"}
@@ -1,12 +1,12 @@
1
- import { makeHttpPublisherClient, bareName, refFor, formatNamespaceAvailability, preflightNamespace, publishToStore } from './chunk-4FFUB4ZB.js';
1
+ import { makeHttpPublisherClient, bareName, refFor, formatNamespaceAvailability, preflightNamespace, publishToStore } from './chunk-2JGUFDKZ.js';
2
2
  import { isStoreAuthenticated } from './chunk-IJTEDXWQ.js';
3
- import { openLibraryManager } from './chunk-JCT4UMGQ.js';
4
- import { logErr, logInfo, logOk, S } from './chunk-QD4ZCIPQ.js';
3
+ import { openLibraryManager } from './chunk-XZCRIPWT.js';
4
+ import { logErr, logInfo, logOk, S } from './chunk-SSODNBSC.js';
5
5
  import './chunk-KTCMBEEB.js';
6
6
  import './chunk-ALLCAFHQ.js';
7
7
  import './chunk-V4RGCKYC.js';
8
8
  import './chunk-DHMBE5J7.js';
9
- import './chunk-SWXUBDTV.js';
9
+ import './chunk-IHFQTKUP.js';
10
10
  import './chunk-UFWADBG6.js';
11
11
  import './chunk-HGPSZXZP.js';
12
12
  import './chunk-VOEBLPXO.js';
@@ -277,5 +277,5 @@ async function runLibraryYank(name, opts, client) {
277
277
  }
278
278
 
279
279
  export { runLibraryPublish, runLibraryRegister, runLibraryYank };
280
- //# sourceMappingURL=library-publish-FLQICZF4.js.map
281
- //# sourceMappingURL=library-publish-FLQICZF4.js.map
280
+ //# sourceMappingURL=library-publish-VBLSTO7S.js.map
281
+ //# sourceMappingURL=library-publish-VBLSTO7S.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../cli/src/commands/library-publish.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,IAAM,iBAAA,GAAoB,sBAAA;AAG1B,SAAS,YAAY,GAAA,EAAkC;AACrD,EAAA,IAAI,GAAA,CAAI,OAAA,KAAY,KAAA,EAAO,OAAO,MAAA;AAClC,EAAA,OAAQ,IAAI,aAAA,CAAmC,GAAA;AACjD;AAGA,SAAS,SAAS,GAAA,EAAsB;AACtC,EAAA,IAAI,GAAA,CAAI,OAAA,KAAY,KAAA,EAAO,OAAO,MAAA;AAClC,EAAA,OAAQ,GAAA,CAAI,cAAmC,MAAA,IAAU,MAAA;AAC3D;AAMA,SAAS,aAAa,OAAA,EAAoC;AACxD,EAAA,IAAI,IAAA;AACJ,EAAA,IAAI;AACF,IAAA,IAAA,GAAO,YAAA,CAAa,IAAA,CAAK,OAAA,EAAS,iBAAiB,GAAG,OAAO,CAAA;AAAA,EAC/D,CAAA,CAAA,MAAQ;AACN,IAAA,MAAA;AAAA,MACE,CAAA,GAAA,EAAM,CAAA,CAAE,GAAA,CAAI,iBAAiB,CAAC,CAAA,+GAAA;AAAA,KAEhC;AACA,IAAA,OAAA,CAAQ,KAAK,CAAC,CAAA;AAAA,EAChB;AACA,EAAA,MAAM,EAAE,QAAA,EAAU,WAAA,EAAY,GAAI,qBAAqB,IAAI,CAAA;AAC3D,EAAA,MAAM,SAAS,WAAA,CAAY,MAAA,CAAO,CAAC,CAAA,KAAM,CAAA,CAAE,aAAa,OAAO,CAAA;AAC/D,EAAA,IAAI,MAAA,CAAO,SAAS,CAAA,EAAG;AACrB,IAAA,KAAA,MAAW,CAAA,IAAK,QAAQ,MAAA,CAAO,CAAA,EAAG,EAAE,IAAI,CAAA,EA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A,IAAc,EAAE,IAAA,KAAS,UAAA;AAAA,KACnD;AACA,IAAA,IAAI,UAAA,CAAW,WAAW,CAAA,EAAG;AAC3B,MAAA,OAAA,CAAQ,qDAAgD,CAAA;AACxD,MAAA;AAAA,IACF;AAEA,IAAA,MAAM,SAAmB,EAAC;AAC1B,IAAA,KAAA,MAAW,KAAK,UAAA,EAAY;AAC1B,MAAA,IAAI;AACF,QAAA,MAAM,GAAA,CAAI,cAAA,CAAe,CAAA,CAAE,EAAE,CAAA;AAC7B,QAAA,MAAA,CAAO,KAAK,CAAA,EAAG,CAAA,CAAE,IAAI,CAAA,CAAA,EAAI,CAAA,CAAE,IAAI,CAAA,CAAE,CAAA;AAAA,MACnC,SAAS,GAAA,EAAK;AACZ,QAAA,MAAA;AAAA,UACE,CAAA,eAAA,EAAkB,CAAA,CAAE,IAAI,CAAA,CAAA,EAAI,CAAA,CAAE,IAAI,CAAA,EAAA,EAAK,GAAA,YAAe,KAAA,GAAQ,GAAA,CAAI,OAAA,GAAU,MAAA,CAAO,GAAG,CAAC,CAAA;AAAA,SACzF;AAAA,MACF;AAAA,IACF;AAEA,IAAA,KAAA,CAAM,CAAA,OAAA,EAAU,MAAA,CAAO,MAAM,CAAA,UAAA,CAAY,CAAA;AACzC,IAAA,KAAA,MAAW,CAAA,IAAK,MAAA,EAAQ,OAAA,CAAQ,CAAA,EAAA,EAAK,CAAC,CAAA,CAAE,CAAA;AAAA,EAC1C,CAAA,SAAE;AACA,IAAA,KAAA,EAAM;AAAA,EACR;AACF","file":"library-publish-FLQICZF4.js","sourcesContent":["/**\n * `skaile library publish / register / yank` — the first-party publish flow.\n * A git-backed library you own carries an in-repo `skaile.manifest.yaml`; this\n * commits + pushes the library repo (publish), or takes the current remote HEAD\n * as-is (register), then registers + syncs it as a store source and publishes\n * the manifest's assets under the manifest's own `publisher` (no namespace\n * remap — first-party authors intend their declared namespace).\n *\n * - `publish` = commit (if dirty) + push + register + sync + publish.\n * - `register` = same, but skip the commit/push (bytes already on GitHub).\n * - `yank` = unpublish the library's published assets (all, or one).\n *\n * The store REST surface is reached through the injectable {@link PublisherClient}\n * (default HTTP); git side-effects go through an injectable `spawn`. Both seams\n * keep the flow unit/integration-testable without a live store or a real remote.\n *\n * @docLink cli/commands/library\n */\n\nimport { spawnSync } from \"node:child_process\";\nimport { readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { decodeSkaileManifest, type SkPublishManifest } from \"@skaile/workspaces/core\";\nimport type { GitBackendConfig, Library } from \"@skaile/workspaces/library\";\nimport { logErr, logInfo, logOk, S } from \"../helpers.ts\";\nimport { openLibraryManager } from \"../open-library.ts\";\nimport { isStoreAuthenticated } from \"../store-client.ts\";\nimport { makeHttpPublisherClient, type PublisherClient } from \"../store-publisher.ts\";\nimport {\n bareName,\n formatNamespaceAvailability,\n preflightNamespace,\n publishToStore,\n refFor,\n} from \"./publish-core.ts\";\n\n/** Injectable spawn contract — the subset of `spawnSync` these helpers use. */\ntype SpawnLike = typeof spawnSync;\n\n/** The fixed filename a library carries at its root for publication. */\nconst MANIFEST_FILENAME = \"skaile.manifest.yaml\";\n\n/** The remote url of a git-backed library, or `undefined` for a local one. */\nfunction remoteUrlOf(lib: Library): string | undefined {\n if (lib.backend !== \"git\") return undefined;\n return (lib.backendConfig as GitBackendConfig).url;\n}\n\n/** The publish branch of a git-backed library (defaults to `main`). */\nfunction branchOf(lib: Library): string {\n if (lib.backend !== \"git\") return \"main\";\n return (lib.backendConfig as GitBackendConfig).branch ?? \"main\";\n}\n\n/**\n * Read + decode the in-repo `skaile.manifest.yaml`. Prints each error\n * diagnostic and exits (1) — mirroring the sidecar flow's validation gate.\n */\nfunction loadManifest(libPath: string): SkPublishManifest {\n let text: string;\n try {\n text = readFileSync(join(libPath, MANIFEST_FILENAME), \"utf-8\");\n } catch {\n logErr(\n `No ${S.dim(MANIFEST_FILENAME)} in the library — author it (see \\`skaile library create\\`) ` +\n \"and run `skaile validate` before publishing.\",\n );\n process.exit(1);\n }\n const { manifest, diagnostics } = decodeSkaileManifest(text);\n const errors = diagnostics.filter((d) => d.severity === \"error\");\n if (errors.length > 0) {\n for (const d of errors) logErr(`${d.code}: ${d.message}`);\n logErr(\"The manifest has errors — fix them with `skaile validate` before publishing.\");\n process.exit(1);\n }\n return manifest;\n}\n\n/** Run a git command in `cwd` via the injected spawn; returns the result. */\nfunction runGit(spawn: SpawnLike, cwd: string, args: string[]) {\n return spawn(\"git\", [\"-C\", cwd, ...args], { encoding: \"utf-8\" });\n}\n\n/**\n * Ensure `libPath` is a git repo whose `origin` points at `remoteUrl`, then\n * commit any changes and push to `branch`. Idempotent re-publish: an unchanged\n * tree makes `git commit` fail with \"nothing to commit\" — swallowed. Push (or\n * any other git) failures surface as thrown Errors carrying git's stderr.\n */\nfunction commitAndPush(opts: {\n libPath: string;\n remoteUrl: string;\n branch: string;\n spawn: SpawnLike;\n}): void {\n const { libPath, remoteUrl, branch, spawn } = opts;\n\n const gitDir = runGit(spawn, libPath, [\"rev-parse\", \"--git-dir\"]);\n if (gitDir.status !== 0) {\n const init = runGit(spawn, libPath, [\"init\"]);\n if (init.status !== 0) {\n throw new Error(\n `git init failed: ${(init.stderr ?? \"\").toString().trim() || `exit ${init.status}`}`,\n );\n }\n }\n\n // Point origin at the resolved remote (add if absent, else set-url).\n const getUrl = runGit(spawn, libPath, [\"remote\", \"get-url\", \"origin\"]);\n const originArgs =\n getUrl.status === 0\n ? [\"remote\", \"set-url\", \"origin\", remoteUrl]\n : [\"remote\", \"add\", \"origin\", remoteUrl];\n const setOrigin = runGit(spawn, libPath, originArgs);\n if (setOrigin.status !== 0) {\n throw new Error(\n `git remote failed: ${(setOrigin.stderr ?? \"\").toString().trim() || `exit ${setOrigin.status}`}`,\n );\n }\n\n const add = runGit(spawn, libPath, [\"add\", \"-A\"]);\n if (add.status !== 0) {\n throw new Error(\n `git add failed: ${(add.stderr ?? \"\").toString().trim() || `exit ${add.status}`}`,\n );\n }\n\n // Fixed bot identity via -c so the commit succeeds regardless of the author's\n // git config (the publish commit is a machine action).\n const commit = spawn(\n \"git\",\n [\n \"-C\",\n libPath,\n \"-c\",\n \"user.email=publish@skaile.store\",\n \"-c\",\n \"user.name=skaile\",\n \"commit\",\n \"-m\",\n \"chore: publish\",\n ],\n { encoding: \"utf-8\" },\n );\n if (commit.status !== 0) {\n const out = `${commit.stdout ?? \"\"}${commit.stderr ?? \"\"}`;\n if (!/nothing to commit/i.test(out)) {\n throw new Error(`git commit failed: ${out.trim() || `exit ${commit.status}`}`);\n }\n }\n\n const push = runGit(spawn, libPath, [\"push\", \"origin\", `HEAD:${branch}`]);\n if (push.status !== 0) {\n throw new Error(\n `git push failed: ${(push.stderr ?? \"\").toString().trim() || `exit ${push.status}`}`,\n );\n }\n}\n\n/**\n * Provision a public GitHub repo `github.com/<you>/<name>` via `gh` and return\n * its https url. Parses the url `gh` prints on success. Throws on failure.\n */\nfunction createRepoViaGh(name: string, spawn: SpawnLike): string {\n const res = spawn(\"gh\", [\"repo\", \"create\", name, \"--public\"], { encoding: \"utf-8\" });\n if (res.status !== 0) {\n const stderr = (res.stderr ?? \"\").toString().trim();\n throw new Error(`gh repo create ${name} failed: ${stderr || `exit ${res.status}`}`);\n }\n // `gh repo create` prints the repo url (e.g. `https://github.com/<owner>/<name>`);\n // scan combined output for the first github.com url so we capture whatever\n // owner gh resolved (the authed user).\n const out = `${res.stdout ?? \"\"}\\n${res.stderr ?? \"\"}`;\n const match = out.match(/https:\\/\\/github\\.com\\/[^\\s]+/);\n if (!match) {\n throw new Error(`gh repo create ${name} succeeded but printed no repo url:\\n${out.trim()}`);\n }\n return match[0].replace(/\\.git$/, \"\").trim();\n}\n\n/** Shared publish body for `publish` (pushes) and `register` (skips the push). */\nasync function publishLibrary(\n name: string,\n opts: {\n asset?: string;\n createRepo?: boolean;\n ref?: string;\n dryRun?: boolean;\n skipPush: boolean;\n },\n client?: PublisherClient,\n spawn: SpawnLike = spawnSync,\n): Promise<void> {\n const injected = client !== undefined;\n const { manager, close } = await openLibraryManager();\n try {\n const lib = await manager.requireLibrary(name);\n const manifest = loadManifest(lib.path);\n\n // Resolve the remote: git-backed → its url; local + --create-repo → provision\n // and link; else stop with a hint.\n let remoteUrl = remoteUrlOf(lib);\n let wouldCreateRepo = false;\n if (!remoteUrl) {\n if (opts.createRepo) {\n if (opts.dryRun) {\n // A dry-run must not provision anything — defer the real\n // `gh repo create` to the live run and just show the would-be remote.\n wouldCreateRepo = true;\n remoteUrl = `https://github.com/<your-account>/${lib.name}`;\n } else {\n remoteUrl = createRepoViaGh(lib.name, spawn);\n await manager.updateLibrary(name, {\n backend: \"git\",\n backendConfig: { url: remoteUrl, branch: \"main\", authHint: \"ssh\" },\n });\n logOk(`Created + linked ${S.dim(remoteUrl)}.`);\n }\n } else {\n logErr(\n `Library \"${name}\" has no remote — run ${S.cmd(`skaile library link ${name} <url>`)} ` +\n \"first, or pass `--create-repo` to provision a public repo.\",\n );\n process.exit(1);\n }\n }\n\n // The manifest's own publisher is the namespace (first-party — no remap).\n const namespace = manifest.publisher ?? \"<manifest publisher>\";\n const targetName = opts.asset ? bareName(opts.asset) : undefined;\n const wouldBeRefs = (manifest.assets ?? [])\n .filter((a) => !targetName || a.name === targetName)\n .map((a) => refFor(a.kind, namespace, a.name, a.version ?? manifest.version));\n\n const sourceRef = opts.ref ?? branchOf(lib);\n\n if (opts.dryRun) {\n logInfo(`Publish plan for ${S.bold(name)}:`);\n logInfo(\n ` remote: ${remoteUrl}${wouldCreateRepo ? \" (would be created via `gh repo create --public`)\" : \"\"}`,\n );\n logInfo(` publisher: ${namespace}`);\n // Best-effort namespace-availability probe — a read-only GET, only when\n // signed in (or a client is injected). A failure keeps dry-run offline-safe.\n if (manifest.publisher && (injected || isStoreAuthenticated())) {\n try {\n const avail = await (client ?? makeHttpPublisherClient()).namespaceAvailability(\n manifest.publisher,\n );\n logInfo(` namespace: ${formatNamespaceAvailability(avail)}`);\n } catch {\n // Store unreachable / not signed in — skip the advisory, never fail.\n }\n }\n logInfo(` source ref: ${sourceRef}`);\n logInfo(` would publish ${wouldBeRefs.length} asset(s):`);\n for (const r of wouldBeRefs) logInfo(` ${r}`);\n return;\n }\n\n // A real publish makes store calls, so it needs a token (injected fakes bypass).\n if (!injected && !isStoreAuthenticated()) {\n logErr(\"Not signed in — run `skaile store login` first.\");\n process.exit(1);\n }\n\n const pub = client ?? makeHttpPublisherClient();\n\n // Preflight the namespace BEFORE the public git push, so a reserved/unclaimed\n // namespace fails fast with guidance instead of after publishing bytes.\n if (manifest.publisher) {\n const gate = await preflightNamespace(pub, manifest.publisher);\n if (!gate.ok) {\n logErr(gate.message ?? `Cannot publish under @${manifest.publisher}.`);\n process.exit(1);\n }\n }\n\n // publish commits + pushes the library repo; register takes the remote HEAD as-is.\n if (!opts.skipPush) {\n // `git add -A` stages every non-ignored file → a PUBLIC push. Surface it so\n // an unexpected file in the working tree is not silently published.\n logInfo(\n `Committing the library and pushing to the PUBLIC remote ${S.dim(remoteUrl)} ` +\n \"(.gitignore honored; anything else in the working tree becomes public).\",\n );\n commitAndPush({ libPath: lib.path, remoteUrl, branch: branchOf(lib), spawn });\n logOk(`Pushed ${S.dim(name)} to ${S.dim(remoteUrl)}.`);\n }\n\n const { published } = await publishToStore({\n sourceUrl: remoteUrl,\n ref: sourceRef,\n manifest,\n assetName: targetName,\n client: pub,\n });\n\n if (published.length > 0) {\n logInfo(`Consumers can now \\`skaile add ${published[0]}\\`.`);\n }\n } finally {\n close();\n }\n}\n\n/**\n * `skaile library publish <lib>` — commit + push the library repo, register +\n * sync it as a store source, and publish its manifest's assets under the\n * manifest publisher. See the module header for the full flow.\n */\nexport async function runLibraryPublish(\n name: string,\n opts: { asset?: string; createRepo?: boolean; ref?: string; dryRun?: boolean },\n client?: PublisherClient,\n spawn: SpawnLike = spawnSync,\n): Promise<void> {\n await publishLibrary(name, { ...opts, skipPush: false }, client, spawn);\n}\n\n/**\n * `skaile library register <lib>` — same as publish but skips the commit/push\n * (the bytes are already on GitHub at the current remote HEAD). Still requires a\n * git-backed remote.\n */\nexport async function runLibraryRegister(\n name: string,\n opts: { asset?: string; ref?: string; dryRun?: boolean },\n client?: PublisherClient,\n spawn: SpawnLike = spawnSync,\n): Promise<void> {\n await publishLibrary(name, { ...opts, skipPush: true }, client, spawn);\n}\n\n/**\n * `skaile library yank <lib>` — unpublish the library's published assets from\n * the store (all, or the single asset matching `opts.asset`'s name).\n * Auth-gated like publish.\n */\nexport async function runLibraryYank(\n name: string,\n opts: { asset?: string },\n client?: PublisherClient,\n): Promise<void> {\n const injected = client !== undefined;\n const { manager, close } = await openLibraryManager();\n try {\n const lib = await manager.requireLibrary(name);\n const remoteUrl = remoteUrlOf(lib);\n if (!remoteUrl) {\n logErr(`Library \"${name}\" has no remote — nothing published to yank.`);\n process.exit(1);\n }\n\n if (!injected && !isStoreAuthenticated()) {\n logErr(\"Not signed in — run `skaile store login` first.\");\n process.exit(1);\n }\n\n const pub = client ?? makeHttpPublisherClient();\n const rows = await pub.sourcesList();\n const source = rows.find((r) => r.url === remoteUrl);\n if (!source) {\n logErr(`Library \"${name}\" is not registered in the store — nothing to yank.`);\n process.exit(1);\n }\n\n const targetName = opts.asset ? bareName(opts.asset) : undefined;\n const candidates = (await pub.sourceCandidates(source.id)).filter(\n (c) => c.published && (!targetName || c.name === targetName),\n );\n if (candidates.length === 0) {\n logInfo(\"No published assets matched — nothing to yank.\");\n return;\n }\n\n const yanked: string[] = [];\n for (const c of candidates) {\n try {\n await pub.assetUnpublish(c.id);\n yanked.push(`${c.kind}:${c.name}`);\n } catch (err) {\n logErr(\n `Failed to yank ${c.kind}:${c.name}: ${err instanceof Error ? err.message : String(err)}`,\n );\n }\n }\n\n logOk(`Yanked ${yanked.length} asset(s):`);\n for (const r of yanked) logInfo(` ${r}`);\n } finally {\n close();\n }\n}\n"]}
1
+ {"version":3,"sources":["../cli/src/commands/library-publish.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAw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AY;AAC1B,MAAA,IAAI;AACF,QAAA,MAAM,GAAA,CAAI,cAAA,CAAe,CAAA,CAAE,EAAE,CAAA;AAC7B,QAAA,MAAA,CAAO,KAAK,CAAA,EAAG,CAAA,CAAE,IAAI,CAAA,CAAA,EAAI,CAAA,CAAE,IAAI,CAAA,CAAE,CAAA;AAAA,MACnC,SAAS,GAAA,EAAK;AACZ,QAAA,MAAA;AAAA,UACE,CAAA,eAAA,EAAkB,CAAA,CAAE,IAAI,CAAA,CAAA,EAAI,CAAA,CAAE,IAAI,CAAA,EAAA,EAAK,GAAA,YAAe,KAAA,GAAQ,GAAA,CAAI,OAAA,GAAU,MAAA,CAAO,GAAG,CAAC,CAAA;AAAA,SACzF;AAAA,MACF;AAAA,IACF;AAEA,IAAA,KAAA,CAAM,CAAA,OAAA,EAAU,MAAA,CAAO,MAAM,CAAA,UAAA,CAAY,CAAA;AACzC,IAAA,KAAA,MAAW,CAAA,IAAK,MAAA,EAAQ,OAAA,CAAQ,CAAA,EAAA,EAAK,CAAC,CAAA,CAAE,CAAA;AAAA,EAC1C,CAAA,SAAE;AACA,IAAA,KAAA,EAAM;AAAA,EACR;AACF","file":"library-publish-VBLSTO7S.js","sourcesContent":["/**\n * `skaile library publish / register / yank` — the first-party publish flow.\n * A git-backed library you own carries an in-repo `skaile.manifest.yaml`; this\n * commits + pushes the library repo (publish), or takes the current remote HEAD\n * as-is (register), then registers + syncs it as a store source and publishes\n * the manifest's assets under the manifest's own `publisher` (no namespace\n * remap — first-party authors intend their declared namespace).\n *\n * - `publish` = commit (if dirty) + push + register + sync + publish.\n * - `register` = same, but skip the commit/push (bytes already on GitHub).\n * - `yank` = unpublish the library's published assets (all, or one).\n *\n * The store REST surface is reached through the injectable {@link PublisherClient}\n * (default HTTP); git side-effects go through an injectable `spawn`. Both seams\n * keep the flow unit/integration-testable without a live store or a real remote.\n *\n * @docLink cli/commands/library\n */\n\nimport { spawnSync } from \"node:child_process\";\nimport { readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { decodeSkaileManifest, type SkPublishManifest } from \"@skaile/workspaces/core\";\nimport type { GitBackendConfig, Library } from \"@skaile/workspaces/library\";\nimport { logErr, logInfo, logOk, S } from \"../helpers.ts\";\nimport { openLibraryManager } from \"../open-library.ts\";\nimport { isStoreAuthenticated } from \"../store-client.ts\";\nimport { makeHttpPublisherClient, type PublisherClient } from \"../store-publisher.ts\";\nimport {\n bareName,\n formatNamespaceAvailability,\n preflightNamespace,\n publishToStore,\n refFor,\n} from \"./publish-core.ts\";\n\n/** Injectable spawn contract — the subset of `spawnSync` these helpers use. */\ntype SpawnLike = typeof spawnSync;\n\n/** The fixed filename a library carries at its root for publication. */\nconst MANIFEST_FILENAME = \"skaile.manifest.yaml\";\n\n/** The remote url of a git-backed library, or `undefined` for a local one. */\nfunction remoteUrlOf(lib: Library): string | undefined {\n if (lib.backend !== \"git\") return undefined;\n return (lib.backendConfig as GitBackendConfig).url;\n}\n\n/** The publish branch of a git-backed library (defaults to `main`). */\nfunction branchOf(lib: Library): string {\n if (lib.backend !== \"git\") return \"main\";\n return (lib.backendConfig as GitBackendConfig).branch ?? \"main\";\n}\n\n/**\n * Read + decode the in-repo `skaile.manifest.yaml`. Prints each error\n * diagnostic and exits (1) — mirroring the sidecar flow's validation gate.\n */\nfunction loadManifest(libPath: string): SkPublishManifest {\n let text: string;\n try {\n text = readFileSync(join(libPath, MANIFEST_FILENAME), \"utf-8\");\n } catch {\n logErr(\n `No ${S.dim(MANIFEST_FILENAME)} in the library — author it (see \\`skaile library create\\`) ` +\n \"and run `skaile validate` before publishing.\",\n );\n process.exit(1);\n }\n const { manifest, diagnostics } = decodeSkaileManifest(text);\n const errors = diagnostics.filter((d) => d.severity === \"error\");\n if (errors.length > 0) {\n for (const d of errors) logErr(`${d.code}: ${d.message}`);\n logErr(\"The manifest has errors — fix them with `skaile validate` before publishing.\");\n process.exit(1);\n }\n return manifest;\n}\n\n/** Run a git command in `cwd` via the injected spawn; returns the result. */\nfunction runGit(spawn: SpawnLike, cwd: string, args: string[]) {\n return spawn(\"git\", [\"-C\", cwd, ...args], { encoding: \"utf-8\" });\n}\n\n/**\n * Ensure `libPath` is a git repo whose `origin` points at `remoteUrl`, then\n * commit any changes and push to `branch`. Idempotent re-publish: an unchanged\n * tree makes `git commit` fail with \"nothing to commit\" — swallowed. Push (or\n * any other git) failures surface as thrown Errors carrying git's stderr.\n */\nfunction commitAndPush(opts: {\n libPath: string;\n remoteUrl: string;\n branch: string;\n spawn: SpawnLike;\n}): void {\n const { libPath, remoteUrl, branch, spawn } = opts;\n\n const gitDir = runGit(spawn, libPath, [\"rev-parse\", \"--git-dir\"]);\n if (gitDir.status !== 0) {\n const init = runGit(spawn, libPath, [\"init\"]);\n if (init.status !== 0) {\n throw new Error(\n `git init failed: ${(init.stderr ?? \"\").toString().trim() || `exit ${init.status}`}`,\n );\n }\n }\n\n // Point origin at the resolved remote (add if absent, else set-url).\n const getUrl = runGit(spawn, libPath, [\"remote\", \"get-url\", \"origin\"]);\n const originArgs =\n getUrl.status === 0\n ? [\"remote\", \"set-url\", \"origin\", remoteUrl]\n : [\"remote\", \"add\", \"origin\", remoteUrl];\n const setOrigin = runGit(spawn, libPath, originArgs);\n if (setOrigin.status !== 0) {\n throw new Error(\n `git remote failed: ${(setOrigin.stderr ?? \"\").toString().trim() || `exit ${setOrigin.status}`}`,\n );\n }\n\n const add = runGit(spawn, libPath, [\"add\", \"-A\"]);\n if (add.status !== 0) {\n throw new Error(\n `git add failed: ${(add.stderr ?? \"\").toString().trim() || `exit ${add.status}`}`,\n );\n }\n\n // Fixed bot identity via -c so the commit succeeds regardless of the author's\n // git config (the publish commit is a machine action).\n const commit = spawn(\n \"git\",\n [\n \"-C\",\n libPath,\n \"-c\",\n \"user.email=publish@skaile.store\",\n \"-c\",\n \"user.name=skaile\",\n \"commit\",\n \"-m\",\n \"chore: publish\",\n ],\n { encoding: \"utf-8\" },\n );\n if (commit.status !== 0) {\n const out = `${commit.stdout ?? \"\"}${commit.stderr ?? \"\"}`;\n if (!/nothing to commit/i.test(out)) {\n throw new Error(`git commit failed: ${out.trim() || `exit ${commit.status}`}`);\n }\n }\n\n const push = runGit(spawn, libPath, [\"push\", \"origin\", `HEAD:${branch}`]);\n if (push.status !== 0) {\n throw new Error(\n `git push failed: ${(push.stderr ?? \"\").toString().trim() || `exit ${push.status}`}`,\n );\n }\n}\n\n/**\n * Provision a public GitHub repo `github.com/<you>/<name>` via `gh` and return\n * its https url. Parses the url `gh` prints on success. Throws on failure.\n */\nfunction createRepoViaGh(name: string, spawn: SpawnLike): string {\n const res = spawn(\"gh\", [\"repo\", \"create\", name, \"--public\"], { encoding: \"utf-8\" });\n if (res.status !== 0) {\n const stderr = (res.stderr ?? \"\").toString().trim();\n throw new Error(`gh repo create ${name} failed: ${stderr || `exit ${res.status}`}`);\n }\n // `gh repo create` prints the repo url (e.g. `https://github.com/<owner>/<name>`);\n // scan combined output for the first github.com url so we capture whatever\n // owner gh resolved (the authed user).\n const out = `${res.stdout ?? \"\"}\\n${res.stderr ?? \"\"}`;\n const match = out.match(/https:\\/\\/github\\.com\\/[^\\s]+/);\n if (!match) {\n throw new Error(`gh repo create ${name} succeeded but printed no repo url:\\n${out.trim()}`);\n }\n return match[0].replace(/\\.git$/, \"\").trim();\n}\n\n/** Shared publish body for `publish` (pushes) and `register` (skips the push). */\nasync function publishLibrary(\n name: string,\n opts: {\n asset?: string;\n createRepo?: boolean;\n ref?: string;\n dryRun?: boolean;\n skipPush: boolean;\n },\n client?: PublisherClient,\n spawn: SpawnLike = spawnSync,\n): Promise<void> {\n const injected = client !== undefined;\n const { manager, close } = await openLibraryManager();\n try {\n const lib = await manager.requireLibrary(name);\n const manifest = loadManifest(lib.path);\n\n // Resolve the remote: git-backed → its url; local + --create-repo → provision\n // and link; else stop with a hint.\n let remoteUrl = remoteUrlOf(lib);\n let wouldCreateRepo = false;\n if (!remoteUrl) {\n if (opts.createRepo) {\n if (opts.dryRun) {\n // A dry-run must not provision anything — defer the real\n // `gh repo create` to the live run and just show the would-be remote.\n wouldCreateRepo = true;\n remoteUrl = `https://github.com/<your-account>/${lib.name}`;\n } else {\n remoteUrl = createRepoViaGh(lib.name, spawn);\n await manager.updateLibrary(name, {\n backend: \"git\",\n backendConfig: { url: remoteUrl, branch: \"main\", authHint: \"ssh\" },\n });\n logOk(`Created + linked ${S.dim(remoteUrl)}.`);\n }\n } else {\n logErr(\n `Library \"${name}\" has no remote — run ${S.cmd(`skaile library link ${name} <url>`)} ` +\n \"first, or pass `--create-repo` to provision a public repo.\",\n );\n process.exit(1);\n }\n }\n\n // The manifest's own publisher is the namespace (first-party — no remap).\n const namespace = manifest.publisher ?? \"<manifest publisher>\";\n const targetName = opts.asset ? bareName(opts.asset) : undefined;\n const wouldBeRefs = (manifest.assets ?? [])\n .filter((a) => !targetName || a.name === targetName)\n .map((a) => refFor(a.kind, namespace, a.name, a.version ?? manifest.version));\n\n const sourceRef = opts.ref ?? branchOf(lib);\n\n if (opts.dryRun) {\n logInfo(`Publish plan for ${S.bold(name)}:`);\n logInfo(\n ` remote: ${remoteUrl}${wouldCreateRepo ? \" (would be created via `gh repo create --public`)\" : \"\"}`,\n );\n logInfo(` publisher: ${namespace}`);\n // Best-effort namespace-availability probe — a read-only GET, only when\n // signed in (or a client is injected). A failure keeps dry-run offline-safe.\n if (manifest.publisher && (injected || isStoreAuthenticated())) {\n try {\n const avail = await (client ?? makeHttpPublisherClient()).namespaceAvailability(\n manifest.publisher,\n );\n logInfo(` namespace: ${formatNamespaceAvailability(avail)}`);\n } catch {\n // Store unreachable / not signed in — skip the advisory, never fail.\n }\n }\n logInfo(` source ref: ${sourceRef}`);\n logInfo(` would publish ${wouldBeRefs.length} asset(s):`);\n for (const r of wouldBeRefs) logInfo(` ${r}`);\n return;\n }\n\n // A real publish makes store calls, so it needs a token (injected fakes bypass).\n if (!injected && !isStoreAuthenticated()) {\n logErr(\"Not signed in — run `skaile store login` first.\");\n process.exit(1);\n }\n\n const pub = client ?? makeHttpPublisherClient();\n\n // Preflight the namespace BEFORE the public git push, so a reserved/unclaimed\n // namespace fails fast with guidance instead of after publishing bytes.\n if (manifest.publisher) {\n const gate = await preflightNamespace(pub, manifest.publisher);\n if (!gate.ok) {\n logErr(gate.message ?? `Cannot publish under @${manifest.publisher}.`);\n process.exit(1);\n }\n }\n\n // publish commits + pushes the library repo; register takes the remote HEAD as-is.\n if (!opts.skipPush) {\n // `git add -A` stages every non-ignored file → a PUBLIC push. Surface it so\n // an unexpected file in the working tree is not silently published.\n logInfo(\n `Committing the library and pushing to the PUBLIC remote ${S.dim(remoteUrl)} ` +\n \"(.gitignore honored; anything else in the working tree becomes public).\",\n );\n commitAndPush({ libPath: lib.path, remoteUrl, branch: branchOf(lib), spawn });\n logOk(`Pushed ${S.dim(name)} to ${S.dim(remoteUrl)}.`);\n }\n\n const { published } = await publishToStore({\n sourceUrl: remoteUrl,\n ref: sourceRef,\n manifest,\n assetName: targetName,\n client: pub,\n });\n\n if (published.length > 0) {\n logInfo(`Consumers can now \\`skaile add ${published[0]}\\`.`);\n }\n } finally {\n close();\n }\n}\n\n/**\n * `skaile library publish <lib>` — commit + push the library repo, register +\n * sync it as a store source, and publish its manifest's assets under the\n * manifest publisher. See the module header for the full flow.\n */\nexport async function runLibraryPublish(\n name: string,\n opts: { asset?: string; createRepo?: boolean; ref?: string; dryRun?: boolean },\n client?: PublisherClient,\n spawn: SpawnLike = spawnSync,\n): Promise<void> {\n await publishLibrary(name, { ...opts, skipPush: false }, client, spawn);\n}\n\n/**\n * `skaile library register <lib>` — same as publish but skips the commit/push\n * (the bytes are already on GitHub at the current remote HEAD). Still requires a\n * git-backed remote.\n */\nexport async function runLibraryRegister(\n name: string,\n opts: { asset?: string; ref?: string; dryRun?: boolean },\n client?: PublisherClient,\n spawn: SpawnLike = spawnSync,\n): Promise<void> {\n await publishLibrary(name, { ...opts, skipPush: true }, client, spawn);\n}\n\n/**\n * `skaile library yank <lib>` — unpublish the library's published assets from\n * the store (all, or the single asset matching `opts.asset`'s name).\n * Auth-gated like publish.\n */\nexport async function runLibraryYank(\n name: string,\n opts: { asset?: string },\n client?: PublisherClient,\n): Promise<void> {\n const injected = client !== undefined;\n const { manager, close } = await openLibraryManager();\n try {\n const lib = await manager.requireLibrary(name);\n const remoteUrl = remoteUrlOf(lib);\n if (!remoteUrl) {\n logErr(`Library \"${name}\" has no remote — nothing published to yank.`);\n process.exit(1);\n }\n\n if (!injected && !isStoreAuthenticated()) {\n logErr(\"Not signed in — run `skaile store login` first.\");\n process.exit(1);\n }\n\n const pub = client ?? makeHttpPublisherClient();\n const rows = await pub.sourcesList();\n const source = rows.find((r) => r.url === remoteUrl);\n if (!source) {\n logErr(`Library \"${name}\" is not registered in the store — nothing to yank.`);\n process.exit(1);\n }\n\n const targetName = opts.asset ? bareName(opts.asset) : undefined;\n const candidates = (await pub.sourceCandidates(source.id)).filter(\n (c) => c.published && (!targetName || c.name === targetName),\n );\n if (candidates.length === 0) {\n logInfo(\"No published assets matched — nothing to yank.\");\n return;\n }\n\n const yanked: string[] = [];\n for (const c of candidates) {\n try {\n await pub.assetUnpublish(c.id);\n yanked.push(`${c.kind}:${c.name}`);\n } catch (err) {\n logErr(\n `Failed to yank ${c.kind}:${c.name}: ${err instanceof Error ? err.message : String(err)}`,\n );\n }\n }\n\n logOk(`Yanked ${yanked.length} asset(s):`);\n for (const r of yanked) logInfo(` ${r}`);\n } finally {\n close();\n }\n}\n"]}
@@ -1,10 +1,10 @@
1
- export { LocalCatalogDisabledError, openCatalogSource, openLibrary, openLibraryManager, resolveCatalogSource } from './chunk-JCT4UMGQ.js';
2
- import './chunk-QD4ZCIPQ.js';
1
+ export { LocalCatalogDisabledError, openCatalogSource, openLibrary, openLibraryManager, resolveCatalogSource } from './chunk-XZCRIPWT.js';
2
+ import './chunk-SSODNBSC.js';
3
3
  import './chunk-KTCMBEEB.js';
4
4
  import './chunk-ALLCAFHQ.js';
5
5
  import './chunk-V4RGCKYC.js';
6
6
  import './chunk-DHMBE5J7.js';
7
- import './chunk-SWXUBDTV.js';
7
+ import './chunk-IHFQTKUP.js';
8
8
  import './chunk-UFWADBG6.js';
9
9
  import './chunk-HGPSZXZP.js';
10
10
  import './chunk-VOEBLPXO.js';
@@ -33,5 +33,5 @@ import './chunk-UQ6LFBPZ.js';
33
33
  import './chunk-DKCFWSVW.js';
34
34
  import './chunk-N7B3LZ7V.js';
35
35
  import './chunk-NSBPE2FW.js';
36
- //# sourceMappingURL=open-library-OOUZG24B.js.map
37
- //# sourceMappingURL=open-library-OOUZG24B.js.map
36
+ //# sourceMappingURL=open-library-SJ54ZBGJ.js.map
37
+ //# sourceMappingURL=open-library-SJ54ZBGJ.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"open-library-OOUZG24B.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"open-library-SJ54ZBGJ.js"}
@@ -1,6 +1,6 @@
1
- export { makeCheckCommand, makeCleanCommand, makeInstallCommand, reportInstalledSoftDeps, runPointerOnlyInstall, supportsInstallManifest } from './chunk-4U3NSLGV.js';
2
- import './chunk-QD4ZCIPQ.js';
3
- import './chunk-SWXUBDTV.js';
1
+ export { makeCheckCommand, makeCleanCommand, makeInstallCommand, reportInstalledSoftDeps, runPointerOnlyInstall, supportsInstallManifest } from './chunk-YR3CLEQG.js';
2
+ import './chunk-SSODNBSC.js';
3
+ import './chunk-IHFQTKUP.js';
4
4
  import './chunk-UFWADBG6.js';
5
5
  import './chunk-HGPSZXZP.js';
6
6
  import './chunk-VOEBLPXO.js';
@@ -29,5 +29,5 @@ import './chunk-UQ6LFBPZ.js';
29
29
  import './chunk-DKCFWSVW.js';
30
30
  import './chunk-N7B3LZ7V.js';
31
31
  import './chunk-NSBPE2FW.js';
32
- //# sourceMappingURL=project-ZUYKJX3V.js.map
33
- //# sourceMappingURL=project-ZUYKJX3V.js.map
32
+ //# sourceMappingURL=project-GLZR4SLT.js.map
33
+ //# sourceMappingURL=project-GLZR4SLT.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"project-ZUYKJX3V.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"project-GLZR4SLT.js"}
@@ -1,5 +1,5 @@
1
- export { CLAUDE_CODE_CREDENTIALS_KEY, COMPILE_MANIFEST_FILENAME, CapabilityRegistry, DEFAULT_CAPABILITY_CALL_TIMEOUT_MS, DEFAULT_COALESCE_MS, DEFAULT_FLOW_MUTATE_CONNECTOR_WAIT_MS, MOUNT_LIST_MAX_DEPTH, MOUNT_LIST_MAX_ENTRIES, MOUNT_READ_DEADLINE_FACTOR, MOUNT_STAT_BUDGET_MS, MOUNT_STAT_MAX_ENTRIES, MOUNT_TREE_OP_DEADLINE_FACTOR, MarkdownStreamer, PreInitRingSink, ResourceOperationError, SESSION_ROOT_WRITABLE_DIRS, SESSION_ROOT_WRITABLE_FILES, WS_AUTH_TOKEN_ENV, WS_AUTH_TOKEN_FILE_ENV, agentDefinitionExists, bootstrapCapabilityRegistry, bootstrapRunnerLogStore, buildAgentResources, buildClientCapabilityHandler, buildConnectorTokenMediator, buildContextSection, buildEnvironmentSection, buildResourcesAvailablePayload, buildStoreSnapshotReplay, builtinCapabilities, capabilityLogInstance, clearPreInitRingSink, clearSession, compileComposition, computeCapabilitySignature, computeDirectoryTotals, connectorRefreshKind, createAgentSession, createFlowConnectorReadiness, createManagedCodexSubpromptDriver, createSessionStimulusBus, defineCapability, deleteSession, dispatchResourceRequest, dispatchRunnerCapabilityInvocation, emitSystemPromptComposed, ensureClaudeSettingsDisablesConnectors, ensureGitConfigInclude, executeConnectorMutate, extractClaudeAiOauthExpiresAt, flowRunDrivesTurns, flowStartNeedsDriverRestart, getPreInitRingSink, handleMountResourceRequest, handleResourceRequest, handleSessionRootResourceRequest, hasNonTerminalFlow, hostOpResumeStimulus, installPreInitRingSink, isSessionRootPathAllowed, isTerminalFlowStatus, listSessions, loadAgentManifest, loadCompileManifest, loadCompileManifestFromDir, loadManagedCodexHostConfig, loadSession, loadSessionById, mcpAuthSecretKey, newSession, nulTailPaddingLength, pickChatFlowTarget, pickFlowToolTarget, pickRepointedManager, planFlowMutate, prepareCodexTools, reconcilePendingDecisions, registerActiveFlow, registerCompositionCapabilities, rejectCapabilityOnApprovalDeny, rejectPendingCapabilityCallsOnDisconnect, resetRunnerLogStore, resolveAgentComposition, resolveAgentMixins, resolveBinding, resolveCapabilityCallTimeoutMs, resolveCapabilityResult, resolveComposition, resolveFlowMutateConnectorWaitMs, resolveMixin, runAgentChat, saveSession, setCurrentSession, setUpFlowConnector, startAgentServer, stimulusFromMetas, supportsLiveToolUpdates, takeRunnerWsAuthToken, touchSession, validateInputResponse, writeClaudeCodeCredentialsFile } from '../chunk-VFGEIFRT.js';
2
- import '../chunk-OTRHFPUF.js';
1
+ export { CLAUDE_CODE_CREDENTIALS_KEY, COMPILE_MANIFEST_FILENAME, CapabilityRegistry, DEFAULT_CAPABILITY_CALL_TIMEOUT_MS, DEFAULT_COALESCE_MS, DEFAULT_FLOW_MUTATE_CONNECTOR_WAIT_MS, MOUNT_LIST_MAX_DEPTH, MOUNT_LIST_MAX_ENTRIES, MOUNT_READ_DEADLINE_FACTOR, MOUNT_STAT_BUDGET_MS, MOUNT_STAT_MAX_ENTRIES, MOUNT_TREE_OP_DEADLINE_FACTOR, MarkdownStreamer, PreInitRingSink, ResourceOperationError, SESSION_ROOT_WRITABLE_DIRS, SESSION_ROOT_WRITABLE_FILES, WS_AUTH_TOKEN_ENV, WS_AUTH_TOKEN_FILE_ENV, agentDefinitionExists, bootstrapCapabilityRegistry, bootstrapRunnerLogStore, buildAgentResources, buildClientCapabilityHandler, buildConnectorTokenMediator, buildContextSection, buildEnvironmentSection, buildResourcesAvailablePayload, buildStoreSnapshotReplay, builtinCapabilities, capabilityLogInstance, clearPreInitRingSink, clearSession, compileComposition, computeCapabilitySignature, computeDirectoryTotals, connectorRefreshKind, createAgentSession, createFlowConnectorReadiness, createManagedCodexSubpromptDriver, createSessionStimulusBus, defineCapability, deleteSession, dispatchResourceRequest, dispatchRunnerCapabilityInvocation, emitSystemPromptComposed, ensureClaudeSettingsDisablesConnectors, ensureGitConfigInclude, executeConnectorMutate, extractClaudeAiOauthExpiresAt, flowRunDrivesTurns, flowStartNeedsDriverRestart, getPreInitRingSink, handleMountResourceRequest, handleResourceRequest, handleSessionRootResourceRequest, hasNonTerminalFlow, hostOpResumeStimulus, installPreInitRingSink, isSessionRootPathAllowed, isTerminalFlowStatus, listSessions, loadAgentManifest, loadCompileManifest, loadCompileManifestFromDir, loadManagedCodexHostConfig, loadSession, loadSessionById, mcpAuthSecretKey, newSession, nulTailPaddingLength, pickChatFlowTarget, pickFlowToolTarget, pickRepointedManager, planFlowMutate, prepareCodexTools, reconcilePendingDecisions, registerActiveFlow, registerCompositionCapabilities, rejectCapabilityOnApprovalDeny, rejectPendingCapabilityCallsOnDisconnect, resetRunnerLogStore, resolveAgentComposition, resolveAgentMixins, resolveBinding, resolveCapabilityCallTimeoutMs, resolveCapabilityResult, resolveComposition, resolveFlowMutateConnectorWaitMs, resolveMixin, runAgentChat, saveSession, setCurrentSession, setUpFlowConnector, startAgentServer, stimulusFromMetas, supportsLiveToolUpdates, takeRunnerWsAuthToken, touchSession, validateInputResponse, writeClaudeCodeCredentialsFile } from '../chunk-2N6NQUVB.js';
2
+ import '../chunk-H4XNX2FG.js';
3
3
  import '../chunk-HMUFI3L5.js';
4
4
  import '../chunk-KU473DRO.js';
5
5
  import '../chunk-P2DLXBZK.js';
@@ -15,12 +15,12 @@ import '../chunk-73ZXUUL6.js';
15
15
  import '../chunk-32NA4TVC.js';
16
16
  export { assembleSystemPrompt, buildCapabilitiesPromptSection, buildLinkedPeersPromptSection } from '../chunk-W3UDISS2.js';
17
17
  import '../chunk-PE3A6FFW.js';
18
- import '../chunk-SMXHEEJP.js';
18
+ import '../chunk-253427M3.js';
19
19
  import '../chunk-4R6DROGN.js';
20
20
  import '../chunk-T3YUSWVK.js';
21
21
  import '../chunk-Q6NDQ6BH.js';
22
22
  import '../chunk-ZK7DQRB2.js';
23
- import '../chunk-3SZLZ56M.js';
23
+ import '../chunk-EZOFQW3G.js';
24
24
  import '../chunk-KVWSBQNP.js';
25
25
  import '../chunk-2OLNNQKT.js';
26
26
  import '../chunk-IN466NSZ.js';