@withone/cli 1.52.0 → 1.52.1
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 +1 -1
- package/dist/{chunk-C7DWZ7B5.js → chunk-2VDKHGVN.js} +1 -1
- package/dist/{chunk-Z4KAQGIG.js → chunk-HSKAP73B.js} +2 -2
- package/dist/{chunk-CLJFSFFM.js → chunk-I3ODIT2N.js} +2 -2
- package/dist/{chunk-ZOJW6IMU.js → chunk-P5KRUMV3.js} +2 -2
- package/dist/{chunk-UV4YYDF3.js → chunk-PQQAMG2S.js} +2 -2
- package/dist/{chunk-SO323PZP.js → chunk-RASDPNMJ.js} +2 -1
- package/dist/{chunk-K56Z5BTM.js → chunk-RKQXOFTX.js} +2 -2
- package/dist/{embedding-2YB6CGBA.js → embedding-AVBSB7SG.js} +2 -2
- package/dist/{flow-runner-WZIYXW47.js → flow-runner-ZZEJ6CZI.js} +2 -2
- package/dist/index.js +17 -17
- package/dist/{migrate-LXDIZMXH.js → migrate-SOHPYWUU.js} +5 -5
- package/dist/{runtime-HDZCBTWH.js → runtime-LBDMRCH2.js} +3 -3
- package/dist/{schema-SYMG6SRC.js → schema-GKS6MF25.js} +4 -4
- package/dist/sql-YVDVJK7L.js +12 -0
- package/package.json +1 -1
- package/skills/one/references/scoping.md +1 -1
- package/dist/sql-AZDCMY7G.js +0 -12
package/README.md
CHANGED
|
@@ -140,7 +140,7 @@ Supports Claude Code, Claude Desktop, Cursor, Windsurf, Codex, and Kiro.
|
|
|
140
140
|
|
|
141
141
|
When you run `one` in a project, it uses the project config if one exists and falls back to the global config otherwise. Use `one config path` to see which config is active and the full resolution order.
|
|
142
142
|
|
|
143
|
-
In a monorepo, the project root is the nearest ancestor with `.one/`, `.git`, or `package.json` — checked in that order. Run `mkdir .one` in a nested subproject to make it its own project root (so the config is keyed by the nested dir's slug instead of the monorepo's).
|
|
143
|
+
In a monorepo, the project root is the nearest ancestor with `.one/`, `.git`, or `package.json` — checked in that order. Run `mkdir .one` in a nested subproject to make it its own project root (so the config is keyed by the nested dir's slug instead of the monorepo's). Your home directory itself is never treated as a project root — `~/.one` is the CLI's own config directory, and a dotfiles `.git` or stray `package.json` in `$HOME` shouldn't turn everything under home into one project. Scope that applies to all of home is the global config.
|
|
144
144
|
|
|
145
145
|
If you've already set up, `one init` shows your current status for the active scope and lets you update your key, install to more agents, or reconfigure.
|
|
146
146
|
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
getMemoryConfig,
|
|
6
6
|
getMemoryConfigOrDefault,
|
|
7
7
|
updateMemoryConfig
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-2VDKHGVN.js";
|
|
9
9
|
import {
|
|
10
10
|
getOpenAiApiKey
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RASDPNMJ.js";
|
|
12
12
|
|
|
13
13
|
// src/lib/memory/schema.ts
|
|
14
14
|
var SCHEMA_VERSION = "2.3.1";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getMemoryConfigOrDefault
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2VDKHGVN.js";
|
|
4
4
|
import {
|
|
5
5
|
getOpenAiApiKey,
|
|
6
6
|
readConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RASDPNMJ.js";
|
|
8
8
|
|
|
9
9
|
// src/lib/output.ts
|
|
10
10
|
import * as p from "@clack/prompts";
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
note,
|
|
7
7
|
okJson,
|
|
8
8
|
requireMemoryInit
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-I3ODIT2N.js";
|
|
10
10
|
import {
|
|
11
11
|
getBackend,
|
|
12
12
|
upsertRecord
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-HSKAP73B.js";
|
|
14
14
|
|
|
15
15
|
// src/commands/mem/migrate.ts
|
|
16
16
|
import fs4 from "fs";
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
isAgentMode,
|
|
4
4
|
json,
|
|
5
5
|
requireMemoryInit
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-I3ODIT2N.js";
|
|
7
7
|
import {
|
|
8
8
|
getBackend
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HSKAP73B.js";
|
|
10
10
|
|
|
11
11
|
// src/commands/mem/sql.ts
|
|
12
12
|
async function memSqlCommand(sql) {
|
|
@@ -15,8 +15,9 @@ function projectsDir() {
|
|
|
15
15
|
function getProjectRoot(cwd = process.cwd()) {
|
|
16
16
|
let dir = path.resolve(cwd);
|
|
17
17
|
const root = path.parse(dir).root;
|
|
18
|
+
const home = os.homedir();
|
|
18
19
|
while (dir !== root) {
|
|
19
|
-
if (fs.existsSync(path.join(dir, ".one")) || fs.existsSync(path.join(dir, ".git")) || fs.existsSync(path.join(dir, "package.json"))) {
|
|
20
|
+
if (dir !== home && (fs.existsSync(path.join(dir, ".one")) || fs.existsSync(path.join(dir, ".git")) || fs.existsSync(path.join(dir, "package.json")))) {
|
|
20
21
|
return dir;
|
|
21
22
|
}
|
|
22
23
|
dir = path.dirname(dir);
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-44CV5IMX.js";
|
|
5
5
|
import {
|
|
6
6
|
getCacheTtl
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RASDPNMJ.js";
|
|
8
8
|
|
|
9
9
|
// src/lib/flow-runner.ts
|
|
10
10
|
import fs3 from "fs";
|
|
@@ -2354,7 +2354,7 @@ async function executeSubflowStep(step, context, api, permissions, allowedAction
|
|
|
2354
2354
|
if (flowStack.includes(resolvedKey)) {
|
|
2355
2355
|
throw new Error(`Circular flow detected: ${[...flowStack, resolvedKey].join(" \u2192 ")}`);
|
|
2356
2356
|
}
|
|
2357
|
-
const { loadFlowWithMeta: loadFlowWithMeta2 } = await import("./flow-runner-
|
|
2357
|
+
const { loadFlowWithMeta: loadFlowWithMeta2 } = await import("./flow-runner-ZZEJ6CZI.js");
|
|
2358
2358
|
const { flow: subFlow, rootDir: subRootDir } = loadFlowWithMeta2(resolvedKey);
|
|
2359
2359
|
const subContext = await executeFlow(
|
|
2360
2360
|
subFlow,
|
|
@@ -12,9 +12,9 @@ import {
|
|
|
12
12
|
stripStepsAlias,
|
|
13
13
|
summarizeFlowInputs,
|
|
14
14
|
walkSteps
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-RKQXOFTX.js";
|
|
16
16
|
import "./chunk-44CV5IMX.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-RASDPNMJ.js";
|
|
18
18
|
export {
|
|
19
19
|
FlowRunner,
|
|
20
20
|
collectStepTypes,
|
package/dist/index.js
CHANGED
|
@@ -32,10 +32,10 @@ import {
|
|
|
32
32
|
validateActionInput,
|
|
33
33
|
walkSteps,
|
|
34
34
|
writeCache
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-RKQXOFTX.js";
|
|
36
36
|
import {
|
|
37
37
|
memSqlCommand
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-PQQAMG2S.js";
|
|
39
39
|
import {
|
|
40
40
|
collectIdentityKeys,
|
|
41
41
|
countRecords,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
writeDraftProfile,
|
|
66
66
|
writePageToMemory,
|
|
67
67
|
writeProfile
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-P5KRUMV3.js";
|
|
69
69
|
import {
|
|
70
70
|
getByDotPath
|
|
71
71
|
} from "./chunk-44CV5IMX.js";
|
|
@@ -89,7 +89,7 @@ import {
|
|
|
89
89
|
semanticSearchUpgradeLine,
|
|
90
90
|
setAgentMode,
|
|
91
91
|
silenceWarningsInAgentMode
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-I3ODIT2N.js";
|
|
93
93
|
import {
|
|
94
94
|
SCHEMA_VERSION,
|
|
95
95
|
addRecord,
|
|
@@ -99,7 +99,7 @@ import {
|
|
|
99
99
|
listBackendPlugins,
|
|
100
100
|
loadBackendFromConfig,
|
|
101
101
|
updateRecord
|
|
102
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-HSKAP73B.js";
|
|
103
103
|
import {
|
|
104
104
|
DEFAULT_MEMORY_CONFIG,
|
|
105
105
|
defaultSearchableText,
|
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
memoryConfigExists,
|
|
110
110
|
setOpenAiApiKey,
|
|
111
111
|
updateMemoryConfig
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-2VDKHGVN.js";
|
|
113
113
|
import {
|
|
114
114
|
appendAnalyticsQueue,
|
|
115
115
|
appendUsageLog,
|
|
@@ -144,7 +144,7 @@ import {
|
|
|
144
144
|
writeConfig,
|
|
145
145
|
writeUsageLog,
|
|
146
146
|
writeUsageState
|
|
147
|
-
} from "./chunk-
|
|
147
|
+
} from "./chunk-RASDPNMJ.js";
|
|
148
148
|
|
|
149
149
|
// src/cli.ts
|
|
150
150
|
import { createRequire as createRequire3 } from "module";
|
|
@@ -6053,7 +6053,7 @@ async function syncModel(api, profile, options) {
|
|
|
6053
6053
|
updateModelState(platform, model, { status: "failed", pagesProcessed, lastCursor }),
|
|
6054
6054
|
(async () => {
|
|
6055
6055
|
try {
|
|
6056
|
-
const { getBackend: getBackend2 } = await import("./runtime-
|
|
6056
|
+
const { getBackend: getBackend2 } = await import("./runtime-LBDMRCH2.js");
|
|
6057
6057
|
const backend = await getBackend2();
|
|
6058
6058
|
await Promise.race([
|
|
6059
6059
|
backend.close(),
|
|
@@ -6419,7 +6419,7 @@ async function syncModel(api, profile, options) {
|
|
|
6419
6419
|
db.exec(`DROP TABLE IF EXISTS _seen_ids`);
|
|
6420
6420
|
}
|
|
6421
6421
|
if (options.toMemory !== false) {
|
|
6422
|
-
const backend = await (await import("./runtime-
|
|
6422
|
+
const backend = await (await import("./runtime-LBDMRCH2.js")).getBackend();
|
|
6423
6423
|
const type = `${platform}/${model}`;
|
|
6424
6424
|
const existing = await backend.listKeysByType(type);
|
|
6425
6425
|
const sourcePrefix = `${type}:`;
|
|
@@ -6505,7 +6505,7 @@ async function syncModel(api, profile, options) {
|
|
|
6505
6505
|
let statusCounts;
|
|
6506
6506
|
if (options.toMemory !== false) {
|
|
6507
6507
|
try {
|
|
6508
|
-
const backend = await (await import("./runtime-
|
|
6508
|
+
const backend = await (await import("./runtime-LBDMRCH2.js")).getBackend();
|
|
6509
6509
|
const typeName = `${platform}/${model}`;
|
|
6510
6510
|
const [active, archived] = await Promise.all([
|
|
6511
6511
|
backend.count(typeName, { status: "active" }),
|
|
@@ -8194,7 +8194,7 @@ ${result.total} results`);
|
|
|
8194
8194
|
}
|
|
8195
8195
|
}
|
|
8196
8196
|
async function syncSqlCommand(platformModel, sql) {
|
|
8197
|
-
const { syncSqlCommand: runSyncSql } = await import("./sql-
|
|
8197
|
+
const { syncSqlCommand: runSyncSql } = await import("./sql-YVDVJK7L.js");
|
|
8198
8198
|
await runSyncSql(platformModel, sql);
|
|
8199
8199
|
}
|
|
8200
8200
|
async function syncDeleteCommand(platformModel, options) {
|
|
@@ -8272,7 +8272,7 @@ async function syncDeleteCommand(platformModel, options) {
|
|
|
8272
8272
|
async function maybeAutoMigrateLegacy(platform, models) {
|
|
8273
8273
|
const dbSize = getDatabaseSize(platform);
|
|
8274
8274
|
if (!dbSize || dbSize === "0 B") return;
|
|
8275
|
-
const { getBackend: getBackend2 } = await import("./runtime-
|
|
8275
|
+
const { getBackend: getBackend2 } = await import("./runtime-LBDMRCH2.js");
|
|
8276
8276
|
const backend = await getBackend2();
|
|
8277
8277
|
let memoryHasData = false;
|
|
8278
8278
|
for (const model of models) {
|
|
@@ -8288,7 +8288,7 @@ async function maybeAutoMigrateLegacy(platform, models) {
|
|
|
8288
8288
|
` detected legacy .one/sync/data/${platform}.db (${dbSize}) \u2014 auto-migrating into memory before sync.
|
|
8289
8289
|
`
|
|
8290
8290
|
);
|
|
8291
|
-
const { memMigrateCommand: memMigrateCommand3 } = await import("./migrate-
|
|
8291
|
+
const { memMigrateCommand: memMigrateCommand3 } = await import("./migrate-SOHPYWUU.js");
|
|
8292
8292
|
await memMigrateCommand3({ platform, yes: true });
|
|
8293
8293
|
return;
|
|
8294
8294
|
}
|
|
@@ -8297,7 +8297,7 @@ async function maybeAutoMigrateLegacy(platform, models) {
|
|
|
8297
8297
|
initialValue: true
|
|
8298
8298
|
});
|
|
8299
8299
|
if (p7.isCancel(shouldMigrate) || !shouldMigrate) return;
|
|
8300
|
-
const { memMigrateCommand: memMigrateCommand2 } = await import("./migrate-
|
|
8300
|
+
const { memMigrateCommand: memMigrateCommand2 } = await import("./migrate-SOHPYWUU.js");
|
|
8301
8301
|
await memMigrateCommand2({ platform, yes: true });
|
|
8302
8302
|
}
|
|
8303
8303
|
async function syncSuggestSearchableCommand(platformModel, options = {}) {
|
|
@@ -8358,7 +8358,7 @@ async function syncSuggestSearchableCommand(platformModel, options = {}) {
|
|
|
8358
8358
|
async function syncListCommand(platform) {
|
|
8359
8359
|
const profiles = listProfiles(platform);
|
|
8360
8360
|
const state = await readSyncState();
|
|
8361
|
-
const { getBackend: getBackend2 } = await import("./runtime-
|
|
8361
|
+
const { getBackend: getBackend2 } = await import("./runtime-LBDMRCH2.js");
|
|
8362
8362
|
const backend = await getBackend2();
|
|
8363
8363
|
const syncs = await Promise.all(profiles.map(async (p10) => {
|
|
8364
8364
|
const modelState = state[p10.platform]?.[p10.model];
|
|
@@ -8633,7 +8633,7 @@ function registerSyncSubcommands(sync) {
|
|
|
8633
8633
|
await syncSqlCommand(platformModel, sql);
|
|
8634
8634
|
});
|
|
8635
8635
|
sync.command("schema <platform/model>").description("Inspect the JSON structure of synced records (field paths, types, examples) \u2014 useful before writing `sync sql` queries").action(async (platformModel) => {
|
|
8636
|
-
const { syncSchemaCommand } = await import("./schema-
|
|
8636
|
+
const { syncSchemaCommand } = await import("./schema-GKS6MF25.js");
|
|
8637
8637
|
await syncSchemaCommand(platformModel);
|
|
8638
8638
|
});
|
|
8639
8639
|
sync.command("delete <platform/model>").description('Delete records from local sync data (e.g. one sync delete notion/pages --id "abc-123")').option("--id <value>", "Delete record by ID").option("--where <conditions>", 'Delete records matching conditions (e.g. "status=archived")').option("--where-sql <predicate>", `Delete using a raw SQL WHERE clause (e.g. "json_extract(data, '$.type') = 'promotion'")`).option("--yes", "Skip confirmation prompt").action(async (platformModel, options) => {
|
|
@@ -9410,7 +9410,7 @@ async function memDoctorCommand() {
|
|
|
9410
9410
|
}
|
|
9411
9411
|
if (cfg.embedding.provider === "openai") {
|
|
9412
9412
|
try {
|
|
9413
|
-
const { embed: embed2 } = await import("./embedding-
|
|
9413
|
+
const { embed: embed2 } = await import("./embedding-AVBSB7SG.js");
|
|
9414
9414
|
const result = await embed2("connectivity check");
|
|
9415
9415
|
checks.push({
|
|
9416
9416
|
name: "OpenAI embedding provider reachable",
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
dotPathToJsonbExpr,
|
|
4
4
|
memMigrateCommand,
|
|
5
5
|
reviveStringifiedJson
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-P5KRUMV3.js";
|
|
7
7
|
import "./chunk-44CV5IMX.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-I3ODIT2N.js";
|
|
9
|
+
import "./chunk-HSKAP73B.js";
|
|
10
|
+
import "./chunk-2VDKHGVN.js";
|
|
11
|
+
import "./chunk-RASDPNMJ.js";
|
|
12
12
|
export {
|
|
13
13
|
buildIdentityMap,
|
|
14
14
|
dotPathToJsonbExpr,
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
resetBackendSingleton,
|
|
6
6
|
updateRecord,
|
|
7
7
|
upsertRecord
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-HSKAP73B.js";
|
|
9
|
+
import "./chunk-2VDKHGVN.js";
|
|
10
|
+
import "./chunk-RASDPNMJ.js";
|
|
11
11
|
export {
|
|
12
12
|
addRecord,
|
|
13
13
|
closeBackendIfCached,
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
note,
|
|
4
4
|
okJson,
|
|
5
5
|
requireMemoryInit
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-I3ODIT2N.js";
|
|
7
7
|
import {
|
|
8
8
|
getBackend
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-HSKAP73B.js";
|
|
10
|
+
import "./chunk-2VDKHGVN.js";
|
|
11
|
+
import "./chunk-RASDPNMJ.js";
|
|
12
12
|
|
|
13
13
|
// src/lib/memory/sync/schema.ts
|
|
14
14
|
import pc from "picocolors";
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ The One CLI can be configured at two scopes:
|
|
|
5
5
|
- **Global** — `~/.one/config.json`. Applies everywhere the user runs `one`.
|
|
6
6
|
- **Project** — `~/.one/projects/<slug>/config.json`, where `<slug>` is the project root path with path separators (and any character Windows forbids in a path component) replaced by dashes (e.g. `/Users/jane/acme` → `-Users-jane-acme`; on Windows, `C:\Users\jane\acme` → `C--Users-jane-acme`). Only applies when running `one` from inside that project folder.
|
|
7
7
|
|
|
8
|
-
**Detecting the project root.** The CLI walks up from cwd looking for `.one`, `.git`, or `package.json` and treats the nearest hit as the project root — `.one` is checked first so a monorepo subproject can opt into being its own root with `mkdir .one`. Without a `.one` opt-in, every cwd under a parent `.git`/`package.json` shares one project config keyed by that parent.
|
|
8
|
+
**Detecting the project root.** The CLI walks up from cwd looking for `.one`, `.git`, or `package.json` and treats the nearest hit as the project root — `.one` is checked first so a monorepo subproject can opt into being its own root with `mkdir .one`. Without a `.one` opt-in, every cwd under a parent `.git`/`package.json` shares one project config keyed by that parent. Exception: `$HOME` itself is never a project root — `~/.one` is the CLI's own config directory (not an opt-in marker), and a dotfiles `.git` or stray `package.json` in home must not shadow the global config for every directory under it. If a marker-less dir should be its own project, `mkdir .one` inside it before picking project scope.
|
|
9
9
|
|
|
10
10
|
**Resolution order:** env vars → `.onerc` in cwd → project config → global config. The project lookup walks from cwd up — the nearest ancestor that has a config under `~/.one/projects/<slug>/config.json` wins, so cwd's own slug is checked before any parent's.
|
|
11
11
|
|
package/dist/sql-AZDCMY7G.js
DELETED