@basou/core 0.6.0 → 0.7.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.ts +15 -4
- package/dist/index.js +12 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/schemas/manifest.schema.json +14 -0
- package/schemas/session-import.schema.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -89,6 +89,9 @@ declare const ManifestSchema: z.ZodObject<{
|
|
|
89
89
|
commit: "commit";
|
|
90
90
|
}>>;
|
|
91
91
|
}, z.core.$strip>;
|
|
92
|
+
import: z.ZodOptional<z.ZodObject<{
|
|
93
|
+
source_roots: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
94
|
+
}, z.core.$strip>>;
|
|
92
95
|
}, z.core.$strip>;
|
|
93
96
|
/** Inferred runtime type for {@link ManifestSchema}. */
|
|
94
97
|
type Manifest = z.infer<typeof ManifestSchema>;
|
|
@@ -101,10 +104,10 @@ declare const SessionInnerImportSchema: z.ZodObject<{
|
|
|
101
104
|
source: z.ZodObject<{
|
|
102
105
|
kind: z.ZodEnum<{
|
|
103
106
|
"claude-code-adapter": "claude-code-adapter";
|
|
107
|
+
import: "import";
|
|
104
108
|
"claude-code-import": "claude-code-import";
|
|
105
109
|
"codex-import": "codex-import";
|
|
106
110
|
human: "human";
|
|
107
|
-
import: "import";
|
|
108
111
|
terminal: "terminal";
|
|
109
112
|
}>;
|
|
110
113
|
version: z.ZodLiteral<"0.1.0">;
|
|
@@ -161,10 +164,10 @@ declare const SessionImportPayloadSchema: z.ZodObject<{
|
|
|
161
164
|
source: z.ZodObject<{
|
|
162
165
|
kind: z.ZodEnum<{
|
|
163
166
|
"claude-code-adapter": "claude-code-adapter";
|
|
167
|
+
import: "import";
|
|
164
168
|
"claude-code-import": "claude-code-import";
|
|
165
169
|
"codex-import": "codex-import";
|
|
166
170
|
human: "human";
|
|
167
|
-
import: "import";
|
|
168
171
|
terminal: "terminal";
|
|
169
172
|
}>;
|
|
170
173
|
version: z.ZodLiteral<"0.1.0">;
|
|
@@ -1271,10 +1274,10 @@ type SessionStatus = z.infer<typeof SessionStatusSchema>;
|
|
|
1271
1274
|
*/
|
|
1272
1275
|
declare const SessionSourceKindSchema: z.ZodEnum<{
|
|
1273
1276
|
"claude-code-adapter": "claude-code-adapter";
|
|
1277
|
+
import: "import";
|
|
1274
1278
|
"claude-code-import": "claude-code-import";
|
|
1275
1279
|
"codex-import": "codex-import";
|
|
1276
1280
|
human: "human";
|
|
1277
|
-
import: "import";
|
|
1278
1281
|
terminal: "terminal";
|
|
1279
1282
|
}>;
|
|
1280
1283
|
/** Inferred runtime type for {@link SessionSourceKindSchema}. */
|
|
@@ -1339,10 +1342,10 @@ declare const SessionSchema: z.ZodObject<{
|
|
|
1339
1342
|
source: z.ZodObject<{
|
|
1340
1343
|
kind: z.ZodEnum<{
|
|
1341
1344
|
"claude-code-adapter": "claude-code-adapter";
|
|
1345
|
+
import: "import";
|
|
1342
1346
|
"claude-code-import": "claude-code-import";
|
|
1343
1347
|
"codex-import": "codex-import";
|
|
1344
1348
|
human: "human";
|
|
1345
|
-
import: "import";
|
|
1346
1349
|
terminal: "terminal";
|
|
1347
1350
|
}>;
|
|
1348
1351
|
version: z.ZodLiteral<"0.1.0">;
|
|
@@ -3146,6 +3149,14 @@ type CreateManifestInput = {
|
|
|
3146
3149
|
now?: Date;
|
|
3147
3150
|
/** Override for tests; defaults to a freshly generated `ws_<ULID>`. */
|
|
3148
3151
|
workspaceId?: PrefixedId<"ws">;
|
|
3152
|
+
/**
|
|
3153
|
+
* Import source roots, each RELATIVE to the repository root (e.g. `"."`,
|
|
3154
|
+
* `"../basou-workspace"`). Persisted under `import.source_roots` so
|
|
3155
|
+
* `basou refresh` / `basou import` aggregate several sibling repos into one
|
|
3156
|
+
* `.basou/`. Validated by `ManifestSchema` (absolute paths are rejected).
|
|
3157
|
+
* Omitted from the manifest entirely when absent or empty.
|
|
3158
|
+
*/
|
|
3159
|
+
sourceRoots?: string[];
|
|
3149
3160
|
};
|
|
3150
3161
|
/**
|
|
3151
3162
|
* Build a fresh Manifest object that satisfies the manifest schema's
|
package/dist/index.js
CHANGED
|
@@ -3885,6 +3885,13 @@ var AdaptersSchema = z9.object({
|
|
|
3885
3885
|
var GitConfigSchema = z9.object({
|
|
3886
3886
|
events_log: z9.enum(["ignore", "commit"]).default("ignore")
|
|
3887
3887
|
});
|
|
3888
|
+
var SOURCE_ROOT_PATTERN = /^(?![~/\\])(?![A-Za-z]:)[^\0\\]+$/;
|
|
3889
|
+
var SourceRootSchema = z9.string().min(1).regex(SOURCE_ROOT_PATTERN, {
|
|
3890
|
+
message: "source_roots entries must be relative paths (no absolute path, '~', '\\', or null byte)"
|
|
3891
|
+
});
|
|
3892
|
+
var ImportConfigSchema = z9.object({
|
|
3893
|
+
source_roots: z9.array(SourceRootSchema).min(1).optional()
|
|
3894
|
+
});
|
|
3888
3895
|
var WorkspaceMetaSchema = z9.object({
|
|
3889
3896
|
id: WorkspaceIdSchema,
|
|
3890
3897
|
name: z9.string().min(1),
|
|
@@ -3899,7 +3906,8 @@ var ManifestSchema = z9.object({
|
|
|
3899
3906
|
capabilities: CapabilitiesSchema,
|
|
3900
3907
|
approval: ApprovalConfigSchema,
|
|
3901
3908
|
adapters: AdaptersSchema,
|
|
3902
|
-
git: GitConfigSchema
|
|
3909
|
+
git: GitConfigSchema,
|
|
3910
|
+
import: ImportConfigSchema.optional()
|
|
3903
3911
|
});
|
|
3904
3912
|
|
|
3905
3913
|
// src/schemas/session-import.schema.ts
|
|
@@ -3987,7 +3995,7 @@ var DOCUMENTS = [
|
|
|
3987
3995
|
name: "session-import",
|
|
3988
3996
|
schema: SessionImportPayloadSchema,
|
|
3989
3997
|
title: "Basou Session Import Payload",
|
|
3990
|
-
description: "The portable session payload consumed by `basou session import
|
|
3998
|
+
description: "The portable session payload consumed by `basou session import`."
|
|
3991
3999
|
}
|
|
3992
4000
|
];
|
|
3993
4001
|
function buildJsonSchemas() {
|
|
@@ -4454,7 +4462,8 @@ function createManifest(input) {
|
|
|
4454
4462
|
adapters: {
|
|
4455
4463
|
"claude-code": { enabled: true }
|
|
4456
4464
|
},
|
|
4457
|
-
git: { events_log: "ignore" }
|
|
4465
|
+
git: { events_log: "ignore" },
|
|
4466
|
+
...input.sourceRoots !== void 0 && input.sourceRoots.length > 0 ? { import: { source_roots: input.sourceRoots } } : {}
|
|
4458
4467
|
};
|
|
4459
4468
|
return ManifestSchema.parse(manifest);
|
|
4460
4469
|
}
|