@ibgib/web-gib 0.0.1 → 0.0.3

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 (53) hide show
  1. package/CHANGELOG.md +4 -426
  2. package/dist/api/commands/chat/get-context-info.mjs +1 -1
  3. package/dist/api/commands/chat/get-context-info.mjs.map +1 -1
  4. package/dist/api/commands/chat/tell-user.mjs +1 -1
  5. package/dist/api/commands/chat/tell-user.mjs.map +1 -1
  6. package/dist/api/commands/ibgib/get-ibgibs.mjs +1 -1
  7. package/dist/api/commands/ibgib/get-ibgibs.mjs.map +1 -1
  8. package/dist/api/commands/ibgib/mut8-ibgib.mjs +1 -1
  9. package/dist/api/commands/ibgib/mut8-ibgib.mjs.map +1 -1
  10. package/dist/api/commands/templates/api-function-info.template.mjs +1 -1
  11. package/dist/api/commands/templates/api-function-info.template.mjs.map +1 -1
  12. package/dist/api/commands/text/text-edit.mjs +1 -1
  13. package/dist/api/commands/text/text-edit.mjs.map +1 -1
  14. package/dist/constants.d.mts +14 -0
  15. package/dist/constants.d.mts.map +1 -1
  16. package/dist/constants.mjs +14 -0
  17. package/dist/constants.mjs.map +1 -1
  18. package/dist/helpers.d.mts +84 -0
  19. package/dist/helpers.d.mts.map +1 -1
  20. package/dist/helpers.mjs +216 -2
  21. package/dist/helpers.mjs.map +1 -1
  22. package/dist/helpers.web.d.mts +17 -4
  23. package/dist/helpers.web.d.mts.map +1 -1
  24. package/dist/helpers.web.mjs +65 -19
  25. package/dist/helpers.web.mjs.map +1 -1
  26. package/dist/types.d.mts +75 -0
  27. package/dist/types.d.mts.map +1 -0
  28. package/dist/types.mjs +2 -0
  29. package/dist/types.mjs.map +1 -0
  30. package/dist/types.web.d.mts +5 -38
  31. package/dist/types.web.d.mts.map +1 -1
  32. package/dist/witness/agent/agent-one-file.mjs +1 -1
  33. package/dist/witness/agent/agent-one-file.mjs.map +1 -1
  34. package/dist/witness/agent/agents-service-v1.mjs +1 -1
  35. package/dist/witness/agent/agents-service-v1.mjs.map +1 -1
  36. package/dist/witness/live-proxy-ibgib/live-proxy-ibgib-one-file.d.mts.map +1 -1
  37. package/dist/witness/live-proxy-ibgib/live-proxy-ibgib-one-file.mjs +3 -3
  38. package/dist/witness/live-proxy-ibgib/live-proxy-ibgib-one-file.mjs.map +1 -1
  39. package/package.json +1 -1
  40. package/src/api/commands/chat/get-context-info.mts +1 -1
  41. package/src/api/commands/chat/tell-user.mts +1 -1
  42. package/src/api/commands/ibgib/get-ibgibs.mts +1 -1
  43. package/src/api/commands/ibgib/mut8-ibgib.mts +1 -1
  44. package/src/api/commands/templates/api-function-info.template.mts +1 -1
  45. package/src/api/commands/text/text-edit.mts +1 -1
  46. package/src/constants.mts +14 -0
  47. package/src/helpers.mts +197 -2
  48. package/src/helpers.web.mts +75 -25
  49. package/src/types.mts +76 -0
  50. package/src/types.web.mts +5 -38
  51. package/src/witness/agent/agent-one-file.mts +1 -1
  52. package/src/witness/agent/agents-service-v1.mts +1 -1
  53. package/src/witness/live-proxy-ibgib/live-proxy-ibgib-one-file.mts +4 -4
