@creativeintelligence/abbie 0.1.0 → 0.1.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.
Files changed (56) hide show
  1. package/dist/cli/commands/context/inject.js +1 -1
  2. package/dist/cli/commands/context/list.js +1 -1
  3. package/dist/cli/commands/context/publish.js +1 -1
  4. package/dist/cli/commands/context/read.js +1 -1
  5. package/dist/cli/commands/daemon.js +1 -1
  6. package/dist/cli/commands/history/index.d.ts +13 -2
  7. package/dist/cli/commands/history/index.d.ts.map +1 -1
  8. package/dist/cli/commands/history/index.js +2 -2
  9. package/dist/cli/commands/login.js +2 -2
  10. package/dist/cli/commands/logout.js +1 -1
  11. package/dist/cli/commands/preview/index.js +2 -2
  12. package/dist/cli/commands/preview/list.js +2 -2
  13. package/dist/cli/commands/preview/status.js +2 -2
  14. package/dist/cli/commands/preview/stop.js +2 -2
  15. package/dist/cli/commands/push.js +2 -2
  16. package/dist/cli/commands/session/list.js +1 -1
  17. package/dist/cli/commands/session/mark-done.js +1 -1
  18. package/dist/cli/commands/session/replay.js +1 -1
  19. package/dist/cli/commands/session/start.js +1 -1
  20. package/dist/cli/commands/session/stop.js +1 -1
  21. package/dist/cli/commands/status.js +2 -2
  22. package/dist/cli/commands/sync.js +2 -2
  23. package/dist/cli/commands/windows/list.js +1 -1
  24. package/dist/lib/active-sessions.js +6 -6
  25. package/dist/lib/annotations-convex.js +1 -1
  26. package/dist/lib/events.js +1 -1
  27. package/dist/lib/report.js +1 -1
  28. package/dist/lib/runner.js +4 -4
  29. package/package.json +3 -3
  30. package/src/cli/commands/__tests__/daemon.test.ts +1 -1
  31. package/src/cli/commands/context/inject.ts +1 -1
  32. package/src/cli/commands/context/list.ts +1 -1
  33. package/src/cli/commands/context/publish.ts +1 -1
  34. package/src/cli/commands/context/read.ts +1 -1
  35. package/src/cli/commands/daemon.ts +1 -1
  36. package/src/cli/commands/history/index.ts +15 -3
  37. package/src/cli/commands/login.ts +2 -2
  38. package/src/cli/commands/logout.ts +1 -1
  39. package/src/cli/commands/preview/index.ts +2 -2
  40. package/src/cli/commands/preview/list.ts +2 -2
  41. package/src/cli/commands/preview/status.ts +2 -2
  42. package/src/cli/commands/preview/stop.ts +2 -2
  43. package/src/cli/commands/push.ts +2 -2
  44. package/src/cli/commands/session/list.ts +1 -1
  45. package/src/cli/commands/session/mark-done.ts +1 -1
  46. package/src/cli/commands/session/replay.ts +1 -1
  47. package/src/cli/commands/session/start.ts +1 -1
  48. package/src/cli/commands/session/stop.ts +1 -1
  49. package/src/cli/commands/status.ts +2 -2
  50. package/src/cli/commands/sync.ts +2 -2
  51. package/src/cli/commands/windows/list.ts +1 -1
  52. package/src/lib/active-sessions.ts +6 -6
  53. package/src/lib/annotations-convex.ts +1 -1
  54. package/src/lib/events.ts +1 -1
  55. package/src/lib/report.ts +1 -1
  56. package/src/lib/runner.ts +4 -4
@@ -1,4 +1,4 @@
1
- import { getHttpClient, api } from "@abbie/sdk/convex";
1
+ import { getHttpClient, api } from "@creativeintelligence/sdk/convex";
2
2
  import { Flags } from "@oclif/core";
3
3
  import { BaseCommand } from "../../base-command.js";
