@serviceme/devtools-core 0.2.1 → 0.3.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/dist/index.d.mts CHANGED
@@ -4,8 +4,8 @@ import * as fs from 'node:fs/promises';
4
4
  export { AccessCheckResult, AccessControl, AccessControlOptions, AuthCore, AuthCoreOptions, AuthStateManager, AuthStateManagerOptions, CancellationCheck, DeviceFlowUiCallback, GitHubAuthProvider, GitHubAuthProviderConfig, IAuthProvider, IAuthProviderSession, IAuthProviderUserInfo, InMemoryKeychainAuthTokenStore, KeyValueStore, KeychainAccountKey, KeychainAuthTokenStore, KeychainTokenEnvelope, KeychainTokenMetadata, KeychainUnavailableError, MicrosoftAuthProvider, MicrosoftProviderNotHostedError, OrgMembershipFetcher, ProviderRegistry, buildGitHubLocalEmail, isGitHubLocalEmail, resolvePrimaryEmail } from './auth.mjs';
5
5
  export { AtomicWriteResult, BuildSignedHeadersParams, DEVICE_JSON_SCHEMA_VERSION, DeviceAuthHeaders, DeviceCore, DeviceCoreOptions, DeviceReenrollRequiresAuthError, DeviceRequestSignatureParams, DeviceSecretVersionMismatchError, DeviceSignedHeaders, EnrollRequestFn, EnrollResponse, Enroller, EnrollerOptions, FsIdentityFileBackend, IdentityFileBackend, IdentityStore, IdentityStoreHooks, IdentityStoreOptions, PersistedDeviceIdentity, buildSignedHeaders, createDeviceRequestSignature, deriveInstallationId, fingerprintSource, randomInstallationId } from './device.mjs';
6
6
  import { c as SkillKind, b as SkillFile } from './types-B9gk3dXH.mjs';
7
- import { G as GitClient, P as PullResult } from './index-Dmyy4urr.mjs';
8
- export { a as GitError, N as NodeGitSpawner, S as StubGitSpawner, b as SubmitClient, c as SubmitClientOptions, d as SubmitError, e as SubmitOptions, f as SubmitResult, t as toFileUrl } from './index-Dmyy4urr.mjs';
7
+ import { G as GitClient, P as PullResult } from './index-GAigCT0j.mjs';
8
+ export { a as GitError, N as NodeGitSpawner, S as StubGitSpawner, b as SubmitClient, c as SubmitClientOptions, d as SubmitError, e as SubmitOptions, f as SubmitResult, t as toFileUrl } from './index-GAigCT0j.mjs';
9
9
  import * as fs$1 from 'node:fs';
10
10
  import { z } from 'zod';
11
11
  export { BUILTIN_DEFAULT_TOOLS, DefaultToolImmutableError, DefaultToolSeed, FsToolboxFileBackend, PersistedToolbox, ResolvedToolbox, TOOLBOX_JSON_SCHEMA_VERSION, ToolboxCore, ToolboxCoreOptions, ToolboxFileBackend, ToolboxPatch, ToolboxStore, ToolboxStoreHooks, ToolboxStoreOptions, WORKSPACE_TOOLBOX_RELATIVE_PATH, mergeWithDefaults, reindexOrder, sortByRecentFirst, sortByUserOrder, touchLastUsedAt } from './toolbox.mjs';
