agentic-drive 0.4.0 → 0.5.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/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/{chunk-L7GASKBQ.js → chunk-B7E2Q3RB.js} +1 -1
- package/dist/{chunk-ATJDMCRV.js → chunk-T6C5Y2WA.js} +3 -2
- package/dist/{chunk-DRACF66Y.js → chunk-WQHJNHAR.js} +1 -1
- package/dist/cli.js +2 -2
- package/dist/client.d.ts +4 -1
- package/dist/client.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -3
- package/dist/mcp.js +2 -2
- package/dist/worker.js +2 -2
- package/package.json +1 -1
- package/ui-dist/assets/{index-e_cefh0u.js → index-BiU4TGuq.js} +7 -7
- package/ui-dist/index.html +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
Read the breaking changes before you upgrade or deploy.
|
|
6
|
+
|
|
7
|
+
### Breaking changes
|
|
8
|
+
|
|
9
|
+
- **Deploy the Worker and the client together.** Each item in the HTTP, CLI, and MCP output has a `machineMade` field next to `createdBy.kind`. The client now rejects an item with no `machineMade`. A client of 0.5.0 that talks to a Worker of 0.4.0 fails every call that returns items, such as list, stat, and search. Also, `Item` and `PathItem` in the client types now require `machineMade: boolean`. A project that builds those objects itself, such as test fixtures or mocks of the client, must add the field.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **Machine-made label from creation on.** The web UI shows "Created by agent" on every item that an agent made, not only after a person edits it.
|
|
14
|
+
|
|
3
15
|
## 0.4.0
|
|
4
16
|
|
|
5
17
|
Read the breaking changes before you upgrade or deploy.
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
Store, sort, and share files and folders.
|
|
9
9
|
|
|
10
|
-
> Status: 0.
|
|
10
|
+
> Status: 0.5.0, early. The library, CLI, MCP server, and HTTP API work, with sharing in the SDK and the HTTP API.
|
|
11
11
|
> A small web UI works. See [UI](#ui).
|
|
12
12
|
|
|
13
13
|
## Live demo
|
|
@@ -1294,7 +1294,7 @@ async function authenticate(request, store, now) {
|
|
|
1294
1294
|
// src/local.ts
|
|
1295
1295
|
import { createHash as createHash2 } from "crypto";
|
|
1296
1296
|
import { join as join2 } from "path";
|
|
1297
|
-
import { isScope, issueCredential, revokeCredential } from "agentic-identity";
|
|
1297
|
+
import { isMachineMade, isScope, issueCredential, revokeCredential } from "agentic-identity";
|
|
1298
1298
|
function openLocal(dir) {
|
|
1299
1299
|
const store = createFileStore(join2(dir, "db"));
|
|
1300
1300
|
return { store, drive: createDrive({ store, blobs: createFileBlobs(join2(dir, "blobs")) }) };
|
|
@@ -1339,7 +1339,8 @@ async function revokeKey(store, token) {
|
|
|
1339
1339
|
}
|
|
1340
1340
|
function publicNode(node, path) {
|
|
1341
1341
|
const { nameKey: _nameKey, blobKey: _blobKey, purging: _purging, ...rest } = node;
|
|
1342
|
-
|
|
1342
|
+
const shown = { ...rest, machineMade: isMachineMade(node.createdBy.kind) };
|
|
1343
|
+
return path === void 0 ? shown : { path, ...shown };
|
|
1343
1344
|
}
|
|
1344
1345
|
|
|
1345
1346
|
// src/upload.ts
|
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
VERSION
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WQHJNHAR.js";
|
|
5
5
|
import {
|
|
6
6
|
AuthError,
|
|
7
7
|
DriveError,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
revokeKey,
|
|
16
16
|
revokePrincipal,
|
|
17
17
|
upload
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-T6C5Y2WA.js";
|
|
19
19
|
|
|
20
20
|
// src/cli.ts
|
|
21
21
|
import { createReadStream, realpathSync, writeFileSync } from "fs";
|
package/dist/client.d.ts
CHANGED
|
@@ -9,7 +9,10 @@ type Subject = {
|
|
|
9
9
|
id: string;
|
|
10
10
|
};
|
|
11
11
|
/** An item as the API prints it: no storage keys. */
|
|
12
|
-
|
|
12
|
+
/** `machineMade` is true when the creator is not a human principal. */
|
|
13
|
+
type Item = Omit<Node, "nameKey" | "blobKey" | "purging"> & {
|
|
14
|
+
machineMade: boolean;
|
|
15
|
+
};
|
|
13
16
|
/** A search hit, or a home item: an item with its path. */
|
|
14
17
|
type PathItem = Item & {
|
|
15
18
|
path: string;
|
package/dist/client.js
CHANGED
|
@@ -47,7 +47,7 @@ var ACTOR_KINDS = { human: true, agent_of_human: true, agent_of_agent: true, age
|
|
|
47
47
|
var ROLES = ["viewer", "commenter", "editor", "owner"];
|
|
48
48
|
var oneOf = (list) => (v) => typeof v === "string" && list.includes(v);
|
|
49
49
|
var actor = (v) => record(v) && text(v.id) && oneOf(Object.keys(ACTOR_KINDS))(v.kind);
|
|
50
|
-
var isItem = (v) => record(v) && text(v.id) && text(v.owner) && text(v.parentId) && text(v.name) && (v.kind === "folder" || v.kind === "file" || v.kind === "ref") && num(v.size) && orNull(text)(v.mime) && orNull(text)(v.hash) && orNull(text)(v.ref) && num(v.createdAt) && num(v.updatedAt) && actor(v.createdBy) && actor(v.updatedBy) && text(v.createdById) && text(v.updatedById) && typeof v.trashed === "boolean" && orNull(num)(v.trashedAt);
|
|
50
|
+
var isItem = (v) => record(v) && text(v.id) && text(v.owner) && text(v.parentId) && text(v.name) && (v.kind === "folder" || v.kind === "file" || v.kind === "ref") && num(v.size) && orNull(text)(v.mime) && orNull(text)(v.hash) && orNull(text)(v.ref) && num(v.createdAt) && num(v.updatedAt) && actor(v.createdBy) && actor(v.updatedBy) && text(v.createdById) && text(v.updatedById) && typeof v.trashed === "boolean" && orNull(num)(v.trashedAt) && typeof v.machineMade === "boolean";
|
|
51
51
|
var isPathItem = (v) => isItem(v) && typeof v.path === "string";
|
|
52
52
|
var listOf = (check) => (v) => Array.isArray(v) && v.every(check);
|
|
53
53
|
var shape = (test) => (v) => record(v) && test(v);
|
package/dist/index.d.ts
CHANGED
|
@@ -75,8 +75,9 @@ declare function revokePrincipal(store: Store, id: string): Promise<void>;
|
|
|
75
75
|
/** Issue an API key for a principal. The token is shown once. */
|
|
76
76
|
declare function issueKey(store: Store, principalId: string, label?: string): Promise<string>;
|
|
77
77
|
declare function revokeKey(store: Store, token: string): Promise<void>;
|
|
78
|
-
/** A node as the CLI and MCP print it: no storage keys. */
|
|
78
|
+
/** A node as the CLI and MCP print it: no storage keys. `machineMade` is true when the creator is not a human principal. */
|
|
79
79
|
declare function publicNode(node: Node, path?: string): {
|
|
80
|
+
machineMade: boolean;
|
|
80
81
|
id: string;
|
|
81
82
|
owner: string;
|
|
82
83
|
parentId: string;
|
|
@@ -95,6 +96,7 @@ declare function publicNode(node: Node, path?: string): {
|
|
|
95
96
|
trashed: boolean;
|
|
96
97
|
trashedAt: number | null;
|
|
97
98
|
} | {
|
|
99
|
+
machineMade: boolean;
|
|
98
100
|
id: string;
|
|
99
101
|
owner: string;
|
|
100
102
|
parentId: string;
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
VERSION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WQHJNHAR.js";
|
|
4
4
|
import {
|
|
5
5
|
backfillAuthorIds,
|
|
6
6
|
backfillResources
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-B7E2Q3RB.js";
|
|
8
8
|
import {
|
|
9
9
|
ACTOR_KINDS,
|
|
10
10
|
AuthError,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
subjectKindOf,
|
|
30
30
|
upload,
|
|
31
31
|
writeZip
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-T6C5Y2WA.js";
|
|
33
33
|
export {
|
|
34
34
|
ACTOR_KINDS,
|
|
35
35
|
AuthError,
|
package/dist/mcp.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
VERSION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WQHJNHAR.js";
|
|
4
4
|
import {
|
|
5
5
|
ACTOR_KINDS,
|
|
6
6
|
DriveError,
|
|
7
7
|
buildExport,
|
|
8
8
|
publicNode,
|
|
9
9
|
upload
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-T6C5Y2WA.js";
|
|
11
11
|
|
|
12
12
|
// src/mcp.ts
|
|
13
13
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
package/dist/worker.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
backfillAuthorIds,
|
|
3
3
|
backfillResources
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-B7E2Q3RB.js";
|
|
5
5
|
import {
|
|
6
6
|
DEFAULT_MAX_BYTES,
|
|
7
7
|
DEFAULT_URL_SECONDS,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
publicNode,
|
|
13
13
|
safeMime,
|
|
14
14
|
upload
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-T6C5Y2WA.js";
|
|
16
16
|
|
|
17
17
|
// src/worker.ts
|
|
18
18
|
import { Hono } from "hono";
|