package/src/types.mts ADDED
@@ -0,0 +1,76 @@
1
+ import { Gib } from "@ibgib/ts-gib/dist/types.mjs";
2
+ import { GibInfo } from "@ibgib/ts-gib/dist/V1/types.mjs";
3
+ import { MetaspaceService } from "@ibgib/core-gib/dist/witness/space/metaspace/metaspace-types.mjs";
4
+
5
+ /**
6
+ * deterministically driven colors based on a given {@link gib}
7
+ */
8
+ export interface GibColorInfo {
9
+ /**
10
+ * Gib that was used to drive the color calculation
11
+ */
12
+ gib: Gib;
13
+ gibInfo: GibInfo;
14
+ /**
15
+ * Color that corresponds to the punctiliar part of {@link gib}
16
+ */
17
+ punctiliarColor: string;
18
+ /**
19
+ * Translucent version of {@link punctiliarColor}
20
+ */
21
+ punctiliarColorTranslucent: string;
22
+ /**
23
+ * contrasting color against punctiliar color
24
+ */
25
+ punctiliarColorContrast: string;
26
+ /**
27
+ * Color that corresponds to the tjp (timeline) part of {@link gib}
28
+ */
29
+ tjpColor?: string;
30
+ /**
31
+ * Translucent version of {@link tjpColor}
32
+ */
33
+ tjpColorTranslucent?: string;
34
+ /**
35
+ * contrasting color against tjp color
36
+ */
37
+ tjpColorContrast?: string;
38
+ /**
39
+ * If there was an error deriving the color info, this will show the error
40
+ * message.
41
+ */
42
+ errorMsg?: string;
43
+ }
44
+
45
+ /**
46
+ * hack. ibgib apps need to have access to global state that really should be
47
+ * tied to them alone (if we even should have global state in the first place).
48
+ *
49
+ * Most importantly, we need a metaspace, db name, and a store name.
50
+ *
51
+ * I'm just shoving it here because life is life.
52
+ *
53
+ * ## how to use
54
+ *
55
+ * Going to shove this in globalThis.ibgib, but other web apps may want to just
56
+ * descend from this and store it in their own places, e.g.,
57
+ * `globalThis.ibgib.myApp`
58
+ */
59
+ export interface IbGibGlobalThisInfo {
60
+ /**
61
+ * @see {@link IbGibGlobalThisInfo}
62
+ */
63
+ metaspace?: MetaspaceService;
64
+ /**
65
+ * @see {@link IbGibGlobalThisInfo}
66
+ */
67
+ dbName_hack: string;
68
+ /**
69
+ * @see {@link IbGibGlobalThisInfo}
70
+ */
71
+ storeName_hack: string;
72
+ /**
73
+ * @see {@link IbGibGlobalThisInfo}
74
+ */
75
+ apiKeyName_hack: string;
76
+ }
package/src/types.web.mts CHANGED
@@ -1,42 +1,9 @@
1
- import { Gib } from "@ibgib/ts-gib/dist/types.mjs";
2
- import { GibInfo } from "@ibgib/ts-gib/dist/V1/types.mjs";
1
+ import { IbGibGlobalThisInfo } from "./types.mjs";
3
2
 
4
3
  /**
5
- * deterministically driven colors based on a given {@link gib}
4
+ * @see {@link IbGibGlobalThisInfo}
6
5
  */