@@ -528,6 +528,8 @@ interface RepoConfig {
528
528
  branch: string;
529
529
  /** Whether this repo participates in scheduled syncs. */
530
530
  enabled: boolean;
531
+ /** Whether git traffic should go through the local server proxy (default true). */
532
+ useProxy?: boolean;
531
533
  /** Whether the user is allowed to push back to this repo. */
532
534
  writeEnabled: boolean;
533
535
  /** When the user (or first-run installer) added this repo. */
@@ -580,6 +582,7 @@ declare const defaultRepoSchema: z.ZodObject<{
580
582
  url: z.ZodString;
581
583
  branch: z.ZodString;
582
584
  enabled: z.ZodBoolean;
585
+ useProxy: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
583
586
  writeEnabled: z.ZodBoolean;
584
587
  addedAt: z.ZodString;
585
588
  lastSyncAt: z.ZodOptional<z.ZodString>;
@@ -587,13 +590,14 @@ declare const defaultRepoSchema: z.ZodObject<{
587
590
  lastSyncStatus: z.ZodOptional<z.ZodEnum<["ok", "error"]>>;
588
591
  lastSyncError: z.ZodOptional<z.ZodString>;
589
592
  }, "strip", z.ZodTypeAny, {
590
- name: string;
591
593
  id: string;
592
594
  description: string;
593
595
  source: "default";
596
+ name: string;
594
597
  url: string;
595
598
  branch: string;
596
599
  enabled: boolean;
600
+ useProxy: boolean;
597
601
  writeEnabled: boolean;
598
602
  addedAt: string;
599
603
  lastSyncAt?: string | undefined;
@@ -601,15 +605,16 @@ declare const defaultRepoSchema: z.ZodObject<{
601
605
  lastSyncStatus?: "ok" | "error" | undefined;
602
606
  lastSyncError?: string | undefined;
603
607
  }, {
604
- name: string;
605
608
  id: string;
606
609
  description: string;
607
610
  source: "default";
611
+ name: string;
608
612
  url: string;
609
613
  branch: string;
610
614
  enabled: boolean;
611
615
  writeEnabled: boolean;
612
616
  addedAt: string;
617
+ useProxy?: boolean | undefined;
613
618
  lastSyncAt?: string | undefined;
614
619
  lastSyncCommitSha?: string | undefined;
615
620
  lastSyncStatus?: "ok" | "error" | undefined;
@@ -622,6 +627,7 @@ declare const userRepoSchema: z.ZodObject<{
622
627
  url: z.ZodString;
623
628
  branch: z.ZodString;
624
629
  enabled: z.ZodBoolean;
630
+ useProxy: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
625
631
  writeEnabled: z.ZodBoolean;
626
632
  addedAt: z.ZodString;
627
633
  lastSyncAt: z.ZodOptional<z.ZodString>;
@@ -629,12 +635,13 @@ declare const userRepoSchema: z.ZodObject<{
629
635
  lastSyncStatus: z.ZodOptional<z.ZodEnum<["ok", "error"]>>;
630
636
  lastSyncError: z.ZodOptional<z.ZodString>;
631
637
  }, "strip", z.ZodTypeAny, {
632
- name: string;
633
638
  id: string;
634
639
  source: "user";
640
+ name: string;
635
641
  url: string;
636
642
  branch: string;
637
643
  enabled: boolean;
644
+ useProxy: boolean;
638
645
  writeEnabled: boolean;
639
646
  addedAt: string;
640
647
  lastSyncAt?: string | undefined;
@@ -642,14 +649,15 @@ declare const userRepoSchema: z.ZodObject<{
642
649
  lastSyncStatus?: "ok" | "error" | undefined;
643
650
  lastSyncError?: string | undefined;
644
651
  }, {
645
- name: string;
646
652
  id: string;
647
653
  source: "user";
654
+ name: string;
648
655
  url: string;
649
656
  branch: string;
650
657
  enabled: boolean;
651
658
  writeEnabled: boolean;
652
659
  addedAt: string;
660
+ useProxy?: boolean | undefined;
653
661
  lastSyncAt?: string | undefined;
654
662
  lastSyncCommitSha?: string | undefined;
655
663
  lastSyncStatus?: "ok" | "error" | undefined;
@@ -663,6 +671,7 @@ declare const repoSchema: z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
663
671
  url: z.ZodString;
664
672
  branch: z.ZodString;
665
673
  enabled: z.ZodBoolean;
674
+ useProxy: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
666
675
  writeEnabled: z.ZodBoolean;
667
676
  addedAt: z.ZodString;
668
677
  lastSyncAt: z.ZodOptional<z.ZodString>;
@@ -670,13 +679,14 @@ declare const repoSchema: z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
670
679
  lastSyncStatus: z.ZodOptional<z.ZodEnum<["ok", "error"]>>;
671
680
  lastSyncError: z.ZodOptional<z.ZodString>;
672
681
  }, "strip", z.ZodTypeAny, {
673
- name: string;
674
682
  id: string;
675
683
  description: string;
676
684
  source: "default";
685
+ name: string;
677
686
  url: string;
678
687
  branch: string;
679
688
  enabled: boolean;
689
+ useProxy: boolean;
680
690
  writeEnabled: boolean;
681
691
  addedAt: string;
682
692
  lastSyncAt?: string | undefined;
@@ -684,15 +694,16 @@ declare const repoSchema: z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
684
694
  lastSyncStatus?: "ok" | "error" | undefined;
685
695
  lastSyncError?: string | undefined;
686
696
  }, {
687
- name: string;
688
697
  id: string;
689
698
  description: string;
690
699
  source: "default";
700
+ name: string;
691
701
  url: string;
692
702
  branch: string;
693
703
  enabled: boolean;
694
704
  writeEnabled: boolean;
695
705
  addedAt: string;
706
+ useProxy?: boolean | undefined;
696
707
  lastSyncAt?: string | undefined;
697
708
  lastSyncCommitSha?: string | undefined;
698
709
  lastSyncStatus?: "ok" | "error" | undefined;
@@ -704,6 +715,7 @@ declare const repoSchema: z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
704
715
  url: z.ZodString;
705
716
  branch: z.ZodString;
706
717
  enabled: z.ZodBoolean;
718
+ useProxy: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
707
719
  writeEnabled: z.ZodBoolean;
708
720
  addedAt: z.ZodString;
709
721
  lastSyncAt: z.ZodOptional<z.ZodString>;
@@ -711,12 +723,13 @@ declare const repoSchema: z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
711
723
  lastSyncStatus: z.ZodOptional<z.ZodEnum<["ok", "error"]>>;
712
724
  lastSyncError: z.ZodOptional<z.ZodString>;
713
725
  }, "strip", z.ZodTypeAny, {
714
- name: string;
715
726
  id: string;
716
727
  source: "user";
728
+ name: string;
717
729
  url: string;
718
730
  branch: string;
719
731
  enabled: boolean;
732
+ useProxy: boolean;
720
733
  writeEnabled: boolean;
721
734
  addedAt: string;
722
735
  lastSyncAt?: string | undefined;
@@ -724,14 +737,15 @@ declare const repoSchema: z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
724
737
  lastSyncStatus?: "ok" | "error" | undefined;
725
738
  lastSyncError?: string | undefined;
726
739
  }, {
727
- name: string;
728
740
  id: string;
729
741
  source: "user";
742
+ name: string;
730
743
  url: string;
731
744
  branch: string;
732
745
  enabled: boolean;
733
746
  writeEnabled: boolean;
734
747
  addedAt: string;
748
+ useProxy?: boolean | undefined;
735
749
  lastSyncAt?: string | undefined;
736
750
  lastSyncCommitSha?: string | undefined;
737
751
  lastSyncStatus?: "ok" | "error" | undefined;
@@ -748,6 +762,7 @@ declare const reposFileSchema: z.ZodEffects<z.ZodObject<{
748
762
  url: z.ZodString;
749
763
  branch: z.ZodString;
750
764
  enabled: z.ZodBoolean;
765
+ useProxy: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
751
766
  writeEnabled: z.ZodBoolean;
752
767
  addedAt: z.ZodString;
753
768
  lastSyncAt: z.ZodOptional<z.ZodString>;
@@ -755,13 +770,14 @@ declare const reposFileSchema: z.ZodEffects<z.ZodObject<{
755
770
  lastSyncStatus: z.ZodOptional<z.ZodEnum<["ok", "error"]>>;
756
771
  lastSyncError: z.ZodOptional<z.ZodString>;
757
772
  }, "strip", z.ZodTypeAny, {
758
- name: string;
759
773
  id: string;
760
774
  description: string;
761
775
  source: "default";
776
+ name: string;
762
777
  url: string;
763
778
  branch: string;
764
779
  enabled: boolean;
780
+ useProxy: boolean;
765
781
  writeEnabled: boolean;
766
782
  addedAt: string;
767
783
  lastSyncAt?: string | undefined;
@@ -769,15 +785,16 @@ declare const reposFileSchema: z.ZodEffects<z.ZodObject<{
769
785
  lastSyncStatus?: "ok" | "error" | undefined;
770
786
  lastSyncError?: string | undefined;
771
787
  }, {
772
- name: string;
773
788
  id: string;
774
789
  description: string;
775
790
  source: "default";
791
+ name: string;
776
792
  url: string;
777
793
  branch: string;
778
794
  enabled: boolean;
779
795
  writeEnabled: boolean;
780
796
  addedAt: string;
797
+ useProxy?: boolean | undefined;
781
798
  lastSyncAt?: string | undefined;
782
799
  lastSyncCommitSha?: string | undefined;
783
800
  lastSyncStatus?: "ok" | "error" | undefined;
@@ -789,6 +806,7 @@ declare const reposFileSchema: z.ZodEffects<z.ZodObject<{
789
806
  url: z.ZodString;
790
807
  branch: z.ZodString;
791
808
  enabled: z.ZodBoolean;
809
+ useProxy: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
792
810
  writeEnabled: z.ZodBoolean;
793
811
  addedAt: z.ZodString;
794
812
  lastSyncAt: z.ZodOptional<z.ZodString>;
@@ -796,12 +814,13 @@ declare const reposFileSchema: z.ZodEffects<z.ZodObject<{
796
814
  lastSyncStatus: z.ZodOptional<z.ZodEnum<["ok", "error"]>>;
797
815
  lastSyncError: z.ZodOptional<z.ZodString>;
798
816
  }, "strip", z.ZodTypeAny, {
799
- name: string;
800
817
  id: string;
801
818
  source: "user";
819
+ name: string;
802
820
  url: string;
803
821
  branch: string;
804
822
  enabled: boolean;
823
+ useProxy: boolean;
805
824
  writeEnabled: boolean;
806
825
  addedAt: string;
807
826
  lastSyncAt?: string | undefined;
@@ -809,14 +828,15 @@ declare const reposFileSchema: z.ZodEffects<z.ZodObject<{
809
828
  lastSyncStatus?: "ok" | "error" | undefined;
810
829
  lastSyncError?: string | undefined;
811
830
  }, {
812
- name: string;
813
831
  id: string;
814
832
  source: "user";
833
+ name: string;
815
834
  url: string;
816
835
  branch: string;
817
836
  enabled: boolean;
818
837
  writeEnabled: boolean;
819
838
  addedAt: string;
839
+ useProxy?: boolean | undefined;
820
840
  lastSyncAt?: string | undefined;
821
841
  lastSyncCommitSha?: string | undefined;
822
842
  lastSyncStatus?: "ok" | "error" | undefined;
@@ -825,13 +845,14 @@ declare const reposFileSchema: z.ZodEffects<z.ZodObject<{
825
845
  }, "strip", z.ZodTypeAny, {
826
846
  version: 1;
827
847
  repos: ({
828
- name: string;
829
848
  id: string;
830
849
  description: string;
831
850
  source: "default";
851
+ name: string;
832
852
  url: string;
833
853
  branch: string;
834
854
  enabled: boolean;
855
+ useProxy: boolean;
835
856
  writeEnabled: boolean;
836
857
  addedAt: string;
837
858
  lastSyncAt?: string | undefined;
@@ -839,12 +860,13 @@ declare const reposFileSchema: z.ZodEffects<z.ZodObject<{
839
860
  lastSyncStatus?: "ok" | "error" | undefined;
840
861
  lastSyncError?: string | undefined;
841
862
  } | {
842
- name: string;
843
863
  id: string;
844
864
  source: "user";
865
+ name: string;
845
866
  url: string;
846
867
  branch: string;
847
868
  enabled: boolean;
869
+ useProxy: boolean;
848
870
  writeEnabled: boolean;
849
871
  addedAt: string;
850
872
  lastSyncAt?: string | undefined;
@@ -856,28 +878,30 @@ declare const reposFileSchema: z.ZodEffects<z.ZodObject<{
856
878
  }, {
857
879
  version: 1;
858
880
  repos: ({
859
- name: string;
860
881
  id: string;
861
882
  description: string;
862
883
  source: "default";
884
+ name: string;
863
885
  url: string;
864
886
  branch: string;
865
887
  enabled: boolean;
866
888
  writeEnabled: boolean;
867
889
  addedAt: string;
890
+ useProxy?: boolean | undefined;
868
891
  lastSyncAt?: string | undefined;
869
892
  lastSyncCommitSha?: string | undefined;
870
893
  lastSyncStatus?: "ok" | "error" | undefined;
871
894
  lastSyncError?: string | undefined;
872
895
  } | {
873
- name: string;
874
896
  id: string;
875
897
  source: "user";
898
+ name: string;
876
899
  url: string;
877
900
  branch: string;
878
901
  enabled: boolean;
879
902
  writeEnabled: boolean;
880
903
  addedAt: string;
904
+ useProxy?: boolean | undefined;
881
905
  lastSyncAt?: string | undefined;
882
906
  lastSyncCommitSha?: string | undefined;
883
907
  lastSyncStatus?: "ok" | "error" | undefined;
@@ -887,13 +911,14 @@ declare const reposFileSchema: z.ZodEffects<z.ZodObject<{
887
911
  }>, {
888
912
  version: 1;
889
913
  repos: ({
890
- name: string;
891
914
  id: string;
892
915
  description: string;
893
916
  source: "default";
917
+ name: string;
894
918
  url: string;
895
919
  branch: string;
896
920
  enabled: boolean;
921
+ useProxy: boolean;
897
922
  writeEnabled: boolean;
898
923
  addedAt: string;
899
924
  lastSyncAt?: string | undefined;
@@ -901,12 +926,13 @@ declare const reposFileSchema: z.ZodEffects<z.ZodObject<{
901
926
  lastSyncStatus?: "ok" | "error" | undefined;
902
927
  lastSyncError?: string | undefined;
903
928
  } | {
904
- name: string;
905
929
  id: string;
906
930
  source: "user";
931
+ name: string;
907
932
  url: string;
908
933
  branch: string;
909
934
  enabled: boolean;
935
+ useProxy: boolean;
910
936
  writeEnabled: boolean;
911
937
  addedAt: string;
912
938
  lastSyncAt?: string | undefined;
@@ -918,28 +944,30 @@ declare const reposFileSchema: z.ZodEffects<z.ZodObject<{
918
944
  }, {
919
945
  version: 1;
920
946
  repos: ({
921
- name: string;
922
947
  id: string;
923
948
  description: string;
924
949
  source: "default";
950
+ name: string;
925
951
  url: string;
926
952
  branch: string;
927
953
  enabled: boolean;
928
954
  writeEnabled: boolean;
929
955
  addedAt: string;
956
+ useProxy?: boolean | undefined;
930
957
  lastSyncAt?: string | undefined;
931
958
  lastSyncCommitSha?: string | undefined;
932
959
  lastSyncStatus?: "ok" | "error" | undefined;
933
960
  lastSyncError?: string | undefined;
934
961
  } | {
935
- name: string;
936
962
  id: string;
937
963
  source: "user";
964
+ name: string;
938
965
  url: string;
939
966
  branch: string;
940
967
  enabled: boolean;
941
968
  writeEnabled: boolean;
942
969
  addedAt: string;
970
+ useProxy?: boolean | undefined;
943
971
  lastSyncAt?: string | undefined;
944
972
  lastSyncCommitSha?: string | undefined;
945
973
  lastSyncStatus?: "ok" | "error" | undefined;
@@ -1199,7 +1227,7 @@ declare class CannotRemoveDefaultRepoError extends Error {
1199
1227
  }
1200
1228
  /**
1201
1229
  * Bootstrap helper — invokes `ensureDefaultsInstalled` on the store to
1202
- * guarantee that the 4 default repos are present. Returns the resulting
1230
+ * guarantee that all default repos are present. Returns the resulting
1203
1231
  * config. Lives here (not in `default-repos.ts`) to keep the default-repo
1204
1232
  * module free of store concerns.
1205
1233
  */
@@ -1243,6 +1271,8 @@ interface AddUserRepoInput {
1243
1271
  branch?: string;
1244
1272
  /** Optional display name (defaults to id). */
1245
1273
  name?: string;
1274
+ /** Route git traffic via the server proxy (default true). */
1275
+ useProxy?: boolean;
1246
1276
  }
1247
1277
  interface AddUserRepoResult {
1248
1278
  repo: UserRepoConfig;
@@ -1280,7 +1310,7 @@ declare class RepoManager {
1280
1310
  * but do NOT abort the loop — the UI surfaces per-repo state and the
1281
1311
  * user can retry.
1282
1312
  *
1283
- * Per spec §3.1: 4 default repos; the loop honors `enabled=false` and
1313
+ * Per spec §3.1: iterate all default repos; the loop honors `enabled=false` and
1284
1314
  * disables (rather than removes) repos the user has turned off.
1285
1315
  */
1286
1316
  ensureDefaults(): Promise<SyncReport>;
@@ -1341,7 +1371,7 @@ declare function getAllDefaultRepoConfigs(now?: () => string): DefaultRepoConfig
1341
1371
  declare function getDefaultRepoConfig(id: string, now?: () => string): DefaultRepoConfig | undefined;
1342
1372
  /**
1343
1373
  * Idempotent: returns a fresh `ReposFile` containing the default set, or —
1344
- * when `existing` already has all four — returns it untouched (still cloned
1374
+ * when `existing` already has all defaults — returns it untouched (still cloned
1345
1375
  * to keep callers from accidentally mutating shared state).
1346
1376
  */
1347
1377
  declare function buildDefaultReposFile(now?: () => string, existing?: ReposFile): ReposFile;