@skrr-ai/cli 0.1.22 → 0.1.23
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 +83 -73
- package/bin/dev-fallback.js +221 -0
- package/bin/run.js +43 -0
- package/dist/base-command.d.ts +15 -0
- package/dist/base-command.js +71 -10
- package/dist/commands/agents/attach-harness.d.ts +37 -0
- package/dist/commands/agents/attach-harness.js +102 -3
- package/dist/commands/agents/chat.d.ts +69 -1
- package/dist/commands/agents/chat.js +202 -22
- package/dist/commands/agents/create.d.ts +38 -0
- package/dist/commands/agents/create.js +95 -2
- package/dist/commands/agents/schedule-trace.js +11 -0
- package/dist/commands/agents/show.js +29 -1
- package/dist/commands/api-keys/create.d.ts +24 -0
- package/dist/commands/api-keys/create.js +80 -0
- package/dist/commands/api-keys/list.d.ts +11 -0
- package/dist/commands/api-keys/list.js +42 -0
- package/dist/commands/api-keys/revoke.d.ts +14 -0
- package/dist/commands/api-keys/revoke.js +33 -0
- package/dist/commands/api-keys/rotate.d.ts +19 -0
- package/dist/commands/api-keys/rotate.js +42 -0
- package/dist/commands/balance/index.d.ts +18 -0
- package/dist/commands/balance/index.js +29 -0
- package/dist/commands/balance/show.d.ts +25 -0
- package/dist/commands/balance/show.js +60 -0
- package/dist/commands/balance/statement.d.ts +19 -0
- package/dist/commands/balance/statement.js +52 -0
- package/dist/commands/browser/doctor.d.ts +11 -0
- package/dist/commands/browser/doctor.js +11 -0
- package/dist/commands/code/jobs/approve.d.ts +25 -0
- package/dist/commands/code/jobs/approve.js +52 -0
- package/dist/commands/code/jobs/cancel.d.ts +12 -0
- package/dist/commands/code/jobs/cancel.js +39 -0
- package/dist/commands/code/jobs/index.d.ts +19 -0
- package/dist/commands/code/jobs/index.js +38 -0
- package/dist/commands/code/jobs/list.d.ts +12 -0
- package/dist/commands/code/jobs/list.js +87 -0
- package/dist/commands/code/jobs/run.d.ts +32 -0
- package/dist/commands/code/jobs/run.js +151 -0
- package/dist/commands/code/jobs/show.d.ts +12 -0
- package/dist/commands/code/jobs/show.js +86 -0
- package/dist/commands/commitments/preflight.js +18 -4
- package/dist/commands/commitments/receipt-metrics.d.ts +39 -0
- package/dist/commands/commitments/receipt-metrics.js +78 -0
- package/dist/commands/convos/search.js +5 -5
- package/dist/commands/harnesses/leases/list.d.ts +3 -0
- package/dist/commands/harnesses/leases/list.js +59 -12
- package/dist/commands/harnesses/leases/show.js +36 -0
- package/dist/commands/harnesses/list.d.ts +18 -0
- package/dist/commands/harnesses/list.js +30 -0
- package/dist/commands/harnesses/products.js +48 -3
- package/dist/commands/harnesses/quota.d.ts +16 -0
- package/dist/commands/harnesses/quota.js +26 -1
- package/dist/commands/harnesses/usage.js +17 -0
- package/dist/commands/inbox/index.d.ts +2 -1
- package/dist/commands/inbox/index.js +27 -4
- package/dist/commands/login.js +4 -1
- package/dist/commands/machines/list.d.ts +1 -0
- package/dist/commands/machines/list.js +33 -5
- package/dist/commands/memory/approvals/issue.d.ts +18 -0
- package/dist/commands/memory/approvals/issue.js +63 -0
- package/dist/commands/memory/commit.js +5 -2
- package/dist/commands/memory/context.d.ts +3 -2
- package/dist/commands/memory/context.js +9 -11
- package/dist/commands/memory/delete.d.ts +1 -1
- package/dist/commands/memory/list.d.ts +1 -1
- package/dist/commands/memory/list.js +1 -1
- package/dist/commands/memory/mounts/resolve.d.ts +10 -0
- package/dist/commands/memory/mounts/resolve.js +27 -0
- package/dist/commands/memory/proposals/commit.d.ts +18 -0
- package/dist/commands/memory/proposals/commit.js +32 -0
- package/dist/commands/memory/proposals/create.d.ts +18 -0
- package/dist/commands/memory/proposals/create.js +56 -0
- package/dist/commands/memory/proposals/list.d.ts +13 -0
- package/dist/commands/memory/proposals/list.js +31 -0
- package/dist/commands/memory/proposals/promote.d.ts +22 -0
- package/dist/commands/memory/proposals/promote.js +33 -0
- package/dist/commands/memory/proposals/reject.d.ts +16 -0
- package/dist/commands/memory/proposals/reject.js +28 -0
- package/dist/commands/memory/rebuild-index.d.ts +20 -0
- package/dist/commands/memory/rebuild-index.js +25 -0
- package/dist/commands/memory/save.d.ts +1 -1
- package/dist/commands/memory/save.js +1 -1
- package/dist/commands/memory/search.d.ts +6 -3
- package/dist/commands/memory/search.js +27 -3
- package/dist/commands/memory/show.d.ts +1 -1
- package/dist/commands/memory/stores/archive.d.ts +14 -0
- package/dist/commands/memory/stores/archive.js +31 -0
- package/dist/commands/memory/stores/create.d.ts +12 -0
- package/dist/commands/memory/stores/create.js +30 -0
- package/dist/commands/memory/stores/delete.d.ts +15 -0
- package/dist/commands/memory/stores/delete.js +38 -0
- package/dist/commands/memory/stores/list.d.ts +10 -0
- package/dist/commands/memory/stores/list.js +29 -0
- package/dist/commands/memory/stores/show.d.ts +12 -0
- package/dist/commands/memory/stores/show.js +14 -0
- package/dist/commands/memory/stores/update.d.ts +15 -0
- package/dist/commands/memory/stores/update.js +39 -0
- package/dist/commands/memory/sync/delete.d.ts +13 -0
- package/dist/commands/memory/sync/delete.js +35 -0
- package/dist/commands/memory/sync/pull.d.ts +19 -0
- package/dist/commands/memory/sync/pull.js +52 -0
- package/dist/commands/memory/sync/push.d.ts +18 -0
- package/dist/commands/memory/sync/push.js +115 -0
- package/dist/commands/memory/sync/resolve.d.ts +23 -0
- package/dist/commands/memory/sync/resolve.js +27 -0
- package/dist/commands/memory/sync/status.d.ts +9 -0
- package/dist/commands/memory/sync/status.js +22 -0
- package/dist/commands/memory/topics/archive.d.ts +20 -0
- package/dist/commands/memory/topics/archive.js +29 -0
- package/dist/commands/memory/topics/create.d.ts +23 -0
- package/dist/commands/memory/topics/create.js +46 -0
- package/dist/commands/memory/topics/delete.d.ts +22 -0
- package/dist/commands/memory/topics/delete.js +30 -0
- package/dist/commands/memory/topics/forget.d.ts +22 -0
- package/dist/commands/memory/topics/forget.js +29 -0
- package/dist/commands/memory/topics/list.d.ts +13 -0
- package/dist/commands/memory/topics/list.js +22 -0
- package/dist/commands/memory/topics/move.d.ts +22 -0
- package/dist/commands/memory/topics/move.js +26 -0
- package/dist/commands/memory/topics/show.d.ts +17 -0
- package/dist/commands/memory/topics/show.js +21 -0
- package/dist/commands/memory/topics/update.d.ts +23 -0
- package/dist/commands/memory/topics/update.js +27 -0
- package/dist/commands/memory/tree.d.ts +5 -2
- package/dist/commands/memory/tree.js +20 -2
- package/dist/commands/memory/update.d.ts +1 -1
- package/dist/commands/memory/versions/list.d.ts +16 -0
- package/dist/commands/memory/versions/list.js +22 -0
- package/dist/commands/memory/versions/redact.d.ts +21 -0
- package/dist/commands/memory/versions/redact.js +22 -0
- package/dist/commands/memory/versions/restore.d.ts +20 -0
- package/dist/commands/memory/versions/restore.js +16 -0
- package/dist/commands/memory/versions/show.d.ts +15 -0
- package/dist/commands/memory/versions/show.js +17 -0
- package/dist/commands/messages/list.js +25 -8
- package/dist/commands/messages/show.js +10 -0
- package/dist/commands/store/install.js +5 -1
- package/dist/commands/store/releases.js +1 -1
- package/dist/commands/store/update.js +5 -1
- package/dist/commands/subscriptions/cancel.js +5 -1
- package/dist/commands/subscriptions/health.js +5 -1
- package/dist/commands/subscriptions/status.js +5 -1
- package/dist/commands/subscriptions/subscribe.js +5 -1
- package/dist/commands/tasks/activity.d.ts +2 -3
- package/dist/commands/tasks/activity.js +15 -5
- package/dist/commands/tasks/complete.d.ts +18 -150
- package/dist/commands/tasks/complete.js +161 -600
- package/dist/commands/tasks/create.d.ts +5 -0
- package/dist/commands/tasks/create.js +107 -4
- package/dist/commands/tasks/deliverable/add.d.ts +8 -0
- package/dist/commands/tasks/deliverable/add.js +41 -8
- package/dist/commands/tasks/deliverable/confirm.d.ts +5 -5
- package/dist/commands/tasks/deliverable/confirm.js +9 -18
- package/dist/commands/tasks/deliverable/list.d.ts +12 -0
- package/dist/commands/tasks/deliverable/list.js +37 -0
- package/dist/commands/tasks/events/append.d.ts +2 -0
- package/dist/commands/tasks/events/append.js +11 -4
- package/dist/commands/tasks/events/list.d.ts +1 -0
- package/dist/commands/tasks/events/list.js +1 -0
- package/dist/commands/tasks/events/tail.d.ts +1 -0
- package/dist/commands/tasks/events/tail.js +1 -0
- package/dist/commands/tasks/expectations/assess.d.ts +21 -0
- package/dist/commands/tasks/expectations/assess.js +77 -0
- package/dist/commands/tasks/expectations.js +14 -18
- package/dist/commands/tasks/judge.d.ts +1 -0
- package/dist/commands/tasks/judge.js +2 -1
- package/dist/commands/tasks/output.d.ts +2 -11
- package/dist/commands/tasks/output.js +64 -145
- package/dist/commands/tasks/report.d.ts +3 -3
- package/dist/commands/tasks/report.js +64 -41
- package/dist/commands/tasks/resource/add.d.ts +23 -0
- package/dist/commands/tasks/resource/add.js +76 -0
- package/dist/commands/tasks/resource/list.d.ts +13 -0
- package/dist/commands/tasks/resource/list.js +41 -0
- package/dist/commands/tasks/result/show.d.ts +13 -0
- package/dist/commands/tasks/result/show.js +46 -0
- package/dist/commands/tasks/result/submit.d.ts +26 -0
- package/dist/commands/tasks/result/submit.js +134 -0
- package/dist/commands/tasks/resume/save.d.ts +16 -0
- package/dist/commands/tasks/resume/save.js +59 -0
- package/dist/commands/tasks/resume/show.d.ts +13 -0
- package/dist/commands/tasks/resume/show.js +35 -0
- package/dist/commands/tasks/review.d.ts +17 -0
- package/dist/commands/tasks/review.js +54 -0
- package/dist/commands/tasks/runs.js +5 -0
- package/dist/commands/tasks/timeline.d.ts +2 -2
- package/dist/commands/tasks/timeline.js +10 -23
- package/dist/commands/tasks/updates/add.d.ts +22 -0
- package/dist/commands/tasks/updates/add.js +101 -0
- package/dist/commands/tasks/updates/list.d.ts +15 -0
- package/dist/commands/tasks/updates/list.js +57 -0
- package/dist/commands/tasks/waive.d.ts +1 -0
- package/dist/commands/tasks/waive.js +2 -1
- package/dist/lib/agentic-stream.d.ts +257 -0
- package/dist/lib/agentic-stream.js +490 -33
- package/dist/lib/balance.d.ts +8 -0
- package/dist/lib/commitment-product.d.ts +10 -1
- package/dist/lib/commitment-product.js +66 -2
- package/dist/lib/commitments.d.ts +2 -1
- package/dist/lib/commitments.js +1 -0
- package/dist/lib/conversation-search.d.ts +3 -0
- package/dist/lib/conversation-search.js +75 -0
- package/dist/lib/execution-target.d.ts +21 -0
- package/dist/lib/execution-target.js +22 -6
- package/dist/lib/harnesses.d.ts +82 -6
- package/dist/lib/harnesses.js +30 -2
- package/dist/lib/hosted-machines.js +9 -0
- package/dist/lib/inbox.d.ts +2 -1
- package/dist/lib/machines.d.ts +17 -0
- package/dist/lib/machines.js +29 -0
- package/dist/lib/managed-agent-keys.d.ts +104 -0
- package/dist/lib/managed-agent-keys.js +50 -0
- package/dist/lib/memory-scope.d.ts +4 -3
- package/dist/lib/memory-scope.js +9 -9
- package/dist/lib/memory-sync.d.ts +114 -0
- package/dist/lib/memory-sync.js +730 -0
- package/dist/lib/message-provenance.d.ts +42 -0
- package/dist/lib/message-provenance.js +89 -0
- package/dist/lib/scoped-memory-command.d.ts +68 -0
- package/dist/lib/scoped-memory-command.js +183 -0
- package/dist/lib/session-task-endpoints.d.ts +1 -1
- package/dist/lib/session-task-endpoints.js +7 -0
- package/dist/lib/sky-code-broker.d.ts +47 -0
- package/dist/lib/sky-code-broker.js +50 -0
- package/dist/lib/sky-code-doctor.js +10 -1
- package/dist/lib/task-artifact-flags.d.ts +2 -0
- package/dist/lib/task-artifact-flags.js +7 -0
- package/dist/lib/task-execution.d.ts +4 -5
- package/dist/lib/task-execution.js +4 -5
- package/dist/lib/task-extras.d.ts +1 -5
- package/dist/lib/task-extras.js +1 -5
- package/dist/lib/task-transcript.d.ts +5 -7
- package/dist/lib/task-transcript.js +8 -16
- package/dist/lib/tasks.d.ts +7 -21
- package/dist/lib/tasks.js +17 -20
- package/dist/lib/triggers.d.ts +39 -1
- package/dist/lib/triggers.js +70 -2
- package/dist/lib/usage-discovery.d.ts +17 -1
- package/dist/lib/usage-discovery.js +17 -1
- package/dist/node_modules/@skrr-ai/data-provider/index.js +3733 -3618
- package/oclif.manifest.json +16201 -10377
- package/package.json +26 -5
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const scoped_memory_command_1 = require("../../../lib/scoped-memory-command");
|
|
5
|
+
const memory_sync_1 = require("../../../lib/memory-sync");
|
|
6
|
+
class MemorySyncResolve extends scoped_memory_command_1.ScopedMemoryCommand {
|
|
7
|
+
static description = 'Resolve one local sync conflict explicitly';
|
|
8
|
+
static args = { conflict: core_1.Args.string({ required: true, ignoreStdin: true }) };
|
|
9
|
+
static flags = {
|
|
10
|
+
...scoped_memory_command_1.mutationFlags,
|
|
11
|
+
dir: core_1.Flags.string({ required: true }),
|
|
12
|
+
strategy: core_1.Flags.string({ required: true, options: ['keep-local', 'keep-remote', 'manual'] }),
|
|
13
|
+
content: core_1.Flags.string(),
|
|
14
|
+
};
|
|
15
|
+
async run() {
|
|
16
|
+
this.requireAuth();
|
|
17
|
+
const { args, flags } = await this.parse(MemorySyncResolve);
|
|
18
|
+
if (flags.strategy === 'manual' && !flags.content)
|
|
19
|
+
this.error('--content is required with --strategy manual.', { exit: 2 });
|
|
20
|
+
if (flags['dry-run']) {
|
|
21
|
+
return this.print({ dryRun: true, conflictId: args.conflict, strategy: flags.strategy }, flags.json, `Would resolve ${args.conflict} with ${flags.strategy}.`);
|
|
22
|
+
}
|
|
23
|
+
const result = await (0, memory_sync_1.resolveConflict)(flags.dir, args.conflict, flags.strategy, flags.content);
|
|
24
|
+
this.print(result, flags.json, `Resolved sync conflict ${args.conflict} with ${flags.strategy}.`);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.default = MemorySyncResolve;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command';
|
|
2
|
+
export default class MemorySyncStatus extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
dir: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
6
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const base_command_1 = require("../../../base-command");
|
|
5
|
+
const memory_sync_1 = require("../../../lib/memory-sync");
|
|
6
|
+
class MemorySyncStatus extends base_command_1.BaseCommand {
|
|
7
|
+
static description = 'Show local materialized-mount sync status';
|
|
8
|
+
static flags = { dir: core_1.Flags.string({ required: true }), json: core_1.Flags.boolean() };
|
|
9
|
+
async run() {
|
|
10
|
+
const { flags } = await this.parse(MemorySyncStatus);
|
|
11
|
+
const result = await (0, memory_sync_1.syncStatus)(flags.dir);
|
|
12
|
+
if (flags.json)
|
|
13
|
+
this.log(JSON.stringify(result, null, 2));
|
|
14
|
+
else {
|
|
15
|
+
this.log(`Sync ${result.status || 'unknown'} at cursor ${result.cursor || '0'}; ${result.changed || 0} local change(s), ${result.conflicts || 0} conflict(s).`);
|
|
16
|
+
const nextActions = Array.isArray(result.nextActions) ? result.nextActions : [];
|
|
17
|
+
for (const action of nextActions)
|
|
18
|
+
this.log(`Next: ${action}`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = MemorySyncStatus;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ScopedMemoryCommand } from '../../../lib/scoped-memory-command';
|
|
2
|
+
export default class MemoryTopicsArchive extends ScopedMemoryCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
'expected-version': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
'authorization-generation': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
'idempotency-key': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
'privacy-approval': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
'dry-run': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
agent: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
+
space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
|
+
store: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
|
+
scope: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
18
|
+
};
|
|
19
|
+
run(): Promise<void>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const scoped_memory_command_1 = require("../../../lib/scoped-memory-command");
|
|
5
|
+
class MemoryTopicsArchive extends scoped_memory_command_1.ScopedMemoryCommand {
|
|
6
|
+
static description = 'Archive a Memory topic without suppression';
|
|
7
|
+
static args = { id: core_1.Args.string({ required: true, ignoreStdin: true }) };
|
|
8
|
+
static flags = scoped_memory_command_1.versionedMutationFlags;
|
|
9
|
+
async run() {
|
|
10
|
+
this.requireAuth();
|
|
11
|
+
const { args, flags } = await this.parse(MemoryTopicsArchive);
|
|
12
|
+
const result = (await this.mutation('archive', flags, { memoryId: args.id }));
|
|
13
|
+
const selector = flags.store ? `--store ${flags.store}` : `--scope ${flags.scope}`;
|
|
14
|
+
const context = [
|
|
15
|
+
`--agent ${flags.agent}`,
|
|
16
|
+
selector,
|
|
17
|
+
...(flags.space ? [`--space ${flags.space}`] : []),
|
|
18
|
+
].join(' ');
|
|
19
|
+
const archivedHead = result?.node?.headVersionId || result?.version?.version?.id || 'CURRENT_ARCHIVED_HEAD';
|
|
20
|
+
this.print(result, flags.json, flags['dry-run']
|
|
21
|
+
? 'Dry run: no topic archived.'
|
|
22
|
+
: [
|
|
23
|
+
`Archived Memory topic ${args.id}.`,
|
|
24
|
+
`List restorable history: skrr memory versions list ${args.id} ${context}`,
|
|
25
|
+
`Restore a chosen historical version: skrr memory versions restore VERSION_ID ${context} --expected-version ${archivedHead}`,
|
|
26
|
+
].join('\n'));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.default = MemoryTopicsArchive;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ScopedMemoryCommand } from '../../../lib/scoped-memory-command';
|
|
2
|
+
export default class MemoryTopicsCreate extends ScopedMemoryCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
path: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
6
|
+
content: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
title: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
|
+
kind: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
confidence: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
source: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
'authorization-generation': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
'expected-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
'idempotency-key': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
+
'privacy-approval': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
|
+
'dry-run': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
agent: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
+
store: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
19
|
+
scope: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
20
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
21
|
+
};
|
|
22
|
+
run(): Promise<void>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const scoped_memory_command_1 = require("../../../lib/scoped-memory-command");
|
|
5
|
+
const MEMORY_KINDS = [
|
|
6
|
+
'profile',
|
|
7
|
+
'preference',
|
|
8
|
+
'entity',
|
|
9
|
+
'event',
|
|
10
|
+
'belief',
|
|
11
|
+
'experience',
|
|
12
|
+
'procedure',
|
|
13
|
+
'relationship',
|
|
14
|
+
'observation',
|
|
15
|
+
'custom',
|
|
16
|
+
];
|
|
17
|
+
class MemoryTopicsCreate extends scoped_memory_command_1.ScopedMemoryCommand {
|
|
18
|
+
static description = 'Create a versioned semantic Memory topic';
|
|
19
|
+
static flags = {
|
|
20
|
+
...scoped_memory_command_1.mutationFlags,
|
|
21
|
+
path: core_1.Flags.string({ required: true }),
|
|
22
|
+
content: core_1.Flags.string({ required: true }),
|
|
23
|
+
title: core_1.Flags.string(),
|
|
24
|
+
kind: core_1.Flags.string({
|
|
25
|
+
description: 'Canonical Memory kind',
|
|
26
|
+
options: [...MEMORY_KINDS],
|
|
27
|
+
}),
|
|
28
|
+
confidence: core_1.Flags.string(),
|
|
29
|
+
source: core_1.Flags.string(),
|
|
30
|
+
};
|
|
31
|
+
async run() {
|
|
32
|
+
this.requireAuth();
|
|
33
|
+
const { flags } = await this.parse(MemoryTopicsCreate);
|
|
34
|
+
const result = await this.mutation('encode', flags, {
|
|
35
|
+
path: flags.path,
|
|
36
|
+
content: flags.content,
|
|
37
|
+
title: flags.title,
|
|
38
|
+
memoryKind: flags.kind,
|
|
39
|
+
confidence: flags.confidence === undefined ? undefined : Number(flags.confidence),
|
|
40
|
+
source: flags.source,
|
|
41
|
+
episode: null,
|
|
42
|
+
});
|
|
43
|
+
this.print(result, flags.json, flags['dry-run'] ? 'Dry run: no topic created.' : 'Memory topic created.');
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.default = MemoryTopicsCreate;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ScopedMemoryCommand } from '../../../lib/scoped-memory-command';
|
|
2
|
+
export default class MemoryTopicsDelete extends ScopedMemoryCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
reason: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
yes: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
'expected-version': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
'authorization-generation': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
'idempotency-key': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
'privacy-approval': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
+
'dry-run': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
agent: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
|
+
space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
store: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
+
scope: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
19
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
20
|
+
};
|
|
21
|
+
run(): Promise<void>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const prompt_1 = require("../../../lib/prompt");
|
|
5
|
+
const scoped_memory_command_1 = require("../../../lib/scoped-memory-command");
|
|
6
|
+
class MemoryTopicsDelete extends scoped_memory_command_1.ScopedMemoryCommand {
|
|
7
|
+
static description = 'Permanently delete topic content while retaining redacted audit metadata';
|
|
8
|
+
static args = { id: core_1.Args.string({ required: true, ignoreStdin: true }) };
|
|
9
|
+
static flags = {
|
|
10
|
+
...scoped_memory_command_1.versionedMutationFlags,
|
|
11
|
+
reason: core_1.Flags.string(),
|
|
12
|
+
yes: core_1.Flags.boolean({ char: 'y' }),
|
|
13
|
+
};
|
|
14
|
+
async run() {
|
|
15
|
+
this.requireAuth();
|
|
16
|
+
const { args, flags } = await this.parse(MemoryTopicsDelete);
|
|
17
|
+
if (!flags['dry-run']) {
|
|
18
|
+
const ok = await (0, prompt_1.confirmDestructive)(`Permanently redact and delete Memory topic ${args.id}?`, flags.yes).catch((error) => this.error(error.message, { exit: error.exit || 7 }));
|
|
19
|
+
if (!ok)
|
|
20
|
+
return this.log('Cancelled.');
|
|
21
|
+
}
|
|
22
|
+
const result = await this.mutation('delete', flags, {
|
|
23
|
+
memoryId: args.id,
|
|
24
|
+
confirmMemoryId: args.id,
|
|
25
|
+
reason: flags.reason,
|
|
26
|
+
});
|
|
27
|
+
this.print(result, flags.json, flags['dry-run'] ? 'Dry run: no topic deleted.' : `Deleted Memory topic ${args.id}.`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.default = MemoryTopicsDelete;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ScopedMemoryCommand } from '../../../lib/scoped-memory-command';
|
|
2
|
+
export default class MemoryTopicsForget extends ScopedMemoryCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
reason: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
yes: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
'expected-version': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
'authorization-generation': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
'idempotency-key': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
'privacy-approval': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
+
'dry-run': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
agent: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
|
+
space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
store: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
+
scope: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
19
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
20
|
+
};
|
|
21
|
+
run(): Promise<void>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const prompt_1 = require("../../../lib/prompt");
|
|
5
|
+
const scoped_memory_command_1 = require("../../../lib/scoped-memory-command");
|
|
6
|
+
class MemoryTopicsForget extends scoped_memory_command_1.ScopedMemoryCommand {
|
|
7
|
+
static description = 'Forget a topic and suppress implicit resurrection';
|
|
8
|
+
static args = { id: core_1.Args.string({ required: true, ignoreStdin: true }) };
|
|
9
|
+
static flags = {
|
|
10
|
+
...scoped_memory_command_1.versionedMutationFlags,
|
|
11
|
+
reason: core_1.Flags.string(),
|
|
12
|
+
yes: core_1.Flags.boolean({ char: 'y' }),
|
|
13
|
+
};
|
|
14
|
+
async run() {
|
|
15
|
+
this.requireAuth();
|
|
16
|
+
const { args, flags } = await this.parse(MemoryTopicsForget);
|
|
17
|
+
if (!flags['dry-run']) {
|
|
18
|
+
const ok = await (0, prompt_1.confirmDestructive)(`Forget Memory topic ${args.id} and suppress its content?`, flags.yes).catch((error) => this.error(error.message, { exit: error.exit || 7 }));
|
|
19
|
+
if (!ok)
|
|
20
|
+
return this.log('Cancelled.');
|
|
21
|
+
}
|
|
22
|
+
const result = await this.mutation('forget', flags, {
|
|
23
|
+
memoryId: args.id,
|
|
24
|
+
reason: flags.reason,
|
|
25
|
+
});
|
|
26
|
+
this.print(result, flags.json, flags['dry-run'] ? 'Dry run: no topic forgotten.' : `Forgot Memory topic ${args.id}.`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.default = MemoryTopicsForget;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ScopedMemoryCommand } from '../../../lib/scoped-memory-command';
|
|
2
|
+
export default class MemoryTopicsList extends ScopedMemoryCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
archived: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
6
|
+
agent: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
|
+
store: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
scope: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const scoped_memory_command_1 = require("../../../lib/scoped-memory-command");
|
|
5
|
+
class MemoryTopicsList extends scoped_memory_command_1.ScopedMemoryCommand {
|
|
6
|
+
static description = 'List semantic Memory topics in one mounted Store';
|
|
7
|
+
static flags = { ...scoped_memory_command_1.scopedMemoryFlags, archived: core_1.Flags.boolean() };
|
|
8
|
+
async run() {
|
|
9
|
+
this.requireAuth();
|
|
10
|
+
const { flags } = await this.parse(MemoryTopicsList);
|
|
11
|
+
const store = await this.resolveStore(flags);
|
|
12
|
+
const result = await this.memoryApi(flags.agent, `/stores/${store.id}/tree${this.query(flags, { includeArchived: flags.archived })}`);
|
|
13
|
+
const topics = result.nodes.filter((node) => node.nodeKind === 'memory');
|
|
14
|
+
if (flags.json)
|
|
15
|
+
return this.log(JSON.stringify({ storeId: store.id, topics }, null, 2));
|
|
16
|
+
for (const topic of topics)
|
|
17
|
+
this.log(`${topic.id} ${topic.path} ${topic.title} r${topic.revision}`);
|
|
18
|
+
if (!topics.length)
|
|
19
|
+
this.log('No Memory topics.');
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = MemoryTopicsList;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ScopedMemoryCommand } from '../../../lib/scoped-memory-command';
|
|
2
|
+
export default class MemoryTopicsMove extends ScopedMemoryCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
path: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
title: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
'expected-version': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
'authorization-generation': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
'idempotency-key': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
'privacy-approval': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
+
'dry-run': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
agent: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
|
+
space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
store: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
+
scope: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
19
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
20
|
+
};
|
|
21
|
+
run(): Promise<void>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const scoped_memory_command_1 = require("../../../lib/scoped-memory-command");
|
|
5
|
+
class MemoryTopicsMove extends scoped_memory_command_1.ScopedMemoryCommand {
|
|
6
|
+
static description = 'Move a Memory topic or subtree to a new semantic path';
|
|
7
|
+
static args = { id: core_1.Args.string({ required: true, ignoreStdin: true }) };
|
|
8
|
+
static flags = {
|
|
9
|
+
...scoped_memory_command_1.versionedMutationFlags,
|
|
10
|
+
path: core_1.Flags.string({ required: true }),
|
|
11
|
+
title: core_1.Flags.string(),
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
this.requireAuth();
|
|
15
|
+
const { args, flags } = await this.parse(MemoryTopicsMove);
|
|
16
|
+
const result = await this.mutation('move', flags, {
|
|
17
|
+
memoryId: args.id,
|
|
18
|
+
path: flags.path,
|
|
19
|
+
title: flags.title,
|
|
20
|
+
});
|
|
21
|
+
this.print(result, flags.json, flags['dry-run']
|
|
22
|
+
? 'Dry run: no topic moved.'
|
|
23
|
+
: `Moved Memory topic ${args.id} to ${flags.path}.`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.default = MemoryTopicsMove;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ScopedMemoryCommand } from '../../../lib/scoped-memory-command';
|
|
2
|
+
export default class MemoryTopicsShow extends ScopedMemoryCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
level: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
facts: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
agent: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
store: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
scope: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
};
|
|
16
|
+
run(): Promise<void>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const scoped_memory_command_1 = require("../../../lib/scoped-memory-command");
|
|
5
|
+
class MemoryTopicsShow extends scoped_memory_command_1.ScopedMemoryCommand {
|
|
6
|
+
static description = 'Show one semantic Memory topic';
|
|
7
|
+
static args = { id: core_1.Args.string({ required: true, ignoreStdin: true }) };
|
|
8
|
+
static flags = {
|
|
9
|
+
...scoped_memory_command_1.scopedMemoryFlags,
|
|
10
|
+
level: core_1.Flags.string({ options: ['L0', 'L1', 'L2'], default: 'L1' }),
|
|
11
|
+
facts: core_1.Flags.boolean(),
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
this.requireAuth();
|
|
15
|
+
const { args, flags } = await this.parse(MemoryTopicsShow);
|
|
16
|
+
const store = await this.resolveStore(flags);
|
|
17
|
+
const result = await this.memoryApi(flags.agent, `/stores/${store.id}/topics/${encodeURIComponent(args.id)}${this.query(flags, { level: flags.level, includeFacts: flags.facts })}`);
|
|
18
|
+
this.print(result, flags.json, `${result.node.path}\n${result.representation?.content || '(no projection)'}`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.default = MemoryTopicsShow;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ScopedMemoryCommand } from '../../../lib/scoped-memory-command';
|
|
2
|
+
export default class MemoryTopicsUpdate extends ScopedMemoryCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
content: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
confidence: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
source: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
'expected-version': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
'authorization-generation': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
'idempotency-key': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
+
'privacy-approval': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
|
+
'dry-run': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
agent: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
+
store: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
19
|
+
scope: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
20
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
21
|
+
};
|
|
22
|
+
run(): Promise<void>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const scoped_memory_command_1 = require("../../../lib/scoped-memory-command");
|
|
5
|
+
class MemoryTopicsUpdate extends scoped_memory_command_1.ScopedMemoryCommand {
|
|
6
|
+
static description = 'Reconsolidate a Memory topic using optimistic version CAS';
|
|
7
|
+
static args = { id: core_1.Args.string({ required: true, ignoreStdin: true }) };
|
|
8
|
+
static flags = {
|
|
9
|
+
...scoped_memory_command_1.versionedMutationFlags,
|
|
10
|
+
content: core_1.Flags.string({ required: true }),
|
|
11
|
+
confidence: core_1.Flags.string(),
|
|
12
|
+
source: core_1.Flags.string(),
|
|
13
|
+
};
|
|
14
|
+
async run() {
|
|
15
|
+
this.requireAuth();
|
|
16
|
+
const { args, flags } = await this.parse(MemoryTopicsUpdate);
|
|
17
|
+
const result = await this.mutation('reconsolidate', flags, {
|
|
18
|
+
memoryId: args.id,
|
|
19
|
+
content: flags.content,
|
|
20
|
+
confidence: flags.confidence === undefined ? undefined : Number(flags.confidence),
|
|
21
|
+
source: flags.source,
|
|
22
|
+
episode: null,
|
|
23
|
+
});
|
|
24
|
+
this.print(result, flags.json, flags['dry-run'] ? 'Dry run: no topic updated.' : `Updated Memory topic ${args.id}.`);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.default = MemoryTopicsUpdate;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default class MemoryTree extends
|
|
1
|
+
import { ScopedMemoryCommand } from '../../lib/scoped-memory-command';
|
|
2
|
+
export default class MemoryTree extends ScopedMemoryCommand {
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {
|
|
5
5
|
agent: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
6
6
|
archived: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
7
7
|
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
store: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
scope: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
11
|
};
|
|
9
12
|
run(): Promise<void>;
|
|
10
13
|
}
|
|
@@ -2,17 +2,33 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const core_1 = require("@oclif/core");
|
|
4
4
|
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
5
|
-
const
|
|
6
|
-
class MemoryTree extends
|
|
5
|
+
const scoped_memory_command_1 = require("../../lib/scoped-memory-command");
|
|
6
|
+
class MemoryTree extends scoped_memory_command_1.ScopedMemoryCommand {
|
|
7
7
|
static description = 'Browse an agent-maintained semantic memory tree and its L0 summaries';
|
|
8
8
|
static flags = {
|
|
9
9
|
agent: core_1.Flags.string({ description: 'Agent ID', required: true }),
|
|
10
10
|
archived: core_1.Flags.boolean({ description: 'Include archived nodes', default: false }),
|
|
11
11
|
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
12
|
+
store: core_1.Flags.string({ description: 'Canonical Memory Store ID' }),
|
|
13
|
+
scope: core_1.Flags.string({ description: 'Canonical owner scope: agent:<id> or space:<id>' }),
|
|
14
|
+
space: core_1.Flags.string({ description: 'Current Space context' }),
|
|
12
15
|
};
|
|
13
16
|
async run() {
|
|
14
17
|
this.requireAuth();
|
|
15
18
|
const { flags } = await this.parse(MemoryTree);
|
|
19
|
+
if (flags.store || flags.scope) {
|
|
20
|
+
const store = await this.resolveStore(flags);
|
|
21
|
+
const result = await this.memoryApi(flags.agent, `/stores/${store.id}/tree${this.query(flags, { includeArchived: flags.archived })}`);
|
|
22
|
+
if (flags.json)
|
|
23
|
+
return this.log(JSON.stringify({ storeId: store.id, ...result }, null, 2));
|
|
24
|
+
for (const node of result.nodes) {
|
|
25
|
+
const depth = node.path === '/' ? 0 : node.path.split('/').filter(Boolean).length;
|
|
26
|
+
this.log(`${' '.repeat(depth)}${node.nodeKind === 'folder' ? '▸' : '•'} ${node.title} ${node.path}`);
|
|
27
|
+
}
|
|
28
|
+
if (!result.nodes.length)
|
|
29
|
+
this.log('No Memory nodes.');
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
16
32
|
let response;
|
|
17
33
|
try {
|
|
18
34
|
response = await data_provider_1.dataService.getAgentMemoryWorkspaceTree(flags.agent, {
|
|
@@ -34,6 +50,8 @@ class MemoryTree extends base_command_1.BaseCommand {
|
|
|
34
50
|
if (abstract)
|
|
35
51
|
this.log(`${' '.repeat(depth + 1)}${abstract}`);
|
|
36
52
|
}
|
|
53
|
+
if (!response.nodes.length)
|
|
54
|
+
this.log('No Memory nodes.');
|
|
37
55
|
this.printAgentUrl(flags.agent);
|
|
38
56
|
}
|
|
39
57
|
}
|
|
@@ -8,7 +8,7 @@ export default class MemoryUpdate extends BaseCommand {
|
|
|
8
8
|
static flags: {
|
|
9
9
|
agent: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
10
|
tier: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
-
workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
'pool-workspace': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
12
|
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
13
|
value: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
14
|
rename: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ScopedMemoryCommand } from '../../../lib/scoped-memory-command';
|
|
2
|
+
export default class MemoryVersionsList extends ScopedMemoryCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
memory: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
limit: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
agent: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
store: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
scope: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
};
|
|
15
|
+
run(): Promise<void>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const scoped_memory_command_1 = require("../../../lib/scoped-memory-command");
|
|
5
|
+
class MemoryVersionsList extends scoped_memory_command_1.ScopedMemoryCommand {
|
|
6
|
+
static description = 'List immutable versions for one Memory topic';
|
|
7
|
+
static args = { memory: core_1.Args.string({ required: true, ignoreStdin: true }) };
|
|
8
|
+
static flags = { ...scoped_memory_command_1.scopedMemoryFlags, limit: core_1.Flags.integer({ default: 100 }) };
|
|
9
|
+
async run() {
|
|
10
|
+
this.requireAuth();
|
|
11
|
+
const { args, flags } = await this.parse(MemoryVersionsList);
|
|
12
|
+
const store = await this.resolveStore(flags);
|
|
13
|
+
const result = await this.memoryApi(flags.agent, `/stores/${store.id}/versions${this.query(flags, { memoryId: args.memory, limit: flags.limit })}`);
|
|
14
|
+
if (flags.json)
|
|
15
|
+
return this.log(JSON.stringify(result, null, 2));
|
|
16
|
+
for (const version of result.versions)
|
|
17
|
+
this.log(`${version.id} ${version.operation} ${version.createdAt} ${version.contentHash || '[redacted]'}`);
|
|
18
|
+
if (!result.versions.length)
|
|
19
|
+
this.log('No Memory versions.');
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = MemoryVersionsList;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ScopedMemoryCommand } from '../../../lib/scoped-memory-command';
|
|
2
|
+
export default class MemoryVersionsRedact extends ScopedMemoryCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
yes: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
'authorization-generation': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
'expected-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
'idempotency-key': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
'privacy-approval': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
'dry-run': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
agent: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
|
+
space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
|
+
store: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
scope: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
19
|
+
};
|
|
20
|
+
run(): Promise<void>;
|
|
21
|
+
}
|