@ibgib/web-gib 0.0.36 → 0.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -1
- package/README.md +116 -0
- package/dist/AUTO-GENERATED-version.d.mts +1 -1
- package/dist/AUTO-GENERATED-version.mjs +1 -1
- package/dist/api/commands/ui/ui-index.mjs +2 -2
- package/dist/api/commands/ui/ui-index.mjs.map +1 -1
- package/dist/api/commands/ui/update-css-variables.d.mts +13 -1
- package/dist/api/commands/ui/update-css-variables.d.mts.map +1 -1
- package/dist/api/commands/ui/update-css-variables.mjs +46 -36
- package/dist/api/commands/ui/update-css-variables.mjs.map +1 -1
- package/dist/app-bootstrap/types.d.mts +20 -0
- package/dist/app-bootstrap/types.d.mts.map +1 -1
- package/dist/identity/identity-constants.d.mts +72 -0
- package/dist/identity/identity-constants.d.mts.map +1 -0
- package/dist/identity/identity-constants.mjs +94 -0
- package/dist/identity/identity-constants.mjs.map +1 -0
- package/dist/identity/identity-types.d.mts +214 -0
- package/dist/identity/identity-types.d.mts.map +1 -0
- package/dist/identity/identity-types.mjs +17 -0
- package/dist/identity/identity-types.mjs.map +1 -0
- package/dist/ui/ui-helpers.d.mts +31 -0
- package/dist/ui/ui-helpers.d.mts.map +1 -1
- package/dist/ui/ui-helpers.mjs +50 -1
- package/dist/ui/ui-helpers.mjs.map +1 -1
- package/package.json +5 -26
- package/src/AUTO-GENERATED-version.mts +1 -1
- package/src/api/commands/ui/ui-index.mts +2 -2
- package/src/api/commands/ui/update-css-variables.mts +53 -35
- package/src/app-bootstrap/types.mts +25 -0
- package/src/identity/identity-constants.mts +107 -0
- package/src/identity/identity-types.mts +250 -0
- package/src/ui/ui-helpers.mts +57 -1
- package/tools/auto-generated-agent-skills/skills/ibgib-create-app-core/SKILL.md +11 -10
- package/tools/auto-generated-agent-skills/skills/ibgib-create-app-core/templates/constants.mts.template +1 -1
- package/tools/auto-generated-agent-skills/skills/ibgib-create-app-core/templates/helpers.web.mts.template +3 -3
- package/tools/auto-generated-agent-skills/skills/ibgib-create-app-core/templates/index.html.template +1 -0
- package/tools/auto-generated-agent-skills/skills/ibgib-create-app-core/templates/index.mts.template +1 -1
- package/tools/auto-generated-agent-skills/skills/ibgib-create-app-core/templates/script.mts.template +17 -0
- package/tools/auto-generated-agent-skills/skills/ibgib-create-app-core/templates/types.mts.template +1 -115
- package/tools/auto-generated-agent-skills/skills/ibgib-create-app-witness/templates/witness/app/app-v1.mts.template +1 -1
- package/tools/auto-generated-agent-skills/skills/ibgib-create-app-witness/templates/witness/app/helper.mts.template +1 -1
- package/tools/auto-generated-agent-skills/skills/ibgib-create-shell/SKILL.md +8 -2
- package/.vscode/ibgib-snippets.code-snippets +0 -309
- package/.vscode/launch.json +0 -25
- package/.vscode/settings.json +0 -68
- package/.vscode/tasks.json +0 -38
package/CHANGELOG.md
CHANGED
|
@@ -3,13 +3,24 @@
|
|
|
3
3
|
_note: as you implement features/fixes/etc., please document them here under the "Working Version" section. These will be moved to a concrete version number during the next publish._
|
|
4
4
|
|
|
5
5
|
## Working Version
|
|
6
|
+
|
|
7
|
+
## 0.0.37-42
|
|
8
|
+
* chore: centralized build orchestration
|
|
9
|
+
* migrated build, clean, and test logic to the root `@ibgib/build-gib` orchestrator.
|
|
10
|
+
* pruned legacy `package.json` scripts and archived them in `docs/ARCHIVE_SCRIPTS.md`.
|
|
11
|
+
* updated `prepare:publish` to use the centralized build engine.
|
|
12
|
+
* documented the new **Monorepo Build Policy** in the README.
|
|
6
13
|
* progress: genai package dep testing chain build
|
|
7
14
|
* the package.json file no longer had a direct ref to @google/genai
|
|
8
15
|
or a dev dependency to node types. I'm trying to troubleshoot this by
|
|
9
16
|
adding back genai to package.json and doing a chain publish from web-gib.
|
|
10
17
|
I want to see if that chain publish is removing deps or if this happened
|
|
11
18
|
previously when we streamlined the monorepo.
|
|
19
|
+
* meta: architecture and agent skill modernization
|
|
20
|
+
* updated `README.md` to document the new 8-file foundational bootstrap architecture.
|
|
21
|
+
* modernized `ibgib-create-app-core` and `ibgib-create-shell` agent skills to support the new `script.mts` pattern.
|
|
22
|
+
* established the three-phase bootstrap standard (`script.mts` -> `index.mts` -> `bootstrap.mts`).
|
|
12
23
|
|
|
13
|
-
## 0.0.
|
|
24
|
+
## 0.0.36
|
|
14
25
|
* working on pulling out common app code from blank-gib into this lib
|
|
15
26
|
for use among multiple apps.
|
package/README.md
CHANGED
|
@@ -4,6 +4,19 @@
|
|
|
4
4
|
|
|
5
5
|
This library enables ibgib apps with...
|
|
6
6
|
|
|
7
|
+
## Build (Monorepo Policy)
|
|
8
|
+
|
|
9
|
+
> [!IMPORTANT]
|
|
10
|
+
> This project is part of a monorepo. Build and development tasks are centralized in the monorepo root via the `@ibgib/build-gib` orchestrator.
|
|
11
|
+
|
|
12
|
+
### Development & Build
|
|
13
|
+
Run these from the monorepo root:
|
|
14
|
+
* `npm run build:web-gib` - Performs a full clean and build.
|
|
15
|
+
* `npm run test:web-gib` - Runs the full respec-gib test suite for this library.
|
|
16
|
+
|
|
17
|
+
### Legacy Scripts
|
|
18
|
+
Individual package scripts have been streamlined to avoid redundancy. Previous scripts are archived in `docs/ARCHIVE_SCRIPTS.md` at the monorepo root.
|
|
19
|
+
|
|
7
20
|
* initializing the ibgib environment
|
|
8
21
|
* bootstrapping the metaspace
|
|
9
22
|
* utilizing and interacting with IndexedDB
|
|
@@ -64,6 +77,109 @@ Or for the direct script approach:
|
|
|
64
77
|
}
|
|
65
78
|
```
|
|
66
79
|
|
|
80
|
+
## Bootstrapping an IbGib App
|
|
81
|
+
|
|
82
|
+
`@ibgib/web-gib` provides a streamlined, multi-phase bootstrap process that minimizes boilerplate while maximizing performance. A standard ibgib application consists of **8 foundational files**:
|
|
83
|
+
|
|
84
|
+
1. `index.html`: The entry point with script tags for `script.mjs` and `index.mjs`.
|
|
85
|
+
2. `script.mts`: **Phase 1**. Immediate UI Shell initialization (e.g., burger menus).
|
|
86
|
+
3. `index.mts`: **Phase 2**. Storage (IndexedDB) and Engine orchestration.
|
|
87
|
+
4. `bootstrap.mts`: **Phase 3**. The heavy ibgib engine and App witness loading.
|
|
88
|
+
5. `constants.mts`: App-specific configuration and UUIDs.
|
|
89
|
+
6. `types.mts`: App-specific global state typing.
|
|
90
|
+
7. `helpers.web.mts`: Environment-aware initialization utilities.
|
|
91
|
+
8. `style.css`: Core application styling.
|
|
92
|
+
|
|
93
|
+
### Phase 1: Immediate Shell Interactivity (`script.mts`)
|
|
94
|
+
|
|
95
|
+
To ensure the UI is responsive immediately, the Shell is initialized in a dedicated entry point. This script runs as soon as the HTML is parsed.
|
|
96
|
+
|
|
97
|
+
```typescript
|
|
98
|
+
import { getMyAppShellSvc } from "./ui/shell/my-app-shell-service.mjs";
|
|
99
|
+
|
|
100
|
+
// Early init of UI Shell logic so the burger menu responds immediately.
|
|
101
|
+
getMyAppShellSvc();
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Phase 2: Environment Orchestration (`index.mts`)
|
|
105
|
+
|
|
106
|
+
The `index.mts` file handles the asynchronous setup of storage and triggers the dynamic loading of the heavy ibgib engine.
|
|
107
|
+
|
|
108
|
+
In your app's entry point (`index.mts`), you should initialize the global namespace immediately, then "spin off" the storage and bootstrap loading to avoid blocking the initial DOM paint.
|
|
109
|
+
|
|
110
|
+
```typescript
|
|
111
|
+
import {
|
|
112
|
+
initIbGibStorage,
|
|
113
|
+
initIbGibGlobalThis,
|
|
114
|
+
dynamicallyLoadBootstrapScript
|
|
115
|
+
} from '@ibgib/web-gib/dist/app-bootstrap/init-orchestration.mjs';
|
|
116
|
+
|
|
117
|
+
import { APP_CONFIG } from './constants.mjs';
|
|
118
|
+
import { simpleIbGibRouterSingleton as router } from './ui/router/router-one-file.mjs';
|
|
119
|
+
|
|
120
|
+
// 1. Initialize global namespace immediately
|
|
121
|
+
initIbGibGlobalThis(APP_CONFIG, 'my_app_key');
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* spin off to avoid forestalling the DOMContentLoaded from firing
|
|
125
|
+
*/
|
|
126
|
+
async function spinOffStartup(): Promise<void> {
|
|
127
|
+
document.addEventListener('DOMContentLoaded', async () => {
|
|
128
|
+
// 2. Prepare storage (IndexedDB)
|
|
129
|
+
await initIbGibStorage(APP_CONFIG);
|
|
130
|
+
|
|
131
|
+
// 3. Initialize Router
|
|
132
|
+
router.loadCurrentURLPath();
|
|
133
|
+
|
|
134
|
+
// 4. Defer loading the heavy engine
|
|
135
|
+
await dynamicallyLoadBootstrapScript('./bootstrap.mjs', 'bootstrapMyApp');
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
spinOffStartup();
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Phase 2: Dynamic Engine Bootstrap (`bootstrap.mts`)
|
|
143
|
+
|
|
144
|
+
The `bootstrap.mts` file is loaded dynamically. It handles the initialization of the metaspace, identity, and the application witness using a rich set of lifecycle hooks.
|
|
145
|
+
|
|
146
|
+
```typescript
|
|
147
|
+
import { bootstrapIbGibApp } from '@ibgib/web-gib/dist/app-bootstrap/bootstrap.mjs';
|
|
148
|
+
import { getIbGibGlobalThis_IbGibApp } from '@ibgib/web-gib/dist/app-bootstrap/init-orchestration.mjs';
|
|
149
|
+
|
|
150
|
+
import {
|
|
151
|
+
APP_CONFIG,
|
|
152
|
+
TAG_AGENT_TEXT, TAG_AGENT_ICON, TAG_AGENT_DESCRIPTION,
|
|
153
|
+
MY_APP_SPACE_PREFIX
|
|
154
|
+
} from './constants.mjs';
|
|
155
|
+
import { MyAppApp_V1 } from './witness/app/my-app-app-v1.mjs';
|
|
156
|
+
import { PARAM_INFOS } from './witness/app/my-app-constants.mjs';
|
|
157
|
+
import { DEFAULT_MY_APP_DATA_V1 } from './witness/app/my-app-types.mjs';
|
|
158
|
+
import { registerAgentFunctionInfos } from './api/function-infos.web.mjs';
|
|
159
|
+
|
|
160
|
+
export async function bootstrapMyApp() {
|
|
161
|
+
await bootstrapIbGibApp({
|
|
162
|
+
config: APP_CONFIG,
|
|
163
|
+
// Bridge function that provides the typed globalThis for your app
|
|
164
|
+
getGlobalThis: (config) => getIbGibGlobalThis_IbGibApp('my_app_key', config),
|
|
165
|
+
AppClass: MyAppApp_V1,
|
|
166
|
+
defaultAppData: DEFAULT_MY_APP_DATA_V1,
|
|
167
|
+
paramInfos: PARAM_INFOS,
|
|
168
|
+
// Lifecycle hooks
|
|
169
|
+
registerAgentFunctionInfos,
|
|
170
|
+
ensureTags: [
|
|
171
|
+
{ text: TAG_AGENT_TEXT, icon: TAG_AGENT_ICON, description: TAG_AGENT_DESCRIPTION }
|
|
172
|
+
],
|
|
173
|
+
localSpaceNamePrefix: MY_APP_SPACE_PREFIX,
|
|
174
|
+
onReady: async (app) => {
|
|
175
|
+
console.log('Engine ready!');
|
|
176
|
+
// Initialize your UI shell service here
|
|
177
|
+
// getAppShellSvc().onEngineReady();
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
67
183
|
## UI Architecture: Custom @ibgib component framework
|
|
68
184
|
|
|
69
185
|
**tl;dr**: _Web Component-based components react to ibgib's unique Merkle DAG DLT time-centric data model._
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { updateCSSVariablesFunctionInfo } from './update-css-variables.mjs';
|
|
1
|
+
// import { updateCSSVariablesFunctionInfo } from './update-css-variables.mjs';
|
|
2
2
|
export const UIAgentFunctionInfos = [
|
|
3
|
-
|
|
3
|
+
// updateCSSVariablesFunctionInfo,
|
|
4
4
|
];
|
|
5
5
|
//# sourceMappingURL=ui-index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-index.mjs","sourceRoot":"","sources":["../../../../src/api/commands/ui/ui-index.mts"],"names":[],"mappings":"AACA
|
|
1
|
+
{"version":3,"file":"ui-index.mjs","sourceRoot":"","sources":["../../../../src/api/commands/ui/ui-index.mts"],"names":[],"mappings":"AACA,+EAA+E;AAE/E,MAAM,CAAC,MAAM,oBAAoB,GAA2B;AACxD,kCAAkC;CACrC,CAAC"}
|
|
@@ -41,8 +41,20 @@ export interface UpdateCSSVariablesCommandData extends CommandDataBase<typeof CM
|
|
|
41
41
|
*/
|
|
42
42
|
declare function updateCSSVariablesViaCmd(opts: UpdateCSSVariablesOpts): Promise<void>;
|
|
43
43
|
/**
|
|
44
|
-
* API function info for the updateCSSVariables
|
|
44
|
+
* Factory function to get an API function info for the updateCSSVariables
|
|
45
|
+
* command. This enables an agent to update the {@link cssVariables} to create
|
|
46
|
+
* dynamic themes, which in turn enables users to use natural language to change
|
|
47
|
+
* the theme.
|
|
48
|
+
*
|
|
49
|
+
* initially this was just {@link VALID_CSS_VARIABLES}, but we have changed
|
|
50
|
+
* this to be a dynamic factory function driven by this {@link cssVariables}.
|
|
45
51
|
*/
|
|
52
|
+
export declare function getFunctionInfo_updateCSSVariablesFunctionInfo({ cssVariables, }: {
|
|
53
|
+
/**
|
|
54
|
+
* list of variables that the agent has access to change.
|
|
55
|
+
*/
|
|
56
|
+
cssVariables: string[];
|
|
57
|
+
}): APIFunctionInfo<typeof updateCSSVariablesViaCmd>;
|
|
46
58
|
export declare const updateCSSVariablesFunctionInfo: APIFunctionInfo<typeof updateCSSVariablesViaCmd>;
|
|
47
59
|
export {};
|
|
48
60
|
//# sourceMappingURL=update-css-variables.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-css-variables.d.mts","sourceRoot":"","sources":["../../../../src/api/commands/ui/update-css-variables.mts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAgBvD;;GAEG;AACH,QAAA,MAAM,YAAY,OAAO,CAAC;AAE1B;;GAEG;AACH,QAAA,MAAM,aAAa,EAAE,MAAM,EAAoB,CAAC;AAiChD;;;GAGG;AACH,MAAM,WAAW,sBACb,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I,CAAC,CAa7E;AA6CD;;;;;;;;GAQG;AACH,wBAAgB,8CAA8C,CAAC,EAC3D,YAAY,GACf,EAAE;IACC;;OAEG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;CAC1B,GAAG,eAAe,CAAC,OAAO,wBAAwB,CAAC,CAgCnD;AAED,eAAO,MAAM,8BAA8B,kDAEzC,CAAC"}
|
|
@@ -3,9 +3,8 @@ import { GLOBAL_LOG_A_LOT } from "../../../constants.mjs";
|
|
|
3
3
|
import { COMMAND_BASE_SCHEMA_PROPERTIES } from "../command-constants.mjs";
|
|
4
4
|
import { getCommandService } from "../command-service-v1.mjs";
|
|
5
5
|
import { FUNCTION_CALL_EXAMPLES_HEADER } from "../../api-constants.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { getExistingUIInfo } from "../../../ui/ui-helpers.mjs";
|
|
6
|
+
import { VALID_CSS_VARIABLES } from "../../../ui/ui-constants.mjs";
|
|
7
|
+
import { getExistingUIInfo, putUIInfoInStore } from "../../../ui/ui-helpers.mjs";
|
|
9
8
|
import { getGlobalDbName, getGlobalStoreName } from "../../../helpers.web.mjs";
|
|
10
9
|
const logalot = GLOBAL_LOG_A_LOT;
|
|
11
10
|
// #region constants
|
|
@@ -84,7 +83,7 @@ async function updateCSSVariablesImpl(opts) {
|
|
|
84
83
|
}
|
|
85
84
|
// update the theme in the options
|
|
86
85
|
const dbName = getGlobalDbName();
|
|
87
|
-
const storeName =
|
|
86
|
+
const storeName = getGlobalStoreName();
|
|
88
87
|
const existingUIInfo = await getExistingUIInfo({ dbName, storeName }) ?? { cssVariableOverrides: {}, };
|
|
89
88
|
const newUIInfo = {
|
|
90
89
|
...existingUIInfo,
|
|
@@ -93,11 +92,10 @@ async function updateCSSVariablesImpl(opts) {
|
|
|
93
92
|
...opts.cssVariables,
|
|
94
93
|
},
|
|
95
94
|
};
|
|
96
|
-
await
|
|
95
|
+
await putUIInfoInStore({
|
|
97
96
|
dbName,
|
|
98
|
-
storeName
|
|
99
|
-
|
|
100
|
-
value: JSON.stringify(newUIInfo),
|
|
97
|
+
storeName,
|
|
98
|
+
newUIInfo,
|
|
101
99
|
});
|
|
102
100
|
}
|
|
103
101
|
catch (error) {
|
|
@@ -111,35 +109,47 @@ async function updateCSSVariablesImpl(opts) {
|
|
|
111
109
|
}
|
|
112
110
|
}
|
|
113
111
|
/**
|
|
114
|
-
* API function info for the updateCSSVariables
|
|
112
|
+
* Factory function to get an API function info for the updateCSSVariables
|
|
113
|
+
* command. This enables an agent to update the {@link cssVariables} to create
|
|
114
|
+
* dynamic themes, which in turn enables users to use natural language to change
|
|
115
|
+
* the theme.
|
|
116
|
+
*
|
|
117
|
+
* initially this was just {@link VALID_CSS_VARIABLES}, but we have changed
|
|
118
|
+
* this to be a dynamic factory function driven by this {@link cssVariables}.
|
|
115
119
|
*/
|
|
116
|
-
export
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
varName
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
120
|
+
export function getFunctionInfo_updateCSSVariablesFunctionInfo({ cssVariables, }) {
|
|
121
|
+
return {
|
|
122
|
+
nameOrId: FUNCTION_NAME,
|
|
123
|
+
fnViaCmd: updateCSSVariablesViaCmd,
|
|
124
|
+
functionImpl: updateCSSVariablesImpl,
|
|
125
|
+
cmd: CMD_CATEGORY,
|
|
126
|
+
cmdModifiers: CMD_MODIFIERS,
|
|
127
|
+
schema: {
|
|
128
|
+
name: FUNCTION_NAME,
|
|
129
|
+
description: FUNCTION_DESCRIPTION,
|
|
130
|
+
parameters: {
|
|
131
|
+
type: 'object',
|
|
132
|
+
properties: {
|
|
133
|
+
...COMMAND_BASE_SCHEMA_PROPERTIES,
|
|
134
|
+
cssVariables: {
|
|
135
|
+
type: 'object',
|
|
136
|
+
description: 'CSS variables to update when theming or otherwise changing these visual aspects of the web app per user preferences or the user directly asking for it. (atow there are no preferences saved or anything, so this is just user-driven if they ask for it.)',
|
|
137
|
+
properties: Object.fromEntries(cssVariables.map(varName => [
|
|
138
|
+
varName,
|
|
139
|
+
{
|
|
140
|
+
type: 'string',
|
|
141
|
+
description: `configurable css variable`,
|
|
142
|
+
},
|
|
143
|
+
])),
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
required: ['cssVariables'],
|
|
140
147
|
},
|
|
141
|
-
required: ['cssVariables'],
|
|
142
148
|
},
|
|
143
|
-
}
|
|
144
|
-
}
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
;
|
|
152
|
+
export const updateCSSVariablesFunctionInfo = getFunctionInfo_updateCSSVariablesFunctionInfo({
|
|
153
|
+
cssVariables: VALID_CSS_VARIABLES,
|
|
154
|
+
});
|
|
145
155
|
//# sourceMappingURL=update-css-variables.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-css-variables.mjs","sourceRoot":"","sources":["../../../../src/api/commands/ui/update-css-variables.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,iDAAiD,CAAC;AAE1F,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,
|
|
1
|
+
{"version":3,"file":"update-css-variables.mjs","sourceRoot":"","sources":["../../../../src/api/commands/ui/update-css-variables.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,iD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QAAQ,EAAE,CAAC,cAAc,CAAC;aAC7B;SACJ;KACJ,CAAC;AACN,CAAC;AAAA,CAAC;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAG,8CAA8C,CAAC;IACzF,YAAY,EAAE,mBAAmB;CACpC,CAAC,CAAC"}
|
|
@@ -97,6 +97,21 @@ export interface IbGibIdentityContext {
|
|
|
97
97
|
*/
|
|
98
98
|
data?: Record<string, any>;
|
|
99
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* Minimal interface for an application's UI Shell.
|
|
102
|
+
*
|
|
103
|
+
* ## design notes
|
|
104
|
+
*
|
|
105
|
+
* This is intentionally minimal to avoid coupling the bootstrap engine to a
|
|
106
|
+
* specific UI design (header, panels, etc.).
|
|
107
|
+
*/
|
|
108
|
+
export interface IbGibAppShell {
|
|
109
|
+
/**
|
|
110
|
+
* Hook called by the bootstrap engine when the ibGib engine and metaspace
|
|
111
|
+
* are fully initialized and ready for interaction.
|
|
112
|
+
*/
|
|
113
|
+
onEngineReady(): void;
|
|
114
|
+
}
|
|
100
115
|
/**
|
|
101
116
|
* Layer 1: Fields shared across ALL ibgib web apps.
|
|
102
117
|
*
|
|
@@ -133,6 +148,11 @@ export interface IbGibGlobalThis_Common extends IbGibGlobalThisInfo {
|
|
|
133
148
|
export interface IbGibGlobalThis_IbGibApp extends IbGibGlobalThis_Common {
|
|
134
149
|
/** Semver string generated at build time. */
|
|
135
150
|
version?: string;
|
|
151
|
+
/**
|
|
152
|
+
* The application's UI Shell service.
|
|
153
|
+
* Initialized by the consumer and registered on the globalThis.
|
|
154
|
+
*/
|
|
155
|
+
shell?: IbGibAppShell;
|
|
136
156
|
/** Per-space RCLI pathing shim. */
|
|
137
157
|
spaceShim: {
|
|
138
158
|
[spaceId: string]: SpaceShimGlobalInfo;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../../src/app-bootstrap/types.mts"],"names":[],"mappings":"AAAA;;;;;;;;;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ASG;AACH,MAAM,WAAW,wBAAyB,SAAQ,sBAAsB;IACpE,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,mCAAmC;IACnC,SAAS,EAAE;QAAE,CAAC,OAAO,EAAE,MAAM,GAAG,mBAAmB,CAAA;KAAE,CAAC;IACtD,4DAA4D;IAC5D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,kBAAkB,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1C,qEAAqE;IACrE,mBAAmB,CAAC,EAAE,QAAQ,CAAC;IAC/B,kFAAkF;IAClF,wBAAwB,CAAC,EAAE,cAAc,CAAC;IAC1C;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;CAC1C"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file identity-constants.mts
|
|
3
|
+
* @description Constants for the ibgib identity layer: pool IDs, verbs, KDF salts,
|
|
4
|
+
* IndexedDB store names, and default pool configuration presets.
|
|
5
|
+
*
|
|
6
|
+
* @see docs/identity/KEYSTONES.md
|
|
7
|
+
* @see docs/identity/TODO.md#02-identity-constants--verbs
|
|
8
|
+
*/
|
|
9
|
+
/** Evolve META: add a LOCAL keystone to the trusted list. */
|
|
10
|
+
export declare const IDENTITY_VERB_ADD_DEVICE = "identity-add-device";
|
|
11
|
+
/** Evolve META: remove a LOCAL keystone from the trusted list. */
|
|
12
|
+
export declare const IDENTITY_VERB_REMOVE_DEVICE = "identity-remove-device";
|
|
13
|
+
/** Evolve META: transfer custodianship (custodial → sovereign). */
|
|
14
|
+
export declare const IDENTITY_VERB_CUSTODY_TRANSFER = "identity-custody-transfer";
|
|
15
|
+
/** Evolve LOCAL: register a new APP-LOCAL keystone. */
|
|
16
|
+
export declare const IDENTITY_VERB_ADD_APP = "identity-add-app";
|
|
17
|
+
/** Evolve LOCAL: deregister an APP-LOCAL keystone. */
|
|
18
|
+
export declare const IDENTITY_VERB_REMOVE_APP = "identity-remove-app";
|
|
19
|
+
/** Evolve APP-LOCAL: establish a SESSION keystone genesis. */
|
|
20
|
+
export declare const IDENTITY_VERB_ESTABLISH_SESSION = "identity-establish-session";
|
|
21
|
+
/** Evolve APP-LOCAL: authorize an app-level action. */
|
|
22
|
+
export declare const IDENTITY_VERB_AUTHORIZE = "identity-authorize";
|
|
23
|
+
/**
|
|
24
|
+
* Evolve APP-LOCAL (final frame of old epoch): transition to a new epoch keystone.
|
|
25
|
+
* Uses `consume` replenish strategy — self-contained, no parent evolution needed.
|
|
26
|
+
* @see docs/identity/PARADIGM.md#epoch-rotation-handling-keystone-growth
|
|
27
|
+
*/
|
|
28
|
+
export declare const IDENTITY_VERB_EPOCH_TRANSITION = "identity-epoch-transition";
|
|
29
|
+
/** META keystone: structural changes (add/remove device). */
|
|
30
|
+
export declare const IDENTITY_POOL_ID_ADD_DEVICE = "identity-add-device";
|
|
31
|
+
/** META keystone: structural changes (remove device). Separate pool allows tighter policy. */
|
|
32
|
+
export declare const IDENTITY_POOL_ID_REMOVE_DEVICE = "identity-remove-device";
|
|
33
|
+
/** META keystone: custody transfer (consume strategy — limited uses). */
|
|
34
|
+
export declare const IDENTITY_POOL_ID_CUSTODY_TRANSFER = "identity-custody-transfer";
|
|
35
|
+
/** LOCAL keystone: register/deregister app-local keystones. */
|
|
36
|
+
export declare const IDENTITY_POOL_ID_ADD_APP = "identity-add-app";
|
|
37
|
+
/** LOCAL keystone: deregister app-local keystones. */
|
|
38
|
+
export declare const IDENTITY_POOL_ID_REMOVE_APP = "identity-remove-app";
|
|
39
|
+
/** APP-LOCAL keystone: establish session keystones. */
|
|
40
|
+
export declare const IDENTITY_POOL_ID_APP_SESSION = "identity-app-session";
|
|
41
|
+
/** APP-LOCAL keystone: general app-level authorization. */
|
|
42
|
+
export declare const IDENTITY_POOL_ID_APP_AUTHORIZE = "identity-app-authorize";
|
|
43
|
+
/**
|
|
44
|
+
* APP-LOCAL keystone: epoch transition pool.
|
|
45
|
+
* Strategy: consume — self-authenticates epoch rotation without parent evolution.
|
|
46
|
+
*/
|
|
47
|
+
export declare const IDENTITY_POOL_ID_APP_EPOCH = "identity-app-epoch";
|
|
48
|
+
export declare const IDENTITY_KDF_SALT_META = "ibgib-identity-meta-v1";
|
|
49
|
+
export declare const IDENTITY_KDF_SALT_LOCAL = "ibgib-identity-local-v1";
|
|
50
|
+
/**
|
|
51
|
+
* APP-LOCAL salt base. Full derivation:
|
|
52
|
+
* `KDF(MasterSecret_local, IDENTITY_KDF_SALT_APP_LOCAL + appId + deviceSalt)`
|
|
53
|
+
*/
|
|
54
|
+
export declare const IDENTITY_KDF_SALT_APP_LOCAL = "ibgib-identity-app-local-v1";
|
|
55
|
+
export declare const IDENTITY_KDF_SALT_SESSION = "ibgib-identity-session-v1";
|
|
56
|
+
/** Stores `LocalIdentityContext` — one record per browser profile. */
|
|
57
|
+
export declare const IDENTITY_IDB_STORE_LOCAL_CONTEXT = "identity-local-context";
|
|
58
|
+
/** Stores `AppLocalIdentityContext` — one record per appId per browser profile. */
|
|
59
|
+
export declare const IDENTITY_IDB_STORE_APP_LOCAL_CONTEXT = "identity-app-local-context";
|
|
60
|
+
/** Cached META keystone chain — periodically refreshed from identity service. */
|
|
61
|
+
export declare const IDENTITY_IDB_STORE_META_CACHE = "identity-meta-cache";
|
|
62
|
+
/** LOCAL keystone frames — genesis through current tip. */
|
|
63
|
+
export declare const IDENTITY_IDB_STORE_LOCAL_CHAIN = "identity-local-chain";
|
|
64
|
+
/** APP-LOCAL keystone frames — current epoch genesis through tip. */
|
|
65
|
+
export declare const IDENTITY_IDB_STORE_APP_LOCAL_CHAIN = "identity-app-local-chain";
|
|
66
|
+
/** Default max age for cached META chain for routine verification. */
|
|
67
|
+
export declare const IDENTITY_META_CACHE_TTL_NORMAL_MS: number;
|
|
68
|
+
/** For session establishment: always fetch fresh. */
|
|
69
|
+
export declare const IDENTITY_META_CACHE_TTL_SESSION_MS = 0;
|
|
70
|
+
/** For offline operation: no TTL (accept whatever is cached). */
|
|
71
|
+
export declare const IDENTITY_META_CACHE_TTL_OFFLINE_MS: number;
|
|
72
|
+
//# sourceMappingURL=identity-constants.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity-constants.d.mts","sourceRoot":"","sources":["../../src/identity/identity-constants.mts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAQH,6DAA6D;AAC7D,eAAO,MAAM,wBAAwB,wBAAwB,CAAC;AAC9D,kEAAkE;AAClE,eAAO,MAAM,2BAA2B,2BAA2B,CAAC;AACpE,mEAAmE;AACnE,eAAO,MAAM,8BAA8B,8BAA8B,CAAC;AAE1E,uDAAuD;AACvD,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AACxD,sDAAsD;AACtD,eAAO,MAAM,wBAAwB,wBAAwB,CAAC;AAE9D,8DAA8D;AAC9D,eAAO,MAAM,+BAA+B,+BAA+B,CAAC;AAC5E,uDAAuD;AACvD,eAAO,MAAM,uBAAuB,uBAAuB,CAAC;AAC5D;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,8BAA8B,CAAC;AAO1E,6DAA6D;AAC7D,eAAO,MAAM,2BAA2B,wBAAwB,CAAC;AACjE,8FAA8F;AAC9F,eAAO,MAAM,8BAA8B,2BAA2B,CAAC;AACvE,yEAAyE;AACzE,eAAO,MAAM,iCAAiC,8BAA8B,CAAC;AAE7E,+DAA+D;AAC/D,eAAO,MAAM,wBAAwB,qBAAqB,CAAC;AAC3D,sDAAsD;AACtD,eAAO,MAAM,2BAA2B,wBAAwB,CAAC;AAEjE,uDAAuD;AACvD,eAAO,MAAM,4BAA4B,yBAAyB,CAAC;AACnE,2DAA2D;AAC3D,eAAO,MAAM,8BAA8B,2BAA2B,CAAC;AACvE;;;GAGG;AACH,eAAO,MAAM,0BAA0B,uBAAuB,CAAC;AAQ/D,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAC/D,eAAO,MAAM,uBAAuB,4BAA4B,CAAC;AACjE;;;GAGG;AACH,eAAO,MAAM,2BAA2B,gCAAgC,CAAC;AACzE,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;AAMrE,sEAAsE;AACtE,eAAO,MAAM,gCAAgC,2BAA2B,CAAC;AACzE,mFAAmF;AACnF,eAAO,MAAM,oCAAoC,+BAA+B,CAAC;AACjF,iFAAiF;AACjF,eAAO,MAAM,6BAA6B,wBAAwB,CAAC;AACnE,2DAA2D;AAC3D,eAAO,MAAM,8BAA8B,yBAAyB,CAAC;AACrE,qEAAqE;AACrE,eAAO,MAAM,kCAAkC,6BAA6B,CAAC;AAQ7E,sEAAsE;AACtE,eAAO,MAAM,iCAAiC,QAAiB,CAAC;AAChE,qDAAqD;AACrD,eAAO,MAAM,kCAAkC,IAAI,CAAC;AACpD,iEAAiE;AACjE,eAAO,MAAM,kCAAkC,QAAW,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file identity-constants.mts
|
|
3
|
+
* @description Constants for the ibgib identity layer: pool IDs, verbs, KDF salts,
|
|
4
|
+
* IndexedDB store names, and default pool configuration presets.
|
|
5
|
+
*
|
|
6
|
+
* @see docs/identity/KEYSTONES.md
|
|
7
|
+
* @see docs/identity/TODO.md#02-identity-constants--verbs
|
|
8
|
+
*/
|
|
9
|
+
// ===========================================================================
|
|
10
|
+
// IDENTITY VERBS
|
|
11
|
+
// These extend the base KeystoneVerb set with identity-tier-specific actions.
|
|
12
|
+
// Used as values in KeystoneClaim.verb and KeystonePoolConfig.allowedVerbs.
|
|
13
|
+
// ===========================================================================
|
|
14
|
+
/** Evolve META: add a LOCAL keystone to the trusted list. */
|
|
15
|
+
export const IDENTITY_VERB_ADD_DEVICE = 'identity-add-device';
|
|
16
|
+
/** Evolve META: remove a LOCAL keystone from the trusted list. */
|
|
17
|
+
export const IDENTITY_VERB_REMOVE_DEVICE = 'identity-remove-device';
|
|
18
|
+
/** Evolve META: transfer custodianship (custodial → sovereign). */
|
|
19
|
+
export const IDENTITY_VERB_CUSTODY_TRANSFER = 'identity-custody-transfer';
|
|
20
|
+
/** Evolve LOCAL: register a new APP-LOCAL keystone. */
|
|
21
|
+
export const IDENTITY_VERB_ADD_APP = 'identity-add-app';
|
|
22
|
+
/** Evolve LOCAL: deregister an APP-LOCAL keystone. */
|
|
23
|
+
export const IDENTITY_VERB_REMOVE_APP = 'identity-remove-app';
|
|
24
|
+
/** Evolve APP-LOCAL: establish a SESSION keystone genesis. */
|
|
25
|
+
export const IDENTITY_VERB_ESTABLISH_SESSION = 'identity-establish-session';
|
|
26
|
+
/** Evolve APP-LOCAL: authorize an app-level action. */
|
|
27
|
+
export const IDENTITY_VERB_AUTHORIZE = 'identity-authorize';
|
|
28
|
+
/**
|
|
29
|
+
* Evolve APP-LOCAL (final frame of old epoch): transition to a new epoch keystone.
|
|
30
|
+
* Uses `consume` replenish strategy — self-contained, no parent evolution needed.
|
|
31
|
+
* @see docs/identity/PARADIGM.md#epoch-rotation-handling-keystone-growth
|
|
32
|
+
*/
|
|
33
|
+
export const IDENTITY_VERB_EPOCH_TRANSITION = 'identity-epoch-transition';
|
|
34
|
+
// ===========================================================================
|
|
35
|
+
// POOL IDs
|
|
36
|
+
// Conventional pool identifiers for each identity tier's pools.
|
|
37
|
+
// ===========================================================================
|
|
38
|
+
/** META keystone: structural changes (add/remove device). */
|
|
39
|
+
export const IDENTITY_POOL_ID_ADD_DEVICE = 'identity-add-device';
|
|
40
|
+
/** META keystone: structural changes (remove device). Separate pool allows tighter policy. */
|
|
41
|
+
export const IDENTITY_POOL_ID_REMOVE_DEVICE = 'identity-remove-device';
|
|
42
|
+
/** META keystone: custody transfer (consume strategy — limited uses). */
|
|
43
|
+
export const IDENTITY_POOL_ID_CUSTODY_TRANSFER = 'identity-custody-transfer';
|
|
44
|
+
/** LOCAL keystone: register/deregister app-local keystones. */
|
|
45
|
+
export const IDENTITY_POOL_ID_ADD_APP = 'identity-add-app';
|
|
46
|
+
/** LOCAL keystone: deregister app-local keystones. */
|
|
47
|
+
export const IDENTITY_POOL_ID_REMOVE_APP = 'identity-remove-app';
|
|
48
|
+
/** APP-LOCAL keystone: establish session keystones. */
|
|
49
|
+
export const IDENTITY_POOL_ID_APP_SESSION = 'identity-app-session';
|
|
50
|
+
/** APP-LOCAL keystone: general app-level authorization. */
|
|
51
|
+
export const IDENTITY_POOL_ID_APP_AUTHORIZE = 'identity-app-authorize';
|
|
52
|
+
/**
|
|
53
|
+
* APP-LOCAL keystone: epoch transition pool.
|
|
54
|
+
* Strategy: consume — self-authenticates epoch rotation without parent evolution.
|
|
55
|
+
*/
|
|
56
|
+
export const IDENTITY_POOL_ID_APP_EPOCH = 'identity-app-epoch';
|
|
57
|
+
// ===========================================================================
|
|
58
|
+
// KDF SALTS
|
|
59
|
+
// Used to derive tier-specific MasterSecrets from a root passphrase.
|
|
60
|
+
// Different salt per tier ensures independent secrets even with same passphrase.
|
|
61
|
+
// ===========================================================================
|
|
62
|
+
export const IDENTITY_KDF_SALT_META = 'ibgib-identity-meta-v1';
|
|
63
|
+
export const IDENTITY_KDF_SALT_LOCAL = 'ibgib-identity-local-v1';
|
|
64
|
+
/**
|
|
65
|
+
* APP-LOCAL salt base. Full derivation:
|
|
66
|
+
* `KDF(MasterSecret_local, IDENTITY_KDF_SALT_APP_LOCAL + appId + deviceSalt)`
|
|
67
|
+
*/
|
|
68
|
+
export const IDENTITY_KDF_SALT_APP_LOCAL = 'ibgib-identity-app-local-v1';
|
|
69
|
+
export const IDENTITY_KDF_SALT_SESSION = 'ibgib-identity-session-v1';
|
|
70
|
+
// ===========================================================================
|
|
71
|
+
// INDEXEDDB STORE NAMES
|
|
72
|
+
// ===========================================================================
|
|
73
|
+
/** Stores `LocalIdentityContext` — one record per browser profile. */
|
|
74
|
+
export const IDENTITY_IDB_STORE_LOCAL_CONTEXT = 'identity-local-context';
|
|
75
|
+
/** Stores `AppLocalIdentityContext` — one record per appId per browser profile. */
|
|
76
|
+
export const IDENTITY_IDB_STORE_APP_LOCAL_CONTEXT = 'identity-app-local-context';
|
|
77
|
+
/** Cached META keystone chain — periodically refreshed from identity service. */
|
|
78
|
+
export const IDENTITY_IDB_STORE_META_CACHE = 'identity-meta-cache';
|
|
79
|
+
/** LOCAL keystone frames — genesis through current tip. */
|
|
80
|
+
export const IDENTITY_IDB_STORE_LOCAL_CHAIN = 'identity-local-chain';
|
|
81
|
+
/** APP-LOCAL keystone frames — current epoch genesis through tip. */
|
|
82
|
+
export const IDENTITY_IDB_STORE_APP_LOCAL_CHAIN = 'identity-app-local-chain';
|
|
83
|
+
// ===========================================================================
|
|
84
|
+
// STALENESS POLICY DEFAULTS (milliseconds)
|
|
85
|
+
// App-level policy: how old can a cached META chain be before re-fetch?
|
|
86
|
+
// @see docs/identity/PARADIGM.md#staleness-policy
|
|
87
|
+
// ===========================================================================
|
|
88
|
+
/** Default max age for cached META chain for routine verification. */
|
|
89
|
+
export const IDENTITY_META_CACHE_TTL_NORMAL_MS = 60 * 60 * 1000; // 1 hour
|
|
90
|
+
/** For session establishment: always fetch fresh. */
|
|
91
|
+
export const IDENTITY_META_CACHE_TTL_SESSION_MS = 0;
|
|
92
|
+
/** For offline operation: no TTL (accept whatever is cached). */
|
|
93
|
+
export const IDENTITY_META_CACHE_TTL_OFFLINE_MS = Infinity;
|
|
94
|
+
//# sourceMappingURL=identity-constants.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity-constants.mjs","sourceRoot":"","sources":["../../src/identity/identity-constants.mts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,8EAA8E;AAC9E,iBAAiB;AACjB,8EAA8E;AAC9E,4EAA4E;AAC5E,8EAA8E;AAE9E,6DAA6D;AAC7D,MAAM,CAAC,MAAM,wBAAwB,GAAG,qBAAqB,CAAC;AAC9D,kEAAkE;AAClE,MAAM,CAAC,MAAM,2B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