4
4
  export default class ContextInject extends BaseCommand {
@@ -1,4 +1,4 @@
1
- import { getHttpClient, api } from "@abbie/sdk/convex";
1
+ import { getHttpClient, api } from "@creativeintelligence/sdk/convex";
2
2
  import { Flags } from "@oclif/core";
3
3
  import { BaseCommand } from "../../base-command.js";
4
4
  export default class ContextList extends BaseCommand {
@@ -1,4 +1,4 @@
1
- import { api, getHttpClient } from "@abbie/sdk/convex";
1
+ import { api, getHttpClient } from "@creativeintelligence/sdk/convex";
2
2
  import { Args, Flags } from "@oclif/core";
3
3
  import { BaseCommand } from "../../base-command.js";
4
4
  export default class ContextPublish extends BaseCommand {
@@ -1,4 +1,4 @@
1
- import { getHttpClient, api } from "@abbie/sdk/convex";
1
+ import { getHttpClient, api } from "@creativeintelligence/sdk/convex";
2
2
  import { Flags } from "@oclif/core";
3
3
  import { BaseCommand } from "../../base-command.js";
4
4
  export default class ContextRead extends BaseCommand {
@@ -3,7 +3,7 @@ import { createHash } from "node:crypto";
3
3
  import { existsSync, mkdirSync, writeFileSync } from "node:fs";
4
4
  import { homedir, hostname } from "node:os";
5
5
  import { join } from "node:path";
6
- import { api, closeClients, getHttpClient, isConvexConfigured, subscribe } from "@abbie/sdk/convex";
6
+ import { api, closeClients, getHttpClient, isConvexConfigured, subscribe } from "@creativeintelligence/sdk/convex";
7
7
  import { Flags } from "@oclif/core";
8
8
  import { getActiveSessionManager } from "../../lib/active-sessions.js";
9
9
  import { discoverProjects, loadConfig } from "../../lib/config-loader.js";
@@ -1,6 +1,17 @@
1
- import { type Doc } from "@abbie/sdk/convex";
2
1
  import { BaseCommand } from "../../base-command.js";
3
- type HistoryEvent = Doc<"reports">;
2
+ type HistoryEvent = {
3
+ _id: string;
4
+ _creationTime: number;
5
+ timestamp?: number;
6
+ action?: string;
7
+ task?: string;
8
+ confidence?: number;
9
+ project?: string;
10
+ deviceId?: string;
11
+ agent?: string;
12
+ traceId?: string;
13
+ [key: string]: unknown;
14
+ };
4
15
  interface HistoryResult {
5
16
  success: boolean;
6
17
  events: HistoryEvent[];
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/history/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,GAAG,EAAiB,MAAM,mBAAmB,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,KAAK,YAAY,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC;AAEnC,UAAU,aAAa;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE;QACP,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAwBD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,WAAW;IACrD,OAAgB,OAAO,SAA+B;IACtD,OAAgB,WAAW,SAIwB;IAEnD,OAAgB,QAAQ,WAQtB;IAEF,OAAgB,KAAK;;;;;;;;;;;;;;MAsCnB;IAEI,OAAO,IAAI,OAAO,CAAC,aAAa,CAAC;IA4DvC;;;;;;;OAOG;IACH,OAAO,CAAC,UAAU;IA8ClB,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,gBAAgB;CAgCzB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/history/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,KAAK,YAAY,GAAG;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,CAAC;AAEF,UAAU,aAAa;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE;QACP,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAwBD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,WAAW;IACrD,OAAgB,OAAO,SAA+B;IACtD,OAAgB,WAAW,SAIwB;IAEnD,OAAgB,QAAQ,WAQtB;IAEF,OAAgB,KAAK;;;;;;;;;;;;;;MAsCnB;IAEI,OAAO,IAAI,OAAO,CAAC,aAAa,CAAC;IA4DvC;;;;;;;OAOG;IACH,OAAO,CAAC,UAAU;IA8ClB,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,gBAAgB;CAgCzB"}
@@ -1,4 +1,4 @@
1
- import { api, getHttpClient } from "@abbie/sdk/convex";
1
+ import { api, getHttpClient } from "@creativeintelligence/sdk/convex";
2
2
  import { Flags } from "@oclif/core";
3
3
  import { BaseCommand } from "../../base-command.js";
4
4
  /**
@@ -140,7 +140,7 @@ SYMMETRY: abbie report writes → abbie history reads`;
140
140
  postFilter(events, flags, sinceMs) {
141
141
  let filtered = events;
142
142
  if (sinceMs !== undefined) {
143
- filtered = filtered.filter((e) => e.timestamp >= sinceMs);
143
+ filtered = filtered.filter((e) => (e.timestamp ?? 0) >= sinceMs);
144
144
  }
145
145
  if (flags["trace-id"]) {
146
146
  filtered = filtered.filter((e) => e.traceId === flags["trace-id"]);
@@ -10,8 +10,8 @@
10
10
  * 6. Optionally trigger initial sync
11
11
  */
12
12
  import { Flags } from "@oclif/core";
13
- import { getDeviceInfo, getStoredClerkId, saveClerkId, getWebUrl } from "@abbie/sdk/config";
14
- import { api, getHttpClient, isConvexConfigured } from "@abbie/sdk/convex";
13
+ import { getDeviceInfo, getStoredClerkId, saveClerkId, getWebUrl } from "@creativeintelligence/sdk/config";
14
+ import { api, getHttpClient, isConvexConfigured } from "@creativeintelligence/sdk/convex";
15
15
  import { BaseCommand } from "../base-command.js";
16
16
  const POLL_INTERVAL_MS = 1_500;
17
17
  const MAX_POLL_DURATION_MS = 10 * 60 * 1_000; // 10 minutes (matches code TTL)
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * abbie logout — clear stored credentials from this device.
3
3
  */
4
- import { clearClerkId, getStoredClerkId, getDeviceInfo } from "@abbie/sdk/config";
4
+ import { clearClerkId, getStoredClerkId, getDeviceInfo } from "@creativeintelligence/sdk/config";
5
5
  import { BaseCommand } from "../base-command.js";
6
6
  export default class LogoutCommand extends BaseCommand {
7
7
  static summary = "Clear authentication from this device";
@@ -1,7 +1,7 @@
1
1
  import { existsSync } from "node:fs";
2
2
  import { basename, resolve } from "node:path";
3
- import { getStoredClerkId } from "@abbie/sdk/config";
4
- import { api, getHttpClient, isConvexConfigured } from "@abbie/sdk/convex";
3
+ import { getStoredClerkId } from "@creativeintelligence/sdk/config";
4
+ import { api, getHttpClient, isConvexConfigured } from "@creativeintelligence/sdk/convex";
5
5
  import { Args, Flags } from "@oclif/core";
6
6
  import { detectProject } from "../../../lib/preview/detect.js";
7
7
  import { BaseCommand } from "../../base-command.js";
@@ -1,5 +1,5 @@
1
- import { getStoredClerkId } from "@abbie/sdk/config";
2
- import { api, getHttpClient, isConvexConfigured } from "@abbie/sdk/convex";
1
+ import { getStoredClerkId } from "@creativeintelligence/sdk/config";
2
+ import { api, getHttpClient, isConvexConfigured } from "@creativeintelligence/sdk/convex";
3
3
  import { Flags } from "@oclif/core";
4
4
  import { BaseCommand } from "../../base-command.js";
5
5
  /**
@@ -1,6 +1,6 @@
1
1
  import { basename, resolve } from "node:path";
2
- import { getStoredClerkId } from "@abbie/sdk/config";
3
- import { api, getHttpClient, isConvexConfigured } from "@abbie/sdk/convex";
2
+ import { getStoredClerkId } from "@creativeintelligence/sdk/config";
3
+ import { api, getHttpClient, isConvexConfigured } from "@creativeintelligence/sdk/convex";
4
4
  import { Args, Flags } from "@oclif/core";
5
5
  import { BaseCommand } from "../../base-command.js";
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  import { basename, resolve } from "node:path";
2
- import { getStoredClerkId } from "@abbie/sdk/config";
3
- import { api, getHttpClient, isConvexConfigured } from "@abbie/sdk/convex";
2
+ import { getStoredClerkId } from "@creativeintelligence/sdk/config";
3
+ import { api, getHttpClient, isConvexConfigured } from "@creativeintelligence/sdk/convex";
4
4
  import { Args, Flags } from "@oclif/core";
5
5
  import { BaseCommand } from "../../base-command.js";
6
6
  /**
@@ -6,8 +6,8 @@
6
6
  * --type: push specific content type only.
7
7
  */
8
8
  import { Flags } from "@oclif/core";
9
- import { api, getHttpClient, isConvexConfigured } from "@abbie/sdk/convex";
10
- import { getStoredClerkId } from "@abbie/sdk/config";
9
+ import { api, getHttpClient, isConvexConfigured } from "@creativeintelligence/sdk/convex";
10
+ import { getStoredClerkId } from "@creativeintelligence/sdk/config";
11
11
  import { ContentSyncRunner, } from "../../lib/content-sync/index.js";
12
12
  import { BaseCommand } from "../base-command.js";
13
13
  export default class PushCommand extends BaseCommand {
@@ -1,5 +1,5 @@
1
1
  import { spawnSync } from "node:child_process";
2
- import { getHttpClient, api } from "@abbie/sdk/convex";
2
+ import { getHttpClient, api } from "@creativeintelligence/sdk/convex";
3
3
  import { Flags } from "@oclif/core";
4
4
  import { getActiveSessionManager } from "../../../lib/active-sessions.js";
5
5
  import { getDeviceId } from "../../../lib/device.js";
@@ -2,7 +2,7 @@ import { spawnSync } from "node:child_process";
2
2
  import { existsSync, readFileSync, writeFileSync } from "node:fs";
3
3
  import { homedir } from "node:os";
4
4
  import { join } from "node:path";
5
- import { getHttpClient, api } from "@abbie/sdk/convex";
5
+ import { getHttpClient, api } from "@creativeintelligence/sdk/convex";
6
6
  import { Args } from "@oclif/core";
7
7
  import { getActiveSessionManager } from "../../../lib/active-sessions.js";
8
8
  import { createEvent, EventStore } from "../../../lib/events.js";
@@ -1,5 +1,5 @@
1
1
  import { execSync } from "node:child_process";
2
- import { api, getHttpClient } from "@abbie/sdk/convex";
2
+ import { api, getHttpClient } from "@creativeintelligence/sdk/convex";
3
3
  import { Args, Flags } from "@oclif/core";
4
4
  import { getActiveSessionManager } from "../../../lib/active-sessions.js";
5
5
  import { AgentSessionMiner } from "../../../lib/agent-sessions.js";
@@ -1,6 +1,6 @@
1
1
  import { existsSync, readFileSync } from "node:fs";
2
2
  import { basename } from "node:path";
3
- import { api, getHttpClient } from "@abbie/sdk/convex";
3
+ import { api, getHttpClient } from "@creativeintelligence/sdk/convex";
4
4
  import { Flags } from "@oclif/core";
5
5
  import { getActiveSessionManager } from "../../../lib/active-sessions.js";
6
6
  import { telemetry } from "../../../lib/analytics.js";
@@ -1,4 +1,4 @@
1
- import { getHttpClient, api } from "@abbie/sdk/convex";
1
+ import { getHttpClient, api } from "@creativeintelligence/sdk/convex";
2
2
  import { Args, Flags } from "@oclif/core";
3
3
  import { getActiveSessionManager } from "../../../lib/active-sessions.js";
4
4
  import { BaseCommand } from "../../base-command.js";
@@ -9,8 +9,8 @@
9
9
  * - Pending changes
10
10
  */
11
11
  import { existsSync, readFileSync } from "node:fs";
12
- import { isConvexConfigured } from "@abbie/sdk/convex";
13
- import { getStoredClerkId } from "@abbie/sdk/config";
12
+ import { isConvexConfigured } from "@creativeintelligence/sdk/convex";
13
+ import { getStoredClerkId } from "@creativeintelligence/sdk/config";
14
14
  import { getAdapter, getSyncDir } from "../../lib/config-sync/index.js";
15
15
  import { getLatestBackup } from "../../lib/config-sync/writer.js";
16
16
  import { BaseCommand } from "../base-command.js";
@@ -12,8 +12,8 @@
12
12
  * --type: sync specific content type only (content sync only).
13
13
  */
14
14
  import { Flags } from "@oclif/core";
15
- import { api, getHttpClient, isConvexConfigured } from "@abbie/sdk/convex";
16
- import { getStoredClerkId } from "@abbie/sdk/config";
15
+ import { api, getHttpClient, isConvexConfigured } from "@creativeintelligence/sdk/convex";
16
+ import { getStoredClerkId } from "@creativeintelligence/sdk/config";
17
17
  import { ConfigSyncRunner } from "../../lib/config-sync/index.js";
18
18
  import { ContentSyncRunner } from "../../lib/content-sync/index.js";
19
19
  import { BaseCommand } from "../base-command.js";
@@ -1,4 +1,4 @@
1
- import { api, getHttpClient, isConvexConfigured } from "@abbie/sdk/convex";
1
+ import { api, getHttpClient, isConvexConfigured } from "@creativeintelligence/sdk/convex";
2
2
  import { Flags } from "@oclif/core";
3
3
  import { getDeviceId } from "../../../lib/device.js";
4
4
  import { isRunning } from "../../../lib/tmux/index.js";
@@ -751,7 +751,7 @@ Avoid editing the same files simultaneously. Check git status before committing.
751
751
  */
752
752
  async getFileProvenanceContext(project) {
753
753
  try {
754
- const { getHttpClient, api } = await import("@abbie/sdk/convex");
754
+ const { getHttpClient, api } = await import("@creativeintelligence/sdk/convex");
755
755
  const client = getHttpClient();
756
756
  const entries = await client.query(api.contextBus.readByProject, {
757
757
  project,
@@ -925,7 +925,7 @@ Violation of this contract will cause session termination.
925
925
  */
926
926
  async writeSessionToStore(session) {
927
927
  try {
928
- const { getHttpClient, api } = await import("@abbie/sdk/convex");
928
+ const { getHttpClient, api } = await import("@creativeintelligence/sdk/convex");
929
929
  const client = getHttpClient();
930
930
  await client.mutation(api.sessions.create, {
931
931
  sessionId: session.session_id,
@@ -961,7 +961,7 @@ Violation of this contract will cause session termination.
961
961
  */
962
962
  async updateSessionInStore(sessionId, status, metadata) {
963
963
  try {
964
- const { getHttpClient, api } = await import("@abbie/sdk/convex");
964
+ const { getHttpClient, api } = await import("@creativeintelligence/sdk/convex");
965
965
  const client = getHttpClient();
966
966
  await client.mutation(api.sessions.update, {
967
967
  sessionId,
@@ -979,7 +979,7 @@ Violation of this contract will cause session termination.
979
979
  */
980
980
  async getAsync(sessionId) {
981
981
  try {
982
- const { getHttpClient, api } = await import("@abbie/sdk/convex");
982
+ const { getHttpClient, api } = await import("@creativeintelligence/sdk/convex");
983
983
  const client = getHttpClient();
984
984
  const storeSession = await client.query(api.sessions.get, { sessionId });
985
985
  if (storeSession) {
@@ -996,7 +996,7 @@ Violation of this contract will cause session termination.
996
996
  */
997
997
  async listAsync(options) {
998
998
  try {
999
- const { getHttpClient, api } = await import("@abbie/sdk/convex");
999
+ const { getHttpClient, api } = await import("@creativeintelligence/sdk/convex");
1000
1000
  const client = getHttpClient();
1001
1001
  const deviceId = getDeviceId();
1002
1002
  const storeSessions = await client.query(api.sessions.list, {
@@ -1028,7 +1028,7 @@ Violation of this contract will cause session termination.
1028
1028
  */
1029
1029
  async getActiveAsync() {
1030
1030
  try {
1031
- const { getHttpClient, api } = await import("@abbie/sdk/convex");
1031
+ const { getHttpClient, api } = await import("@creativeintelligence/sdk/convex");
1032
1032
  const client = getHttpClient();
1033
1033
  const deviceId = getDeviceId();
1034
1034
  const storeSessions = await client.query(api.sessions.getActive, { deviceId });
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * Falls back to local AnnotationStore when Convex is unavailable.
8
8
  */
9
- import { api, getHttpClient, isConvexConfigured } from "@abbie/sdk/convex";
9
+ import { api, getHttpClient, isConvexConfigured } from "@creativeintelligence/sdk/convex";
10
10
  import { AnnotationStore } from "./annotations.js";
11
11
  // Map our domain types to AFS types used by Convex
12
12
  function intentToAfs(intent) {
@@ -50,7 +50,7 @@ export class EventStore {
50
50
  */
51
51
  async appendToStore(event) {
52
52
  try {
53
- const { getHttpClient, api } = await import("@abbie/sdk/convex");
53
+ const { getHttpClient, api } = await import("@creativeintelligence/sdk/convex");
54
54
  const client = getHttpClient();
55
55
  await client.mutation(api.events.append, {
56
56
  sessionId: event.session_id,
@@ -13,7 +13,7 @@
13
13
  */
14
14
  import { spawnSync } from "node:child_process";
15
15
  import { randomUUID } from "node:crypto";
16
- import { api, getHttpClient } from "@abbie/sdk/convex";
16
+ import { api, getHttpClient } from "@creativeintelligence/sdk/convex";
17
17
  import { getDeviceId } from "./device.js";
18
18
  import { getDefaultSlackWorkspace } from "./slack-workspace.js";
19
19
  // ============================================================================
@@ -582,7 +582,7 @@ export async function runAgent(config) {
582
582
  // Emit session:started progress event (best-effort, non-blocking)
583
583
  const traceIdForLifecycle = process.env.AGENTS_TRACE_ID;
584
584
  if (traceIdForLifecycle) {
585
- import("@abbie/sdk/convex")
585
+ import("@creativeintelligence/sdk/convex")
586
586
  .then(({ api: cbApi, getHttpClient }) => getHttpClient().mutation(cbApi.contextBus.publish, {
587
587
  traceId: traceIdForLifecycle,
588
588
  sessionId: config.sessionId,
@@ -922,7 +922,7 @@ export async function runAgent(config) {
922
922
  .map((m) => m.replace(/^.*?([^\s`'"]+\.\w{1,6}).*$/, "$1"))
923
923
  .slice(0, 20);
924
924
  const hasOutputContract = /\{[\s\S]*"status"[\s\S]*"confidence"[\s\S]*\}/.test(outputForContext.slice(-500));
925
- const { api: cbApi, getHttpClient } = await import("@abbie/sdk/convex");
925
+ const { api: cbApi, getHttpClient } = await import("@creativeintelligence/sdk/convex");
926
926
  await getHttpClient().mutation(cbApi.contextBus.publish, {
927
927
  traceId,
928
928
  sessionId: config.sessionId,
@@ -954,7 +954,7 @@ export async function runAgent(config) {
954
954
  // Update Convex session with terminal status + metadata (best-effort)
955
955
  if (traceId) {
956
956
  try {
957
- const { getHttpClient, api } = await import("@abbie/sdk/convex");
957
+ const { getHttpClient, api } = await import("@creativeintelligence/sdk/convex");
958
958
  const client = getHttpClient();
959
959
  // Read output excerpt for metadata
960
960
  let outputExcerpt = "";
@@ -994,7 +994,7 @@ export async function runAgent(config) {
994
994
  // Emit session lifecycle event (completed/failed/stopped)
995
995
  if (traceId) {
996
996
  try {
997
- const { api: cbApi, getHttpClient } = await import("@abbie/sdk/convex");
997
+ const { api: cbApi, getHttpClient } = await import("@creativeintelligence/sdk/convex");
998
998
  await getHttpClient().mutation(cbApi.contextBus.publish, {
999
999
  traceId,
1000
1000
  sessionId: config.sessionId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@creativeintelligence/abbie",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Abbie — agent orchestration CLI",
@@ -81,8 +81,8 @@
81
81
  "cli": "bun run ./bin/dev.js"
82
82
  },
83
83
  "dependencies": {
84
- "@abbie/backend": "workspace:*",
85
- "@abbie/sdk": "workspace:*",
84
+ "@creativeintelligence/backend": "^0.1.0",
85
+ "@creativeintelligence/sdk": "^0.1.1",
86
86
  "@oclif/core": "^4",
87
87
  "@oclif/plugin-help": "^6",
88
88
  "@oclif/plugin-not-found": "^3",
@@ -5,7 +5,7 @@ type ExecuteQueuedCommand = (command: string, args: unknown) => Promise<ExecuteQ
5
5
 
6
6
  const startSpy = vi.fn(async () => ({ session_id: "sess_test_123" }));
7
7
 
8
- vi.mock("@abbie/sdk/convex", () => ({
8
+ vi.mock("@creativeintelligence/sdk/convex", () => ({
9
9
  api: {},
10
10
  closeClients: vi.fn(),
11
11
  getHttpClient: vi.fn(),
@@ -1,4 +1,4 @@
1
- import { getHttpClient, api, type ContextBusEntryType } from "@abbie/sdk/convex";
1
+ import { getHttpClient, api, type ContextBusEntryType } from "@creativeintelligence/sdk/convex";
2
2
  import { Flags } from "@oclif/core";
3
3
  import { BaseCommand } from "../../base-command.js";
4
4
 
@@ -1,4 +1,4 @@
1
- import { getHttpClient, api, type ContextBusEntryType } from "@abbie/sdk/convex";
1
+ import { getHttpClient, api, type ContextBusEntryType } from "@creativeintelligence/sdk/convex";
2
2
  import { Flags } from "@oclif/core";
3
3
  import { BaseCommand } from "../../base-command.js";
4
4
 
@@ -1,4 +1,4 @@
1
- import { api, type ContextBusEntryType, getHttpClient } from "@abbie/sdk/convex";
1
+ import { api, type ContextBusEntryType, getHttpClient } from "@creativeintelligence/sdk/convex";
2
2
  import { Args, Flags } from "@oclif/core";
3
3
  import { BaseCommand } from "../../base-command.js";
4
4
 
@@ -1,4 +1,4 @@
1
- import { getHttpClient, api, type ContextBusEntryType } from "@abbie/sdk/convex";
1
+ import { getHttpClient, api, type ContextBusEntryType } from "@creativeintelligence/sdk/convex";
2
2
  import { Flags } from "@oclif/core";
3
3
  import { BaseCommand } from "../../base-command.js";
4
4
 
@@ -3,7 +3,7 @@ import { createHash } from "node:crypto";
3
3
  import { existsSync, mkdirSync, writeFileSync } from "node:fs";
4
4
  import { homedir, hostname } from "node:os";
5
5
  import { join } from "node:path";
6
- import { api, closeClients, getHttpClient, isConvexConfigured, subscribe } from "@abbie/sdk/convex";
6
+ import { api, closeClients, getHttpClient, isConvexConfigured, subscribe } from "@creativeintelligence/sdk/convex";
7
7
  import { Flags } from "@oclif/core";
8
8
  import type { FunctionReturnType } from "convex/server";
9
9
  import { type ActiveSession, getActiveSessionManager } from "../../lib/active-sessions.js";
@@ -1,8 +1,20 @@
1
- import { api, type Doc, getHttpClient } from "@abbie/sdk/convex";
1
+ import { api, getHttpClient } from "@creativeintelligence/sdk/convex";
2
2
  import { Flags } from "@oclif/core";
3
3
  import { BaseCommand } from "../../base-command.js";
4
4
 
5
- type HistoryEvent = Doc<"reports">;
5
+ type HistoryEvent = {
6
+ _id: string;
7
+ _creationTime: number;
8
+ timestamp?: number;
9
+ action?: string;
10
+ task?: string;
11
+ confidence?: number;
12
+ project?: string;
13
+ deviceId?: string;
14
+ agent?: string;
15
+ traceId?: string;
16
+ [key: string]: unknown;
17
+ };
6
18
 
7
19
  interface HistoryResult {
8
20
  success: boolean;
@@ -180,7 +192,7 @@ SYMMETRY: abbie report writes → abbie history reads`;
180
192
  let filtered = events;
181
193
 
182
194
  if (sinceMs !== undefined) {
183
- filtered = filtered.filter((e) => e.timestamp >= sinceMs);
195
+ filtered = filtered.filter((e) => (e.timestamp ?? 0) >= sinceMs);
184
196
  }
185
197
  if (flags["trace-id"]) {
186
198
  filtered = filtered.filter((e) => e.traceId === flags["trace-id"]);
@@ -11,8 +11,8 @@
11
11
  */
12
12
 
13
13
  import { Flags } from "@oclif/core";
14
- import { getDeviceInfo, getStoredClerkId, saveClerkId, getWebUrl } from "@abbie/sdk/config";
15
- import { api, getHttpClient, isConvexConfigured } from "@abbie/sdk/convex";
14
+ import { getDeviceInfo, getStoredClerkId, saveClerkId, getWebUrl } from "@creativeintelligence/sdk/config";
15
+ import { api, getHttpClient, isConvexConfigured } from "@creativeintelligence/sdk/convex";
16
16
  import { BaseCommand } from "../base-command.js";
17
17
 
18
18
  const POLL_INTERVAL_MS = 1_500;
@@ -2,7 +2,7 @@
2
2
  * abbie logout — clear stored credentials from this device.
3
3
  */
4
4
 
5
- import { clearClerkId, getStoredClerkId, getDeviceInfo } from "@abbie/sdk/config";
5
+ import { clearClerkId, getStoredClerkId, getDeviceInfo } from "@creativeintelligence/sdk/config";
6
6
  import { BaseCommand } from "../base-command.js";
7
7
 
8
8
  type LogoutResult = {
@@ -1,7 +1,7 @@
1
1
  import { existsSync } from "node:fs";
2
2
  import { basename, resolve } from "node:path";
3
- import { getStoredClerkId } from "@abbie/sdk/config";
4
- import { api, getHttpClient, isConvexConfigured } from "@abbie/sdk/convex";
3
+ import { getStoredClerkId } from "@creativeintelligence/sdk/config";
4
+ import { api, getHttpClient, isConvexConfigured } from "@creativeintelligence/sdk/convex";
5
5
  import { Args, Flags } from "@oclif/core";
6
6
  import { detectProject } from "../../../lib/preview/detect.js";
7
7
  import { BaseCommand } from "../../base-command.js";
@@ -1,5 +1,5 @@
1
- import { getStoredClerkId } from "@abbie/sdk/config";
2
- import { api, getHttpClient, isConvexConfigured } from "@abbie/sdk/convex";
1
+ import { getStoredClerkId } from "@creativeintelligence/sdk/config";
2
+ import { api, getHttpClient, isConvexConfigured } from "@creativeintelligence/sdk/convex";
3
3
  import { Flags } from "@oclif/core";
4
4
  import { BaseCommand } from "../../base-command.js";
5
5
 
@@ -1,6 +1,6 @@
1
1
  import { basename, resolve } from "node:path";
2
- import { getStoredClerkId } from "@abbie/sdk/config";
3
- import { api, getHttpClient, isConvexConfigured } from "@abbie/sdk/convex";
2
+ import { getStoredClerkId } from "@creativeintelligence/sdk/config";
3
+ import { api, getHttpClient, isConvexConfigured } from "@creativeintelligence/sdk/convex";
4
4
  import { Args, Flags } from "@oclif/core";
5
5
  import { BaseCommand } from "../../base-command.js";
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { basename, resolve } from "node:path";
2
- import { getStoredClerkId } from "@abbie/sdk/config";
3
- import { api, getHttpClient, isConvexConfigured } from "@abbie/sdk/convex";
2
+ import { getStoredClerkId } from "@creativeintelligence/sdk/config";
3
+ import { api, getHttpClient, isConvexConfigured } from "@creativeintelligence/sdk/convex";
4
4
  import { Args, Flags } from "@oclif/core";
5
5
  import { BaseCommand } from "../../base-command.js";
6
6
 
@@ -7,8 +7,8 @@
7
7
  */
8
8
 
9
9
  import { Flags } from "@oclif/core";
10
- import { api, getHttpClient, isConvexConfigured } from "@abbie/sdk/convex";
11
- import { getStoredClerkId } from "@abbie/sdk/config";
10
+ import { api, getHttpClient, isConvexConfigured } from "@creativeintelligence/sdk/convex";
11
+ import { getStoredClerkId } from "@creativeintelligence/sdk/config";
12
12
  import {
13
13
  ContentSyncRunner,
14
14
  type ContentPushResult,
@@ -1,5 +1,5 @@
1
1
  import { spawnSync } from "node:child_process";
2
- import { getHttpClient, api, type Session } from "@abbie/sdk/convex";
2
+ import { getHttpClient, api, type Session } from "@creativeintelligence/sdk/convex";
3
3
  import { Flags } from "@oclif/core";
4
4
  import { type ActiveSession, getActiveSessionManager } from "../../../lib/active-sessions.js";
5
5
  import { getDeviceId } from "../../../lib/device.js";
@@ -2,7 +2,7 @@ import { spawnSync } from "node:child_process";
2
2
  import { existsSync, readFileSync, writeFileSync } from "node:fs";
3
3
  import { homedir } from "node:os";
4
4
  import { join } from "node:path";
5
- import { getHttpClient, api } from "@abbie/sdk/convex";
5
+ import { getHttpClient, api } from "@creativeintelligence/sdk/convex";
6
6
  import { Args } from "@oclif/core";
7
7
  import { getActiveSessionManager } from "../../../lib/active-sessions.js";
8
8
  import { createEvent, EventStore } from "../../../lib/events.js";
@@ -1,5 +1,5 @@
1
1
  import { execSync } from "node:child_process";
2
- import { api, getHttpClient } from "@abbie/sdk/convex";
2
+ import { api, getHttpClient } from "@creativeintelligence/sdk/convex";
3
3
  import { Args, Flags } from "@oclif/core";
4
4
  import { type ActiveSession, getActiveSessionManager } from "../../../lib/active-sessions.js";
5
5
  import { type AgentSession, AgentSessionMiner } from "../../../lib/agent-sessions.js";
@@ -1,6 +1,6 @@
1
1
  import { existsSync, readFileSync } from "node:fs";
2
2
  import { basename } from "node:path";
3
- import { api, getHttpClient } from "@abbie/sdk/convex";
3
+ import { api, getHttpClient } from "@creativeintelligence/sdk/convex";
4
4
  import { Flags } from "@oclif/core";
5
5
  import { type AgentType, getActiveSessionManager } from "../../../lib/active-sessions.js";
6
6
  import { telemetry } from "../../../lib/analytics.js";
@@ -1,4 +1,4 @@
1
- import { getHttpClient, api } from "@abbie/sdk/convex";
1
+ import { getHttpClient, api } from "@creativeintelligence/sdk/convex";
2
2
  import { Args, Flags } from "@oclif/core";
3
3
  import { getActiveSessionManager } from "../../../lib/active-sessions.js";
4
4
  import { BaseCommand } from "../../base-command.js";
@@ -13,8 +13,8 @@ import { existsSync, readFileSync, statSync, readdirSync } from "node:fs";
13
13
  import { join } from "node:path";
14
14
  import { homedir } from "node:os";
15
15
  import { Flags } from "@oclif/core";
16
- import { isConvexConfigured } from "@abbie/sdk/convex";
17
- import { getStoredClerkId } from "@abbie/sdk/config";
16
+ import { isConvexConfigured } from "@creativeintelligence/sdk/convex";
17
+ import { getStoredClerkId } from "@creativeintelligence/sdk/config";
18
18
  import { getAdapter, getSyncDir, type SidecarManifest, type ConfigSyncState } from "../../lib/config-sync/index.js";
19
19
  import { getLatestBackup } from "../../lib/config-sync/writer.js";
20
20
  import type { ContentSyncState, ContentManifest } from "../../lib/content-sync/types.js";
@@ -13,8 +13,8 @@
13
13
  */
14
14
 
15
15
  import { Flags } from "@oclif/core";
16
- import { api, getHttpClient, isConvexConfigured } from "@abbie/sdk/convex";
17
- import { getStoredClerkId } from "@abbie/sdk/config";
16
+ import { api, getHttpClient, isConvexConfigured } from "@creativeintelligence/sdk/convex";
17
+ import { getStoredClerkId } from "@creativeintelligence/sdk/config";
18
18
  import { ConfigSyncRunner, type ConfigSyncAgent, type SyncTickResult } from "../../lib/config-sync/index.js";
19
19
  import { ContentSyncRunner } from "../../lib/content-sync/index.js";
20
20
  import type { ContentSyncTickResult, ContentType } from "../../lib/content-sync/types.js";
@@ -1,4 +1,4 @@
1
- import { api, getHttpClient, isConvexConfigured } from "@abbie/sdk/convex";
1
+ import { api, getHttpClient, isConvexConfigured } from "@creativeintelligence/sdk/convex";
2
2
  import { Flags } from "@oclif/core";
3
3
  import { getDeviceId } from "../../../lib/device.js";
4
4
  import { isRunning } from "../../../lib/tmux/index.js";
@@ -1003,7 +1003,7 @@ Avoid editing the same files simultaneously. Check git status before committing.
1003
1003
  */
1004
1004
  private async getFileProvenanceContext(project: string): Promise<string> {
1005
1005
  try {
1006
- const { getHttpClient, api } = await import("@abbie/sdk/convex");
1006
+ const { getHttpClient, api } = await import("@creativeintelligence/sdk/convex");
1007
1007
  const client = getHttpClient();
1008
1008
  const entries = await client.query(api.contextBus.readByProject, {
1009
1009
  project,
@@ -1195,7 +1195,7 @@ Violation of this contract will cause session termination.
1195
1195
  */
1196
1196
  private async writeSessionToStore(session: ActiveSession): Promise<void> {
1197
1197
  try {
1198
- const { getHttpClient, api } = await import("@abbie/sdk/convex");
1198
+ const { getHttpClient, api } = await import("@creativeintelligence/sdk/convex");
1199
1199
  const client = getHttpClient();
1200
1200
  await client.mutation(api.sessions.create, {
1201
1201
  sessionId: session.session_id,
@@ -1235,7 +1235,7 @@ Violation of this contract will cause session termination.
1235
1235
  metadata?: Record<string, unknown>,
1236
1236
  ): Promise<void> {
1237
1237
  try {
1238
- const { getHttpClient, api } = await import("@abbie/sdk/convex");
1238
+ const { getHttpClient, api } = await import("@creativeintelligence/sdk/convex");
1239
1239
  const client = getHttpClient();
1240
1240
  await client.mutation(api.sessions.update, {
1241
1241
  sessionId,
@@ -1253,7 +1253,7 @@ Violation of this contract will cause session termination.
1253
1253
  */
1254
1254
  async getAsync(sessionId: string): Promise<ActiveSession | undefined> {
1255
1255
  try {
1256
- const { getHttpClient, api } = await import("@abbie/sdk/convex");
1256
+ const { getHttpClient, api } = await import("@creativeintelligence/sdk/convex");
1257
1257
  const client = getHttpClient();
1258
1258
  const storeSession = await client.query(api.sessions.get, { sessionId });
1259
1259
  if (storeSession) {
@@ -1276,7 +1276,7 @@ Violation of this contract will cause session termination.
1276
1276
  limit?: number;
1277
1277
  }): Promise<ActiveSession[]> {
1278
1278
  try {
1279
- const { getHttpClient, api } = await import("@abbie/sdk/convex");
1279
+ const { getHttpClient, api } = await import("@creativeintelligence/sdk/convex");
1280
1280
  const client = getHttpClient();
1281
1281
  const deviceId = getDeviceId();
1282
1282
  const storeSessions = await client.query(api.sessions.list, {
@@ -1315,7 +1315,7 @@ Violation of this contract will cause session termination.
1315
1315
  */
1316
1316
  async getActiveAsync(): Promise<ActiveSession[]> {
1317
1317
  try {
1318
- const { getHttpClient, api } = await import("@abbie/sdk/convex");
1318
+ const { getHttpClient, api } = await import("@creativeintelligence/sdk/convex");
1319
1319
  const client = getHttpClient();
1320
1320
  const deviceId = getDeviceId();
1321
1321
  const storeSessions = await client.query(api.sessions.getActive, { deviceId });
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * Falls back to local AnnotationStore when Convex is unavailable.
8
8
  */
9
- import { api, getHttpClient, isConvexConfigured } from "@abbie/sdk/convex";
9
+ import { api, getHttpClient, isConvexConfigured } from "@creativeintelligence/sdk/convex";
10
10
  import type {
11
11
  Annotation,
12
12
  AnnotationIntent,
package/src/lib/events.ts CHANGED
@@ -238,7 +238,7 @@ export class EventStore {
238
238
  */
239
239
  private async appendToStore(event: SessionEvent): Promise<void> {
240
240
  try {
241
- const { getHttpClient, api } = await import("@abbie/sdk/convex");
241
+ const { getHttpClient, api } = await import("@creativeintelligence/sdk/convex");
242
242
  const client = getHttpClient();
243
243
  await client.mutation(api.events.append, {
244
244
  sessionId: event.session_id,
package/src/lib/report.ts CHANGED
@@ -14,7 +14,7 @@
14
14
 
15
15
  import { spawnSync } from "node:child_process";
16
16
  import { randomUUID } from "node:crypto";
17
- import { api, getHttpClient } from "@abbie/sdk/convex";
17
+ import { api, getHttpClient } from "@creativeintelligence/sdk/convex";
18
18
  import { getDeviceId } from "./device.js";
19
19
  import { getDefaultSlackWorkspace } from "./slack-workspace.js";
20
20
 
package/src/lib/runner.ts CHANGED
@@ -734,7 +734,7 @@ export async function runAgent(config: RunnerConfig): Promise<number> {
734
734
  // Emit session:started progress event (best-effort, non-blocking)
735
735
  const traceIdForLifecycle = process.env.AGENTS_TRACE_ID;
736
736
  if (traceIdForLifecycle) {
737
- import("@abbie/sdk/convex")
737
+ import("@creativeintelligence/sdk/convex")
738
738
  .then(({ api: cbApi, getHttpClient }) =>
739
739
  getHttpClient().mutation(cbApi.contextBus.publish, {
740
740
  traceId: traceIdForLifecycle,
@@ -1107,7 +1107,7 @@ export async function runAgent(config: RunnerConfig): Promise<number> {
1107
1107
  outputForContext.slice(-500),
1108
1108
  );
1109
1109
 
1110
- const { api: cbApi, getHttpClient } = await import("@abbie/sdk/convex");
1110
+ const { api: cbApi, getHttpClient } = await import("@creativeintelligence/sdk/convex");
1111
1111
  await getHttpClient().mutation(cbApi.contextBus.publish, {
1112
1112
  traceId,
1113
1113
  sessionId: config.sessionId,
@@ -1139,7 +1139,7 @@ export async function runAgent(config: RunnerConfig): Promise<number> {
1139
1139
  // Update Convex session with terminal status + metadata (best-effort)
1140
1140
  if (traceId) {
1141
1141
  try {
1142
- const { getHttpClient, api } = await import("@abbie/sdk/convex");
1142
+ const { getHttpClient, api } = await import("@creativeintelligence/sdk/convex");
1143
1143
  const client = getHttpClient();
1144
1144
 
1145
1145
  // Read output excerpt for metadata
@@ -1182,7 +1182,7 @@ export async function runAgent(config: RunnerConfig): Promise<number> {
1182
1182
  // Emit session lifecycle event (completed/failed/stopped)
1183
1183
  if (traceId) {
1184
1184
  try {
1185
- const { api: cbApi, getHttpClient } = await import("@abbie/sdk/convex");
1185
+ const { api: cbApi, getHttpClient } = await import("@creativeintelligence/sdk/convex");
1186
1186
  await getHttpClient().mutation(cbApi.contextBus.publish, {
1187
1187
  traceId,
1188
1188
  sessionId: config.sessionId,