@khanglvm/outline-cli 0.2.5 → 0.2.6
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 +7 -0
- package/README.md +4 -0
- package/package.json +1 -1
- package/src/entry-integrity-manifest.generated.js +3 -3
- package/src/tools.js +24 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.6
|
|
4
|
+
|
|
5
|
+
- Accept underscore separators in tool names, so `documents_search` resolves to
|
|
6
|
+
`documents.search` and `oauth_clients_list` to `oauth_clients.list`.
|
|
7
|
+
- Make `documents.info` summary output say that `"view":"full"` returns the
|
|
8
|
+
document text.
|
|
9
|
+
|
|
3
10
|
## 0.2.5 - 2026-10-18
|
|
4
11
|
|
|
5
12
|
- Changes since `v0.2.4`.
|
package/README.md
CHANGED
|
@@ -50,6 +50,10 @@ outline-cli invoke documents.info \
|
|
|
50
50
|
--args '{"id":"<document-id-or-url>","view":"full"}'
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
+
Without `"view":"full"`, `documents.info` returns metadata and a short excerpt;
|
|
54
|
+
the result includes a hint on how to get the full text. Tool names also accept
|
|
55
|
+
underscores for dots, such as `documents_search`.
|
|
56
|
+
|
|
53
57
|
For a pasted `/doc/` URL, `url` is also accepted. Batch reads accept mixed UUIDs,
|
|
54
58
|
slugs, and document URLs in `ids`. URLs use the selected workspace profile.
|
|
55
59
|
|
package/package.json
CHANGED
|
@@ -3,8 +3,8 @@ export const ENTRY_INTEGRITY_MANIFEST = Object.freeze({
|
|
|
3
3
|
version: 1,
|
|
4
4
|
algorithm: "sha256",
|
|
5
5
|
signatureAlgorithm: "sha256-salted-manifest-v1",
|
|
6
|
-
signature: "
|
|
7
|
-
generatedAt: "2026-
|
|
6
|
+
signature: "2678d128f1ba23fed7976de2d585a4acf0543678a4d218d7ab4386f4d353dec4",
|
|
7
|
+
generatedAt: "2026-11-04T03:17:43.534Z",
|
|
8
8
|
files: [
|
|
9
9
|
{
|
|
10
10
|
"path": "src/action-gate.js",
|
|
@@ -60,7 +60,7 @@ export const ENTRY_INTEGRITY_MANIFEST = Object.freeze({
|
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
"path": "src/tools.js",
|
|
63
|
-
"sha256": "
|
|
63
|
+
"sha256": "ffa0f5fd7e916abb92bba62ecc11f4c50f428505b431a660362c5fef4cd2003b"
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
"path": "src/tools.mutation.js",
|
package/src/tools.js
CHANGED
|
@@ -647,6 +647,8 @@ async function documentsListTool(ctx, args) {
|
|
|
647
647
|
};
|
|
648
648
|
}
|
|
649
649
|
|
|
650
|
+
const DOCUMENT_TEXT_HINT = 'view=summary returns metadata and a short excerpt only. Pass "view":"full" to get the full document text.';
|
|
651
|
+
|
|
650
652
|
async function documentsInfoTool(ctx, args) {
|
|
651
653
|
if (args.url && args.id && normalizeDocumentReference(args.url) !== normalizeDocumentReference(args.id)) {
|
|
652
654
|
throw new CliError("documents.info id and url must identify the same document");
|
|
@@ -698,6 +700,7 @@ async function documentsInfoTool(ctx, args) {
|
|
|
698
700
|
const result = compactValue({
|
|
699
701
|
...payload,
|
|
700
702
|
deleteReadReceipt,
|
|
703
|
+
hint: view !== "full" && rawDoc?.text ? DOCUMENT_TEXT_HINT : undefined,
|
|
701
704
|
});
|
|
702
705
|
|
|
703
706
|
return {
|
|
@@ -758,6 +761,7 @@ async function documentsInfoTool(ctx, args) {
|
|
|
758
761
|
ok: results.filter((r) => r.ok).length,
|
|
759
762
|
failed: results.filter((r) => !r.ok).length,
|
|
760
763
|
items: results,
|
|
764
|
+
...(view !== "full" && results.some((r) => r.ok) ? { hint: DOCUMENT_TEXT_HINT } : {}),
|
|
761
765
|
},
|
|
762
766
|
};
|
|
763
767
|
}
|
|
@@ -1295,6 +1299,25 @@ function toolNameVariants(name) {
|
|
|
1295
1299
|
].filter(Boolean))];
|
|
1296
1300
|
}
|
|
1297
1301
|
|
|
1302
|
+
// Extra lookup forms for a request that wrote a namespace separator as "_"
|
|
1303
|
+
// (documents_search, oauth_clients_list). Tool names mix "." between namespace
|
|
1304
|
+
// and action with "_" inside words, so try turning each single "_" into "."
|
|
1305
|
+
// and also all of them at once.
|
|
1306
|
+
function underscoreSeparatorVariants(name) {
|
|
1307
|
+
const base = canonicalizeToolName(name, { hyphenMode: "underscore" });
|
|
1308
|
+
const variants = new Set();
|
|
1309
|
+
if (!base.includes("_")) {
|
|
1310
|
+
return [];
|
|
1311
|
+
}
|
|
1312
|
+
variants.add(base.replace(/_/g, "."));
|
|
1313
|
+
for (let i = 0; i < base.length; i += 1) {
|
|
1314
|
+
if (base[i] === "_") {
|
|
1315
|
+
variants.add(`${base.slice(0, i)}.${base.slice(i + 1)}`);
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
return [...variants];
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1298
1321
|
function buildCanonicalToolMap() {
|
|
1299
1322
|
const byCanonical = new Map();
|
|
1300
1323
|
for (const toolName of Object.keys(TOOLS)) {
|
|
@@ -1428,7 +1451,7 @@ export function resolveToolInvocation(name, args = {}) {
|
|
|
1428
1451
|
}
|
|
1429
1452
|
|
|
1430
1453
|
const candidates = new Set();
|
|
1431
|
-
for (const variant of toolNameVariants(requestedName)) {
|
|
1454
|
+
for (const variant of [...toolNameVariants(requestedName), ...underscoreSeparatorVariants(requestedName)]) {
|
|
1432
1455
|
const matches = CANONICAL_TOOL_MAP.get(variant) || [];
|
|
1433
1456
|
for (const match of matches) {
|
|
1434
1457
|
candidates.add(match);
|