7
- export interface GibColorInfo {
8
- /**
9
- * Gib that was used to drive the color calculation
10
- */
11
- gib: Gib;
12
- gibInfo: GibInfo;
13
- /**
14
- * Color that corresponds to the punctiliar part of {@link gib}
15
- */
16
- punctiliarColor: string;
17
- /**
18
- * Translucent version of {@link punctiliarColor}
19
- */
20
- punctiliarColorTranslucent: string;
21
- /**
22
- * contrasting color against punctiliar color
23
- */
24
- punctiliarColorContrast: string;
25
- /**
26
- * Color that corresponds to the tjp (timeline) part of {@link gib}
27
- */
28
- tjpColor?: string;
29
- /**
30
- * Translucent version of {@link tjpColor}
31
- */
32
- tjpColorTranslucent?: string;
33
- /**
34
- * contrasting color against tjp color
35
- */
36
- tjpColorContrast?: string;
37
- /**
38
- * If there was an error deriving the color info, this will show the error
39
- * message.
40
- */
41
- errorMsg?: string;
6
+ export interface IbGibGlobalThisInfo_Web extends IbGibGlobalThisInfo {
7
+ dbName: string;
8
+ storeName: string;
42
9
  }
@@ -34,7 +34,7 @@ import { getAllFunctionInfos, } from '../../api/api-index.mjs';
34
34
  import { FUNCTION_INFO_REL8N_NAME, FunctionInfoIbGib_V1, createFunctionInfoIbGib } from './function-info/function-info-one-file.mjs';
35
35
  import { GeminiModel } from './gemini/gemini-constants.mjs';
36
36
  import { PromptAPIResult_Gemini } from './gemini/gemini-types.mjs';
37
- import { getGlobalMetaspace_waitIfNeeded } from '../../helpers.web.mjs';
37
+ import { getGlobalMetaspace_waitIfNeeded } from '../../helpers.mjs';
38
38
  import { updateAgentIndex } from './agent-helpers.mjs';
39
39
  import { getAgentsSvc } from './agents-service-v1.mjs';
40
40
  import { LiveProxyIbGib } from '../live-proxy-ibgib/live-proxy-ibgib-one-file.mjs';
@@ -12,7 +12,7 @@ import { toDto } from "@ibgib/core-gib/dist/common/other/ibgib-helper.mjs";
12
12
  import { updateSpecialIndex } from "@ibgib/core-gib/dist/timeline/timeline-api.mjs";
13
13
 
14
14
  import { GLOBAL_LOG_A_LOT, HARDCODED_PROMPT_TAG_TEXT } from "../../constants.mjs";
15
- import { getGlobalMetaspace_waitIfNeeded } from "../../helpers.web.mjs";
15
+ import { getGlobalMetaspace_waitIfNeeded } from "../../helpers.mjs";
16
16
  import { getAgents, getConcreteAgentFactory, getTag_Agents } from "./agent-helpers.mjs";
17
17
  import { AddTextInfo, AgentWitnessAny, AgentWitnessData_V1, AgentWitnessIbGib_V1, getAgentIb, parseAgentIb, taggifyForPrompt } from "./agent-one-file.mjs";
18
18
  import { AgentDtoToWitnessFunction, CreateNewAgentArg, CreateNewAgentResult } from "./agent-types.mjs";
@@ -2,19 +2,19 @@ import { extractErrorMsg, pretty } from "@ibgib/helper-gib/dist/helpers/utils-he
2
2
  import { Ib, IbGibAddr } from "@ibgib/ts-gib/dist/types.mjs";
3
3
  import { IbGib_V1, IbGibRel8ns_V1 } from "@ibgib/ts-gib/dist/V1/types.mjs";
4
4
  import { GIB, IB, ROOT } from "@ibgib/ts-gib/dist/V1/constants.mjs";
5
+ import { Factory_V1 } from "@ibgib/ts-gib/dist/V1/factory.mjs";
5
6
  import { WitnessWithContextBase_V1 } from "@ibgib/core-gib/dist/witness/witness-with-context/witness-with-context-base-v1.mjs";
6
7
  import { IbGibTimelineUpdateInfo } from "@ibgib/core-gib/dist/common/other/other-types.mjs";
7
8
  import { ObservableWitness, } from "@ibgib/core-gib/dist/common/pubsub/observable/observable-types.mjs";
8
9
  import { newupSubject } from "@ibgib/core-gib/dist/common/pubsub/subject/subject-helper.mjs";
9
10
  import { SubjectWitness } from "@ibgib/core-gib/dist/common/pubsub/subject/subject-types.mjs";
10
-
11
- import { GLOBAL_LOG_A_LOT } from "../../constants.mjs";
12
11
  import { WitnessWithContextData_V1, WitnessWithContextRel8ns_V1 } from "@ibgib/core-gib/dist/witness/witness-with-context/witness-with-context-types.mjs";
13
12
  import { IbGibSpaceAny } from "@ibgib/core-gib/dist/witness/space/space-base-v1.mjs";
14
- import { getGlobalMetaspace_waitIfNeeded } from "../../helpers.web.mjs";
15
13
  import { isSpaceIb } from "@ibgib/core-gib/dist/witness/space/space-helper.mjs";
16
14
  import { SpaceId } from "@ibgib/core-gib/dist/witness/space/space-types.mjs";
17
- import { Factory_V1 } from "@ibgib/ts-gib/dist/V1/factory.mjs";
15
+
16
+ import { GLOBAL_LOG_A_LOT } from "../../constants.mjs";
17
+ import { getGlobalMetaspace_waitIfNeeded } from "../../helpers.mjs";
18
18
 
19
19
  const logalot = GLOBAL_LOG_A_LOT;
20
20