@absolutejs/artifacts 0.0.4 → 0.1.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/README.md +21 -0
- package/dist/drizzle.js +245 -0
- package/dist/manifest.js +175 -23
- package/dist/manifest.json +123 -7
- package/dist/src/drizzle.d.ts +1586 -0
- package/dist/src/manifest.d.ts +74 -2
- package/package.json +18 -6
package/dist/src/manifest.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const manifest: import("@absolutejs/manifest").PackageManifest<Record<string, never>, {
|
|
1
|
+
export declare const manifest: Omit<import("@absolutejs/manifest").PackageManifest<Record<string, never>, {
|
|
2
2
|
archive: (ownerId: string, artifactId: string) => Promise<import("./types").ArtifactRecord>;
|
|
3
3
|
attach: (ownerId: string, artifactId: string, input: import("./types").ArtifactAssetWriteInput, expectedRevision?: number) => Promise<import("./types").ArtifactRecord>;
|
|
4
4
|
attachBundle: (ownerId: string, artifactId: string, inputs: import("./types").ArtifactAssetWriteInput[], expectedRevision?: number) => Promise<import("./types").ArtifactRecord>;
|
|
@@ -30,4 +30,76 @@ export declare const manifest: import("@absolutejs/manifest").PackageManifest<Re
|
|
|
30
30
|
restore: (ownerId: string, artifactId: string, revision: number, expectedRevision?: number) => Promise<import("./types").ArtifactRecord>;
|
|
31
31
|
unpublish: (ownerId: string, artifactId: string) => Promise<import("./types").ArtifactRecord>;
|
|
32
32
|
update: (ownerId: string, artifactId: string, input: import("./types").ArtifactUpdateInput) => Promise<import("./types").ArtifactRecord>;
|
|
33
|
-
}
|
|
33
|
+
}>, "contract" | "settings" | "tools"> & (({
|
|
34
|
+
contract: 1;
|
|
35
|
+
tools?: Record<string, import("@absolutejs/manifest").LegacyManifestTool<{
|
|
36
|
+
archive: (ownerId: string, artifactId: string) => Promise<import("./types").ArtifactRecord>;
|
|
37
|
+
attach: (ownerId: string, artifactId: string, input: import("./types").ArtifactAssetWriteInput, expectedRevision?: number) => Promise<import("./types").ArtifactRecord>;
|
|
38
|
+
attachBundle: (ownerId: string, artifactId: string, inputs: import("./types").ArtifactAssetWriteInput[], expectedRevision?: number) => Promise<import("./types").ArtifactRecord>;
|
|
39
|
+
collectAssetGarbage: (input: {
|
|
40
|
+
dryRun?: boolean;
|
|
41
|
+
minimumAgeMs?: number;
|
|
42
|
+
}) => Promise<import("./types").ArtifactGarbageCollectionResult>;
|
|
43
|
+
create: (ownerId: string, input: import("./types").ArtifactCreateInput) => Promise<import("./types").ArtifactRecord>;
|
|
44
|
+
createBundle: (ownerId: string, input: import("./types").ArtifactBundleCreateInput) => Promise<import("./types").ArtifactRecord>;
|
|
45
|
+
detach: (ownerId: string, artifactId: string, assetId: string, expectedRevision?: number) => Promise<import("./types").ArtifactRecord>;
|
|
46
|
+
get: (ownerId: string, artifactId: string) => Promise<import("./types").ArtifactRecord>;
|
|
47
|
+
getIndexingState: (ownerId: string, artifactId: string) => Promise<import("./types").ArtifactIndexingState | null>;
|
|
48
|
+
getRevision: (ownerId: string, artifactId: string, revision: number) => Promise<Readonly<import("./types").ArtifactRecord<unknown>>>;
|
|
49
|
+
list: (ownerId: string, query?: import("./types").ArtifactListQuery) => Promise<import("./types").ArtifactRecord[]>;
|
|
50
|
+
listEvents: (query?: import("./types").ArtifactEventQuery) => Promise<import("./types").ArtifactEvent[]>;
|
|
51
|
+
listRevisions: (ownerId: string, artifactId: string) => Promise<Readonly<import("./types").ArtifactRecord<unknown>>[]>;
|
|
52
|
+
markEventProcessed: (eventId: string, processedAt?: string) => Promise<boolean>;
|
|
53
|
+
markIndexing: (ownerId: string, artifactId: string, input: {
|
|
54
|
+
documentIds?: string[];
|
|
55
|
+
error?: string;
|
|
56
|
+
revision: number;
|
|
57
|
+
status: import("./types").ArtifactIndexingStatus;
|
|
58
|
+
}) => Promise<import("./types").ArtifactIndexingState>;
|
|
59
|
+
publish: (ownerId: string, artifactId: string, input?: import("./types").ArtifactPublishInput) => Promise<import("./types").ArtifactRecord>;
|
|
60
|
+
readAsset: (ownerId: string, artifactId: string, assetId: string) => Promise<{
|
|
61
|
+
asset: import("./types").ArtifactAssetReference;
|
|
62
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
63
|
+
}>;
|
|
64
|
+
restore: (ownerId: string, artifactId: string, revision: number, expectedRevision?: number) => Promise<import("./types").ArtifactRecord>;
|
|
65
|
+
unpublish: (ownerId: string, artifactId: string) => Promise<import("./types").ArtifactRecord>;
|
|
66
|
+
update: (ownerId: string, artifactId: string, input: import("./types").ArtifactUpdateInput) => Promise<import("./types").ArtifactRecord>;
|
|
67
|
+
}>> | undefined;
|
|
68
|
+
} | {
|
|
69
|
+
contract: 2;
|
|
70
|
+
tools?: Record<string, import("@absolutejs/manifest").AuthorizedManifestTool<{
|
|
71
|
+
archive: (ownerId: string, artifactId: string) => Promise<import("./types").ArtifactRecord>;
|
|
72
|
+
attach: (ownerId: string, artifactId: string, input: import("./types").ArtifactAssetWriteInput, expectedRevision?: number) => Promise<import("./types").ArtifactRecord>;
|
|
73
|
+
attachBundle: (ownerId: string, artifactId: string, inputs: import("./types").ArtifactAssetWriteInput[], expectedRevision?: number) => Promise<import("./types").ArtifactRecord>;
|
|
74
|
+
collectAssetGarbage: (input: {
|
|
75
|
+
dryRun?: boolean;
|
|
76
|
+
minimumAgeMs?: number;
|
|
77
|
+
}) => Promise<import("./types").ArtifactGarbageCollectionResult>;
|
|
78
|
+
create: (ownerId: string, input: import("./types").ArtifactCreateInput) => Promise<import("./types").ArtifactRecord>;
|
|
79
|
+
createBundle: (ownerId: string, input: import("./types").ArtifactBundleCreateInput) => Promise<import("./types").ArtifactRecord>;
|
|
80
|
+
detach: (ownerId: string, artifactId: string, assetId: string, expectedRevision?: number) => Promise<import("./types").ArtifactRecord>;
|
|
81
|
+
get: (ownerId: string, artifactId: string) => Promise<import("./types").ArtifactRecord>;
|
|
82
|
+
getIndexingState: (ownerId: string, artifactId: string) => Promise<import("./types").ArtifactIndexingState | null>;
|
|
83
|
+
getRevision: (ownerId: string, artifactId: string, revision: number) => Promise<Readonly<import("./types").ArtifactRecord<unknown>>>;
|
|
84
|
+
list: (ownerId: string, query?: import("./types").ArtifactListQuery) => Promise<import("./types").ArtifactRecord[]>;
|
|
85
|
+
listEvents: (query?: import("./types").ArtifactEventQuery) => Promise<import("./types").ArtifactEvent[]>;
|
|
86
|
+
listRevisions: (ownerId: string, artifactId: string) => Promise<Readonly<import("./types").ArtifactRecord<unknown>>[]>;
|
|
87
|
+
markEventProcessed: (eventId: string, processedAt?: string) => Promise<boolean>;
|
|
88
|
+
markIndexing: (ownerId: string, artifactId: string, input: {
|
|
89
|
+
documentIds?: string[];
|
|
90
|
+
error?: string;
|
|
91
|
+
revision: number;
|
|
92
|
+
status: import("./types").ArtifactIndexingStatus;
|
|
93
|
+
}) => Promise<import("./types").ArtifactIndexingState>;
|
|
94
|
+
publish: (ownerId: string, artifactId: string, input?: import("./types").ArtifactPublishInput) => Promise<import("./types").ArtifactRecord>;
|
|
95
|
+
readAsset: (ownerId: string, artifactId: string, assetId: string) => Promise<{
|
|
96
|
+
asset: import("./types").ArtifactAssetReference;
|
|
97
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
98
|
+
}>;
|
|
99
|
+
restore: (ownerId: string, artifactId: string, revision: number, expectedRevision?: number) => Promise<import("./types").ArtifactRecord>;
|
|
100
|
+
unpublish: (ownerId: string, artifactId: string) => Promise<import("./types").ArtifactRecord>;
|
|
101
|
+
update: (ownerId: string, artifactId: string, input: import("./types").ArtifactUpdateInput) => Promise<import("./types").ArtifactRecord>;
|
|
102
|
+
}>> | undefined;
|
|
103
|
+
}) & {
|
|
104
|
+
settings: import("@sinclair/typebox").TObject<{}>;
|
|
105
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@absolutejs/artifacts",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "Typed, versioned artifacts for AI products — schemas, lifecycle, storage, rendering, publishing, revisions, and agent tools without prescribing a database or host.",
|
|
5
5
|
"author": "Alex Kahn",
|
|
6
6
|
"license": "BUSL-1.1",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"url": "https://github.com/absolutejs/artifacts/issues"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
|
-
"build": "rm -rf dist && bun build src/index.ts src/manifest.ts src/rag.ts --outdir dist --root ./src --target=bun --external @absolutejs/rag --external @sinclair/typebox --external @sinclair/typebox/value && tsc --emitDeclarationOnly --project tsconfig.json && absolute-manifest emit",
|
|
24
|
+
"build": "rm -rf dist && bun build src/index.ts src/drizzle.ts src/manifest.ts src/rag.ts --outdir dist --root ./src --target=bun --external @absolutejs/rag --external @sinclair/typebox --external @sinclair/typebox/value --external drizzle-orm --external 'drizzle-orm/*' --external drizzle-typebox && tsc --emitDeclarationOnly --project tsconfig.json && absolute-manifest emit",
|
|
25
25
|
"format": "prettier --write \"./**/*.{ts,json,md}\"",
|
|
26
26
|
"release": "bun run format && bun run test && bun run build && bun publish",
|
|
27
27
|
"test": "bun test",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
33
|
"absolutejs": {
|
|
34
|
-
"manifestContract":
|
|
34
|
+
"manifestContract": 2
|
|
35
35
|
},
|
|
36
36
|
"exports": {
|
|
37
37
|
".": {
|
|
@@ -45,6 +45,11 @@
|
|
|
45
45
|
"default": "./dist/manifest.js"
|
|
46
46
|
},
|
|
47
47
|
"./manifest.json": "./dist/manifest.json",
|
|
48
|
+
"./drizzle": {
|
|
49
|
+
"types": "./dist/src/drizzle.d.ts",
|
|
50
|
+
"import": "./dist/drizzle.js",
|
|
51
|
+
"default": "./dist/drizzle.js"
|
|
52
|
+
},
|
|
48
53
|
"./rag": {
|
|
49
54
|
"types": "./dist/src/rag.d.ts",
|
|
50
55
|
"import": "./dist/rag.js",
|
|
@@ -52,20 +57,27 @@
|
|
|
52
57
|
}
|
|
53
58
|
},
|
|
54
59
|
"dependencies": {
|
|
55
|
-
"@absolutejs/manifest": "^0.
|
|
56
|
-
"@sinclair/typebox": "^0.34.0"
|
|
60
|
+
"@absolutejs/manifest": "^0.4.0",
|
|
61
|
+
"@sinclair/typebox": "^0.34.0",
|
|
62
|
+
"drizzle-typebox": "1.0.0-beta.14-a36c63d"
|
|
57
63
|
},
|
|
58
64
|
"peerDependencies": {
|
|
59
|
-
"@absolutejs/rag": ">=0.0.29"
|
|
65
|
+
"@absolutejs/rag": ">=0.0.29",
|
|
66
|
+
"drizzle-orm": ">=1.0.0-rc.4 <2"
|
|
60
67
|
},
|
|
61
68
|
"peerDependenciesMeta": {
|
|
62
69
|
"@absolutejs/rag": {
|
|
63
70
|
"optional": true
|
|
71
|
+
},
|
|
72
|
+
"drizzle-orm": {
|
|
73
|
+
"optional": true
|
|
64
74
|
}
|
|
65
75
|
},
|
|
66
76
|
"devDependencies": {
|
|
67
77
|
"@absolutejs/rag": "0.0.29",
|
|
78
|
+
"@electric-sql/pglite": "0.3.14",
|
|
68
79
|
"@types/bun": "latest",
|
|
80
|
+
"drizzle-orm": "1.0.0-rc.4",
|
|
69
81
|
"prettier": "3.5.3",
|
|
70
82
|
"typescript": "5.8.3"
|
|
71
83
|
}
|